/** * Storage seam for the hidden recorder. * * A store holds the recorder's JSONL files keyed by path * (`//.jsonl`). Implementations are infra adapters * (RAM, disk, opfs); everything above this seam (the Observer queries, * the /.bash_history view, the history builtin) is storage-agnostic. */ export interface ObserverStore { /** Append bytes to the file at path, creating it if missing. */ append(path: string, data: Uint8Array): Promise; /** Overwrite the file at path (snapshot restore). */ write(path: string, data: Uint8Array): Promise; /** Read every stored file, keyed by file path. */ readAll(): Promise>; /** Read only the files whose key ends with `suffix`. */ readMatching(suffix: string): Promise>; /** Delete every stored file (snapshot-restore rewind). */ clear(): Promise; /** Release any held connections or handles. */ close(): Promise; } /** * Shared ObserverStore behavior. * * Implementations only provide `append`/`write`/`readMatching`/`clear`; * `readAll` is reading with the empty suffix (every key matches), and * `close` defaults to a no-op for stores that hold no connections. * Mirrors Python `ObserverStoreBase`. */ export declare abstract class ObserverStoreBase implements ObserverStore { abstract append(path: string, data: Uint8Array): Promise; abstract write(path: string, data: Uint8Array): Promise; abstract readMatching(suffix: string): Promise>; abstract clear(): Promise; readAll(): Promise>; close(): Promise; } /** In-memory ObserverStore backed by a Map (the default). */ export declare class RAMObserverStore extends ObserverStoreBase { readonly files: Map>; append(path: string, data: Uint8Array): Promise; write(path: string, data: Uint8Array): Promise; readMatching(suffix: string): Promise>; clear(): Promise; } //# sourceMappingURL=store.d.ts.map