import type { ExtensionAPI, ExtensionContext, SessionBoundaryDraft, SessionEntry } from "@earendil-works/pi-coding-agent"; import { type WindowMarker } from "./context-window.js"; import { type IncompleteNotesNotifier } from "./boot.js"; export type ResetTailState = { readonly boot: boolean; readonly continuation: boolean; }; /** Match the hidden continuation entry that carries the one reset message. */ export declare function isWindowContinuationEntry(entry: SessionEntry): boolean; /** The single continuation sender: the only reset prose persisted for a window. */ export declare function sendContinuation(pi: ExtensionAPI): void; /** * The closed, ordered reset shape: retain-none native checkpoint, marker, matching boot, * continuation. The boot snapshot is acquired asynchronously after capturing this identity. */ export declare function buildResetDrafts(ctx: ExtensionContext, notifyIncompleteNotes?: IncompleteNotesNotifier, isCurrent?: () => boolean): Promise<[SessionBoundaryDraft, SessionBoundaryDraft, SessionBoundaryDraft, SessionBoundaryDraft]>; /** * Inspect the persisted tail of a reset marker. It reports which reset messages are present * only while the tail stays repairable: metadata may follow the marker, but real conversation, * a foreign message, a later marker, or a misordered/duplicate reset artifact refuses repair. */ export declare function inspectResetTail(ctx: ExtensionContext, markerId: string, windowId: string): ResetTailState | undefined; /** True once the marker's tail already carries its boot and continuation in a valid order. */ export declare function resetTailCommitted(ctx: ExtensionContext, markerId: string, windowId: string): boolean; /** Emit only the reset artifacts an incomplete tail is missing, in the closed order. */ export declare function repairResetTail(pi: ExtensionAPI, ctx: ExtensionContext, marker: WindowMarker, notifyIncompleteNotes?: IncompleteNotesNotifier, isCurrent?: () => boolean): Promise;