@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
33 lines • 1.85 kB
TypeScript
import { type LegacyViewCursor } from "./legacy-view-cursor.ts";
/** The legacy frames a cut is read in: lifecycle, the active message's records, then the open questions. */
export interface FrozenAttachView {
readonly placeholders: boolean;
readonly now: number;
readonly onRelease: () => void;
}
/**
* Today's retained replay source, kept only for a session that owns no acceptance lane (RULING-25 Q5: an
* externally constructed session keeps today's retention until its legacy adapter is ruled); a lane-owned session
* is never written here, its late peers read the frozen compact current-state view (`compact-legacy-view.ts`).
*/
export declare class LegacyReplayStore {
private readonly sessionSnapshots;
private readonly lifecycleSnapshots;
private readonly pendingQuestions;
private cursors;
/** Legacy views of either source not yet released: zero once every barrier ended (R3.C6.4 accounting). */
get openCursors(): number;
pendingQuestionCount(sessionId: string): number;
remember(sessionId: string, value: Record<string, unknown>, line: string, placeholderLine?: string): void;
forget(sessionId: string): void;
/** A late peer's baseline, frozen now: the array ref and its length, the question frames at this clock. */
freezeAttach(sessionId: string, view: FrozenAttachView): LegacyViewCursor;
/**
* The message slot of a resync frame, read when the cut is read: the latest retained record carrying a message.
* The producer may mutate its partial object after emission; the serialized record, not that object, fixes it.
*/
latestMessage(sessionId: string): unknown;
/** Counts a legacy view of either source open until its release runs once. */
track: (onRelease: () => void) => (() => void);
}
//# sourceMappingURL=legacy-replay-store.d.ts.map