import type { Session } from "../../shared/types.js"; /** * Marker a request handler writes when a new user message arrives while a turn * is still running: the old turn's answer is no longer wanted, so it settles * quietly as interrupted instead of replying over the newer one. */ export declare const SUPERSEDED_TURN_META_KEY = "supersededRunningTurnAt"; /** Write the marker: a newer user intent has displaced this session's live turn. */ export declare function supersedeRunningTurn(session: Session): void; export declare function clearSupersededTurnMeta(sessionId: string): void; export declare function isTurnSuperseded(sessionId: string, turnStartedAt: number): boolean; /** * Prompts a newer user message displaced before the engine had begun their * turn. The engine never recorded them, so the next turn carries them forward; * without this they are lost from the engine's context entirely. */ export declare const UNSEEN_INTERRUPTED_PROMPTS_META_KEY = "unseenInterruptedPrompts"; /** Hold an interrupted prompt the engine never read, for the next turn to carry. */ export declare function retainUnseenInterruptedPrompt(sessionId: string, prompt: string): void; /** The interrupted prompts still owed to the engine, oldest first. */ export declare function readUnseenInterruptedPrompts(session: Session): string[]; /** Drop the held prompts a turn has now put in front of the engine. */ export declare function withUnseenInterruptedPromptsCleared(meta: unknown): Record; //# sourceMappingURL=superseded.d.ts.map