import type { JsonObject } from "../../shared/types.js"; import type { CallerIdentity } from "../../gateway/session-comm-guards.js"; export type TalkControlTarget = "gateway" | "browser"; export type TalkControlMutability = "read" | "write" | "effect"; export interface TalkControlParameters extends JsonObject { type: "object"; properties: JsonObject; required: string[]; additionalProperties: false; } export interface TalkControlOperation { name: string; description: string; parameters: TalkControlParameters; target: TalkControlTarget; intent: string; mutability: TalkControlMutability; operatorOnly: boolean; verification: string; } export interface TalkControlManifest { version: 1; operations: TalkControlOperation[]; } export interface TalkUiEffect { invalidate?: string[]; navigate?: string; focus?: string; } export interface TalkControlDispatch { talkSessionId: string; providerCallId: string; providerItemId?: string; providerEventId?: string; providerTranscriptItemId?: string; browserInstanceId?: string; credentialGeneration?: number; tool: string; arguments: string; caller: CallerIdentity; } export interface TalkControlExecution { data: Record; uiEffect: TalkUiEffect | null; } export interface TalkControlVerification { ok: boolean; evidence: Record; } export type TalkControlSuccess = { ok: true; receiptId: string; replayed: boolean; verified: true; operation: string; data: Record; evidence: Record; uiEffect: TalkUiEffect | null; }; export type TalkControlFailure = { ok: false; code: string; error: string; }; export type TalkControlResult = TalkControlSuccess | TalkControlFailure; export interface TalkControlAdapterContext { talkSessionId: string; providerCallId: string; providerItemId?: string; providerEventId?: string; providerTranscriptItemId?: string; browserInstanceId?: string; credentialGeneration?: number; idempotencyKey: string; caller: CallerIdentity; } export declare class TalkControlRefusal extends Error { readonly code: string; constructor(code: string, message: string); } export interface TalkControlRuntimeOptions { manifest: TalkControlManifest; execute: (operation: TalkControlOperation, args: Record, context: TalkControlAdapterContext) => Promise; verify: (operation: TalkControlOperation, args: Record, execution: TalkControlExecution) => Promise; receipts?: TalkControlReceiptStore; now?: () => number; } export interface TalkControlReceipt { talkSessionId: string; providerCallId: string; requestFingerprint: string; result: TalkControlResult; createdAt: number; } export interface TalkControlReceiptStore { get(talkSessionId: string, providerCallId: string): TalkControlReceipt | null; put(receipt: TalkControlReceipt): { status: "stored" | "replayed"; receipt: TalkControlReceipt; } | { status: "conflict"; receipt: TalkControlReceipt; }; } //# sourceMappingURL=types.d.ts.map