import type { SqliteDatabase } from '../db/adapter.js'; import { type AppendAck, type RunStatus } from '../ledger/types.js'; import type { AkinatorQuestion, AkinatorResult, TaskProfile } from '../akinator/types.js'; import type { LedgerEventsPage, LedgerRunView, LedgerRunsPage } from '../ledger/query.js'; declare const TERMINAL_STATUS_VALUES: readonly ["completed", "failed", "cancelled", "interrupted"]; type TerminalStatus = (typeof TERMINAL_STATUS_VALUES)[number]; type GatewayIntakeResponse = { runId: string; runStatus: RunStatus; intakeSessionId: string; intakeStatus: AkinatorResult['status']; intake: { status: AkinatorResult['status']; sessionId: string; question: AkinatorQuestion | null; }; question: AkinatorQuestion | null; currentQuestion: AkinatorQuestion | null; missingFields: Array; recommendedTags: string[]; taskProfile: TaskProfile; profileHash: string | null; context: null; untrusted: true; }; type GatewayAppendResponse = AppendAck & { runStatus: RunStatus; untrusted: true; }; type GatewayCloseResponse = AppendAck & { status: TerminalStatus; runStatus: TerminalStatus; untrusted: true; }; export interface AgentGatewayServiceOptions { readonly now?: () => string; readonly home?: string; readonly runIdFactory?: () => string; readonly sessionIdFactory?: () => string; readonly eventIdFactory?: () => string; } interface AgentGatewayAnswerOptions { readonly assertBeforeAnswer?: () => void; } export declare class AgentGatewayService { private readonly database; private readonly options; constructor(database: SqliteDatabase, options?: AgentGatewayServiceOptions); openRun(input: unknown): GatewayIntakeResponse; answerIntake(input: unknown, options?: AgentGatewayAnswerOptions): GatewayIntakeResponse; appendEvents(input: unknown): GatewayAppendResponse; closeRun(input: unknown): GatewayCloseResponse; listRuns(input: unknown): LedgerRunsPage & { untrusted: true; }; readRun(input: unknown): LedgerRunView; readIntake(input: unknown): GatewayIntakeResponse; listEvents(input: unknown): LedgerEventsPage & { untrusted: true; }; private intakeResponse; private lifecycleEvent; private ledgerStore; private requireRun; private scopedOperation; private currentTime; private nextRunId; private nextSessionId; private nextEventId; } export type { GatewayAppendResponse, GatewayCloseResponse, GatewayIntakeResponse, }; //# sourceMappingURL=agent-service.d.ts.map