/** * SecretStore — where Waggle keeps API keys, connector tokens and other * secrets (P1.2). Code that reads or writes secrets depends on this interface; * `VaultStore` is the file-backed implementation (AES-256-GCM entries in * `vault.json`, key in `.vault-key` protected by owner-only permissions). */ export interface SecretEntry { name: string; value: string; metadata?: Record; updatedAt: string; } export interface SecretSummary { name: string; metadata?: Record; updatedAt: string; } export interface SecretStore { /** The decrypted secret, or null when it is missing or cannot be read. */ get(name: string): SecretEntry | null; set(name: string, value: string, metadata?: Record): void; setAsync(name: string, value: string, metadata?: Record): Promise; /** Returns true when the secret existed. */ delete(name: string): boolean; deleteAsync(name: string): Promise; /** Names and metadata, never values. */ list(): SecretSummary[]; has(name: string): boolean; }