import type { CallerIdentity } from "../../gateway/session-comm-guards.js"; import type { TalkApprovalRepository } from "./repository.js"; export interface TodoApprovalSnapshot { todoId: string; todoVersion: number; approvalId: string; request: string; options: string[] | null; state: "pending" | "approved" | "rejected"; } export interface TodoApprovalPort { snapshot: (id: string) => TodoApprovalSnapshot | null; decide: (input: { id: string; decision: "approve" | "reject"; choice?: string; }) => { ok: boolean; version?: number; code?: string; message?: string; }; } interface ServiceOptions { repository: TalkApprovalRepository; todo: TodoApprovalPort; now?: () => number; ttlMs?: number; } type ApprovalFailure = { ok: false; code: string; error: string; replayed?: boolean; }; type ApprovalCommit = { ok: true; receiptId: string; replayed: boolean; challengeId: string; todoId: string; decision: "approve" | "reject"; choice?: string; transcript: string; version: number; }; interface BoundInput { talkSessionId: string; browserInstanceId: string; credentialGeneration: number; providerCallId: string; providerToolItemId?: string; providerToolEventId?: string; providerTranscriptItemId: string; caller: CallerIdentity; } export declare class TalkApprovalService { private readonly repository; private readonly todo; private readonly now; private readonly ttlMs; constructor(options: ServiceOptions); prepareTodo(input: BoundInput & { todoId: string; }): ApprovalFailure | { ok: true; replayed: boolean; challengeId: string; expiresAt: number; todoId: string; request: string; allowedUtterances: string[]; }; commitTodo(input: BoundInput & { challengeId: string; }): ApprovalFailure | ApprovalCommit; private commitNew; private applyDecision; private validateCommit; private refuse; private audit; } export {}; //# sourceMappingURL=service.d.ts.map