@rkat/sdk 0.8.21 → 0.8.22

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.8.21";
1
+ export declare const CONTRACT_VERSION = "0.8.22";
2
2
  export type Value = unknown;
3
3
  export interface WireUsage {
4
4
  input_tokens: number;
@@ -454,6 +454,12 @@ export interface EventsSnapshotResult {
454
454
  scope: Record<string, unknown>;
455
455
  snapshot: Record<string, unknown>;
456
456
  }
457
+ export interface ExportAtifParams {
458
+ agent_name?: string | null;
459
+ agent_version?: string | null;
460
+ model_name?: string | null;
461
+ session_id: string;
462
+ }
457
463
  export interface ForkSessionAtParams {
458
464
  message_index: number;
459
465
  running_behavior?: "reject";
@@ -647,6 +653,7 @@ export interface ScheduleToolsResult {
647
653
  tools: unknown[];
648
654
  }
649
655
  export interface SessionForkResult {
656
+ cache_inheritance: Record<string, unknown>;
650
657
  message_count: number;
651
658
  session_id: string;
652
659
  session_ref?: string | null;
@@ -660,6 +667,15 @@ export interface SessionPeerResponseTerminalParams {
660
667
  session_id: string;
661
668
  status: "completed" | "failed" | "cancelled";
662
669
  }
670
+ export interface SystemPromptUpdateResult {
671
+ commit?: Record<string, unknown> | null;
672
+ key: SystemPromptKey;
673
+ message_index: number;
674
+ session_id: string;
675
+ status: "applied" | "duplicate";
676
+ transcript_revision: string;
677
+ version: SystemPromptVersion;
678
+ }
663
679
  export interface SessionTranscriptRewriteResult {
664
680
  commit: Record<string, unknown>;
665
681
  message_count: number;
@@ -667,6 +683,15 @@ export interface SessionTranscriptRewriteResult {
667
683
  revision: string;
668
684
  session_id: string;
669
685
  }
686
+ export interface UpdateSystemPromptParams {
687
+ actor?: string | null;
688
+ content: string;
689
+ expected_parent_revision?: string | null;
690
+ expected_version?: SystemPromptVersion | null;
691
+ key: SystemPromptKey;
692
+ session_id: string;
693
+ target_message_index?: number | null;
694
+ }
670
695
  export interface WireProvisionApiKeyResult {
671
696
  auth_binding: WireAuthBindingRef;
672
697
  auth_mode: string;
@@ -1259,9 +1284,11 @@ export interface MobSpawnHelperParams {
1259
1284
  agent_identity?: string | null;
1260
1285
  auth_binding?: WireAuthBindingRef | null;
1261
1286
  backend?: WireMobBackendKind | null;
1287
+ max_text_bytes: number;
1262
1288
  mob_id: string;
1263
1289
  model_override?: string | null;
1264
1290
  prompt: string;
1291
+ result_label: string;
1265
1292
  role_name?: string | null;
1266
1293
  runtime_mode?: WireMobRuntimeMode | null;
1267
1294
  }
@@ -1270,18 +1297,26 @@ export interface MobForkHelperParams {
1270
1297
  auth_binding?: WireAuthBindingRef | null;
1271
1298
  backend?: WireMobBackendKind | null;
1272
1299
  fork_context?: unknown;
1300
+ max_text_bytes: number;
1273
1301
  mob_id: string;
1274
1302
  model_override?: string | null;
1275
1303
  prompt: string;
1304
+ result_label: string;
1276
1305
  role_name?: string | null;
1277
1306
  runtime_mode?: WireMobRuntimeMode | null;
1278
1307
  source_member_id: string;
1279
1308
  }
1280
1309
  export interface MobHelperResult {
1281
1310
  agent_identity: string;
1311
+ bounded_result: Record<string, unknown>;
1282
1312
  member_ref: WireMemberRef;
1283
- output?: string | null;
1313
+ output: string;
1314
+ retirement_error?: string | null;
1315
+ session_id: string;
1284
1316
  tokens_used: number;
1317
+ tool_calls: number;
1318
+ turns: number;
1319
+ usage: Record<string, unknown>;
1285
1320
  }
1286
1321
  export interface MobForceCancelResult {
1287
1322
  cancelled: boolean;
@@ -1826,6 +1861,7 @@ export interface WorkGraphSnapshotFilter {
1826
1861
  statuses?: WorkStatus[];
1827
1862
  }
1828
1863
  export interface WorkItem {
1864
+ cancelled_child_join_policy: "require_success" | "propagate" | "accept";
1829
1865
  claim?: WorkItemClaim | null;
1830
1866
  completion_policy: WorkCompletionPolicy;
1831
1867
  created_at: string;
@@ -1833,6 +1869,7 @@ export interface WorkItem {
1833
1869
  due_at?: string | null;
1834
1870
  evidence_refs?: WorkEvidenceRef[];
1835
1871
  external_refs?: WorkItemExternalRef[];
1872
+ failed_child_join_policy: "require_success" | "propagate" | "accept";
1836
1873
  id: string;
1837
1874
  labels?: string[];
1838
1875
  machine_state: Record<string, unknown>;
@@ -1881,6 +1918,7 @@ export interface WorkEvidenceRef {
1881
1918
  }
1882
1919
  export interface WorkGraphEvent {
1883
1920
  at: string;
1921
+ facts?: unknown[];
1884
1922
  item_id?: string | null;
1885
1923
  kind: WorkGraphEventKind;
1886
1924
  namespace: string;
@@ -1894,6 +1932,7 @@ export interface WorkOwnerKey {
1894
1932
  }
1895
1933
  export interface WorkItemClaim {
1896
1934
  claimed_at: string;
1935
+ expiry_observed_at?: string | null;
1897
1936
  lease_expires_at?: string | null;
1898
1937
  owner: WorkItemOwner;
1899
1938
  }
@@ -1914,12 +1953,14 @@ export interface BridgeBindPayload {
1914
1953
  epoch: number;
1915
1954
  expected_address: string;
1916
1955
  expected_peer_id: string;
1956
+ member: Record<string, unknown>;
1917
1957
  protocol_version: BridgeProtocolVersion;
1918
1958
  supervisor: BridgePeerSpec;
1919
1959
  }
1920
1960
  export interface BridgeBindResponse {
1921
1961
  address: string;
1922
1962
  capabilities: BridgeCapabilities;
1963
+ member_fence: Record<string, unknown>;
1923
1964
  peer_id: string;
1924
1965
  }
1925
1966
  export interface BridgeCapabilities {
@@ -1944,6 +1985,7 @@ export interface BridgeCapabilities {
1944
1985
  wire_member?: boolean;
1945
1986
  }
1946
1987
  export interface BridgeDeliveryPayload {
1988
+ bounded_result_spec?: Record<string, unknown> | null;
1947
1989
  content: ContentInput;
1948
1990
  epoch: number;
1949
1991
  expected_member?: BridgeMemberIncarnation | null;
@@ -1998,8 +2040,7 @@ export interface BridgePeerWiringPayload {
1998
2040
  supervisor: BridgePeerSpec;
1999
2041
  }
2000
2042
  export interface BridgeRetireResponse {
2001
- inputs_abandoned: number;
2002
- inputs_pending_drain: number;
2043
+ outcome: Record<string, unknown>;
2003
2044
  }
2004
2045
  export interface BridgeSupervisorPayload {
2005
2046
  epoch: number;
@@ -2093,6 +2134,7 @@ export interface WireFlowFailureDetail {
2093
2134
  truncated: boolean;
2094
2135
  }
2095
2136
  export interface BridgeTurnOutcomeRecord {
2137
+ bounded_result?: unknown | null;
2096
2138
  fence_token: number;
2097
2139
  generation: number;
2098
2140
  input_id: string;
@@ -2536,14 +2578,14 @@ export interface WorkCompletionPolicyReviewerQuorum {
2536
2578
  export type WorkCompletionPolicy = WorkCompletionPolicySelfAttest | WorkCompletionPolicyHostConfirmed | WorkCompletionPolicyPrincipalConfirmed | WorkCompletionPolicySupervisor | WorkCompletionPolicyReviewerQuorum;
2537
2579
  export type WorkEdgeKind = "blocks" | "parent" | "related" | "supersedes" | "derived_from";
2538
2580
  export type WorkEvidenceKind = "host_confirmation" | "principal_confirmation" | "supervisor_confirmation" | "reviewer_confirmation" | "self_attest";
2539
- export type WorkGraphEventKind = "created" | "updated" | "claimed" | "released" | "blocked" | "closed" | "linked" | "evidence_added" | "attention_created" | "attention_updated" | "execution_bound" | "execution_transitioned";
2581
+ export type WorkGraphEventKind = "created" | "updated" | "readiness_observed" | "claimed" | "released" | "blocked" | "closed" | "linked" | "evidence_added" | "attention_created" | "attention_updated" | "execution_bound" | "execution_transitioned";
2540
2582
  export type WorkOwnerKind = "principal" | "agent" | "session" | "mob" | "label";
2541
2583
  export type WorkStatus = "open" | "in_progress" | "blocked" | "completed" | "cancelled" | "failed";
2542
2584
  export declare const WORK_GRAPH_STATUSES: readonly ["open", "in_progress", "blocked", "completed", "cancelled", "failed"];
2543
2585
  export type WorkGraphStatus = typeof WORK_GRAPH_STATUSES[number];
2544
2586
  export declare const WORK_GRAPH_PRIORITIES: readonly ["low", "medium", "high"];
2545
2587
  export type WorkGraphPriority = typeof WORK_GRAPH_PRIORITIES[number];
2546
- export declare const WORK_GRAPH_EVENT_KINDS: readonly ["created", "updated", "claimed", "released", "blocked", "closed", "linked", "evidence_added", "attention_created", "attention_updated", "execution_bound", "execution_transitioned"];
2588
+ export declare const WORK_GRAPH_EVENT_KINDS: readonly ["created", "updated", "readiness_observed", "claimed", "released", "blocked", "closed", "linked", "evidence_added", "attention_created", "attention_updated", "execution_bound", "execution_transitioned"];
2547
2589
  export type McpLiveOperation = "add" | "remove" | "reload";
2548
2590
  export type McpLiveOpStatus = "staged" | "applied" | "rejected";
2549
2591
  export type McpHttpTransport = "streamable-http" | "sse";
@@ -2638,6 +2680,7 @@ export interface BridgeCommandBindMember {
2638
2680
  epoch: number;
2639
2681
  expected_address: string;
2640
2682
  expected_peer_id: string;
2683
+ member: Record<string, unknown>;
2641
2684
  protocol_version: BridgeProtocolVersion;
2642
2685
  supervisor: BridgePeerSpec;
2643
2686
  }
@@ -2654,6 +2697,7 @@ export interface BridgeCommandRevokeSupervisor {
2654
2697
  supervisor: BridgePeerSpec;
2655
2698
  }
2656
2699
  export interface BridgeCommandDeliverMemberInput {
2700
+ bounded_result_spec?: Record<string, unknown> | null;
2657
2701
  command: "deliver_member_input";
2658
2702
  content: ContentInput;
2659
2703
  epoch: number;
@@ -2704,6 +2748,7 @@ export interface BridgeCommandCancelTrackedMemberInput {
2704
2748
  export interface BridgeCommandRetireMember {
2705
2749
  command: "retire_member";
2706
2750
  epoch: number;
2751
+ member_fence: Record<string, unknown>;
2707
2752
  protocol_version: BridgeProtocolVersion;
2708
2753
  supervisor: BridgePeerSpec;
2709
2754
  }
@@ -2974,6 +3019,12 @@ export interface BridgeRejectionCauseHistoryRowTooLargePayload {
2974
3019
  export interface BridgeRejectionCauseHistoryRowTooLarge {
2975
3020
  history_row_too_large: BridgeRejectionCauseHistoryRowTooLargePayload;
2976
3021
  }
3022
+ export interface BridgeRejectionCauseRuntimeRetirementInProgressPayload {
3023
+ stage: string;
3024
+ }
3025
+ export interface BridgeRejectionCauseRuntimeRetirementInProgress {
3026
+ runtime_retirement_in_progress: BridgeRejectionCauseRuntimeRetirementInProgressPayload;
3027
+ }
2977
3028
  export interface BridgeRejectionCauseScopeDeniedPayload {
2978
3029
  presented: WireControlScope[];
2979
3030
  required: WireControlScope;
@@ -3050,10 +3101,11 @@ export interface BridgeRejectionCauseSessionOwnershipConflictPayload {
3050
3101
  export interface BridgeRejectionCauseSessionOwnershipConflict {
3051
3102
  session_ownership_conflict: BridgeRejectionCauseSessionOwnershipConflictPayload;
3052
3103
  }
3053
- export type BridgeRejectionCause = "not_bound" | "stale_supervisor" | "sender_mismatch" | "already_bound" | "invalid_bootstrap_token" | "unsupported_protocol_version" | "invalid_supervisor_spec" | "invalid_peer_spec" | "address_mismatch" | "unsupported" | "internal" | "stale_fence" | BridgeRejectionCauseStaleCursor | BridgeRejectionCauseOversizedEvent | BridgeRejectionCauseHistoryRowTooLarge | "unavailable" | BridgeRejectionCauseScopeDenied | "spec_digest_mismatch" | BridgeRejectionCauseMaterializeBuildRejected | BridgeRejectionCauseModelUnresolvable | BridgeRejectionCauseAuthBindingUnresolvable | BridgeRejectionCauseMcpCommandMissing | "realm_backend_unavailable" | BridgeRejectionCauseEnvKeyMissing | BridgeRejectionCauseHostEngineVersionChanged | BridgeRejectionCauseModelNotRealtime | BridgeRejectionCauseLiveAdapterUnavailable | "live_transport_unavailable" | "live_channel_already_bound" | "live_channel_not_found" | BridgeRejectionCauseLiveTransportUnsupported | "resume_session_not_found" | BridgeRejectionCauseCapabilityMissing | "launch_mode_unsupported" | "launch_mode_placement_mismatch" | BridgeRejectionCauseSessionOwnershipConflict;
3104
+ 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" | "bind_admission_outcome_unknown" | "stale_fence" | BridgeRejectionCauseStaleCursor | BridgeRejectionCauseOversizedEvent | BridgeRejectionCauseHistoryRowTooLarge | "unavailable" | BridgeRejectionCauseRuntimeRetirementInProgress | BridgeRejectionCauseScopeDenied | "spec_digest_mismatch" | BridgeRejectionCauseMaterializeBuildRejected | BridgeRejectionCauseModelUnresolvable | BridgeRejectionCauseAuthBindingUnresolvable | BridgeRejectionCauseMcpCommandMissing | "realm_backend_unavailable" | BridgeRejectionCauseEnvKeyMissing | BridgeRejectionCauseHostEngineVersionChanged | BridgeRejectionCauseModelNotRealtime | BridgeRejectionCauseLiveAdapterUnavailable | "live_transport_unavailable" | "live_channel_already_bound" | "live_channel_not_found" | BridgeRejectionCauseLiveTransportUnsupported | "resume_session_not_found" | BridgeRejectionCauseCapabilityMissing | "launch_mode_unsupported" | "launch_mode_placement_mismatch" | BridgeRejectionCauseSessionOwnershipConflict;
3054
3105
  export interface BridgeReplyBindMember {
3055
3106
  address: string;
3056
3107
  capabilities: BridgeCapabilities;
3108
+ member_fence: Record<string, unknown>;
3057
3109
  peer_id: string;
3058
3110
  result: "bind_member";
3059
3111
  }
@@ -3083,8 +3135,7 @@ export interface BridgeReplyTrackedInputCancelled {
3083
3135
  result: "tracked_input_cancelled";
3084
3136
  }
3085
3137
  export interface BridgeReplyRetire {
3086
- inputs_abandoned: number;
3087
- inputs_pending_drain: number;
3138
+ outcome: Record<string, unknown>;
3088
3139
  result: "retire";
3089
3140
  }
3090
3141
  export interface BridgeReplyDestroy {
@@ -3286,15 +3337,23 @@ export interface CommsSendResultInputAccepted {
3286
3337
  stream_reserved: boolean;
3287
3338
  }
3288
3339
  export interface CommsSendResultPeerMessageSent {
3289
- delivery: "acked" | "handed_off" | "queued";
3340
+ delivery: {
3341
+ durably_resolved: Record<string, unknown>;
3342
+ } | "acked" | "volatile_handed_off" | "queued";
3290
3343
  envelope_id: string;
3291
3344
  kind: "peer_message_sent";
3292
3345
  }
3293
3346
  export interface CommsSendResultPeerLifecycleSent {
3347
+ delivery: {
3348
+ durably_resolved: Record<string, unknown>;
3349
+ } | "acked" | "volatile_handed_off" | "queued";
3294
3350
  envelope_id: string;
3295
3351
  kind: "peer_lifecycle_sent";
3296
3352
  }
3297
3353
  export interface CommsSendResultPeerRequestSent {
3354
+ delivery: {
3355
+ durably_resolved: Record<string, unknown>;
3356
+ } | "acked" | "volatile_handed_off" | "queued";
3298
3357
  envelope_id: string;
3299
3358
  interaction_id: string;
3300
3359
  kind: "peer_request_sent";
@@ -3302,6 +3361,9 @@ export interface CommsSendResultPeerRequestSent {
3302
3361
  stream_reserved: boolean;
3303
3362
  }
3304
3363
  export interface CommsSendResultPeerResponseSent {
3364
+ delivery: {
3365
+ durably_resolved: Record<string, unknown>;
3366
+ } | "acked" | "volatile_handed_off" | "queued";
3305
3367
  envelope_id: string;
3306
3368
  in_reply_to: string;
3307
3369
  kind: "peer_response_sent";
@@ -4361,6 +4423,12 @@ export interface SystemNoticeBlockUnknown {
4361
4423
  }
4362
4424
  export type SystemNoticeBlock = SystemNoticeBlockComms | SystemNoticeBlockExternalEvent | SystemNoticeBlockToolConfig | SystemNoticeBlockMcp | SystemNoticeBlockBackgroundJob | SystemNoticeBlockAuth | SystemNoticeBlockRuntimeNotice | SystemNoticeBlockUnknown;
4363
4425
  export type SystemNoticeKind = "generic" | "comms" | "external_event" | "mcp_pending" | "mcp" | "background_job" | "tool_scope" | "tool_scope_warning" | "auth_reauth_required";
4426
+ export type SystemPromptKey = string;
4427
+ export type SystemPromptVersion = number;
4428
+ export interface SystemPromptVersionIdentity {
4429
+ key: SystemPromptKey;
4430
+ version: SystemPromptVersion;
4431
+ }
4364
4432
  export type TranscriptUserRole = "conversational" | "compaction_summary" | "injected_context";
4365
4433
  export type AssistantImageId = string;
4366
4434
  export interface BlobRef {
@@ -4430,6 +4498,7 @@ export type WireServerToolKind = WireServerToolKindWebSearch | WireServerToolKin
4430
4498
  export interface TranscriptRewriteMessageSystem {
4431
4499
  content: string;
4432
4500
  created_at?: string | null;
4501
+ prompt_version?: SystemPromptVersionIdentity | null;
4433
4502
  role: "system";
4434
4503
  }
4435
4504
  export interface TranscriptRewriteMessageSystemNotice {
@@ -4521,6 +4590,7 @@ export interface WireSessionMessageSystem {
4521
4590
  content: string;
4522
4591
  created_at: string;
4523
4592
  identity?: Record<string, unknown> | null;
4593
+ prompt_version?: SystemPromptVersionIdentity | null;
4524
4594
  role: "system";
4525
4595
  }
4526
4596
  export interface WireSessionMessageSystemNotice {