@rkat/sdk 0.5.2 → 0.6.1

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.5.2";
1
+ export declare const CONTRACT_VERSION = "0.6.1";
2
2
  export interface WireUsage {
3
3
  input_tokens: number;
4
4
  output_tokens: number;
@@ -13,7 +13,13 @@ export interface WireRunResult {
13
13
  turns: number;
14
14
  tool_calls: number;
15
15
  usage: WireUsage;
16
+ terminal_cause_kind?: string;
16
17
  structured_output?: unknown;
18
+ extraction_error?: {
19
+ last_output: string;
20
+ attempts: number;
21
+ reason: string;
22
+ };
17
23
  schema_warnings?: Array<{
18
24
  provider: string;
19
25
  path: string;
@@ -24,10 +30,6 @@ export interface WireProviderMeta {
24
30
  provider: string;
25
31
  [key: string]: unknown;
26
32
  }
27
- export interface WireAssistantBlock {
28
- block_type: string;
29
- data: Record<string, unknown>;
30
- }
31
33
  export interface WireToolCall {
32
34
  id: string;
33
35
  name: string;
@@ -40,6 +42,7 @@ export interface WireToolResult {
40
42
  }
41
43
  export interface WireSessionMessage {
42
44
  role: string;
45
+ created_at: string;
43
46
  content?: WireContentInput;
44
47
  tool_calls?: WireToolCall[];
45
48
  stop_reason?: WireStopReason;
@@ -77,12 +80,31 @@ export interface CommsParams {
77
80
  }
78
81
  export interface SkillsParams {
79
82
  skills_enabled: boolean;
80
- skill_references: string[];
83
+ skill_refs: Array<{
84
+ source_uuid: string;
85
+ skill_name: string;
86
+ }>;
87
+ }
88
+ export interface McpStdioConfig {
89
+ args?: string[];
90
+ command: string;
91
+ env?: Record<string, string>;
81
92
  }
93
+ export interface McpHttpConfig {
94
+ headers?: Record<string, string>;
95
+ transport?: McpHttpTransport;
96
+ url: string;
97
+ }
98
+ export type McpServerConfig = ({
99
+ name: string;
100
+ connect_timeout_secs?: number;
101
+ } & McpStdioConfig) | ({
102
+ name: string;
103
+ connect_timeout_secs?: number;
104
+ } & McpHttpConfig);
82
105
  export interface McpAddParams {
83
106
  persisted?: boolean;
84
- server_config: unknown;
85
- server_name: string;
107
+ server_config: McpServerConfig;
86
108
  session_id: string;
87
109
  }
88
110
  export interface McpRemoveParams {
@@ -95,6 +117,14 @@ export interface McpReloadParams {
95
117
  server_name?: string;
96
118
  session_id: string;
97
119
  }
120
+ export interface McpLiveOpResponse {
121
+ applied_at_turn?: number;
122
+ operation: "add" | "remove" | "reload";
123
+ persisted: boolean;
124
+ server_name?: string;
125
+ session_id: string;
126
+ status: "staged" | "applied" | "rejected";
127
+ }
98
128
  export interface MobWireParams {
99
129
  member: string;
100
130
  mob_id: string;
@@ -113,31 +143,706 @@ export interface MobUnwireParams {
113
143
  external: WireTrustedPeerSpec;
114
144
  };
115
145
  }
116
- export interface RuntimeStateParams {
117
- session_id: string;
146
+ export interface MobIdParams {
147
+ mob_id: string;
118
148
  }
119
- export interface RuntimeAcceptParams {
120
- input: unknown;
121
- session_id: string;
149
+ export interface MobMemberParams {
150
+ agent_identity: string;
151
+ mob_id: string;
152
+ }
153
+ export interface MobCreateParams {
154
+ definition: MobDefinitionInput;
155
+ }
156
+ export interface MobCreateResult {
157
+ mob_id: string;
158
+ }
159
+ export interface MobListResult {
160
+ mobs: Record<string, unknown>[];
161
+ }
162
+ export interface MobStatusResult {
163
+ mob_id: string;
164
+ status: string;
165
+ }
166
+ export interface MobLifecycleParams {
167
+ action: "stop" | "resume" | "complete" | "reset" | "destroy";
168
+ mob_id: string;
169
+ }
170
+ export interface MobLifecycleResult {
171
+ action: "stop" | "resume" | "complete" | "reset" | "destroy";
172
+ destroy_report?: unknown;
173
+ mob_id: string;
174
+ ok: boolean;
175
+ }
176
+ export interface MobSpawnParams {
177
+ additional_instructions?: string[];
178
+ agent_identity: string;
179
+ auth_binding?: WireAuthBindingRef;
180
+ auto_wire_parent?: boolean;
181
+ backend?: WireMobBackendKind;
182
+ binding?: WireRuntimeBinding;
183
+ budget_split_policy?: WireBudgetSplitPolicy;
184
+ context?: unknown;
185
+ inherited_tool_filter?: WireToolFilter;
186
+ initial_message?: WireContentInput;
187
+ labels?: Record<string, string>;
188
+ launch_mode?: WireMemberLaunchMode;
189
+ mob_id: string;
190
+ override_profile?: WireMobProfile;
191
+ profile: string;
192
+ runtime_mode?: WireMobRuntimeMode;
193
+ shell_env?: Record<string, string>;
194
+ tool_access_policy?: WireToolAccessPolicy;
195
+ }
196
+ export interface MobSpawnResult {
197
+ agent_identity: string;
198
+ member_ref: WireMemberRef;
199
+ mob_id: string;
200
+ }
201
+ export interface MobSpawnSpecParams {
202
+ additional_instructions?: string[];
203
+ agent_identity: string;
204
+ auth_binding?: WireAuthBindingRef;
205
+ backend?: WireMobBackendKind;
206
+ context?: unknown;
207
+ initial_message?: WireContentInput;
208
+ labels?: Record<string, string>;
209
+ profile: string;
210
+ runtime_mode?: WireMobRuntimeMode;
211
+ }
212
+ export interface MobSpawnManyParams {
213
+ mob_id: string;
214
+ specs: MobSpawnSpecParams[];
215
+ }
216
+ export interface MobSpawnManyResult {
217
+ results: MobSpawnManyResultEntry[];
218
+ }
219
+ export interface MobSpawnManyResultEntry {
220
+ result: MobSpawnManyResultPayload;
221
+ status: MobSpawnManyResultStatus;
222
+ }
223
+ export interface MobSpawnManySpawnedResult {
224
+ agent_identity: string;
225
+ member_ref: WireMemberRef;
226
+ }
227
+ export interface MobSpawnManyFailedResult {
228
+ cause: MobSpawnManyFailureCause;
229
+ message: string;
230
+ }
231
+ export interface MobSpawnReceiptWire {
232
+ agent_identity: string;
233
+ member_ref: WireMemberRef;
234
+ }
235
+ export interface MobMemberListEntryWire {
236
+ agent_identity: string;
237
+ error?: string;
238
+ is_final: boolean;
239
+ labels?: Record<string, string>;
240
+ member_ref: WireMemberRef;
241
+ role: string;
242
+ runtime_mode: WireMobRuntimeMode;
243
+ state: WireMemberState;
244
+ status: WireMobMemberStatus;
245
+ wired_to?: string[];
246
+ }
247
+ export interface WireMobToolConfig {
248
+ builtins?: boolean;
249
+ comms?: boolean;
250
+ image_generation?: boolean;
251
+ mcp?: string[];
252
+ memory?: boolean;
253
+ mob?: boolean;
254
+ mob_tasks?: boolean;
255
+ schedule?: boolean;
256
+ shell?: boolean;
257
+ }
258
+ export interface WireMobProfile {
259
+ backend?: WireMobBackendKind;
260
+ external_addressable?: boolean;
261
+ max_inline_peer_notifications?: number;
262
+ model: string;
263
+ output_schema?: unknown;
264
+ peer_description?: string;
265
+ provider_params?: unknown;
266
+ runtime_mode?: WireMobRuntimeMode;
267
+ skills?: string[];
268
+ tools?: WireMobToolConfig;
269
+ }
270
+ export interface MobEnsureMemberParams {
271
+ mob_id: string;
272
+ spec: MobMemberSpecWire;
273
+ }
274
+ export interface MobEnsureMemberResult {
275
+ outcome: {
276
+ spawned: MobSpawnReceiptWire;
277
+ } | {
278
+ existed: MobMemberListEntryWire;
279
+ };
280
+ }
281
+ export interface MobReconcileParams {
282
+ desired?: MobMemberSpecWire[];
283
+ mob_id: string;
284
+ options?: MobReconcileOptionsWire;
285
+ }
286
+ export interface MobReconcileResult {
287
+ report: MobReconcileReportWire;
288
+ }
289
+ export interface MobListMembersMatchingParams {
290
+ filter?: Record<string, unknown>;
291
+ mob_id: string;
292
+ }
293
+ export interface MobListMembersMatchingResult {
294
+ members?: unknown[];
295
+ }
296
+ export interface MobRetireResult {
297
+ retired: boolean;
298
+ }
299
+ export interface MobRespawnParams {
300
+ agent_identity: string;
301
+ initial_message?: WireContentInput;
302
+ mob_id: string;
303
+ }
304
+ export interface MobRespawnResult {
305
+ failed_peer_ids?: string[];
306
+ receipt: Record<string, unknown>;
307
+ status: string;
308
+ }
309
+ export interface MobWireResult {
310
+ wired: boolean;
311
+ }
312
+ export interface MobUnwireResult {
313
+ unwired: boolean;
314
+ }
315
+ export interface MobMembersResult {
316
+ members: MobMemberListEntryWire[];
317
+ mob_id: string;
318
+ }
319
+ export interface MobEventsParams {
320
+ after_cursor?: number;
321
+ limit?: number;
322
+ mob_id: string;
323
+ strict?: boolean;
324
+ }
325
+ export interface MobEventsResult {
326
+ events: unknown[];
327
+ }
328
+ export interface MobMemberSendParams {
329
+ agent_identity: string;
330
+ content: WireContentInput;
331
+ handling_mode?: "queue" | "steer";
332
+ mob_id: string;
333
+ render_metadata?: Record<string, unknown>;
334
+ }
335
+ export interface MobMemberSendResult {
336
+ agent_identity: string;
337
+ handling_mode: "queue" | "steer";
338
+ member_ref: WireMemberRef;
339
+ mob_id: string;
340
+ }
341
+ export interface MobIngressInteractionParams {
342
+ content: WireContentInput;
343
+ handling_mode?: "queue" | "steer";
344
+ mob_id: string;
345
+ render_metadata?: Record<string, unknown>;
346
+ spec: MobMemberSpecWire;
347
+ }
348
+ export interface MobIngressInteractionResult {
349
+ agent_identity: string;
350
+ delivery: Record<string, unknown>;
351
+ ensure_outcome: {
352
+ spawned: MobSpawnReceiptWire;
353
+ } | {
354
+ existed: MobMemberListEntryWire;
355
+ };
356
+ events_after_cursor: number;
357
+ latest_event_cursor: number;
358
+ member_ref: WireMemberRef;
359
+ mob_id: string;
360
+ }
361
+ export interface MobAppendSystemContextParams {
362
+ agent_identity: string;
363
+ idempotency_key?: string;
364
+ mob_id: string;
365
+ source?: string;
366
+ text: string;
367
+ }
368
+ export interface MobAppendSystemContextResult {
369
+ agent_identity: string;
370
+ mob_id: string;
371
+ status: string;
372
+ }
373
+ export interface MobFlowsResult {
374
+ flows: string[];
375
+ mob_id: string;
376
+ }
377
+ export interface MobFlowRunParams {
378
+ flow_id: string;
379
+ mob_id: string;
380
+ params?: unknown;
381
+ }
382
+ export interface MobFlowRunResult {
383
+ run_id: string;
384
+ }
385
+ export interface MobFlowStatusParams {
386
+ mob_id: string;
387
+ run_id: string;
388
+ }
389
+ export interface MobFlowStatusResult {
390
+ run: unknown;
391
+ }
392
+ export interface MobFlowCancelParams {
393
+ mob_id: string;
394
+ run_id: string;
395
+ }
396
+ export interface MobFlowCancelResult {
397
+ canceled: boolean;
398
+ }
399
+ export interface MobSpawnHelperParams {
400
+ agent_identity?: string;
401
+ backend?: WireMobBackendKind;
402
+ mob_id: string;
403
+ prompt: string;
404
+ role_name?: string;
405
+ runtime_mode?: WireMobRuntimeMode;
406
+ }
407
+ export interface MobForkHelperParams {
408
+ agent_identity?: string;
409
+ backend?: WireMobBackendKind;
410
+ fork_context?: unknown;
411
+ mob_id: string;
412
+ prompt: string;
413
+ role_name?: string;
414
+ runtime_mode?: WireMobRuntimeMode;
415
+ source_member_id: string;
416
+ }
417
+ export interface MobHelperResult {
418
+ agent_identity: string;
419
+ member_ref: WireMemberRef;
420
+ output?: string;
421
+ tokens_used: number;
422
+ }
423
+ export interface MobForceCancelResult {
424
+ cancelled: boolean;
425
+ }
426
+ export interface MobTurnStartParams {
427
+ additional_instructions?: string[];
428
+ agent_identity: string;
429
+ auth_binding?: WireAuthBindingRef;
430
+ clear_auth_binding?: boolean;
431
+ clear_provider_params?: boolean;
432
+ flow_tool_overlay?: Record<string, unknown>;
433
+ keep_alive?: boolean;
434
+ max_tokens?: number;
435
+ mob_id: string;
436
+ model?: string;
437
+ output_schema?: unknown;
438
+ prompt: WireContentInput;
439
+ provider?: string;
440
+ provider_params?: unknown;
441
+ skill_refs?: Record<string, unknown>[];
442
+ structured_output_retries?: number;
443
+ system_prompt?: string;
444
+ }
445
+ export interface MobMemberStatusResult {
446
+ current_session_id?: string;
447
+ error?: string;
448
+ external_member?: unknown;
449
+ is_final: boolean;
450
+ kickoff?: unknown;
451
+ output_preview?: string;
452
+ peer_connectivity?: unknown;
453
+ realtime_attachment_status?: string;
454
+ status: WireMobMemberStatus;
455
+ tokens_used: number;
456
+ }
457
+ export interface MobSnapshotResult {
458
+ members: unknown[];
459
+ mob_id: string;
460
+ status: string;
122
461
  }
123
- export interface RuntimeRetireParams {
462
+ export interface MobDestroyResult {
463
+ destroy_report: unknown;
464
+ mob_id: string;
465
+ ok: boolean;
466
+ }
467
+ export interface SupervisorRotationReportWire {
468
+ current_epoch: number;
469
+ previous_epoch: number;
470
+ public_peer_id: string;
471
+ }
472
+ export interface MobRotateSupervisorResult {
473
+ mob_id: string;
474
+ ok: boolean;
475
+ report: SupervisorRotationReportWire;
476
+ }
477
+ export interface MobSubmitWorkParams {
478
+ content: WireContentInput;
479
+ member_ref: WireMemberRef;
480
+ origin?: "external" | "internal";
481
+ work_ref?: string;
482
+ }
483
+ export interface MobSubmitWorkResult {
484
+ member_ref: WireMemberRef;
485
+ mob_id: string;
486
+ work_ref: string;
487
+ }
488
+ export interface MobCancelWorkParams {
489
+ mob_id: string;
490
+ work_ref: string;
491
+ }
492
+ export interface MobCancelWorkResult {
493
+ mob_id: string;
494
+ ok: boolean;
495
+ }
496
+ export interface MobCancelAllWorkParams {
497
+ member_ref: WireMemberRef;
498
+ }
499
+ export interface MobCancelAllWorkResult {
500
+ mob_id: string;
501
+ ok: boolean;
502
+ }
503
+ export interface MobWaitParams {
504
+ member_ids?: string[];
505
+ mob_id: string;
506
+ timeout_ms?: number;
507
+ }
508
+ export interface MobWaitMembersResult {
509
+ members: unknown[];
510
+ }
511
+ export interface MobProfileCreateParams {
512
+ name: string;
513
+ profile: MobProfileInput;
514
+ }
515
+ export interface MobProfileNameParams {
516
+ name: string;
517
+ }
518
+ export interface MobProfileLookupResult {
519
+ created_at?: string;
520
+ name: string;
521
+ not_found?: boolean;
522
+ profile?: unknown;
523
+ revision?: number;
524
+ updated_at?: string;
525
+ }
526
+ export interface MobProfileListResult {
527
+ profiles: Record<string, unknown>[];
528
+ }
529
+ export interface MobProfileUpdateParams {
530
+ expected_revision: number;
531
+ name: string;
532
+ profile: MobProfileInput;
533
+ }
534
+ export interface MobProfileDeleteParams {
535
+ expected_revision: number;
536
+ name: string;
537
+ }
538
+ export interface MobProfileDeleteResult {
539
+ deleted_revision: number;
540
+ name: string;
541
+ }
542
+ export interface MobStreamOpenParams {
543
+ agent_identity?: string;
544
+ mob_id: string;
545
+ }
546
+ export interface MobStreamOpenResult {
547
+ opened: boolean;
548
+ stream_id: string;
549
+ }
550
+ export interface MobStreamCloseParams {
551
+ stream_id: string;
552
+ }
553
+ export interface MobStreamCloseResult {
554
+ already_closed: boolean;
555
+ closed: boolean;
556
+ stream_id: string;
557
+ }
558
+ export interface MobDefinitionInput {
559
+ backend?: MobBackendConfigInput;
560
+ event_router?: MobEventRouterConfigInput;
561
+ flows?: Record<string, MobFlowSpecInput>;
562
+ id: string;
563
+ limits?: MobLimitsSpecInput;
564
+ orchestrator?: MobOrchestratorInput;
565
+ profiles: Record<string, MobProfileBindingInput>;
566
+ skills?: Record<string, MobSkillSourceInput>;
567
+ spawn_policy?: MobSpawnPolicyInput;
568
+ supervisor?: MobSupervisorSpecInput;
569
+ topology?: MobTopologySpecInput;
570
+ wiring?: MobWiringRulesInput;
571
+ }
572
+ export interface MobBackendConfigInput {
573
+ default?: WireMobBackendKind;
574
+ external?: MobExternalBackendConfigInput;
575
+ }
576
+ export interface MobEventRouterConfigInput {
577
+ buffer_size?: number;
578
+ exclude_patterns?: string[];
579
+ include_patterns?: string[];
580
+ }
581
+ export interface MobExternalBackendConfigInput {
582
+ address_base: string;
583
+ }
584
+ export interface MobFlowSpecInput {
585
+ description?: string;
586
+ root?: MobFrameSpecInput;
587
+ steps?: Record<string, MobFlowStepInput>;
588
+ }
589
+ export interface MobFlowStepInput {
590
+ allowed_tools?: string[];
591
+ blocked_tools?: string[];
592
+ branch?: string;
593
+ collection_policy?: MobCollectionPolicyInput;
594
+ condition?: MobConditionExprInput;
595
+ depends_on?: string[];
596
+ depends_on_mode?: MobDependencyModeInput;
597
+ dispatch_mode?: MobDispatchModeInput;
598
+ expected_schema_ref?: string;
599
+ message: WireContentInput;
600
+ output_format?: MobStepOutputFormatInput;
601
+ role: string;
602
+ timeout_ms?: number;
603
+ }
604
+ export interface MobFrameSpecInput {
605
+ nodes: Record<string, MobFlowNodeInput>;
606
+ }
607
+ export interface MobLimitsSpecInput {
608
+ cancel_grace_timeout_ms?: number;
609
+ max_active_frames?: number;
610
+ max_active_nodes?: number;
611
+ max_flow_duration_ms?: number;
612
+ max_frame_depth?: number;
613
+ max_orphaned_turns?: number;
614
+ max_step_retries?: number;
615
+ }
616
+ export interface MobOrchestratorInput {
617
+ profile: string;
618
+ }
619
+ export interface MobProfileInput {
620
+ backend?: WireMobBackendKind;
621
+ external_addressable?: boolean;
622
+ max_inline_peer_notifications?: number;
623
+ model: string;
624
+ output_schema?: unknown;
625
+ peer_description?: string;
626
+ provider_params?: unknown;
627
+ runtime_mode?: WireMobRuntimeMode;
628
+ skills?: string[];
629
+ tools?: MobToolConfigInput;
630
+ }
631
+ export interface MobRoleWiringRuleInput {
632
+ a: string;
633
+ b: string;
634
+ }
635
+ export interface MobSupervisorSpecInput {
636
+ escalation_threshold: number;
637
+ role: string;
638
+ }
639
+ export interface MobToolConfigInput {
640
+ builtins?: boolean;
641
+ comms?: boolean;
642
+ image_generation?: boolean;
643
+ mcp?: string[];
644
+ memory?: boolean;
645
+ mob?: boolean;
646
+ mob_tasks?: boolean;
647
+ schedule?: boolean;
648
+ shell?: boolean;
649
+ }
650
+ export interface MobTopologyRuleInput {
651
+ allowed: boolean;
652
+ from_role: string;
653
+ to_role: string;
654
+ }
655
+ export interface MobTopologySpecInput {
656
+ mode: MobPolicyModeInput;
657
+ rules: MobTopologyRuleInput[];
658
+ }
659
+ export interface MobWiringRulesInput {
660
+ auto_wire_orchestrator?: boolean;
661
+ role_wiring?: MobRoleWiringRuleInput[];
662
+ }
663
+ export interface MobMemberSpecWire {
664
+ additional_instructions?: string[];
665
+ agent_identity: string;
666
+ auto_wire_parent?: boolean;
667
+ backend?: WireMobBackendKind;
668
+ binding?: WireRuntimeBinding;
669
+ context?: unknown;
670
+ initial_message?: WireContentInput;
671
+ labels?: Record<string, string>;
672
+ profile: string;
673
+ runtime_mode?: WireMobRuntimeMode;
674
+ }
675
+ export interface MobReconcileOptionsWire {
676
+ retire_stale?: boolean;
677
+ }
678
+ export interface MobReconcileReportWire {
679
+ desired?: string[];
680
+ failures?: MobReconcileFailureWire[];
681
+ retained?: string[];
682
+ retired?: string[];
683
+ spawned?: MobSpawnReceiptWire[];
684
+ }
685
+ export interface MobReconcileFailureWire {
686
+ agent_identity: string;
687
+ error: string;
688
+ stage: WireMobReconcileStage;
689
+ }
690
+ export interface BridgeAck {
691
+ ok: boolean;
692
+ }
693
+ export interface BridgeBindPayload {
694
+ bootstrap_token: BridgeBootstrapToken;
695
+ epoch: number;
696
+ expected_address: string;
697
+ expected_peer_id: string;
698
+ protocol_version: BridgeProtocolVersion;
699
+ supervisor: BridgePeerSpec;
700
+ }
701
+ export interface BridgeBindResponse {
702
+ address: string;
703
+ capabilities: BridgeCapabilities;
704
+ peer_id: string;
705
+ }
706
+ export interface BridgeCapabilities {
707
+ current_protocol_version?: BridgeProtocolVersion;
708
+ default_protocol_version?: BridgeProtocolVersion;
709
+ deliver_member_input?: boolean;
710
+ destroy_member?: boolean;
711
+ hard_cancel_member?: boolean;
712
+ interrupt_member?: boolean;
713
+ observe_member?: boolean;
714
+ retire_member?: boolean;
715
+ supported_protocol_versions?: BridgeProtocolVersion[];
716
+ unwire_member?: boolean;
717
+ wire_member?: boolean;
718
+ }
719
+ export interface BridgeDeliveryPayload {
720
+ content: ContentInput;
721
+ epoch: number;
722
+ handling_mode: HandlingMode;
723
+ input_id: string;
724
+ protocol_version: BridgeProtocolVersion;
725
+ supervisor: BridgePeerSpec;
726
+ }
727
+ export interface BridgeDeliveryResponse {
728
+ canonical_input_id?: string;
729
+ input_id: string;
730
+ outcome: BridgeDeliveryOutcome;
731
+ }
732
+ export interface BridgeDestroyResponse {
733
+ inputs_abandoned: number;
734
+ }
735
+ export interface BridgeHardCancelPayload {
736
+ epoch: number;
737
+ protocol_version: BridgeProtocolVersion;
738
+ reason: string;
739
+ supervisor: BridgePeerSpec;
740
+ }
741
+ export interface BridgeObservationResponse {
742
+ accepting_inputs?: boolean;
743
+ current_run_id?: string;
744
+ last_error?: string;
745
+ observed_at: string;
746
+ peer_connectivity?: BridgePeerConnectivity;
747
+ state: BridgeMemberRuntimeState;
748
+ }
749
+ export interface BridgePeerSpec {
750
+ address: string;
751
+ name: string;
752
+ peer_id: string;
753
+ pubkey?: number[];
754
+ }
755
+ export interface BridgePeerWiringPayload {
756
+ epoch: number;
757
+ peer_spec: BridgePeerSpec;
758
+ protocol_version: BridgeProtocolVersion;
759
+ supervisor: BridgePeerSpec;
760
+ }
761
+ export interface BridgeRetireResponse {
762
+ inputs_abandoned: number;
763
+ inputs_pending_drain: number;
764
+ }
765
+ export interface BridgeSupervisorPayload {
766
+ epoch: number;
767
+ protocol_version: BridgeProtocolVersion;
768
+ supervisor: BridgePeerSpec;
769
+ }
770
+ export interface CommsChecksumTokenParams {
771
+ subject: string;
772
+ }
773
+ export interface CommsChecksumTokenResult {
774
+ request_intent: CommsChecksumTokenResultIntent;
775
+ request_subject: string;
776
+ token: string;
777
+ }
778
+ export interface CommsPeerLifecycleParams {
779
+ description?: string;
780
+ peer: string;
781
+ peer_spec?: BridgePeerSpec;
782
+ role?: string;
783
+ }
784
+ export interface CommsPeersParams {
124
785
  session_id: string;
125
786
  }
126
- export interface RuntimeResetParams {
787
+ export interface PeerAddress {
788
+ endpoint: string;
789
+ transport: PeerTransport;
790
+ }
791
+ export interface PeerCapabilitySet {
792
+ extensions?: Record<string, unknown>;
793
+ version?: number;
794
+ }
795
+ export interface PeerDirectoryEntry {
796
+ address: PeerAddress;
797
+ capabilities: PeerCapabilitySet;
798
+ last_unreachable_reason?: PeerReachabilityReason;
799
+ meta: Record<string, unknown>;
800
+ name: PeerName;
801
+ peer_id: PeerId;
802
+ reachability: PeerReachability;
803
+ sendable_kinds: PeerSendability[];
804
+ source: PeerDirectorySource;
805
+ }
806
+ export interface CommsPeersResult {
807
+ peers: PeerDirectoryEntry[];
808
+ }
809
+ export interface SessionStreamOpenParams {
127
810
  session_id: string;
128
811
  }
129
- export interface InputStateParams {
130
- input_id: string;
812
+ export interface SessionStreamOpenResult {
813
+ opened: boolean;
131
814
  session_id: string;
815
+ stream_id: string;
132
816
  }
133
- export interface InputListParams {
817
+ export interface SessionStreamCloseParams {
818
+ stream_id: string;
819
+ }
820
+ export interface SessionStreamCloseResult {
821
+ already_closed: boolean;
822
+ closed: boolean;
823
+ stream_id: string;
824
+ }
825
+ export interface RuntimeRealtimeAttachmentStatusParams {
134
826
  session_id: string;
135
827
  }
828
+ export interface RealtimeOpenRequest {
829
+ channel_config?: RealtimeChannelConfig;
830
+ reconnect_policy?: RealtimeReconnectPolicy;
831
+ role: RealtimeChannelRole;
832
+ target: RealtimeChannelTarget;
833
+ turning_mode: RealtimeTurningMode;
834
+ }
835
+ export interface RealtimeStatusParams {
836
+ target: RealtimeChannelTarget;
837
+ }
838
+ export interface RealtimeCapabilitiesParams {
839
+ target: RealtimeChannelTarget;
840
+ }
136
841
  export interface ScheduleIdParams {
137
842
  schedule_id: string;
138
843
  }
139
844
  export interface ListSchedulesParams {
140
- labels?: Record<string, unknown>;
845
+ labels?: Record<string, string>;
141
846
  limit?: number;
142
847
  offset?: number;
143
848
  }
@@ -148,7 +853,7 @@ export interface ScheduleOccurrencesParams {
148
853
  export interface UpdateScheduleParams {
149
854
  description?: string;
150
855
  expected_revision?: number;
151
- labels?: Record<string, unknown>;
856
+ labels?: Record<string, string>;
152
857
  misfire_policy?: Record<string, unknown>;
153
858
  missing_target_policy?: "skip" | "mark_misfired";
154
859
  name?: string;
@@ -159,19 +864,181 @@ export interface UpdateScheduleParams {
159
864
  target?: Record<string, unknown>;
160
865
  trigger?: Record<string, unknown>;
161
866
  }
162
- export interface McpLiveOpResponse {
163
- applied_at_turn?: number;
164
- operation: "add" | "remove" | "reload";
165
- persisted: boolean;
166
- server_name?: string;
167
- session_id: string;
168
- status: "staged" | "applied" | "rejected";
867
+ export interface WireContentBlockText {
868
+ text: string;
869
+ type: "text";
870
+ }
871
+ export interface WireContentBlockImage {
872
+ media_type: string;
873
+ type: "image";
874
+ }
875
+ export interface WireContentBlockVideo {
876
+ duration_ms: number;
877
+ media_type: string;
878
+ type: "video";
879
+ }
880
+ export interface WireContentBlockUnknown {
881
+ type: "unknown";
882
+ }
883
+ export type WireContentBlock = WireContentBlockText | WireContentBlockImage | WireContentBlockVideo | WireContentBlockUnknown;
884
+ export type WireContentInput = string | WireContentBlock[];
885
+ export type WireMemberRef = string;
886
+ export type WireMobBackendKind = "session" | "external";
887
+ export interface WireRuntimeBindingSession {
888
+ kind: "session";
889
+ }
890
+ export interface WireRuntimeBindingExternal {
891
+ address: string;
892
+ bootstrap_token?: BridgeBootstrapToken;
893
+ identity: WireTrustedPeerIdentity;
894
+ kind: "external";
895
+ }
896
+ export type WireRuntimeBinding = WireRuntimeBindingSession | WireRuntimeBindingExternal;
897
+ export interface WireMemberLaunchModeFresh {
898
+ mode: "fresh";
899
+ }
900
+ export interface WireMemberLaunchModeResume {
901
+ bridge_session_id: string;
902
+ mode: "resume";
903
+ }
904
+ export interface WireMemberLaunchModeFork {
905
+ fork_context?: WireForkContext;
906
+ mode: "fork";
907
+ source_member_id: string;
908
+ }
909
+ export type WireMemberLaunchMode = WireMemberLaunchModeFresh | WireMemberLaunchModeResume | WireMemberLaunchModeFork;
910
+ export interface WireForkContextFullHistory {
911
+ type: "full_history";
912
+ }
913
+ export interface WireForkContextLastMessages {
914
+ count: number;
915
+ type: "last_messages";
916
+ }
917
+ export type WireForkContext = WireForkContextFullHistory | WireForkContextLastMessages;
918
+ export interface WireToolAccessPolicyInherit {
919
+ type: "inherit";
169
920
  }
170
- export type InputStateResult = WireInputState | null;
171
- export type WireContentBlock = Record<string, unknown>;
172
- export type WireContentInput = string | Record<string, unknown>[];
921
+ export interface WireToolAccessPolicyAllowList {
922
+ type: "allow_list";
923
+ value: string[];
924
+ }
925
+ export interface WireToolAccessPolicyDenyList {
926
+ type: "deny_list";
927
+ value: string[];
928
+ }
929
+ export type WireToolAccessPolicy = WireToolAccessPolicyInherit | WireToolAccessPolicyAllowList | WireToolAccessPolicyDenyList;
930
+ export interface WireBudgetSplitPolicyEqual {
931
+ type: "equal";
932
+ }
933
+ export interface WireBudgetSplitPolicyProportional {
934
+ type: "proportional";
935
+ }
936
+ export interface WireBudgetSplitPolicyRemaining {
937
+ type: "remaining";
938
+ }
939
+ export interface WireBudgetSplitPolicyFixed {
940
+ type: "fixed";
941
+ value: number;
942
+ }
943
+ export type WireBudgetSplitPolicy = WireBudgetSplitPolicyEqual | WireBudgetSplitPolicyProportional | WireBudgetSplitPolicyRemaining | WireBudgetSplitPolicyFixed;
944
+ export type WireToolFilter = "All" | {
945
+ Allow: string[];
946
+ } | {
947
+ Deny: string[];
948
+ };
949
+ export type WireMemberState = "active" | "retiring";
950
+ export type WireMobMemberStatus = "active" | "retiring" | "broken" | "completed" | "unknown";
951
+ export type WireMobRuntimeMode = "autonomous_host" | "turn_driven";
952
+ export type MobSpawnManyFailureCause = "profile_not_found" | "member_not_found" | "member_already_exists" | "not_externally_addressable" | "invalid_transition" | "wiring_error" | "bridge_command_rejected" | "member_restore_failed" | "kickoff_wait_timed_out" | "ready_wait_timed_out" | "definition_error" | "flow_not_found" | "flow_failed" | "run_not_found" | "run_canceled" | "flow_turn_timed_out" | "frame_depth_limit_exceeded" | "frame_atomic_persistence_unavailable" | "spec_revision_conflict" | "schema_validation" | "insufficient_targets" | "topology_violation" | "bridge_delivery_rejected" | "supervisor_escalation" | "unsupported_for_mode" | "reset_barrier" | "storage_error" | "session_error" | "comms_error" | "callback_pending" | "stale_fence_token" | "stale_event_cursor" | "work_not_found" | "internal";
953
+ export type MobSpawnManyResultStatus = "spawned" | "failed";
954
+ export type MobSpawnManyResultPayload = MobSpawnManySpawnedResult | MobSpawnManyFailedResult;
955
+ export interface MobCollectionPolicyInputAll {
956
+ type: "all";
957
+ }
958
+ export interface MobCollectionPolicyInputAny {
959
+ type: "any";
960
+ }
961
+ export interface MobCollectionPolicyInputQuorum {
962
+ n: number;
963
+ type: "quorum";
964
+ }
965
+ export type MobCollectionPolicyInput = MobCollectionPolicyInputAll | MobCollectionPolicyInputAny | MobCollectionPolicyInputQuorum;
966
+ export interface MobConditionExprInputEq {
967
+ op: "eq";
968
+ path: string;
969
+ value: unknown;
970
+ }
971
+ export interface MobConditionExprInputIn {
972
+ op: "in";
973
+ path: string;
974
+ values: unknown[];
975
+ }
976
+ export interface MobConditionExprInputGt {
977
+ op: "gt";
978
+ path: string;
979
+ value: unknown;
980
+ }
981
+ export interface MobConditionExprInputLt {
982
+ op: "lt";
983
+ path: string;
984
+ value: unknown;
985
+ }
986
+ export interface MobConditionExprInputAnd {
987
+ exprs: MobConditionExprInput[];
988
+ op: "and";
989
+ }
990
+ export interface MobConditionExprInputOr {
991
+ exprs: MobConditionExprInput[];
992
+ op: "or";
993
+ }
994
+ export interface MobConditionExprInputNot {
995
+ expr: MobConditionExprInput;
996
+ op: "not";
997
+ }
998
+ export type MobConditionExprInput = MobConditionExprInputEq | MobConditionExprInputIn | MobConditionExprInputGt | MobConditionExprInputLt | MobConditionExprInputAnd | MobConditionExprInputOr | MobConditionExprInputNot;
999
+ export type MobDependencyModeInput = "all" | "any";
1000
+ export type MobDispatchModeInput = "fan_out" | "one_to_one" | "fan_in";
1001
+ export interface MobFlowNodeInputStep {
1002
+ branch?: string;
1003
+ depends_on?: string[];
1004
+ depends_on_mode?: MobDependencyModeInput;
1005
+ kind: "step";
1006
+ step_id: string;
1007
+ }
1008
+ export interface MobFlowNodeInputRepeatUntil {
1009
+ body: MobFrameSpecInput;
1010
+ depends_on?: string[];
1011
+ depends_on_mode?: MobDependencyModeInput;
1012
+ kind: "repeat_until";
1013
+ loop_id: string;
1014
+ max_iterations: number;
1015
+ until: MobConditionExprInput;
1016
+ }
1017
+ export type MobFlowNodeInput = MobFlowNodeInputStep | MobFlowNodeInputRepeatUntil;
1018
+ export type MobPolicyModeInput = "advisory" | "strict";
1019
+ export type MobProfileBindingInput = Record<string, unknown> | MobProfileInput;
1020
+ export interface MobSkillSourceInputInline {
1021
+ content: string;
1022
+ source: "inline";
1023
+ }
1024
+ export interface MobSkillSourceInputPath {
1025
+ path: string;
1026
+ source: "path";
1027
+ }
1028
+ export type MobSkillSourceInput = MobSkillSourceInputInline | MobSkillSourceInputPath;
1029
+ export interface MobSpawnPolicyInputNone {
1030
+ mode: "none";
1031
+ }
1032
+ export interface MobSpawnPolicyInputAuto {
1033
+ mode: "auto";
1034
+ profile_map: Record<string, string>;
1035
+ }
1036
+ export type MobSpawnPolicyInput = MobSpawnPolicyInputNone | MobSpawnPolicyInputAuto;
1037
+ export type MobStepOutputFormatInput = "json" | "text";
1038
+ export type WireMobReconcileStage = "spawn" | "retire";
173
1039
  export type McpLiveOperation = "add" | "remove" | "reload";
174
1040
  export type McpLiveOpStatus = "staged" | "applied" | "rejected";
1041
+ export type McpHttpTransport = "streamable-http" | "sse";
175
1042
  export type MobPeerTarget = {
176
1043
  local: string;
177
1044
  } | {
@@ -180,45 +1047,634 @@ export type MobPeerTarget = {
180
1047
  export type WireHandlingMode = "queue" | "steer";
181
1048
  export type WireRenderClass = "user_prompt" | "peer_message" | "peer_request" | "peer_response" | "external_event" | "flow_step" | "continuation" | "system_notice" | "tool_scope_notice" | "ops_progress";
182
1049
  export type WireRenderSalience = "background" | "normal" | "important" | "urgent";
183
- export type WireRuntimeState = "initializing" | "idle" | "attached" | "running" | "recovering" | "retired" | "stopped" | "destroyed";
1050
+ export type WireRuntimeState = "initializing" | "idle" | "attached" | "running" | "retired" | "stopped" | "destroyed";
1051
+ export type WireRealtimeAttachmentStatus = "unattached" | "intent_present_unbound" | "binding_not_ready" | "binding_ready" | "replacement_pending" | "reattach_required";
1052
+ export interface RealtimeChannelTargetSessionTarget {
1053
+ session_id: string;
1054
+ type: "session_target";
1055
+ }
1056
+ export interface RealtimeChannelTargetMobMember {
1057
+ agent_identity: string;
1058
+ mob_id: string;
1059
+ type: "mob_member";
1060
+ }
1061
+ export type RealtimeChannelTarget = RealtimeChannelTargetSessionTarget | RealtimeChannelTargetMobMember;
1062
+ export type RealtimeChannelRole = "primary" | "observer";
1063
+ export type RealtimeTurningMode = "provider_managed" | "explicit_commit";
1064
+ export type RealtimeProtocolVersion = "2";
1065
+ export type RealtimeInputKind = "text" | "audio" | "video";
1066
+ export type RealtimeOutputKind = "text" | "audio" | "video";
1067
+ export type RealtimeChannelState = "opening" | "ready" | "interrupted" | "reconnecting" | "closed" | "error";
1068
+ export type RealtimeErrorCode = "invalid_frame" | "expected_channel_open" | "invalid_open_token" | "open_token_expired" | "role_mismatch" | "turning_mode_mismatch" | "unsupported_turning_mode" | "target_busy" | "unsupported_protocol_version" | "audio_format_mismatch" | "unauthorized_realm" | "tool_call_timeout" | "internal_error" | "reconnect_exhausted" | "invalid_target" | "channel_not_bound" | "runtime_internal" | "runtime_not_ready" | "provider_session_closed" | "provider_session_failed" | "provider_session_unavailable" | "unsupported_input_kind" | "no_pending_turn" | "observer_read_only" | "unexpected_channel_open" | "commit_turn_unavailable" | "channel_reconnecting" | "binding_released" | "authentication_failed" | "content_filtered" | "model_not_found" | "invalid_request";
1069
+ export interface RealtimeErrorDetailsAudioFormatMismatch {
1070
+ actual: RealtimeAudioFormat;
1071
+ expected: RealtimeAudioFormat;
1072
+ kind: "audio_format_mismatch";
1073
+ }
1074
+ export interface RealtimeErrorDetailsToolCallTimeout {
1075
+ call_id: string;
1076
+ elapsed_ms: number;
1077
+ timeout_ms: number;
1078
+ kind: "tool_call_timeout";
1079
+ }
1080
+ export interface RealtimeErrorDetailsUnsupportedProtocolVersion {
1081
+ kind: "unsupported_protocol_version";
1082
+ requested: string;
1083
+ supported: RealtimeProtocolVersion[];
1084
+ }
1085
+ export type RealtimeErrorDetails = RealtimeErrorDetailsAudioFormatMismatch | RealtimeErrorDetailsToolCallTimeout | RealtimeErrorDetailsUnsupportedProtocolVersion;
1086
+ export interface RealtimeInputChunkTextChunk {
1087
+ text: string;
1088
+ kind: "text_chunk";
1089
+ }
1090
+ export interface RealtimeInputChunkAudioChunk {
1091
+ channels: number;
1092
+ data: string;
1093
+ mime_type: string;
1094
+ sample_rate_hz: number;
1095
+ kind: "audio_chunk";
1096
+ }
1097
+ export interface RealtimeInputChunkVideoChunk {
1098
+ data: string;
1099
+ mime_type: string;
1100
+ kind: "video_chunk";
1101
+ }
1102
+ export type RealtimeInputChunk = RealtimeInputChunkTextChunk | RealtimeInputChunkAudioChunk | RealtimeInputChunkVideoChunk;
1103
+ export interface RealtimeOutputChunkTextDelta {
1104
+ delta: string;
1105
+ kind: "text_delta";
1106
+ }
1107
+ export interface RealtimeOutputChunkAudioChunk {
1108
+ channels: number;
1109
+ data: string;
1110
+ mime_type: string;
1111
+ sample_rate_hz: number;
1112
+ kind: "audio_chunk";
1113
+ }
1114
+ export interface RealtimeOutputChunkVideoChunk {
1115
+ data: string;
1116
+ mime_type: string;
1117
+ kind: "video_chunk";
1118
+ }
1119
+ export type RealtimeOutputChunk = RealtimeOutputChunkTextDelta | RealtimeOutputChunkAudioChunk | RealtimeOutputChunkVideoChunk;
1120
+ export interface RealtimeEventInputTranscriptPartial {
1121
+ text: string;
1122
+ type: "input_transcript_partial";
1123
+ }
1124
+ export interface RealtimeEventInputTranscriptFinal {
1125
+ prosody_hint?: string;
1126
+ text: string;
1127
+ type: "input_transcript_final";
1128
+ }
1129
+ export interface RealtimeEventTurnStarted {
1130
+ type: "turn_started";
1131
+ }
1132
+ export interface RealtimeEventTurnCommitted {
1133
+ type: "turn_committed";
1134
+ }
1135
+ export interface RealtimeEventTurnCompleted {
1136
+ type: "turn_completed";
1137
+ }
1138
+ export interface RealtimeEventOutputTextDelta {
1139
+ delta: string;
1140
+ type: "output_text_delta";
1141
+ }
1142
+ export interface RealtimeEventOutputAudioChunk {
1143
+ chunk: RealtimeAudioChunk;
1144
+ type: "output_audio_chunk";
1145
+ }
1146
+ export interface RealtimeEventOutputVideoChunk {
1147
+ chunk: RealtimeVideoChunk;
1148
+ type: "output_video_chunk";
1149
+ }
1150
+ export interface RealtimeEventInterrupted {
1151
+ type: "interrupted";
1152
+ }
1153
+ export interface RealtimeEventToolCallRequested {
1154
+ call_id: string;
1155
+ tool_name: string;
1156
+ type: "tool_call_requested";
1157
+ }
1158
+ export interface RealtimeEventToolCallCompleted {
1159
+ call_id: string;
1160
+ type: "tool_call_completed";
1161
+ }
1162
+ export interface RealtimeEventToolCallFailed {
1163
+ call_id: string;
1164
+ error: string;
1165
+ type: "tool_call_failed";
1166
+ }
1167
+ export interface RealtimeEventToolCallTimedOut {
1168
+ call_id: string;
1169
+ elapsed_ms: number;
1170
+ type: "tool_call_timed_out";
1171
+ }
1172
+ export interface RealtimeEventAssistantTranscriptTruncated {
1173
+ audio_played_ms: number;
1174
+ item_id: string;
1175
+ truncated_text?: string;
1176
+ type: "assistant_transcript_truncated";
1177
+ }
1178
+ export interface RealtimeEventStatusChanged {
1179
+ status: RealtimeChannelStatus;
1180
+ type: "status_changed";
1181
+ }
1182
+ export interface RealtimeEventNeedsReattach {
1183
+ type: "needs_reattach";
1184
+ }
1185
+ export type RealtimeEvent = RealtimeEventInputTranscriptPartial | RealtimeEventInputTranscriptFinal | RealtimeEventTurnStarted | RealtimeEventTurnCommitted | RealtimeEventTurnCompleted | RealtimeEventOutputTextDelta | RealtimeEventOutputAudioChunk | RealtimeEventOutputVideoChunk | RealtimeEventInterrupted | RealtimeEventToolCallRequested | RealtimeEventToolCallCompleted | RealtimeEventToolCallFailed | RealtimeEventToolCallTimedOut | RealtimeEventAssistantTranscriptTruncated | RealtimeEventStatusChanged | RealtimeEventNeedsReattach;
1186
+ export interface RealtimeClientFrameChannelOpen {
1187
+ open_token: string;
1188
+ protocol_version: RealtimeProtocolVersion;
1189
+ role: RealtimeChannelRole;
1190
+ turning_mode: RealtimeTurningMode;
1191
+ type: "channel.open";
1192
+ }
1193
+ export interface RealtimeClientFrameChannelInput {
1194
+ chunk: RealtimeInputChunk;
1195
+ type: "channel.input";
1196
+ }
1197
+ export interface RealtimeClientFrameChannelCommitTurn {
1198
+ type: "channel.commit_turn";
1199
+ }
1200
+ export interface RealtimeClientFrameChannelInterrupt {
1201
+ type: "channel.interrupt";
1202
+ }
1203
+ export interface RealtimeClientFrameChannelBargeInTruncate {
1204
+ audio_played_ms: number;
1205
+ content_index: number;
1206
+ item_id: string;
1207
+ type: "channel.barge_in_truncate";
1208
+ }
1209
+ export interface RealtimeClientFrameChannelClose {
1210
+ type: "channel.close";
1211
+ }
1212
+ export type RealtimeClientFrame = RealtimeClientFrameChannelOpen | RealtimeClientFrameChannelInput | RealtimeClientFrameChannelCommitTurn | RealtimeClientFrameChannelInterrupt | RealtimeClientFrameChannelBargeInTruncate | RealtimeClientFrameChannelClose;
1213
+ export interface RealtimeServerFrameChannelOpened {
1214
+ capabilities: RealtimeCapabilities;
1215
+ protocol_version: RealtimeProtocolVersion;
1216
+ role: RealtimeChannelRole;
1217
+ status: RealtimeChannelStatus;
1218
+ type: "channel.opened";
1219
+ }
1220
+ export interface RealtimeServerFrameChannelStatus {
1221
+ status: RealtimeChannelStatus;
1222
+ type: "channel.status";
1223
+ }
1224
+ export interface RealtimeServerFrameChannelEvent {
1225
+ event: RealtimeEvent;
1226
+ type: "channel.event";
1227
+ }
1228
+ export interface RealtimeServerFrameChannelError {
1229
+ code: RealtimeErrorCode;
1230
+ details?: RealtimeErrorDetails;
1231
+ message: string;
1232
+ type: "channel.error";
1233
+ }
1234
+ export interface RealtimeServerFrameChannelClosed {
1235
+ reason?: string;
1236
+ type: "channel.closed";
1237
+ }
1238
+ export type RealtimeServerFrame = RealtimeServerFrameChannelOpened | RealtimeServerFrameChannelStatus | RealtimeServerFrameChannelEvent | RealtimeServerFrameChannelError | RealtimeServerFrameChannelClosed;
184
1239
  export type RuntimeAcceptOutcomeType = "accepted" | "deduplicated" | "rejected";
185
1240
  export type WireInputLifecycleState = "accepted" | "queued" | "staged" | "applied" | "applied_pending_consumption" | "consumed" | "superseded" | "coalesced" | "abandoned";
186
1241
  export type WireStopReason = "end_turn" | "tool_use" | "max_tokens" | "stop_sequence" | "content_filter" | "cancelled";
187
- export type WireToolResultContent = string | Record<string, unknown>[];
188
- export type WireModelTier = string;
1242
+ export type WireToolResultContent = string | WireContentBlock[];
1243
+ export type WireModelTier = "recommended" | "supported";
1244
+ export interface CommsCommandInput {
1245
+ allow_self_session?: boolean;
1246
+ blocks?: ContentBlock[];
1247
+ body: string;
1248
+ handling_mode?: HandlingMode;
1249
+ kind: "input";
1250
+ source?: "tcp" | "uds" | "stdin" | "webhook" | "rpc";
1251
+ stream?: "none" | "reserve_interaction";
1252
+ }
1253
+ export interface CommsCommandPeerMessage {
1254
+ blocks?: ContentBlock[];
1255
+ body: string;
1256
+ handling_mode?: HandlingMode;
1257
+ kind: "peer_message";
1258
+ to: PeerId;
1259
+ }
1260
+ export interface CommsCommandPeerLifecycle {
1261
+ kind: "peer_lifecycle";
1262
+ lifecycle_kind: "mob.peer_added" | "mob.peer_retired" | "mob.peer_unwired";
1263
+ params: CommsPeerLifecycleParams;
1264
+ to: PeerId;
1265
+ }
1266
+ export interface CommsCommandPeerRequest {
1267
+ handling_mode?: HandlingMode;
1268
+ intent: CommsPeerRequestIntent;
1269
+ kind: "peer_request";
1270
+ params: CommsPeerRequestParams;
1271
+ stream?: "none" | "reserve_interaction";
1272
+ to: PeerId;
1273
+ }
1274
+ export interface CommsCommandPeerResponse {
1275
+ handling_mode?: HandlingMode;
1276
+ in_reply_to: string;
1277
+ kind: "peer_response";
1278
+ result?: CommsPeerResponseResult;
1279
+ status: "accepted" | "completed" | "failed";
1280
+ to: PeerId;
1281
+ }
1282
+ export type CommsCommandRequest = CommsCommandInput | CommsCommandPeerMessage | CommsCommandPeerLifecycle | CommsCommandPeerRequest | CommsCommandPeerResponse;
1283
+ export type BlobId = string;
1284
+ export type BridgeBootstrapToken = string;
1285
+ export interface BridgeCommandBindMember {
1286
+ bootstrap_token: BridgeBootstrapToken;
1287
+ command: "bind_member";
1288
+ epoch: number;
1289
+ expected_address: string;
1290
+ expected_peer_id: string;
1291
+ protocol_version: BridgeProtocolVersion;
1292
+ supervisor: BridgePeerSpec;
1293
+ }
1294
+ export interface BridgeCommandAuthorizeSupervisor {
1295
+ command: "authorize_supervisor";
1296
+ epoch: number;
1297
+ protocol_version: BridgeProtocolVersion;
1298
+ supervisor: BridgePeerSpec;
1299
+ }
1300
+ export interface BridgeCommandRevokeSupervisor {
1301
+ command: "revoke_supervisor";
1302
+ epoch: number;
1303
+ protocol_version: BridgeProtocolVersion;
1304
+ supervisor: BridgePeerSpec;
1305
+ }
1306
+ export interface BridgeCommandDeliverMemberInput {
1307
+ command: "deliver_member_input";
1308
+ content: ContentInput;
1309
+ epoch: number;
1310
+ handling_mode: HandlingMode;
1311
+ input_id: string;
1312
+ protocol_version: BridgeProtocolVersion;
1313
+ supervisor: BridgePeerSpec;
1314
+ }
1315
+ export interface BridgeCommandObserveMember {
1316
+ command: "observe_member";
1317
+ epoch: number;
1318
+ protocol_version: BridgeProtocolVersion;
1319
+ supervisor: BridgePeerSpec;
1320
+ }
1321
+ export interface BridgeCommandInterruptMember {
1322
+ command: "interrupt_member";
1323
+ epoch: number;
1324
+ protocol_version: BridgeProtocolVersion;
1325
+ supervisor: BridgePeerSpec;
1326
+ }
1327
+ export interface BridgeCommandHardCancelMember {
1328
+ command: "hard_cancel_member";
1329
+ epoch: number;
1330
+ protocol_version: BridgeProtocolVersion;
1331
+ reason: string;
1332
+ supervisor: BridgePeerSpec;
1333
+ }
1334
+ export interface BridgeCommandRetireMember {
1335
+ command: "retire_member";
1336
+ epoch: number;
1337
+ protocol_version: BridgeProtocolVersion;
1338
+ supervisor: BridgePeerSpec;
1339
+ }
1340
+ export interface BridgeCommandDestroyMember {
1341
+ command: "destroy_member";
1342
+ epoch: number;
1343
+ protocol_version: BridgeProtocolVersion;
1344
+ supervisor: BridgePeerSpec;
1345
+ }
1346
+ export interface BridgeCommandWireMember {
1347
+ command: "wire_member";
1348
+ epoch: number;
1349
+ peer_spec: BridgePeerSpec;
1350
+ protocol_version: BridgeProtocolVersion;
1351
+ supervisor: BridgePeerSpec;
1352
+ }
1353
+ export interface BridgeCommandUnwireMember {
1354
+ command: "unwire_member";
1355
+ epoch: number;
1356
+ peer_spec: BridgePeerSpec;
1357
+ protocol_version: BridgeProtocolVersion;
1358
+ supervisor: BridgePeerSpec;
1359
+ }
1360
+ export type BridgeCommand = BridgeCommandBindMember | BridgeCommandAuthorizeSupervisor | BridgeCommandRevokeSupervisor | BridgeCommandDeliverMemberInput | BridgeCommandObserveMember | BridgeCommandInterruptMember | BridgeCommandHardCancelMember | BridgeCommandRetireMember | BridgeCommandDestroyMember | BridgeCommandWireMember | BridgeCommandUnwireMember;
1361
+ export interface BridgeDeliveryOutcomeAccepted {
1362
+ outcome: "accepted";
1363
+ }
1364
+ export interface BridgeDeliveryOutcomeDeduplicated {
1365
+ existing_input_id: string;
1366
+ outcome: "deduplicated";
1367
+ }
1368
+ export interface BridgeDeliveryOutcomeRejected {
1369
+ cause: BridgeDeliveryRejectionCause;
1370
+ outcome: "rejected";
1371
+ reason: string;
1372
+ }
1373
+ export type BridgeDeliveryOutcome = BridgeDeliveryOutcomeAccepted | BridgeDeliveryOutcomeDeduplicated | BridgeDeliveryOutcomeRejected;
1374
+ export interface BridgeDeliveryRejectionCauseNotReady {
1375
+ kind: "not_ready";
1376
+ state: BridgeMemberRuntimeState;
1377
+ }
1378
+ export interface BridgeDeliveryRejectionCauseDurabilityViolation {
1379
+ detail: string;
1380
+ kind: "durability_violation";
1381
+ }
1382
+ export interface BridgeDeliveryRejectionCausePeerHandlingModeInvalid {
1383
+ detail: string;
1384
+ kind: "peer_handling_mode_invalid";
1385
+ }
1386
+ export interface BridgeDeliveryRejectionCauseInternal {
1387
+ detail: string;
1388
+ kind: "internal";
1389
+ }
1390
+ export type BridgeDeliveryRejectionCause = BridgeDeliveryRejectionCauseNotReady | BridgeDeliveryRejectionCauseDurabilityViolation | BridgeDeliveryRejectionCausePeerHandlingModeInvalid | BridgeDeliveryRejectionCauseInternal;
1391
+ export type BridgeMemberRuntimeState = "initializing" | "idle" | "attached" | "running" | "retired" | "stopped" | "destroyed";
1392
+ export type BridgePeerConnectivity = "reachable" | "unreachable" | "unknown";
1393
+ export type BridgeProtocolVersion = number;
1394
+ 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";
1395
+ export interface BridgeReplyBindMember {
1396
+ address: string;
1397
+ capabilities: BridgeCapabilities;
1398
+ peer_id: string;
1399
+ result: "bind_member";
1400
+ }
1401
+ export interface BridgeReplyAck {
1402
+ ok: boolean;
1403
+ result: "ack";
1404
+ }
1405
+ export interface BridgeReplyObservation {
1406
+ accepting_inputs?: boolean;
1407
+ current_run_id?: string;
1408
+ last_error?: string;
1409
+ observed_at: string;
1410
+ peer_connectivity?: BridgePeerConnectivity;
1411
+ result: "observation";
1412
+ state: BridgeMemberRuntimeState;
1413
+ }
1414
+ export interface BridgeReplyDelivery {
1415
+ canonical_input_id?: string;
1416
+ input_id: string;
1417
+ outcome: BridgeDeliveryOutcome;
1418
+ result: "delivery";
1419
+ }
1420
+ export interface BridgeReplyRetire {
1421
+ inputs_abandoned: number;
1422
+ inputs_pending_drain: number;
1423
+ result: "retire";
1424
+ }
1425
+ export interface BridgeReplyDestroy {
1426
+ inputs_abandoned: number;
1427
+ result: "destroy";
1428
+ }
1429
+ export interface BridgeReplyRejected {
1430
+ cause: BridgeRejectionCause;
1431
+ reason: string;
1432
+ result: "rejected";
1433
+ }
1434
+ export type BridgeReply = BridgeReplyBindMember | BridgeReplyAck | BridgeReplyObservation | BridgeReplyDelivery | BridgeReplyRetire | BridgeReplyDestroy | BridgeReplyRejected;
1435
+ export interface ContentBlockText {
1436
+ text: string;
1437
+ type: "text";
1438
+ }
1439
+ export interface ContentBlockImage {
1440
+ media_type: string;
1441
+ type: "image";
1442
+ }
1443
+ export interface ContentBlockVideo {
1444
+ duration_ms: number;
1445
+ media_type: string;
1446
+ type: "video";
1447
+ }
1448
+ export type ContentBlock = ContentBlockText | ContentBlockImage | ContentBlockVideo;
1449
+ export type ContentInput = string | ContentBlock[];
1450
+ export interface CommsSendParamsInput {
1451
+ allow_self_session?: boolean;
1452
+ blocks?: ContentBlock[];
1453
+ body: string;
1454
+ handling_mode?: HandlingMode;
1455
+ kind: "input";
1456
+ session_id: string;
1457
+ source?: "tcp" | "uds" | "stdin" | "webhook" | "rpc";
1458
+ stream?: "none" | "reserve_interaction";
1459
+ }
1460
+ export interface CommsSendParamsPeerMessage {
1461
+ blocks?: ContentBlock[];
1462
+ body: string;
1463
+ handling_mode?: HandlingMode;
1464
+ kind: "peer_message";
1465
+ session_id: string;
1466
+ to: PeerId;
1467
+ }
1468
+ export interface CommsSendParamsPeerLifecycle {
1469
+ kind: "peer_lifecycle";
1470
+ lifecycle_kind: "mob.peer_added" | "mob.peer_retired" | "mob.peer_unwired";
1471
+ params: CommsPeerLifecycleParams;
1472
+ session_id: string;
1473
+ to: PeerId;
1474
+ }
1475
+ export interface CommsSendParamsPeerRequest {
1476
+ handling_mode?: HandlingMode;
1477
+ intent: CommsPeerRequestIntent;
1478
+ kind: "peer_request";
1479
+ params: CommsPeerRequestParams;
1480
+ session_id: string;
1481
+ stream?: "none" | "reserve_interaction";
1482
+ to: PeerId;
1483
+ }
1484
+ export interface CommsSendParamsPeerResponse {
1485
+ handling_mode?: HandlingMode;
1486
+ in_reply_to: string;
1487
+ kind: "peer_response";
1488
+ result?: CommsPeerResponseResult;
1489
+ session_id: string;
1490
+ status: "accepted" | "completed" | "failed";
1491
+ to: PeerId;
1492
+ }
1493
+ export type CommsSendParams = CommsSendParamsInput | CommsSendParamsPeerMessage | CommsSendParamsPeerLifecycle | CommsSendParamsPeerRequest | CommsSendParamsPeerResponse;
1494
+ export interface CommsSendResultInputAccepted {
1495
+ interaction_id: string;
1496
+ kind: "input_accepted";
1497
+ stream_reserved: boolean;
1498
+ }
1499
+ export interface CommsSendResultPeerMessageSent {
1500
+ acked: boolean;
1501
+ envelope_id: string;
1502
+ kind: "peer_message_sent";
1503
+ }
1504
+ export interface CommsSendResultPeerLifecycleSent {
1505
+ envelope_id: string;
1506
+ kind: "peer_lifecycle_sent";
1507
+ }
1508
+ export interface CommsSendResultPeerRequestSent {
1509
+ envelope_id: string;
1510
+ interaction_id: string;
1511
+ kind: "peer_request_sent";
1512
+ request_id: string;
1513
+ stream_reserved: boolean;
1514
+ }
1515
+ export interface CommsSendResultPeerResponseSent {
1516
+ envelope_id: string;
1517
+ in_reply_to: string;
1518
+ kind: "peer_response_sent";
1519
+ }
1520
+ export type CommsSendResult = CommsSendResultInputAccepted | CommsSendResultPeerMessageSent | CommsSendResultPeerLifecycleSent | CommsSendResultPeerRequestSent | CommsSendResultPeerResponseSent;
1521
+ export type CommsChecksumTokenResultIntent = "checksum_token";
1522
+ export type CommsPeerRequestIntent = "supervisor.bridge" | "checksum_token";
1523
+ export type CommsPeerRequestParams = BridgeCommand | CommsChecksumTokenParams;
1524
+ export type CommsPeerResponseResult = BridgeReply | CommsChecksumTokenResult;
1525
+ export type HandlingMode = "queue" | "steer";
1526
+ export type PeerId = string;
1527
+ export type PeerName = string;
1528
+ export type PeerTransport = "inproc" | "uds" | "tcp";
1529
+ export type PeerDirectorySource = "trusted" | "inproc" | "trusted_and_inproc" | "unknown";
1530
+ export type PeerSendability = "peer_message" | "peer_request" | "peer_response";
1531
+ export type PeerReachability = "unknown" | "reachable" | "unreachable";
1532
+ export type PeerReachabilityReason = "offline_or_no_ack" | "transport_error" | "admission_dropped";
189
1533
  export interface WireRenderMetadata {
190
1534
  class: "user_prompt" | "peer_message" | "peer_request" | "peer_response" | "external_event" | "flow_step" | "continuation" | "system_notice" | "tool_scope_notice" | "ops_progress";
191
1535
  salience?: "background" | "normal" | "important" | "urgent";
192
1536
  }
1537
+ export interface WireTrustedPeerIdentityEd25519PublicKey {
1538
+ kind: "ed25519_public_key";
1539
+ public_key: string;
1540
+ }
1541
+ export type WireTrustedPeerIdentity = WireTrustedPeerIdentityEd25519PublicKey;
193
1542
  export interface WireTrustedPeerSpec {
194
1543
  address: string;
1544
+ identity: WireTrustedPeerIdentity;
195
1545
  name: string;
196
- peer_id: string;
197
1546
  }
198
- export interface MobWireResult {
199
- wired: boolean;
1547
+ export interface RuntimeStateResult {
1548
+ state: WireRuntimeState;
200
1549
  }
201
- export interface MobUnwireResult {
202
- unwired: boolean;
1550
+ export interface RuntimeRealtimeAttachmentStatusResult {
1551
+ status: "unattached" | "intent_present_unbound" | "binding_not_ready" | "binding_ready" | "replacement_pending" | "reattach_required";
203
1552
  }
204
- export interface RuntimeStateResult {
205
- state: "initializing" | "idle" | "attached" | "running" | "recovering" | "retired" | "stopped" | "destroyed";
1553
+ export interface RealtimeReconnectPolicy {
1554
+ initial_backoff_ms: number;
1555
+ max_attempts: number;
1556
+ max_backoff_ms: number;
1557
+ max_total_ms: number;
1558
+ }
1559
+ export interface RealtimeToolTimeoutPolicyDefault {
1560
+ type: "default";
1561
+ }
1562
+ export interface RealtimeToolTimeoutPolicyDisabled {
1563
+ type: "disabled";
1564
+ }
1565
+ export interface RealtimeToolTimeoutPolicyFinite {
1566
+ timeout_ms: number;
1567
+ type: "finite";
1568
+ }
1569
+ export type RealtimeToolTimeoutPolicy = RealtimeToolTimeoutPolicyDefault | RealtimeToolTimeoutPolicyDisabled | RealtimeToolTimeoutPolicyFinite;
1570
+ export interface RealtimeChannelConfig {
1571
+ tool_timeout?: RealtimeToolTimeoutPolicy;
1572
+ }
1573
+ export interface RealtimeAudioFormat {
1574
+ channels: number;
1575
+ mime_type: string;
1576
+ sample_rate_hz: number;
1577
+ }
1578
+ export interface RealtimeCapabilities {
1579
+ audio_input_format?: RealtimeAudioFormat;
1580
+ audio_output_format?: RealtimeAudioFormat;
1581
+ input_kinds?: RealtimeInputKind[];
1582
+ interrupt_supported: boolean;
1583
+ output_kinds?: RealtimeOutputKind[];
1584
+ tool_lifecycle_events_supported: boolean;
1585
+ transcript_supported: boolean;
1586
+ turning_modes?: RealtimeTurningMode[];
1587
+ video_supported: boolean;
1588
+ }
1589
+ export interface RealtimeChannelStatus {
1590
+ attempt_count?: number;
1591
+ deadline_at?: string;
1592
+ next_retry_at?: string;
1593
+ reason?: string;
1594
+ state: RealtimeChannelState;
1595
+ }
1596
+ export interface RealtimeOpenInfo {
1597
+ capabilities: RealtimeCapabilities;
1598
+ default_protocol_version: RealtimeProtocolVersion;
1599
+ expires_at: string;
1600
+ open_token: string;
1601
+ supported_protocol_versions?: RealtimeProtocolVersion[];
1602
+ target: RealtimeChannelTarget;
1603
+ ws_url: string;
1604
+ }
1605
+ export interface RealtimeStatusResult {
1606
+ status: RealtimeChannelStatus;
1607
+ }
1608
+ export interface RealtimeCapabilitiesResult {
1609
+ capabilities: RealtimeCapabilities;
1610
+ }
1611
+ export interface RealtimeTextChunk {
1612
+ text: string;
1613
+ }
1614
+ export interface RealtimeTextDelta {
1615
+ delta: string;
1616
+ }
1617
+ export interface RealtimeAudioChunk {
1618
+ channels: number;
1619
+ data: string;
1620
+ mime_type: string;
1621
+ sample_rate_hz: number;
1622
+ }
1623
+ export interface RealtimeVideoChunk {
1624
+ data: string;
1625
+ mime_type: string;
1626
+ }
1627
+ export interface RealtimeBargeInTruncateFrame {
1628
+ audio_played_ms: number;
1629
+ content_index: number;
1630
+ item_id: string;
1631
+ }
1632
+ export interface AudioFormatMismatchContext {
1633
+ actual: RealtimeAudioFormat;
1634
+ expected: RealtimeAudioFormat;
1635
+ }
1636
+ export interface ToolCallTimeoutContext {
1637
+ call_id: string;
1638
+ elapsed_ms: number;
1639
+ timeout_ms: number;
1640
+ }
1641
+ export interface RealtimeChannelOpenFrame {
1642
+ open_token: string;
1643
+ protocol_version: RealtimeProtocolVersion;
1644
+ role: RealtimeChannelRole;
1645
+ turning_mode: RealtimeTurningMode;
1646
+ }
1647
+ export interface RealtimeChannelInputFrame {
1648
+ chunk: RealtimeInputChunk;
1649
+ }
1650
+ export interface RealtimeChannelOpenedFrame {
1651
+ capabilities: RealtimeCapabilities;
1652
+ protocol_version: RealtimeProtocolVersion;
1653
+ role: RealtimeChannelRole;
1654
+ status: RealtimeChannelStatus;
1655
+ }
1656
+ export interface RealtimeChannelStatusFrame {
1657
+ status: RealtimeChannelStatus;
1658
+ }
1659
+ export interface RealtimeChannelEventFrame {
1660
+ event: RealtimeEvent;
1661
+ }
1662
+ export interface RealtimeChannelErrorFrame {
1663
+ code: RealtimeErrorCode;
1664
+ details?: RealtimeErrorDetails;
1665
+ message: string;
1666
+ }
1667
+ export interface RealtimeChannelClosedFrame {
1668
+ reason?: string;
206
1669
  }
207
1670
  export interface RuntimeAcceptResult {
208
1671
  existing_id?: string;
209
1672
  input_id?: string;
210
1673
  outcome_type: "accepted" | "deduplicated" | "rejected";
211
- policy?: unknown;
1674
+ policy?: "stage" | "queue" | "immediate";
212
1675
  reason?: string;
213
1676
  state?: Record<string, unknown>;
214
1677
  }
215
- export interface RuntimeRetireResult {
216
- inputs_abandoned: number;
217
- inputs_pending_drain?: number;
218
- }
219
- export interface RuntimeResetResult {
220
- inputs_abandoned: number;
221
- }
222
1678
  export interface WireInputStateHistoryEntry {
223
1679
  from: "accepted" | "queued" | "staged" | "applied" | "applied_pending_consumption" | "consumed" | "superseded" | "coalesced" | "abandoned";
224
1680
  reason?: string;
@@ -229,22 +1685,19 @@ export interface WireInputState {
229
1685
  attempt_count?: number;
230
1686
  created_at: string;
231
1687
  current_state: "accepted" | "queued" | "staged" | "applied" | "applied_pending_consumption" | "consumed" | "superseded" | "coalesced" | "abandoned";
232
- durability?: unknown;
1688
+ durability?: "durable" | "volatile" | "ephemeral";
233
1689
  history?: Record<string, unknown>[];
234
1690
  idempotency_key?: string;
235
1691
  input_id: string;
236
1692
  last_boundary_sequence?: number;
237
1693
  last_run_id?: string;
238
- persisted_input?: unknown;
239
- policy?: unknown;
240
- reconstruction_source?: unknown;
1694
+ persisted_input?: Record<string, unknown>;
1695
+ policy?: "stage" | "queue" | "immediate";
1696
+ reconstruction_source?: "live" | "event_store" | "snapshot" | "replay";
241
1697
  recovery_count?: number;
242
- terminal_outcome?: unknown;
1698
+ terminal_outcome?: "completed" | "abandoned" | "superseded" | "coalesced" | "cancelled";
243
1699
  updated_at: string;
244
1700
  }
245
- export interface InputListResult {
246
- input_ids: string[];
247
- }
248
1701
  export interface ScheduleListResult {
249
1702
  schedules: Record<string, unknown>[];
250
1703
  }
@@ -254,7 +1707,7 @@ export interface ScheduleOccurrencesResult {
254
1707
  export interface WireSessionInfo {
255
1708
  created_at: number;
256
1709
  is_active: boolean;
257
- labels?: Record<string, unknown>;
1710
+ labels?: Record<string, string>;
258
1711
  last_assistant_text?: string;
259
1712
  message_count: number;
260
1713
  model: string;
@@ -266,7 +1719,7 @@ export interface WireSessionInfo {
266
1719
  export interface WireSessionSummary {
267
1720
  created_at: number;
268
1721
  is_active: boolean;
269
- labels?: Record<string, unknown>;
1722
+ labels?: Record<string, string>;
270
1723
  message_count: number;
271
1724
  session_id: string;
272
1725
  session_ref?: string;
@@ -282,7 +1735,7 @@ export interface CatalogModelEntry {
282
1735
  max_output_tokens?: number;
283
1736
  profile?: Record<string, unknown>;
284
1737
  server_id?: string;
285
- tier: string;
1738
+ tier: "recommended" | "supported";
286
1739
  }
287
1740
  export interface ProviderCatalog {
288
1741
  default_model_id: string;
@@ -294,6 +1747,7 @@ export interface ModelsCatalogResponse {
294
1747
  providers: Record<string, unknown>[];
295
1748
  }
296
1749
  export interface WireModelProfile {
1750
+ beta_headers?: Record<string, unknown>[];
297
1751
  inline_video: boolean;
298
1752
  model_family: string;
299
1753
  params_schema: unknown;
@@ -302,4 +1756,275 @@ export interface WireModelProfile {
302
1756
  supports_thinking: boolean;
303
1757
  supports_web_search?: boolean;
304
1758
  }
1759
+ export interface WireAssistantImageRef {
1760
+ blob_ref: Record<string, unknown>;
1761
+ height: number;
1762
+ image_id: string;
1763
+ media_type: string;
1764
+ width: number;
1765
+ }
1766
+ export interface WireGenerateImageRequest {
1767
+ count: number;
1768
+ format: "auto" | "png" | "jpeg" | "webp";
1769
+ intent: Record<string, unknown>;
1770
+ provider_params?: unknown;
1771
+ quality: "auto" | "low" | "medium" | "high";
1772
+ size: Record<string, unknown>;
1773
+ target: Record<string, unknown>;
1774
+ }
1775
+ export interface WireGenerateImageExecutionPlan {
1776
+ backend: "hosted_tool" | "provider_api" | "native_model";
1777
+ capabilities: Record<string, unknown>;
1778
+ max_count: number;
1779
+ provider: string;
1780
+ provider_plan?: unknown;
1781
+ requires_scoped_override: boolean;
1782
+ }
1783
+ export interface WireImageGenerationToolResult {
1784
+ images?: Record<string, unknown>[];
1785
+ native_metadata: Record<string, unknown>;
1786
+ operation_id: string;
1787
+ provider_text: Record<string, unknown>;
1788
+ revised_prompt: Record<string, unknown>;
1789
+ terminal: Record<string, unknown>;
1790
+ warnings?: Record<string, unknown>[];
1791
+ }
1792
+ export interface WireAuthBindingRef {
1793
+ binding: string;
1794
+ profile?: string;
1795
+ realm: string;
1796
+ }
1797
+ export interface WireBackendProfile {
1798
+ backend_kind: string;
1799
+ base_url?: string;
1800
+ id: string;
1801
+ options?: unknown;
1802
+ provider: string;
1803
+ }
1804
+ export interface WireAuthProfile {
1805
+ auth_method: string;
1806
+ id: string;
1807
+ provider: string;
1808
+ source_kind: string;
1809
+ }
1810
+ export interface WireProviderBinding {
1811
+ allow_auth_override?: boolean;
1812
+ auth_profile: string;
1813
+ backend_profile: string;
1814
+ default_model?: string;
1815
+ id: string;
1816
+ require_metadata_account?: boolean;
1817
+ require_metadata_workspace?: boolean;
1818
+ }
1819
+ export interface WireRealmConnectionSet {
1820
+ auth_profiles: Record<string, Record<string, unknown>>;
1821
+ backends: Record<string, Record<string, unknown>>;
1822
+ bindings: Record<string, Record<string, unknown>>;
1823
+ default_binding?: string;
1824
+ realm_id: string;
1825
+ }
1826
+ export interface WireBindingIdentity {
1827
+ auth_binding: WireAuthBindingRef;
1828
+ binding_id: string;
1829
+ realm_id: string;
1830
+ }
1831
+ export interface WireAuthProfileCreated {
1832
+ auth_binding: WireAuthBindingRef;
1833
+ auth_method: string;
1834
+ binding_id: string;
1835
+ profile_id: string;
1836
+ provider: string;
1837
+ realm_id: string;
1838
+ stored: boolean;
1839
+ }
1840
+ export interface WireAuthProfileDetail {
1841
+ auth_binding: WireAuthBindingRef;
1842
+ auth_profile: Record<string, unknown>;
1843
+ binding_id: string;
1844
+ profile_id: string;
1845
+ }
1846
+ export interface WireAuthProfileCleared {
1847
+ auth_binding: WireAuthBindingRef;
1848
+ binding_id: string;
1849
+ cleared: boolean;
1850
+ profile_id: string;
1851
+ realm_id: string;
1852
+ }
1853
+ export interface WireLoginStart {
1854
+ authorize_url: string;
1855
+ provider: string;
1856
+ redirect_uri: string;
1857
+ state: string;
1858
+ }
1859
+ export interface WireLoginReady {
1860
+ auth_binding: WireAuthBindingRef;
1861
+ binding_id: string;
1862
+ expires_at?: string;
1863
+ has_refresh_token: boolean;
1864
+ profile_id: string;
1865
+ provider: string;
1866
+ realm_id: string;
1867
+ scopes: string[];
1868
+ state?: string;
1869
+ }
1870
+ export interface WireDeviceStart {
1871
+ device_code: string;
1872
+ expires_in: number;
1873
+ interval: number;
1874
+ provider: string;
1875
+ user_code: string;
1876
+ verification_uri: string;
1877
+ verification_uri_complete?: string;
1878
+ }
1879
+ export interface WireRealmSummary {
1880
+ auth_profile_count: number;
1881
+ backend_count: number;
1882
+ binding_count: number;
1883
+ default_binding?: string;
1884
+ realm_id: string;
1885
+ }
1886
+ export interface WireRealmList {
1887
+ realms: Record<string, unknown>[];
1888
+ }
1889
+ export interface WireAuthProfilesList {
1890
+ auth_profiles: Record<string, unknown>[];
1891
+ backend_profiles: Record<string, unknown>[];
1892
+ bindings: Record<string, unknown>[];
1893
+ realm_id: string;
1894
+ }
1895
+ export interface WireAuthStatus {
1896
+ account_id?: string;
1897
+ auth_method: string;
1898
+ expires_at?: string;
1899
+ last_error?: Record<string, unknown>;
1900
+ last_refresh_at?: string;
1901
+ profile_id: string;
1902
+ provider: string;
1903
+ state: "valid" | "expiring" | "expired" | "reauth_required" | "refresh_failed" | "unknown";
1904
+ }
1905
+ export interface WireAuthStatusDetail {
1906
+ account_id?: string;
1907
+ auth_binding: WireAuthBindingRef;
1908
+ auth_method: string;
1909
+ binding_id: string;
1910
+ expires_at?: string;
1911
+ has_refresh_token: boolean;
1912
+ last_refresh_at?: string;
1913
+ profile_id: string;
1914
+ provider: string;
1915
+ realm_id: string;
1916
+ state: "valid" | "expiring" | "expired" | "reauth_required" | "refresh_failed" | "unknown";
1917
+ }
1918
+ export interface WireAuthErrorMissingSecret {
1919
+ kind: "missing_secret";
1920
+ }
1921
+ export interface WireAuthErrorUnsupportedCombination {
1922
+ auth: string;
1923
+ backend: string;
1924
+ kind: "unsupported_combination";
1925
+ }
1926
+ export interface WireAuthErrorMissingRequiredMetadata {
1927
+ field: string;
1928
+ kind: "missing_required_metadata";
1929
+ }
1930
+ export interface WireAuthErrorWorkspaceMismatch {
1931
+ kind: "workspace_mismatch";
1932
+ }
1933
+ export interface WireAuthErrorExpired {
1934
+ kind: "expired";
1935
+ }
1936
+ export interface WireAuthErrorStaleCredential {
1937
+ kind: "stale_credential";
1938
+ }
1939
+ export interface WireAuthErrorRefreshRequired {
1940
+ kind: "refresh_required";
1941
+ }
1942
+ export interface WireAuthErrorLeaseAbsent {
1943
+ kind: "lease_absent";
1944
+ }
1945
+ export interface WireAuthErrorUserReauthRequired {
1946
+ kind: "user_reauth_required";
1947
+ }
1948
+ export interface WireAuthErrorRefreshFailed {
1949
+ detail: string;
1950
+ kind: "refresh_failed";
1951
+ }
1952
+ export interface WireAuthErrorInteractiveLoginRequired {
1953
+ kind: "interactive_login_required";
1954
+ }
1955
+ export interface WireAuthErrorHostOwnedUnavailable {
1956
+ kind: "host_owned_unavailable";
1957
+ }
1958
+ export interface WireAuthErrorIo {
1959
+ detail: string;
1960
+ kind: "io";
1961
+ }
1962
+ export interface WireAuthErrorOther {
1963
+ detail: string;
1964
+ kind: "other";
1965
+ }
1966
+ export type WireAuthError = WireAuthErrorMissingSecret | WireAuthErrorUnsupportedCombination | WireAuthErrorMissingRequiredMetadata | WireAuthErrorWorkspaceMismatch | WireAuthErrorExpired | WireAuthErrorStaleCredential | WireAuthErrorRefreshRequired | WireAuthErrorLeaseAbsent | WireAuthErrorUserReauthRequired | WireAuthErrorRefreshFailed | WireAuthErrorInteractiveLoginRequired | WireAuthErrorHostOwnedUnavailable | WireAuthErrorIo | WireAuthErrorOther;
1967
+ export interface WireAssistantBlockText {
1968
+ block_type: "text";
1969
+ data: Record<string, unknown>;
1970
+ }
1971
+ export interface WireAssistantBlockReasoning {
1972
+ block_type: "reasoning";
1973
+ data: Record<string, unknown>;
1974
+ }
1975
+ export interface WireAssistantBlockToolUse {
1976
+ block_type: "tool_use";
1977
+ data: Record<string, unknown>;
1978
+ }
1979
+ export interface WireAssistantBlockServerToolContent {
1980
+ block_type: "server_tool_content";
1981
+ data: Record<string, unknown>;
1982
+ }
1983
+ export interface WireAssistantBlockImage {
1984
+ block_type: "image";
1985
+ data: Record<string, unknown>;
1986
+ }
1987
+ export interface WireAssistantBlockUnknown {
1988
+ block_type: "unknown";
1989
+ }
1990
+ export type WireAssistantBlock = WireAssistantBlockText | WireAssistantBlockReasoning | WireAssistantBlockToolUse | WireAssistantBlockServerToolContent | WireAssistantBlockImage | WireAssistantBlockUnknown;
1991
+ export interface WireImageOperationPhaseRequested {
1992
+ phase: "requested";
1993
+ }
1994
+ export interface WireImageOperationPhaseValidating {
1995
+ phase: "validating";
1996
+ }
1997
+ export interface WireImageOperationPhaseAwaitingApproval {
1998
+ approval_id: string;
1999
+ phase: "awaiting_approval";
2000
+ }
2001
+ export interface WireImageOperationPhasePlanResolved {
2002
+ phase: "plan_resolved";
2003
+ }
2004
+ export interface WireImageOperationPhaseProjectionSnapshotted {
2005
+ phase: "projection_snapshotted";
2006
+ }
2007
+ export interface WireImageOperationPhaseScopedOverrideActive {
2008
+ phase: "scoped_override_active";
2009
+ }
2010
+ export interface WireImageOperationPhaseProviderCallInFlight {
2011
+ phase: "provider_call_in_flight";
2012
+ }
2013
+ export interface WireImageOperationPhaseProviderResultCaptured {
2014
+ phase: "provider_result_captured";
2015
+ }
2016
+ export interface WireImageOperationPhaseBlobCommitPending {
2017
+ phase: "blob_commit_pending";
2018
+ }
2019
+ export interface WireImageOperationPhaseResultCommitted {
2020
+ phase: "result_committed";
2021
+ }
2022
+ export interface WireImageOperationPhaseRestoringScopedOverride {
2023
+ phase: "restoring_scoped_override";
2024
+ }
2025
+ export interface WireImageOperationPhaseTerminal {
2026
+ phase: "terminal";
2027
+ terminal: Record<string, unknown>;
2028
+ }
2029
+ export type WireImageOperationPhase = WireImageOperationPhaseRequested | WireImageOperationPhaseValidating | WireImageOperationPhaseAwaitingApproval | WireImageOperationPhasePlanResolved | WireImageOperationPhaseProjectionSnapshotted | WireImageOperationPhaseScopedOverrideActive | WireImageOperationPhaseProviderCallInFlight | WireImageOperationPhaseProviderResultCaptured | WireImageOperationPhaseBlobCommitPending | WireImageOperationPhaseResultCommitted | WireImageOperationPhaseRestoringScopedOverride | WireImageOperationPhaseTerminal;
305
2030
  //# sourceMappingURL=types.d.ts.map