/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { CredentialPutOptions, ICredentialStore } from "./ICredentialStore"; /** * Credential store backed by environment variables. * * Keys are mapped to environment variable names via an explicit mapping * or an optional prefix convention. This store is read-only for env vars * that already exist, but `put` can be used to set them for the current * process lifetime. * * @example * ```ts * const store = new EnvCredentialStore({ * "anthropic-api-key": "ANTHROPIC_API_KEY", * "openai-api-key": "OPENAI_API_KEY", * }); * const key = await store.get("anthropic-api-key"); // reads process.env.ANTHROPIC_API_KEY * ``` */ export declare class EnvCredentialStore implements ICredentialStore { private readonly keyToEnvVar; private readonly prefix; /** * @param mapping Explicit credential-key → env-var-name mapping * @param prefix Optional prefix: if a key has no explicit mapping, try `PREFIX_KEY` (uppercased, hyphens → underscores) */ constructor(mapping?: Record, prefix?: string); private resolveEnvVar; private getEnv; get(key: string): Promise; put(key: string, value: string, _options?: CredentialPutOptions): Promise; delete(key: string): Promise; has(key: string): Promise; keys(): Promise; deleteAll(): Promise; } //# sourceMappingURL=EnvCredentialStore.d.ts.map