import { type Database } from "./database.js"; /** A stop of this chat's sandbox that the model has not worked in since. */ export type UnseenSandboxStop = { kind: "stopped" | "lost"; /** When the stop was recorded, ISO 8601. */ at: string; /** The drain reason of a reaper stop (`idle`, ...), when recorded. */ reason: string | null; }; /** * The latest stop of this chat's managed sandbox (`sandbox.box.terminated` * from the reaper's drain, or `sandbox.box.lost`) that is newer than the * model's own last output in the chat (a tool call or a completed message). * Tool results don't count: a person's answer or approval is recorded as one * after the stop, and the model has not acted on the new box yet. * * Only the workspace is saved and restored across such a stop: files outside * it and running programs may be gone, so the model is told before it relies * on them. Comparing with the model's own last output delivers that once, when * the next turn attempt prepares its input, whether or not the replacement box * already exists. A box found lost during an attempt, after its input was * prepared, is not covered: the attempt's later output hides it. A Connected * Machine's drain (`providerStopped: false`) stops nothing and is skipped. * Read-only; uses the per-type sequence index. */ export declare function readUnseenSandboxStop(db: Database, workspaceId: string, sessionId: string): Promise;