shuvcode 2.0.0-alpha-15 → 2.0.0-alpha-17

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.
@@ -6,9 +6,6 @@ export type ServiceHealth = {
6
6
  version: string;
7
7
  pid: number;
8
8
  };
9
- export type ServiceStopResponse = {
10
- accepted: boolean;
11
- };
12
9
  export type ModelRef = {
13
10
  id: string;
14
11
  providerID: string;
@@ -19,8 +16,16 @@ export type ProviderSettings = {
19
16
  };
20
17
  export type AgentColor = string;
21
18
  export type PermissionEffect = "allow" | "deny" | "ask";
22
- export type PluginInfo = {
23
- id: string;
19
+ export type PluginSource = {
20
+ type: "builtin";
21
+ } | {
22
+ type: "package";
23
+ package: string;
24
+ } | {
25
+ type: "local";
26
+ path: string;
27
+ } | {
28
+ type: "sdk";
24
29
  };
25
30
  export type SessionForkBoundary = {
26
31
  type: "before";
@@ -43,6 +48,9 @@ export type LocationRef = {
43
48
  directory: string;
44
49
  workspaceID?: string;
45
50
  };
51
+ export type SessionMetadata = {
52
+ [x: string]: JsonValue;
53
+ };
46
54
  export type FileDiffInfo = {
47
55
  file: string;
48
56
  patch: string;
@@ -51,6 +59,24 @@ export type FileDiffInfo = {
51
59
  status: "added" | "deleted" | "modified";
52
60
  };
53
61
  export type SessionPolicyToolID = string;
62
+ export type SessionStatsToolTotals = {
63
+ calls: number;
64
+ succeeded: number;
65
+ failed: number;
66
+ unfinished: number;
67
+ };
68
+ export type SessionStatsToolUsage = {
69
+ name: string;
70
+ calls: number;
71
+ succeeded: number;
72
+ failed: number;
73
+ unfinished: number;
74
+ durationP50?: number;
75
+ };
76
+ export type SessionStatsActivity = {
77
+ date: string;
78
+ steps: number;
79
+ };
54
80
  export type SessionMessageAgentSelected = {
55
81
  id: string;
56
82
  metadata?: {
@@ -75,9 +101,6 @@ export type PromptMention = {
75
101
  end: number;
76
102
  text: string;
77
103
  };
78
- export type StructuredOutputJsonSchema = {
79
- [x: string]: JsonValue;
80
- };
81
104
  export type SessionMessageSynthetic = {
82
105
  id: string;
83
106
  metadata?: {
@@ -167,10 +190,6 @@ export type SessionStructuredError = {
167
190
  message: string;
168
191
  status?: number;
169
192
  };
170
- export type SessionMessageAssistantStructured = {
171
- type: "structured";
172
- value: JsonValue;
173
- };
174
193
  export type SessionMessageCompactionRunning = {
175
194
  type: "compaction";
176
195
  id: string;
@@ -212,6 +231,22 @@ export type SessionInboxSyntheticPayload = {
212
231
  };
213
232
  export type SessionInboxCompactionPayload = {};
214
233
  export type InstructionEntryKey = string;
234
+ export type SessionDynamicToolDefinition = {
235
+ name: string;
236
+ description: string;
237
+ parameters?: {
238
+ [x: string]: JsonValue;
239
+ };
240
+ };
241
+ export type SessionDynamicToolCall = {
242
+ callID: string;
243
+ sessionID: string;
244
+ tool: string;
245
+ input: JsonValue;
246
+ time: {
247
+ requested: number;
248
+ };
249
+ };
215
250
  export type SessionGenerateResponse = {
216
251
  data: {
217
252
  text: string;
@@ -241,16 +276,7 @@ export type ShellInfo = {
241
276
  completed?: number;
242
277
  };
243
278
  };
244
- export type SessionMessageProviderState4 = {
245
- [x: string]: any;
246
- };
247
- export type SessionMessageProviderState5 = {
248
- [x: string]: any;
249
- };
250
- export type SessionMessageProviderState6 = {
251
- [x: string]: any;
252
- };
253
- export type SessionMessageProviderState7 = {
279
+ export type SessionMessageProviderState1 = {
254
280
  [x: string]: any;
255
281
  };
256
282
  export type ToolFileContent1 = {
@@ -259,23 +285,30 @@ export type ToolFileContent1 = {
259
285
  mime: string;
260
286
  name?: string | undefined;
261
287
  };
262
- export type SessionMessageProviderState8 = {
263
- [x: string]: any;
264
- };
265
- export type SessionMessageProviderState9 = {
266
- [x: string]: any;
288
+ export type SessionMessageToolStateRunning1 = {
289
+ status: "running";
290
+ input: {
291
+ [x: string]: any;
292
+ };
293
+ metadata: {
294
+ [x: string]: JsonValue;
295
+ };
267
296
  };
268
297
  export type EventLogSynced = {
269
298
  type: "log.synced";
270
299
  aggregateID: string;
271
300
  seq?: number;
272
301
  };
302
+ export type SessionInterruptResponse = {
303
+ interrupted: boolean;
304
+ };
273
305
  export type ModelReasoningField = "reasoning" | "reasoning_content" | "reasoning_text" | (string & {});
274
306
  export type ModelMaxTokensField = "max_completion_tokens" | "max_tokens";
275
307
  export type ModelCapabilities = {
276
308
  tools: boolean;
277
309
  input: Array<string>;
278
310
  output: Array<string>;
311
+ responsesWebsockets?: boolean;
279
312
  };
280
313
  export type ModelVariant = {
281
314
  id: string;
@@ -445,7 +478,7 @@ export type McpResourceTemplate = {
445
478
  description?: string;
446
479
  mimeType?: string;
447
480
  };
448
- export type ProjectVcs = "git" | "hg";
481
+ export type ProjectVcs = string;
449
482
  export type ProjectIcon = {
450
483
  url?: string;
451
484
  override?: string;
@@ -483,6 +516,10 @@ export type FileSystemEntry = {
483
516
  path: string;
484
517
  type: "file" | "directory";
485
518
  };
519
+ export type CommandInfo = {
520
+ name: string;
521
+ description?: string;
522
+ };
486
523
  export type SkillInfo = {
487
524
  id: string;
488
525
  name: string;
@@ -492,6 +529,13 @@ export type SkillInfo = {
492
529
  location: string;
493
530
  content: string;
494
531
  };
532
+ export type SessionDynamicToolDefinition1 = {
533
+ name: string;
534
+ description: string;
535
+ parameters?: {
536
+ [x: string]: any;
537
+ };
538
+ };
495
539
  export type PermissionReply = "once" | "always" | "reject";
496
540
  export type Pty = {
497
541
  id: string;
@@ -503,6 +547,26 @@ export type Pty = {
503
547
  pid: number;
504
548
  exitCode?: number;
505
549
  };
550
+ export type PersistentPtyInfo = {
551
+ id: string;
552
+ title: string;
553
+ command: string;
554
+ args: Array<string>;
555
+ cwd: string;
556
+ status: "running" | "exited";
557
+ pid: number;
558
+ exitCode?: number;
559
+ sessionID: string;
560
+ foregroundProcess: string | null;
561
+ size: {
562
+ cols: number;
563
+ rows: number;
564
+ };
565
+ output: {
566
+ head: number;
567
+ tail: number;
568
+ };
569
+ };
506
570
  export type FormMetadata1 = {
507
571
  [x: string]: any;
508
572
  };
@@ -529,6 +593,31 @@ export type SessionStatus = {
529
593
  } | {
530
594
  type: "busy";
531
595
  };
596
+ export type PtyTicketConnectToken = {
597
+ ticket: string;
598
+ expires_in: number;
599
+ };
600
+ export type PersistentPtyReadResult = {
601
+ ptyID: string;
602
+ title: string;
603
+ cwd: string;
604
+ foregroundProcess: string | null;
605
+ screen: {
606
+ text: string;
607
+ cols: number;
608
+ rows: number;
609
+ cursor: {
610
+ x: number;
611
+ y: number;
612
+ };
613
+ };
614
+ };
615
+ export type PersistentPtyHandoff = {
616
+ directory: string;
617
+ instanceID: string;
618
+ ticket: string;
619
+ expiresAt: number;
620
+ };
532
621
  export type ShellInfo1 = {
533
622
  id: string;
534
623
  status: "running" | "exited" | "timeout" | "killed";
@@ -566,16 +655,25 @@ export type WorktreeDirectory = {
566
655
  export type WorktreeInfo = {
567
656
  directory: string;
568
657
  };
658
+ export type WorkspaceDestroyResult = {
659
+ destroyed: boolean;
660
+ };
569
661
  export type VcsBranch = {
570
662
  current?: string;
571
663
  default?: string;
572
664
  };
665
+ export type VcsBase = {
666
+ name: string;
667
+ ref: string;
668
+ source: "reflog" | "default";
669
+ };
573
670
  export type VcsFileStatus = {
574
671
  file: string;
575
672
  additions: number;
576
673
  deletions: number;
577
674
  status: "added" | "deleted" | "modified";
578
675
  };
676
+ export type VcsBranchList = Array<string>;
579
677
  export type WebSearchProvider = {
580
678
  id: string;
581
679
  name: string;
@@ -588,26 +686,6 @@ export type WebSearchResult = {
588
686
  published?: number;
589
687
  };
590
688
  };
591
- export type SessionMessageModelSelected = {
592
- id: string;
593
- metadata?: {
594
- [x: string]: JsonValue;
595
- };
596
- time: {
597
- created: number;
598
- };
599
- type: "model-switched";
600
- model: ModelRef;
601
- previous?: ModelRef;
602
- };
603
- export type CommandInfo = {
604
- name: string;
605
- template: string;
606
- description?: string;
607
- agent?: string;
608
- model?: ModelRef;
609
- subtask?: boolean;
610
- };
611
689
  export type ProviderRequest = {
612
690
  settings: ProviderSettings;
613
691
  headers: {
@@ -622,6 +700,18 @@ export type PermissionRule = {
622
700
  resource: string;
623
701
  effect: PermissionEffect;
624
702
  };
703
+ export type PluginInfo = {
704
+ id: string;
705
+ source: PluginSource;
706
+ status: "active";
707
+ tui: boolean;
708
+ } | {
709
+ id?: string;
710
+ source: PluginSource;
711
+ status: "failed";
712
+ error: string;
713
+ tui: boolean;
714
+ };
625
715
  export type SessionMessageLocationSwitched = {
626
716
  id: string;
627
717
  metadata?: {
@@ -645,6 +735,128 @@ export type SessionInboxMovePayload = {
645
735
  projectID: string;
646
736
  subpath?: string;
647
737
  };
738
+ export type V2EventServerConnected = {
739
+ id: string;
740
+ metadata?: {
741
+ [x: string]: any;
742
+ } | undefined;
743
+ location?: LocationRef | undefined;
744
+ type: "server.connected";
745
+ data: {};
746
+ };
747
+ export type SessionRevert = {
748
+ messageID: string;
749
+ partID?: string;
750
+ snapshot?: string;
751
+ files?: Array<FileDiffInfo>;
752
+ };
753
+ export type SessionPolicyTools = {
754
+ allow: Array<SessionPolicyToolID>;
755
+ };
756
+ export type SessionStatsTools = {
757
+ mode: "none";
758
+ } | {
759
+ mode: "summary";
760
+ totals: SessionStatsToolTotals;
761
+ } | {
762
+ mode: "detail";
763
+ totals: SessionStatsToolTotals;
764
+ usage: Array<SessionStatsToolUsage>;
765
+ };
766
+ export type SessionStatsModelUsage = {
767
+ model: ModelRef;
768
+ steps: number;
769
+ tokens: TokenUsageInfo;
770
+ cost: MoneyUSD;
771
+ };
772
+ export type SessionMessageModelSelected = {
773
+ id: string;
774
+ metadata?: {
775
+ [x: string]: JsonValue;
776
+ };
777
+ time: {
778
+ created: number;
779
+ };
780
+ type: "model-switched";
781
+ model: ModelRef;
782
+ previous?: ModelRef;
783
+ };
784
+ export type PromptFileAttachment = {
785
+ data: PromptBase64;
786
+ mime: string;
787
+ source: PromptFileSource;
788
+ name?: string;
789
+ description?: string;
790
+ mention?: PromptMention;
791
+ };
792
+ export type PromptAgentAttachment = {
793
+ name: string;
794
+ mention?: PromptMention;
795
+ };
796
+ export type PromptSkillAttachment = {
797
+ id: string;
798
+ name: string;
799
+ text?: string;
800
+ mention?: PromptMention;
801
+ };
802
+ export type SessionMessageAssistantText = {
803
+ type: "text";
804
+ text: string;
805
+ state?: SessionMessageProviderState;
806
+ };
807
+ export type SessionMessageAssistantReasoning = {
808
+ type: "reasoning";
809
+ text: string;
810
+ state?: SessionMessageProviderState;
811
+ time?: {
812
+ created: number;
813
+ completed?: number;
814
+ };
815
+ };
816
+ export type ToolContent = ToolTextContent | ToolFileContent;
817
+ export type SessionMessageAssistantRetry = {
818
+ attempt: number;
819
+ at: number;
820
+ error: SessionStructuredError;
821
+ };
822
+ export type SessionMessageCompactionFailed = {
823
+ type: "compaction";
824
+ id: string;
825
+ metadata?: {
826
+ [x: string]: JsonValue;
827
+ };
828
+ time: {
829
+ created: number;
830
+ };
831
+ status: "failed";
832
+ reason: "auto" | "manual";
833
+ error: SessionStructuredError;
834
+ };
835
+ export type SessionInboxSynthetic = {
836
+ id: string;
837
+ sessionID: string;
838
+ timeCreated: number;
839
+ type: "synthetic";
840
+ payload: SessionInboxSyntheticPayload;
841
+ delivery: SessionInboxDelivery;
842
+ };
843
+ export type SessionInboxCompaction = {
844
+ id: string;
845
+ sessionID: string;
846
+ timeCreated: number;
847
+ type: "compaction";
848
+ payload: SessionInboxCompactionPayload;
849
+ delivery: SessionInboxDelivery;
850
+ };
851
+ export type InstructionEntryInfo = {
852
+ key: InstructionEntryKey;
853
+ value: JsonValue;
854
+ };
855
+ export type InstructionEntrySnapshot = Array<{
856
+ key: InstructionEntryKey;
857
+ value: JsonValue;
858
+ removed: boolean;
859
+ }>;
648
860
  export type SessionAgentSelected = {
649
861
  id: string;
650
862
  created: number;
@@ -721,6 +933,24 @@ export type SessionRenamed = {
721
933
  title: string;
722
934
  };
723
935
  };
936
+ export type SessionViewed = {
937
+ id: string;
938
+ created: number;
939
+ metadata?: {
940
+ [x: string]: any;
941
+ };
942
+ type: "session.viewed";
943
+ durable: {
944
+ aggregateID: string;
945
+ seq: number;
946
+ version: 1;
947
+ };
948
+ location?: LocationRef;
949
+ data: {
950
+ sessionID: string;
951
+ idle: number;
952
+ };
953
+ };
724
954
  export type SessionDeleted = {
725
955
  id: string;
726
956
  created: number;
@@ -774,13 +1004,13 @@ export type SessionInboxCancelled = {
774
1004
  inboxID: string;
775
1005
  };
776
1006
  };
777
- export type SessionExecutionStarted = {
1007
+ export type SessionInboxDeliveryChanged = {
778
1008
  id: string;
779
1009
  created: number;
780
1010
  metadata?: {
781
1011
  [x: string]: any;
782
1012
  };
783
- type: "session.execution.started";
1013
+ type: "session.inbox.delivery.changed";
784
1014
  durable: {
785
1015
  aggregateID: string;
786
1016
  seq: number;
@@ -789,15 +1019,17 @@ export type SessionExecutionStarted = {
789
1019
  location?: LocationRef;
790
1020
  data: {
791
1021
  sessionID: string;
1022
+ inboxID: string;
1023
+ delivery: SessionInboxDelivery;
792
1024
  };
793
1025
  };
794
- export type SessionExecutionSucceeded = {
1026
+ export type SessionExecutionStarted = {
795
1027
  id: string;
796
1028
  created: number;
797
1029
  metadata?: {
798
1030
  [x: string]: any;
799
1031
  };
800
- type: "session.execution.succeeded";
1032
+ type: "session.execution.started";
801
1033
  durable: {
802
1034
  aggregateID: string;
803
1035
  seq: number;
@@ -808,13 +1040,13 @@ export type SessionExecutionSucceeded = {
808
1040
  sessionID: string;
809
1041
  };
810
1042
  };
811
- export type SessionExecutionInterrupted = {
1043
+ export type SessionExecutionSucceeded = {
812
1044
  id: string;
813
1045
  created: number;
814
1046
  metadata?: {
815
1047
  [x: string]: any;
816
1048
  };
817
- type: "session.execution.interrupted";
1049
+ type: "session.execution.succeeded";
818
1050
  durable: {
819
1051
  aggregateID: string;
820
1052
  seq: number;
@@ -823,37 +1055,33 @@ export type SessionExecutionInterrupted = {
823
1055
  location?: LocationRef;
824
1056
  data: {
825
1057
  sessionID: string;
826
- reason: "user" | "shutdown" | "superseded";
827
1058
  };
828
1059
  };
829
- export type SessionInstructionsUpdated = {
1060
+ export type SessionExecutionFailed = {
830
1061
  id: string;
831
1062
  created: number;
832
1063
  metadata?: {
833
1064
  [x: string]: any;
834
1065
  };
835
- type: "session.instructions.updated";
1066
+ type: "session.execution.failed";
836
1067
  durable: {
837
1068
  aggregateID: string;
838
1069
  seq: number;
839
- version: 2;
1070
+ version: 1;
840
1071
  };
841
1072
  location?: LocationRef;
842
1073
  data: {
843
1074
  sessionID: string;
844
- delta: {
845
- [x: string]: string | "removed";
846
- };
847
- text?: string;
1075
+ error: SessionStructuredError;
848
1076
  };
849
1077
  };
850
- export type SessionSynthetic = {
1078
+ export type SessionExecutionInterrupted = {
851
1079
  id: string;
852
1080
  created: number;
853
1081
  metadata?: {
854
1082
  [x: string]: any;
855
1083
  };
856
- type: "session.synthetic";
1084
+ type: "session.execution.interrupted";
857
1085
  durable: {
858
1086
  aggregateID: string;
859
1087
  seq: number;
@@ -862,8 +1090,47 @@ export type SessionSynthetic = {
862
1090
  location?: LocationRef;
863
1091
  data: {
864
1092
  sessionID: string;
865
- text: string;
866
- description?: string;
1093
+ reason: "user" | "shutdown" | "superseded";
1094
+ };
1095
+ };
1096
+ export type SessionInstructionsUpdated = {
1097
+ id: string;
1098
+ created: number;
1099
+ metadata?: {
1100
+ [x: string]: any;
1101
+ };
1102
+ type: "session.instructions.updated";
1103
+ durable: {
1104
+ aggregateID: string;
1105
+ seq: number;
1106
+ version: 2;
1107
+ };
1108
+ location?: LocationRef;
1109
+ data: {
1110
+ sessionID: string;
1111
+ delta: {
1112
+ [x: string]: string | "removed";
1113
+ };
1114
+ text?: string;
1115
+ };
1116
+ };
1117
+ export type SessionSynthetic = {
1118
+ id: string;
1119
+ created: number;
1120
+ metadata?: {
1121
+ [x: string]: any;
1122
+ };
1123
+ type: "session.synthetic";
1124
+ durable: {
1125
+ aggregateID: string;
1126
+ seq: number;
1127
+ version: 1;
1128
+ };
1129
+ location?: LocationRef;
1130
+ data: {
1131
+ sessionID: string;
1132
+ text: string;
1133
+ description?: string;
867
1134
  metadata?: {
868
1135
  [x: string]: any;
869
1136
  };
@@ -910,13 +1177,13 @@ export type SessionStepStarted = {
910
1177
  snapshot?: string;
911
1178
  };
912
1179
  };
913
- export type SessionStepEnded = {
1180
+ export type SessionStepStreamed = {
914
1181
  id: string;
915
1182
  created: number;
916
1183
  metadata?: {
917
1184
  [x: string]: any;
918
1185
  };
919
- type: "session.step.ended";
1186
+ type: "session.step.streamed";
920
1187
  durable: {
921
1188
  aggregateID: string;
922
1189
  seq: number;
@@ -926,11 +1193,6 @@ export type SessionStepEnded = {
926
1193
  data: {
927
1194
  sessionID: string;
928
1195
  assistantMessageID: string;
929
- finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
930
- cost: MoneyUSD;
931
- tokens: TokenUsageInfo;
932
- snapshot?: string;
933
- files?: Array<string>;
934
1196
  };
935
1197
  };
936
1198
  export type SessionTextStarted = {
@@ -952,13 +1214,13 @@ export type SessionTextStarted = {
952
1214
  ordinal: number;
953
1215
  };
954
1216
  };
955
- export type SessionStructuredCompleted = {
1217
+ export type SessionToolInputStarted = {
956
1218
  id: string;
957
1219
  created: number;
958
1220
  metadata?: {
959
1221
  [x: string]: any;
960
1222
  };
961
- type: "session.structured.completed";
1223
+ type: "session.tool.input.started";
962
1224
  durable: {
963
1225
  aggregateID: string;
964
1226
  seq: number;
@@ -968,16 +1230,17 @@ export type SessionStructuredCompleted = {
968
1230
  data: {
969
1231
  sessionID: string;
970
1232
  assistantMessageID: string;
971
- value: JsonValue;
1233
+ id: string;
1234
+ name: string;
972
1235
  };
973
1236
  };
974
- export type SessionToolInputStarted = {
1237
+ export type SessionToolInputEnded = {
975
1238
  id: string;
976
1239
  created: number;
977
1240
  metadata?: {
978
1241
  [x: string]: any;
979
1242
  };
980
- type: "session.tool.input.started";
1243
+ type: "session.tool.input.ended";
981
1244
  durable: {
982
1245
  aggregateID: string;
983
1246
  seq: number;
@@ -988,16 +1251,16 @@ export type SessionToolInputStarted = {
988
1251
  sessionID: string;
989
1252
  assistantMessageID: string;
990
1253
  id: string;
991
- name: string;
1254
+ text: string;
992
1255
  };
993
1256
  };
994
- export type SessionToolInputEnded = {
1257
+ export type SessionRetryScheduled = {
995
1258
  id: string;
996
1259
  created: number;
997
1260
  metadata?: {
998
1261
  [x: string]: any;
999
1262
  };
1000
- type: "session.tool.input.ended";
1263
+ type: "session.retry.scheduled";
1001
1264
  durable: {
1002
1265
  aggregateID: string;
1003
1266
  seq: number;
@@ -1007,8 +1270,9 @@ export type SessionToolInputEnded = {
1007
1270
  data: {
1008
1271
  sessionID: string;
1009
1272
  assistantMessageID: string;
1010
- id: string;
1011
- text: string;
1273
+ attempt: number;
1274
+ at: number;
1275
+ error: SessionStructuredError;
1012
1276
  };
1013
1277
  };
1014
1278
  export type SessionCompactionStarted = {
@@ -1051,6 +1315,26 @@ export type SessionCompactionEnded = {
1051
1315
  recent: string;
1052
1316
  };
1053
1317
  };
1318
+ export type SessionCompactionFailed = {
1319
+ id: string;
1320
+ created: number;
1321
+ metadata?: {
1322
+ [x: string]: any;
1323
+ };
1324
+ type: "session.compaction.failed";
1325
+ durable: {
1326
+ aggregateID: string;
1327
+ seq: number;
1328
+ version: 1;
1329
+ };
1330
+ location?: LocationRef;
1331
+ data: {
1332
+ sessionID: string;
1333
+ reason: "auto" | "manual";
1334
+ error: SessionStructuredError;
1335
+ inputID?: string;
1336
+ };
1337
+ };
1054
1338
  export type SessionRevertCleared = {
1055
1339
  id: string;
1056
1340
  created: number;
@@ -1116,27 +1400,38 @@ export type ModelsDevRefreshed = {
1116
1400
  location?: LocationRef;
1117
1401
  data: {};
1118
1402
  };
1119
- export type IntegrationUpdated = {
1403
+ export type CredentialUpdated = {
1120
1404
  id: string;
1121
1405
  created: number;
1122
1406
  metadata?: {
1123
1407
  [x: string]: any;
1124
1408
  };
1125
- type: "integration.updated";
1409
+ type: "credential.updated";
1126
1410
  location?: LocationRef;
1127
1411
  data: {};
1128
1412
  };
1129
- export type IntegrationConnectionUpdated = {
1413
+ export type CredentialSwitched = {
1130
1414
  id: string;
1131
1415
  created: number;
1132
1416
  metadata?: {
1133
1417
  [x: string]: any;
1134
1418
  };
1135
- type: "integration.connection.updated";
1419
+ type: "credential.switched";
1136
1420
  location?: LocationRef;
1137
1421
  data: {
1138
1422
  integrationID: string;
1423
+ credentialID: string | null;
1424
+ };
1425
+ };
1426
+ export type IntegrationUpdated = {
1427
+ id: string;
1428
+ created: number;
1429
+ metadata?: {
1430
+ [x: string]: any;
1139
1431
  };
1432
+ type: "integration.updated";
1433
+ location?: LocationRef;
1434
+ data: {};
1140
1435
  };
1141
1436
  export type CatalogUpdated = {
1142
1437
  id: string;
@@ -1247,6 +1542,47 @@ export type SessionCompactionDelta = {
1247
1542
  text: string;
1248
1543
  };
1249
1544
  };
1545
+ export type SessionToolDynamicRequested = {
1546
+ id: string;
1547
+ created: number;
1548
+ metadata?: {
1549
+ [x: string]: any;
1550
+ };
1551
+ type: "session.tool.dynamic.requested";
1552
+ location?: LocationRef;
1553
+ data: {
1554
+ sessionID: string;
1555
+ callID: string;
1556
+ tool: string;
1557
+ input: JsonValue;
1558
+ };
1559
+ };
1560
+ export type SessionToolDynamicReplied = {
1561
+ id: string;
1562
+ created: number;
1563
+ metadata?: {
1564
+ [x: string]: any;
1565
+ };
1566
+ type: "session.tool.dynamic.replied";
1567
+ location?: LocationRef;
1568
+ data: {
1569
+ sessionID: string;
1570
+ callID: string;
1571
+ };
1572
+ };
1573
+ export type SessionToolDynamicCancelled = {
1574
+ id: string;
1575
+ created: number;
1576
+ metadata?: {
1577
+ [x: string]: any;
1578
+ };
1579
+ type: "session.tool.dynamic.cancelled";
1580
+ location?: LocationRef;
1581
+ data: {
1582
+ sessionID: string;
1583
+ callID: string;
1584
+ };
1585
+ };
1250
1586
  export type FilesystemChanged = {
1251
1587
  id: string;
1252
1588
  created: number;
@@ -1321,6 +1657,7 @@ export type WorktreeResolved = {
1321
1657
  projectID: string;
1322
1658
  directory: string;
1323
1659
  previous: string;
1660
+ adopted?: Array<string>;
1324
1661
  };
1325
1662
  };
1326
1663
  export type CommandUpdated = {
@@ -1378,6 +1715,19 @@ export type PtyDeleted = {
1378
1715
  id: string;
1379
1716
  };
1380
1717
  };
1718
+ export type PersistentPtyRemoved = {
1719
+ id: string;
1720
+ created: number;
1721
+ metadata?: {
1722
+ [x: string]: any;
1723
+ };
1724
+ type: "persistent-pty.removed";
1725
+ location?: LocationRef;
1726
+ data: {
1727
+ sessionID: string;
1728
+ ptyID: string;
1729
+ };
1730
+ };
1381
1731
  export type ShellExited = {
1382
1732
  id: string;
1383
1733
  created: number;
@@ -1550,87 +1900,67 @@ export type McpResourcesChanged = {
1550
1900
  server: string;
1551
1901
  };
1552
1902
  };
1553
- export type V2EventServerConnected = {
1903
+ export type SessionShellStarted = {
1554
1904
  id: string;
1905
+ created: number;
1555
1906
  metadata?: {
1556
1907
  [x: string]: any;
1557
- } | undefined;
1558
- location?: LocationRef | undefined;
1559
- type: "server.connected";
1560
- data: {};
1561
- };
1562
- export type SessionRevert = {
1563
- messageID: string;
1564
- partID?: string;
1565
- snapshot?: string;
1566
- files?: Array<FileDiffInfo>;
1567
- };
1568
- export type SessionPolicyTools = {
1569
- allow: Array<SessionPolicyToolID>;
1570
- };
1571
- export type PromptFileAttachment = {
1572
- data: PromptBase64;
1573
- mime: string;
1574
- source: PromptFileSource;
1575
- name?: string;
1576
- description?: string;
1577
- mention?: PromptMention;
1578
- };
1579
- export type PromptAgentAttachment = {
1580
- name: string;
1581
- mention?: PromptMention;
1908
+ };
1909
+ type: "session.shell.started";
1910
+ durable: {
1911
+ aggregateID: string;
1912
+ seq: number;
1913
+ version: 1;
1914
+ };
1915
+ location?: LocationRef;
1916
+ data: {
1917
+ sessionID: string;
1918
+ shell: ShellInfo;
1919
+ };
1582
1920
  };
1583
- export type PromptSkillAttachment = {
1921
+ export type SessionShellEnded = {
1584
1922
  id: string;
1585
- name: string;
1586
- text: string;
1587
- mention?: PromptMention;
1588
- };
1589
- export type StructuredOutputRequest = {
1590
- schema: StructuredOutputJsonSchema;
1591
- name?: string;
1592
- description?: string;
1593
- };
1594
- export type SessionMessageAssistantText = {
1595
- type: "text";
1596
- text: string;
1597
- state?: SessionMessageProviderState;
1598
- };
1599
- export type SessionMessageAssistantReasoning = {
1600
- type: "reasoning";
1601
- text: string;
1602
- state?: SessionMessageProviderState;
1603
- time?: {
1604
- created: number;
1605
- completed?: number;
1923
+ created: number;
1924
+ metadata?: {
1925
+ [x: string]: any;
1926
+ };
1927
+ type: "session.shell.ended";
1928
+ durable: {
1929
+ aggregateID: string;
1930
+ seq: number;
1931
+ version: 1;
1932
+ };
1933
+ location?: LocationRef;
1934
+ data: {
1935
+ sessionID: string;
1936
+ shell: ShellInfo;
1937
+ output: {
1938
+ output: string;
1939
+ cursor: number;
1940
+ size: number;
1941
+ truncated: boolean;
1942
+ };
1606
1943
  };
1607
1944
  };
1608
- export type ToolContent = ToolTextContent | ToolFileContent;
1609
- export type SessionMessageAssistantRetry = {
1610
- attempt: number;
1611
- at: number;
1612
- error: SessionStructuredError;
1613
- };
1614
- export type SessionMessageCompactionFailed = {
1615
- type: "compaction";
1945
+ export type ShellCreated = {
1616
1946
  id: string;
1947
+ created: number;
1617
1948
  metadata?: {
1618
- [x: string]: JsonValue;
1949
+ [x: string]: any;
1619
1950
  };
1620
- time: {
1621
- created: number;
1951
+ type: "shell.created";
1952
+ location?: LocationRef;
1953
+ data: {
1954
+ info: ShellInfo;
1622
1955
  };
1623
- status: "failed";
1624
- reason: "auto" | "manual";
1625
- error: SessionStructuredError;
1626
1956
  };
1627
- export type SessionExecutionFailed = {
1957
+ export type SessionStepEnded = {
1628
1958
  id: string;
1629
1959
  created: number;
1630
1960
  metadata?: {
1631
1961
  [x: string]: any;
1632
1962
  };
1633
- type: "session.execution.failed";
1963
+ type: "session.step.ended";
1634
1964
  durable: {
1635
1965
  aggregateID: string;
1636
1966
  seq: number;
@@ -1639,7 +1969,14 @@ export type SessionExecutionFailed = {
1639
1969
  location?: LocationRef;
1640
1970
  data: {
1641
1971
  sessionID: string;
1642
- error: SessionStructuredError;
1972
+ assistantMessageID: string;
1973
+ finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
1974
+ rawFinish?: string;
1975
+ providerState?: SessionMessageProviderState1;
1976
+ cost: MoneyUSD;
1977
+ tokens: TokenUsageInfo;
1978
+ snapshot?: string;
1979
+ files?: Array<string>;
1643
1980
  };
1644
1981
  };
1645
1982
  export type SessionStepFailed = {
@@ -1659,172 +1996,22 @@ export type SessionStepFailed = {
1659
1996
  sessionID: string;
1660
1997
  assistantMessageID: string;
1661
1998
  error: SessionStructuredError;
1999
+ finish?: "content-filter";
2000
+ rawFinish?: string;
2001
+ providerState?: SessionMessageProviderState1;
1662
2002
  cost?: MoneyUSD;
1663
2003
  tokens?: TokenUsageInfo;
1664
2004
  snapshot?: string;
1665
2005
  files?: Array<string>;
1666
2006
  };
1667
2007
  };
1668
- export type SessionStructuredFailed = {
2008
+ export type SessionTextEnded = {
1669
2009
  id: string;
1670
2010
  created: number;
1671
2011
  metadata?: {
1672
2012
  [x: string]: any;
1673
2013
  };
1674
- type: "session.structured.failed";
1675
- durable: {
1676
- aggregateID: string;
1677
- seq: number;
1678
- version: 1;
1679
- };
1680
- location?: LocationRef;
1681
- data: {
1682
- sessionID: string;
1683
- assistantMessageID: string;
1684
- error: SessionStructuredError;
1685
- };
1686
- };
1687
- export type SessionRetryScheduled = {
1688
- id: string;
1689
- created: number;
1690
- metadata?: {
1691
- [x: string]: any;
1692
- };
1693
- type: "session.retry.scheduled";
1694
- durable: {
1695
- aggregateID: string;
1696
- seq: number;
1697
- version: 1;
1698
- };
1699
- location?: LocationRef;
1700
- data: {
1701
- sessionID: string;
1702
- assistantMessageID: string;
1703
- attempt: number;
1704
- at: number;
1705
- error: SessionStructuredError;
1706
- };
1707
- };
1708
- export type SessionCompactionFailed = {
1709
- id: string;
1710
- created: number;
1711
- metadata?: {
1712
- [x: string]: any;
1713
- };
1714
- type: "session.compaction.failed";
1715
- durable: {
1716
- aggregateID: string;
1717
- seq: number;
1718
- version: 1;
1719
- };
1720
- location?: LocationRef;
1721
- data: {
1722
- sessionID: string;
1723
- reason: "auto" | "manual";
1724
- error: SessionStructuredError;
1725
- inputID?: string;
1726
- };
1727
- };
1728
- export type SessionInboxDeliveryChanged = {
1729
- id: string;
1730
- created: number;
1731
- metadata?: {
1732
- [x: string]: any;
1733
- };
1734
- type: "session.inbox.delivery.changed";
1735
- durable: {
1736
- aggregateID: string;
1737
- seq: number;
1738
- version: 1;
1739
- };
1740
- location?: LocationRef;
1741
- data: {
1742
- sessionID: string;
1743
- inboxID: string;
1744
- delivery: SessionInboxDelivery;
1745
- };
1746
- };
1747
- export type SessionInboxSynthetic = {
1748
- id: string;
1749
- sessionID: string;
1750
- timeCreated: number;
1751
- type: "synthetic";
1752
- payload: SessionInboxSyntheticPayload;
1753
- delivery: SessionInboxDelivery;
1754
- };
1755
- export type SessionInboxCompaction = {
1756
- id: string;
1757
- sessionID: string;
1758
- timeCreated: number;
1759
- type: "compaction";
1760
- payload: SessionInboxCompactionPayload;
1761
- delivery: SessionInboxDelivery;
1762
- };
1763
- export type InstructionEntryInfo = {
1764
- key: InstructionEntryKey;
1765
- value: JsonValue;
1766
- };
1767
- export type SessionShellStarted = {
1768
- id: string;
1769
- created: number;
1770
- metadata?: {
1771
- [x: string]: any;
1772
- };
1773
- type: "session.shell.started";
1774
- durable: {
1775
- aggregateID: string;
1776
- seq: number;
1777
- version: 1;
1778
- };
1779
- location?: LocationRef;
1780
- data: {
1781
- sessionID: string;
1782
- shell: ShellInfo;
1783
- };
1784
- };
1785
- export type SessionShellEnded = {
1786
- id: string;
1787
- created: number;
1788
- metadata?: {
1789
- [x: string]: any;
1790
- };
1791
- type: "session.shell.ended";
1792
- durable: {
1793
- aggregateID: string;
1794
- seq: number;
1795
- version: 1;
1796
- };
1797
- location?: LocationRef;
1798
- data: {
1799
- sessionID: string;
1800
- shell: ShellInfo;
1801
- output: {
1802
- output: string;
1803
- cursor: number;
1804
- size: number;
1805
- truncated: boolean;
1806
- };
1807
- };
1808
- };
1809
- export type ShellCreated = {
1810
- id: string;
1811
- created: number;
1812
- metadata?: {
1813
- [x: string]: any;
1814
- };
1815
- type: "shell.created";
1816
- location?: LocationRef;
1817
- data: {
1818
- info: ShellInfo;
1819
- };
1820
- };
1821
- export type SessionTextEnded = {
1822
- id: string;
1823
- created: number;
1824
- metadata?: {
1825
- [x: string]: any;
1826
- };
1827
- type: "session.text.ended";
2014
+ type: "session.text.ended";
1828
2015
  durable: {
1829
2016
  aggregateID: string;
1830
2017
  seq: number;
@@ -1836,7 +2023,7 @@ export type SessionTextEnded = {
1836
2023
  assistantMessageID: string;
1837
2024
  ordinal: number;
1838
2025
  text: string;
1839
- state?: SessionMessageProviderState4;
2026
+ state?: SessionMessageProviderState1;
1840
2027
  };
1841
2028
  };
1842
2029
  export type SessionReasoningStarted = {
@@ -1856,7 +2043,7 @@ export type SessionReasoningStarted = {
1856
2043
  sessionID: string;
1857
2044
  assistantMessageID: string;
1858
2045
  ordinal: number;
1859
- state?: SessionMessageProviderState5;
2046
+ state?: SessionMessageProviderState1;
1860
2047
  };
1861
2048
  };
1862
2049
  export type SessionReasoningEnded = {
@@ -1877,7 +2064,7 @@ export type SessionReasoningEnded = {
1877
2064
  assistantMessageID: string;
1878
2065
  ordinal: number;
1879
2066
  text: string;
1880
- state?: SessionMessageProviderState6;
2067
+ state?: SessionMessageProviderState1;
1881
2068
  };
1882
2069
  };
1883
2070
  export type SessionToolCalled = {
@@ -1901,14 +2088,30 @@ export type SessionToolCalled = {
1901
2088
  [x: string]: any;
1902
2089
  };
1903
2090
  executed: boolean;
1904
- state?: SessionMessageProviderState7;
2091
+ state?: SessionMessageProviderState1;
2092
+ };
2093
+ };
2094
+ export type SessionMessageAssistantText1 = {
2095
+ type: "text";
2096
+ text: string;
2097
+ state?: SessionMessageProviderState1;
2098
+ };
2099
+ export type SessionMessageAssistantReasoning1 = {
2100
+ type: "reasoning";
2101
+ text: string;
2102
+ state?: SessionMessageProviderState1;
2103
+ time?: {
2104
+ created: number;
2105
+ completed?: number;
1905
2106
  };
1906
2107
  };
1907
2108
  export type ToolContent1 = ToolTextContent | ToolFileContent1;
1908
2109
  export type ModelCompatibility = {
1909
2110
  reasoningField?: ModelReasoningField;
2111
+ requireReasoning?: boolean;
1910
2112
  maxTokensField?: ModelMaxTokensField;
1911
2113
  requireFinishReason?: boolean;
2114
+ requireAssistantAfterTool?: boolean;
1912
2115
  };
1913
2116
  export type ModelCost = {
1914
2117
  tier?: {
@@ -2008,6 +2211,25 @@ export type Project = {
2008
2211
  time: ProjectTime;
2009
2212
  sandboxes: Array<string>;
2010
2213
  };
2214
+ export type ProjectUpdated = {
2215
+ id: string;
2216
+ created: number;
2217
+ metadata?: {
2218
+ [x: string]: any;
2219
+ };
2220
+ type: "project.updated";
2221
+ location?: LocationRef;
2222
+ data: {
2223
+ id: string;
2224
+ canonical: string;
2225
+ vcs?: ProjectVcs;
2226
+ name?: string;
2227
+ icon?: ProjectIcon;
2228
+ commands?: ProjectCommands;
2229
+ time: ProjectTime;
2230
+ sandboxes: Array<string>;
2231
+ };
2232
+ };
2011
2233
  export type FormAnswer = {
2012
2234
  [x: string]: FormValue;
2013
2235
  };
@@ -2021,6 +2243,7 @@ export type PermissionRequest = {
2021
2243
  [x: string]: JsonValue;
2022
2244
  };
2023
2245
  source?: PermissionSource;
2246
+ message?: string;
2024
2247
  };
2025
2248
  export type PermissionAsked = {
2026
2249
  id: string;
@@ -2040,6 +2263,20 @@ export type PermissionAsked = {
2040
2263
  [x: string]: any;
2041
2264
  };
2042
2265
  source?: PermissionSource;
2266
+ message?: string;
2267
+ };
2268
+ };
2269
+ export type SessionToolsUpdated = {
2270
+ id: string;
2271
+ created: number;
2272
+ metadata?: {
2273
+ [x: string]: any;
2274
+ };
2275
+ type: "session.tools.updated";
2276
+ location?: LocationRef;
2277
+ data: {
2278
+ sessionID: string;
2279
+ tools: Array<SessionDynamicToolDefinition1>;
2043
2280
  };
2044
2281
  };
2045
2282
  export type PermissionReplied = {
@@ -2080,6 +2317,28 @@ export type PtyUpdated = {
2080
2317
  info: Pty;
2081
2318
  };
2082
2319
  };
2320
+ export type PersistentPtyAdded = {
2321
+ id: string;
2322
+ created: number;
2323
+ metadata?: {
2324
+ [x: string]: any;
2325
+ };
2326
+ type: "persistent-pty.added";
2327
+ location?: LocationRef;
2328
+ data: {
2329
+ sessionID: string;
2330
+ terminal: PersistentPtyInfo;
2331
+ };
2332
+ };
2333
+ export type PersistentPtySnapshot = {
2334
+ info: PersistentPtyInfo;
2335
+ text: string;
2336
+ checkpoint: string;
2337
+ cursor: {
2338
+ x: number;
2339
+ y: number;
2340
+ };
2341
+ };
2083
2342
  export type FormStringField1 = {
2084
2343
  key: string;
2085
2344
  title?: string;
@@ -2140,7 +2399,7 @@ export type FormMultiselectField1 = {
2140
2399
  custom?: boolean;
2141
2400
  default?: Array<string>;
2142
2401
  };
2143
- export type SessionStatus2 = {
2402
+ export type SessionStatusUpdated = {
2144
2403
  id: string;
2145
2404
  created: number;
2146
2405
  metadata?: {
@@ -2188,6 +2447,23 @@ export type SessionRevertStaged = {
2188
2447
  export type SessionPolicy = {
2189
2448
  tools: SessionPolicyTools;
2190
2449
  };
2450
+ export type SessionStatsInfo = {
2451
+ range: {
2452
+ from: number;
2453
+ to: number;
2454
+ };
2455
+ sessions: number;
2456
+ subagents: number;
2457
+ prompts: number;
2458
+ steps: number;
2459
+ tokens: TokenUsageInfo;
2460
+ cost: MoneyUSD;
2461
+ tools: SessionStatsTools;
2462
+ activeDays: number;
2463
+ streak: number;
2464
+ activity: Array<SessionStatsActivity>;
2465
+ models: Array<SessionStatsModelUsage>;
2466
+ };
2191
2467
  export type SessionMessageUser = {
2192
2468
  id: string;
2193
2469
  metadata?: {
@@ -2199,7 +2475,6 @@ export type SessionMessageUser = {
2199
2475
  text: string;
2200
2476
  files?: Array<PromptFileAttachment>;
2201
2477
  agents?: Array<PromptAgentAttachment>;
2202
- output?: StructuredOutputRequest;
2203
2478
  skills?: Array<PromptSkillAttachment>;
2204
2479
  type: "user";
2205
2480
  };
@@ -2207,7 +2482,6 @@ export type SessionInboxUserPayload = {
2207
2482
  text: string;
2208
2483
  files?: Array<PromptFileAttachment>;
2209
2484
  agents?: Array<PromptAgentAttachment>;
2210
- output?: StructuredOutputRequest;
2211
2485
  skills?: Array<PromptSkillAttachment>;
2212
2486
  metadata?: {
2213
2487
  [x: string]: JsonValue;
@@ -2217,7 +2491,6 @@ export type SessionInboxUserPayload1 = {
2217
2491
  text: string;
2218
2492
  files?: Array<PromptFileAttachment>;
2219
2493
  agents?: Array<PromptAgentAttachment>;
2220
- output?: StructuredOutputRequest;
2221
2494
  skills?: Array<PromptSkillAttachment>;
2222
2495
  metadata?: {
2223
2496
  [x: string]: any;
@@ -2267,7 +2540,7 @@ export type SessionToolSuccess = {
2267
2540
  [x: string]: JsonValue;
2268
2541
  };
2269
2542
  executed: boolean;
2270
- resultState?: SessionMessageProviderState8;
2543
+ resultState?: SessionMessageProviderState1;
2271
2544
  };
2272
2545
  };
2273
2546
  export type SessionToolFailed = {
@@ -2293,7 +2566,28 @@ export type SessionToolFailed = {
2293
2566
  [x: string]: JsonValue;
2294
2567
  };
2295
2568
  executed: boolean;
2296
- resultState?: SessionMessageProviderState9;
2569
+ resultState?: SessionMessageProviderState1;
2570
+ };
2571
+ };
2572
+ export type SessionMessageToolStateCompleted1 = {
2573
+ status: "completed";
2574
+ input: {
2575
+ [x: string]: any;
2576
+ };
2577
+ content: [ToolContent1, ...Array<ToolContent1>];
2578
+ metadata?: {
2579
+ [x: string]: JsonValue;
2580
+ };
2581
+ };
2582
+ export type SessionMessageToolStateError1 = {
2583
+ status: "error";
2584
+ input: {
2585
+ [x: string]: any;
2586
+ };
2587
+ error: SessionStructuredError;
2588
+ content?: [ToolContent1, ...Array<ToolContent1>];
2589
+ metadata?: {
2590
+ [x: string]: JsonValue;
2297
2591
  };
2298
2592
  };
2299
2593
  export type ModelInfo = {
@@ -2661,14 +2955,18 @@ export type SessionInfo = {
2661
2955
  model?: ModelRef;
2662
2956
  cost: MoneyUSD;
2663
2957
  tokens: TokenUsageInfo;
2958
+ outcome?: "succeeded" | "failed" | "interrupted";
2664
2959
  time: {
2665
2960
  created: number;
2666
2961
  updated: number;
2962
+ idle?: number;
2963
+ viewed?: number;
2667
2964
  archived?: number;
2668
2965
  };
2669
2966
  title?: string;
2670
2967
  location: LocationRef;
2671
2968
  subpath?: string;
2969
+ metadata?: SessionMetadata;
2672
2970
  revert?: SessionRevert;
2673
2971
  policy?: SessionPolicy;
2674
2972
  };
@@ -2696,6 +2994,7 @@ export type SessionCreated = {
2696
2994
  agent?: string;
2697
2995
  model?: ModelRef;
2698
2996
  policy?: SessionPolicy;
2997
+ metadata?: SessionMetadata;
2699
2998
  version: string;
2700
2999
  };
2701
3000
  };
@@ -2720,6 +3019,7 @@ export type SessionForked = {
2720
3019
  [x: string]: string;
2721
3020
  };
2722
3021
  policy?: SessionPolicy;
3022
+ instructionEntries?: InstructionEntrySnapshot;
2723
3023
  };
2724
3024
  };
2725
3025
  export type SessionInboxUser = {
@@ -2761,8 +3061,22 @@ export type SessionMessageAssistantTool = {
2761
3061
  completed?: number;
2762
3062
  };
2763
3063
  };
3064
+ export type SessionMessageAssistantTool1 = {
3065
+ type: "tool";
3066
+ id: string;
3067
+ name: string;
3068
+ executed?: boolean;
3069
+ providerState?: SessionMessageProviderState1;
3070
+ providerResultState?: SessionMessageProviderState1;
3071
+ state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning1 | SessionMessageToolStateCompleted1 | SessionMessageToolStateError1;
3072
+ time: {
3073
+ created: number;
3074
+ ran?: number;
3075
+ completed?: number;
3076
+ };
3077
+ };
2764
3078
  export type FormFields = [FormField, ...Array<FormField>];
2765
- export type FormFields3 = [FormField1, ...Array<FormField1>];
3079
+ export type FormFields2 = [FormField1, ...Array<FormField1>];
2766
3080
  export type SessionsResponse = {
2767
3081
  data: Array<SessionInfo>;
2768
3082
  cursor: {
@@ -2797,23 +3111,27 @@ export type SessionMessageAssistant = {
2797
3111
  };
2798
3112
  time: {
2799
3113
  created: number;
3114
+ streamed?: number;
2800
3115
  completed?: number;
2801
3116
  };
2802
3117
  type: "assistant";
2803
3118
  agent: string;
2804
3119
  model: ModelRef;
2805
- content: Array<SessionMessageAssistantText | SessionMessageAssistantReasoning | SessionMessageAssistantTool | SessionMessageAssistantStructured>;
3120
+ content: Array<SessionMessageAssistantText | SessionMessageAssistantReasoning | SessionMessageAssistantTool>;
2806
3121
  snapshot?: {
2807
3122
  start?: string;
2808
3123
  end?: string;
2809
3124
  files?: Array<string>;
2810
3125
  };
2811
3126
  finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
3127
+ rawFinish?: string;
3128
+ providerState?: SessionMessageProviderState;
2812
3129
  cost?: MoneyUSD;
2813
3130
  tokens?: TokenUsageInfo;
2814
3131
  error?: SessionStructuredError;
2815
3132
  retry?: SessionMessageAssistantRetry;
2816
3133
  };
3134
+ export type SessionMessageAssistantContentEncoded = SessionMessageAssistantText1 | SessionMessageAssistantReasoning1 | SessionMessageAssistantTool1;
2817
3135
  export type IntegrationOAuthMethod = {
2818
3136
  id: string;
2819
3137
  type: "oauth";
@@ -2837,10 +3155,28 @@ export type FormInfo1 = {
2837
3155
  sessionID: string;
2838
3156
  title: string;
2839
3157
  metadata?: FormMetadata1;
2840
- fields: FormFields3;
3158
+ fields: FormFields2;
2841
3159
  };
2842
- export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionStructuredCompleted | SessionStructuredFailed | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded;
2843
3160
  export type SessionMessageInfo = SessionMessageAgentSelected | SessionMessageModelSelected | SessionMessageLocationSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageSkill | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction;
3161
+ export type SessionMessageContentUpdated = {
3162
+ id: string;
3163
+ created: number;
3164
+ metadata?: {
3165
+ [x: string]: any;
3166
+ };
3167
+ type: "session.message.content.updated";
3168
+ durable: {
3169
+ aggregateID: string;
3170
+ seq: number;
3171
+ version: 1;
3172
+ };
3173
+ location?: LocationRef;
3174
+ data: {
3175
+ sessionID: string;
3176
+ messageID: string;
3177
+ content: Array<SessionMessageAssistantContentEncoded>;
3178
+ };
3179
+ };
2844
3180
  export type IntegrationMethod = IntegrationOAuthMethod | IntegrationCommandMethod | IntegrationKeyMethod | IntegrationEnvMethod;
2845
3181
  export type FormCreated = {
2846
3182
  id: string;
@@ -2854,7 +3190,6 @@ export type FormCreated = {
2854
3190
  form: FormInfo1;
2855
3191
  };
2856
3192
  };
2857
- export type SessionLogItem = SessionEventDurable | EventLogSynced;
2858
3193
  export type SessionTransferData = {
2859
3194
  info: SessionInfo;
2860
3195
  messages: Array<SessionMessageInfo>;
@@ -2866,13 +3201,18 @@ export type SessionMessagesResponse = {
2866
3201
  next?: string | null;
2867
3202
  };
2868
3203
  };
3204
+ export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionMessageContentUpdated | SessionUsageRecorded;
2869
3205
  export type IntegrationInfo = {
2870
3206
  id: string;
2871
3207
  name: string;
3208
+ metadata?: {
3209
+ [x: string]: JsonValue;
3210
+ };
2872
3211
  methods: Array<IntegrationMethod>;
2873
3212
  connections: Array<ConnectionInfo>;
2874
3213
  };
2875
- export type V2Event = ModelsDevRefreshed | IntegrationUpdated | IntegrationConnectionUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionStructuredCompleted | SessionStructuredFailed | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginAdded | PluginUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | SessionStatus2 | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | V2EventServerConnected;
3214
+ export type V2Event = ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepStreamed | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionToolsUpdated | SessionToolDynamicRequested | SessionToolDynamicReplied | SessionToolDynamicCancelled | SessionMessageContentUpdated | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginAdded | PluginUpdated | ProjectUpdated | WorktreeUpdated | WorktreeResolved | CommandUpdated | ConfigUpdated | SkillUpdated | PtyCreated | PtyUpdated | PtyExited | PtyDeleted | PersistentPtyAdded | PersistentPtyRemoved | ShellCreated | ShellExited | ShellDeleted | FormCreated | FormReplied | FormCancelled | WebsearchUpdated | SessionStatusUpdated | SessionIdle | TuiPromptAppend | TuiCommandExecute | TuiToastShow | TuiSessionSelect | InstallationUpdated | InstallationUpdateAvailable | VcsBranchUpdated | McpStatusChanged | McpResourcesChanged | V2EventServerConnected;
3215
+ export type SessionLogItem = SessionEventDurable | EventLogSynced;
2876
3216
  export type UnauthorizedError = {
2877
3217
  readonly _tag: "UnauthorizedError";
2878
3218
  readonly message: string;
@@ -2927,12 +3267,12 @@ export type CommandNotFoundError = {
2927
3267
  readonly message: string;
2928
3268
  };
2929
3269
  export declare const isCommandNotFoundError: (value: unknown) => value is CommandNotFoundError;
2930
- export type CommandEvaluationError = {
2931
- readonly _tag: "CommandEvaluationError";
3270
+ export type CommandExecutionError = {
3271
+ readonly _tag: "CommandExecutionError";
2932
3272
  readonly command: string;
2933
3273
  readonly message: string;
2934
3274
  };
2935
- export declare const isCommandEvaluationError: (value: unknown) => value is CommandEvaluationError;
3275
+ export declare const isCommandExecutionError: (value: unknown) => value is CommandExecutionError;
2936
3276
  export type SkillNotFoundError = {
2937
3277
  readonly _tag: "SkillNotFoundError";
2938
3278
  readonly skill: string;
@@ -2970,6 +3310,12 @@ export type McpServerNotFoundError = {
2970
3310
  readonly message: string;
2971
3311
  };
2972
3312
  export declare const isMcpServerNotFoundError: (value: unknown) => value is McpServerNotFoundError;
3313
+ export type ProjectNotFoundError = {
3314
+ readonly _tag: "ProjectNotFoundError";
3315
+ readonly projectID: string;
3316
+ readonly message: string;
3317
+ };
3318
+ export declare const isProjectNotFoundError: (value: unknown) => value is ProjectNotFoundError;
2973
3319
  export type FormNotFoundError = {
2974
3320
  readonly _tag: "FormNotFoundError";
2975
3321
  readonly id: string;
@@ -3000,6 +3346,11 @@ export type PtyNotFoundError = {
3000
3346
  readonly message: string;
3001
3347
  };
3002
3348
  export declare const isPtyNotFoundError: (value: unknown) => value is PtyNotFoundError;
3349
+ export type ForbiddenError = {
3350
+ readonly _tag: "ForbiddenError";
3351
+ readonly message: string;
3352
+ };
3353
+ export declare const isForbiddenError: (value: unknown) => value is ForbiddenError;
3003
3354
  export type ShellNotFoundError = {
3004
3355
  readonly _tag: "ShellNotFoundError";
3005
3356
  readonly id: string;
@@ -3015,12 +3366,6 @@ export type WorktreeError = {
3015
3366
  };
3016
3367
  export declare const isWorktreeError: (value: unknown) => value is WorktreeError;
3017
3368
  export type HealthGetOutput = ServiceHealth;
3018
- export type HealthStopInput = {
3019
- readonly instanceID: {
3020
- readonly instanceID: string;
3021
- }["instanceID"];
3022
- };
3023
- export type HealthStopOutput = ServiceStopResponse;
3024
3369
  export type ServerGetOutput = {
3025
3370
  urls: Array<string>;
3026
3371
  };
@@ -3206,8 +3551,48 @@ export type SessionListInput = {
3206
3551
  }["cursor"];
3207
3552
  };
3208
3553
  export type SessionListOutput = SessionsResponse;
3209
- export type SessionCreateInput = {
3210
- readonly id?: {
3554
+ export type SessionStatsInput = {
3555
+ readonly from?: {
3556
+ readonly from?: number | undefined;
3557
+ readonly to?: number | undefined;
3558
+ readonly project?: string | undefined;
3559
+ readonly timezone?: string | undefined;
3560
+ readonly tools?: "none" | "summary" | "detail" | undefined;
3561
+ }["from"];
3562
+ readonly to?: {
3563
+ readonly from?: number | undefined;
3564
+ readonly to?: number | undefined;
3565
+ readonly project?: string | undefined;
3566
+ readonly timezone?: string | undefined;
3567
+ readonly tools?: "none" | "summary" | "detail" | undefined;
3568
+ }["to"];
3569
+ readonly project?: {
3570
+ readonly from?: number | undefined;
3571
+ readonly to?: number | undefined;
3572
+ readonly project?: string | undefined;
3573
+ readonly timezone?: string | undefined;
3574
+ readonly tools?: "none" | "summary" | "detail" | undefined;
3575
+ }["project"];
3576
+ readonly timezone?: {
3577
+ readonly from?: number | undefined;
3578
+ readonly to?: number | undefined;
3579
+ readonly project?: string | undefined;
3580
+ readonly timezone?: string | undefined;
3581
+ readonly tools?: "none" | "summary" | "detail" | undefined;
3582
+ }["timezone"];
3583
+ readonly tools?: {
3584
+ readonly from?: number | undefined;
3585
+ readonly to?: number | undefined;
3586
+ readonly project?: string | undefined;
3587
+ readonly timezone?: string | undefined;
3588
+ readonly tools?: "none" | "summary" | "detail" | undefined;
3589
+ }["tools"];
3590
+ };
3591
+ export type SessionStatsOutput = {
3592
+ data: SessionStatsInfo;
3593
+ }["data"];
3594
+ export type SessionCreateInput = {
3595
+ readonly id?: {
3211
3596
  readonly id?: string | null;
3212
3597
  readonly title?: string | null;
3213
3598
  readonly agent?: string | null;
@@ -3225,6 +3610,16 @@ export type SessionCreateInput = {
3225
3610
  readonly allow: ReadonlyArray<string>;
3226
3611
  };
3227
3612
  } | null;
3613
+ readonly metadata?: {
3614
+ readonly [x: string]: JsonValue;
3615
+ } | null;
3616
+ readonly tools?: ReadonlyArray<{
3617
+ readonly name: string;
3618
+ readonly description: string;
3619
+ readonly parameters?: {
3620
+ readonly [x: string]: JsonValue;
3621
+ };
3622
+ }> | null;
3228
3623
  }["id"];
3229
3624
  readonly title?: {
3230
3625
  readonly id?: string | null;
@@ -3244,6 +3639,16 @@ export type SessionCreateInput = {
3244
3639
  readonly allow: ReadonlyArray<string>;
3245
3640
  };
3246
3641
  } | null;
3642
+ readonly metadata?: {
3643
+ readonly [x: string]: JsonValue;
3644
+ } | null;
3645
+ readonly tools?: ReadonlyArray<{
3646
+ readonly name: string;
3647
+ readonly description: string;
3648
+ readonly parameters?: {
3649
+ readonly [x: string]: JsonValue;
3650
+ };
3651
+ }> | null;
3247
3652
  }["title"];
3248
3653
  readonly agent?: {
3249
3654
  readonly id?: string | null;
@@ -3263,6 +3668,16 @@ export type SessionCreateInput = {
3263
3668
  readonly allow: ReadonlyArray<string>;
3264
3669
  };
3265
3670
  } | null;
3671
+ readonly metadata?: {
3672
+ readonly [x: string]: JsonValue;
3673
+ } | null;
3674
+ readonly tools?: ReadonlyArray<{
3675
+ readonly name: string;
3676
+ readonly description: string;
3677
+ readonly parameters?: {
3678
+ readonly [x: string]: JsonValue;
3679
+ };
3680
+ }> | null;
3266
3681
  }["agent"];
3267
3682
  readonly model?: {
3268
3683
  readonly id?: string | null;
@@ -3282,6 +3697,16 @@ export type SessionCreateInput = {
3282
3697
  readonly allow: ReadonlyArray<string>;
3283
3698
  };
3284
3699
  } | null;
3700
+ readonly metadata?: {
3701
+ readonly [x: string]: JsonValue;
3702
+ } | null;
3703
+ readonly tools?: ReadonlyArray<{
3704
+ readonly name: string;
3705
+ readonly description: string;
3706
+ readonly parameters?: {
3707
+ readonly [x: string]: JsonValue;
3708
+ };
3709
+ }> | null;
3285
3710
  }["model"];
3286
3711
  readonly location?: {
3287
3712
  readonly id?: string | null;
@@ -3301,6 +3726,16 @@ export type SessionCreateInput = {
3301
3726
  readonly allow: ReadonlyArray<string>;
3302
3727
  };
3303
3728
  } | null;
3729
+ readonly metadata?: {
3730
+ readonly [x: string]: JsonValue;
3731
+ } | null;
3732
+ readonly tools?: ReadonlyArray<{
3733
+ readonly name: string;
3734
+ readonly description: string;
3735
+ readonly parameters?: {
3736
+ readonly [x: string]: JsonValue;
3737
+ };
3738
+ }> | null;
3304
3739
  }["location"];
3305
3740
  readonly policy?: {
3306
3741
  readonly id?: string | null;
@@ -3320,7 +3755,75 @@ export type SessionCreateInput = {
3320
3755
  readonly allow: ReadonlyArray<string>;
3321
3756
  };
3322
3757
  } | null;
3758
+ readonly metadata?: {
3759
+ readonly [x: string]: JsonValue;
3760
+ } | null;
3761
+ readonly tools?: ReadonlyArray<{
3762
+ readonly name: string;
3763
+ readonly description: string;
3764
+ readonly parameters?: {
3765
+ readonly [x: string]: JsonValue;
3766
+ };
3767
+ }> | null;
3323
3768
  }["policy"];
3769
+ readonly metadata?: {
3770
+ readonly id?: string | null;
3771
+ readonly title?: string | null;
3772
+ readonly agent?: string | null;
3773
+ readonly model?: {
3774
+ readonly id: string;
3775
+ readonly providerID: string;
3776
+ readonly variant?: string;
3777
+ } | null;
3778
+ readonly location?: {
3779
+ readonly directory: string;
3780
+ readonly workspaceID?: string;
3781
+ } | null;
3782
+ readonly policy?: {
3783
+ readonly tools: {
3784
+ readonly allow: ReadonlyArray<string>;
3785
+ };
3786
+ } | null;
3787
+ readonly metadata?: {
3788
+ readonly [x: string]: JsonValue;
3789
+ } | null;
3790
+ readonly tools?: ReadonlyArray<{
3791
+ readonly name: string;
3792
+ readonly description: string;
3793
+ readonly parameters?: {
3794
+ readonly [x: string]: JsonValue;
3795
+ };
3796
+ }> | null;
3797
+ }["metadata"];
3798
+ readonly tools?: {
3799
+ readonly id?: string | null;
3800
+ readonly title?: string | null;
3801
+ readonly agent?: string | null;
3802
+ readonly model?: {
3803
+ readonly id: string;
3804
+ readonly providerID: string;
3805
+ readonly variant?: string;
3806
+ } | null;
3807
+ readonly location?: {
3808
+ readonly directory: string;
3809
+ readonly workspaceID?: string;
3810
+ } | null;
3811
+ readonly policy?: {
3812
+ readonly tools: {
3813
+ readonly allow: ReadonlyArray<string>;
3814
+ };
3815
+ } | null;
3816
+ readonly metadata?: {
3817
+ readonly [x: string]: JsonValue;
3818
+ } | null;
3819
+ readonly tools?: ReadonlyArray<{
3820
+ readonly name: string;
3821
+ readonly description: string;
3822
+ readonly parameters?: {
3823
+ readonly [x: string]: JsonValue;
3824
+ };
3825
+ }> | null;
3826
+ }["tools"];
3324
3827
  };
3325
3828
  export type SessionCreateOutput = {
3326
3829
  data: SessionInfo;
@@ -3357,9 +3860,12 @@ export type SessionImportInput = {
3357
3860
  readonly write: number;
3358
3861
  };
3359
3862
  };
3863
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
3360
3864
  readonly time: {
3361
3865
  readonly created: number;
3362
3866
  readonly updated: number;
3867
+ readonly idle?: number;
3868
+ readonly viewed?: number;
3363
3869
  readonly archived?: number;
3364
3870
  };
3365
3871
  readonly title?: string;
@@ -3368,6 +3874,9 @@ export type SessionImportInput = {
3368
3874
  readonly workspaceID?: string;
3369
3875
  };
3370
3876
  readonly subpath?: string;
3877
+ readonly metadata?: {
3878
+ readonly [x: string]: JsonValue;
3879
+ };
3371
3880
  readonly revert?: {
3372
3881
  readonly messageID: string;
3373
3882
  readonly partID?: string;
@@ -3473,17 +3982,10 @@ export type SessionImportInput = {
3473
3982
  readonly text: string;
3474
3983
  };
3475
3984
  }>;
3476
- readonly output?: {
3477
- readonly schema: {
3478
- readonly [x: string]: JsonValue;
3479
- };
3480
- readonly name?: string;
3481
- readonly description?: string;
3482
- };
3483
3985
  readonly skills?: ReadonlyArray<{
3484
3986
  readonly id: string;
3485
3987
  readonly name: string;
3486
- readonly text: string;
3988
+ readonly text?: string;
3487
3989
  readonly mention?: {
3488
3990
  readonly start: number;
3489
3991
  readonly end: number;
@@ -3552,6 +4054,7 @@ export type SessionImportInput = {
3552
4054
  };
3553
4055
  readonly time: {
3554
4056
  readonly created: number;
4057
+ readonly streamed?: number;
3555
4058
  readonly completed?: number;
3556
4059
  };
3557
4060
  readonly type: "assistant";
@@ -3666,9 +4169,6 @@ export type SessionImportInput = {
3666
4169
  readonly ran?: number;
3667
4170
  readonly completed?: number;
3668
4171
  };
3669
- } | {
3670
- readonly type: "structured";
3671
- readonly value: JsonValue;
3672
4172
  }>;
3673
4173
  readonly snapshot?: {
3674
4174
  readonly start?: string;
@@ -3676,6 +4176,10 @@ export type SessionImportInput = {
3676
4176
  readonly files?: ReadonlyArray<string>;
3677
4177
  };
3678
4178
  readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4179
+ readonly rawFinish?: string;
4180
+ readonly providerState?: {
4181
+ readonly [x: string]: JsonValue;
4182
+ };
3679
4183
  readonly cost?: number;
3680
4184
  readonly tokens?: {
3681
4185
  readonly input: number;
@@ -3779,9 +4283,12 @@ export type SessionImportInput = {
3779
4283
  readonly write: number;
3780
4284
  };
3781
4285
  };
4286
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
3782
4287
  readonly time: {
3783
4288
  readonly created: number;
3784
4289
  readonly updated: number;
4290
+ readonly idle?: number;
4291
+ readonly viewed?: number;
3785
4292
  readonly archived?: number;
3786
4293
  };
3787
4294
  readonly title?: string;
@@ -3790,6 +4297,9 @@ export type SessionImportInput = {
3790
4297
  readonly workspaceID?: string;
3791
4298
  };
3792
4299
  readonly subpath?: string;
4300
+ readonly metadata?: {
4301
+ readonly [x: string]: JsonValue;
4302
+ };
3793
4303
  readonly revert?: {
3794
4304
  readonly messageID: string;
3795
4305
  readonly partID?: string;
@@ -3895,17 +4405,10 @@ export type SessionImportInput = {
3895
4405
  readonly text: string;
3896
4406
  };
3897
4407
  }>;
3898
- readonly output?: {
3899
- readonly schema: {
3900
- readonly [x: string]: JsonValue;
3901
- };
3902
- readonly name?: string;
3903
- readonly description?: string;
3904
- };
3905
4408
  readonly skills?: ReadonlyArray<{
3906
4409
  readonly id: string;
3907
4410
  readonly name: string;
3908
- readonly text: string;
4411
+ readonly text?: string;
3909
4412
  readonly mention?: {
3910
4413
  readonly start: number;
3911
4414
  readonly end: number;
@@ -3974,6 +4477,7 @@ export type SessionImportInput = {
3974
4477
  };
3975
4478
  readonly time: {
3976
4479
  readonly created: number;
4480
+ readonly streamed?: number;
3977
4481
  readonly completed?: number;
3978
4482
  };
3979
4483
  readonly type: "assistant";
@@ -4088,9 +4592,6 @@ export type SessionImportInput = {
4088
4592
  readonly ran?: number;
4089
4593
  readonly completed?: number;
4090
4594
  };
4091
- } | {
4092
- readonly type: "structured";
4093
- readonly value: JsonValue;
4094
4595
  }>;
4095
4596
  readonly snapshot?: {
4096
4597
  readonly start?: string;
@@ -4098,6 +4599,10 @@ export type SessionImportInput = {
4098
4599
  readonly files?: ReadonlyArray<string>;
4099
4600
  };
4100
4601
  readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4602
+ readonly rawFinish?: string;
4603
+ readonly providerState?: {
4604
+ readonly [x: string]: JsonValue;
4605
+ };
4101
4606
  readonly cost?: number;
4102
4607
  readonly tokens?: {
4103
4608
  readonly input: number;
@@ -4201,9 +4706,12 @@ export type SessionImportInput = {
4201
4706
  readonly write: number;
4202
4707
  };
4203
4708
  };
4709
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
4204
4710
  readonly time: {
4205
4711
  readonly created: number;
4206
4712
  readonly updated: number;
4713
+ readonly idle?: number;
4714
+ readonly viewed?: number;
4207
4715
  readonly archived?: number;
4208
4716
  };
4209
4717
  readonly title?: string;
@@ -4212,6 +4720,9 @@ export type SessionImportInput = {
4212
4720
  readonly workspaceID?: string;
4213
4721
  };
4214
4722
  readonly subpath?: string;
4723
+ readonly metadata?: {
4724
+ readonly [x: string]: JsonValue;
4725
+ };
4215
4726
  readonly revert?: {
4216
4727
  readonly messageID: string;
4217
4728
  readonly partID?: string;
@@ -4317,17 +4828,10 @@ export type SessionImportInput = {
4317
4828
  readonly text: string;
4318
4829
  };
4319
4830
  }>;
4320
- readonly output?: {
4321
- readonly schema: {
4322
- readonly [x: string]: JsonValue;
4323
- };
4324
- readonly name?: string;
4325
- readonly description?: string;
4326
- };
4327
4831
  readonly skills?: ReadonlyArray<{
4328
4832
  readonly id: string;
4329
4833
  readonly name: string;
4330
- readonly text: string;
4834
+ readonly text?: string;
4331
4835
  readonly mention?: {
4332
4836
  readonly start: number;
4333
4837
  readonly end: number;
@@ -4396,6 +4900,7 @@ export type SessionImportInput = {
4396
4900
  };
4397
4901
  readonly time: {
4398
4902
  readonly created: number;
4903
+ readonly streamed?: number;
4399
4904
  readonly completed?: number;
4400
4905
  };
4401
4906
  readonly type: "assistant";
@@ -4510,9 +5015,6 @@ export type SessionImportInput = {
4510
5015
  readonly ran?: number;
4511
5016
  readonly completed?: number;
4512
5017
  };
4513
- } | {
4514
- readonly type: "structured";
4515
- readonly value: JsonValue;
4516
5018
  }>;
4517
5019
  readonly snapshot?: {
4518
5020
  readonly start?: string;
@@ -4520,6 +5022,10 @@ export type SessionImportInput = {
4520
5022
  readonly files?: ReadonlyArray<string>;
4521
5023
  };
4522
5024
  readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
5025
+ readonly rawFinish?: string;
5026
+ readonly providerState?: {
5027
+ readonly [x: string]: JsonValue;
5028
+ };
4523
5029
  readonly cost?: number;
4524
5030
  readonly tokens?: {
4525
5031
  readonly input: number;
@@ -4641,7 +5147,14 @@ export type SessionForkInput = {
4641
5147
  readonly tools: {
4642
5148
  readonly allow: ReadonlyArray<string>;
4643
5149
  };
4644
- } | undefined;
5150
+ } | null;
5151
+ readonly tools?: ReadonlyArray<{
5152
+ readonly name: string;
5153
+ readonly description: string;
5154
+ readonly parameters?: {
5155
+ readonly [x: string]: JsonValue;
5156
+ };
5157
+ }> | null;
4645
5158
  }["boundary"];
4646
5159
  readonly policy?: {
4647
5160
  readonly boundary: {
@@ -4654,8 +5167,35 @@ export type SessionForkInput = {
4654
5167
  readonly tools: {
4655
5168
  readonly allow: ReadonlyArray<string>;
4656
5169
  };
4657
- } | undefined;
5170
+ } | null;
5171
+ readonly tools?: ReadonlyArray<{
5172
+ readonly name: string;
5173
+ readonly description: string;
5174
+ readonly parameters?: {
5175
+ readonly [x: string]: JsonValue;
5176
+ };
5177
+ }> | null;
4658
5178
  }["policy"];
5179
+ readonly tools?: {
5180
+ readonly boundary: {
5181
+ readonly type: "before";
5182
+ readonly messageID: string;
5183
+ } | {
5184
+ readonly type: "through";
5185
+ };
5186
+ readonly policy?: {
5187
+ readonly tools: {
5188
+ readonly allow: ReadonlyArray<string>;
5189
+ };
5190
+ } | null;
5191
+ readonly tools?: ReadonlyArray<{
5192
+ readonly name: string;
5193
+ readonly description: string;
5194
+ readonly parameters?: {
5195
+ readonly [x: string]: JsonValue;
5196
+ };
5197
+ }> | null;
5198
+ }["tools"];
4659
5199
  };
4660
5200
  export type SessionForkOutput = {
4661
5201
  data: SessionInfo;
@@ -4737,13 +5277,6 @@ export type SessionPromptInput = {
4737
5277
  readonly text: string;
4738
5278
  };
4739
5279
  }>;
4740
- readonly output?: {
4741
- readonly schema: {
4742
- readonly [x: string]: JsonValue;
4743
- };
4744
- readonly name?: string;
4745
- readonly description?: string;
4746
- };
4747
5280
  readonly skills?: ReadonlyArray<{
4748
5281
  readonly id: string;
4749
5282
  readonly mention?: {
@@ -4779,13 +5312,6 @@ export type SessionPromptInput = {
4779
5312
  readonly text: string;
4780
5313
  };
4781
5314
  }>;
4782
- readonly output?: {
4783
- readonly schema: {
4784
- readonly [x: string]: JsonValue;
4785
- };
4786
- readonly name?: string;
4787
- readonly description?: string;
4788
- };
4789
5315
  readonly skills?: ReadonlyArray<{
4790
5316
  readonly id: string;
4791
5317
  readonly mention?: {
@@ -4821,13 +5347,6 @@ export type SessionPromptInput = {
4821
5347
  readonly text: string;
4822
5348
  };
4823
5349
  }>;
4824
- readonly output?: {
4825
- readonly schema: {
4826
- readonly [x: string]: JsonValue;
4827
- };
4828
- readonly name?: string;
4829
- readonly description?: string;
4830
- };
4831
5350
  readonly skills?: ReadonlyArray<{
4832
5351
  readonly id: string;
4833
5352
  readonly mention?: {
@@ -4863,13 +5382,6 @@ export type SessionPromptInput = {
4863
5382
  readonly text: string;
4864
5383
  };
4865
5384
  }>;
4866
- readonly output?: {
4867
- readonly schema: {
4868
- readonly [x: string]: JsonValue;
4869
- };
4870
- readonly name?: string;
4871
- readonly description?: string;
4872
- };
4873
5385
  readonly skills?: ReadonlyArray<{
4874
5386
  readonly id: string;
4875
5387
  readonly mention?: {
@@ -4884,48 +5396,6 @@ export type SessionPromptInput = {
4884
5396
  readonly delivery?: ("steer" | "queue") | null;
4885
5397
  readonly resume?: boolean | null;
4886
5398
  }["agents"];
4887
- readonly output?: {
4888
- readonly id?: string | null;
4889
- readonly text: string;
4890
- readonly files?: ReadonlyArray<{
4891
- readonly uri: string;
4892
- readonly name?: string;
4893
- readonly description?: string;
4894
- readonly mention?: {
4895
- readonly start: number;
4896
- readonly end: number;
4897
- readonly text: string;
4898
- };
4899
- }>;
4900
- readonly agents?: ReadonlyArray<{
4901
- readonly name: string;
4902
- readonly mention?: {
4903
- readonly start: number;
4904
- readonly end: number;
4905
- readonly text: string;
4906
- };
4907
- }>;
4908
- readonly output?: {
4909
- readonly schema: {
4910
- readonly [x: string]: JsonValue;
4911
- };
4912
- readonly name?: string;
4913
- readonly description?: string;
4914
- };
4915
- readonly skills?: ReadonlyArray<{
4916
- readonly id: string;
4917
- readonly mention?: {
4918
- readonly start: number;
4919
- readonly end: number;
4920
- readonly text: string;
4921
- };
4922
- }>;
4923
- readonly metadata?: {
4924
- readonly [x: string]: JsonValue;
4925
- };
4926
- readonly delivery?: ("steer" | "queue") | null;
4927
- readonly resume?: boolean | null;
4928
- }["output"];
4929
5399
  readonly skills?: {
4930
5400
  readonly id?: string | null;
4931
5401
  readonly text: string;
@@ -4947,13 +5417,6 @@ export type SessionPromptInput = {
4947
5417
  readonly text: string;
4948
5418
  };
4949
5419
  }>;
4950
- readonly output?: {
4951
- readonly schema: {
4952
- readonly [x: string]: JsonValue;
4953
- };
4954
- readonly name?: string;
4955
- readonly description?: string;
4956
- };
4957
5420
  readonly skills?: ReadonlyArray<{
4958
5421
  readonly id: string;
4959
5422
  readonly mention?: {
@@ -4989,13 +5452,6 @@ export type SessionPromptInput = {
4989
5452
  readonly text: string;
4990
5453
  };
4991
5454
  }>;
4992
- readonly output?: {
4993
- readonly schema: {
4994
- readonly [x: string]: JsonValue;
4995
- };
4996
- readonly name?: string;
4997
- readonly description?: string;
4998
- };
4999
5455
  readonly skills?: ReadonlyArray<{
5000
5456
  readonly id: string;
5001
5457
  readonly mention?: {
@@ -5031,13 +5487,6 @@ export type SessionPromptInput = {
5031
5487
  readonly text: string;
5032
5488
  };
5033
5489
  }>;
5034
- readonly output?: {
5035
- readonly schema: {
5036
- readonly [x: string]: JsonValue;
5037
- };
5038
- readonly name?: string;
5039
- readonly description?: string;
5040
- };
5041
5490
  readonly skills?: ReadonlyArray<{
5042
5491
  readonly id: string;
5043
5492
  readonly mention?: {
@@ -5073,13 +5522,6 @@ export type SessionPromptInput = {
5073
5522
  readonly text: string;
5074
5523
  };
5075
5524
  }>;
5076
- readonly output?: {
5077
- readonly schema: {
5078
- readonly [x: string]: JsonValue;
5079
- };
5080
- readonly name?: string;
5081
- readonly description?: string;
5082
- };
5083
5525
  readonly skills?: ReadonlyArray<{
5084
5526
  readonly id: string;
5085
5527
  readonly mention?: {
@@ -5102,55 +5544,9 @@ export type SessionCommandInput = {
5102
5544
  readonly sessionID: {
5103
5545
  readonly sessionID: string;
5104
5546
  }["sessionID"];
5105
- readonly id?: {
5106
- readonly id?: string | null;
5107
- readonly command: string;
5108
- readonly arguments?: string | null;
5109
- readonly agent?: string | null;
5110
- readonly model?: {
5111
- readonly id: string;
5112
- readonly providerID: string;
5113
- readonly variant?: string;
5114
- } | null;
5115
- readonly files?: ReadonlyArray<{
5116
- readonly uri: string;
5117
- readonly name?: string;
5118
- readonly description?: string;
5119
- readonly mention?: {
5120
- readonly start: number;
5121
- readonly end: number;
5122
- readonly text: string;
5123
- };
5124
- }>;
5125
- readonly agents?: ReadonlyArray<{
5126
- readonly name: string;
5127
- readonly mention?: {
5128
- readonly start: number;
5129
- readonly end: number;
5130
- readonly text: string;
5131
- };
5132
- }>;
5133
- readonly skills?: ReadonlyArray<{
5134
- readonly id: string;
5135
- readonly mention?: {
5136
- readonly start: number;
5137
- readonly end: number;
5138
- readonly text: string;
5139
- };
5140
- }>;
5141
- readonly delivery?: ("steer" | "queue") | null;
5142
- readonly resume?: boolean | null;
5143
- }["id"];
5144
5547
  readonly command: {
5145
- readonly id?: string | null;
5146
5548
  readonly command: string;
5147
- readonly arguments?: string | null;
5148
- readonly agent?: string | null;
5149
- readonly model?: {
5150
- readonly id: string;
5151
- readonly providerID: string;
5152
- readonly variant?: string;
5153
- } | null;
5549
+ readonly text: string;
5154
5550
  readonly files?: ReadonlyArray<{
5155
5551
  readonly uri: string;
5156
5552
  readonly name?: string;
@@ -5178,96 +5574,10 @@ export type SessionCommandInput = {
5178
5574
  };
5179
5575
  }>;
5180
5576
  readonly delivery?: ("steer" | "queue") | null;
5181
- readonly resume?: boolean | null;
5182
5577
  }["command"];
5183
- readonly arguments?: {
5184
- readonly id?: string | null;
5185
- readonly command: string;
5186
- readonly arguments?: string | null;
5187
- readonly agent?: string | null;
5188
- readonly model?: {
5189
- readonly id: string;
5190
- readonly providerID: string;
5191
- readonly variant?: string;
5192
- } | null;
5193
- readonly files?: ReadonlyArray<{
5194
- readonly uri: string;
5195
- readonly name?: string;
5196
- readonly description?: string;
5197
- readonly mention?: {
5198
- readonly start: number;
5199
- readonly end: number;
5200
- readonly text: string;
5201
- };
5202
- }>;
5203
- readonly agents?: ReadonlyArray<{
5204
- readonly name: string;
5205
- readonly mention?: {
5206
- readonly start: number;
5207
- readonly end: number;
5208
- readonly text: string;
5209
- };
5210
- }>;
5211
- readonly skills?: ReadonlyArray<{
5212
- readonly id: string;
5213
- readonly mention?: {
5214
- readonly start: number;
5215
- readonly end: number;
5216
- readonly text: string;
5217
- };
5218
- }>;
5219
- readonly delivery?: ("steer" | "queue") | null;
5220
- readonly resume?: boolean | null;
5221
- }["arguments"];
5222
- readonly agent?: {
5223
- readonly id?: string | null;
5224
- readonly command: string;
5225
- readonly arguments?: string | null;
5226
- readonly agent?: string | null;
5227
- readonly model?: {
5228
- readonly id: string;
5229
- readonly providerID: string;
5230
- readonly variant?: string;
5231
- } | null;
5232
- readonly files?: ReadonlyArray<{
5233
- readonly uri: string;
5234
- readonly name?: string;
5235
- readonly description?: string;
5236
- readonly mention?: {
5237
- readonly start: number;
5238
- readonly end: number;
5239
- readonly text: string;
5240
- };
5241
- }>;
5242
- readonly agents?: ReadonlyArray<{
5243
- readonly name: string;
5244
- readonly mention?: {
5245
- readonly start: number;
5246
- readonly end: number;
5247
- readonly text: string;
5248
- };
5249
- }>;
5250
- readonly skills?: ReadonlyArray<{
5251
- readonly id: string;
5252
- readonly mention?: {
5253
- readonly start: number;
5254
- readonly end: number;
5255
- readonly text: string;
5256
- };
5257
- }>;
5258
- readonly delivery?: ("steer" | "queue") | null;
5259
- readonly resume?: boolean | null;
5260
- }["agent"];
5261
- readonly model?: {
5262
- readonly id?: string | null;
5578
+ readonly text: {
5263
5579
  readonly command: string;
5264
- readonly arguments?: string | null;
5265
- readonly agent?: string | null;
5266
- readonly model?: {
5267
- readonly id: string;
5268
- readonly providerID: string;
5269
- readonly variant?: string;
5270
- } | null;
5580
+ readonly text: string;
5271
5581
  readonly files?: ReadonlyArray<{
5272
5582
  readonly uri: string;
5273
5583
  readonly name?: string;
@@ -5295,18 +5605,10 @@ export type SessionCommandInput = {
5295
5605
  };
5296
5606
  }>;
5297
5607
  readonly delivery?: ("steer" | "queue") | null;
5298
- readonly resume?: boolean | null;
5299
- }["model"];
5608
+ }["text"];
5300
5609
  readonly files?: {
5301
- readonly id?: string | null;
5302
5610
  readonly command: string;
5303
- readonly arguments?: string | null;
5304
- readonly agent?: string | null;
5305
- readonly model?: {
5306
- readonly id: string;
5307
- readonly providerID: string;
5308
- readonly variant?: string;
5309
- } | null;
5611
+ readonly text: string;
5310
5612
  readonly files?: ReadonlyArray<{
5311
5613
  readonly uri: string;
5312
5614
  readonly name?: string;
@@ -5334,18 +5636,10 @@ export type SessionCommandInput = {
5334
5636
  };
5335
5637
  }>;
5336
5638
  readonly delivery?: ("steer" | "queue") | null;
5337
- readonly resume?: boolean | null;
5338
5639
  }["files"];
5339
5640
  readonly agents?: {
5340
- readonly id?: string | null;
5341
5641
  readonly command: string;
5342
- readonly arguments?: string | null;
5343
- readonly agent?: string | null;
5344
- readonly model?: {
5345
- readonly id: string;
5346
- readonly providerID: string;
5347
- readonly variant?: string;
5348
- } | null;
5642
+ readonly text: string;
5349
5643
  readonly files?: ReadonlyArray<{
5350
5644
  readonly uri: string;
5351
5645
  readonly name?: string;
@@ -5373,18 +5667,10 @@ export type SessionCommandInput = {
5373
5667
  };
5374
5668
  }>;
5375
5669
  readonly delivery?: ("steer" | "queue") | null;
5376
- readonly resume?: boolean | null;
5377
5670
  }["agents"];
5378
5671
  readonly skills?: {
5379
- readonly id?: string | null;
5380
5672
  readonly command: string;
5381
- readonly arguments?: string | null;
5382
- readonly agent?: string | null;
5383
- readonly model?: {
5384
- readonly id: string;
5385
- readonly providerID: string;
5386
- readonly variant?: string;
5387
- } | null;
5673
+ readonly text: string;
5388
5674
  readonly files?: ReadonlyArray<{
5389
5675
  readonly uri: string;
5390
5676
  readonly name?: string;
@@ -5412,18 +5698,10 @@ export type SessionCommandInput = {
5412
5698
  };
5413
5699
  }>;
5414
5700
  readonly delivery?: ("steer" | "queue") | null;
5415
- readonly resume?: boolean | null;
5416
5701
  }["skills"];
5417
5702
  readonly delivery?: {
5418
- readonly id?: string | null;
5419
5703
  readonly command: string;
5420
- readonly arguments?: string | null;
5421
- readonly agent?: string | null;
5422
- readonly model?: {
5423
- readonly id: string;
5424
- readonly providerID: string;
5425
- readonly variant?: string;
5426
- } | null;
5704
+ readonly text: string;
5427
5705
  readonly files?: ReadonlyArray<{
5428
5706
  readonly uri: string;
5429
5707
  readonly name?: string;
@@ -5451,51 +5729,9 @@ export type SessionCommandInput = {
5451
5729
  };
5452
5730
  }>;
5453
5731
  readonly delivery?: ("steer" | "queue") | null;
5454
- readonly resume?: boolean | null;
5455
5732
  }["delivery"];
5456
- readonly resume?: {
5457
- readonly id?: string | null;
5458
- readonly command: string;
5459
- readonly arguments?: string | null;
5460
- readonly agent?: string | null;
5461
- readonly model?: {
5462
- readonly id: string;
5463
- readonly providerID: string;
5464
- readonly variant?: string;
5465
- } | null;
5466
- readonly files?: ReadonlyArray<{
5467
- readonly uri: string;
5468
- readonly name?: string;
5469
- readonly description?: string;
5470
- readonly mention?: {
5471
- readonly start: number;
5472
- readonly end: number;
5473
- readonly text: string;
5474
- };
5475
- }>;
5476
- readonly agents?: ReadonlyArray<{
5477
- readonly name: string;
5478
- readonly mention?: {
5479
- readonly start: number;
5480
- readonly end: number;
5481
- readonly text: string;
5482
- };
5483
- }>;
5484
- readonly skills?: ReadonlyArray<{
5485
- readonly id: string;
5486
- readonly mention?: {
5487
- readonly start: number;
5488
- readonly end: number;
5489
- readonly text: string;
5490
- };
5491
- }>;
5492
- readonly delivery?: ("steer" | "queue") | null;
5493
- readonly resume?: boolean | null;
5494
- }["resume"];
5495
5733
  };
5496
- export type SessionCommandOutput = {
5497
- data: SessionInboxUser;
5498
- }["data"];
5734
+ export type SessionCommandOutput = void;
5499
5735
  export type SessionSkillInput = {
5500
5736
  readonly sessionID: {
5501
5737
  readonly sessionID: string;
@@ -5731,6 +5967,55 @@ export type SessionInstructionsEntryRemoveInput = {
5731
5967
  }["key"];
5732
5968
  };
5733
5969
  export type SessionInstructionsEntryRemoveOutput = void;
5970
+ export type SessionToolsPutInput = {
5971
+ readonly sessionID: {
5972
+ readonly sessionID: string;
5973
+ }["sessionID"];
5974
+ readonly tools: {
5975
+ readonly tools: ReadonlyArray<{
5976
+ readonly name: string;
5977
+ readonly description: string;
5978
+ readonly parameters?: {
5979
+ readonly [x: string]: JsonValue;
5980
+ };
5981
+ }>;
5982
+ }["tools"];
5983
+ };
5984
+ export type SessionToolsPutOutput = void;
5985
+ export type SessionToolsListInput = {
5986
+ readonly sessionID: {
5987
+ readonly sessionID: string;
5988
+ }["sessionID"];
5989
+ };
5990
+ export type SessionToolsListOutput = {
5991
+ data: Array<SessionDynamicToolDefinition>;
5992
+ }["data"];
5993
+ export type SessionToolsCallsInput = {
5994
+ readonly sessionID: {
5995
+ readonly sessionID: string;
5996
+ }["sessionID"];
5997
+ };
5998
+ export type SessionToolsCallsOutput = {
5999
+ data: Array<SessionDynamicToolCall>;
6000
+ }["data"];
6001
+ export type SessionToolsReplyInput = {
6002
+ readonly sessionID: {
6003
+ readonly sessionID: string;
6004
+ readonly callID: string;
6005
+ }["sessionID"];
6006
+ readonly callID: {
6007
+ readonly sessionID: string;
6008
+ readonly callID: string;
6009
+ }["callID"];
6010
+ readonly payload: {
6011
+ readonly status: "completed";
6012
+ readonly content: string;
6013
+ } | {
6014
+ readonly status: "failed";
6015
+ readonly message: string;
6016
+ };
6017
+ };
6018
+ export type SessionToolsReplyOutput = void;
5734
6019
  export type SessionGenerateInput = {
5735
6020
  readonly sessionID: {
5736
6021
  readonly sessionID: string;
@@ -5762,7 +6047,7 @@ export type SessionInterruptInput = {
5762
6047
  readonly continue?: boolean | undefined;
5763
6048
  }["continue"];
5764
6049
  };
5765
- export type SessionInterruptOutput = void;
6050
+ export type SessionInterruptOutput = SessionInterruptResponse;
5766
6051
  export type SessionBackgroundInput = {
5767
6052
  readonly sessionID: {
5768
6053
  readonly sessionID: string;
@@ -5779,8 +6064,129 @@ export type SessionMessageInput = {
5779
6064
  readonly messageID: string;
5780
6065
  }["messageID"];
5781
6066
  };
5782
- export type SessionMessageOutput = {
5783
- data: SessionMessageInfo;
6067
+ export type SessionMessageOutput = {
6068
+ data: SessionMessageInfo;
6069
+ }["data"];
6070
+ export type SessionMessageUpdateInput = {
6071
+ readonly sessionID: {
6072
+ readonly sessionID: string;
6073
+ readonly messageID: string;
6074
+ }["sessionID"];
6075
+ readonly messageID: {
6076
+ readonly sessionID: string;
6077
+ readonly messageID: string;
6078
+ }["messageID"];
6079
+ readonly content: {
6080
+ readonly content: ReadonlyArray<{
6081
+ readonly type: "text";
6082
+ readonly text: string;
6083
+ readonly state?: {
6084
+ readonly [x: string]: JsonValue;
6085
+ };
6086
+ } | {
6087
+ readonly type: "reasoning";
6088
+ readonly text: string;
6089
+ readonly state?: {
6090
+ readonly [x: string]: JsonValue;
6091
+ };
6092
+ readonly time?: {
6093
+ readonly created: number;
6094
+ readonly completed?: number;
6095
+ };
6096
+ } | {
6097
+ readonly type: "tool";
6098
+ readonly id: string;
6099
+ readonly name: string;
6100
+ readonly executed?: boolean;
6101
+ readonly providerState?: {
6102
+ readonly [x: string]: JsonValue;
6103
+ };
6104
+ readonly providerResultState?: {
6105
+ readonly [x: string]: JsonValue;
6106
+ };
6107
+ readonly state: {
6108
+ readonly status: "streaming";
6109
+ readonly input: string;
6110
+ } | {
6111
+ readonly status: "running";
6112
+ readonly input: {
6113
+ readonly [x: string]: JsonValue;
6114
+ };
6115
+ readonly metadata: {
6116
+ readonly [x: string]: JsonValue;
6117
+ };
6118
+ } | {
6119
+ readonly status: "completed";
6120
+ readonly input: {
6121
+ readonly [x: string]: JsonValue;
6122
+ };
6123
+ readonly content: readonly [
6124
+ ({
6125
+ readonly type: "text";
6126
+ readonly text: string;
6127
+ } | {
6128
+ readonly type: "file";
6129
+ readonly uri: string;
6130
+ readonly mime: string;
6131
+ readonly name?: string | null;
6132
+ }),
6133
+ ...Array<{
6134
+ readonly type: "text";
6135
+ readonly text: string;
6136
+ } | {
6137
+ readonly type: "file";
6138
+ readonly uri: string;
6139
+ readonly mime: string;
6140
+ readonly name?: string | null;
6141
+ }>
6142
+ ];
6143
+ readonly metadata?: {
6144
+ readonly [x: string]: JsonValue;
6145
+ };
6146
+ } | {
6147
+ readonly status: "error";
6148
+ readonly input: {
6149
+ readonly [x: string]: JsonValue;
6150
+ };
6151
+ readonly error: {
6152
+ readonly type: string;
6153
+ readonly message: string;
6154
+ readonly status?: number;
6155
+ };
6156
+ readonly content?: readonly [
6157
+ ({
6158
+ readonly type: "text";
6159
+ readonly text: string;
6160
+ } | {
6161
+ readonly type: "file";
6162
+ readonly uri: string;
6163
+ readonly mime: string;
6164
+ readonly name?: string | null;
6165
+ }),
6166
+ ...Array<{
6167
+ readonly type: "text";
6168
+ readonly text: string;
6169
+ } | {
6170
+ readonly type: "file";
6171
+ readonly uri: string;
6172
+ readonly mime: string;
6173
+ readonly name?: string | null;
6174
+ }>
6175
+ ];
6176
+ readonly metadata?: {
6177
+ readonly [x: string]: JsonValue;
6178
+ };
6179
+ };
6180
+ readonly time: {
6181
+ readonly created: number;
6182
+ readonly ran?: number;
6183
+ readonly completed?: number;
6184
+ };
6185
+ }>;
6186
+ }["content"];
6187
+ };
6188
+ export type SessionMessageUpdateOutput = {
6189
+ data: SessionMessageAssistant;
5784
6190
  }["data"];
5785
6191
  export type SessionEnvironmentInput = {
5786
6192
  readonly sessionID: {
@@ -5793,6 +6199,15 @@ export type SessionEnvironmentInput = {
5793
6199
  }["variables"];
5794
6200
  };
5795
6201
  export type SessionEnvironmentOutput = void;
6202
+ export type SessionViewInput = {
6203
+ readonly sessionID: {
6204
+ readonly sessionID: string;
6205
+ }["sessionID"];
6206
+ readonly idle: {
6207
+ readonly idle: number;
6208
+ }["idle"];
6209
+ };
6210
+ export type SessionViewOutput = void;
5796
6211
  export type MessageListInput = {
5797
6212
  readonly sessionID: {
5798
6213
  readonly sessionID: string;
@@ -5855,12 +6270,6 @@ export type ModelDefaultOutput = {
5855
6270
  data: ModelInfo | null;
5856
6271
  };
5857
6272
  export type GenerateTextInput = {
5858
- readonly location?: {
5859
- readonly location?: {
5860
- readonly directory?: string | undefined;
5861
- readonly workspace?: string | undefined;
5862
- } | undefined;
5863
- }["location"];
5864
6273
  readonly prompt: {
5865
6274
  readonly prompt: string;
5866
6275
  readonly model?: {
@@ -6364,6 +6773,18 @@ export type CredentialUpdateInput = {
6364
6773
  }["label"];
6365
6774
  };
6366
6775
  export type CredentialUpdateOutput = void;
6776
+ export type CredentialActivateInput = {
6777
+ readonly credentialID: {
6778
+ readonly credentialID: string;
6779
+ }["credentialID"];
6780
+ readonly location?: {
6781
+ readonly location?: {
6782
+ readonly directory?: string | undefined;
6783
+ readonly workspace?: string | undefined;
6784
+ } | undefined;
6785
+ }["location"];
6786
+ };
6787
+ export type CredentialActivateOutput = void;
6367
6788
  export type CredentialRemoveInput = {
6368
6789
  readonly credentialID: {
6369
6790
  readonly credentialID: string;
@@ -6377,6 +6798,45 @@ export type CredentialRemoveInput = {
6377
6798
  };
6378
6799
  export type CredentialRemoveOutput = void;
6379
6800
  export type ProjectListOutput = Array<Project>;
6801
+ export type ProjectUpdateInput = {
6802
+ readonly projectID: {
6803
+ readonly projectID: string;
6804
+ }["projectID"];
6805
+ readonly name?: {
6806
+ readonly name?: string;
6807
+ readonly icon?: {
6808
+ readonly url?: string;
6809
+ readonly override?: string;
6810
+ readonly color?: string;
6811
+ };
6812
+ readonly commands?: {
6813
+ readonly start?: string;
6814
+ };
6815
+ }["name"];
6816
+ readonly icon?: {
6817
+ readonly name?: string;
6818
+ readonly icon?: {
6819
+ readonly url?: string;
6820
+ readonly override?: string;
6821
+ readonly color?: string;
6822
+ };
6823
+ readonly commands?: {
6824
+ readonly start?: string;
6825
+ };
6826
+ }["icon"];
6827
+ readonly commands?: {
6828
+ readonly name?: string;
6829
+ readonly icon?: {
6830
+ readonly url?: string;
6831
+ readonly override?: string;
6832
+ readonly color?: string;
6833
+ };
6834
+ readonly commands?: {
6835
+ readonly start?: string;
6836
+ };
6837
+ }["commands"];
6838
+ };
6839
+ export type ProjectUpdateOutput = Project;
6380
6840
  export type ProjectCurrentInput = {
6381
6841
  readonly location?: {
6382
6842
  readonly location?: {
@@ -7707,6 +8167,196 @@ export type PtyRemoveInput = {
7707
8167
  }["location"];
7708
8168
  };
7709
8169
  export type PtyRemoveOutput = void;
8170
+ export type PtyConnectTokenInput = {
8171
+ readonly ptyID: {
8172
+ readonly ptyID: string;
8173
+ }["ptyID"];
8174
+ readonly location?: {
8175
+ readonly location?: {
8176
+ readonly directory?: string | undefined;
8177
+ readonly workspace?: string | undefined;
8178
+ } | undefined;
8179
+ }["location"];
8180
+ readonly "x-opencode-ticket"?: {
8181
+ readonly "x-opencode-ticket"?: string | undefined;
8182
+ }["x-opencode-ticket"];
8183
+ };
8184
+ export type PtyConnectTokenOutput = {
8185
+ location: {
8186
+ directory: string;
8187
+ workspaceID?: string;
8188
+ project: {
8189
+ id: string;
8190
+ directory: string;
8191
+ canonical: string;
8192
+ };
8193
+ };
8194
+ data: PtyTicketConnectToken;
8195
+ };
8196
+ export type ExperimentalPersistentPtyReadInput = {
8197
+ readonly sessionID: {
8198
+ readonly sessionID: string;
8199
+ }["sessionID"];
8200
+ readonly lines?: {
8201
+ readonly lines?: number | undefined;
8202
+ }["lines"];
8203
+ };
8204
+ export type ExperimentalPersistentPtyReadOutput = {
8205
+ data: PersistentPtyReadResult | null;
8206
+ }["data"];
8207
+ export type ExperimentalPersistentPtyListInput = {
8208
+ readonly sessionID: {
8209
+ readonly sessionID: string;
8210
+ }["sessionID"];
8211
+ };
8212
+ export type ExperimentalPersistentPtyListOutput = {
8213
+ data: Array<PersistentPtyInfo>;
8214
+ }["data"];
8215
+ export type ExperimentalPersistentPtyCreateInput = {
8216
+ readonly sessionID: {
8217
+ readonly sessionID: string;
8218
+ }["sessionID"];
8219
+ readonly command?: {
8220
+ readonly command?: string;
8221
+ readonly args: ReadonlyArray<string>;
8222
+ readonly cwd?: string;
8223
+ readonly title: string;
8224
+ readonly env: {
8225
+ readonly [x: string]: string;
8226
+ };
8227
+ readonly size?: {
8228
+ readonly cols: number;
8229
+ readonly rows: number;
8230
+ };
8231
+ }["command"];
8232
+ readonly args: {
8233
+ readonly command?: string;
8234
+ readonly args: ReadonlyArray<string>;
8235
+ readonly cwd?: string;
8236
+ readonly title: string;
8237
+ readonly env: {
8238
+ readonly [x: string]: string;
8239
+ };
8240
+ readonly size?: {
8241
+ readonly cols: number;
8242
+ readonly rows: number;
8243
+ };
8244
+ }["args"];
8245
+ readonly cwd?: {
8246
+ readonly command?: string;
8247
+ readonly args: ReadonlyArray<string>;
8248
+ readonly cwd?: string;
8249
+ readonly title: string;
8250
+ readonly env: {
8251
+ readonly [x: string]: string;
8252
+ };
8253
+ readonly size?: {
8254
+ readonly cols: number;
8255
+ readonly rows: number;
8256
+ };
8257
+ }["cwd"];
8258
+ readonly title: {
8259
+ readonly command?: string;
8260
+ readonly args: ReadonlyArray<string>;
8261
+ readonly cwd?: string;
8262
+ readonly title: string;
8263
+ readonly env: {
8264
+ readonly [x: string]: string;
8265
+ };
8266
+ readonly size?: {
8267
+ readonly cols: number;
8268
+ readonly rows: number;
8269
+ };
8270
+ }["title"];
8271
+ readonly env: {
8272
+ readonly command?: string;
8273
+ readonly args: ReadonlyArray<string>;
8274
+ readonly cwd?: string;
8275
+ readonly title: string;
8276
+ readonly env: {
8277
+ readonly [x: string]: string;
8278
+ };
8279
+ readonly size?: {
8280
+ readonly cols: number;
8281
+ readonly rows: number;
8282
+ };
8283
+ }["env"];
8284
+ readonly size?: {
8285
+ readonly command?: string;
8286
+ readonly args: ReadonlyArray<string>;
8287
+ readonly cwd?: string;
8288
+ readonly title: string;
8289
+ readonly env: {
8290
+ readonly [x: string]: string;
8291
+ };
8292
+ readonly size?: {
8293
+ readonly cols: number;
8294
+ readonly rows: number;
8295
+ };
8296
+ }["size"];
8297
+ };
8298
+ export type ExperimentalPersistentPtyCreateOutput = {
8299
+ data: PersistentPtyInfo;
8300
+ }["data"];
8301
+ export type ExperimentalPersistentPtyShutdownOutput = void;
8302
+ export type ExperimentalPersistentPtyHandoffOutput = {
8303
+ handoff: PersistentPtyHandoff | null;
8304
+ };
8305
+ export type ExperimentalPersistentPtyGetInput = {
8306
+ readonly ptyID: {
8307
+ readonly ptyID: string;
8308
+ }["ptyID"];
8309
+ };
8310
+ export type ExperimentalPersistentPtyGetOutput = {
8311
+ data: PersistentPtyInfo;
8312
+ }["data"];
8313
+ export type ExperimentalPersistentPtyUpdateInput = {
8314
+ readonly ptyID: {
8315
+ readonly ptyID: string;
8316
+ }["ptyID"];
8317
+ readonly attachmentID?: {
8318
+ readonly attachmentID?: string;
8319
+ readonly size: {
8320
+ readonly cols: number;
8321
+ readonly rows: number;
8322
+ };
8323
+ }["attachmentID"];
8324
+ readonly size: {
8325
+ readonly attachmentID?: string;
8326
+ readonly size: {
8327
+ readonly cols: number;
8328
+ readonly rows: number;
8329
+ };
8330
+ }["size"];
8331
+ };
8332
+ export type ExperimentalPersistentPtyUpdateOutput = {
8333
+ data: PersistentPtyInfo;
8334
+ }["data"];
8335
+ export type ExperimentalPersistentPtySnapshotInput = {
8336
+ readonly ptyID: {
8337
+ readonly ptyID: string;
8338
+ }["ptyID"];
8339
+ };
8340
+ export type ExperimentalPersistentPtySnapshotOutput = {
8341
+ data: PersistentPtySnapshot;
8342
+ }["data"];
8343
+ export type ExperimentalPersistentPtyRemoveInput = {
8344
+ readonly ptyID: {
8345
+ readonly ptyID: string;
8346
+ }["ptyID"];
8347
+ };
8348
+ export type ExperimentalPersistentPtyRemoveOutput = void;
8349
+ export type ExperimentalPersistentPtyConnectTokenInput = {
8350
+ readonly ptyID: {
8351
+ readonly ptyID: string;
8352
+ }["ptyID"];
8353
+ readonly "x-opencode-ticket"?: {
8354
+ readonly "x-opencode-ticket"?: string | undefined;
8355
+ }["x-opencode-ticket"];
8356
+ };
8357
+ export type ExperimentalPersistentPtyConnectTokenOutput = {
8358
+ data: PtyTicketConnectToken;
8359
+ }["data"];
7710
8360
  export type ShellListInput = {
7711
8361
  readonly location?: {
7712
8362
  readonly location?: {
@@ -7919,24 +8569,35 @@ export type WorktreeCreateInput = {
7919
8569
  readonly strategy: {
7920
8570
  readonly strategy: string;
7921
8571
  readonly from?: string;
8572
+ readonly branch?: string;
7922
8573
  readonly directory: string;
7923
8574
  readonly name?: string;
7924
8575
  }["strategy"];
7925
8576
  readonly from?: {
7926
8577
  readonly strategy: string;
7927
8578
  readonly from?: string;
8579
+ readonly branch?: string;
7928
8580
  readonly directory: string;
7929
8581
  readonly name?: string;
7930
8582
  }["from"];
8583
+ readonly branch?: {
8584
+ readonly strategy: string;
8585
+ readonly from?: string;
8586
+ readonly branch?: string;
8587
+ readonly directory: string;
8588
+ readonly name?: string;
8589
+ }["branch"];
7931
8590
  readonly directory: {
7932
8591
  readonly strategy: string;
7933
8592
  readonly from?: string;
8593
+ readonly branch?: string;
7934
8594
  readonly directory: string;
7935
8595
  readonly name?: string;
7936
8596
  }["directory"];
7937
8597
  readonly name?: {
7938
8598
  readonly strategy: string;
7939
8599
  readonly from?: string;
8600
+ readonly branch?: string;
7940
8601
  readonly directory: string;
7941
8602
  readonly name?: string;
7942
8603
  }["name"];
@@ -7962,6 +8623,25 @@ export type WorktreeRefreshInput = {
7962
8623
  }["projectID"];
7963
8624
  };
7964
8625
  export type WorktreeRefreshOutput = void;
8626
+ export type WorkspaceCreateInput = {
8627
+ readonly id?: {
8628
+ readonly id?: string | undefined;
8629
+ readonly provider: string;
8630
+ }["id"];
8631
+ readonly provider: {
8632
+ readonly id?: string | undefined;
8633
+ readonly provider: string;
8634
+ }["provider"];
8635
+ };
8636
+ export type WorkspaceCreateOutput = {
8637
+ data: string;
8638
+ }["data"];
8639
+ export type WorkspaceDestroyInput = {
8640
+ readonly workspaceID: {
8641
+ readonly workspaceID: string;
8642
+ }["workspaceID"];
8643
+ };
8644
+ export type WorkspaceDestroyOutput = WorkspaceDestroyResult;
7965
8645
  export type VcsGetInput = {
7966
8646
  readonly location?: {
7967
8647
  readonly location?: {
@@ -7982,6 +8662,26 @@ export type VcsGetOutput = {
7982
8662
  };
7983
8663
  data: VcsInfo;
7984
8664
  };
8665
+ export type VcsBaseInput = {
8666
+ readonly location?: {
8667
+ readonly location?: {
8668
+ readonly directory?: string | undefined;
8669
+ readonly workspace?: string | undefined;
8670
+ } | undefined;
8671
+ }["location"];
8672
+ };
8673
+ export type VcsBaseOutput = {
8674
+ location: {
8675
+ directory: string;
8676
+ workspaceID?: string;
8677
+ project: {
8678
+ id: string;
8679
+ directory: string;
8680
+ canonical: string;
8681
+ };
8682
+ };
8683
+ data: VcsBase | null;
8684
+ };
7985
8685
  export type VcsStatusInput = {
7986
8686
  readonly location?: {
7987
8687
  readonly location?: {
@@ -8002,13 +8702,52 @@ export type VcsStatusOutput = {
8002
8702
  };
8003
8703
  data: Array<VcsFileStatus>;
8004
8704
  };
8705
+ export type VcsBranchesInput = {
8706
+ readonly location?: {
8707
+ readonly location?: {
8708
+ readonly directory?: string | undefined;
8709
+ readonly workspace?: string | undefined;
8710
+ } | undefined;
8711
+ readonly search?: string | undefined;
8712
+ readonly limit?: number | undefined;
8713
+ }["location"];
8714
+ readonly search?: {
8715
+ readonly location?: {
8716
+ readonly directory?: string | undefined;
8717
+ readonly workspace?: string | undefined;
8718
+ } | undefined;
8719
+ readonly search?: string | undefined;
8720
+ readonly limit?: number | undefined;
8721
+ }["search"];
8722
+ readonly limit?: {
8723
+ readonly location?: {
8724
+ readonly directory?: string | undefined;
8725
+ readonly workspace?: string | undefined;
8726
+ } | undefined;
8727
+ readonly search?: string | undefined;
8728
+ readonly limit?: number | undefined;
8729
+ }["limit"];
8730
+ };
8731
+ export type VcsBranchesOutput = {
8732
+ location: {
8733
+ directory: string;
8734
+ workspaceID?: string;
8735
+ project: {
8736
+ id: string;
8737
+ directory: string;
8738
+ canonical: string;
8739
+ };
8740
+ };
8741
+ data: VcsBranchList;
8742
+ };
8005
8743
  export type VcsDiffInput = {
8006
8744
  readonly location?: {
8007
8745
  readonly location?: {
8008
8746
  readonly directory?: string | undefined;
8009
8747
  readonly workspace?: string | undefined;
8010
8748
  } | undefined;
8011
- readonly mode: "working" | "branch";
8749
+ readonly mode: "working" | "branch" | "committed";
8750
+ readonly base?: string | undefined;
8012
8751
  readonly context?: number | undefined;
8013
8752
  }["location"];
8014
8753
  readonly mode: {
@@ -8016,15 +8755,26 @@ export type VcsDiffInput = {
8016
8755
  readonly directory?: string | undefined;
8017
8756
  readonly workspace?: string | undefined;
8018
8757
  } | undefined;
8019
- readonly mode: "working" | "branch";
8758
+ readonly mode: "working" | "branch" | "committed";
8759
+ readonly base?: string | undefined;
8020
8760
  readonly context?: number | undefined;
8021
8761
  }["mode"];
8762
+ readonly base?: {
8763
+ readonly location?: {
8764
+ readonly directory?: string | undefined;
8765
+ readonly workspace?: string | undefined;
8766
+ } | undefined;
8767
+ readonly mode: "working" | "branch" | "committed";
8768
+ readonly base?: string | undefined;
8769
+ readonly context?: number | undefined;
8770
+ }["base"];
8022
8771
  readonly context?: {
8023
8772
  readonly location?: {
8024
8773
  readonly directory?: string | undefined;
8025
8774
  readonly workspace?: string | undefined;
8026
8775
  } | undefined;
8027
- readonly mode: "working" | "branch";
8776
+ readonly mode: "working" | "branch" | "committed";
8777
+ readonly base?: string | undefined;
8028
8778
  readonly context?: number | undefined;
8029
8779
  }["context"];
8030
8780
  };