import type { DurableJournal } from "@claudexor/journal"; import type { ControlPendingInteraction, InteractionAnswerSet, InteractionHandlerRelease, InteractionRequest } from "@claudexor/schema"; /** Structural twin of the orchestrator's PendingInteractionContext. */ export interface InteractionContext { runId: string; taskId: string; attemptId: string; harnessId: string; request: InteractionRequest; requestedAt: string; timeoutAt: string | null; } export type InteractionAnswerStatus = "delivered" | "not_found" | "already_resolved" | "rejected"; export type InteractionTerminal = "answered" | "timeout" | "run_terminal" | "interrupted"; /** Journal-backed authority for pending interaction projections. */ export declare class InteractionStore { private readonly journal; private readonly pending; private readonly resolved; constructor(journal: DurableJournal); /** Resolve replayed pending interactions only after bootstrap activation. */ recoverAfterStartup(): void; request(ctx: InteractionContext): ControlPendingInteraction; resolve(runId: string, interactionId: string, terminal: InteractionTerminal): "resolved" | "not_found" | "already_resolved"; resolveRun(runId: string, terminal: Extract): string[]; status(runId: string, interactionId: string): "pending" | "resolved" | "missing"; pendingForRun(runId: string): ControlPendingInteraction[]; validateProjection(): void; private replay; private interruptAfterRestart; private commitResolution; private applyResolution; } /** Live answer bridge; durable state remains owned by InteractionStore. */ export declare class InteractionRegistry { private readonly stores; private readonly live; constructor(stores: { forRequest(params: unknown): InteractionStore; all(): InteractionStore[]; }); register(ctx: InteractionContext, params: unknown): Promise; answer(runId: string, interactionId: string, rawAnswers: unknown): { status: InteractionAnswerStatus; message?: string; }; dropForRun(runId: string): void; pendingForRun(runId: string): ControlPendingInteraction[]; private prune; } export declare function interactionProjection(): { name: string; create: (journal: DurableJournal) => InteractionStore; validate: (store: InteractionStore) => void; recover: (store: InteractionStore) => void; }; //# sourceMappingURL=interactions.d.ts.map