import type { LiveInputCapability, LiveMessageAdapterResult, LiveMessageDelivery, LiveMessageInput } from "@claudexor/schema"; /** * The slice of a harness adapter the registry needs: its id and the optional * live-input method (`HarnessAdapter.message`, declared beside `cancel`). Typed * structurally so the registry compiles against any adapter object; an adapter * without `message` answers `unsupported` without a native write. */ export interface LiveInputAdapter { readonly id: string; message?(sessionId: string, input: { messageId: string; text: string; }): Promise; } /** * One live agent attempt, registered by the orchestrator for the attempt's * lifetime (structural twin of the orchestrator's LiveAttemptContext). * `currentSessionId` is a LIVE getter: a native transient retry mints a new * session id per try, so a snapshot would steer a dead session. */ export interface LiveAttemptContext { runId: string; taskId: string; attemptId: string; harnessId: string; currentSessionId: () => string | null; /** The harness's declared channel (capability profile `live_input`). */ liveInput: LiveInputCapability; adapter: LiveInputAdapter; /** Thread turns are not steerable in v1 (the continuity packet would lose the message). */ threadBound: boolean; } export interface LiveAttemptRegistration { /** Removes THIS registration only; a stale release cannot evict a replacement. */ release(): void; } export declare class LiveInputRegistry { private readonly interactions; private readonly live; private readonly terminal; constructor(interactions: { pendingForRun(runId: string): readonly unknown[]; }); register(ctx: LiveAttemptContext): LiveAttemptRegistration; /** Remove one attempt; with `owner`, only when that exact registration still holds the slot. */ unregister(runId: string, attemptId: string, owner?: LiveAttemptContext): void; /** Run terminal: every live attempt is gone and later sends answer run_terminal. */ dropForRun(runId: string): void; /** * Decision order (CONTRACT v2): terminal → thread-bound → no live attempt → * multi-attempt → attempt mismatch → pending interaction (INV-048: no vendor * write beside an open question) → no channel → no session → adapter 1:1. */ send(input: LiveMessageInput): Promise; } //# sourceMappingURL=live-input.d.ts.map