The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(services): reformat generated chat wire types
Steven Enamakel6715a92b3f51
diff --git a/app/.prettierignore b/app/.prettierignoreindex aefa57f852..2999557416 100644--- a/app/.prettierignore+++ b/app/.prettierignore@@ -15,3 +15,4 @@ package-lock.jsontarget-test-runtest/e2e/artifactstest-results+src/services/chatWire.generated.tsdiff --git a/app/src/services/chatWire.generated.ts b/app/src/services/chatWire.generated.tsindex 68fef2c481..578a7689b6 100644--- a/app/src/services/chatWire.generated.ts+++ b/app/src/services/chatWire.generated.ts@@ -5,811 +5,873 @@/*** The tagged, strongly typed web event contract.- *+ ** Optional fields are omitted to preserve the deployed struct's wire shape.* The `chat_error` variant intentionally remains able to represent the legacy* `error_type: "cancelled"` payload during the compatibility window.*/-export type WebChannelEvent = ({-citations?: any-client_id: string-event: "chat_done"-full_response?: (string | null)-parts?: (OutboundContentPart[] | null)-request_id: string-seq?: (number | null)-thread_id: string-timing?: (WebTurnTimingPayload | null)-ts?: (number | null)-turn_request_id?: (string | null)-usage?: (WebTurnUsagePayload | null)-} | {-client_id: string-event: "chat_interim"-full_response?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "chat_suggestions"-request_id: string-seq?: (number | null)-suggestions: ChatSuggestion[]-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-copy_key?: (string | null)-copy_params?: any-error_fallback_available?: (boolean | null)-error_provider?: (string | null)-error_retry_after_ms?: (number | null)-error_retryable?: (boolean | null)-error_source?: (string | null)-error_type?: (string | null)-event: "chat_error"-guardrail?: (WebGuardrailPayload | null)-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-cancel_reason?: (string | null)-client_id: string-event: "chat_cancelled"-request_id: string-seq?: (number | null)-superseded_by?: (string | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-delta?: (string | null)-delta_kind?: (string | null)-event: "text_delta"-request_id: string-round?: (number | null)-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-delta?: (string | null)-delta_kind?: (string | null)-event: "thinking_delta"-request_id: string-round?: (number | null)-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-delta?: (string | null)-delta_kind?: (string | null)-event: "tool_args_delta"-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-thread_id: string-tool_call_id?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "inference_start"-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "inference_heartbeat"-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "iteration_start"-message?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "tool_call"-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-thread_id: string-tool_call_id?: (string | null)-tool_display_detail?: (string | null)-tool_display_label?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "tool_progress"-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-elapsed_ms?: (number | null)-event: "tool_result"-failure?: any-output?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-structured?: any-success?: (boolean | null)-thread_id: string-tool_call_id?: (string | null)-tool_display_detail?: (string | null)-tool_display_label?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "turn_cost"-request_id: string-round?: (number | null)-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-usage?: (WebTurnUsagePayload | null)-} | {-client_id: string-event: "subagent_spawned"-message?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-thread_id: string-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "subagent_completed"-message?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-success?: (boolean | null)-thread_id: string-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "subagent_failed"-message?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-success?: (boolean | null)-thread_id: string-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "subagent_awaiting_user"-message?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-success?: (boolean | null)-thread_id: string-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "subagent_iteration_start"-message?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-thread_id: string-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "subagent_tool_call"-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-thread_id: string-tool_call_id?: (string | null)-tool_display_detail?: (string | null)-tool_display_label?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-elapsed_ms?: (number | null)-event: "subagent_tool_result"-failure?: any-output?: (string | null)-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-structured?: any-subagent?: (WebSubagentProgressDetail | null)-success?: (boolean | null)-thread_id: string-tool_call_id?: (string | null)-tool_display_detail?: (string | null)-tool_display_label?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-delta?: (string | null)-delta_kind?: (string | null)-event: "subagent_text_delta"-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-delta?: (string | null)-delta_kind?: (string | null)-event: "subagent_thinking_delta"-request_id: string-round?: (number | null)-seq?: (number | null)-skill_id?: (string | null)-subagent?: (WebSubagentProgressDetail | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-detached?: (boolean | null)-event: "approval_request"-expires_at?: (string | null)-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-cancel_reason?: (string | null)-client_id: string-event: "approval_decided"-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "plan_review_request"-expires_at?: (string | null)-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-cancel_reason?: (string | null)-client_id: string-event: "plan_review_decided"-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-tool_name?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "queue_item_queued"-queue_item?: (WebQueueItemPayload | null)-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "queue_item_delivered"-queue_item?: (WebQueueItemPayload | null)-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "queue_item_removed"-queue_item?: (WebQueueItemPayload | null)-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "thread_goal_updated"-goal?: any-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "thread_goal_cleared"-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "thread_todos_changed"-request_id: string-seq?: (number | null)-thread_id: string-todos?: any-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "run_mode_changed"-message?: (string | null)-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "artifact_ready"-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "artifact_failed"-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "artifact_pending"-request_id: string-seq?: (number | null)-thread_id: string-tool_call_id?: (string | null)-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "memory_activity"-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-args?: any-client_id: string-event: "external_transfer_pending"-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "proactive_message"-full_response?: (string | null)-message?: (string | null)-parts?: (OutboundContentPart[] | null)-persisted_message_id?: (string | null)-request_id: string-seq?: (number | null)-success?: (boolean | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "voice_speak"-full_response?: (string | null)-request_id: string-seq?: (number | null)-success?: (boolean | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-error_source?: (string | null)-error_type?: (string | null)-event: "user_error"-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "chat_message"-full_response?: (string | null)-message?: (string | null)-parts?: (OutboundContentPart[] | null)-request_id: string-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-} | {-client_id: string-event: "chat_segment"-full_response?: (string | null)-message?: (string | null)-parts?: (OutboundContentPart[] | null)-request_id: string-segment_index?: (number | null)-segment_total?: (number | null)-seq?: (number | null)-thread_id: string-ts?: (number | null)-turn_request_id?: (string | null)-})+export type WebChannelEvent =+ | {+ citations?: any;+ client_id: string;+ event: 'chat_done';+ full_response?: string | null;+ parts?: OutboundContentPart[] | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ timing?: WebTurnTimingPayload | null;+ ts?: number | null;+ turn_request_id?: string | null;+ usage?: WebTurnUsagePayload | null;+ }+ | {+ client_id: string;+ event: 'chat_interim';+ full_response?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'chat_suggestions';+ request_id: string;+ seq?: number | null;+ suggestions: ChatSuggestion[];+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ copy_key?: string | null;+ copy_params?: any;+ error_fallback_available?: boolean | null;+ error_provider?: string | null;+ error_retry_after_ms?: number | null;+ error_retryable?: boolean | null;+ error_source?: string | null;+ error_type?: string | null;+ event: 'chat_error';+ guardrail?: WebGuardrailPayload | null;+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ cancel_reason?: string | null;+ client_id: string;+ event: 'chat_cancelled';+ request_id: string;+ seq?: number | null;+ superseded_by?: string | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ delta?: string | null;+ delta_kind?: string | null;+ event: 'text_delta';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ delta?: string | null;+ delta_kind?: string | null;+ event: 'thinking_delta';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ delta?: string | null;+ delta_kind?: string | null;+ event: 'tool_args_delta';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'inference_start';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'inference_heartbeat';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'iteration_start';+ message?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'tool_call';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_display_detail?: string | null;+ tool_display_label?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'tool_progress';+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ elapsed_ms?: number | null;+ event: 'tool_result';+ failure?: any;+ output?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ structured?: any;+ success?: boolean | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_display_detail?: string | null;+ tool_display_label?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'turn_cost';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ usage?: WebTurnUsagePayload | null;+ }+ | {+ client_id: string;+ event: 'subagent_spawned';+ message?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ thread_id: string;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'subagent_completed';+ message?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ success?: boolean | null;+ thread_id: string;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'subagent_failed';+ message?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ success?: boolean | null;+ thread_id: string;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'subagent_awaiting_user';+ message?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ success?: boolean | null;+ thread_id: string;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'subagent_iteration_start';+ message?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ thread_id: string;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'subagent_tool_call';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_display_detail?: string | null;+ tool_display_label?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ elapsed_ms?: number | null;+ event: 'subagent_tool_result';+ failure?: any;+ output?: string | null;+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ structured?: any;+ subagent?: WebSubagentProgressDetail | null;+ success?: boolean | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_display_detail?: string | null;+ tool_display_label?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ delta?: string | null;+ delta_kind?: string | null;+ event: 'subagent_text_delta';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ delta?: string | null;+ delta_kind?: string | null;+ event: 'subagent_thinking_delta';+ request_id: string;+ round?: number | null;+ seq?: number | null;+ skill_id?: string | null;+ subagent?: WebSubagentProgressDetail | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ detached?: boolean | null;+ event: 'approval_request';+ expires_at?: string | null;+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ cancel_reason?: string | null;+ client_id: string;+ event: 'approval_decided';+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'plan_review_request';+ expires_at?: string | null;+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ cancel_reason?: string | null;+ client_id: string;+ event: 'plan_review_decided';+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ tool_name?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'queue_item_queued';+ queue_item?: WebQueueItemPayload | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'queue_item_delivered';+ queue_item?: WebQueueItemPayload | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'queue_item_removed';+ queue_item?: WebQueueItemPayload | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'thread_goal_updated';+ goal?: any;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'thread_goal_cleared';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'thread_todos_changed';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ todos?: any;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'run_mode_changed';+ message?: string | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'artifact_ready';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'artifact_failed';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'artifact_pending';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ tool_call_id?: string | null;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'memory_activity';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ args?: any;+ client_id: string;+ event: 'external_transfer_pending';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'proactive_message';+ full_response?: string | null;+ message?: string | null;+ parts?: OutboundContentPart[] | null;+ persisted_message_id?: string | null;+ request_id: string;+ seq?: number | null;+ success?: boolean | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'voice_speak';+ full_response?: string | null;+ request_id: string;+ seq?: number | null;+ success?: boolean | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ error_source?: string | null;+ error_type?: string | null;+ event: 'user_error';+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'chat_message';+ full_response?: string | null;+ message?: string | null;+ parts?: OutboundContentPart[] | null;+ request_id: string;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ }+ | {+ client_id: string;+ event: 'chat_segment';+ full_response?: string | null;+ message?: string | null;+ parts?: OutboundContentPart[] | null;+ request_id: string;+ segment_index?: number | null;+ segment_total?: number | null;+ seq?: number | null;+ thread_id: string;+ ts?: number | null;+ turn_request_id?: string | null;+ };/*** Typed outbound parts accepted by migrated provider adapters.*/-export type OutboundContentPart = ({-kind: "content"-part: ContentPart-} | {-kind: "voice"-voice: OutboundVoice-})+export type OutboundContentPart =+ | {+ kind: 'content';+ part: ContentPart;+ }+ | {+ kind: 'voice';+ voice: OutboundVoice;+ };/*** Provider-neutral ordered inbound content.*/-export type ContentPart = ({-kind: "text"-/**- * Formatting dialect; formatting remains text, never HTML authority.- */-markdownDialect?: (string | null)-text: string-} | {-altText?: (string | null)-caption?: (string | null)-kind: "image"-media: MediaReference-} | {-caption?: (string | null)-durationMs?: (number | null)-kind: "video"-media: MediaReference-thumbnail?: (MediaReference | null)-} | {-codec?: (string | null)-durationMs?: (number | null)-kind: "audio"-media: MediaReference-title?: (string | null)-transcript?: (string | null)-} | {-caption?: (string | null)-fileName?: (string | null)-kind: "file"-media: MediaReference-} | {-kind: "voice_note"-voiceNote: VoiceNote-} | {-altText?: (string | null)-emoji?: (string | null)-kind: "sticker"-media: MediaReference-packId?: (string | null)-stickerId?: (string | null)-} | {-accuracyMeters?: (number | null)-address?: (string | null)-kind: "location"-label?: (string | null)-latitude: number-liveUntilUnixMs?: (number | null)-longitude: number-} | {-displayName: string-emails: ContactMethod[]-kind: "contact"-organization?: (string | null)-phoneNumbers: ContactMethod[]-} | {-kind: "buttons"-rows: ButtonAction[][]-} | {-closesAtUnixMs?: (number | null)-kind: "poll"-multipleChoice: boolean-options: string[]-providerPollId?: (string | null)-question: string-} | {-blocks: any-kind: "presentation"-} | {-data: any-kind: "native"-provider: string-})+export type ContentPart =+ | {+ kind: 'text';+ /**+ * Formatting dialect; formatting remains text, never HTML authority.+ */+ markdownDialect?: string | null;+ text: string;+ }+ | {+ altText?: string | null;+ caption?: string | null;+ kind: 'image';+ media: MediaReference;+ }+ | {+ caption?: string | null;+ durationMs?: number | null;+ kind: 'video';+ media: MediaReference;+ thumbnail?: MediaReference | null;+ }+ | {+ codec?: string | null;+ durationMs?: number | null;+ kind: 'audio';+ media: MediaReference;+ title?: string | null;+ transcript?: string | null;+ }+ | {+ caption?: string | null;+ fileName?: string | null;+ kind: 'file';+ media: MediaReference;+ }+ | {+ kind: 'voice_note';+ voiceNote: VoiceNote;+ }+ | {+ altText?: string | null;+ emoji?: string | null;+ kind: 'sticker';+ media: MediaReference;+ packId?: string | null;+ stickerId?: string | null;+ }+ | {+ accuracyMeters?: number | null;+ address?: string | null;+ kind: 'location';+ label?: string | null;+ latitude: number;+ liveUntilUnixMs?: number | null;+ longitude: number;+ }+ | {+ displayName: string;+ emails: ContactMethod[];+ kind: 'contact';+ organization?: string | null;+ phoneNumbers: ContactMethod[];+ }+ | {+ kind: 'buttons';+ rows: ButtonAction[][];+ }+ | {+ closesAtUnixMs?: number | null;+ kind: 'poll';+ multipleChoice: boolean;+ options: string[];+ providerPollId?: string | null;+ question: string;+ }+ | {+ blocks: any;+ kind: 'presentation';+ }+ | {+ data: any;+ kind: 'native';+ provider: string;+ };/*** Origin of voice transcript enrichment.*/-export type VoiceTranscriptSource = ("provider" | "host_stt")+export type VoiceTranscriptSource = 'provider' | 'host_stt';/*** Whether a voice transcript is still being produced or is final.*/-export type VoiceTranscriptState = ("pending" | "complete" | "unavailable")+export type VoiceTranscriptState = 'pending' | 'complete' | 'unavailable';/*** Visual button emphasis; it does not change action authority.*/-export type ButtonStyle = ("primary" | "secondary" | "danger")+export type ButtonStyle = 'primary' | 'secondary' | 'danger';/*** Explicit outbound voice operation. Synthesis is opt-in and keeps its text.*/-export type OutboundVoice = ({-/**- * Optional bounded inline payload for one native upload. The durable- * reference remains the canonical media identity.- */-audioBase64?: (string | null)-codec?: (string | null)-durationMs?: (number | null)-kind: "media"-media: MediaReference-/**- * Normalised 0.0-1.0 loudness preview for providers that draw one- * (WhatsApp push-to-talk). Absent when the codec path produced none.- */-waveform?: (number[] | null)-} | {-kind: "synthesize"-text: string-voice?: (string | null)-})+export type OutboundVoice =+ | {+ /**+ * Optional bounded inline payload for one native upload. The durable+ * reference remains the canonical media identity.+ */+ audioBase64?: string | null;+ codec?: string | null;+ durationMs?: number | null;+ kind: 'media';+ media: MediaReference;+ /**+ * Normalised 0.0-1.0 loudness preview for providers that draw one+ * (WhatsApp push-to-talk). Absent when the codec path produced none.+ */+ waveform?: number[] | null;+ }+ | {+ kind: 'synthesize';+ text: string;+ voice?: string | null;+ };/*** One inbound media reference, preserving provider attachment order.*/export interface MediaReference {-codec?: (string | null)-contentType?: (string | null)-durationMs?: (number | null)-fileName?: (string | null)-height?: (number | null)-/**- * Provider-neutral media kind.- */-kind?: ("image" | "video" | "audio" | "document" | "unknown")-localCachePath?: (string | null)-/**- * Stable host-owned identifier for media stored outside the channel- * provider. It is safe to persist and does not imply a shared filesystem.- */-opaqueId?: (string | null)-path?: (string | null)-platformMessageId?: (string | null)-sizeBytes?: (number | null)-transcribed?: boolean-url?: (string | null)-width?: (number | null)+ codec?: string | null;+ contentType?: string | null;+ durationMs?: number | null;+ fileName?: string | null;+ height?: number | null;+ /**+ * Provider-neutral media kind.+ */+ kind?: 'image' | 'video' | 'audio' | 'document' | 'unknown';+ localCachePath?: string | null;+ /**+ * Stable host-owned identifier for media stored outside the channel+ * provider. It is safe to persist and does not imply a shared filesystem.+ */+ opaqueId?: string | null;+ path?: string | null;+ platformMessageId?: string | null;+ sizeBytes?: number | null;+ transcribed?: boolean;+ url?: string | null;+ width?: number | null;}/*** Audio message metadata and optional transcript enrichment.*/export interface VoiceNote {-codec?: (string | null)-durationMs?: (number | null)-media?: MediaReference1-pushToTalk?: boolean-transcript?: (VoiceTranscript | null)-waveform?: (number[] | null)+ codec?: string | null;+ durationMs?: number | null;+ media?: MediaReference1;+ pushToTalk?: boolean;+ transcript?: VoiceTranscript | null;+ waveform?: number[] | null;}/*** One inbound media reference, preserving provider attachment order.*/export interface MediaReference1 {-codec?: (string | null)-contentType?: (string | null)-durationMs?: (number | null)-fileName?: (string | null)-height?: (number | null)-/**- * Provider-neutral media kind.- */-kind?: ("image" | "video" | "audio" | "document" | "unknown")-localCachePath?: (string | null)-/**- * Stable host-owned identifier for media stored outside the channel- * provider. It is safe to persist and does not imply a shared filesystem.- */-opaqueId?: (string | null)-path?: (string | null)-platformMessageId?: (string | null)-sizeBytes?: (number | null)-transcribed?: boolean-url?: (string | null)-width?: (number | null)+ codec?: string | null;+ contentType?: string | null;+ durationMs?: number | null;+ fileName?: string | null;+ height?: number | null;+ /**+ * Provider-neutral media kind.+ */+ kind?: 'image' | 'video' | 'audio' | 'document' | 'unknown';+ localCachePath?: string | null;+ /**+ * Stable host-owned identifier for media stored outside the channel+ * provider. It is safe to persist and does not imply a shared filesystem.+ */+ opaqueId?: string | null;+ path?: string | null;+ platformMessageId?: string | null;+ sizeBytes?: number | null;+ transcribed?: boolean;+ url?: string | null;+ width?: number | null;}/*** Transcript enrichment attached to a voice note without replacing its audio.*/export interface VoiceTranscript {-language?: (string | null)-source: VoiceTranscriptSource-state: VoiceTranscriptState-text: string+ language?: string | null;+ source: VoiceTranscriptSource;+ state: VoiceTranscriptState;+ text: string;}/*** One typed phone number or email address on a contact card.*/export interface ContactMethod {-label?: (string | null)-value: string+ label?: string | null;+ value: string;}/*** One provider-neutral action button in an ordered content row.*/export interface ButtonAction {-disabled: boolean-id: string-label: string-style?: (ButtonStyle | null)+ disabled: boolean;+ id: string;+ label: string;+ style?: ButtonStyle | null;}export interface WebTurnTimingPayload {-first_token_ms?: (number | null)-first_tool_ms?: (number | null)-tokens_per_second?: (number | null)-total_ms?: (number | null)+ first_token_ms?: number | null;+ first_tool_ms?: number | null;+ tokens_per_second?: number | null;+ total_ms?: number | null;}export interface WebTurnUsagePayload {-cached_input_tokens: number-context_tokens?: number-context_window: number-/**- * Cost provenance copied as a wire enum to avoid depending on the harness.- */-cost_source?: ("charged" | "estimated" | "unknown")-cost_usd?: (number | null)-input_tokens: number-output_tokens: number-subagents?: WebSubagentUsagePayload[]+ cached_input_tokens: number;+ context_tokens?: number;+ context_window: number;+ /**+ * Cost provenance copied as a wire enum to avoid depending on the harness.+ */+ cost_source?: 'charged' | 'estimated' | 'unknown';+ cost_usd?: number | null;+ input_tokens: number;+ output_tokens: number;+ subagents?: WebSubagentUsagePayload[];}export interface WebSubagentUsagePayload {-agent_id: string-cost_usd?: (number | null)-input_tokens: number-output_tokens: number-task_id: string+ agent_id: string;+ cost_usd?: number | null;+ input_tokens: number;+ output_tokens: number;+ task_id: string;}export interface ChatSuggestion {-label?: (string | null)-prompt: string+ label?: string | null;+ prompt: string;}export interface WebGuardrailPayload {-reasons?: WebGuardrailReason[]-score: number-verdict: string+ reasons?: WebGuardrailReason[];+ score: number;+ verdict: string;}export interface WebGuardrailReason {-code: string-message: string+ code: string;+ message: string;}export interface WebSubagentProgressDetail {-agent_id?: (string | null)-cached_input_tokens?: (number | null)-changed_files?: (string[] | null)-child_iteration?: (number | null)-child_max_iterations?: (number | null)-cost_usd?: (number | null)-dedicated_thread?: (boolean | null)-dirty_status?: (boolean | null)-display_name?: (string | null)-elapsed_ms?: (number | null)-input_tokens?: (number | null)-iterations?: (number | null)-mode?: (string | null)-output?: (string | null)-output_chars?: (number | null)-output_tokens?: (number | null)-parent_call_id?: (string | null)-prompt_chars?: (number | null)-task_id?: (string | null)-worker_thread_id?: (string | null)-worktree_path?: (string | null)+ agent_id?: string | null;+ cached_input_tokens?: number | null;+ changed_files?: string[] | null;+ child_iteration?: number | null;+ child_max_iterations?: number | null;+ cost_usd?: number | null;+ dedicated_thread?: boolean | null;+ dirty_status?: boolean | null;+ display_name?: string | null;+ elapsed_ms?: number | null;+ input_tokens?: number | null;+ iterations?: number | null;+ mode?: string | null;+ output?: string | null;+ output_chars?: number | null;+ output_tokens?: number | null;+ parent_call_id?: string | null;+ prompt_chars?: number | null;+ task_id?: string | null;+ worker_thread_id?: string | null;+ worktree_path?: string | null;}export interface WebQueueItemPayload {-id: string-lane?: (string | null)-text_preview?: (string | null)+ id: string;+ lane?: string | null;+ text_preview?: string | null;}