@rkat/sdk 0.7.30 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export declare const CONTRACT_VERSION = "0.7.30";
1
+ export declare const CONTRACT_VERSION = "0.8.0";
2
2
  export type Value = unknown;
3
3
  export interface WireUsage {
4
4
  input_tokens: number;
@@ -27,27 +27,11 @@ export interface WireRunResult {
27
27
  message: string;
28
28
  }>;
29
29
  }
30
- export interface WireProviderMeta {
31
- provider: string;
32
- [key: string]: unknown;
33
- }
34
30
  export interface WireToolResult {
35
31
  tool_use_id: string;
36
32
  content: WireToolResultContent;
37
33
  is_error?: boolean;
38
34
  }
39
- export interface WireSessionMessage {
40
- role: string;
41
- created_at: string;
42
- kind?: string;
43
- body?: string;
44
- content?: WireContentInput;
45
- stop_reason?: WireStopReason;
46
- interaction_id?: string;
47
- run_id?: string;
48
- blocks?: WireAssistantBlock[];
49
- results?: WireToolResult[];
50
- }
51
35
  export interface WireSessionHistory {
52
36
  session_id: string;
53
37
  session_ref?: string;
@@ -91,7 +75,7 @@ export interface McpStdioConfig {
91
75
  }
92
76
  export interface McpHttpConfig {
93
77
  headers?: Record<string, string>;
94
- transport?: McpHttpTransport;
78
+ transport?: McpHttpTransport | null;
95
79
  url: string;
96
80
  }
97
81
  export type McpServerConfig = ({
@@ -113,14 +97,14 @@ export interface McpRemoveParams {
113
97
  }
114
98
  export interface McpReloadParams {
115
99
  persisted?: boolean;
116
- server_name?: string;
100
+ server_name?: string | null;
117
101
  session_id: string;
118
102
  }
119
103
  export interface McpLiveOpResponse {
120
- applied_at_turn?: number;
104
+ applied_at_turn?: number | null;
121
105
  operation: "add" | "remove" | "reload";
122
106
  persisted: boolean;
123
- server_name?: string;
107
+ server_name?: string | null;
124
108
  session_id: string;
125
109
  status: "staged" | "applied" | "rejected";
126
110
  }
@@ -136,7 +120,7 @@ export interface SkillEntry {
136
120
  key: SkillKey;
137
121
  name: string;
138
122
  scope: SkillScope;
139
- shadowed_by?: SkillSourceProvenance;
123
+ shadowed_by?: SkillSourceProvenance | null;
140
124
  source: SkillSourceProvenance;
141
125
  }
142
126
  export interface SkillKey {
@@ -223,25 +207,25 @@ export interface CallbackToolDefinition {
223
207
  name: ToolName;
224
208
  }
225
209
  export interface ConfigEnvelope {
226
- backend?: string;
210
+ backend?: string | null;
227
211
  config: unknown;
228
212
  generation: number;
229
- instance_id?: string;
230
- realm_id?: string;
231
- resolved_paths?: Record<string, unknown>;
213
+ instance_id?: string | null;
214
+ realm_id?: string | null;
215
+ resolved_paths?: Record<string, unknown> | null;
232
216
  }
233
217
  export interface ConfigPatchParams {
234
- expected_generation?: number;
218
+ expected_generation?: number | null;
235
219
  patch?: unknown;
236
220
  }
237
221
  export interface ConfigWriteResult {
238
- backend?: string;
222
+ backend?: string | null;
239
223
  config: unknown;
240
224
  generation: number;
241
- instance_id?: string;
242
- live_propagation?: WireLiveConfigPropagationReport;
243
- realm_id?: string;
244
- resolved_paths?: Record<string, unknown>;
225
+ instance_id?: string | null;
226
+ live_propagation?: WireLiveConfigPropagationReport | null;
227
+ realm_id?: string | null;
228
+ resolved_paths?: Record<string, unknown> | null;
245
229
  }
246
230
  export interface InterruptResult {
247
231
  interrupted: boolean;
@@ -270,13 +254,13 @@ export interface WorkItemsResult {
270
254
  }
271
255
  export type ConfigSetParams = Record<string, unknown>;
272
256
  export interface SessionExternalEventEnvelopeGenericJson {
273
- blocks?: WireContentBlock[];
257
+ blocks?: WireContentBlock[] | null;
274
258
  event_type: string;
275
259
  kind: "generic_json";
276
260
  payload: unknown;
277
261
  }
278
262
  export interface SessionExternalEventEnvelopePeerResponseTerminal {
279
- display_name?: PeerName;
263
+ display_name?: PeerName | null;
280
264
  kind: "peer_response_terminal";
281
265
  peer_id: PeerId;
282
266
  request_id: string;
@@ -299,7 +283,7 @@ export interface WireDeviceCompleteResultExpired {
299
283
  export interface WireDeviceCompleteResultReady {
300
284
  auth_binding: WireAuthBindingRef;
301
285
  binding_id: string;
302
- expires_at?: string;
286
+ expires_at?: string | null;
303
287
  has_refresh_token: boolean;
304
288
  profile_id: string;
305
289
  provider: string;
@@ -313,7 +297,7 @@ export interface ApprovalDecideParams {
313
297
  approval_id: string;
314
298
  decision: "approve" | "deny";
315
299
  provenance?: unknown;
316
- reason?: string;
300
+ reason?: string | null;
317
301
  }
318
302
  export interface ApprovalGetParams {
319
303
  approval_id: string;
@@ -328,8 +312,8 @@ export interface ApprovalRecord {
328
312
  allowed_decisions: ("approve" | "deny")[];
329
313
  approval_id: string;
330
314
  created_at: string;
331
- decision?: Record<string, unknown>;
332
- expires_at?: string;
315
+ decision?: Record<string, unknown> | null;
316
+ expires_at?: string | null;
333
317
  metadata: Record<string, unknown>;
334
318
  owner: Record<string, unknown>;
335
319
  proposed_action: Record<string, unknown>;
@@ -343,7 +327,7 @@ export interface ApprovalRecord {
343
327
  }
344
328
  export interface ApprovalRequestParams {
345
329
  allowed_decisions: ("approve" | "deny")[];
346
- expires_at?: string;
330
+ expires_at?: string | null;
347
331
  metadata?: Record<string, unknown>;
348
332
  owner: Record<string, unknown>;
349
333
  proposed_action: Record<string, unknown>;
@@ -358,7 +342,7 @@ export interface ArchiveSessionParams {
358
342
  }
359
343
  export interface ArtifactDownloadParams {
360
344
  artifact_id: string;
361
- expected_media_type?: string;
345
+ expected_media_type?: string | null;
362
346
  }
363
347
  export interface ArtifactDownloadResult {
364
348
  payload: Record<string, unknown>;
@@ -369,7 +353,7 @@ export interface ArtifactIdParams {
369
353
  }
370
354
  export interface ArtifactListParams {
371
355
  label_equals?: Record<string, string>;
372
- session_id?: string;
356
+ session_id?: string | null;
373
357
  }
374
358
  export interface ArtifactListResult {
375
359
  artifacts: Record<string, unknown>[];
@@ -379,21 +363,21 @@ export interface ArtifactRecord {
379
363
  artifact_type: "text" | "log" | "command_output" | "diff" | "patch" | "generated_file" | "test_report" | "screenshot" | "image" | "json" | "binary" | {
380
364
  other: string;
381
365
  };
382
- content_handle: Record<string, unknown>;
366
+ content_handle: BlobRef | Record<string, unknown>;
383
367
  created_at: string;
384
368
  handle: Record<string, unknown>;
385
- hash?: string;
369
+ hash?: string | null;
386
370
  media_type: string;
387
371
  metadata?: Record<string, unknown>;
388
372
  owner?: Record<string, unknown>;
389
- producer?: string;
373
+ producer?: string | null;
390
374
  provenance?: Record<string, string>;
391
375
  size_bytes: number;
392
376
  title: string;
393
377
  }
394
378
  export interface BindingIdParams {
395
379
  binding_id: string;
396
- profile_id?: string;
380
+ profile_id?: string | null;
397
381
  realm_id: string;
398
382
  }
399
383
  export interface BlobGetParams {
@@ -407,36 +391,36 @@ export interface BlobPayload {
407
391
  export interface CreateProfileParams {
408
392
  auth_method: string;
409
393
  binding_id: string;
410
- profile_id?: string;
394
+ profile_id?: string | null;
411
395
  realm_id: string;
412
396
  secret: string;
413
397
  }
414
398
  export interface CreateScheduleRequest {
415
- description?: string;
399
+ description?: string | null;
416
400
  labels?: Record<string, string>;
417
401
  misfire_policy?: Record<string, unknown>;
418
402
  missing_target_policy?: "skip" | "mark_misfired";
419
- name?: string;
403
+ name?: string | null;
420
404
  overlap_policy?: "allow_concurrent" | "skip_if_running";
421
- planning_horizon_days?: number;
422
- planning_horizon_occurrences?: number;
405
+ planning_horizon_days?: number | null;
406
+ planning_horizon_occurrences?: number | null;
423
407
  target: Record<string, unknown>;
424
408
  trigger: Record<string, unknown>;
425
409
  }
426
410
  export interface DeferredCreateResult {
427
411
  session_id: string;
428
- session_ref?: string;
412
+ session_ref?: string | null;
429
413
  }
430
414
  export interface DeviceCompleteParams {
431
415
  binding_id: string;
432
416
  device_code: string;
433
- profile_id?: string;
417
+ profile_id?: string | null;
434
418
  provider: string;
435
419
  realm_id: string;
436
420
  }
437
421
  export interface DeviceStartParams {
438
422
  binding_id: string;
439
- profile_id?: string;
423
+ profile_id?: string | null;
440
424
  provider: string;
441
425
  realm_id: string;
442
426
  }
@@ -444,16 +428,16 @@ export interface EventsLatestCursorParams {
444
428
  scope: Record<string, unknown>;
445
429
  }
446
430
  export interface EventsLatestCursorResult {
447
- contract_version: Record<string, unknown>;
431
+ contract_version: ContractVersion;
448
432
  cursor: Record<string, unknown>;
449
433
  }
450
434
  export interface EventsListSinceParams {
451
- cursor?: Record<string, unknown>;
452
- limit?: number;
435
+ cursor?: Record<string, unknown> | null;
436
+ limit?: number | null;
453
437
  scope: Record<string, unknown>;
454
438
  }
455
439
  export interface EventsListSinceResult {
456
- contract_version: Record<string, unknown>;
440
+ contract_version: ContractVersion;
457
441
  events?: Record<string, unknown>[];
458
442
  from_cursor: Record<string, unknown>;
459
443
  has_more: boolean;
@@ -464,7 +448,7 @@ export interface EventsSnapshotParams {
464
448
  scope: Record<string, unknown>;
465
449
  }
466
450
  export interface EventsSnapshotResult {
467
- contract_version: Record<string, unknown>;
451
+ contract_version: ContractVersion;
468
452
  cursor: Record<string, unknown>;
469
453
  scope: Record<string, unknown>;
470
454
  snapshot: Record<string, unknown>;
@@ -473,31 +457,31 @@ export interface ForkSessionAtParams {
473
457
  message_index: number;
474
458
  running_behavior?: "reject";
475
459
  session_id: string;
476
- tool_access_policy?: Record<string, unknown>;
460
+ tool_access_policy?: WireToolAccessPolicy | null;
477
461
  }
478
462
  export interface ForkSessionReplaceParams {
479
463
  message_index: number;
480
- replacement: Record<string, unknown>;
464
+ replacement: WireTranscriptReplacement;
481
465
  running_behavior?: "reject";
482
466
  session_id: string;
483
- tool_access_policy?: Record<string, unknown>;
467
+ tool_access_policy?: WireToolAccessPolicy | null;
484
468
  }
485
469
  export interface HelpRequest {
486
470
  execution_mode?: "explain_only" | "plan_execution";
487
- max_tokens?: number;
488
- model?: string;
489
- prompt?: string;
490
- provider?: string;
471
+ max_tokens?: number | null;
472
+ model?: string | null;
473
+ prompt?: string | null;
474
+ provider?: string | null;
491
475
  question: string;
492
476
  }
493
477
  export interface HelpResponse {
494
- extraction_error?: Record<string, unknown>;
495
- schema_warnings?: Record<string, unknown>[];
478
+ extraction_error?: Record<string, unknown> | null;
479
+ schema_warnings?: Record<string, unknown>[] | null;
496
480
  session_id: string;
497
- session_ref?: string;
498
- skill_diagnostics?: Record<string, unknown>;
481
+ session_ref?: string | null;
482
+ skill_diagnostics?: Record<string, unknown> | null;
499
483
  structured_output?: unknown;
500
- terminal_cause_kind?: "unknown" | "hook_denied" | "hook_failure" | "llm_failure" | "tool_failure" | "structured_output_validation_failed" | "budget_exhausted" | "time_budget_exceeded" | "retry_exhausted" | "turn_limit_reached" | "runtime_apply_failure" | "fatal_failure";
484
+ terminal_cause_kind?: "unknown" | "hook_denied" | "hook_failure" | "llm_failure" | "tool_failure" | "structured_output_validation_failed" | "budget_exhausted" | "time_budget_exceeded" | "retry_exhausted" | "turn_limit_reached" | "runtime_apply_failure" | "fatal_failure" | null;
501
485
  text: string;
502
486
  tool_calls: number;
503
487
  turns: number;
@@ -505,9 +489,9 @@ export interface HelpResponse {
505
489
  }
506
490
  export interface InjectSystemContextParams {
507
491
  content: Record<string, unknown>;
508
- idempotency_key?: string;
492
+ idempotency_key?: string | null;
509
493
  session_id: string;
510
- source?: string;
494
+ source?: string | null;
511
495
  }
512
496
  export interface InjectSystemContextResult {
513
497
  status: "applied" | "staged" | "duplicate";
@@ -516,14 +500,14 @@ export interface InterruptParams {
516
500
  session_id: string;
517
501
  }
518
502
  export interface ListSessionTranscriptRevisionsParams {
519
- limit?: number;
520
- offset?: number;
503
+ limit?: number | null;
504
+ offset?: number | null;
521
505
  session_id: string;
522
506
  }
523
507
  export interface ListSessionsParams {
524
- labels?: Record<string, string>;
525
- limit?: number;
526
- offset?: number;
508
+ labels?: Record<string, string> | null;
509
+ limit?: number | null;
510
+ offset?: number | null;
527
511
  }
528
512
  export interface ListSessionsResult {
529
513
  sessions: Record<string, unknown>[];
@@ -531,7 +515,7 @@ export interface ListSessionsResult {
531
515
  export interface LoginCompleteParams {
532
516
  binding_id: string;
533
517
  code: string;
534
- profile_id?: string;
518
+ profile_id?: string | null;
535
519
  provider: string;
536
520
  realm_id: string;
537
521
  redirect_uri: string;
@@ -539,28 +523,28 @@ export interface LoginCompleteParams {
539
523
  }
540
524
  export interface LoginStartParams {
541
525
  binding_id: string;
542
- profile_id?: string;
526
+ profile_id?: string | null;
543
527
  provider: string;
544
528
  realm_id: string;
545
529
  redirect_uri: string;
546
530
  }
547
531
  export interface ProvisionApiKeyParams {
548
532
  access_token: string;
549
- binding_id?: string;
550
- profile_id?: string;
551
- realm_id?: string;
533
+ binding_id?: string | null;
534
+ profile_id?: string | null;
535
+ realm_id?: string | null;
552
536
  }
553
537
  export interface ReadSessionHistoryParams {
554
- limit?: number;
555
- offset?: number;
538
+ limit?: number | null;
539
+ offset?: number | null;
556
540
  session_id: string;
557
541
  }
558
542
  export interface ReadSessionParams {
559
543
  session_id: string;
560
544
  }
561
545
  export interface ReadSessionTranscriptRevisionParams {
562
- limit?: number;
563
- offset?: number;
546
+ limit?: number | null;
547
+ offset?: number | null;
564
548
  revision: string;
565
549
  session_id: string;
566
550
  }
@@ -571,62 +555,79 @@ export interface SessionInputStateParams {
571
555
  export interface SessionInputStateSelector {
572
556
  }
573
557
  export interface SessionInputStateResult {
574
- state?: Record<string, unknown>;
558
+ state?: Record<string, unknown> | null;
575
559
  }
576
560
  export interface RealmIdParams {
577
561
  realm_id: string;
578
562
  }
579
563
  export interface RestoreSessionTranscriptRevisionParams {
580
- actor?: string;
581
- expected_parent_revision?: string;
582
- reason: Record<string, unknown>;
564
+ actor?: string | null;
565
+ expected_parent_revision?: string | null;
566
+ reason: TranscriptRewriteReason;
583
567
  revision: string;
584
568
  running_behavior?: "reject";
585
569
  session_id: string;
586
570
  }
587
571
  export interface RewriteSessionTranscriptParams {
588
- actor?: string;
589
- expected_parent_revision?: string;
590
- reason: Record<string, unknown>;
591
- replacement: Record<string, unknown>[];
572
+ actor?: string | null;
573
+ expected_parent_revision?: string | null;
574
+ reason: TranscriptRewriteReason;
575
+ replacement: TranscriptRewriteMessage[];
592
576
  running_behavior?: "reject";
593
- selection: Record<string, unknown>;
577
+ selection: TranscriptRewriteSelection;
594
578
  session_id: string;
595
579
  }
596
580
  export interface RuntimeHostCapabilities {
597
- contract_version: Record<string, unknown>;
598
- features: Record<string, unknown>;
581
+ contract_version: ContractVersion;
582
+ features: RuntimeHostFeatureFlags;
583
+ }
584
+ export interface RuntimeHostFeatureFlags {
585
+ approvals: boolean;
586
+ artifacts: boolean;
587
+ blobs: boolean;
588
+ comms: boolean;
589
+ event_replay: boolean;
590
+ external_members: boolean;
591
+ mcp_live: boolean;
592
+ mobs: boolean;
593
+ multi_host_mobs?: boolean;
594
+ runtime_backed_sessions: boolean;
595
+ schedules: boolean;
596
+ secure_remote_rpc: boolean;
597
+ session_events: boolean;
598
+ session_streams: boolean;
599
+ skills: boolean;
599
600
  }
600
601
  export interface RuntimeHostHealth {
601
602
  checks?: Record<string, "ok" | "degraded" | "unhealthy">;
602
- contract_version: Record<string, unknown>;
603
+ contract_version: ContractVersion;
603
604
  status: "ok" | "degraded" | "unhealthy";
604
605
  }
605
606
  export interface RuntimeHostInfo {
606
607
  capabilities: RuntimeHostCapabilities;
607
- contract_version: Record<string, unknown>;
608
+ contract_version: ContractVersion;
608
609
  endpoints: Record<string, unknown>;
609
610
  health: RuntimeHostHealth;
610
611
  host_id: string;
611
612
  host_id_scope: "process" | "realm_instance";
612
613
  placement_labels?: Record<string, string>;
613
- policy_profile_summary?: string;
614
+ policy_profile_summary?: string | null;
614
615
  process_name: string;
615
616
  process_version: string;
616
617
  realm: Record<string, unknown>;
617
618
  }
618
619
  export interface Schedule {
619
620
  created_at_utc: string;
620
- deleted_at_utc?: string;
621
- description?: string;
621
+ deleted_at_utc?: string | null;
622
+ description?: string | null;
622
623
  labels?: Record<string, string>;
623
624
  misfire_policy: Record<string, unknown>;
624
625
  missing_target_policy: "skip" | "mark_misfired";
625
- name?: string;
626
+ name?: string | null;
626
627
  next_occurrence_ordinal: number;
627
628
  overlap_policy: "allow_concurrent" | "skip_if_running";
628
629
  phase: "active" | "paused" | "deleted";
629
- planning_cursor_utc?: string;
630
+ planning_cursor_utc?: string | null;
630
631
  planning_horizon_days: number;
631
632
  planning_horizon_occurrences: number;
632
633
  revision: number;
@@ -646,11 +647,11 @@ export interface ScheduleToolsResult {
646
647
  export interface SessionForkResult {
647
648
  message_count: number;
648
649
  session_id: string;
649
- session_ref?: string;
650
+ session_ref?: string | null;
650
651
  source_session_id: string;
651
652
  }
652
653
  export interface SessionPeerResponseTerminalParams {
653
- display_name?: PeerName;
654
+ display_name?: PeerName | null;
654
655
  peer_id: PeerId;
655
656
  request_id: string;
656
657
  result: unknown;
@@ -677,13 +678,13 @@ export interface WireProvisionApiKeyResult {
677
678
  export interface WireSessionTranscriptRevision {
678
679
  has_more: boolean;
679
680
  head_revision: string;
680
- limit?: number;
681
+ limit?: number | null;
681
682
  message_count: number;
682
683
  messages: Record<string, unknown>[];
683
684
  offset: number;
684
685
  revision: string;
685
686
  session_id: string;
686
- session_ref?: string;
687
+ session_ref?: string | null;
687
688
  }
688
689
  export interface WireSessionTranscriptRevisionList {
689
690
  entries: Record<string, unknown>[];
@@ -738,25 +739,25 @@ export interface MobLifecycleResult {
738
739
  ok: boolean;
739
740
  }
740
741
  export interface MobSpawnParams {
741
- additional_instructions?: string[];
742
+ additional_instructions?: string[] | null;
742
743
  agent_identity: string;
743
- auth_binding?: WireAuthBindingRef;
744
- auto_wire_parent?: boolean;
745
- backend?: WireMobBackendKind;
746
- binding?: WireRuntimeBinding;
747
- budget_split_policy?: WireBudgetSplitPolicy;
744
+ auth_binding?: WireAuthBindingRef | null;
745
+ auto_wire_parent?: boolean | null;
746
+ backend?: WireMobBackendKind | null;
747
+ binding?: WireRuntimeBinding | null;
748
748
  context?: unknown;
749
- inherited_tool_filter?: WireToolFilter;
750
- initial_message?: WireContentInput;
751
- labels?: Record<string, string>;
752
- launch_mode?: WireMemberLaunchMode;
749
+ inherited_tool_filter?: WireToolFilter | null;
750
+ initial_message?: WireContentInput | null;
751
+ labels?: Record<string, string> | null;
752
+ launch_mode?: WireMemberLaunchMode | null;
753
753
  mob_id: string;
754
- model_override?: string;
755
- override_profile?: WireMobProfile;
754
+ model_override?: string | null;
755
+ override_profile?: WireMobProfile | null;
756
+ placement?: string | null;
756
757
  profile: string;
757
- runtime_mode?: WireMobRuntimeMode;
758
- shell_env?: Record<string, string>;
759
- tool_access_policy?: WireToolAccessPolicy;
758
+ runtime_mode?: WireMobRuntimeMode | null;
759
+ shell_env?: Record<string, string> | null;
760
+ tool_access_policy?: WireToolAccessPolicy | null;
760
761
  }
761
762
  export interface MobSpawnResult {
762
763
  agent_identity: string;
@@ -764,16 +765,17 @@ export interface MobSpawnResult {
764
765
  mob_id: string;
765
766
  }
766
767
  export interface MobSpawnSpecParams {
767
- additional_instructions?: string[];
768
+ additional_instructions?: string[] | null;
768
769
  agent_identity: string;
769
- auth_binding?: WireAuthBindingRef;
770
- backend?: WireMobBackendKind;
770
+ auth_binding?: WireAuthBindingRef | null;
771
+ backend?: WireMobBackendKind | null;
771
772
  context?: unknown;
772
- initial_message?: WireContentInput;
773
- labels?: Record<string, string>;
774
- model_override?: string;
773
+ initial_message?: WireContentInput | null;
774
+ labels?: Record<string, string> | null;
775
+ model_override?: string | null;
776
+ placement?: WireHostRef | null;
775
777
  profile: string;
776
- runtime_mode?: WireMobRuntimeMode;
778
+ runtime_mode?: WireMobRuntimeMode | null;
777
779
  }
778
780
  export interface MobSpawnManyParams {
779
781
  mob_id: string;
@@ -800,7 +802,7 @@ export interface MobSpawnReceiptWire {
800
802
  }
801
803
  export interface MobMemberListEntryWire {
802
804
  agent_identity: string;
803
- error?: string;
805
+ error?: string | null;
804
806
  is_final: boolean;
805
807
  labels?: Record<string, string>;
806
808
  member_ref: WireMemberRef;
@@ -828,19 +830,19 @@ export interface WireMobToolConfig {
828
830
  workgraph?: boolean;
829
831
  }
830
832
  export interface WireMobProfile {
831
- auto_compact_threshold?: number;
832
- backend?: WireMobBackendKind;
833
+ auto_compact_threshold?: number | null;
834
+ backend?: WireMobBackendKind | null;
833
835
  external_addressable?: boolean;
834
- image_generation_provider?: Provider;
835
- max_inline_peer_notifications?: number;
836
+ image_generation_provider?: Provider | null;
837
+ max_inline_peer_notifications?: number | null;
836
838
  model: string;
837
839
  output_schema?: unknown;
838
840
  peer_description?: string;
839
- provider?: Provider;
840
- provider_params?: unknown;
841
+ provider?: Provider | null;
842
+ provider_params?: unknown | null;
841
843
  resume_overrides?: WireMobResumeOverrideField[];
842
844
  runtime_mode?: WireMobRuntimeMode;
843
- self_hosted_server_id?: string;
845
+ self_hosted_server_id?: string | null;
844
846
  skills?: string[];
845
847
  tools?: WireMobToolConfig;
846
848
  }
@@ -848,7 +850,7 @@ export interface WireMobRun {
848
850
  flow_id: string;
849
851
  mob_id: string;
850
852
  run_id: string;
851
- status: "pending" | "running" | "completed" | "failed" | "canceled";
853
+ status: WireMobRunStatus;
852
854
  }
853
855
  export interface WireMobRunResultEnvelope {
854
856
  flow_id: string;
@@ -856,20 +858,16 @@ export interface WireMobRunResultEnvelope {
856
858
  outputs?: Record<string, unknown>;
857
859
  result?: unknown;
858
860
  run_id: string;
859
- status: "pending" | "running" | "completed" | "failed" | "canceled";
860
- }
861
- export interface WireMobRunStatus {
862
- }
863
- export interface WirePeerConnectivity {
861
+ status: WireMobRunStatus;
864
862
  }
865
863
  export interface WirePeerConnectivitySnapshot {
866
864
  reachable_peer_count: number;
867
865
  unknown_peer_count: number;
868
- unreachable_peers?: Record<string, unknown>[];
866
+ unreachable_peers?: WireUnreachablePeer[];
869
867
  }
870
868
  export interface WireUnreachablePeer {
871
869
  peer: string;
872
- reason?: string;
870
+ reason?: string | null;
873
871
  }
874
872
  export interface WireMobError {
875
873
  code: MobSpawnManyFailureCause;
@@ -906,7 +904,7 @@ export interface MobRetireResult {
906
904
  }
907
905
  export interface MobRespawnParams {
908
906
  agent_identity: string;
909
- initial_message?: WireContentInput;
907
+ initial_message?: WireContentInput | null;
910
908
  mob_id: string;
911
909
  }
912
910
  export interface MobRespawnResult {
@@ -951,7 +949,7 @@ export interface MobMemberSendParams {
951
949
  content: WireContentInput;
952
950
  handling_mode?: "queue" | "steer";
953
951
  mob_id: string;
954
- render_metadata?: Record<string, unknown>;
952
+ render_metadata?: Record<string, unknown> | null;
955
953
  }
956
954
  export interface MobMemberSendResult {
957
955
  agent_identity: string;
@@ -963,7 +961,7 @@ export interface MobIngressInteractionParams {
963
961
  content: WireContentInput;
964
962
  handling_mode?: "queue" | "steer";
965
963
  mob_id: string;
966
- render_metadata?: Record<string, unknown>;
964
+ render_metadata?: Record<string, unknown> | null;
967
965
  spec: MobMemberSpecWire;
968
966
  }
969
967
  export interface MobIngressInteractionResult {
@@ -981,9 +979,9 @@ export interface MobIngressInteractionResult {
981
979
  }
982
980
  export interface MobAppendSystemContextParams {
983
981
  agent_identity: string;
984
- idempotency_key?: string;
982
+ idempotency_key?: string | null;
985
983
  mob_id: string;
986
- source?: string;
984
+ source?: string | null;
987
985
  text: string;
988
986
  }
989
987
  export interface MobAppendSystemContextResult {
@@ -996,10 +994,10 @@ export interface MobFlowsResult {
996
994
  mob_id: string;
997
995
  }
998
996
  export interface MobRunParams {
999
- flow_id?: string;
997
+ flow_id?: string | null;
1000
998
  mob_id: string;
1001
999
  params?: unknown;
1002
- prompt?: string;
1000
+ prompt?: string | null;
1003
1001
  }
1004
1002
  export interface MobFlowRunParams {
1005
1003
  flow_id: string;
@@ -1014,14 +1012,14 @@ export interface MobFlowStatusParams {
1014
1012
  run_id: string;
1015
1013
  }
1016
1014
  export interface MobFlowStatusResult {
1017
- run?: WireMobRun;
1015
+ run?: WireMobRun | null;
1018
1016
  }
1019
1017
  export interface MobRunResultParams {
1020
1018
  mob_id: string;
1021
1019
  run_id: string;
1022
1020
  }
1023
1021
  export interface MobRunResult {
1024
- run?: WireMobRunResultEnvelope;
1022
+ run?: WireMobRunResultEnvelope | null;
1025
1023
  }
1026
1024
  export interface MobFlowCancelParams {
1027
1025
  mob_id: string;
@@ -1031,65 +1029,73 @@ export interface MobFlowCancelResult {
1031
1029
  canceled: boolean;
1032
1030
  }
1033
1031
  export interface MobSpawnHelperParams {
1034
- agent_identity?: string;
1035
- auth_binding?: WireAuthBindingRef;
1036
- backend?: WireMobBackendKind;
1032
+ agent_identity?: string | null;
1033
+ auth_binding?: WireAuthBindingRef | null;
1034
+ backend?: WireMobBackendKind | null;
1037
1035
  mob_id: string;
1038
- model_override?: string;
1036
+ model_override?: string | null;
1039
1037
  prompt: string;
1040
- role_name?: string;
1041
- runtime_mode?: WireMobRuntimeMode;
1038
+ role_name?: string | null;
1039
+ runtime_mode?: WireMobRuntimeMode | null;
1042
1040
  }
1043
1041
  export interface MobForkHelperParams {
1044
- agent_identity?: string;
1045
- auth_binding?: WireAuthBindingRef;
1046
- backend?: WireMobBackendKind;
1042
+ agent_identity?: string | null;
1043
+ auth_binding?: WireAuthBindingRef | null;
1044
+ backend?: WireMobBackendKind | null;
1047
1045
  fork_context?: unknown;
1048
1046
  mob_id: string;
1049
- model_override?: string;
1047
+ model_override?: string | null;
1050
1048
  prompt: string;
1051
- role_name?: string;
1052
- runtime_mode?: WireMobRuntimeMode;
1049
+ role_name?: string | null;
1050
+ runtime_mode?: WireMobRuntimeMode | null;
1053
1051
  source_member_id: string;
1054
1052
  }
1055
1053
  export interface MobHelperResult {
1056
1054
  agent_identity: string;
1057
1055
  member_ref: WireMemberRef;
1058
- output?: string;
1056
+ output?: string | null;
1059
1057
  tokens_used: number;
1060
1058
  }
1061
1059
  export interface MobForceCancelResult {
1062
1060
  cancelled: boolean;
1063
1061
  }
1064
1062
  export interface MobTurnStartParams {
1065
- additional_instructions?: string[];
1063
+ additional_instructions?: string[] | null;
1066
1064
  agent_identity: string;
1067
- auth_binding?: Record<string, unknown>;
1068
- injected_context?: WireContentInput[];
1069
- keep_alive?: boolean;
1070
- max_tokens?: number;
1065
+ auth_binding?: Record<string, unknown> | null;
1066
+ injected_context?: WireContentInput[] | null;
1067
+ keep_alive?: boolean | null;
1068
+ max_tokens?: number | null;
1071
1069
  mob_id: string;
1072
- model?: string;
1070
+ model?: string | null;
1073
1071
  output_schema?: unknown;
1074
1072
  prompt: WireContentInput;
1075
- provider?: string;
1076
- provider_params?: Record<string, unknown>;
1077
- skill_refs?: SkillKey[];
1078
- structured_output_retries?: number;
1079
- system_prompt?: string;
1080
- turn_tool_overlay?: PublicTurnToolOverlay;
1073
+ provider?: string | null;
1074
+ provider_params?: Record<string, unknown> | null;
1075
+ self_hosted_server_id?: string | null;
1076
+ skill_refs?: SkillKey[] | null;
1077
+ structured_output_retries?: number | null;
1078
+ system_prompt?: string | null;
1079
+ turn_tool_overlay?: PublicTurnToolOverlay | null;
1081
1080
  }
1082
1081
  export interface MobMemberStatusResult {
1083
- current_session_id?: string;
1084
- error?: string;
1082
+ comms_reachability?: WireReachability | null;
1083
+ control_reachability?: WireReachability | null;
1084
+ current_session_id?: string | null;
1085
+ error?: string | null;
1085
1086
  external_member?: unknown;
1087
+ freshness_reason?: string | null;
1086
1088
  is_final: boolean;
1087
1089
  kickoff?: unknown;
1090
+ last_seen_ms?: number | null;
1091
+ lifecycle_capabilities?: WireMemberLifecycleCapabilities | null;
1088
1092
  member_ref: WireMemberRef;
1089
- output_preview?: string;
1090
- peer_connectivity?: WirePeerConnectivity;
1091
- progress?: WireMemberProgressSnapshot;
1092
- resolved_capabilities?: WireResolvedModelCapabilities;
1093
+ non_portable_disabled?: WireNonPortableResourceKind[] | null;
1094
+ output_preview?: string | null;
1095
+ peer_connectivity?: WirePeerConnectivity | null;
1096
+ placement?: WireHostRef | null;
1097
+ progress?: WireMemberProgressSnapshot | null;
1098
+ resolved_capabilities?: WireResolvedModelCapabilities | null;
1093
1099
  status: WireMobMemberStatus;
1094
1100
  tokens_used: number;
1095
1101
  }
@@ -1115,16 +1121,16 @@ export interface MobRotateSupervisorResult {
1115
1121
  }
1116
1122
  export interface MobSubmitWorkParams {
1117
1123
  content: WireContentInput;
1118
- injected_context?: WireContentInput[];
1124
+ injected_context?: WireContentInput[] | null;
1119
1125
  member_ref: WireMemberRef;
1120
- objective_id?: string;
1126
+ objective_id?: string | null;
1121
1127
  origin?: "external" | "internal";
1122
- work_ref?: string;
1128
+ work_ref?: string | null;
1123
1129
  }
1124
1130
  export interface MobSubmitWorkResult {
1125
1131
  member_ref: WireMemberRef;
1126
1132
  mob_id: string;
1127
- objective_id?: string;
1133
+ objective_id?: string | null;
1128
1134
  work_ref: string;
1129
1135
  }
1130
1136
  export interface MobConcludeObjectiveParams {
@@ -1153,9 +1159,9 @@ export interface MobCancelAllWorkResult {
1153
1159
  ok: boolean;
1154
1160
  }
1155
1161
  export interface MobWaitParams {
1156
- member_ids?: string[];
1162
+ member_ids?: string[] | null;
1157
1163
  mob_id: string;
1158
- timeout_ms?: number;
1164
+ timeout_ms?: number | null;
1159
1165
  }
1160
1166
  export interface MobWaitMembersResult {
1161
1167
  members: unknown[];
@@ -1168,12 +1174,12 @@ export interface MobProfileNameParams {
1168
1174
  name: string;
1169
1175
  }
1170
1176
  export interface MobProfileLookupResult {
1171
- created_at?: string;
1177
+ created_at?: string | null;
1172
1178
  name: string;
1173
1179
  not_found?: boolean;
1174
- profile?: WireMobProfile;
1175
- revision?: number;
1176
- updated_at?: string;
1180
+ profile?: WireMobProfile | null;
1181
+ revision?: number | null;
1182
+ updated_at?: string | null;
1177
1183
  }
1178
1184
  export interface MobProfileListResult {
1179
1185
  profiles: MobProfileLookupResult[];
@@ -1192,7 +1198,7 @@ export interface MobProfileDeleteResult {
1192
1198
  name: string;
1193
1199
  }
1194
1200
  export interface MobStreamOpenParams {
1195
- agent_identity?: string;
1201
+ agent_identity?: string | null;
1196
1202
  mob_id: string;
1197
1203
  }
1198
1204
  export interface MobStreamOpenResult {
@@ -1207,88 +1213,211 @@ export interface MobStreamCloseResult {
1207
1213
  closed: boolean;
1208
1214
  stream_id: string;
1209
1215
  }
1216
+ export interface MobGrantScopesParams {
1217
+ expires_at_ms?: number | null;
1218
+ mob_id: string;
1219
+ principal: string;
1220
+ scopes: WireControlScope[];
1221
+ }
1222
+ export interface MobGrantScopesResult {
1223
+ record: WireGrantRecord;
1224
+ }
1225
+ export interface MobRevokeScopesParams {
1226
+ mob_id: string;
1227
+ principal: string;
1228
+ scopes?: WireControlScope[] | null;
1229
+ }
1230
+ export interface MobRevokeScopesResult {
1231
+ removed: boolean;
1232
+ }
1233
+ export interface MobGrantsResult {
1234
+ grants: WireGrantRecord[];
1235
+ }
1236
+ export interface MobMemberHistoryParams {
1237
+ agent_identity: string;
1238
+ from_index?: number | null;
1239
+ limit?: number | null;
1240
+ mob_id: string;
1241
+ }
1242
+ export interface MobMemberHistoryResult {
1243
+ generation: number;
1244
+ page: WireMemberHistoryPageBody;
1245
+ placement?: WireHostRef | null;
1246
+ provenance: WireProjectionProvenance;
1247
+ }
1248
+ export interface WireMemberHistoryPageBody {
1249
+ complete: boolean;
1250
+ from_index: number;
1251
+ message_count: number;
1252
+ messages: WireHistoryRow[];
1253
+ next_index?: number | null;
1254
+ }
1255
+ export interface MobHostsResult {
1256
+ hosts: MobHostStatus[];
1257
+ }
1258
+ export interface MobHostStatus {
1259
+ authority_epoch?: number | null;
1260
+ bind_phase: WireHostBindPhase;
1261
+ capabilities?: WireHostCapabilityFlags | null;
1262
+ control_reachability?: WireReachability | null;
1263
+ endpoint?: string | null;
1264
+ freshness_reason?: string | null;
1265
+ host_id: WireHostRef;
1266
+ last_seen_ms?: number | null;
1267
+ materialized_member_count: number;
1268
+ }
1269
+ export interface WireHostCapabilityFlags {
1270
+ approval_forwarding: boolean;
1271
+ autonomous_members: boolean;
1272
+ durable_sessions: boolean;
1273
+ engine_version: string;
1274
+ hard_cancel_member: boolean;
1275
+ live_endpoint?: string | null;
1276
+ mcp: boolean;
1277
+ memory_store: boolean;
1278
+ protocol_max: number;
1279
+ protocol_min: number;
1280
+ resolvable_providers?: string[];
1281
+ tracked_input_cancel?: boolean;
1282
+ }
1283
+ export interface MobRouteInstallsResult {
1284
+ complete: boolean;
1285
+ outstanding: WireRouteInstallObligation[];
1286
+ }
1287
+ export interface WireRouteInstallObligation {
1288
+ edge_a: string;
1289
+ edge_b: string;
1290
+ host: WireHostRef;
1291
+ }
1292
+ export interface MobBindHostParams {
1293
+ descriptor: WireHostBindingDescriptor;
1294
+ mob_id: string;
1295
+ }
1296
+ export interface MobBindHostResult {
1297
+ authority_epoch: number;
1298
+ capabilities: WireHostCapabilityFlags;
1299
+ host_id: WireHostRef;
1300
+ }
1301
+ export interface MobRevokeHostParams {
1302
+ host_id: WireHostRef;
1303
+ mob_id: string;
1304
+ }
1305
+ export interface MobRevokeHostResult {
1306
+ host_id: WireHostRef;
1307
+ released_members: string[];
1308
+ }
1309
+ export interface MobHardCancelParams {
1310
+ agent_identity: string;
1311
+ mob_id: string;
1312
+ reason: string;
1313
+ }
1314
+ export interface MobHardCancelResult {
1315
+ cancelled: boolean;
1316
+ }
1317
+ export interface MobMemberLiveOpenParams {
1318
+ agent_identity: string;
1319
+ mob_id: string;
1320
+ transport?: LiveOpenTransport | null;
1321
+ turning_mode?: RealtimeTurningMode | null;
1322
+ }
1323
+ export interface MobMemberLiveChannelParams {
1324
+ agent_identity: string;
1325
+ channel_id: string;
1326
+ mob_id: string;
1327
+ }
1328
+ export interface MobMemberLiveStatusParams {
1329
+ agent_identity: string;
1330
+ channel_id?: string | null;
1331
+ mob_id: string;
1332
+ }
1333
+ export interface MobMemberLiveControlParams {
1334
+ agent_identity: string;
1335
+ channel_id: string;
1336
+ mob_id: string;
1337
+ verb: BridgeLiveControlVerb;
1338
+ }
1210
1339
  export interface PublicTurnToolOverlay {
1211
- allowed_tools?: ToolName[];
1212
- blocked_tools?: ToolName[];
1340
+ allowed_tools?: ToolName[] | null;
1341
+ blocked_tools?: ToolName[] | null;
1213
1342
  }
1214
1343
  export interface MobDefinitionInput {
1215
1344
  backend?: MobBackendConfigInput;
1216
- event_router?: MobEventRouterConfigInput;
1345
+ event_router?: MobEventRouterConfigInput | null;
1217
1346
  flows?: Record<string, MobFlowSpecInput>;
1218
1347
  id: string;
1219
- image_generation_provider?: Provider;
1220
- limits?: MobLimitsSpecInput;
1348
+ image_generation_provider?: Provider | null;
1349
+ limits?: MobLimitsSpecInput | null;
1221
1350
  models?: Record<string, CustomModelConfig>;
1222
- orchestrator?: MobOrchestratorInput;
1351
+ orchestrator?: MobOrchestratorInput | null;
1223
1352
  profiles: Record<string, MobProfileBindingInput>;
1224
1353
  skills?: Record<string, MobSkillSourceInput>;
1225
- spawn_policy?: MobSpawnPolicyInput;
1226
- supervisor?: MobSupervisorSpecInput;
1227
- topology?: MobTopologySpecInput;
1354
+ spawn_policy?: MobSpawnPolicyInput | null;
1355
+ supervisor?: MobSupervisorSpecInput | null;
1356
+ topology?: MobTopologySpecInput | null;
1228
1357
  wiring?: MobWiringRulesInput;
1229
1358
  }
1230
1359
  export interface MobBackendConfigInput {
1231
1360
  default?: WireMobBackendKind;
1232
- external?: MobExternalBackendConfigInput;
1361
+ external?: MobExternalBackendConfigInput | null;
1233
1362
  }
1234
1363
  export interface MobEventRouterConfigInput {
1235
1364
  buffer_size?: number;
1236
- exclude_patterns?: string[];
1237
- include_patterns?: string[];
1365
+ exclude_patterns?: string[] | null;
1366
+ include_patterns?: string[] | null;
1238
1367
  }
1239
1368
  export interface MobExternalBackendConfigInput {
1240
1369
  address_base: string;
1241
- supervisor_bridge?: unknown;
1370
+ supervisor_bridge?: unknown | null;
1242
1371
  }
1243
1372
  export interface MobFlowSpecInput {
1244
- description?: string;
1245
- root?: MobFrameSpecInput;
1373
+ description?: string | null;
1374
+ root?: MobFrameSpecInput | null;
1246
1375
  steps?: Record<string, MobFlowStepInput>;
1247
1376
  }
1248
1377
  export interface MobFlowStepInput {
1249
- allowed_tools?: string[];
1250
- blocked_tools?: string[];
1251
- branch?: string;
1378
+ allowed_tools?: string[] | null;
1379
+ blocked_tools?: string[] | null;
1380
+ branch?: string | null;
1252
1381
  collection_policy?: MobCollectionPolicyInput;
1253
- condition?: MobConditionExprInput;
1382
+ condition?: MobConditionExprInput | null;
1254
1383
  depends_on?: string[];
1255
1384
  depends_on_mode?: MobDependencyModeInput;
1256
1385
  dispatch_mode?: MobDispatchModeInput;
1257
- expected_schema_ref?: string;
1386
+ expected_schema_ref?: string | null;
1258
1387
  message: WireContentInput;
1259
- output_format?: MobStepOutputFormatInput;
1388
+ output_format?: MobStepOutputFormatInput | null;
1260
1389
  role: string;
1261
- timeout_ms?: number;
1390
+ timeout_ms?: number | null;
1262
1391
  }
1263
1392
  export interface MobFrameSpecInput {
1264
1393
  nodes: Record<string, MobFlowNodeInput>;
1265
1394
  }
1266
1395
  export interface MobLimitsSpecInput {
1267
- cancel_grace_timeout_ms?: number;
1268
- max_active_frames?: number;
1269
- max_active_nodes?: number;
1270
- max_flow_duration_ms?: number;
1271
- max_frame_depth?: number;
1272
- max_orphaned_turns?: number;
1273
- max_step_retries?: number;
1396
+ cancel_grace_timeout_ms?: number | null;
1397
+ max_active_frames?: number | null;
1398
+ max_active_nodes?: number | null;
1399
+ max_flow_duration_ms?: number | null;
1400
+ max_frame_depth?: number | null;
1401
+ max_orphaned_turns?: number | null;
1402
+ max_step_retries?: number | null;
1274
1403
  }
1275
1404
  export interface MobOrchestratorInput {
1276
1405
  profile: string;
1277
1406
  }
1278
1407
  export interface MobProfileInput {
1279
- auto_compact_threshold?: number;
1280
- backend?: WireMobBackendKind;
1408
+ auto_compact_threshold?: number | null;
1409
+ backend?: WireMobBackendKind | null;
1281
1410
  external_addressable?: boolean;
1282
- image_generation_provider?: Provider;
1283
- max_inline_peer_notifications?: number;
1411
+ image_generation_provider?: Provider | null;
1412
+ max_inline_peer_notifications?: number | null;
1284
1413
  model: string;
1285
- output_schema?: unknown;
1414
+ output_schema?: unknown | null;
1286
1415
  peer_description?: string;
1287
- provider?: Provider;
1288
- provider_params?: unknown;
1416
+ provider?: Provider | null;
1417
+ provider_params?: unknown | null;
1289
1418
  resume_overrides?: WireMobResumeOverrideField[];
1290
1419
  runtime_mode?: WireMobRuntimeMode;
1291
- self_hosted_server_id?: string;
1420
+ self_hosted_server_id?: string | null;
1292
1421
  skills?: string[];
1293
1422
  tools?: MobToolConfigInput;
1294
1423
  }
@@ -1298,7 +1427,7 @@ export interface MobRoleWiringRuleInput {
1298
1427
  }
1299
1428
  export interface MobSupervisorSpecInput {
1300
1429
  escalation_threshold: number;
1301
- escalation_turn_timeout_ms?: number;
1430
+ escalation_turn_timeout_ms?: number | null;
1302
1431
  role: string;
1303
1432
  }
1304
1433
  export interface MobToolConfigInput {
@@ -1326,25 +1455,26 @@ export interface MobWiringRulesInput {
1326
1455
  role_wiring?: MobRoleWiringRuleInput[];
1327
1456
  }
1328
1457
  export interface CustomModelConfig {
1329
- call_timeout_secs?: number;
1330
- context_window?: number;
1331
- display_name?: string;
1332
- max_output_tokens?: number;
1458
+ call_timeout_secs?: number | null;
1459
+ context_window?: number | null;
1460
+ display_name?: string | null;
1461
+ max_output_tokens?: number | null;
1333
1462
  provider: Provider;
1334
- vision?: boolean;
1335
- web_search?: boolean;
1463
+ vision?: boolean | null;
1464
+ web_search?: boolean | null;
1336
1465
  }
1337
1466
  export interface MobMemberSpecWire {
1338
- additional_instructions?: string[];
1467
+ additional_instructions?: string[] | null;
1339
1468
  agent_identity: string;
1340
- auto_wire_parent?: boolean;
1341
- backend?: WireMobBackendKind;
1342
- binding?: WireRuntimeBinding;
1469
+ auto_wire_parent?: boolean | null;
1470
+ backend?: WireMobBackendKind | null;
1471
+ binding?: WireRuntimeBinding | null;
1343
1472
  context?: unknown;
1344
- initial_message?: WireContentInput;
1345
- labels?: Record<string, string>;
1473
+ initial_message?: WireContentInput | null;
1474
+ labels?: Record<string, string> | null;
1475
+ placement?: WireHostRef | null;
1346
1476
  profile: string;
1347
- runtime_mode?: WireMobRuntimeMode;
1477
+ runtime_mode?: WireMobRuntimeMode | null;
1348
1478
  }
1349
1479
  export interface MobReconcileOptionsWire {
1350
1480
  retire_stale?: boolean;
@@ -1361,19 +1491,36 @@ export interface MobReconcileFailureWire {
1361
1491
  error: WireMobError;
1362
1492
  stage: WireMobReconcileStage;
1363
1493
  }
1494
+ export interface WireHostBindingDescriptor {
1495
+ address: string;
1496
+ bootstrap_token: BridgeBootstrapToken;
1497
+ identity: WireTrustedPeerIdentity;
1498
+ kind: WireHostBindingDescriptorKind;
1499
+ live_endpoint?: string | null;
1500
+ }
1501
+ export interface WireGrantRecord {
1502
+ expires_at_ms?: number | null;
1503
+ principal: string;
1504
+ scopes: WireControlScope[];
1505
+ }
1506
+ export interface WireMemberLifecycleCapabilities {
1507
+ resume_after_restart: boolean;
1508
+ revisions: boolean;
1509
+ transcript_edits: boolean;
1510
+ }
1364
1511
  export interface AttentionBindingRequest {
1365
1512
  binding_id: string;
1366
- namespace?: string;
1367
- realm_id?: string;
1513
+ namespace?: string | null;
1514
+ realm_id?: string | null;
1368
1515
  }
1369
1516
  export interface AttentionBindingResult {
1370
1517
  attention: WorkAttentionBinding;
1371
1518
  }
1372
1519
  export interface AttentionListRequest {
1373
- namespace?: string;
1374
- realm_id?: string;
1375
- status?: WorkAttentionStatus;
1376
- target?: WorkAttentionTarget;
1520
+ namespace?: string | null;
1521
+ realm_id?: string | null;
1522
+ status?: WorkAttentionStatus | null;
1523
+ target?: WorkAttentionTarget | null;
1377
1524
  }
1378
1525
  export interface AttentionListResult {
1379
1526
  attention: WorkAttentionBinding[];
@@ -1384,8 +1531,8 @@ export interface AttentionProjectionPolicy {
1384
1531
  }
1385
1532
  export interface GoalStatusRequest {
1386
1533
  binding_id: string;
1387
- namespace?: string;
1388
- realm_id?: string;
1534
+ namespace?: string | null;
1535
+ realm_id?: string | null;
1389
1536
  }
1390
1537
  export interface GoalStatusResult {
1391
1538
  attention: WorkAttentionBinding;
@@ -1393,9 +1540,9 @@ export interface GoalStatusResult {
1393
1540
  }
1394
1541
  export interface ReadyWorkFilter {
1395
1542
  labels?: string[];
1396
- limit?: number;
1397
- namespace?: string;
1398
- realm_id?: string;
1543
+ limit?: number | null;
1544
+ namespace?: string | null;
1545
+ realm_id?: string | null;
1399
1546
  }
1400
1547
  export interface WorkAttentionBinding {
1401
1548
  binding_id: string;
@@ -1410,19 +1557,19 @@ export interface WorkAttentionBinding {
1410
1557
  work_ref: WorkItemRef;
1411
1558
  }
1412
1559
  export interface WorkGraphEventFilter {
1413
- after_seq?: number;
1560
+ after_seq?: number | null;
1414
1561
  all_namespaces?: boolean;
1415
- limit?: number;
1416
- namespace?: string;
1417
- realm_id?: string;
1562
+ limit?: number | null;
1563
+ namespace?: string | null;
1564
+ realm_id?: string | null;
1418
1565
  }
1419
1566
  export interface WorkGraphEventsResponse {
1420
1567
  events: WorkGraphEvent[];
1421
1568
  }
1422
1569
  export interface WorkGraphIdParams {
1423
1570
  id: string;
1424
- namespace?: string;
1425
- realm_id?: string;
1571
+ namespace?: string | null;
1572
+ realm_id?: string | null;
1426
1573
  }
1427
1574
  export interface WorkGraphItemsResponse {
1428
1575
  items: WorkItem[];
@@ -1432,9 +1579,9 @@ export interface WorkGraphSnapshot {
1432
1579
  attention?: WorkAttentionBinding[];
1433
1580
  captured_at: string;
1434
1581
  edges: WorkEdge[];
1435
- event_high_water_mark?: number;
1582
+ event_high_water_mark?: number | null;
1436
1583
  items: WorkItem[];
1437
- namespace?: string;
1584
+ namespace?: string | null;
1438
1585
  ready_item_ids: string[];
1439
1586
  realm_id: string;
1440
1587
  }
@@ -1442,31 +1589,31 @@ export interface WorkGraphSnapshotFilter {
1442
1589
  all_namespaces?: boolean;
1443
1590
  include_terminal?: boolean;
1444
1591
  labels?: string[];
1445
- limit?: number;
1446
- namespace?: string;
1447
- realm_id?: string;
1592
+ limit?: number | null;
1593
+ namespace?: string | null;
1594
+ realm_id?: string | null;
1448
1595
  statuses?: WorkStatus[];
1449
1596
  }
1450
1597
  export interface WorkItem {
1451
- claim?: WorkItemClaim;
1598
+ claim?: WorkItemClaim | null;
1452
1599
  completion_policy: WorkCompletionPolicy;
1453
1600
  created_at: string;
1454
- description?: string;
1455
- due_at?: string;
1601
+ description?: string | null;
1602
+ due_at?: string | null;
1456
1603
  evidence_refs?: WorkEvidenceRef[];
1457
1604
  external_refs?: WorkItemExternalRef[];
1458
1605
  id: string;
1459
1606
  labels?: string[];
1460
1607
  machine_state: Record<string, unknown>;
1461
1608
  namespace: string;
1462
- not_before?: string;
1463
- owner?: WorkItemOwner;
1609
+ not_before?: string | null;
1610
+ owner?: WorkItemOwner | null;
1464
1611
  priority: "low" | "medium" | "high";
1465
1612
  realm_id: string;
1466
1613
  revision: number;
1467
- snoozed_until?: string;
1614
+ snoozed_until?: string | null;
1468
1615
  status: "open" | "in_progress" | "blocked" | "completed" | "cancelled" | "failed";
1469
- terminal_at?: string;
1616
+ terminal_at?: string | null;
1470
1617
  title: string;
1471
1618
  updated_at: string;
1472
1619
  }
@@ -1474,9 +1621,9 @@ export interface WorkItemFilter {
1474
1621
  all_namespaces?: boolean;
1475
1622
  include_terminal?: boolean;
1476
1623
  labels?: string[];
1477
- limit?: number;
1478
- namespace?: string;
1479
- realm_id?: string;
1624
+ limit?: number | null;
1625
+ namespace?: string | null;
1626
+ realm_id?: string | null;
1480
1627
  statuses?: WorkStatus[];
1481
1628
  }
1482
1629
  export interface WorkItemRef {
@@ -1493,21 +1640,21 @@ export interface WorkEdge {
1493
1640
  to_id: string;
1494
1641
  }
1495
1642
  export interface WorkEvidenceRef {
1496
- confirmation_kind?: WorkEvidenceKind;
1497
- confirming_owner_key?: WorkOwnerKey;
1643
+ confirmation_kind?: WorkEvidenceKind | null;
1644
+ confirming_owner_key?: WorkOwnerKey | null;
1498
1645
  id: string;
1499
1646
  kind: string;
1500
- label?: string;
1501
- summary?: string;
1647
+ label?: string | null;
1648
+ summary?: string | null;
1502
1649
  }
1503
1650
  export interface WorkGraphEvent {
1504
1651
  at: string;
1505
- item_id?: string;
1652
+ item_id?: string | null;
1506
1653
  kind: WorkGraphEventKind;
1507
1654
  namespace: string;
1508
1655
  payload?: unknown;
1509
1656
  realm_id: string;
1510
- seq?: number;
1657
+ seq?: number | null;
1511
1658
  }
1512
1659
  export interface WorkOwnerKey {
1513
1660
  id: string;
@@ -1515,16 +1662,16 @@ export interface WorkOwnerKey {
1515
1662
  }
1516
1663
  export interface WorkItemClaim {
1517
1664
  claimed_at: string;
1518
- lease_expires_at?: string;
1665
+ lease_expires_at?: string | null;
1519
1666
  owner: WorkItemOwner;
1520
1667
  }
1521
1668
  export interface WorkItemExternalRef {
1522
1669
  id: string;
1523
1670
  kind: string;
1524
- url?: string;
1671
+ url?: string | null;
1525
1672
  }
1526
1673
  export interface WorkItemOwner {
1527
- display_name?: string;
1674
+ display_name?: string | null;
1528
1675
  key: WorkOwnerKey;
1529
1676
  }
1530
1677
  export interface BridgeAck {
@@ -1544,30 +1691,42 @@ export interface BridgeBindResponse {
1544
1691
  peer_id: string;
1545
1692
  }
1546
1693
  export interface BridgeCapabilities {
1694
+ approval_forwarding?: boolean;
1695
+ autonomous_members?: boolean;
1547
1696
  current_protocol_version?: BridgeProtocolVersion;
1548
1697
  default_protocol_version?: BridgeProtocolVersion;
1549
1698
  deliver_member_input?: boolean;
1550
1699
  destroy_member?: boolean;
1700
+ durable_sessions?: boolean;
1701
+ engine_version?: string;
1551
1702
  hard_cancel_member?: boolean;
1552
1703
  interrupt_member?: boolean;
1704
+ mcp?: boolean;
1705
+ memory_store?: boolean;
1553
1706
  observe_member?: boolean;
1707
+ resolvable_providers?: Provider[];
1554
1708
  retire_member?: boolean;
1555
1709
  supported_protocol_versions?: BridgeProtocolVersion[];
1710
+ tracked_input_cancel?: boolean;
1556
1711
  unwire_member?: boolean;
1557
1712
  wire_member?: boolean;
1558
1713
  }
1559
1714
  export interface BridgeDeliveryPayload {
1560
1715
  content: ContentInput;
1561
1716
  epoch: number;
1717
+ expected_member?: BridgeMemberIncarnation | null;
1562
1718
  handling_mode: HandlingMode;
1563
1719
  injected_context?: ContentInput[];
1564
1720
  input_id: string;
1565
- objective_id?: string;
1721
+ objective_id?: string | null;
1722
+ outcome_tracking?: "interaction" | null;
1566
1723
  protocol_version: BridgeProtocolVersion;
1567
1724
  supervisor: BridgePeerSpec;
1725
+ transcript_interaction_id?: string | null;
1726
+ turn?: BridgeTurnDirective | null;
1568
1727
  }
1569
1728
  export interface BridgeDeliveryResponse {
1570
- canonical_input_id?: string;
1729
+ canonical_input_id?: string | null;
1571
1730
  input_id: string;
1572
1731
  outcome: BridgeDeliveryOutcome;
1573
1732
  }
@@ -1576,16 +1735,19 @@ export interface BridgeDestroyResponse {
1576
1735
  }
1577
1736
  export interface BridgeHardCancelPayload {
1578
1737
  epoch: number;
1738
+ expected_member: BridgeMemberIncarnation;
1739
+ expected_run_id: RunId;
1740
+ operation_id: OperationId;
1579
1741
  protocol_version: BridgeProtocolVersion;
1580
1742
  reason: string;
1581
1743
  supervisor: BridgePeerSpec;
1582
1744
  }
1583
1745
  export interface BridgeObservationResponse {
1584
- accepting_inputs?: boolean;
1585
- current_run_id?: string;
1586
- last_error?: string;
1746
+ accepting_inputs?: boolean | null;
1747
+ current_run_id?: string | null;
1748
+ last_error?: string | null;
1587
1749
  observed_at: string;
1588
- peer_connectivity?: BridgePeerConnectivity;
1750
+ peer_connectivity?: BridgePeerConnectivity | null;
1589
1751
  state: BridgeMemberRuntimeState;
1590
1752
  }
1591
1753
  export interface BridgePeerSpec {
@@ -1596,7 +1758,7 @@ export interface BridgePeerSpec {
1596
1758
  }
1597
1759
  export interface BridgePeerWiringPayload {
1598
1760
  epoch: number;
1599
- mob_peer_overlay?: Record<string, unknown>;
1761
+ mob_peer_overlay?: BridgeMobPeerOverlayHandoff | null;
1600
1762
  peer_spec: BridgePeerSpec;
1601
1763
  protocol_version: BridgeProtocolVersion;
1602
1764
  supervisor: BridgePeerSpec;
@@ -1619,10 +1781,10 @@ export interface CommsChecksumTokenResult {
1619
1781
  token: string;
1620
1782
  }
1621
1783
  export interface CommsPeerLifecycleParams {
1622
- description?: string;
1784
+ description?: string | null;
1623
1785
  peer: string;
1624
- peer_spec?: BridgePeerSpec;
1625
- role?: string;
1786
+ peer_spec?: BridgePeerSpec | null;
1787
+ role?: string | null;
1626
1788
  }
1627
1789
  export interface CommsPeersParams {
1628
1790
  session_id: string;
@@ -1663,44 +1825,222 @@ export interface SessionStreamCloseResult {
1663
1825
  closed: boolean;
1664
1826
  stream_id: string;
1665
1827
  }
1828
+ export interface BridgeHostCapabilityRequirements {
1829
+ autonomous_members: boolean;
1830
+ durable_sessions: boolean;
1831
+ protocol_v4: boolean;
1832
+ tracked_input_cancel: boolean;
1833
+ }
1834
+ export interface BridgeMemberIncarnation {
1835
+ agent_identity: string;
1836
+ binding_generation: number;
1837
+ fence_token: number;
1838
+ generation: number;
1839
+ host_id: string;
1840
+ member_session_id: string;
1841
+ mob_id: string;
1842
+ }
1843
+ export interface BridgeTurnCorrelation {
1844
+ run_id: string;
1845
+ step_id: string;
1846
+ }
1847
+ export interface BridgeTurnDirective {
1848
+ correlation: BridgeTurnCorrelation;
1849
+ tool_overlay?: PublicTurnToolOverlay | null;
1850
+ }
1851
+ export interface BridgeTurnOutcomeAck {
1852
+ fence_token: number;
1853
+ generation: number;
1854
+ input_id: string;
1855
+ }
1856
+ export interface WireFlowFailureDetail {
1857
+ original_utf8_bytes: number;
1858
+ text: string;
1859
+ truncated: boolean;
1860
+ }
1861
+ export interface BridgeTurnOutcomeRecord {
1862
+ fence_token: number;
1863
+ generation: number;
1864
+ input_id: string;
1865
+ outcome: WireFlowTurnOutcome;
1866
+ terminal_seq: number;
1867
+ }
1868
+ export interface BridgeMobPeerOverlayHandoff {
1869
+ peer_specs: BridgePeerSpec[];
1870
+ recipient_peer_id: string;
1871
+ topology_epoch: number;
1872
+ }
1873
+ export type RunId = string;
1874
+ export type OperationId = string;
1875
+ export interface BridgeEventCursorTail {
1876
+ cursor: "tail";
1877
+ }
1878
+ export interface BridgeEventCursorAt {
1879
+ cursor: "at";
1880
+ generation: number;
1881
+ seq: number;
1882
+ }
1883
+ export type BridgeEventCursor = BridgeEventCursorTail | BridgeEventCursorAt;
1884
+ export type BridgeOutboundTaintTarget = "peer_only" | {
1885
+ placed: BridgeMemberIncarnation;
1886
+ };
1887
+ export interface BridgeTrackedInputCancelOutcomeNoEffect {
1888
+ outcome: "no_effect";
1889
+ }
1890
+ export interface BridgeTrackedInputCancelOutcomeCancelled {
1891
+ outcome: "cancelled";
1892
+ }
1893
+ export interface BridgeTrackedInputCancelOutcomeTerminal {
1894
+ outcome: "terminal";
1895
+ record: BridgeTurnOutcomeRecord;
1896
+ }
1897
+ export type BridgeTrackedInputCancelOutcome = BridgeTrackedInputCancelOutcomeNoEffect | BridgeTrackedInputCancelOutcomeCancelled | BridgeTrackedInputCancelOutcomeTerminal;
1898
+ export type LiveOpenTransport = "websocket" | "webrtc";
1899
+ export interface WireFlowTurnOutcomeExtractionFailedPayload {
1900
+ detail: WireFlowFailureDetail;
1901
+ }
1902
+ export interface WireFlowTurnOutcomeExtractionFailed {
1903
+ extraction_failed: WireFlowTurnOutcomeExtractionFailedPayload;
1904
+ }
1905
+ export interface WireFlowTurnOutcomeRunFailedPayload {
1906
+ detail: WireFlowFailureDetail;
1907
+ }
1908
+ export interface WireFlowTurnOutcomeRunFailed {
1909
+ run_failed: WireFlowTurnOutcomeRunFailedPayload;
1910
+ }
1911
+ export interface WireFlowTurnOutcomeInteractionFailedPayload {
1912
+ detail: WireFlowFailureDetail;
1913
+ }
1914
+ export interface WireFlowTurnOutcomeInteractionFailed {
1915
+ interaction_failed: WireFlowTurnOutcomeInteractionFailedPayload;
1916
+ }
1917
+ export type WireFlowTurnOutcome = "run_completed" | "extraction_succeeded" | "interaction_complete" | "interaction_callback_pending" | "channel_closed" | WireFlowTurnOutcomeExtractionFailed | WireFlowTurnOutcomeRunFailed | WireFlowTurnOutcomeInteractionFailed;
1918
+ export type AuthErrorKind = "missing_secret" | "unsupported_combination" | "missing_required_metadata" | "workspace_mismatch" | "stale_credential" | "refresh_required" | "lease_absent" | "user_reauth_required" | "expired" | "refresh_failed" | "resolve_required" | "interactive_login_required" | "host_owned_unavailable" | "io" | "other";
1919
+ export type ConnectionTargetErrorKind = "missing_realm" | "unknown_realm" | "missing_default_binding" | "invalid_realm_id" | "invalid_binding_id" | "realm_config_invalid" | "binding_invalid" | "provider_mismatch" | "realm_chain";
1920
+ export type WireControlScope = "list" | "read_history" | "subscribe_events" | "send_command" | "cancel" | "retire" | "wire_topology" | "live" | "admin_host" | "admin_grants";
1921
+ export interface MemberBuildRejectionUnknownProviderForModelPayload {
1922
+ model: string;
1923
+ }
1924
+ export interface MemberBuildRejectionUnknownProviderForModel {
1925
+ unknown_provider_for_model: MemberBuildRejectionUnknownProviderForModelPayload;
1926
+ }
1927
+ export interface MemberBuildRejectionBindingUnresolvablePayload {
1928
+ kind: ConnectionTargetErrorKind;
1929
+ }
1930
+ export interface MemberBuildRejectionBindingUnresolvable {
1931
+ binding_unresolvable: MemberBuildRejectionBindingUnresolvablePayload;
1932
+ }
1933
+ export interface MemberBuildRejectionProviderAuthPayload {
1934
+ kind: AuthErrorKind;
1935
+ }
1936
+ export interface MemberBuildRejectionProviderAuth {
1937
+ provider_auth: MemberBuildRejectionProviderAuthPayload;
1938
+ }
1939
+ export interface MemberBuildRejectionSelfHostedServerMissingPayload {
1940
+ server_id: string;
1941
+ }
1942
+ export interface MemberBuildRejectionSelfHostedServerMissing {
1943
+ self_hosted_server_missing: MemberBuildRejectionSelfHostedServerMissingPayload;
1944
+ }
1945
+ export type MemberBuildRejection = MemberBuildRejectionUnknownProviderForModel | MemberBuildRejectionBindingUnresolvable | MemberBuildRejectionProviderAuth | MemberBuildRejectionSelfHostedServerMissing;
1946
+ export type ToolConfigChangeDomain = "tool_scope" | "deferred_catalog";
1947
+ export type ToolConfigChangeOperation = "add" | "remove" | "reload";
1948
+ export type ExternalToolDeltaPhase = "pending" | "applied" | "draining" | "forced" | "failed";
1949
+ export interface ToolConfigChangeStatusBoundaryApplied {
1950
+ base_changed: boolean;
1951
+ kind: "boundary_applied";
1952
+ revision: number;
1953
+ visible_changed: boolean;
1954
+ }
1955
+ export interface ToolConfigChangeStatusDeferredCatalogDelta {
1956
+ added_hidden_count: number;
1957
+ kind: "deferred_catalog_delta";
1958
+ pending_source_count: number;
1959
+ removed_hidden_count: number;
1960
+ }
1961
+ export interface ToolConfigChangeStatusWarningFailedClosed {
1962
+ error: string;
1963
+ kind: "warning_failed_closed";
1964
+ }
1965
+ export interface ToolConfigChangeStatusExternalToolDelta {
1966
+ detail?: string | null;
1967
+ kind: "external_tool_delta";
1968
+ phase: ExternalToolDeltaPhase;
1969
+ }
1970
+ export type ToolConfigChangeStatus = ToolConfigChangeStatusBoundaryApplied | ToolConfigChangeStatusDeferredCatalogDelta | ToolConfigChangeStatusWarningFailedClosed | ToolConfigChangeStatusExternalToolDelta;
1971
+ export interface SystemNoticePeer {
1972
+ display_name?: string | null;
1973
+ id: PeerId;
1974
+ }
1975
+ export interface DeferredCatalogDelta {
1976
+ added_hidden_names?: ToolName[];
1977
+ pending_sources?: string[];
1978
+ removed_hidden_names?: ToolName[];
1979
+ }
1980
+ export interface ToolConfigChangedPayload {
1981
+ applied_at_turn?: number | null;
1982
+ deferred_catalog_delta?: DeferredCatalogDelta | null;
1983
+ domain?: ToolConfigChangeDomain | null;
1984
+ operation: ToolConfigChangeOperation;
1985
+ persisted: boolean;
1986
+ status_info: ToolConfigChangeStatus;
1987
+ target: string;
1988
+ }
1666
1989
  export interface ScheduleIdParams {
1667
1990
  schedule_id: string;
1668
1991
  }
1669
1992
  export interface ListSchedulesParams {
1670
- labels?: Record<string, string>;
1671
- limit?: number;
1672
- offset?: number;
1993
+ labels?: Record<string, string> | null;
1994
+ limit?: number | null;
1995
+ offset?: number | null;
1673
1996
  }
1674
1997
  export interface ScheduleOccurrencesParams {
1675
- include_terminal?: boolean;
1998
+ include_terminal?: boolean | null;
1676
1999
  schedule_id: string;
1677
2000
  }
1678
2001
  export interface UpdateScheduleParams {
1679
- description?: string;
1680
- expected_revision?: number;
1681
- labels?: Record<string, string>;
1682
- misfire_policy?: Record<string, unknown>;
1683
- missing_target_policy?: "skip" | "mark_misfired";
1684
- name?: string;
1685
- overlap_policy?: "allow_concurrent" | "skip_if_running";
1686
- planning_horizon_days?: number;
1687
- planning_horizon_occurrences?: number;
2002
+ description?: string | null;
2003
+ expected_revision?: number | null;
2004
+ labels?: Record<string, string> | null;
2005
+ misfire_policy?: Record<string, unknown> | null;
2006
+ missing_target_policy?: "skip" | "mark_misfired" | null;
2007
+ name?: string | null;
2008
+ overlap_policy?: "allow_concurrent" | "skip_if_running" | null;
2009
+ planning_horizon_days?: number | null;
2010
+ planning_horizon_occurrences?: number | null;
1688
2011
  schedule_id: string;
1689
- target?: Record<string, unknown>;
1690
- trigger?: Record<string, unknown>;
2012
+ target?: Record<string, unknown> | null;
2013
+ trigger?: Record<string, unknown> | null;
1691
2014
  }
1692
2015
  export interface WireContentBlockText {
1693
2016
  text: string;
1694
2017
  type: "text";
1695
2018
  }
1696
- export interface WireContentBlockImage {
2019
+ export interface WireContentBlockImageInline {
2020
+ media_type: string;
2021
+ type: "image";
2022
+ data: string;
2023
+ source: "inline";
2024
+ }
2025
+ export interface WireContentBlockImageBlob {
1697
2026
  media_type: string;
1698
2027
  type: "image";
2028
+ blob_id: string;
2029
+ source: "blob";
1699
2030
  }
1700
- export interface WireContentBlockVideo {
2031
+ export interface WireContentBlockVideoInline {
1701
2032
  duration_ms: number;
1702
2033
  media_type: string;
1703
2034
  type: "video";
2035
+ data: string;
2036
+ source: "inline";
2037
+ }
2038
+ export interface WireContentBlockVideoUri {
2039
+ duration_ms: number;
2040
+ media_type: string;
2041
+ type: "video";
2042
+ source: "uri";
2043
+ uri: string;
1704
2044
  }
1705
2045
  export interface WireContentBlockStructured {
1706
2046
  data: unknown;
@@ -1709,7 +2049,7 @@ export interface WireContentBlockStructured {
1709
2049
  export interface WireContentBlockUnknown {
1710
2050
  type: "unknown";
1711
2051
  }
1712
- export type WireContentBlock = WireContentBlockText | WireContentBlockImage | WireContentBlockVideo | WireContentBlockStructured | WireContentBlockUnknown;
2052
+ export type WireContentBlock = WireContentBlockText | WireContentBlockImageInline | WireContentBlockImageBlob | WireContentBlockVideoInline | WireContentBlockVideoUri | WireContentBlockStructured | WireContentBlockUnknown;
1713
2053
  export type WireContentInput = string | WireContentBlock[];
1714
2054
  export type Provider = "anthropic" | "openai" | "gemini" | "self_hosted" | "other";
1715
2055
  export type WireMemberRef = string;
@@ -1720,7 +2060,7 @@ export interface WireRuntimeBindingSession {
1720
2060
  }
1721
2061
  export interface WireRuntimeBindingExternal {
1722
2062
  address: string;
1723
- bootstrap_token?: BridgeBootstrapToken;
2063
+ bootstrap_token?: BridgeBootstrapToken | null;
1724
2064
  identity: WireTrustedPeerIdentity;
1725
2065
  kind: "external";
1726
2066
  }
@@ -1758,20 +2098,6 @@ export interface WireToolAccessPolicyDenyList {
1758
2098
  value: string[];
1759
2099
  }
1760
2100
  export type WireToolAccessPolicy = WireToolAccessPolicyInherit | WireToolAccessPolicyAllowList | WireToolAccessPolicyDenyList;
1761
- export interface WireBudgetSplitPolicyEqual {
1762
- type: "equal";
1763
- }
1764
- export interface WireBudgetSplitPolicyProportional {
1765
- type: "proportional";
1766
- }
1767
- export interface WireBudgetSplitPolicyRemaining {
1768
- type: "remaining";
1769
- }
1770
- export interface WireBudgetSplitPolicyFixed {
1771
- type: "fixed";
1772
- value: number;
1773
- }
1774
- export type WireBudgetSplitPolicy = WireBudgetSplitPolicyEqual | WireBudgetSplitPolicyProportional | WireBudgetSplitPolicyRemaining | WireBudgetSplitPolicyFixed;
1775
2101
  export type WireToolFilter = "All" | {
1776
2102
  Allow: string[];
1777
2103
  } | {
@@ -1830,7 +2156,7 @@ export type MobConditionExprInput = MobConditionExprInputEq | MobConditionExprIn
1830
2156
  export type MobDependencyModeInput = "all" | "any";
1831
2157
  export type MobDispatchModeInput = "fan_out" | "one_to_one" | "fan_in";
1832
2158
  export interface MobFlowNodeInputStep {
1833
- branch?: string;
2159
+ branch?: string | null;
1834
2160
  depends_on?: string[];
1835
2161
  depends_on_mode?: MobDependencyModeInput;
1836
2162
  kind: "step";
@@ -1867,6 +2193,57 @@ export interface MobSpawnPolicyInputAuto {
1867
2193
  export type MobSpawnPolicyInput = MobSpawnPolicyInputNone | MobSpawnPolicyInputAuto;
1868
2194
  export type MobStepOutputFormatInput = "json" | "text";
1869
2195
  export type WireMobReconcileStage = "spawn" | "retire";
2196
+ export type WireHostRef = string;
2197
+ export type WireHostBindPhase = "requested" | "bound";
2198
+ export type WireProjectionProvenance = "host_claimed" | "controlling_host_verified";
2199
+ export type WireReachability = "reachable" | "stale" | "unreachable" | "unknown";
2200
+ export type WireNonPortableResourceKind = "rust_bundles" | "per_spawn_external_tools" | "mob_default_external_tools" | "default_llm_client_override" | "host_surface_mcp_allowlist" | "workgraph_tools";
2201
+ export type WireMobRunStatus = "pending" | "running" | "completed" | "failed" | "canceled";
2202
+ export interface WirePeerConnectivityNotApplicable {
2203
+ status: "not_applicable";
2204
+ }
2205
+ export interface WirePeerConnectivityProbeTimedOut {
2206
+ status: "probe_timed_out";
2207
+ }
2208
+ export interface WirePeerConnectivityKnown {
2209
+ snapshot: WirePeerConnectivitySnapshot;
2210
+ status: "known";
2211
+ }
2212
+ export type WirePeerConnectivity = WirePeerConnectivityNotApplicable | WirePeerConnectivityProbeTimedOut | WirePeerConnectivityKnown;
2213
+ export type WireHostBindingDescriptorKind = "host";
2214
+ export interface BridgeLiveControlVerbCommitInput {
2215
+ verb: "commit_input";
2216
+ }
2217
+ export interface BridgeLiveControlVerbInterrupt {
2218
+ verb: "interrupt";
2219
+ }
2220
+ export interface BridgeLiveControlVerbTruncate {
2221
+ audio_played_ms: number;
2222
+ content_index: number;
2223
+ item_id: string;
2224
+ verb: "truncate";
2225
+ }
2226
+ export interface BridgeLiveControlVerbRefresh {
2227
+ verb: "refresh";
2228
+ }
2229
+ export type BridgeLiveControlVerb = BridgeLiveControlVerbCommitInput | BridgeLiveControlVerbInterrupt | BridgeLiveControlVerbTruncate | BridgeLiveControlVerbRefresh;
2230
+ export interface BridgeLiveControlOutcomeCommitInput {
2231
+ status: "committed";
2232
+ verb: "commit_input";
2233
+ }
2234
+ export interface BridgeLiveControlOutcomeInterrupt {
2235
+ status: "interrupted";
2236
+ verb: "interrupt";
2237
+ }
2238
+ export interface BridgeLiveControlOutcomeTruncate {
2239
+ status: "truncated";
2240
+ verb: "truncate";
2241
+ }
2242
+ export interface BridgeLiveControlOutcomeRefresh {
2243
+ status: "queued";
2244
+ verb: "refresh";
2245
+ }
2246
+ export type BridgeLiveControlOutcome = BridgeLiveControlOutcomeCommitInput | BridgeLiveControlOutcomeInterrupt | BridgeLiveControlOutcomeTruncate | BridgeLiveControlOutcomeRefresh;
1870
2247
  export type AttentionDelegatedAuthority = "add_evidence" | "close_own_review_item" | "request_closure" | "close_if_policy_allows";
1871
2248
  export interface GoalAttentionTargetSession {
1872
2249
  kind: "session";
@@ -1883,7 +2260,7 @@ export interface WorkAttentionStatusActive {
1883
2260
  }
1884
2261
  export interface WorkAttentionStatusPaused {
1885
2262
  state: "paused";
1886
- until?: string;
2263
+ until?: string | null;
1887
2264
  }
1888
2265
  export interface WorkAttentionStatusSuperseded {
1889
2266
  state: "superseded";
@@ -1973,19 +2350,19 @@ export type WireStopReason = "end_turn" | "tool_use" | "max_tokens" | "stop_sequ
1973
2350
  export type WireToolResultContent = string | WireContentBlock[];
1974
2351
  export type WireModelTier = "recommended" | "supported";
1975
2352
  export interface CommsCommandInput {
1976
- allow_self_session?: boolean;
1977
- blocks?: ContentBlock[];
2353
+ allow_self_session?: boolean | null;
2354
+ blocks?: ContentBlock[] | null;
1978
2355
  body: string;
1979
- handling_mode?: HandlingMode;
2356
+ handling_mode?: HandlingMode | null;
1980
2357
  kind: "input";
1981
- source?: "tcp" | "uds" | "stdin" | "webhook" | "rpc";
1982
- stream?: "none" | "reserve_interaction";
2358
+ source?: "tcp" | "uds" | "stdin" | "webhook" | "rpc" | null;
2359
+ stream?: "none" | "reserve_interaction" | null;
1983
2360
  }
1984
2361
  export interface CommsCommandPeerMessage {
1985
- blocks?: ContentBlock[];
2362
+ blocks?: ContentBlock[] | null;
1986
2363
  body: string;
1987
- content_taint?: SendTaintOverride;
1988
- handling_mode?: HandlingMode;
2364
+ content_taint?: SendTaintOverride | null;
2365
+ handling_mode?: HandlingMode | null;
1989
2366
  kind: "peer_message";
1990
2367
  to: PeerId;
1991
2368
  }
@@ -1996,22 +2373,22 @@ export interface CommsCommandPeerLifecycle {
1996
2373
  to: PeerId;
1997
2374
  }
1998
2375
  export interface CommsCommandPeerRequest {
1999
- blocks?: ContentBlock[];
2000
- content_taint?: SendTaintOverride;
2001
- handling_mode?: HandlingMode;
2376
+ blocks?: ContentBlock[] | null;
2377
+ content_taint?: SendTaintOverride | null;
2378
+ handling_mode?: HandlingMode | null;
2002
2379
  intent: CommsPeerRequestIntent;
2003
2380
  kind: "peer_request";
2004
2381
  params: CommsPeerRequestParams;
2005
- stream?: "none" | "reserve_interaction";
2382
+ stream?: "none" | "reserve_interaction" | null;
2006
2383
  to: PeerId;
2007
2384
  }
2008
2385
  export interface CommsCommandPeerResponse {
2009
- blocks?: ContentBlock[];
2010
- content_taint?: SendTaintOverride;
2011
- handling_mode?: HandlingMode;
2386
+ blocks?: ContentBlock[] | null;
2387
+ content_taint?: SendTaintOverride | null;
2388
+ handling_mode?: HandlingMode | null;
2012
2389
  in_reply_to: string;
2013
2390
  kind: "peer_response";
2014
- result?: CommsPeerResponseResult;
2391
+ result?: CommsPeerResponseResult | null;
2015
2392
  status: "accepted" | "completed" | "failed";
2016
2393
  to: PeerId;
2017
2394
  }
@@ -2043,12 +2420,16 @@ export interface BridgeCommandDeliverMemberInput {
2043
2420
  command: "deliver_member_input";
2044
2421
  content: ContentInput;
2045
2422
  epoch: number;
2423
+ expected_member?: BridgeMemberIncarnation | null;
2046
2424
  handling_mode: HandlingMode;
2047
2425
  injected_context?: ContentInput[];
2048
2426
  input_id: string;
2049
- objective_id?: unknown;
2427
+ objective_id?: string | null;
2428
+ outcome_tracking?: "interaction" | null;
2050
2429
  protocol_version: BridgeProtocolVersion;
2051
2430
  supervisor: BridgePeerSpec;
2431
+ transcript_interaction_id?: string | null;
2432
+ turn?: BridgeTurnDirective | null;
2052
2433
  }
2053
2434
  export interface BridgeCommandObserveMember {
2054
2435
  command: "observe_member";
@@ -2059,16 +2440,28 @@ export interface BridgeCommandObserveMember {
2059
2440
  export interface BridgeCommandInterruptMember {
2060
2441
  command: "interrupt_member";
2061
2442
  epoch: number;
2443
+ expected_member?: BridgeMemberIncarnation | null;
2062
2444
  protocol_version: BridgeProtocolVersion;
2063
2445
  supervisor: BridgePeerSpec;
2064
2446
  }
2065
2447
  export interface BridgeCommandHardCancelMember {
2066
2448
  command: "hard_cancel_member";
2067
2449
  epoch: number;
2450
+ expected_member: BridgeMemberIncarnation;
2451
+ expected_run_id: RunId;
2452
+ operation_id: OperationId;
2068
2453
  protocol_version: BridgeProtocolVersion;
2069
2454
  reason: string;
2070
2455
  supervisor: BridgePeerSpec;
2071
2456
  }
2457
+ export interface BridgeCommandCancelTrackedMemberInput {
2458
+ command: "cancel_tracked_member_input";
2459
+ epoch: number;
2460
+ expected_member: BridgeMemberIncarnation;
2461
+ input_id: string;
2462
+ protocol_version: BridgeProtocolVersion;
2463
+ supervisor: BridgePeerSpec;
2464
+ }
2072
2465
  export interface BridgeCommandRetireMember {
2073
2466
  command: "retire_member";
2074
2467
  epoch: number;
@@ -2084,7 +2477,7 @@ export interface BridgeCommandDestroyMember {
2084
2477
  export interface BridgeCommandWireMember {
2085
2478
  command: "wire_member";
2086
2479
  epoch: number;
2087
- mob_peer_overlay?: unknown;
2480
+ mob_peer_overlay?: BridgeMobPeerOverlayHandoff | null;
2088
2481
  peer_spec: BridgePeerSpec;
2089
2482
  protocol_version: BridgeProtocolVersion;
2090
2483
  supervisor: BridgePeerSpec;
@@ -2092,7 +2485,7 @@ export interface BridgeCommandWireMember {
2092
2485
  export interface BridgeCommandUnwireMember {
2093
2486
  command: "unwire_member";
2094
2487
  epoch: number;
2095
- mob_peer_overlay?: unknown;
2488
+ mob_peer_overlay?: BridgeMobPeerOverlayHandoff | null;
2096
2489
  peer_spec: BridgePeerSpec;
2097
2490
  protocol_version: BridgeProtocolVersion;
2098
2491
  supervisor: BridgePeerSpec;
@@ -2102,16 +2495,170 @@ export interface BridgeCommandDeclareMemberOutboundTaint {
2102
2495
  epoch: number;
2103
2496
  protocol_version: BridgeProtocolVersion;
2104
2497
  supervisor: BridgePeerSpec;
2105
- taint?: SenderContentTaint;
2498
+ taint?: SenderContentTaint | null;
2499
+ target?: BridgeOutboundTaintTarget | null;
2500
+ }
2501
+ export interface BridgeCommandReadMemberHistory {
2502
+ command: "read_member_history";
2503
+ epoch: number;
2504
+ expected_member: BridgeMemberIncarnation;
2505
+ from_index?: number | null;
2506
+ limit?: number | null;
2507
+ protocol_version: BridgeProtocolVersion;
2508
+ supervisor: BridgePeerSpec;
2509
+ }
2510
+ export interface BridgeCommandPollMemberEvents {
2511
+ command: "poll_member_events";
2512
+ cursor: BridgeEventCursor;
2513
+ epoch: number;
2514
+ expected_member: BridgeMemberIncarnation;
2515
+ max?: number | null;
2516
+ max_outcomes?: number | null;
2517
+ outcome_acks?: BridgeTurnOutcomeAck[];
2518
+ protocol_version: BridgeProtocolVersion;
2519
+ supervisor: BridgePeerSpec;
2520
+ wait_ms?: number | null;
2521
+ }
2522
+ export interface BridgeCommandOpenMemberLiveChannel {
2523
+ command: "open_member_live_channel";
2524
+ epoch: number;
2525
+ expected_member: BridgeMemberIncarnation;
2526
+ protocol_version: BridgeProtocolVersion;
2527
+ supervisor: BridgePeerSpec;
2528
+ transport?: LiveOpenTransport | null;
2529
+ turning_mode?: RealtimeTurningMode | null;
2530
+ }
2531
+ export interface BridgeCommandCloseMemberLiveChannel {
2532
+ channel_id: string;
2533
+ command: "close_member_live_channel";
2534
+ epoch: number;
2535
+ expected_member: BridgeMemberIncarnation;
2536
+ protocol_version: BridgeProtocolVersion;
2537
+ supervisor: BridgePeerSpec;
2538
+ }
2539
+ export interface BridgeCommandMemberLiveChannelStatus {
2540
+ channel_id?: string | null;
2541
+ command: "member_live_channel_status";
2542
+ epoch: number;
2543
+ expected_member: BridgeMemberIncarnation;
2544
+ protocol_version: BridgeProtocolVersion;
2545
+ supervisor: BridgePeerSpec;
2546
+ }
2547
+ export interface BridgeCommandControlMemberLiveChannel {
2548
+ channel_id: string;
2549
+ command: "control_member_live_channel";
2550
+ epoch: number;
2551
+ expected_member: BridgeMemberIncarnation;
2552
+ protocol_version: BridgeProtocolVersion;
2553
+ supervisor: BridgePeerSpec;
2554
+ verb: BridgeLiveControlVerb;
2555
+ }
2556
+ export interface BridgeCommandBindHost {
2557
+ binding_generation: number;
2558
+ bootstrap_proof: string;
2559
+ command: "bind_host";
2560
+ epoch: number;
2561
+ expected_address: string;
2562
+ expected_host_peer_id: string;
2563
+ mob_id: string;
2564
+ protocol_version: BridgeProtocolVersion;
2565
+ required_capabilities: BridgeHostCapabilityRequirements;
2566
+ supervisor: BridgePeerSpec;
2567
+ }
2568
+ export interface BridgeCommandRebindHost {
2569
+ binding_generation: number;
2570
+ command: "rebind_host";
2571
+ epoch: number;
2572
+ mob_id: string;
2573
+ protocol_version: BridgeProtocolVersion;
2574
+ required_capabilities: BridgeHostCapabilityRequirements;
2575
+ supervisor: BridgePeerSpec;
2576
+ }
2577
+ export interface BridgeCommandRevokeHost {
2578
+ binding_generation: number;
2579
+ command: "revoke_host";
2580
+ epoch: number;
2581
+ mob_id: string;
2582
+ protocol_version: BridgeProtocolVersion;
2583
+ supervisor: BridgePeerSpec;
2584
+ }
2585
+ export interface BridgeCommandMaterializeMember {
2586
+ binding_generation: number;
2587
+ command: "materialize_member";
2588
+ epoch: number;
2589
+ fence_token: number;
2590
+ generation: number;
2591
+ launch: {
2592
+ mode: "fresh";
2593
+ } | Record<string, unknown>;
2594
+ protocol_version: BridgeProtocolVersion;
2595
+ spec: Record<string, unknown>;
2596
+ spec_digest: string;
2597
+ supervisor: BridgePeerSpec;
2598
+ }
2599
+ export interface BridgeCommandReleaseMember {
2600
+ agent_identity: string;
2601
+ binding_generation: number;
2602
+ command: "release_member";
2603
+ epoch: number;
2604
+ fence_token: number;
2605
+ generation: number;
2606
+ mob_id: string;
2607
+ protocol_version: BridgeProtocolVersion;
2608
+ supervisor: BridgePeerSpec;
2609
+ }
2610
+ export interface BridgeCommandInstallPeerTrust {
2611
+ agent_identity: string;
2612
+ binding_generation: number;
2613
+ command: "install_peer_trust";
2614
+ epoch: number;
2615
+ mob_id: string;
2616
+ peer: BridgePeerSpec;
2617
+ protocol_version: BridgeProtocolVersion;
2618
+ supervisor: BridgePeerSpec;
2619
+ }
2620
+ export interface BridgeCommandRemovePeerTrust {
2621
+ agent_identity: string;
2622
+ binding_generation: number;
2623
+ command: "remove_peer_trust";
2624
+ epoch: number;
2625
+ mob_id: string;
2626
+ peer: BridgePeerSpec;
2627
+ protocol_version: BridgeProtocolVersion;
2628
+ supervisor: BridgePeerSpec;
2629
+ }
2630
+ export interface BridgeCommandHostStatus {
2631
+ binding_generation: number;
2632
+ command: "host_status";
2633
+ epoch: number;
2634
+ mob_id: string;
2635
+ protocol_version: BridgeProtocolVersion;
2636
+ supervisor: BridgePeerSpec;
2637
+ }
2638
+ export interface BridgeCommandMemberOperatorRequest {
2639
+ agent_identity: string;
2640
+ command: "member_operator_request";
2641
+ op: Record<string, unknown> | {
2642
+ op: "list_members";
2643
+ } | {
2644
+ op: "mob_list_flows";
2645
+ };
2646
+ protocol_version: BridgeProtocolVersion;
2647
+ request_id: string;
2648
+ requester_fence_token: number;
2649
+ requester_generation: number;
2650
+ requester_host_binding_generation: number;
2651
+ requester_host_id: string;
2652
+ requester_member_session_id: string;
2106
2653
  }
2107
2654
  export interface BridgeCommandObserveSupervisorRotation {
2108
2655
  command: "observe_supervisor_rotation";
2109
2656
  observer: BridgePeerSpec;
2110
2657
  observer_epoch: number;
2111
- operation_id: unknown;
2658
+ operation_id: string;
2112
2659
  protocol_version: BridgeProtocolVersion;
2113
2660
  }
2114
- export type BridgeCommand = BridgeCommandBindMember | BridgeCommandAuthorizeSupervisor | BridgeCommandRevokeSupervisor | BridgeCommandDeliverMemberInput | BridgeCommandObserveMember | BridgeCommandInterruptMember | BridgeCommandHardCancelMember | BridgeCommandRetireMember | BridgeCommandDestroyMember | BridgeCommandWireMember | BridgeCommandUnwireMember | BridgeCommandDeclareMemberOutboundTaint | BridgeCommandObserveSupervisorRotation;
2661
+ export type BridgeCommand = BridgeCommandBindMember | BridgeCommandAuthorizeSupervisor | BridgeCommandRevokeSupervisor | BridgeCommandDeliverMemberInput | BridgeCommandObserveMember | BridgeCommandInterruptMember | BridgeCommandHardCancelMember | BridgeCommandCancelTrackedMemberInput | BridgeCommandRetireMember | BridgeCommandDestroyMember | BridgeCommandWireMember | BridgeCommandUnwireMember | BridgeCommandDeclareMemberOutboundTaint | BridgeCommandReadMemberHistory | BridgeCommandPollMemberEvents | BridgeCommandOpenMemberLiveChannel | BridgeCommandCloseMemberLiveChannel | BridgeCommandMemberLiveChannelStatus | BridgeCommandControlMemberLiveChannel | BridgeCommandBindHost | BridgeCommandRebindHost | BridgeCommandRevokeHost | BridgeCommandMaterializeMember | BridgeCommandReleaseMember | BridgeCommandInstallPeerTrust | BridgeCommandRemovePeerTrust | BridgeCommandHostStatus | BridgeCommandMemberOperatorRequest | BridgeCommandObserveSupervisorRotation;
2115
2662
  export interface BridgeDeliveryOutcomeAccepted {
2116
2663
  outcome: "accepted";
2117
2664
  }
@@ -2141,11 +2688,130 @@ export interface BridgeDeliveryRejectionCauseInternal {
2141
2688
  detail: string;
2142
2689
  kind: "internal";
2143
2690
  }
2144
- export type BridgeDeliveryRejectionCause = BridgeDeliveryRejectionCauseNotReady | BridgeDeliveryRejectionCauseDurabilityViolation | BridgeDeliveryRejectionCausePeerHandlingModeInvalid | BridgeDeliveryRejectionCauseInternal;
2691
+ export interface BridgeDeliveryRejectionCauseTurnDirectiveUnsupported {
2692
+ detail: string;
2693
+ kind: "turn_directive_unsupported";
2694
+ }
2695
+ export interface BridgeDeliveryRejectionCauseOutcomeJournalFull {
2696
+ kind: "outcome_journal_full";
2697
+ limit: number;
2698
+ retained: number;
2699
+ }
2700
+ export interface BridgeDeliveryRejectionCauseStaleMemberIncarnation {
2701
+ current: BridgeMemberIncarnation;
2702
+ kind: "stale_member_incarnation";
2703
+ }
2704
+ export interface BridgeDeliveryRejectionCauseStaleMemberResidency {
2705
+ current?: BridgeMemberIncarnation | null;
2706
+ expected: BridgeMemberIncarnation;
2707
+ kind: "stale_member_residency";
2708
+ }
2709
+ export type BridgeDeliveryRejectionCause = BridgeDeliveryRejectionCauseNotReady | BridgeDeliveryRejectionCauseDurabilityViolation | BridgeDeliveryRejectionCausePeerHandlingModeInvalid | BridgeDeliveryRejectionCauseInternal | BridgeDeliveryRejectionCauseTurnDirectiveUnsupported | BridgeDeliveryRejectionCauseOutcomeJournalFull | BridgeDeliveryRejectionCauseStaleMemberIncarnation | BridgeDeliveryRejectionCauseStaleMemberResidency;
2145
2710
  export type BridgeMemberRuntimeState = "initializing" | "idle" | "attached" | "running" | "retired" | "stopped" | "destroyed";
2146
2711
  export type BridgePeerConnectivity = "reachable" | "unreachable" | "unknown";
2147
2712
  export type BridgeProtocolVersion = number;
2148
- export type BridgeRejectionCause = "not_bound" | "stale_supervisor" | "sender_mismatch" | "already_bound" | "invalid_bootstrap_token" | "unsupported_protocol_version" | "invalid_supervisor_spec" | "invalid_peer_spec" | "address_mismatch" | "unsupported" | "internal";
2713
+ export interface BridgeRejectionCauseStaleCursorPayload {
2714
+ generation: number;
2715
+ watermark: number;
2716
+ }
2717
+ export interface BridgeRejectionCauseStaleCursor {
2718
+ stale_cursor: BridgeRejectionCauseStaleCursorPayload;
2719
+ }
2720
+ export interface BridgeRejectionCauseOversizedEventPayload {
2721
+ durable_seq: number;
2722
+ encoded_bytes: number;
2723
+ generation: number;
2724
+ max_bytes: number;
2725
+ next_seq: number;
2726
+ }
2727
+ export interface BridgeRejectionCauseOversizedEvent {
2728
+ oversized_event: BridgeRejectionCauseOversizedEventPayload;
2729
+ }
2730
+ export interface BridgeRejectionCauseHistoryRowTooLargePayload {
2731
+ encoded_bytes: number;
2732
+ index: number;
2733
+ max_bytes: number;
2734
+ }
2735
+ export interface BridgeRejectionCauseHistoryRowTooLarge {
2736
+ history_row_too_large: BridgeRejectionCauseHistoryRowTooLargePayload;
2737
+ }
2738
+ export interface BridgeRejectionCauseScopeDeniedPayload {
2739
+ presented: WireControlScope[];
2740
+ required: WireControlScope;
2741
+ }
2742
+ export interface BridgeRejectionCauseScopeDenied {
2743
+ scope_denied: BridgeRejectionCauseScopeDeniedPayload;
2744
+ }
2745
+ export interface BridgeRejectionCauseMaterializeBuildRejectedPayload {
2746
+ cause: MemberBuildRejection;
2747
+ }
2748
+ export interface BridgeRejectionCauseMaterializeBuildRejected {
2749
+ materialize_build_rejected: BridgeRejectionCauseMaterializeBuildRejectedPayload;
2750
+ }
2751
+ export interface BridgeRejectionCauseModelUnresolvablePayload {
2752
+ model: string;
2753
+ }
2754
+ export interface BridgeRejectionCauseModelUnresolvable {
2755
+ model_unresolvable: BridgeRejectionCauseModelUnresolvablePayload;
2756
+ }
2757
+ export interface BridgeRejectionCauseAuthBindingUnresolvablePayload {
2758
+ binding: string;
2759
+ realm: string;
2760
+ }
2761
+ export interface BridgeRejectionCauseAuthBindingUnresolvable {
2762
+ auth_binding_unresolvable: BridgeRejectionCauseAuthBindingUnresolvablePayload;
2763
+ }
2764
+ export interface BridgeRejectionCauseMcpCommandMissingPayload {
2765
+ server: string;
2766
+ }
2767
+ export interface BridgeRejectionCauseMcpCommandMissing {
2768
+ mcp_command_missing: BridgeRejectionCauseMcpCommandMissingPayload;
2769
+ }
2770
+ export interface BridgeRejectionCauseEnvKeyMissingPayload {
2771
+ key: string;
2772
+ }
2773
+ export interface BridgeRejectionCauseEnvKeyMissing {
2774
+ env_key_missing: BridgeRejectionCauseEnvKeyMissingPayload;
2775
+ }
2776
+ export interface BridgeRejectionCauseHostEngineVersionChangedPayload {
2777
+ bound: string;
2778
+ reported: string;
2779
+ }
2780
+ export interface BridgeRejectionCauseHostEngineVersionChanged {
2781
+ host_engine_version_changed: BridgeRejectionCauseHostEngineVersionChangedPayload;
2782
+ }
2783
+ export interface BridgeRejectionCauseModelNotRealtimePayload {
2784
+ model: string;
2785
+ provider: string;
2786
+ }
2787
+ export interface BridgeRejectionCauseModelNotRealtime {
2788
+ model_not_realtime: BridgeRejectionCauseModelNotRealtimePayload;
2789
+ }
2790
+ export interface BridgeRejectionCauseLiveAdapterUnavailablePayload {
2791
+ provider: string;
2792
+ }
2793
+ export interface BridgeRejectionCauseLiveAdapterUnavailable {
2794
+ live_adapter_unavailable: BridgeRejectionCauseLiveAdapterUnavailablePayload;
2795
+ }
2796
+ export interface BridgeRejectionCauseLiveTransportUnsupportedPayload {
2797
+ requested: string;
2798
+ }
2799
+ export interface BridgeRejectionCauseLiveTransportUnsupported {
2800
+ live_transport_unsupported: BridgeRejectionCauseLiveTransportUnsupportedPayload;
2801
+ }
2802
+ export interface BridgeRejectionCauseCapabilityMissingPayload {
2803
+ capability: string;
2804
+ }
2805
+ export interface BridgeRejectionCauseCapabilityMissing {
2806
+ capability_missing: BridgeRejectionCauseCapabilityMissingPayload;
2807
+ }
2808
+ export interface BridgeRejectionCauseSessionOwnershipConflictPayload {
2809
+ session_id: string;
2810
+ }
2811
+ export interface BridgeRejectionCauseSessionOwnershipConflict {
2812
+ session_ownership_conflict: BridgeRejectionCauseSessionOwnershipConflictPayload;
2813
+ }
2814
+ export type BridgeRejectionCause = "not_bound" | "stale_supervisor" | "sender_mismatch" | "already_bound" | "invalid_bootstrap_token" | "unsupported_protocol_version" | "invalid_supervisor_spec" | "invalid_peer_spec" | "address_mismatch" | "unsupported" | "internal" | "stale_fence" | BridgeRejectionCauseStaleCursor | BridgeRejectionCauseOversizedEvent | BridgeRejectionCauseHistoryRowTooLarge | "unavailable" | BridgeRejectionCauseScopeDenied | "spec_digest_mismatch" | BridgeRejectionCauseMaterializeBuildRejected | BridgeRejectionCauseModelUnresolvable | BridgeRejectionCauseAuthBindingUnresolvable | BridgeRejectionCauseMcpCommandMissing | "realm_backend_unavailable" | BridgeRejectionCauseEnvKeyMissing | BridgeRejectionCauseHostEngineVersionChanged | BridgeRejectionCauseModelNotRealtime | BridgeRejectionCauseLiveAdapterUnavailable | "live_transport_unavailable" | "live_channel_already_bound" | "live_channel_not_found" | BridgeRejectionCauseLiveTransportUnsupported | "resume_session_not_found" | BridgeRejectionCauseCapabilityMissing | "launch_mode_unsupported" | "launch_mode_placement_mismatch" | BridgeRejectionCauseSessionOwnershipConflict;
2149
2815
  export interface BridgeReplyBindMember {
2150
2816
  address: string;
2151
2817
  capabilities: BridgeCapabilities;
@@ -2157,20 +2823,26 @@ export interface BridgeReplyAck {
2157
2823
  result: "ack";
2158
2824
  }
2159
2825
  export interface BridgeReplyObservation {
2160
- accepting_inputs?: boolean;
2161
- current_run_id?: string;
2162
- last_error?: string;
2826
+ accepting_inputs?: boolean | null;
2827
+ current_run_id?: string | null;
2828
+ last_error?: string | null;
2163
2829
  observed_at: string;
2164
- peer_connectivity?: BridgePeerConnectivity;
2830
+ peer_connectivity?: BridgePeerConnectivity | null;
2165
2831
  result: "observation";
2166
2832
  state: BridgeMemberRuntimeState;
2167
2833
  }
2168
2834
  export interface BridgeReplyDelivery {
2169
- canonical_input_id?: string;
2835
+ canonical_input_id?: string | null;
2170
2836
  input_id: string;
2171
2837
  outcome: BridgeDeliveryOutcome;
2172
2838
  result: "delivery";
2173
2839
  }
2840
+ export interface BridgeReplyTrackedInputCancelled {
2841
+ expected_member: BridgeMemberIncarnation;
2842
+ input_id: string;
2843
+ outcome: BridgeTrackedInputCancelOutcome;
2844
+ result: "tracked_input_cancelled";
2845
+ }
2174
2846
  export interface BridgeReplyRetire {
2175
2847
  inputs_abandoned: number;
2176
2848
  inputs_pending_drain: number;
@@ -2180,27 +2852,134 @@ export interface BridgeReplyDestroy {
2180
2852
  inputs_abandoned: number;
2181
2853
  result: "destroy";
2182
2854
  }
2183
- export interface BridgeReplySupervisorRotation {
2855
+ export interface BridgeReplySupervisorRotationFound {
2184
2856
  result: "supervisor_rotation";
2857
+ outcome: "found";
2858
+ state: Record<string, unknown>;
2859
+ }
2860
+ export interface BridgeReplySupervisorRotationNotFound {
2861
+ result: "supervisor_rotation";
2862
+ operation_id: string;
2863
+ outcome: "not_found";
2185
2864
  }
2186
2865
  export interface BridgeReplyRejected {
2187
2866
  cause: BridgeRejectionCause;
2188
2867
  reason: string;
2189
2868
  result: "rejected";
2190
2869
  }
2191
- export type BridgeReply = BridgeReplyBindMember | BridgeReplyAck | BridgeReplyObservation | BridgeReplyDelivery | BridgeReplyRetire | BridgeReplyDestroy | BridgeReplySupervisorRotation | BridgeReplyRejected;
2870
+ export interface BridgeReplyBindHost {
2871
+ address: string;
2872
+ binding_generation: number;
2873
+ capabilities: BridgeCapabilities;
2874
+ host_peer_id: string;
2875
+ live_endpoint?: string | null;
2876
+ result: "bind_host";
2877
+ }
2878
+ export interface BridgeReplyHostRebound {
2879
+ binding_generation: number;
2880
+ capabilities: BridgeCapabilities;
2881
+ host_peer_id: string;
2882
+ live_endpoint?: string | null;
2883
+ result: "host_rebound";
2884
+ }
2885
+ export interface BridgeReplyHostRevoked {
2886
+ binding_generation: number;
2887
+ epoch: number;
2888
+ host_peer_id: string;
2889
+ mob_id: string;
2890
+ released_members: string[];
2891
+ result: "host_revoked";
2892
+ }
2893
+ export interface BridgeReplyMemberHistoryPage {
2894
+ generation: number;
2895
+ page: WireMemberHistoryPageBody;
2896
+ result: "member_history_page";
2897
+ }
2898
+ export interface BridgeReplyMemberEventsPage {
2899
+ events: Record<string, unknown>[];
2900
+ fence_token: number;
2901
+ from_seq: number;
2902
+ generation: number;
2903
+ next_seq: number;
2904
+ outcomes_complete: boolean;
2905
+ result: "member_events_page";
2906
+ runtime_incarnation: string;
2907
+ turn_outcomes?: BridgeTurnOutcomeRecord[];
2908
+ watermark: number;
2909
+ }
2910
+ export interface BridgeReplyMemberMaterialized {
2911
+ advertised_address: string;
2912
+ engine_version: string;
2913
+ launch_outcome: "fresh" | "resumed_live" | "resumed_from_snapshot";
2914
+ member_peer_id: string;
2915
+ member_pubkey: string;
2916
+ resolved_auth_binding?: WireAuthBindingRef | null;
2917
+ result: "member_materialized";
2918
+ session_id: string;
2919
+ spec_digest: string;
2920
+ }
2921
+ export interface BridgeReplyMemberReleased {
2922
+ disposal: Record<string, unknown>;
2923
+ result: "member_released";
2924
+ }
2925
+ export interface BridgeReplyHostStatus {
2926
+ capabilities: BridgeCapabilities;
2927
+ members: Record<string, unknown>[];
2928
+ result: "host_status";
2929
+ runtime_incarnation: string;
2930
+ }
2931
+ export interface BridgeReplyMemberLiveChannelOpened {
2932
+ open: Record<string, unknown>;
2933
+ result: "member_live_channel_opened";
2934
+ }
2935
+ export interface BridgeReplyMemberLiveChannelClosed {
2936
+ result: "member_live_channel_closed";
2937
+ status: "closed";
2938
+ }
2939
+ export interface BridgeReplyMemberLiveChannelStatusReport {
2940
+ channel_id: string;
2941
+ result: "member_live_channel_status_report";
2942
+ status: WireLiveAdapterStatus;
2943
+ }
2944
+ export interface BridgeReplyMemberLiveChannelControlled {
2945
+ outcome: BridgeLiveControlOutcome;
2946
+ result: "member_live_channel_controlled";
2947
+ }
2948
+ export interface BridgeReplyMemberOperatorReply {
2949
+ outcome: Record<string, unknown>;
2950
+ request_id: string;
2951
+ result: "member_operator_reply";
2952
+ }
2953
+ export type BridgeReply = BridgeReplyBindMember | BridgeReplyAck | BridgeReplyObservation | BridgeReplyDelivery | BridgeReplyTrackedInputCancelled | BridgeReplyRetire | BridgeReplyDestroy | BridgeReplySupervisorRotationFound | BridgeReplySupervisorRotationNotFound | BridgeReplyRejected | BridgeReplyBindHost | BridgeReplyHostRebound | BridgeReplyHostRevoked | BridgeReplyMemberHistoryPage | BridgeReplyMemberEventsPage | BridgeReplyMemberMaterialized | BridgeReplyMemberReleased | BridgeReplyHostStatus | BridgeReplyMemberLiveChannelOpened | BridgeReplyMemberLiveChannelClosed | BridgeReplyMemberLiveChannelStatusReport | BridgeReplyMemberLiveChannelControlled | BridgeReplyMemberOperatorReply;
2192
2954
  export interface ContentBlockText {
2193
2955
  text: string;
2194
2956
  type: "text";
2195
2957
  }
2196
- export interface ContentBlockImage {
2958
+ export interface ContentBlockImageInline {
2197
2959
  media_type: string;
2198
2960
  type: "image";
2961
+ data: string;
2962
+ source: "inline";
2199
2963
  }
2200
- export interface ContentBlockVideo {
2964
+ export interface ContentBlockImageBlob {
2965
+ media_type: string;
2966
+ type: "image";
2967
+ blob_id: BlobId;
2968
+ source: "blob";
2969
+ }
2970
+ export interface ContentBlockVideoInline {
2201
2971
  duration_ms: number;
2202
2972
  media_type: string;
2203
2973
  type: "video";
2974
+ data: string;
2975
+ source: "inline";
2976
+ }
2977
+ export interface ContentBlockVideoUri {
2978
+ duration_ms: number;
2979
+ media_type: string;
2980
+ type: "video";
2981
+ source: "uri";
2982
+ uri: string;
2204
2983
  }
2205
2984
  export interface ContentBlockStructured {
2206
2985
  data: unknown;
@@ -2211,23 +2990,23 @@ export interface ContentBlockSkillContext {
2211
2990
  text: string;
2212
2991
  type: "skill_context";
2213
2992
  }
2214
- export type ContentBlock = ContentBlockText | ContentBlockImage | ContentBlockVideo | ContentBlockStructured | ContentBlockSkillContext;
2993
+ export type ContentBlock = ContentBlockText | ContentBlockImageInline | ContentBlockImageBlob | ContentBlockVideoInline | ContentBlockVideoUri | ContentBlockStructured | ContentBlockSkillContext;
2215
2994
  export type ContentInput = string | ContentBlock[];
2216
2995
  export interface CommsSendParamsInput {
2217
- allow_self_session?: boolean;
2218
- blocks?: ContentBlock[];
2996
+ allow_self_session?: boolean | null;
2997
+ blocks?: ContentBlock[] | null;
2219
2998
  body: string;
2220
- handling_mode?: HandlingMode;
2999
+ handling_mode?: HandlingMode | null;
2221
3000
  kind: "input";
2222
3001
  session_id: string;
2223
- source?: "tcp" | "uds" | "stdin" | "webhook" | "rpc";
2224
- stream?: "none" | "reserve_interaction";
3002
+ source?: "tcp" | "uds" | "stdin" | "webhook" | "rpc" | null;
3003
+ stream?: "none" | "reserve_interaction" | null;
2225
3004
  }
2226
3005
  export interface CommsSendParamsPeerMessage {
2227
- blocks?: ContentBlock[];
3006
+ blocks?: ContentBlock[] | null;
2228
3007
  body: string;
2229
- content_taint?: SendTaintOverride;
2230
- handling_mode?: HandlingMode;
3008
+ content_taint?: SendTaintOverride | null;
3009
+ handling_mode?: HandlingMode | null;
2231
3010
  kind: "peer_message";
2232
3011
  session_id: string;
2233
3012
  to: PeerId;
@@ -2240,23 +3019,23 @@ export interface CommsSendParamsPeerLifecycle {
2240
3019
  to: PeerId;
2241
3020
  }
2242
3021
  export interface CommsSendParamsPeerRequest {
2243
- blocks?: ContentBlock[];
2244
- content_taint?: SendTaintOverride;
2245
- handling_mode?: HandlingMode;
3022
+ blocks?: ContentBlock[] | null;
3023
+ content_taint?: SendTaintOverride | null;
3024
+ handling_mode?: HandlingMode | null;
2246
3025
  intent: CommsPeerRequestIntent;
2247
3026
  kind: "peer_request";
2248
3027
  params: CommsPeerRequestParams;
2249
3028
  session_id: string;
2250
- stream?: "none" | "reserve_interaction";
3029
+ stream?: "none" | "reserve_interaction" | null;
2251
3030
  to: PeerId;
2252
3031
  }
2253
3032
  export interface CommsSendParamsPeerResponse {
2254
- blocks?: ContentBlock[];
2255
- content_taint?: SendTaintOverride;
2256
- handling_mode?: HandlingMode;
3033
+ blocks?: ContentBlock[] | null;
3034
+ content_taint?: SendTaintOverride | null;
3035
+ handling_mode?: HandlingMode | null;
2257
3036
  in_reply_to: string;
2258
3037
  kind: "peer_response";
2259
- result?: CommsPeerResponseResult;
3038
+ result?: CommsPeerResponseResult | null;
2260
3039
  session_id: string;
2261
3040
  status: "accepted" | "completed" | "failed";
2262
3041
  to: PeerId;
@@ -2305,7 +3084,7 @@ export type SendTaintOverride = {
2305
3084
  } | "undeclared";
2306
3085
  export interface WireRenderMetadata {
2307
3086
  class: "user_prompt" | "peer_message" | "peer_request" | "peer_response" | "external_event" | "flow_step" | "continuation" | "system_notice" | "tool_scope_notice" | "ops_progress";
2308
- salience?: "background" | "normal" | "important" | "urgent";
3087
+ salience?: "background" | "normal" | "important" | "urgent" | null;
2309
3088
  }
2310
3089
  export interface WireTrustedPeerIdentityEd25519PublicKey {
2311
3090
  kind: "ed25519_public_key";
@@ -2326,8 +3105,8 @@ export interface RealtimeAudioFormat {
2326
3105
  sample_rate_hz: number;
2327
3106
  }
2328
3107
  export interface RealtimeCapabilities {
2329
- audio_input_format?: RealtimeAudioFormat;
2330
- audio_output_format?: RealtimeAudioFormat;
3108
+ audio_input_format?: RealtimeAudioFormat | null;
3109
+ audio_output_format?: RealtimeAudioFormat | null;
2331
3110
  input_kinds?: RealtimeInputKind[];
2332
3111
  interrupt_supported: boolean;
2333
3112
  output_kinds?: RealtimeOutputKind[];
@@ -2355,10 +3134,10 @@ export interface RealtimeImageChunk {
2355
3134
  mime_type: string;
2356
3135
  }
2357
3136
  export interface LiveOpenParams {
2358
- seed_max_chars?: number;
3137
+ seed_max_chars?: number | null;
2359
3138
  session_id: string;
2360
- transport?: "websocket" | "webrtc";
2361
- turning_mode?: RealtimeTurningMode;
3139
+ transport?: LiveOpenTransport | null;
3140
+ turning_mode?: RealtimeTurningMode | null;
2362
3141
  }
2363
3142
  export interface WireLiveChannelCapabilities {
2364
3143
  audio_in: boolean;
@@ -2396,7 +3175,7 @@ export interface WireLiveTransportBootstrapWebsocket {
2396
3175
  }
2397
3176
  export interface WireLiveTransportBootstrapWebrtc {
2398
3177
  answer_method: string;
2399
- http_url?: string;
3178
+ http_url?: string | null;
2400
3179
  token: string;
2401
3180
  transport: "webrtc";
2402
3181
  }
@@ -2452,7 +3231,7 @@ export interface WireLiveResponseModalityUnknown {
2452
3231
  export type WireLiveResponseModality = WireLiveResponseModalityAudio | WireLiveResponseModalityText | WireLiveResponseModalityUnknown;
2453
3232
  export interface LiveCommitInputParams {
2454
3233
  channel_id: string;
2455
- response_modality?: WireLiveResponseModality;
3234
+ response_modality?: WireLiveResponseModality | null;
2456
3235
  }
2457
3236
  export type LiveRefreshStatus = "queued";
2458
3237
  export interface LiveRefreshResult {
@@ -2503,20 +3282,20 @@ export interface LiveInputChunkWireVideoFrame {
2503
3282
  export type LiveInputChunkWire = LiveInputChunkWireAudio | LiveInputChunkWireText | LiveInputChunkWireImage | LiveInputChunkWireVideoFrame;
2504
3283
  export interface RealtimeTranscriptEventItemObserved {
2505
3284
  item_id: string;
2506
- previous_item_id?: string;
2507
- response_id?: string;
3285
+ previous_item_id?: string | null;
3286
+ response_id?: string | null;
2508
3287
  role: RealtimeTranscriptRole;
2509
3288
  type: "item_observed";
2510
3289
  }
2511
3290
  export interface RealtimeTranscriptEventItemSkipped {
2512
3291
  item_id: string;
2513
- previous_item_id?: string;
3292
+ previous_item_id?: string | null;
2514
3293
  type: "item_skipped";
2515
3294
  }
2516
3295
  export interface RealtimeTranscriptEventUserTranscriptFinal {
2517
3296
  content_index: number;
2518
3297
  item_id: string;
2519
- previous_item_id?: string;
3298
+ previous_item_id?: string | null;
2520
3299
  text: string;
2521
3300
  type: "user_transcript_final";
2522
3301
  }
@@ -2525,7 +3304,7 @@ export interface RealtimeTranscriptEventAssistantTextDelta {
2525
3304
  delta: string;
2526
3305
  delta_id: string;
2527
3306
  item_id: string;
2528
- previous_item_id?: string;
3307
+ previous_item_id?: string | null;
2529
3308
  response_id: string;
2530
3309
  type: "assistant_text_delta";
2531
3310
  }
@@ -2534,7 +3313,7 @@ export interface RealtimeTranscriptEventAssistantTranscriptDelta {
2534
3313
  delta: string;
2535
3314
  delta_id: string;
2536
3315
  item_id: string;
2537
- previous_item_id?: string;
3316
+ previous_item_id?: string | null;
2538
3317
  response_id: string;
2539
3318
  type: "assistant_transcript_delta";
2540
3319
  }
@@ -2740,56 +3519,56 @@ export interface WireLiveAdapterObservationReady {
2740
3519
  observation: "ready";
2741
3520
  }
2742
3521
  export interface WireLiveAdapterObservationUserTranscriptFinal {
2743
- content_index?: number;
3522
+ content_index?: number | null;
2744
3523
  observation: "user_transcript_final";
2745
- previous_item_id?: string;
2746
- provider_item_id?: string;
3524
+ previous_item_id?: string | null;
3525
+ provider_item_id?: string | null;
2747
3526
  text: string;
2748
3527
  }
2749
3528
  export interface WireLiveAdapterObservationAssistantTextDelta {
2750
- content_index?: number;
3529
+ content_index?: number | null;
2751
3530
  delta: string;
2752
- delta_id?: string;
3531
+ delta_id?: string | null;
2753
3532
  observation: "assistant_text_delta";
2754
- previous_item_id?: string;
2755
- provider_item_id?: string;
2756
- response_id?: string;
3533
+ previous_item_id?: string | null;
3534
+ provider_item_id?: string | null;
3535
+ response_id?: string | null;
2757
3536
  }
2758
3537
  export interface WireLiveAdapterObservationAssistantTranscriptDelta {
2759
- content_index?: number;
3538
+ content_index?: number | null;
2760
3539
  delta: string;
2761
- delta_id?: string;
3540
+ delta_id?: string | null;
2762
3541
  observation: "assistant_transcript_delta";
2763
- previous_item_id?: string;
2764
- provider_item_id?: string;
2765
- response_id?: string;
3542
+ previous_item_id?: string | null;
3543
+ provider_item_id?: string | null;
3544
+ response_id?: string | null;
2766
3545
  }
2767
3546
  export interface WireLiveAdapterObservationAssistantAudioChunk {
2768
3547
  channels: number;
2769
- content_index?: number;
3548
+ content_index?: number | null;
2770
3549
  data: string;
2771
- item_id?: string;
3550
+ item_id?: string | null;
2772
3551
  observation: "assistant_audio_chunk";
2773
- response_id?: string;
3552
+ response_id?: string | null;
2774
3553
  sample_rate_hz: number;
2775
3554
  }
2776
3555
  export interface WireLiveAdapterObservationAssistantTranscriptFinal {
2777
- content_index?: number;
3556
+ content_index?: number | null;
2778
3557
  observation: "assistant_transcript_final";
2779
- previous_item_id?: string;
3558
+ previous_item_id?: string | null;
2780
3559
  provider_item_id: string;
2781
- response_id?: string;
2782
- stop_reason: "end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "content_filter" | "cancelled";
3560
+ response_id?: string | null;
3561
+ stop_reason: WireStopReason;
2783
3562
  text: string;
2784
3563
  usage: Record<string, unknown>;
2785
3564
  }
2786
3565
  export interface WireLiveAdapterObservationAssistantTranscriptTruncated {
2787
- content_index?: number;
3566
+ content_index?: number | null;
2788
3567
  observation: "assistant_transcript_truncated";
2789
- previous_item_id?: string;
2790
- provider_item_id?: string;
2791
- response_id?: string;
2792
- text?: string;
3568
+ previous_item_id?: string | null;
3569
+ provider_item_id?: string | null;
3570
+ response_id?: string | null;
3571
+ text?: string | null;
2793
3572
  }
2794
3573
  export interface WireLiveAdapterObservationRealtimeTranscript {
2795
3574
  event: RealtimeTranscriptEvent;
@@ -2801,7 +3580,7 @@ export interface WireLiveAdapterObservationUserContentCommitted {
2801
3580
  item_id: string;
2802
3581
  media_type: string;
2803
3582
  observation: "user_content_committed";
2804
- previous_item_id?: string;
3583
+ previous_item_id?: string | null;
2805
3584
  }
2806
3585
  export interface WireLiveAdapterObservationToolCallRequested {
2807
3586
  arguments: unknown;
@@ -2811,12 +3590,12 @@ export interface WireLiveAdapterObservationToolCallRequested {
2811
3590
  }
2812
3591
  export interface WireLiveAdapterObservationTurnInterrupted {
2813
3592
  observation: "turn_interrupted";
2814
- response_id?: string;
3593
+ response_id?: string | null;
2815
3594
  }
2816
3595
  export interface WireLiveAdapterObservationTurnCompleted {
2817
3596
  observation: "turn_completed";
2818
- response_id?: string;
2819
- stop_reason: "end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "content_filter" | "cancelled";
3597
+ response_id?: string | null;
3598
+ stop_reason: WireStopReason;
2820
3599
  usage: Record<string, unknown>;
2821
3600
  }
2822
3601
  export interface WireLiveAdapterObservationStatusChanged {
@@ -2839,16 +3618,16 @@ export interface WireLiveAdapterObservationUnknown {
2839
3618
  }
2840
3619
  export type WireLiveAdapterObservation = WireLiveAdapterObservationReady | WireLiveAdapterObservationUserTranscriptFinal | WireLiveAdapterObservationAssistantTextDelta | WireLiveAdapterObservationAssistantTranscriptDelta | WireLiveAdapterObservationAssistantAudioChunk | WireLiveAdapterObservationAssistantTranscriptFinal | WireLiveAdapterObservationAssistantTranscriptTruncated | WireLiveAdapterObservationRealtimeTranscript | WireLiveAdapterObservationUserContentCommitted | WireLiveAdapterObservationToolCallRequested | WireLiveAdapterObservationTurnInterrupted | WireLiveAdapterObservationTurnCompleted | WireLiveAdapterObservationStatusChanged | WireLiveAdapterObservationError | WireLiveAdapterObservationCommandRejected | WireLiveAdapterObservationUnknown;
2841
3620
  export interface RuntimeAcceptResult {
2842
- existing_id?: string;
2843
- input_id?: string;
3621
+ existing_id?: string | null;
3622
+ input_id?: string | null;
2844
3623
  outcome_type: "accepted" | "deduplicated" | "rejected";
2845
- policy?: "stage" | "queue" | "immediate";
2846
- reason?: string;
2847
- state?: Record<string, unknown>;
3624
+ policy?: "stage" | "queue" | "immediate" | null;
3625
+ reason?: string | null;
3626
+ state?: Record<string, unknown> | null;
2848
3627
  }
2849
3628
  export interface WireInputStateHistoryEntry {
2850
3629
  from: "accepted" | "queued" | "staged" | "applied" | "applied_pending_consumption" | "consumed" | "superseded" | "coalesced" | "abandoned";
2851
- reason?: string;
3630
+ reason?: string | null;
2852
3631
  timestamp: string;
2853
3632
  to: "accepted" | "queued" | "staged" | "applied" | "applied_pending_consumption" | "consumed" | "superseded" | "coalesced" | "abandoned";
2854
3633
  }
@@ -2856,17 +3635,17 @@ export interface WireInputState {
2856
3635
  attempt_count?: number;
2857
3636
  created_at: string;
2858
3637
  current_state: "accepted" | "queued" | "staged" | "applied" | "applied_pending_consumption" | "consumed" | "superseded" | "coalesced" | "abandoned";
2859
- durability?: "durable" | "volatile" | "ephemeral";
3638
+ durability?: "durable" | "volatile" | "ephemeral" | null;
2860
3639
  history?: WireInputStateHistoryEntry[];
2861
- idempotency_key?: string;
3640
+ idempotency_key?: string | null;
2862
3641
  input_id: string;
2863
- last_boundary_sequence?: number;
2864
- last_run_id?: string;
2865
- persisted_input?: Record<string, unknown>;
2866
- policy?: "stage" | "queue" | "immediate";
2867
- reconstruction_source?: "live" | "event_store" | "snapshot" | "replay";
3642
+ last_boundary_sequence?: number | null;
3643
+ last_run_id?: string | null;
3644
+ persisted_input?: Record<string, unknown> | null;
3645
+ policy?: "stage" | "queue" | "immediate" | null;
3646
+ reconstruction_source?: "live" | "event_store" | "snapshot" | "replay" | null;
2868
3647
  recovery_count?: number;
2869
- terminal_outcome?: "completed" | "abandoned" | "superseded" | "coalesced" | "cancelled";
3648
+ terminal_outcome?: "completed" | "abandoned" | "superseded" | "coalesced" | "cancelled" | null;
2870
3649
  updated_at: string;
2871
3650
  }
2872
3651
  export interface ScheduleListResult {
@@ -2888,13 +3667,13 @@ export interface WireSessionInfo {
2888
3667
  created_at: number;
2889
3668
  is_active: boolean;
2890
3669
  labels?: Record<string, string>;
2891
- last_assistant_text?: string;
3670
+ last_assistant_text?: string | null;
2892
3671
  message_count: number;
2893
3672
  model: string;
2894
3673
  provider: string;
2895
- resolved_capabilities?: WireResolvedModelCapabilities;
3674
+ resolved_capabilities?: WireResolvedModelCapabilities | null;
2896
3675
  session_id: string;
2897
- session_ref?: string;
3676
+ session_ref?: string | null;
2898
3677
  updated_at: number;
2899
3678
  }
2900
3679
  export interface WireSessionSummary {
@@ -2903,19 +3682,22 @@ export interface WireSessionSummary {
2903
3682
  labels?: Record<string, string>;
2904
3683
  message_count: number;
2905
3684
  session_id: string;
2906
- session_ref?: string;
3685
+ session_ref?: string | null;
2907
3686
  total_tokens: number;
2908
3687
  updated_at: number;
2909
3688
  }
2910
3689
  export interface ContractVersion {
3690
+ major: number;
3691
+ minor: number;
3692
+ patch: number;
2911
3693
  }
2912
3694
  export interface CatalogModelEntry {
2913
- context_window?: number;
3695
+ context_window?: number | null;
2914
3696
  display_name: string;
2915
3697
  id: string;
2916
- max_output_tokens?: number;
2917
- profile?: Record<string, unknown>;
2918
- server_id?: string;
3698
+ max_output_tokens?: number | null;
3699
+ profile?: Record<string, unknown> | null;
3700
+ server_id?: string | null;
2919
3701
  tier: "recommended" | "supported";
2920
3702
  }
2921
3703
  export interface ProviderCatalog {
@@ -2943,9 +3725,9 @@ export interface WireModelProfile {
2943
3725
  vision?: boolean;
2944
3726
  }
2945
3727
  export interface WireAssistantImageRef {
2946
- blob_ref: Record<string, unknown>;
3728
+ blob_ref: BlobRef;
2947
3729
  height: number;
2948
- image_id: string;
3730
+ image_id: AssistantImageId;
2949
3731
  media_type: string;
2950
3732
  width: number;
2951
3733
  }
@@ -2968,21 +3750,21 @@ export interface WireGenerateImageExecutionPlan {
2968
3750
  }
2969
3751
  export interface WireImageGenerationToolResult {
2970
3752
  images?: Record<string, unknown>[];
2971
- native_metadata: Record<string, unknown>;
3753
+ native_metadata: ProviderImageMetadata;
2972
3754
  operation_id: string;
2973
3755
  provider_text: Record<string, unknown>;
2974
- revised_prompt: Record<string, unknown>;
3756
+ revised_prompt: RevisedPromptDisposition;
2975
3757
  terminal: Record<string, unknown>;
2976
3758
  warnings?: Record<string, unknown>[];
2977
3759
  }
2978
3760
  export interface WireAuthBindingRef {
2979
3761
  binding: string;
2980
- profile?: string;
3762
+ profile?: string | null;
2981
3763
  realm: string;
2982
3764
  }
2983
3765
  export interface WireBackendProfile {
2984
3766
  backend_kind: string;
2985
- base_url?: string;
3767
+ base_url?: string | null;
2986
3768
  id: string;
2987
3769
  options?: unknown;
2988
3770
  provider: string;
@@ -2997,7 +3779,7 @@ export interface WireProviderBinding {
2997
3779
  allow_auth_override?: boolean;
2998
3780
  auth_profile: string;
2999
3781
  backend_profile: string;
3000
- default_model?: string;
3782
+ default_model?: string | null;
3001
3783
  id: string;
3002
3784
  require_metadata_account?: boolean;
3003
3785
  require_metadata_workspace?: boolean;
@@ -3006,7 +3788,7 @@ export interface WireRealmConnectionSet {
3006
3788
  auth_profiles: Record<string, WireAuthProfile>;
3007
3789
  backends: Record<string, WireBackendProfile>;
3008
3790
  bindings: Record<string, WireProviderBinding>;
3009
- default_binding?: string;
3791
+ default_binding?: string | null;
3010
3792
  realm_id: string;
3011
3793
  }
3012
3794
  export interface WireBindingIdentity {
@@ -3045,13 +3827,13 @@ export interface WireLoginStart {
3045
3827
  export interface WireLoginReady {
3046
3828
  auth_binding: WireAuthBindingRef;
3047
3829
  binding_id: string;
3048
- expires_at?: string;
3830
+ expires_at?: string | null;
3049
3831
  has_refresh_token: boolean;
3050
3832
  profile_id: string;
3051
3833
  provider: string;
3052
3834
  realm_id: string;
3053
3835
  scopes: string[];
3054
- state?: string;
3836
+ state?: string | null;
3055
3837
  }
3056
3838
  export interface WireDeviceStart {
3057
3839
  device_code: string;
@@ -3060,13 +3842,13 @@ export interface WireDeviceStart {
3060
3842
  provider: string;
3061
3843
  user_code: string;
3062
3844
  verification_uri: string;
3063
- verification_uri_complete?: string;
3845
+ verification_uri_complete?: string | null;
3064
3846
  }
3065
3847
  export interface WireRealmSummary {
3066
3848
  auth_profile_count: number;
3067
3849
  backend_count: number;
3068
3850
  binding_count: number;
3069
- default_binding?: string;
3851
+ default_binding?: string | null;
3070
3852
  realm_id: string;
3071
3853
  }
3072
3854
  export interface WireRealmList {
@@ -3079,23 +3861,23 @@ export interface WireAuthProfilesList {
3079
3861
  realm_id: string;
3080
3862
  }
3081
3863
  export interface WireAuthStatus {
3082
- account_id?: string;
3864
+ account_id?: string | null;
3083
3865
  auth_method: string;
3084
- expires_at?: string;
3085
- last_error?: Record<string, unknown>;
3086
- last_refresh_at?: string;
3866
+ expires_at?: string | null;
3867
+ last_error?: Record<string, unknown> | null;
3868
+ last_refresh_at?: string | null;
3087
3869
  profile_id: string;
3088
3870
  provider: string;
3089
3871
  state: "valid" | "expiring" | "expired" | "reauth_required" | "refresh_failed" | "released" | "absent" | "missing_credential";
3090
3872
  }
3091
3873
  export interface WireAuthStatusDetail {
3092
- account_id?: string;
3874
+ account_id?: string | null;
3093
3875
  auth_binding: WireAuthBindingRef;
3094
3876
  auth_method: string;
3095
3877
  binding_id: string;
3096
- expires_at?: string;
3878
+ expires_at?: string | null;
3097
3879
  has_refresh_token: boolean;
3098
- last_refresh_at?: string;
3880
+ last_refresh_at?: string | null;
3099
3881
  profile_id: string;
3100
3882
  provider: string;
3101
3883
  realm_id: string;
@@ -3155,6 +3937,37 @@ export interface WireAuthErrorOther {
3155
3937
  }
3156
3938
  export type WireAuthError = WireAuthErrorMissingSecret | WireAuthErrorUnsupportedCombination | WireAuthErrorMissingRequiredMetadata | WireAuthErrorWorkspaceMismatch | WireAuthErrorExpired | WireAuthErrorStaleCredential | WireAuthErrorRefreshRequired | WireAuthErrorLeaseAbsent | WireAuthErrorUserReauthRequired | WireAuthErrorRefreshFailed | WireAuthErrorResolveRequired | WireAuthErrorInteractiveLoginRequired | WireAuthErrorHostOwnedUnavailable | WireAuthErrorIo | WireAuthErrorOther;
3157
3939
  export type WireProvider = "anthropic" | "openai" | "gemini" | "self_hosted" | "other" | "unknown";
3940
+ export interface WireProviderMetaAnthropic {
3941
+ provider: "anthropic";
3942
+ signature: string;
3943
+ }
3944
+ export interface WireProviderMetaAnthropicRedacted {
3945
+ data: string;
3946
+ provider: "anthropic_redacted";
3947
+ }
3948
+ export interface WireProviderMetaAnthropicCompaction {
3949
+ content: string;
3950
+ provider: "anthropic_compaction";
3951
+ }
3952
+ export interface WireProviderMetaGemini {
3953
+ provider: "gemini";
3954
+ thoughtSignature: string;
3955
+ }
3956
+ export interface WireProviderMetaOpenAi {
3957
+ encrypted_content?: string | null;
3958
+ id: string;
3959
+ phase?: string | null;
3960
+ provider: "open_ai";
3961
+ response_id?: string | null;
3962
+ }
3963
+ export interface WireProviderMetaOpenAiResponse {
3964
+ provider: "open_ai_response";
3965
+ response_id: string;
3966
+ }
3967
+ export interface WireProviderMetaUnknown {
3968
+ provider: "unknown";
3969
+ }
3970
+ export type WireProviderMeta = WireProviderMetaAnthropic | WireProviderMetaAnthropicRedacted | WireProviderMetaAnthropicCompaction | WireProviderMetaGemini | WireProviderMetaOpenAi | WireProviderMetaOpenAiResponse | WireProviderMetaUnknown;
3158
3971
  export interface WireTranscriptSourceSpoken {
3159
3972
  kind: "spoken";
3160
3973
  }
@@ -3166,14 +3979,14 @@ export type WireTranscriptSource = WireTranscriptSourceSpoken | WireTranscriptSo
3166
3979
  export interface WireAssistantBlockText {
3167
3980
  block_type: "text";
3168
3981
  data: {
3169
- meta?: Record<string, unknown>;
3982
+ meta?: WireProviderMeta | null;
3170
3983
  text: string;
3171
3984
  };
3172
3985
  }
3173
3986
  export interface WireAssistantBlockTranscript {
3174
3987
  block_type: "transcript";
3175
3988
  data: {
3176
- meta?: Record<string, unknown>;
3989
+ meta?: WireProviderMeta | null;
3177
3990
  source: WireTranscriptSource;
3178
3991
  text: string;
3179
3992
  };
@@ -3181,7 +3994,7 @@ export interface WireAssistantBlockTranscript {
3181
3994
  export interface WireAssistantBlockReasoning {
3182
3995
  block_type: "reasoning";
3183
3996
  data: {
3184
- meta?: Record<string, unknown>;
3997
+ meta?: WireProviderMeta | null;
3185
3998
  text?: string;
3186
3999
  };
3187
4000
  }
@@ -3190,7 +4003,7 @@ export interface WireAssistantBlockToolUse {
3190
4003
  data: {
3191
4004
  args: unknown;
3192
4005
  id: string;
3193
- meta?: Record<string, unknown>;
4006
+ meta?: WireProviderMeta | null;
3194
4007
  name: string;
3195
4008
  };
3196
4009
  }
@@ -3198,20 +4011,20 @@ export interface WireAssistantBlockServerToolContent {
3198
4011
  block_type: "server_tool_content";
3199
4012
  data: {
3200
4013
  content: unknown;
3201
- id?: string;
3202
- kind: Record<string, unknown>;
3203
- meta?: Record<string, unknown>;
4014
+ id?: string | null;
4015
+ kind: WireServerToolKind;
4016
+ meta?: WireProviderMeta | null;
3204
4017
  };
3205
4018
  }
3206
4019
  export interface WireAssistantBlockImage {
3207
4020
  block_type: "image";
3208
4021
  data: {
3209
- blob_ref: Record<string, unknown>;
4022
+ blob_ref: BlobRef;
3210
4023
  height: number;
3211
- image_id: string;
4024
+ image_id: AssistantImageId;
3212
4025
  media_type: string;
3213
- meta: Record<string, unknown>;
3214
- revised_prompt: Record<string, unknown>;
4026
+ meta: ProviderImageMetadata;
4027
+ revised_prompt: RevisedPromptDisposition;
3215
4028
  width: number;
3216
4029
  };
3217
4030
  }
@@ -3219,6 +4032,213 @@ export interface WireAssistantBlockUnknown {
3219
4032
  block_type: "unknown";
3220
4033
  }
3221
4034
  export type WireAssistantBlock = WireAssistantBlockText | WireAssistantBlockTranscript | WireAssistantBlockReasoning | WireAssistantBlockToolUse | WireAssistantBlockServerToolContent | WireAssistantBlockImage | WireAssistantBlockUnknown;
4035
+ export interface TranscriptRewriteReason {
4036
+ kind: string;
4037
+ note?: string | null;
4038
+ }
4039
+ export interface CompactionRewriteRange {
4040
+ end: number;
4041
+ start: number;
4042
+ }
4043
+ export interface TranscriptEditRewriteRange {
4044
+ end: number;
4045
+ start: number;
4046
+ }
4047
+ export interface TranscriptRewriteSelectionMessageRange {
4048
+ end: number;
4049
+ start: number;
4050
+ type: "message_range";
4051
+ }
4052
+ export interface TranscriptRewriteSelectionEditMessageRange {
4053
+ range: TranscriptEditRewriteRange;
4054
+ type: "edit_message_range";
4055
+ }
4056
+ export interface TranscriptRewriteSelectionCompactionMessageRange {
4057
+ range: CompactionRewriteRange;
4058
+ type: "compaction_message_range";
4059
+ }
4060
+ export type TranscriptRewriteSelection = TranscriptRewriteSelectionMessageRange | TranscriptRewriteSelectionEditMessageRange | TranscriptRewriteSelectionCompactionMessageRange;
4061
+ export type BackgroundJobTerminalStatus = "completed" | "failed" | "aborted" | "cancelled" | "retired" | "terminated";
4062
+ export type CommsNoticeKind = string;
4063
+ export type SystemNoticeDirection = "incoming" | "outgoing" | "internal";
4064
+ export interface SystemNoticeBlockComms {
4065
+ content?: ContentBlock[];
4066
+ direction: SystemNoticeDirection;
4067
+ intent?: string | null;
4068
+ kind: CommsNoticeKind;
4069
+ payload?: unknown;
4070
+ peer?: SystemNoticePeer | null;
4071
+ request_id?: string | null;
4072
+ sender_taint?: SenderContentTaint | null;
4073
+ status?: string | null;
4074
+ summary?: string | null;
4075
+ type: "comms";
4076
+ }
4077
+ export interface SystemNoticeBlockExternalEvent {
4078
+ body?: string | null;
4079
+ content?: ContentBlock[];
4080
+ event_type: string;
4081
+ payload?: unknown;
4082
+ source: string;
4083
+ summary?: string | null;
4084
+ type: "external_event";
4085
+ }
4086
+ export interface SystemNoticeBlockToolConfig {
4087
+ payload: ToolConfigChangedPayload;
4088
+ type: "tool_config";
4089
+ }
4090
+ export interface SystemNoticeBlockMcp {
4091
+ detail?: string | null;
4092
+ operation?: ToolConfigChangeOperation | null;
4093
+ pending_sources?: string[];
4094
+ persisted?: boolean;
4095
+ phase?: ExternalToolDeltaPhase | null;
4096
+ server_id?: string | null;
4097
+ type: "mcp";
4098
+ }
4099
+ export interface SystemNoticeBlockBackgroundJob {
4100
+ detail?: string | null;
4101
+ display_name?: string | null;
4102
+ job_id: string;
4103
+ status: BackgroundJobTerminalStatus;
4104
+ type: "background_job";
4105
+ }
4106
+ export interface SystemNoticeBlockAuth {
4107
+ binding?: string | null;
4108
+ detail?: string | null;
4109
+ state: string;
4110
+ type: "auth";
4111
+ }
4112
+ export interface SystemNoticeBlockRuntimeNotice {
4113
+ category: string;
4114
+ detail?: string | null;
4115
+ payload?: unknown;
4116
+ type: "runtime_notice";
4117
+ }
4118
+ export interface SystemNoticeBlockUnknown {
4119
+ payload?: unknown;
4120
+ summary?: string | null;
4121
+ type: "unknown";
4122
+ }
4123
+ export type SystemNoticeBlock = SystemNoticeBlockComms | SystemNoticeBlockExternalEvent | SystemNoticeBlockToolConfig | SystemNoticeBlockMcp | SystemNoticeBlockBackgroundJob | SystemNoticeBlockAuth | SystemNoticeBlockRuntimeNotice | SystemNoticeBlockUnknown;
4124
+ export type SystemNoticeKind = "generic" | "comms" | "external_event" | "mcp_pending" | "mcp" | "background_job" | "tool_scope" | "tool_scope_warning" | "auth_reauth_required";
4125
+ export type TranscriptUserRole = "conversational" | "compaction_summary" | "injected_context";
4126
+ export type AssistantImageId = string;
4127
+ export interface BlobRef {
4128
+ blob_id: BlobId;
4129
+ media_type: string;
4130
+ }
4131
+ export interface GeminiImageMetadata {
4132
+ continuity_ref?: string | null;
4133
+ response_id?: string | null;
4134
+ target_model: string;
4135
+ }
4136
+ export interface OpenAiImageMetadata {
4137
+ image_generation_call_id?: string | null;
4138
+ response_id?: string | null;
4139
+ target_model: string;
4140
+ }
4141
+ export interface ProviderImageMetadataNotEmitted {
4142
+ provider: "not_emitted";
4143
+ }
4144
+ export interface ProviderImageMetadataOpenai {
4145
+ image_generation_call_id?: string | null;
4146
+ response_id?: string | null;
4147
+ target_model: string;
4148
+ provider: "openai";
4149
+ }
4150
+ export interface ProviderImageMetadataGemini {
4151
+ continuity_ref?: string | null;
4152
+ response_id?: string | null;
4153
+ target_model: string;
4154
+ provider: "gemini";
4155
+ }
4156
+ export type ProviderImageMetadata = ProviderImageMetadataNotEmitted | ProviderImageMetadataOpenai | ProviderImageMetadataGemini;
4157
+ export interface PromptText {
4158
+ content: string;
4159
+ }
4160
+ export type RevisedPromptSource = "provider" | "meerkat_projection";
4161
+ export interface RevisedPromptDispositionNotRequested {
4162
+ disposition: "not_requested";
4163
+ }
4164
+ export interface RevisedPromptDispositionUnsupportedByBackend {
4165
+ disposition: "unsupported_by_backend";
4166
+ }
4167
+ export interface RevisedPromptDispositionUnchanged {
4168
+ disposition: "unchanged";
4169
+ }
4170
+ export interface RevisedPromptDispositionRevised {
4171
+ disposition: "revised";
4172
+ source: RevisedPromptSource;
4173
+ text: PromptText;
4174
+ }
4175
+ export type RevisedPromptDisposition = RevisedPromptDispositionNotRequested | RevisedPromptDispositionUnsupportedByBackend | RevisedPromptDispositionUnchanged | RevisedPromptDispositionRevised;
4176
+ export interface WireServerToolKindWebSearch {
4177
+ kind: "web_search";
4178
+ }
4179
+ export interface WireServerToolKindGoogleSearch {
4180
+ kind: "google_search";
4181
+ }
4182
+ export interface WireServerToolKindProviderNative {
4183
+ kind: "provider_native";
4184
+ name: string;
4185
+ }
4186
+ export interface WireServerToolKindUnknown {
4187
+ debug: string;
4188
+ kind: "unknown";
4189
+ }
4190
+ export type WireServerToolKind = WireServerToolKindWebSearch | WireServerToolKindGoogleSearch | WireServerToolKindProviderNative | WireServerToolKindUnknown;
4191
+ export interface TranscriptRewriteMessageSystem {
4192
+ content: string;
4193
+ created_at?: string | null;
4194
+ role: "system";
4195
+ }
4196
+ export interface TranscriptRewriteMessageSystemNotice {
4197
+ blocks?: SystemNoticeBlock[];
4198
+ body?: string | null;
4199
+ created_at?: string | null;
4200
+ kind: SystemNoticeKind;
4201
+ role: "system_notice";
4202
+ }
4203
+ export interface TranscriptRewriteMessageUser {
4204
+ content: WireContentInput;
4205
+ created_at?: string | null;
4206
+ role: "user";
4207
+ transcript_role?: TranscriptUserRole;
4208
+ }
4209
+ export interface TranscriptRewriteMessageBlockAssistant {
4210
+ blocks: WireAssistantBlock[];
4211
+ created_at?: string | null;
4212
+ role: "block_assistant";
4213
+ stop_reason?: WireStopReason;
4214
+ }
4215
+ export interface TranscriptRewriteMessageToolResults {
4216
+ created_at?: string | null;
4217
+ results: WireToolResult[];
4218
+ role: "tool_results";
4219
+ }
4220
+ export type TranscriptRewriteMessage = TranscriptRewriteMessageSystem | TranscriptRewriteMessageSystemNotice | TranscriptRewriteMessageUser | TranscriptRewriteMessageBlockAssistant | TranscriptRewriteMessageToolResults;
4221
+ export interface WireTranscriptReplacementMessage {
4222
+ message: TranscriptRewriteMessage;
4223
+ type: "message";
4224
+ }
4225
+ export interface WireTranscriptReplacementUserContentBlock {
4226
+ block: WireContentBlock;
4227
+ block_index: number;
4228
+ type: "user_content_block";
4229
+ }
4230
+ export interface WireTranscriptReplacementAssistantBlock {
4231
+ block: WireAssistantBlock;
4232
+ block_index: number;
4233
+ type: "assistant_block";
4234
+ }
4235
+ export interface WireTranscriptReplacementToolResultContentBlock {
4236
+ block: WireContentBlock;
4237
+ block_index: number;
4238
+ result_index: number;
4239
+ type: "tool_result_content_block";
4240
+ }
4241
+ export type WireTranscriptReplacement = WireTranscriptReplacementMessage | WireTranscriptReplacementUserContentBlock | WireTranscriptReplacementAssistantBlock | WireTranscriptReplacementToolResultContentBlock;
3222
4242
  export interface WireImageOperationPhaseRequested {
3223
4243
  phase: "requested";
3224
4244
  }
@@ -3258,6 +4278,41 @@ export interface WireImageOperationPhaseTerminal {
3258
4278
  terminal: Record<string, unknown>;
3259
4279
  }
3260
4280
  export type WireImageOperationPhase = WireImageOperationPhaseRequested | WireImageOperationPhaseValidating | WireImageOperationPhaseAwaitingApproval | WireImageOperationPhasePlanResolved | WireImageOperationPhaseProjectionSnapshotted | WireImageOperationPhaseScopedOverrideActive | WireImageOperationPhaseProviderCallInFlight | WireImageOperationPhaseProviderResultCaptured | WireImageOperationPhaseBlobCommitPending | WireImageOperationPhaseResultCommitted | WireImageOperationPhaseRestoringScopedOverride | WireImageOperationPhaseTerminal;
4281
+ export interface WireSessionMessageSystem {
4282
+ content: string;
4283
+ created_at: string;
4284
+ role: "system";
4285
+ }
4286
+ export interface WireSessionMessageSystemNotice {
4287
+ blocks?: SystemNoticeBlock[];
4288
+ body?: string | null;
4289
+ created_at: string;
4290
+ kind: SystemNoticeKind;
4291
+ role: "system_notice";
4292
+ }
4293
+ export interface WireSessionMessageUser {
4294
+ content: WireContentInput;
4295
+ created_at: string;
4296
+ interaction_id?: string | null;
4297
+ role: "user";
4298
+ run_id?: RunId | null;
4299
+ transcript_role?: TranscriptUserRole;
4300
+ }
4301
+ export interface WireSessionMessageBlockAssistant {
4302
+ blocks: WireAssistantBlock[];
4303
+ created_at: string;
4304
+ interaction_id?: string | null;
4305
+ role: "block_assistant";
4306
+ run_id?: RunId | null;
4307
+ stop_reason: WireStopReason;
4308
+ }
4309
+ export interface WireSessionMessageToolResults {
4310
+ created_at: string;
4311
+ results: WireToolResult[];
4312
+ role: "tool_results";
4313
+ }
4314
+ export type WireSessionMessage = WireSessionMessageSystem | WireSessionMessageSystemNotice | WireSessionMessageUser | WireSessionMessageBlockAssistant | WireSessionMessageToolResults;
4315
+ export type WireHistoryRow = WireSessionMessage;
3261
4316
  /** Fail-closed wire parser for WorkItem (K21): throws MeerkatError(INVALID_RESPONSE). */
3262
4317
  export declare function parseWorkItem(value: unknown): WorkItem;
3263
4318
  /** Fail-closed wire parser for WorkEdge (K21): throws MeerkatError(INVALID_RESPONSE). */