UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

26 lines • 1.43 kB
import { type MaterializerAdapter, type MaterializerIdentity, type MaterializerTransaction, type MaterializerUnit, type MaterializerSnapshot } from "./materializer.ts"; interface MemorySession { generation: number; readonly committed: Map<number, MaterializerSnapshot>; abort?: () => void; } /** Reference adapter only: restart preserves committed memory, not process/disk durability. * SQL adapters provide real durability and run the same exported conformance kit. */ export declare class MemoryMaterializerAdapter<T = unknown> implements MaterializerAdapter<T> { private readonly sessions; private stopped; /** Fault hooks for conformance; beforeCommit runs exactly after apply and before atomic publication. */ beforeCommit?: (unit: MaterializerUnit<T>) => void | Promise<void>; beforeEffect?: (effect: unknown, index: number) => void | Promise<void>; constructor(sessions?: Map<string, MemorySession>); private assertLive; reset(key: MaterializerIdentity): Promise<void>; snapshot(key: MaterializerIdentity): MaterializerSnapshot; frontier(key: MaterializerIdentity): Promise<number>; begin(key: MaterializerIdentity): Promise<MaterializerTransaction<T>>; /** Crash discards private transactions; a fresh adapter opens the exact last committed store. */ restart(): MemoryMaterializerAdapter<T>; } export {}; //# sourceMappingURL=materializer-memory.d.ts.map