@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
23 lines • 913 B
TypeScript
import { type SessionOwnership } from "./ownership.ts";
interface EntryLike {
readonly type: string;
readonly customType?: string;
readonly data?: unknown;
readonly id?: unknown;
}
/**
* The session-manager write funnel asks this before every persisted write. It folds only the entries appended since
* the last call (the funnel appends in place), and starts over when the entry array is replaced by a load or branch.
*/
export declare class SessionWriteGuard {
private source;
private seen;
private sessionId;
private verdict;
assertWritable(entries: readonly EntryLike[], entry: EntryLike, sessionFile: string): void;
assertRewritable(entries: readonly EntryLike[], sessionFile: string): void;
isWritable(entries: readonly EntryLike[]): boolean;
ownership(entries: readonly EntryLike[]): SessionOwnership;
}
export {};
//# sourceMappingURL=write-guard.d.ts.map