import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; import * as Redacted from "effect/Redacted"; import * as Schema from "effect/Schema"; import { AuthError } from "./AuthProvider.ts"; export declare const credentialsFilePath: (profile: string, provider: string) => string; /** * Service exposing per-profile credential file helpers. All methods have * `R = never` — the {@link FileSystem.FileSystem} requirement is captured * by {@link CredentialsStoreLive} when the layer is built. * * Reads and writes go through the provider's declared credential schema, so * a hand-edited or corrupted secrets file surfaces as a typed `AuthError` * (with a reconfigure hint) instead of propagating malformed data into API * calls. */ export interface CredentialsStoreService { readonly read: (profile: string, provider: string, schema: Schema.Codec) => Effect.Effect; readonly write: (profile: string, provider: string, schema: Schema.Codec, credentials: A) => Effect.Effect; readonly delete: (profile: string, provider: string) => Effect.Effect; /** * Recursively remove the `~/.alchemy/credentials/{profile}` directory * containing all per-provider secrets for `profile`. No-op if it doesn't exist. */ readonly deleteProfile: (profile: string) => Effect.Effect; /** * The same store rooted at `dirFor(profile)` instead of * `~/.alchemy/credentials/{profile}` — for caches kept beside a profile * rather than with its credentials. */ readonly scoped: (dirFor: (profile: string) => string) => CredentialsStoreService; } declare const CredentialsStore_base: Context.ServiceClass; export declare class CredentialsStore extends CredentialsStore_base { } export declare const CredentialsStoreLive: Layer.Layer; export declare function displayRedacted(r: Redacted.Redacted, visibleChars?: number): string; export {}; //# sourceMappingURL=Credentials.d.ts.map