export interface StoredIdentity { agentId: string; ownerId: string; privateKeyPem: string; } /** * Seam. The file implementation is the fallback; if the harness exposes a * credential service, a second implementation swaps in behind this interface * without touching callers. */ export interface CredentialStore { load(profile: string): Promise; save(profile: string, identity: StoredIdentity): Promise; /** * Throws (e.g. `UnsafeStoreLocationError`) if the store cannot safely * accept a `save` right now, without writing anything. Callers that spend * a one-shot resource before saving (a single-use bootstrap token, most * notably) should call this first, so an unusable destination fails before * the resource is spent rather than after. `save` performs the same check * again itself — the destination can change between the two calls, and the * check inside `save` is the guarantee that actually protects the write. */ assertWritable(profile: string): Promise; } /** Raised when the store refuses to write the private key where it is. */ export declare class UnsafeStoreLocationError extends Error { } export declare function createFileCredentialStore(homeDir: string): CredentialStore;