import type { TurnOrigin } from '@xopcai/endpoint-tools-protocol'; import type { UserTurnAttachment } from '../user-turn-input.js'; import { type SessionInputDelivery, type SessionInputState } from '../../storage/sqlite/index.js'; export type SubmitSessionInput = { sessionKey: string; clientMessageId: string; delivery: SessionInputDelivery; content: string; attachments?: UserTurnAttachment[]; thinking?: string; origin: TurnOrigin; }; export declare class SessionInputCoordinator { private readonly deps; private readonly draining; private readonly submissionTails; constructor(deps: { sessionExists: (sessionKey: string) => Promise; execute: (input: { runId: string; sessionKey: string; content: string; attachments?: UserTurnAttachment[]; thinking?: string; origin: TurnOrigin; }) => Promise<{ status: string; summary: string; }>; prepareAttachments: (sessionKey: string, attachments?: UserTurnAttachment[]) => Promise; steer: (sessionKey: string, content: string) => Promise; emit: (type: string, payload: unknown) => void; }); snapshot(sessionKey: string): SessionInputState; private publish; submit(input: SubmitSessionInput): Promise<{ ok: true; effectiveDelivery: SessionInputDelivery; state: SessionInputState; } | { ok: false; code: 'BAD_REQUEST' | 'QUEUE_FULL'; }>; private submitLocked; drain(sessionKey: string): Promise; update(sessionKey: string, id: string, body: { version: number; content?: string; attachments?: UserTurnAttachment[]; thinking?: string; position?: number; }): Promise<{ ok: boolean; state: SessionInputState; }>; remove(sessionKey: string, id: string, version: number): { ok: boolean; state: SessionInputState; }; waitForCompletion(sessionKey: string, clientMessageId: string): Promise; recover(): void; }