/** * Z.AI credential resolution (DESIGN.md §6, P0-02 — Fixup A — B4, B7). * * Single source of truth for the Z.AI API key. The primary * `Z_AI_API_KEY` is accepted alongside the characterized `ZAI_API_KEY` * alias; `Z_AI_API_KEY` takes precedence when both are set. Whitespace- * only values are treated as absent, matching the descriptor's * `isConfigured` contract. * * Boundary rules (ARCHITECTURE.md §2): * - May import the normalized-error contract only. * - Must NOT import transport, command presentation, or another * Provider's Adapter. * * Missing credentials are surfaced as {@link ConfigurationError} * (exit 3), distinct from {@link AuthError} (exit 1) which means the * Provider REJECTED a presented credential. This mirrors `lib/config.ts` * (`loadConfig`/`getApiKey`) so every Z.AI entry point agrees on the * missing-credential exit code. */ /** Credential environment names read by this module (#232 derivation pin). */ export declare const ENV_NAMES: readonly ["Z_AI_API_KEY", "ZAI_API_KEY"]; /** * Resolve the Z.AI API key without throwing. `Z_AI_API_KEY` takes * precedence over the `ZAI_API_KEY` alias. Returns `undefined` when no * non-blank value is present. */ export declare function resolveZaiApiKey(env: NodeJS.ProcessEnv): string | undefined; /** * Resolve the Z.AI API key or throw {@link ConfigurationError} (exit 3) * when it is missing. Call this at every capability invocation gate. */ export declare function requireZaiApiKey(env: NodeJS.ProcessEnv): string; /** * True when a non-blank Z.AI API key (primary or alias) is configured. * Metadata-only: performs no transport construction and reads no other * Provider's credentials. */ export declare function isZaiConfigured(env: NodeJS.ProcessEnv): boolean; //# sourceMappingURL=credentials.d.ts.map