@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
18 lines • 1.19 kB
TypeScript
/** A session writer whose grant must live exactly as long as the writer itself. */
export interface SessionWriterOwner {
getSessionFile(): string | undefined;
isPersisted(): boolean;
}
export declare function installSessionWriteReservation(reservation: (path: string) => void): void;
/** Synchronous SessionManager entry points must obtain the host grant before touching a writer. */
export declare function reserveSessionWrite(path: string): void;
export declare function registerSessionWriter(owner: SessionWriterOwner): void;
export declare function unregisterSessionWriter(owner: SessionWriterOwner): void;
/**
* Whether a persisted writer other than `self` still owns `path`, in any engine copy of this realm. Callers that
* release per-session caches ask this so the last owner is the one that clears them; collected writers are pruned here.
*/
export declare function hasOtherLiveSessionWriter(path: string, self: SessionWriterOwner): boolean;
/** Session files still owned by a live persisted writer of any engine copy; collected writers are pruned here. */
export declare function liveSessionWritePaths(): string[];
//# sourceMappingURL=session-write-reservation.d.ts.map