import type { Resource } from "webappwiz/disposable"; import type { SecretStore } from "./secret-store.js"; /** * A store whose values live only in this process's memory: never written to * disk, the environment, argv or a log, and gone when the process is. For a * daemon handed keys over a socket that must not outlive it, such as a worker * holding an agent's API key for the length of a task. `clear()` drops every * value at once, and `dispose()` does the same, so it can sit in a disposer. * * The values sit in a private field, so neither `console.log`, * `Bun.inspect` nor `JSON.stringify` of the store shows one; its label and * errors never hold one either. JavaScript cannot wipe a string, so a dropped * value lingers in the heap until the garbage collector reuses its memory: * pair it with `makeUndumpable()` from `webappwiz/system`, so no other * process can read that memory meanwhile. */ export declare class MemorySecretStore implements SecretStore, Resource { #private; readonly label: string; constructor(label?: string); get(name: string): Promise; set(name: string, value: string): Promise; delete(name: string): Promise; names(): Promise; /** Drops every value it keeps. */ clear(): void; dispose(): void; /** Its label and the names it keeps, never a value. */ toJSON(): { label: string; names: string[]; }; }