import { type TurnOrigin } from '@xopcai/endpoint-tools-protocol'; export type SessionInputDelivery = 'next' | 'steer'; export type SessionInputStatus = 'queued' | 'running' | 'injecting' | 'completed' | 'cancelled' | 'failed' | 'interrupted'; export type SessionInput = { id: string; sessionKey: string; clientMessageId: string; requestedDelivery: SessionInputDelivery; effectiveDelivery: SessionInputDelivery; status: SessionInputStatus; content: string; attachments?: unknown[]; thinking?: string; origin: TurnOrigin; position: number; targetRunId?: string; runId?: string; version: number; error?: string; createdAtMs: number; updatedAtMs: number; }; export type SessionInputState = { sessionKey: string; revision: number; activeRunId?: string; activeInputId?: string; inputs: SessionInput[]; }; export declare function getSessionInputState(sessionKey: string): SessionInputState; export declare function findSessionInput(sessionKey: string, clientMessageId: string): SessionInput | undefined; export declare function insertSessionInput(input: { id: string; sessionKey: string; clientMessageId: string; requestedDelivery: SessionInputDelivery; effectiveDelivery: SessionInputDelivery; status: 'queued' | 'injecting'; content: string; attachments?: unknown[]; thinking?: string; origin: TurnOrigin; targetRunId?: string; }): SessionInput; export declare function claimNextSessionInput(sessionKey: string, runId: string): SessionInput | undefined; export declare function finishSessionInputRun(sessionKey: string, runId: string, status: 'completed' | 'failed' | 'cancelled', error?: string): boolean; export declare function setSessionInputStatus(id: string, status: SessionInputStatus, patch?: { effectiveDelivery?: SessionInputDelivery; targetRunId?: string | null; error?: string; }): boolean; export declare function mutateQueuedSessionInput(input: { sessionKey: string; id: string; version: number; content?: string; attachments?: unknown[]; thinking?: string; position?: number; }): boolean; export declare function cancelQueuedSessionInput(sessionKey: string, id: string, version: number): boolean; export declare function recoverSessionInputState(): string[];