@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
23 lines • 1.33 kB
TypeScript
import type { ResyncCut, ResyncReason } from "./socket-peer-recovery.ts";
export interface FrozenResyncView {
readonly reason: ResyncReason;
readonly placeholders: boolean;
/** Read when the cut is read: whether the attachment the cut was taken for is gone (`closed` then). */
readonly closedNow: (sessionId: string) => boolean;
readonly onRelease: () => void;
}
/**
* What one session resumes from: the message a legacy consumer holds at the cut (null when it has nothing), and the
* frames that follow its `resync_required` before any captured record (RULING-115: an open tool call's reset).
*/
export interface ResyncResume {
readonly message: unknown;
readonly frames?: readonly Readonly<Record<string, unknown>>[];
}
export type ResyncMessageSource = (sessionId: string) => Promise<ResyncResume>;
/**
* A shed's cut: one `resync_required` frame per session, read in order when the gap is delivered. `entries` fixes
* the sessions at the first read (the shed's set, or today's delivery-time union), `messageOf` each one's message.
*/
export declare function resyncCut(sessions: readonly string[], entries: () => readonly string[], messageOf: ResyncMessageSource, view: FrozenResyncView, track: (onRelease: () => void) => () => void): ResyncCut;
//# sourceMappingURL=legacy-resync-view.d.ts.map