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