/** * Auth guard combinator for commands that require authentication. * * Wraps an Effect with a pre-check for authentication. If no token is * resolvable, fails immediately with an actionable error message directing * the user to `axm login`. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import { type AppError } from "../app-error/index.js"; import { CredentialStore, RegistryUrl } from "./index.js"; /** * Wraps an Effect with an auth guard. * * - If the target registry is local, runs the inner effect directly. * - If a token is already resolvable, runs the inner effect directly. * - If no token: fails with `AUTH_LOGIN_REQUIRED`. */ export declare const withAuthGuard: (effect: Effect.Effect, options?: { registryUrl?: string; }) => Effect.Effect; //# sourceMappingURL=guard.d.ts.map