@rkat/sdk 0.8.7 → 0.8.8

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.7";
1
+ export declare const CONTRACT_VERSION = "0.8.8";
2
2
  export type Value = unknown;
3
3
  export interface WireUsage {
4
4
  input_tokens: number;
@@ -203,6 +203,7 @@ export interface WireLiveConfigPropagationReport {
203
203
  }
204
204
  export interface CallbackToolDefinition {
205
205
  description: string;
206
+ execution?: CallbackToolExecution | null;
206
207
  input_schema: unknown;
207
208
  name: ToolName;
208
209
  }
@@ -586,6 +587,7 @@ export interface RuntimeHostFeatureFlags {
586
587
  artifacts: boolean;
587
588
  blobs: boolean;
588
589
  comms: boolean;
590
+ durable_jobs?: boolean;
589
591
  event_replay: boolean;
590
592
  external_members: boolean;
591
593
  mcp_live: boolean;
@@ -690,6 +692,211 @@ export interface WireSessionTranscriptRevisionList {
690
692
  entries: Record<string, unknown>[];
691
693
  head_revision: string;
692
694
  }
695
+ export interface CallbackToolExecutionFast {
696
+ mode: "fast";
697
+ }
698
+ export interface CallbackToolExecutionDetached {
699
+ credential_scopes?: string[];
700
+ idempotency_scope: JobIdempotencyScope;
701
+ mode: "detached";
702
+ restart_class: JobRestartClass;
703
+ runner: JobRunner;
704
+ submission_timeout_ms: number;
705
+ }
706
+ export type CallbackToolExecution = CallbackToolExecutionFast | CallbackToolExecutionDetached;
707
+ export interface JobDeliveryKindRecord {
708
+ kind: "record";
709
+ }
710
+ export interface JobDeliveryKindNotification {
711
+ kind: "notification";
712
+ }
713
+ export interface JobDeliveryKindEvent {
714
+ handling_mode: WireHandlingMode;
715
+ kind: "event";
716
+ }
717
+ export type JobDeliveryKind = JobDeliveryKindRecord | JobDeliveryKindNotification | JobDeliveryKindEvent;
718
+ export type JobHealthStatus = "ok" | "degraded";
719
+ export type JobIdempotencyScope = "tool_call" | "interaction_and_arguments" | "host_semantic_key";
720
+ export type JobPhase = "unsubmitted" | "queued" | "claimed" | "running" | "waiting_external" | "loss_observed" | "retry_scheduled" | "succeeded" | "failed" | "cancelled" | "worker_lost" | "needs_attention";
721
+ export type JobRestartClass = "adoptable" | "checkpoint_resumable" | "replayable" | "non_resumable";
722
+ export interface JobTerminalResultSucceeded {
723
+ kind: "succeeded";
724
+ result_ref?: string | null;
725
+ }
726
+ export interface JobTerminalResultFailed {
727
+ code: string;
728
+ detail_ref?: string | null;
729
+ kind: "failed";
730
+ }
731
+ export interface JobTerminalResultCancelled {
732
+ kind: "cancelled";
733
+ }
734
+ export interface JobTerminalResultWorkerLost {
735
+ kind: "worker_lost";
736
+ }
737
+ export interface JobTerminalResultNeedsAttention {
738
+ kind: "needs_attention";
739
+ reason: string;
740
+ }
741
+ export type JobTerminalResult = JobTerminalResultSucceeded | JobTerminalResultFailed | JobTerminalResultCancelled | JobTerminalResultWorkerLost | JobTerminalResultNeedsAttention;
742
+ export type MonitorOutputProtocol = "framed_jsonl" | "lines";
743
+ export type WireHandlingMode = "queue" | "steer";
744
+ export interface JobArtifactRef {
745
+ reference: string;
746
+ }
747
+ export interface JobAttemptAuthority {
748
+ attempt_id: string;
749
+ fence: number;
750
+ job_id: string;
751
+ }
752
+ export interface JobHealthSummary {
753
+ awaiting_members: number;
754
+ delivery_backlog: number;
755
+ needs_attention: number;
756
+ queued: number;
757
+ running: number;
758
+ stale_leases: number;
759
+ status: JobHealthStatus;
760
+ }
761
+ export interface JobProgress {
762
+ cursor: number;
763
+ detail: string;
764
+ }
765
+ export interface JobRunner {
766
+ name: string;
767
+ version: string;
768
+ }
769
+ export interface JobSummary {
770
+ attempt_count: number;
771
+ cancel_requested: boolean;
772
+ delivery_backlog: number;
773
+ job_id: string;
774
+ phase: JobPhase;
775
+ progress?: JobProgress | null;
776
+ restart_class: JobRestartClass;
777
+ runner: JobRunner;
778
+ subscription_count: number;
779
+ terminal_result?: JobTerminalResult | null;
780
+ }
781
+ export interface JobsArtifactsParams {
782
+ job_id: string;
783
+ }
784
+ export interface JobsArtifactsResult {
785
+ artifacts: JobArtifactRef[];
786
+ job_id: string;
787
+ }
788
+ export interface JobsCancelParams {
789
+ job_id: string;
790
+ }
791
+ export interface JobsCancelResult {
792
+ job: JobSummary;
793
+ }
794
+ export interface JobsGetParams {
795
+ job_id: string;
796
+ }
797
+ export interface JobsGetResult {
798
+ job: JobSummary;
799
+ }
800
+ export interface JobsHealthResult {
801
+ detached_jobs: JobHealthSummary;
802
+ }
803
+ export interface JobsListParams {
804
+ limit?: number | null;
805
+ session_id?: string | null;
806
+ }
807
+ export interface JobsListResult {
808
+ jobs: JobSummary[];
809
+ }
810
+ export interface JobsProgressParams {
811
+ job_id: string;
812
+ }
813
+ export interface JobsProgressResult {
814
+ job_id: string;
815
+ phase: JobPhase;
816
+ progress?: JobProgress | null;
817
+ }
818
+ export interface JobsResultParams {
819
+ job_id: string;
820
+ }
821
+ export interface JobsResultResult {
822
+ job_id: string;
823
+ phase: JobPhase;
824
+ result?: JobTerminalResult | null;
825
+ }
826
+ export interface JobsRetryParams {
827
+ job_id: string;
828
+ retry_due_at_ms: number;
829
+ }
830
+ export interface JobsRetryResult {
831
+ job: JobSummary;
832
+ }
833
+ export interface JobsSubscribeParams {
834
+ delivery: JobDeliveryKind;
835
+ job_id: string;
836
+ session_id: string;
837
+ subscription_id: string;
838
+ }
839
+ export interface JobsSubscribeResult {
840
+ job: JobSummary;
841
+ }
842
+ export interface JobsUnsubscribeParams {
843
+ job_id: string;
844
+ subscription_id: string;
845
+ }
846
+ export interface JobsUnsubscribeResult {
847
+ job: JobSummary;
848
+ }
849
+ export interface MobkitJobCancelAckParams {
850
+ acknowledged_at_ms: number;
851
+ authority: JobAttemptAuthority;
852
+ }
853
+ export interface MobkitJobCheckpointParams {
854
+ authority: JobAttemptAuthority;
855
+ checkpoint_ref: string;
856
+ observed_at_ms: number;
857
+ }
858
+ export interface MobkitJobCompleteParams {
859
+ authority: JobAttemptAuthority;
860
+ completed_at_ms: number;
861
+ result_ref?: string | null;
862
+ }
863
+ export interface MobkitJobFailParams {
864
+ authority: JobAttemptAuthority;
865
+ code: string;
866
+ detail_ref?: string | null;
867
+ failed_at_ms: number;
868
+ }
869
+ export interface MobkitJobHeartbeatParams {
870
+ authority: JobAttemptAuthority;
871
+ heartbeat_at_ms: number;
872
+ lease_expires_at_ms: number;
873
+ }
874
+ export interface MobkitJobMutationResult {
875
+ job: JobSummary;
876
+ }
877
+ export interface MobkitJobProgressParams {
878
+ authority: JobAttemptAuthority;
879
+ cursor: number;
880
+ detail: string;
881
+ observed_at_ms: number;
882
+ }
883
+ export interface MonitorsStartParams {
884
+ command: string;
885
+ delivery: JobDeliveryKind;
886
+ max_line_bytes?: number | null;
887
+ max_notifications_per_window?: number | null;
888
+ max_retained_diagnostic_bytes?: number | null;
889
+ notification_window_ms?: number | null;
890
+ protocol?: MonitorOutputProtocol;
891
+ restart_class: JobRestartClass;
892
+ session_id: string;
893
+ submission_key: string;
894
+ timeout_secs: number;
895
+ working_dir?: string | null;
896
+ }
897
+ export interface MonitorsStartResult {
898
+ job: JobSummary;
899
+ }
693
900
  export interface MobWireParams {
694
901
  member: string;
695
902
  mob_id: string;
@@ -947,19 +1154,19 @@ export interface MobEventsResult {
947
1154
  export interface MobMemberSendParams {
948
1155
  agent_identity: string;
949
1156
  content: WireContentInput;
950
- handling_mode?: "queue" | "steer";
1157
+ handling_mode?: WireHandlingMode;
951
1158
  mob_id: string;
952
1159
  render_metadata?: Record<string, unknown> | null;
953
1160
  }
954
1161
  export interface MobMemberSendResult {
955
1162
  agent_identity: string;
956
- handling_mode: "queue" | "steer";
1163
+ handling_mode: WireHandlingMode;
957
1164
  member_ref: WireMemberRef;
958
1165
  mob_id: string;
959
1166
  }
960
1167
  export interface MobIngressInteractionParams {
961
1168
  content: WireContentInput;
962
- handling_mode?: "queue" | "steer";
1169
+ handling_mode?: WireHandlingMode;
963
1170
  mob_id: string;
964
1171
  render_metadata?: Record<string, unknown> | null;
965
1172
  spec: MobMemberSpecWire;
@@ -1079,9 +1286,11 @@ export interface MobTurnStartParams {
1079
1286
  turn_tool_overlay?: PublicTurnToolOverlay | null;
1080
1287
  }
1081
1288
  export interface MobMemberStatusResult {
1289
+ activity?: Record<string, unknown> | null;
1082
1290
  comms_reachability?: WireReachability | null;
1083
1291
  control_reachability?: WireReachability | null;
1084
1292
  current_session_id?: string | null;
1293
+ detached_jobs?: Record<string, unknown> | null;
1085
1294
  error?: string | null;
1086
1295
  external_member?: unknown;
1087
1296
  freshness_reason?: string | null;
@@ -2314,7 +2523,6 @@ export type MobPeerTarget = {
2314
2523
  } | {
2315
2524
  external: WireTrustedPeerSpec;
2316
2525
  };
2317
- export type WireHandlingMode = "queue" | "steer";
2318
2526
  export type WireRenderClass = "user_prompt" | "peer_message" | "peer_request" | "peer_response" | "external_event" | "flow_step" | "continuation" | "system_notice" | "tool_scope_notice" | "ops_progress";
2319
2527
  export type WireRenderSalience = "background" | "normal" | "important" | "urgent";
2320
2528
  export type WireRuntimeState = "initializing" | "idle" | "attached" | "running" | "retired" | "stopped" | "destroyed";