shuvcode 2.0.30-shuv.1 → 2.1.4-shuv.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,7 +116,7 @@ export type PromptMention = {
116
116
  export type SkillID = string;
117
117
  export type SkillName = string;
118
118
  export type ShellID = string;
119
- export type SessionMessageProviderState = {
119
+ export type SessionMessageNative = {
120
120
  [x: string]: JsonValue;
121
121
  };
122
122
  export type SessionMessageToolStateStreaming = {
@@ -149,6 +149,7 @@ export type SessionStructuredError = {
149
149
  response?: {
150
150
  body: string;
151
151
  };
152
+ retryAfterMs?: number;
152
153
  };
153
154
  export type SessionActive = {
154
155
  type: "running";
@@ -180,7 +181,7 @@ export type SessionInboxSyntheticPayload1 = {
180
181
  [x: string]: any;
181
182
  };
182
183
  };
183
- export type SessionMessageProviderState1 = {
184
+ export type SessionMessageNative1 = {
184
185
  [x: string]: any;
185
186
  };
186
187
  export type ToolFileContent1 = {
@@ -230,6 +231,7 @@ export type ModelCapabilities = {
230
231
  tools: boolean;
231
232
  input: Array<string>;
232
233
  output: Array<string>;
234
+ temperature?: boolean;
233
235
  };
234
236
  export type MoneyUSDPerMillionTokens = number;
235
237
  export type GenerateTextResponse = {
@@ -237,6 +239,17 @@ export type GenerateTextResponse = {
237
239
  text: string;
238
240
  };
239
241
  };
242
+ export type VoiceTransportType = "webrtc" | "websocket";
243
+ export type VoiceWebRTCTransport = {
244
+ type: "webrtc";
245
+ sdp: string;
246
+ };
247
+ export type VoiceWebSocketTransport = {
248
+ type: "websocket";
249
+ url: string;
250
+ token: string;
251
+ expiresAt: number;
252
+ };
240
253
  export type IntegrationID = string;
241
254
  export type IntegrationMethodID = string;
242
255
  export type IntegrationEnvMethod = {
@@ -334,6 +347,17 @@ export type McpResourceTemplate = {
334
347
  description?: string;
335
348
  mimeType?: string;
336
349
  };
350
+ export type PtyTicketConnectToken = {
351
+ ticket: string;
352
+ expires_in: number;
353
+ };
354
+ export type CredentialKey = {
355
+ type: "key";
356
+ key: string;
357
+ metadata?: {
358
+ [x: string]: JsonValue;
359
+ };
360
+ };
337
361
  export type ProjectVcs = string;
338
362
  export type ProjectIcon = {
339
363
  url?: string;
@@ -392,10 +416,6 @@ export type SessionStatus = {
392
416
  } | {
393
417
  type: "busy";
394
418
  };
395
- export type PtyTicketConnectToken = {
396
- ticket: string;
397
- expires_in: number;
398
- };
399
419
  export type PersistentPtyHandoff = {
400
420
  directory: string;
401
421
  instanceID: string;
@@ -436,10 +456,16 @@ export type McpProtocol = "legacy" | "auto" | "2026-07-28";
436
456
  export type ConfigWorktree = {
437
457
  directory: string;
438
458
  };
439
- export type ConfigModelCapabilities = {
440
- tools?: boolean;
441
- input?: Array<string>;
442
- output?: Array<string>;
459
+ export type ConfigModelReasoning = {
460
+ supported: false;
461
+ } | {
462
+ supported: true;
463
+ toggle?: boolean;
464
+ effort?: Array<string>;
465
+ budget?: {
466
+ min?: number;
467
+ max?: number;
468
+ };
443
469
  };
444
470
  export type ConfigShellOption = {
445
471
  path: string;
@@ -476,14 +502,6 @@ export type ModelRef = {
476
502
  providerID: ProviderID;
477
503
  variant?: string;
478
504
  };
479
- export type SessionProviderContextProvenance = {
480
- providerID: ProviderID;
481
- provider: string;
482
- modelID: string;
483
- route: string;
484
- protocol: string;
485
- endpoint: string;
486
- };
487
505
  export type ProviderSettings = {
488
506
  timeout?: number | false;
489
507
  headerTimeout?: number | false;
@@ -582,7 +600,6 @@ export type SessionMessageCompactionRunning = {
582
600
  status: "running";
583
601
  reason: "auto" | "manual";
584
602
  summary: string;
585
- recent: string;
586
603
  };
587
604
  export type FileSystemEntry = {
588
605
  path: RelativePath;
@@ -703,12 +720,12 @@ export type ShellInfo1 = {
703
720
  export type SessionMessageAssistantText = {
704
721
  type: "text";
705
722
  text: string;
706
- state?: SessionMessageProviderState;
723
+ native?: SessionMessageNative;
707
724
  };
708
725
  export type SessionMessageAssistantReasoning = {
709
726
  type: "reasoning";
710
727
  text: string;
711
- state?: SessionMessageProviderState;
728
+ native?: SessionMessageNative;
712
729
  time?: {
713
730
  created: number;
714
731
  completed?: number;
@@ -788,12 +805,12 @@ export type LocationRef = {
788
805
  export type SessionMessageAssistantText1 = {
789
806
  type: "text";
790
807
  text: string;
791
- state?: SessionMessageProviderState1;
808
+ native?: SessionMessageNative1;
792
809
  };
793
810
  export type SessionMessageAssistantReasoning1 = {
794
811
  type: "reasoning";
795
812
  text: string;
796
- state?: SessionMessageProviderState1;
813
+ native?: SessionMessageNative1;
797
814
  time?: {
798
815
  created: number;
799
816
  completed?: number;
@@ -875,6 +892,7 @@ export type ModelCompatibility = {
875
892
  requireFinishReason?: boolean;
876
893
  requireAssistantAfterTool?: boolean;
877
894
  supportsPromptCacheKey?: boolean;
895
+ streamUsage?: boolean;
878
896
  cacheFormat?: ModelCacheFormat;
879
897
  supportsThinkingBlockBinding?: boolean;
880
898
  supportsEffortUpdates?: boolean;
@@ -886,6 +904,7 @@ export type ProviderCompatibility = {
886
904
  requireFinishReason?: boolean;
887
905
  requireAssistantAfterTool?: boolean;
888
906
  supportsPromptCacheKey?: boolean;
907
+ streamUsage?: boolean;
889
908
  cacheFormat?: ModelCacheFormat;
890
909
  };
891
910
  export type ModelCost = {
@@ -900,6 +919,15 @@ export type ModelCost = {
900
919
  write: MoneyUSDPerMillionTokens;
901
920
  };
902
921
  };
922
+ export type VoiceModel = {
923
+ model: string;
924
+ provider: string;
925
+ transports: Array<VoiceTransportType>;
926
+ available: boolean;
927
+ integration?: string | undefined;
928
+ workspace?: string | undefined;
929
+ };
930
+ export type VoiceTransport = VoiceWebRTCTransport | VoiceWebSocketTransport;
903
931
  export type IntegrationCommandMethod = {
904
932
  id: IntegrationMethodID;
905
933
  type: "command";
@@ -1103,7 +1131,7 @@ export type FormMultiselectField1 = {
1103
1131
  custom?: boolean;
1104
1132
  default?: Array<string>;
1105
1133
  };
1106
- export type FormAnswer2 = {
1134
+ export type FormAnswer1 = {
1107
1135
  [x: string]: FormValue1;
1108
1136
  };
1109
1137
  export type VcsInfo = {
@@ -1114,6 +1142,13 @@ export type WebSearchProvider = {
1114
1142
  id: WebSearchID;
1115
1143
  name: string;
1116
1144
  };
1145
+ export type ConfigModelCapabilities = {
1146
+ tools?: boolean;
1147
+ input?: Array<string>;
1148
+ output?: Array<string>;
1149
+ temperature?: boolean;
1150
+ reasoning?: ConfigModelReasoning;
1151
+ };
1117
1152
  export type SessionMessageLocationSwitched = {
1118
1153
  id: SessionMessageID;
1119
1154
  metadata?: {
@@ -1178,10 +1213,22 @@ export type SessionMessageModelSelected = {
1178
1213
  model: ModelRef;
1179
1214
  previous?: ModelRef;
1180
1215
  };
1181
- export type SessionProviderContext = {
1182
- version: 1;
1183
- provenance: SessionProviderContextProvenance;
1184
- messages: JsonValue;
1216
+ export type SessionMessageCompactionCompleted = {
1217
+ type: "compaction";
1218
+ id: SessionMessageID;
1219
+ metadata?: {
1220
+ [x: string]: JsonValue;
1221
+ };
1222
+ time: {
1223
+ created: number;
1224
+ };
1225
+ status: "completed";
1226
+ reason: "auto" | "manual";
1227
+ model?: ModelRef;
1228
+ native?: SessionMessageNative;
1229
+ summary: string;
1230
+ cost?: MoneyUSD;
1231
+ tokens?: TokenUsageInfo;
1185
1232
  };
1186
1233
  export type ProviderRequest = {
1187
1234
  settings: ProviderSettings;
@@ -1368,6 +1415,40 @@ export type SessionViewed = {
1368
1415
  idle: number;
1369
1416
  };
1370
1417
  };
1418
+ export type SessionArchived = {
1419
+ id: EventID;
1420
+ created: number;
1421
+ metadata?: {
1422
+ [x: string]: any;
1423
+ };
1424
+ type: "session.archived";
1425
+ durable: {
1426
+ aggregateID: string;
1427
+ seq: EventSeq;
1428
+ version: 1;
1429
+ };
1430
+ location?: LocationRef;
1431
+ data: {
1432
+ sessionID: SessionID;
1433
+ };
1434
+ };
1435
+ export type SessionUnarchived = {
1436
+ id: EventID;
1437
+ created: number;
1438
+ metadata?: {
1439
+ [x: string]: any;
1440
+ };
1441
+ type: "session.unarchived";
1442
+ durable: {
1443
+ aggregateID: string;
1444
+ seq: EventSeq;
1445
+ version: 1;
1446
+ };
1447
+ location?: LocationRef;
1448
+ data: {
1449
+ sessionID: SessionID;
1450
+ };
1451
+ };
1371
1452
  export type SessionDeleted = {
1372
1453
  id: EventID;
1373
1454
  created: number;
@@ -1701,7 +1782,7 @@ export type SessionStepEnded = {
1701
1782
  assistantMessageID: SessionMessageID;
1702
1783
  finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
1703
1784
  rawFinish?: string;
1704
- providerState?: SessionMessageProviderState1;
1785
+ native?: SessionMessageNative1;
1705
1786
  cost: MoneyUSD;
1706
1787
  tokens: TokenUsageInfo;
1707
1788
  snapshot?: SnapshotID;
@@ -1727,7 +1808,7 @@ export type SessionStepFailed = {
1727
1808
  error: SessionStructuredError;
1728
1809
  finish?: "content-filter";
1729
1810
  rawFinish?: string;
1730
- providerState?: SessionMessageProviderState1;
1811
+ native?: SessionMessageNative1;
1731
1812
  cost?: MoneyUSD;
1732
1813
  tokens?: TokenUsageInfo;
1733
1814
  snapshot?: SnapshotID;
@@ -1771,7 +1852,7 @@ export type SessionTextEnded = {
1771
1852
  assistantMessageID: SessionMessageID;
1772
1853
  ordinal: number;
1773
1854
  text: string;
1774
- state?: SessionMessageProviderState1;
1855
+ native?: SessionMessageNative1;
1775
1856
  };
1776
1857
  };
1777
1858
  export type SessionReasoningStarted = {
@@ -1791,7 +1872,7 @@ export type SessionReasoningStarted = {
1791
1872
  sessionID: SessionID;
1792
1873
  assistantMessageID: SessionMessageID;
1793
1874
  ordinal: number;
1794
- state?: SessionMessageProviderState1;
1875
+ native?: SessionMessageNative1;
1795
1876
  };
1796
1877
  };
1797
1878
  export type SessionReasoningEnded = {
@@ -1812,7 +1893,7 @@ export type SessionReasoningEnded = {
1812
1893
  assistantMessageID: SessionMessageID;
1813
1894
  ordinal: number;
1814
1895
  text: string;
1815
- state?: SessionMessageProviderState1;
1896
+ native?: SessionMessageNative1;
1816
1897
  };
1817
1898
  };
1818
1899
  export type SessionToolInputStarted = {
@@ -1876,7 +1957,7 @@ export type SessionToolCalled = {
1876
1957
  [x: string]: any;
1877
1958
  };
1878
1959
  executed: boolean;
1879
- state?: SessionMessageProviderState1;
1960
+ native?: SessionMessageNative1;
1880
1961
  };
1881
1962
  };
1882
1963
  export type SessionToolSubagentPrepared = {
@@ -1942,10 +2023,32 @@ export type SessionCompactionStarted = {
1942
2023
  data: {
1943
2024
  sessionID: SessionID;
1944
2025
  reason: "auto" | "manual";
1945
- recent: string;
1946
2026
  inputID?: SessionMessageID;
1947
2027
  };
1948
2028
  };
2029
+ export type SessionCompactionEnded = {
2030
+ id: EventID;
2031
+ created: number;
2032
+ metadata?: {
2033
+ [x: string]: any;
2034
+ };
2035
+ type: "session.compaction.ended";
2036
+ durable: {
2037
+ aggregateID: string;
2038
+ seq: EventSeq;
2039
+ version: 1;
2040
+ };
2041
+ location?: LocationRef;
2042
+ data: {
2043
+ sessionID: SessionID;
2044
+ reason: "auto" | "manual";
2045
+ model?: ModelRef;
2046
+ native?: SessionMessageNative1;
2047
+ text: string;
2048
+ cost?: MoneyUSD;
2049
+ tokens?: TokenUsageInfo;
2050
+ };
2051
+ };
1949
2052
  export type SessionCompactionFailed = {
1950
2053
  id: EventID;
1951
2054
  created: number;
@@ -2632,7 +2735,7 @@ export type SessionToolSuccess = {
2632
2735
  [x: string]: JsonValue;
2633
2736
  };
2634
2737
  executed: boolean;
2635
- resultState?: SessionMessageProviderState1;
2738
+ native?: SessionMessageNative1;
2636
2739
  };
2637
2740
  };
2638
2741
  export type SessionToolFailed = {
@@ -2658,7 +2761,7 @@ export type SessionToolFailed = {
2658
2761
  [x: string]: JsonValue;
2659
2762
  };
2660
2763
  executed: boolean;
2661
- resultState?: SessionMessageProviderState1;
2764
+ native?: SessionMessageNative1;
2662
2765
  };
2663
2766
  };
2664
2767
  export type SessionMessageToolStateCompleted1 = {
@@ -2692,14 +2795,6 @@ export type FormState = {
2692
2795
  status: "cancelled";
2693
2796
  message?: string;
2694
2797
  };
2695
- export type CredentialKey = {
2696
- type: "key";
2697
- key: string;
2698
- metadata?: {
2699
- [x: string]: JsonValue;
2700
- };
2701
- configuration?: FormAnswer;
2702
- };
2703
2798
  export type ProviderInfo = {
2704
2799
  id: ProviderID;
2705
2800
  canonical?: ProviderID;
@@ -2716,6 +2811,21 @@ export type ProviderInfo = {
2716
2811
  [x: string]: any;
2717
2812
  };
2718
2813
  };
2814
+ export type VoiceModelsResponse = {
2815
+ data: {
2816
+ models: Array<VoiceModel>;
2817
+ default?: string | undefined;
2818
+ };
2819
+ };
2820
+ export type VoiceSessionResponse = {
2821
+ data: {
2822
+ transport: VoiceTransport;
2823
+ session?: {
2824
+ id: string;
2825
+ } | undefined;
2826
+ };
2827
+ };
2828
+ export type CredentialValue = CredentialOAuth | CredentialKey | CredentialExternal;
2719
2829
  export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo;
2720
2830
  export type PtyCreated = {
2721
2831
  id: EventID;
@@ -2775,7 +2885,7 @@ export type FormReplied = {
2775
2885
  data: {
2776
2886
  id: FormID;
2777
2887
  sessionID: string;
2778
- answer: FormAnswer2;
2888
+ answer: FormAnswer1;
2779
2889
  };
2780
2890
  };
2781
2891
  export type SessionInboxMove = {
@@ -2812,50 +2922,7 @@ export type SessionStatsInfo = {
2812
2922
  activity: Array<SessionStatsActivity>;
2813
2923
  models: Array<SessionStatsModelUsage>;
2814
2924
  };
2815
- export type SessionMessageCompactionCompleted = {
2816
- type: "compaction";
2817
- id: SessionMessageID;
2818
- metadata?: {
2819
- [x: string]: JsonValue;
2820
- };
2821
- time: {
2822
- created: number;
2823
- };
2824
- status: "completed";
2825
- reason: "auto" | "manual";
2826
- model?: ModelRef;
2827
- providerState?: SessionMessageProviderState;
2828
- summary: string;
2829
- recent: string;
2830
- providerContext?: SessionProviderContext;
2831
- cost?: MoneyUSD;
2832
- tokens?: TokenUsageInfo;
2833
- };
2834
- export type SessionCompactionEnded = {
2835
- id: EventID;
2836
- created: number;
2837
- metadata?: {
2838
- [x: string]: any;
2839
- };
2840
- type: "session.compaction.ended";
2841
- durable: {
2842
- aggregateID: string;
2843
- seq: EventSeq;
2844
- version: 1;
2845
- };
2846
- location?: LocationRef;
2847
- data: {
2848
- sessionID: SessionID;
2849
- reason: "auto" | "manual";
2850
- model?: ModelRef;
2851
- providerState?: SessionMessageProviderState1;
2852
- providerContext?: SessionProviderContext;
2853
- text: string;
2854
- recent: string;
2855
- cost?: MoneyUSD;
2856
- tokens?: TokenUsageInfo;
2857
- };
2858
- };
2925
+ export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
2859
2926
  export type ModelInfo = {
2860
2927
  id: string;
2861
2928
  modelID: string;
@@ -3178,6 +3245,7 @@ export type ConfigEntry = {
3178
3245
  modelID?: string;
3179
3246
  family?: string;
3180
3247
  name?: string;
3248
+ releaseDate?: string;
3181
3249
  compatibility?: ModelCompatibility;
3182
3250
  package?: string;
3183
3251
  settings?: ConfigModelSettings;
@@ -3233,8 +3301,11 @@ export type ConfigEntry = {
3233
3301
  };
3234
3302
  experimental?: {
3235
3303
  portable_shell_scanner?: boolean;
3304
+ todo?: boolean;
3305
+ background_compaction?: boolean;
3236
3306
  subagent_depth?: number;
3237
3307
  jev?: boolean;
3308
+ location_idle_timeout?: string | false;
3238
3309
  policies?: Array<{
3239
3310
  action: "provider.use" | "tool.use" | "integration.use";
3240
3311
  resource: string;
@@ -3261,8 +3332,7 @@ export type SessionMessageAssistantTool = {
3261
3332
  id: string;
3262
3333
  name: string;
3263
3334
  executed?: boolean;
3264
- providerState?: SessionMessageProviderState;
3265
- providerResultState?: SessionMessageProviderState;
3335
+ native?: SessionMessageNative;
3266
3336
  state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning | SessionMessageToolStateCompleted | SessionMessageToolStateError;
3267
3337
  time: {
3268
3338
  created: number;
@@ -3292,8 +3362,7 @@ export type SessionMessageAssistantTool1 = {
3292
3362
  id: string;
3293
3363
  name: string;
3294
3364
  executed?: boolean;
3295
- providerState?: SessionMessageProviderState1;
3296
- providerResultState?: SessionMessageProviderState1;
3365
+ native?: SessionMessageNative1;
3297
3366
  state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning1 | SessionMessageToolStateCompleted1 | SessionMessageToolStateError1;
3298
3367
  time: {
3299
3368
  created: number;
@@ -3302,9 +3371,14 @@ export type SessionMessageAssistantTool1 = {
3302
3371
  };
3303
3372
  };
3304
3373
  export type FormFields = [FormField, ...Array<FormField>];
3305
- export type CredentialValue = CredentialOAuth | CredentialKey | CredentialExternal;
3374
+ export type CredentialEntry = {
3375
+ id: CredentialID;
3376
+ integrationID: IntegrationID;
3377
+ label: string;
3378
+ active: boolean;
3379
+ value: CredentialValue;
3380
+ };
3306
3381
  export type FormFields2 = [FormField1, ...Array<FormField1>];
3307
- export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
3308
3382
  export type SessionsResponse = {
3309
3383
  data: Array<SessionInfo>;
3310
3384
  cursor: {
@@ -3334,7 +3408,7 @@ export type SessionMessageAssistant = {
3334
3408
  };
3335
3409
  finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
3336
3410
  rawFinish?: string;
3337
- providerState?: SessionMessageProviderState;
3411
+ native?: SessionMessageNative;
3338
3412
  cost?: MoneyUSD;
3339
3413
  tokens?: TokenUsageInfo;
3340
3414
  error?: SessionStructuredError;
@@ -3392,13 +3466,6 @@ export type IntegrationExternalMethod = {
3392
3466
  label: string;
3393
3467
  form?: FormFields;
3394
3468
  };
3395
- export type CredentialEntry = {
3396
- id: CredentialID;
3397
- integrationID: IntegrationID;
3398
- label: string;
3399
- active: boolean;
3400
- value: CredentialValue;
3401
- };
3402
3469
  export type FormInfo1 = {
3403
3470
  id: FormID;
3404
3471
  sessionID: string;
@@ -3450,7 +3517,7 @@ export type SessionMessagesResponse = {
3450
3517
  next?: string | null;
3451
3518
  };
3452
3519
  };
3453
- export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | 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 | SessionToolSubagentPrepared | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded | SessionMessageContentUpdated;
3520
+ export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | SessionViewed | SessionArchived | SessionUnarchived | 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 | SessionToolSubagentPrepared | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded | SessionMessageContentUpdated;
3454
3521
  export type IntegrationInfo = {
3455
3522
  id: IntegrationID;
3456
3523
  name: string;
@@ -3460,7 +3527,7 @@ export type IntegrationInfo = {
3460
3527
  methods: Array<IntegrationMethod>;
3461
3528
  connections: Array<ConnectionInfo>;
3462
3529
  };
3463
- export type V2Event = LocationShutdown | ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | 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 | SessionToolSubagentPrepared | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PermissionCancelled | 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 | V2EventRpc | V2EventServerConnected;
3530
+ export type V2Event = LocationShutdown | ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionMetadataUpdated | SessionPermissions | SessionViewed | SessionArchived | SessionUnarchived | 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 | SessionToolSubagentPrepared | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PermissionCancelled | 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 | V2EventRpc | V2EventServerConnected;
3464
3531
  export type SessionLogItem = SessionEventDurable | EventLogSynced;
3465
3532
  export type InvalidRequestError = {
3466
3533
  readonly _tag: "InvalidRequestError";
@@ -3605,12 +3672,23 @@ export type McpServerNotFoundError = {
3605
3672
  readonly message: string;
3606
3673
  };
3607
3674
  export declare const isMcpServerNotFoundError: (value: unknown) => value is McpServerNotFoundError;
3675
+ export type ForbiddenError = {
3676
+ readonly _tag: "ForbiddenError";
3677
+ readonly message: string;
3678
+ };
3679
+ export declare const isForbiddenError: (value: unknown) => value is ForbiddenError;
3608
3680
  export type ProjectNotFoundError = {
3609
3681
  readonly _tag: "ProjectNotFoundError";
3610
3682
  readonly projectID: string;
3611
3683
  readonly message: string;
3612
3684
  };
3613
3685
  export declare const isProjectNotFoundError: (value: unknown) => value is ProjectNotFoundError;
3686
+ export type PermissionSavedNotFoundError = {
3687
+ readonly _tag: "PermissionSavedNotFoundError";
3688
+ readonly id: string;
3689
+ readonly message: string;
3690
+ };
3691
+ export declare const isPermissionSavedNotFoundError: (value: unknown) => value is PermissionSavedNotFoundError;
3614
3692
  export type PermissionNotFoundError = {
3615
3693
  readonly _tag: "PermissionNotFoundError";
3616
3694
  readonly requestID: string;
@@ -3643,11 +3721,6 @@ export type PtyNotFoundError = {
3643
3721
  readonly message: string;
3644
3722
  };
3645
3723
  export declare const isPtyNotFoundError: (value: unknown) => value is PtyNotFoundError;
3646
- export type ForbiddenError = {
3647
- readonly _tag: "ForbiddenError";
3648
- readonly message: string;
3649
- };
3650
- export declare const isForbiddenError: (value: unknown) => value is ForbiddenError;
3651
3724
  export type ShellNotFoundError = {
3652
3725
  readonly _tag: "ShellNotFoundError";
3653
3726
  readonly id: string;
@@ -3753,6 +3826,7 @@ export type SessionListInput = {
3753
3826
  readonly order?: "asc" | "desc" | undefined;
3754
3827
  readonly search?: string | undefined;
3755
3828
  readonly parentID?: string | null | undefined;
3829
+ readonly archived?: boolean | undefined;
3756
3830
  readonly directory?: string | undefined;
3757
3831
  readonly project?: string | undefined;
3758
3832
  readonly subpath?: string | undefined;
@@ -3763,6 +3837,7 @@ export type SessionListInput = {
3763
3837
  readonly order?: "asc" | "desc" | undefined;
3764
3838
  readonly search?: string | undefined;
3765
3839
  readonly parentID?: string | null | undefined;
3840
+ readonly archived?: boolean | undefined;
3766
3841
  readonly directory?: string | undefined;
3767
3842
  readonly project?: string | undefined;
3768
3843
  readonly subpath?: string | undefined;
@@ -3773,6 +3848,7 @@ export type SessionListInput = {
3773
3848
  readonly order?: "asc" | "desc" | undefined;
3774
3849
  readonly search?: string | undefined;
3775
3850
  readonly parentID?: string | null | undefined;
3851
+ readonly archived?: boolean | undefined;
3776
3852
  readonly directory?: string | undefined;
3777
3853
  readonly project?: string | undefined;
3778
3854
  readonly subpath?: string | undefined;
@@ -3783,16 +3859,29 @@ export type SessionListInput = {
3783
3859
  readonly order?: "asc" | "desc" | undefined;
3784
3860
  readonly search?: string | undefined;
3785
3861
  readonly parentID?: string | null | undefined;
3862
+ readonly archived?: boolean | undefined;
3786
3863
  readonly directory?: string | undefined;
3787
3864
  readonly project?: string | undefined;
3788
3865
  readonly subpath?: string | undefined;
3789
3866
  readonly cursor?: string | undefined;
3790
3867
  }["parentID"];
3868
+ readonly archived?: {
3869
+ readonly limit?: number | undefined;
3870
+ readonly order?: "asc" | "desc" | undefined;
3871
+ readonly search?: string | undefined;
3872
+ readonly parentID?: string | null | undefined;
3873
+ readonly archived?: boolean | undefined;
3874
+ readonly directory?: string | undefined;
3875
+ readonly project?: string | undefined;
3876
+ readonly subpath?: string | undefined;
3877
+ readonly cursor?: string | undefined;
3878
+ }["archived"];
3791
3879
  readonly directory?: {
3792
3880
  readonly limit?: number | undefined;
3793
3881
  readonly order?: "asc" | "desc" | undefined;
3794
3882
  readonly search?: string | undefined;
3795
3883
  readonly parentID?: string | null | undefined;
3884
+ readonly archived?: boolean | undefined;
3796
3885
  readonly directory?: string | undefined;
3797
3886
  readonly project?: string | undefined;
3798
3887
  readonly subpath?: string | undefined;
@@ -3803,6 +3892,7 @@ export type SessionListInput = {
3803
3892
  readonly order?: "asc" | "desc" | undefined;
3804
3893
  readonly search?: string | undefined;
3805
3894
  readonly parentID?: string | null | undefined;
3895
+ readonly archived?: boolean | undefined;
3806
3896
  readonly directory?: string | undefined;
3807
3897
  readonly project?: string | undefined;
3808
3898
  readonly subpath?: string | undefined;
@@ -3813,6 +3903,7 @@ export type SessionListInput = {
3813
3903
  readonly order?: "asc" | "desc" | undefined;
3814
3904
  readonly search?: string | undefined;
3815
3905
  readonly parentID?: string | null | undefined;
3906
+ readonly archived?: boolean | undefined;
3816
3907
  readonly directory?: string | undefined;
3817
3908
  readonly project?: string | undefined;
3818
3909
  readonly subpath?: string | undefined;
@@ -3823,6 +3914,7 @@ export type SessionListInput = {
3823
3914
  readonly order?: "asc" | "desc" | undefined;
3824
3915
  readonly search?: string | undefined;
3825
3916
  readonly parentID?: string | null | undefined;
3917
+ readonly archived?: boolean | undefined;
3826
3918
  readonly directory?: string | undefined;
3827
3919
  readonly project?: string | undefined;
3828
3920
  readonly subpath?: string | undefined;
@@ -4117,1348 +4209,104 @@ export type SessionImportInput = {
4117
4209
  readonly directory: string;
4118
4210
  };
4119
4211
  };
4120
- readonly messages: ReadonlyArray<{
4121
- readonly id: string;
4122
- readonly metadata?: {
4123
- readonly [x: string]: JsonValue;
4124
- };
4125
- readonly time: {
4126
- readonly created: number;
4127
- };
4128
- readonly type: "agent-switched";
4129
- readonly agent: string;
4130
- readonly previous?: string;
4131
- } | {
4212
+ readonly messages: ReadonlyArray<JsonValue>;
4213
+ readonly location?: {
4214
+ readonly directory: string;
4215
+ } | null;
4216
+ }["info"];
4217
+ readonly messages: {
4218
+ readonly info: {
4132
4219
  readonly id: string;
4133
- readonly metadata?: {
4134
- readonly [x: string]: JsonValue;
4135
- };
4136
- readonly time: {
4137
- readonly created: number;
4138
- };
4139
- readonly type: "model-switched";
4140
- readonly model: {
4141
- readonly id: string;
4142
- readonly providerID: string;
4143
- readonly variant?: string;
4220
+ readonly parentID?: string;
4221
+ readonly fork?: {
4222
+ readonly sessionID: string;
4223
+ readonly boundary: {
4224
+ readonly type: "before";
4225
+ readonly messageID: string;
4226
+ } | {
4227
+ readonly type: "through";
4228
+ readonly messageID: string;
4229
+ };
4144
4230
  };
4145
- readonly previous?: {
4231
+ readonly projectID: string;
4232
+ readonly agent?: string;
4233
+ readonly model?: {
4146
4234
  readonly id: string;
4147
4235
  readonly providerID: string;
4148
4236
  readonly variant?: string;
4149
4237
  };
4150
- } | {
4151
- readonly id: string;
4152
- readonly metadata?: {
4153
- readonly [x: string]: JsonValue;
4154
- };
4155
- readonly time: {
4156
- readonly created: number;
4157
- };
4158
- readonly type: "location-switched";
4159
- readonly projectID?: string;
4160
- readonly subpath?: string;
4161
- readonly location: {
4162
- readonly directory: string;
4163
- };
4164
- readonly previous?: {
4165
- readonly location: {
4166
- readonly directory: string;
4167
- };
4168
- readonly projectID?: string;
4169
- readonly subpath?: string;
4170
- } | null;
4171
- } | {
4172
- readonly id: string;
4173
- readonly metadata?: {
4174
- readonly [x: string]: JsonValue;
4175
- };
4176
- readonly time: {
4177
- readonly created: number;
4178
- };
4179
- readonly text: string;
4180
- readonly files?: ReadonlyArray<{
4181
- readonly data: string;
4182
- readonly mime: string;
4183
- readonly source: {
4184
- readonly type: "inline";
4185
- } | {
4186
- readonly type: "uri";
4187
- readonly uri: string;
4188
- };
4189
- readonly name?: string;
4190
- readonly description?: string;
4191
- readonly mention?: {
4192
- readonly start: number;
4193
- readonly end: number;
4194
- readonly text: string;
4195
- };
4196
- }>;
4197
- readonly agents?: ReadonlyArray<{
4198
- readonly name: string;
4199
- readonly mention?: {
4200
- readonly start: number;
4201
- readonly end: number;
4202
- readonly text: string;
4203
- };
4204
- }>;
4205
- readonly skills?: ReadonlyArray<{
4206
- readonly id: string;
4207
- readonly name: string;
4208
- readonly text?: string;
4209
- readonly mention?: {
4210
- readonly start: number;
4211
- readonly end: number;
4212
- readonly text: string;
4213
- };
4214
- }>;
4215
- readonly type: "user";
4216
- } | {
4217
- readonly id: string;
4218
- readonly metadata?: {
4219
- readonly [x: string]: JsonValue;
4220
- };
4221
- readonly time: {
4222
- readonly created: number;
4223
- };
4224
- readonly text: string;
4225
- readonly description?: string;
4226
- readonly type: "synthetic";
4227
- } | {
4228
- readonly id: string;
4229
- readonly metadata?: {
4230
- readonly [x: string]: JsonValue;
4231
- };
4232
- readonly time: {
4233
- readonly created: number;
4234
- };
4235
- readonly type: "system";
4236
- readonly text: string;
4237
- readonly description?: string;
4238
- } | {
4239
- readonly id: string;
4240
- readonly metadata?: {
4241
- readonly [x: string]: JsonValue;
4242
- };
4243
- readonly time: {
4244
- readonly created: number;
4245
- };
4246
- readonly type: "skill";
4247
- readonly skill: string;
4248
- readonly name: string;
4249
- readonly text: string;
4250
- } | {
4251
- readonly id: string;
4252
- readonly metadata?: {
4253
- readonly [x: string]: JsonValue;
4254
- };
4255
- readonly time: {
4256
- readonly created: number;
4257
- readonly completed?: number;
4258
- };
4259
- readonly type: "shell";
4260
- readonly shellID: string;
4261
- readonly command: string;
4262
- readonly status: "running" | "exited" | "timeout" | "killed";
4263
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
4264
- readonly output?: {
4265
- readonly output: string;
4266
- readonly cursor: number;
4267
- readonly size: number;
4268
- readonly truncated: boolean;
4269
- };
4270
- } | {
4271
- readonly id: string;
4272
- readonly metadata?: {
4273
- readonly [x: string]: JsonValue;
4274
- };
4275
- readonly time: {
4276
- readonly created: number;
4277
- readonly streamed?: number;
4278
- readonly completed?: number;
4279
- };
4280
- readonly type: "assistant";
4281
- readonly agent: string;
4282
- readonly model: {
4283
- readonly id: string;
4284
- readonly providerID: string;
4285
- readonly variant?: string;
4286
- };
4287
- readonly content: ReadonlyArray<{
4288
- readonly type: "text";
4289
- readonly text: string;
4290
- readonly state?: {
4291
- readonly [x: string]: JsonValue;
4292
- };
4293
- } | {
4294
- readonly type: "reasoning";
4295
- readonly text: string;
4296
- readonly state?: {
4297
- readonly [x: string]: JsonValue;
4298
- };
4299
- readonly time?: {
4300
- readonly created: number;
4301
- readonly completed?: number;
4302
- };
4303
- } | {
4304
- readonly type: "tool";
4305
- readonly id: string;
4306
- readonly name: string;
4307
- readonly executed?: boolean;
4308
- readonly providerState?: {
4309
- readonly [x: string]: JsonValue;
4310
- };
4311
- readonly providerResultState?: {
4312
- readonly [x: string]: JsonValue;
4313
- };
4314
- readonly state: {
4315
- readonly status: "streaming";
4316
- readonly input: string;
4317
- } | {
4318
- readonly status: "running";
4319
- readonly input: {
4320
- readonly [x: string]: JsonValue;
4321
- };
4322
- readonly metadata: {
4323
- readonly [x: string]: JsonValue;
4324
- };
4325
- } | {
4326
- readonly status: "completed";
4327
- readonly input: {
4328
- readonly [x: string]: JsonValue;
4329
- };
4330
- readonly content: readonly [
4331
- ({
4332
- readonly type: "text";
4333
- readonly text: string;
4334
- } | {
4335
- readonly type: "file";
4336
- readonly uri: string;
4337
- readonly mime: string;
4338
- readonly name?: string | null;
4339
- }),
4340
- ...Array<{
4341
- readonly type: "text";
4342
- readonly text: string;
4343
- } | {
4344
- readonly type: "file";
4345
- readonly uri: string;
4346
- readonly mime: string;
4347
- readonly name?: string | null;
4348
- }>
4349
- ];
4350
- readonly metadata?: {
4351
- readonly [x: string]: JsonValue;
4352
- };
4353
- } | {
4354
- readonly status: "error";
4355
- readonly input: {
4356
- readonly [x: string]: JsonValue;
4357
- };
4358
- readonly error: {
4359
- readonly type: string;
4360
- readonly message: string;
4361
- readonly status?: number;
4362
- readonly response?: {
4363
- readonly body: string;
4364
- };
4365
- };
4366
- readonly content?: readonly [
4367
- ({
4368
- readonly type: "text";
4369
- readonly text: string;
4370
- } | {
4371
- readonly type: "file";
4372
- readonly uri: string;
4373
- readonly mime: string;
4374
- readonly name?: string | null;
4375
- }),
4376
- ...Array<{
4377
- readonly type: "text";
4378
- readonly text: string;
4379
- } | {
4380
- readonly type: "file";
4381
- readonly uri: string;
4382
- readonly mime: string;
4383
- readonly name?: string | null;
4384
- }>
4385
- ];
4386
- readonly metadata?: {
4387
- readonly [x: string]: JsonValue;
4388
- };
4389
- };
4390
- readonly time: {
4391
- readonly created: number;
4392
- readonly ran?: number;
4393
- readonly completed?: number;
4394
- };
4395
- }>;
4396
- readonly snapshot?: {
4397
- readonly start?: string;
4398
- readonly end?: string;
4399
- readonly files?: ReadonlyArray<string>;
4400
- };
4401
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4402
- readonly rawFinish?: string;
4403
- readonly providerState?: {
4404
- readonly [x: string]: JsonValue;
4405
- };
4406
- readonly cost?: number;
4407
- readonly tokens?: {
4408
- readonly input: number;
4409
- readonly output: number;
4410
- readonly reasoning: number;
4411
- readonly cache: {
4412
- readonly read: number;
4413
- readonly write: number;
4414
- };
4415
- };
4416
- readonly error?: {
4417
- readonly type: string;
4418
- readonly message: string;
4419
- readonly status?: number;
4420
- readonly response?: {
4421
- readonly body: string;
4422
- };
4423
- };
4424
- readonly retry?: {
4425
- readonly attempt: number;
4426
- readonly at: number;
4427
- readonly error: {
4428
- readonly type: string;
4429
- readonly message: string;
4430
- readonly status?: number;
4431
- readonly response?: {
4432
- readonly body: string;
4433
- };
4434
- };
4435
- };
4436
- } | ({
4437
- readonly type: "compaction";
4438
- readonly id: string;
4439
- readonly metadata?: {
4440
- readonly [x: string]: JsonValue;
4441
- };
4442
- readonly time: {
4443
- readonly created: number;
4444
- };
4445
- readonly status: "running";
4446
- readonly reason: "auto" | "manual";
4447
- readonly summary: string;
4448
- readonly recent: string;
4449
- } | {
4450
- readonly type: "compaction";
4451
- readonly id: string;
4452
- readonly metadata?: {
4453
- readonly [x: string]: JsonValue;
4454
- };
4455
- readonly time: {
4456
- readonly created: number;
4457
- };
4458
- readonly status: "completed";
4459
- readonly reason: "auto" | "manual";
4460
- readonly model?: {
4461
- readonly id: string;
4462
- readonly providerID: string;
4463
- readonly variant?: string;
4464
- };
4465
- readonly providerState?: {
4466
- readonly [x: string]: JsonValue;
4467
- };
4468
- readonly summary: string;
4469
- readonly recent: string;
4470
- readonly providerContext?: {
4471
- readonly version: 1;
4472
- readonly provenance: {
4473
- readonly providerID: string;
4474
- readonly provider: string;
4475
- readonly modelID: string;
4476
- readonly route: string;
4477
- readonly protocol: string;
4478
- readonly endpoint: string;
4479
- };
4480
- readonly messages: JsonValue;
4481
- };
4482
- readonly cost?: number;
4483
- readonly tokens?: {
4484
- readonly input: number;
4485
- readonly output: number;
4486
- readonly reasoning: number;
4487
- readonly cache: {
4488
- readonly read: number;
4489
- readonly write: number;
4490
- };
4491
- };
4492
- } | {
4493
- readonly type: "compaction";
4494
- readonly id: string;
4495
- readonly metadata?: {
4496
- readonly [x: string]: JsonValue;
4497
- };
4498
- readonly time: {
4499
- readonly created: number;
4500
- };
4501
- readonly status: "failed";
4502
- readonly reason: "auto" | "manual";
4503
- readonly error: {
4504
- readonly type: string;
4505
- readonly message: string;
4506
- readonly status?: number;
4507
- readonly response?: {
4508
- readonly body: string;
4509
- };
4510
- };
4511
- readonly cost?: number;
4512
- readonly tokens?: {
4513
- readonly input: number;
4514
- readonly output: number;
4515
- readonly reasoning: number;
4516
- readonly cache: {
4517
- readonly read: number;
4518
- readonly write: number;
4519
- };
4520
- };
4521
- }) | {
4522
- readonly id: string;
4523
- readonly metadata?: {
4524
- readonly [x: string]: JsonValue;
4525
- };
4526
- readonly time: {
4527
- readonly created: number;
4528
- };
4529
- readonly type: "idle";
4530
- readonly outcome: "succeeded" | "failed" | "interrupted";
4531
- readonly error?: {
4532
- readonly type: string;
4533
- readonly message: string;
4534
- readonly status?: number;
4535
- readonly response?: {
4536
- readonly body: string;
4537
- };
4538
- };
4539
- }>;
4540
- readonly location?: {
4541
- readonly directory: string;
4542
- } | null;
4543
- }["info"];
4544
- readonly messages: {
4545
- readonly info: {
4546
- readonly id: string;
4547
- readonly parentID?: string;
4548
- readonly fork?: {
4549
- readonly sessionID: string;
4550
- readonly boundary: {
4551
- readonly type: "before";
4552
- readonly messageID: string;
4553
- } | {
4554
- readonly type: "through";
4555
- readonly messageID: string;
4556
- };
4557
- };
4558
- readonly projectID: string;
4559
- readonly agent?: string;
4560
- readonly model?: {
4561
- readonly id: string;
4562
- readonly providerID: string;
4563
- readonly variant?: string;
4564
- };
4565
- readonly cost: number;
4566
- readonly tokens: {
4567
- readonly input: number;
4568
- readonly output: number;
4569
- readonly reasoning: number;
4570
- readonly cache: {
4571
- readonly read: number;
4572
- readonly write: number;
4573
- };
4574
- };
4575
- readonly outcome?: "succeeded" | "failed" | "interrupted";
4576
- readonly time: {
4577
- readonly created: number;
4578
- readonly updated: number;
4579
- readonly idle?: number;
4580
- readonly viewed?: number;
4581
- readonly archived?: number;
4582
- };
4583
- readonly title?: string;
4584
- readonly subpath?: string;
4585
- readonly metadata?: {
4586
- readonly [x: string]: JsonValue;
4587
- };
4588
- readonly permissions?: ReadonlyArray<{
4589
- readonly action: string;
4590
- readonly resource: string;
4591
- readonly effect: "allow" | "deny" | "ask";
4592
- }>;
4593
- readonly revert?: {
4594
- readonly messageID: string;
4595
- readonly partID?: string;
4596
- readonly snapshot?: string;
4597
- readonly files?: ReadonlyArray<{
4598
- readonly file: string;
4599
- readonly patch: string;
4600
- readonly additions: number;
4601
- readonly deletions: number;
4602
- readonly status: "added" | "deleted" | "modified";
4603
- }>;
4604
- };
4605
- readonly location: {
4606
- readonly directory: string;
4607
- };
4608
- };
4609
- readonly messages: ReadonlyArray<{
4610
- readonly id: string;
4611
- readonly metadata?: {
4612
- readonly [x: string]: JsonValue;
4613
- };
4614
- readonly time: {
4615
- readonly created: number;
4616
- };
4617
- readonly type: "agent-switched";
4618
- readonly agent: string;
4619
- readonly previous?: string;
4620
- } | {
4621
- readonly id: string;
4622
- readonly metadata?: {
4623
- readonly [x: string]: JsonValue;
4624
- };
4625
- readonly time: {
4626
- readonly created: number;
4627
- };
4628
- readonly type: "model-switched";
4629
- readonly model: {
4630
- readonly id: string;
4631
- readonly providerID: string;
4632
- readonly variant?: string;
4633
- };
4634
- readonly previous?: {
4635
- readonly id: string;
4636
- readonly providerID: string;
4637
- readonly variant?: string;
4638
- };
4639
- } | {
4640
- readonly id: string;
4641
- readonly metadata?: {
4642
- readonly [x: string]: JsonValue;
4643
- };
4644
- readonly time: {
4645
- readonly created: number;
4646
- };
4647
- readonly type: "location-switched";
4648
- readonly projectID?: string;
4649
- readonly subpath?: string;
4650
- readonly location: {
4651
- readonly directory: string;
4652
- };
4653
- readonly previous?: {
4654
- readonly location: {
4655
- readonly directory: string;
4656
- };
4657
- readonly projectID?: string;
4658
- readonly subpath?: string;
4659
- } | null;
4660
- } | {
4661
- readonly id: string;
4662
- readonly metadata?: {
4663
- readonly [x: string]: JsonValue;
4664
- };
4665
- readonly time: {
4666
- readonly created: number;
4667
- };
4668
- readonly text: string;
4669
- readonly files?: ReadonlyArray<{
4670
- readonly data: string;
4671
- readonly mime: string;
4672
- readonly source: {
4673
- readonly type: "inline";
4674
- } | {
4675
- readonly type: "uri";
4676
- readonly uri: string;
4677
- };
4678
- readonly name?: string;
4679
- readonly description?: string;
4680
- readonly mention?: {
4681
- readonly start: number;
4682
- readonly end: number;
4683
- readonly text: string;
4684
- };
4685
- }>;
4686
- readonly agents?: ReadonlyArray<{
4687
- readonly name: string;
4688
- readonly mention?: {
4689
- readonly start: number;
4690
- readonly end: number;
4691
- readonly text: string;
4692
- };
4693
- }>;
4694
- readonly skills?: ReadonlyArray<{
4695
- readonly id: string;
4696
- readonly name: string;
4697
- readonly text?: string;
4698
- readonly mention?: {
4699
- readonly start: number;
4700
- readonly end: number;
4701
- readonly text: string;
4702
- };
4703
- }>;
4704
- readonly type: "user";
4705
- } | {
4706
- readonly id: string;
4707
- readonly metadata?: {
4708
- readonly [x: string]: JsonValue;
4709
- };
4710
- readonly time: {
4711
- readonly created: number;
4712
- };
4713
- readonly text: string;
4714
- readonly description?: string;
4715
- readonly type: "synthetic";
4716
- } | {
4717
- readonly id: string;
4718
- readonly metadata?: {
4719
- readonly [x: string]: JsonValue;
4720
- };
4721
- readonly time: {
4722
- readonly created: number;
4723
- };
4724
- readonly type: "system";
4725
- readonly text: string;
4726
- readonly description?: string;
4727
- } | {
4728
- readonly id: string;
4729
- readonly metadata?: {
4730
- readonly [x: string]: JsonValue;
4731
- };
4732
- readonly time: {
4733
- readonly created: number;
4734
- };
4735
- readonly type: "skill";
4736
- readonly skill: string;
4737
- readonly name: string;
4738
- readonly text: string;
4739
- } | {
4740
- readonly id: string;
4741
- readonly metadata?: {
4742
- readonly [x: string]: JsonValue;
4743
- };
4744
- readonly time: {
4745
- readonly created: number;
4746
- readonly completed?: number;
4747
- };
4748
- readonly type: "shell";
4749
- readonly shellID: string;
4750
- readonly command: string;
4751
- readonly status: "running" | "exited" | "timeout" | "killed";
4752
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
4753
- readonly output?: {
4754
- readonly output: string;
4755
- readonly cursor: number;
4756
- readonly size: number;
4757
- readonly truncated: boolean;
4758
- };
4759
- } | {
4760
- readonly id: string;
4761
- readonly metadata?: {
4762
- readonly [x: string]: JsonValue;
4763
- };
4764
- readonly time: {
4765
- readonly created: number;
4766
- readonly streamed?: number;
4767
- readonly completed?: number;
4768
- };
4769
- readonly type: "assistant";
4770
- readonly agent: string;
4771
- readonly model: {
4772
- readonly id: string;
4773
- readonly providerID: string;
4774
- readonly variant?: string;
4775
- };
4776
- readonly content: ReadonlyArray<{
4777
- readonly type: "text";
4778
- readonly text: string;
4779
- readonly state?: {
4780
- readonly [x: string]: JsonValue;
4781
- };
4782
- } | {
4783
- readonly type: "reasoning";
4784
- readonly text: string;
4785
- readonly state?: {
4786
- readonly [x: string]: JsonValue;
4787
- };
4788
- readonly time?: {
4789
- readonly created: number;
4790
- readonly completed?: number;
4791
- };
4792
- } | {
4793
- readonly type: "tool";
4794
- readonly id: string;
4795
- readonly name: string;
4796
- readonly executed?: boolean;
4797
- readonly providerState?: {
4798
- readonly [x: string]: JsonValue;
4799
- };
4800
- readonly providerResultState?: {
4801
- readonly [x: string]: JsonValue;
4802
- };
4803
- readonly state: {
4804
- readonly status: "streaming";
4805
- readonly input: string;
4806
- } | {
4807
- readonly status: "running";
4808
- readonly input: {
4809
- readonly [x: string]: JsonValue;
4810
- };
4811
- readonly metadata: {
4812
- readonly [x: string]: JsonValue;
4813
- };
4814
- } | {
4815
- readonly status: "completed";
4816
- readonly input: {
4817
- readonly [x: string]: JsonValue;
4818
- };
4819
- readonly content: readonly [
4820
- ({
4821
- readonly type: "text";
4822
- readonly text: string;
4823
- } | {
4824
- readonly type: "file";
4825
- readonly uri: string;
4826
- readonly mime: string;
4827
- readonly name?: string | null;
4828
- }),
4829
- ...Array<{
4830
- readonly type: "text";
4831
- readonly text: string;
4832
- } | {
4833
- readonly type: "file";
4834
- readonly uri: string;
4835
- readonly mime: string;
4836
- readonly name?: string | null;
4837
- }>
4838
- ];
4839
- readonly metadata?: {
4840
- readonly [x: string]: JsonValue;
4841
- };
4842
- } | {
4843
- readonly status: "error";
4844
- readonly input: {
4845
- readonly [x: string]: JsonValue;
4846
- };
4847
- readonly error: {
4848
- readonly type: string;
4849
- readonly message: string;
4850
- readonly status?: number;
4851
- readonly response?: {
4852
- readonly body: string;
4853
- };
4854
- };
4855
- readonly content?: readonly [
4856
- ({
4857
- readonly type: "text";
4858
- readonly text: string;
4859
- } | {
4860
- readonly type: "file";
4861
- readonly uri: string;
4862
- readonly mime: string;
4863
- readonly name?: string | null;
4864
- }),
4865
- ...Array<{
4866
- readonly type: "text";
4867
- readonly text: string;
4868
- } | {
4869
- readonly type: "file";
4870
- readonly uri: string;
4871
- readonly mime: string;
4872
- readonly name?: string | null;
4873
- }>
4874
- ];
4875
- readonly metadata?: {
4876
- readonly [x: string]: JsonValue;
4877
- };
4878
- };
4879
- readonly time: {
4880
- readonly created: number;
4881
- readonly ran?: number;
4882
- readonly completed?: number;
4883
- };
4884
- }>;
4885
- readonly snapshot?: {
4886
- readonly start?: string;
4887
- readonly end?: string;
4888
- readonly files?: ReadonlyArray<string>;
4889
- };
4890
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4891
- readonly rawFinish?: string;
4892
- readonly providerState?: {
4893
- readonly [x: string]: JsonValue;
4894
- };
4895
- readonly cost?: number;
4896
- readonly tokens?: {
4897
- readonly input: number;
4898
- readonly output: number;
4899
- readonly reasoning: number;
4900
- readonly cache: {
4901
- readonly read: number;
4902
- readonly write: number;
4903
- };
4904
- };
4905
- readonly error?: {
4906
- readonly type: string;
4907
- readonly message: string;
4908
- readonly status?: number;
4909
- readonly response?: {
4910
- readonly body: string;
4911
- };
4912
- };
4913
- readonly retry?: {
4914
- readonly attempt: number;
4915
- readonly at: number;
4916
- readonly error: {
4917
- readonly type: string;
4918
- readonly message: string;
4919
- readonly status?: number;
4920
- readonly response?: {
4921
- readonly body: string;
4922
- };
4923
- };
4924
- };
4925
- } | ({
4926
- readonly type: "compaction";
4927
- readonly id: string;
4928
- readonly metadata?: {
4929
- readonly [x: string]: JsonValue;
4930
- };
4931
- readonly time: {
4932
- readonly created: number;
4933
- };
4934
- readonly status: "running";
4935
- readonly reason: "auto" | "manual";
4936
- readonly summary: string;
4937
- readonly recent: string;
4938
- } | {
4939
- readonly type: "compaction";
4940
- readonly id: string;
4941
- readonly metadata?: {
4942
- readonly [x: string]: JsonValue;
4943
- };
4944
- readonly time: {
4945
- readonly created: number;
4946
- };
4947
- readonly status: "completed";
4948
- readonly reason: "auto" | "manual";
4949
- readonly model?: {
4950
- readonly id: string;
4951
- readonly providerID: string;
4952
- readonly variant?: string;
4953
- };
4954
- readonly providerState?: {
4955
- readonly [x: string]: JsonValue;
4956
- };
4957
- readonly summary: string;
4958
- readonly recent: string;
4959
- readonly providerContext?: {
4960
- readonly version: 1;
4961
- readonly provenance: {
4962
- readonly providerID: string;
4963
- readonly provider: string;
4964
- readonly modelID: string;
4965
- readonly route: string;
4966
- readonly protocol: string;
4967
- readonly endpoint: string;
4968
- };
4969
- readonly messages: JsonValue;
4970
- };
4971
- readonly cost?: number;
4972
- readonly tokens?: {
4973
- readonly input: number;
4974
- readonly output: number;
4975
- readonly reasoning: number;
4976
- readonly cache: {
4977
- readonly read: number;
4978
- readonly write: number;
4979
- };
4980
- };
4981
- } | {
4982
- readonly type: "compaction";
4983
- readonly id: string;
4984
- readonly metadata?: {
4985
- readonly [x: string]: JsonValue;
4986
- };
4987
- readonly time: {
4988
- readonly created: number;
4989
- };
4990
- readonly status: "failed";
4991
- readonly reason: "auto" | "manual";
4992
- readonly error: {
4993
- readonly type: string;
4994
- readonly message: string;
4995
- readonly status?: number;
4996
- readonly response?: {
4997
- readonly body: string;
4998
- };
4999
- };
5000
- readonly cost?: number;
5001
- readonly tokens?: {
5002
- readonly input: number;
5003
- readonly output: number;
5004
- readonly reasoning: number;
5005
- readonly cache: {
5006
- readonly read: number;
5007
- readonly write: number;
5008
- };
5009
- };
5010
- }) | {
5011
- readonly id: string;
5012
- readonly metadata?: {
5013
- readonly [x: string]: JsonValue;
5014
- };
5015
- readonly time: {
5016
- readonly created: number;
5017
- };
5018
- readonly type: "idle";
5019
- readonly outcome: "succeeded" | "failed" | "interrupted";
5020
- readonly error?: {
5021
- readonly type: string;
5022
- readonly message: string;
5023
- readonly status?: number;
5024
- readonly response?: {
5025
- readonly body: string;
5026
- };
5027
- };
5028
- }>;
5029
- readonly location?: {
5030
- readonly directory: string;
5031
- } | null;
5032
- }["messages"];
5033
- readonly location?: {
5034
- readonly info: {
5035
- readonly id: string;
5036
- readonly parentID?: string;
5037
- readonly fork?: {
5038
- readonly sessionID: string;
5039
- readonly boundary: {
5040
- readonly type: "before";
5041
- readonly messageID: string;
5042
- } | {
5043
- readonly type: "through";
5044
- readonly messageID: string;
5045
- };
5046
- };
5047
- readonly projectID: string;
5048
- readonly agent?: string;
5049
- readonly model?: {
5050
- readonly id: string;
5051
- readonly providerID: string;
5052
- readonly variant?: string;
5053
- };
5054
- readonly cost: number;
5055
- readonly tokens: {
5056
- readonly input: number;
5057
- readonly output: number;
5058
- readonly reasoning: number;
5059
- readonly cache: {
5060
- readonly read: number;
5061
- readonly write: number;
5062
- };
5063
- };
5064
- readonly outcome?: "succeeded" | "failed" | "interrupted";
5065
- readonly time: {
5066
- readonly created: number;
5067
- readonly updated: number;
5068
- readonly idle?: number;
5069
- readonly viewed?: number;
5070
- readonly archived?: number;
5071
- };
5072
- readonly title?: string;
5073
- readonly subpath?: string;
5074
- readonly metadata?: {
5075
- readonly [x: string]: JsonValue;
5076
- };
5077
- readonly permissions?: ReadonlyArray<{
5078
- readonly action: string;
5079
- readonly resource: string;
5080
- readonly effect: "allow" | "deny" | "ask";
5081
- }>;
5082
- readonly revert?: {
5083
- readonly messageID: string;
5084
- readonly partID?: string;
5085
- readonly snapshot?: string;
5086
- readonly files?: ReadonlyArray<{
5087
- readonly file: string;
5088
- readonly patch: string;
5089
- readonly additions: number;
5090
- readonly deletions: number;
5091
- readonly status: "added" | "deleted" | "modified";
5092
- }>;
5093
- };
5094
- readonly location: {
5095
- readonly directory: string;
5096
- };
5097
- };
5098
- readonly messages: ReadonlyArray<{
5099
- readonly id: string;
5100
- readonly metadata?: {
5101
- readonly [x: string]: JsonValue;
5102
- };
5103
- readonly time: {
5104
- readonly created: number;
5105
- };
5106
- readonly type: "agent-switched";
5107
- readonly agent: string;
5108
- readonly previous?: string;
5109
- } | {
5110
- readonly id: string;
5111
- readonly metadata?: {
5112
- readonly [x: string]: JsonValue;
5113
- };
5114
- readonly time: {
5115
- readonly created: number;
5116
- };
5117
- readonly type: "model-switched";
5118
- readonly model: {
5119
- readonly id: string;
5120
- readonly providerID: string;
5121
- readonly variant?: string;
5122
- };
5123
- readonly previous?: {
5124
- readonly id: string;
5125
- readonly providerID: string;
5126
- readonly variant?: string;
5127
- };
5128
- } | {
5129
- readonly id: string;
5130
- readonly metadata?: {
5131
- readonly [x: string]: JsonValue;
5132
- };
5133
- readonly time: {
5134
- readonly created: number;
5135
- };
5136
- readonly type: "location-switched";
5137
- readonly projectID?: string;
5138
- readonly subpath?: string;
5139
- readonly location: {
5140
- readonly directory: string;
5141
- };
5142
- readonly previous?: {
5143
- readonly location: {
5144
- readonly directory: string;
5145
- };
5146
- readonly projectID?: string;
5147
- readonly subpath?: string;
5148
- } | null;
5149
- } | {
5150
- readonly id: string;
5151
- readonly metadata?: {
5152
- readonly [x: string]: JsonValue;
5153
- };
5154
- readonly time: {
5155
- readonly created: number;
5156
- };
5157
- readonly text: string;
5158
- readonly files?: ReadonlyArray<{
5159
- readonly data: string;
5160
- readonly mime: string;
5161
- readonly source: {
5162
- readonly type: "inline";
5163
- } | {
5164
- readonly type: "uri";
5165
- readonly uri: string;
5166
- };
5167
- readonly name?: string;
5168
- readonly description?: string;
5169
- readonly mention?: {
5170
- readonly start: number;
5171
- readonly end: number;
5172
- readonly text: string;
5173
- };
5174
- }>;
5175
- readonly agents?: ReadonlyArray<{
5176
- readonly name: string;
5177
- readonly mention?: {
5178
- readonly start: number;
5179
- readonly end: number;
5180
- readonly text: string;
5181
- };
5182
- }>;
5183
- readonly skills?: ReadonlyArray<{
5184
- readonly id: string;
5185
- readonly name: string;
5186
- readonly text?: string;
5187
- readonly mention?: {
5188
- readonly start: number;
5189
- readonly end: number;
5190
- readonly text: string;
5191
- };
5192
- }>;
5193
- readonly type: "user";
5194
- } | {
5195
- readonly id: string;
5196
- readonly metadata?: {
5197
- readonly [x: string]: JsonValue;
5198
- };
5199
- readonly time: {
5200
- readonly created: number;
5201
- };
5202
- readonly text: string;
5203
- readonly description?: string;
5204
- readonly type: "synthetic";
5205
- } | {
5206
- readonly id: string;
5207
- readonly metadata?: {
5208
- readonly [x: string]: JsonValue;
5209
- };
5210
- readonly time: {
5211
- readonly created: number;
5212
- };
5213
- readonly type: "system";
5214
- readonly text: string;
5215
- readonly description?: string;
5216
- } | {
5217
- readonly id: string;
5218
- readonly metadata?: {
5219
- readonly [x: string]: JsonValue;
4238
+ readonly cost: number;
4239
+ readonly tokens: {
4240
+ readonly input: number;
4241
+ readonly output: number;
4242
+ readonly reasoning: number;
4243
+ readonly cache: {
4244
+ readonly read: number;
4245
+ readonly write: number;
4246
+ };
5220
4247
  };
4248
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
5221
4249
  readonly time: {
5222
4250
  readonly created: number;
4251
+ readonly updated: number;
4252
+ readonly idle?: number;
4253
+ readonly viewed?: number;
4254
+ readonly archived?: number;
5223
4255
  };
5224
- readonly type: "skill";
5225
- readonly skill: string;
5226
- readonly name: string;
5227
- readonly text: string;
5228
- } | {
5229
- readonly id: string;
4256
+ readonly title?: string;
4257
+ readonly subpath?: string;
5230
4258
  readonly metadata?: {
5231
4259
  readonly [x: string]: JsonValue;
5232
4260
  };
5233
- readonly time: {
5234
- readonly created: number;
5235
- readonly completed?: number;
4261
+ readonly permissions?: ReadonlyArray<{
4262
+ readonly action: string;
4263
+ readonly resource: string;
4264
+ readonly effect: "allow" | "deny" | "ask";
4265
+ }>;
4266
+ readonly revert?: {
4267
+ readonly messageID: string;
4268
+ readonly partID?: string;
4269
+ readonly snapshot?: string;
4270
+ readonly files?: ReadonlyArray<{
4271
+ readonly file: string;
4272
+ readonly patch: string;
4273
+ readonly additions: number;
4274
+ readonly deletions: number;
4275
+ readonly status: "added" | "deleted" | "modified";
4276
+ }>;
5236
4277
  };
5237
- readonly type: "shell";
5238
- readonly shellID: string;
5239
- readonly command: string;
5240
- readonly status: "running" | "exited" | "timeout" | "killed";
5241
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
5242
- readonly output?: {
5243
- readonly output: string;
5244
- readonly cursor: number;
5245
- readonly size: number;
5246
- readonly truncated: boolean;
4278
+ readonly location: {
4279
+ readonly directory: string;
5247
4280
  };
5248
- } | {
4281
+ };
4282
+ readonly messages: ReadonlyArray<JsonValue>;
4283
+ readonly location?: {
4284
+ readonly directory: string;
4285
+ } | null;
4286
+ }["messages"];
4287
+ readonly location?: {
4288
+ readonly info: {
5249
4289
  readonly id: string;
5250
- readonly metadata?: {
5251
- readonly [x: string]: JsonValue;
5252
- };
5253
- readonly time: {
5254
- readonly created: number;
5255
- readonly streamed?: number;
5256
- readonly completed?: number;
5257
- };
5258
- readonly type: "assistant";
5259
- readonly agent: string;
5260
- readonly model: {
5261
- readonly id: string;
5262
- readonly providerID: string;
5263
- readonly variant?: string;
5264
- };
5265
- readonly content: ReadonlyArray<{
5266
- readonly type: "text";
5267
- readonly text: string;
5268
- readonly state?: {
5269
- readonly [x: string]: JsonValue;
5270
- };
5271
- } | {
5272
- readonly type: "reasoning";
5273
- readonly text: string;
5274
- readonly state?: {
5275
- readonly [x: string]: JsonValue;
5276
- };
5277
- readonly time?: {
5278
- readonly created: number;
5279
- readonly completed?: number;
5280
- };
5281
- } | {
5282
- readonly type: "tool";
5283
- readonly id: string;
5284
- readonly name: string;
5285
- readonly executed?: boolean;
5286
- readonly providerState?: {
5287
- readonly [x: string]: JsonValue;
5288
- };
5289
- readonly providerResultState?: {
5290
- readonly [x: string]: JsonValue;
5291
- };
5292
- readonly state: {
5293
- readonly status: "streaming";
5294
- readonly input: string;
5295
- } | {
5296
- readonly status: "running";
5297
- readonly input: {
5298
- readonly [x: string]: JsonValue;
5299
- };
5300
- readonly metadata: {
5301
- readonly [x: string]: JsonValue;
5302
- };
5303
- } | {
5304
- readonly status: "completed";
5305
- readonly input: {
5306
- readonly [x: string]: JsonValue;
5307
- };
5308
- readonly content: readonly [
5309
- ({
5310
- readonly type: "text";
5311
- readonly text: string;
5312
- } | {
5313
- readonly type: "file";
5314
- readonly uri: string;
5315
- readonly mime: string;
5316
- readonly name?: string | null;
5317
- }),
5318
- ...Array<{
5319
- readonly type: "text";
5320
- readonly text: string;
5321
- } | {
5322
- readonly type: "file";
5323
- readonly uri: string;
5324
- readonly mime: string;
5325
- readonly name?: string | null;
5326
- }>
5327
- ];
5328
- readonly metadata?: {
5329
- readonly [x: string]: JsonValue;
5330
- };
4290
+ readonly parentID?: string;
4291
+ readonly fork?: {
4292
+ readonly sessionID: string;
4293
+ readonly boundary: {
4294
+ readonly type: "before";
4295
+ readonly messageID: string;
5331
4296
  } | {
5332
- readonly status: "error";
5333
- readonly input: {
5334
- readonly [x: string]: JsonValue;
5335
- };
5336
- readonly error: {
5337
- readonly type: string;
5338
- readonly message: string;
5339
- readonly status?: number;
5340
- readonly response?: {
5341
- readonly body: string;
5342
- };
5343
- };
5344
- readonly content?: readonly [
5345
- ({
5346
- readonly type: "text";
5347
- readonly text: string;
5348
- } | {
5349
- readonly type: "file";
5350
- readonly uri: string;
5351
- readonly mime: string;
5352
- readonly name?: string | null;
5353
- }),
5354
- ...Array<{
5355
- readonly type: "text";
5356
- readonly text: string;
5357
- } | {
5358
- readonly type: "file";
5359
- readonly uri: string;
5360
- readonly mime: string;
5361
- readonly name?: string | null;
5362
- }>
5363
- ];
5364
- readonly metadata?: {
5365
- readonly [x: string]: JsonValue;
5366
- };
5367
- };
5368
- readonly time: {
5369
- readonly created: number;
5370
- readonly ran?: number;
5371
- readonly completed?: number;
5372
- };
5373
- }>;
5374
- readonly snapshot?: {
5375
- readonly start?: string;
5376
- readonly end?: string;
5377
- readonly files?: ReadonlyArray<string>;
5378
- };
5379
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
5380
- readonly rawFinish?: string;
5381
- readonly providerState?: {
5382
- readonly [x: string]: JsonValue;
5383
- };
5384
- readonly cost?: number;
5385
- readonly tokens?: {
5386
- readonly input: number;
5387
- readonly output: number;
5388
- readonly reasoning: number;
5389
- readonly cache: {
5390
- readonly read: number;
5391
- readonly write: number;
5392
- };
5393
- };
5394
- readonly error?: {
5395
- readonly type: string;
5396
- readonly message: string;
5397
- readonly status?: number;
5398
- readonly response?: {
5399
- readonly body: string;
5400
- };
5401
- };
5402
- readonly retry?: {
5403
- readonly attempt: number;
5404
- readonly at: number;
5405
- readonly error: {
5406
- readonly type: string;
5407
- readonly message: string;
5408
- readonly status?: number;
5409
- readonly response?: {
5410
- readonly body: string;
5411
- };
4297
+ readonly type: "through";
4298
+ readonly messageID: string;
5412
4299
  };
5413
4300
  };
5414
- } | ({
5415
- readonly type: "compaction";
5416
- readonly id: string;
5417
- readonly metadata?: {
5418
- readonly [x: string]: JsonValue;
5419
- };
5420
- readonly time: {
5421
- readonly created: number;
5422
- };
5423
- readonly status: "running";
5424
- readonly reason: "auto" | "manual";
5425
- readonly summary: string;
5426
- readonly recent: string;
5427
- } | {
5428
- readonly type: "compaction";
5429
- readonly id: string;
5430
- readonly metadata?: {
5431
- readonly [x: string]: JsonValue;
5432
- };
5433
- readonly time: {
5434
- readonly created: number;
5435
- };
5436
- readonly status: "completed";
5437
- readonly reason: "auto" | "manual";
4301
+ readonly projectID: string;
4302
+ readonly agent?: string;
5438
4303
  readonly model?: {
5439
4304
  readonly id: string;
5440
4305
  readonly providerID: string;
5441
4306
  readonly variant?: string;
5442
4307
  };
5443
- readonly providerState?: {
5444
- readonly [x: string]: JsonValue;
5445
- };
5446
- readonly summary: string;
5447
- readonly recent: string;
5448
- readonly providerContext?: {
5449
- readonly version: 1;
5450
- readonly provenance: {
5451
- readonly providerID: string;
5452
- readonly provider: string;
5453
- readonly modelID: string;
5454
- readonly route: string;
5455
- readonly protocol: string;
5456
- readonly endpoint: string;
5457
- };
5458
- readonly messages: JsonValue;
5459
- };
5460
- readonly cost?: number;
5461
- readonly tokens?: {
4308
+ readonly cost: number;
4309
+ readonly tokens: {
5462
4310
  readonly input: number;
5463
4311
  readonly output: number;
5464
4312
  readonly reasoning: number;
@@ -5467,54 +4315,41 @@ export type SessionImportInput = {
5467
4315
  readonly write: number;
5468
4316
  };
5469
4317
  };
5470
- } | {
5471
- readonly type: "compaction";
5472
- readonly id: string;
5473
- readonly metadata?: {
5474
- readonly [x: string]: JsonValue;
5475
- };
4318
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
5476
4319
  readonly time: {
5477
4320
  readonly created: number;
4321
+ readonly updated: number;
4322
+ readonly idle?: number;
4323
+ readonly viewed?: number;
4324
+ readonly archived?: number;
5478
4325
  };
5479
- readonly status: "failed";
5480
- readonly reason: "auto" | "manual";
5481
- readonly error: {
5482
- readonly type: string;
5483
- readonly message: string;
5484
- readonly status?: number;
5485
- readonly response?: {
5486
- readonly body: string;
5487
- };
5488
- };
5489
- readonly cost?: number;
5490
- readonly tokens?: {
5491
- readonly input: number;
5492
- readonly output: number;
5493
- readonly reasoning: number;
5494
- readonly cache: {
5495
- readonly read: number;
5496
- readonly write: number;
5497
- };
5498
- };
5499
- }) | {
5500
- readonly id: string;
4326
+ readonly title?: string;
4327
+ readonly subpath?: string;
5501
4328
  readonly metadata?: {
5502
4329
  readonly [x: string]: JsonValue;
5503
4330
  };
5504
- readonly time: {
5505
- readonly created: number;
4331
+ readonly permissions?: ReadonlyArray<{
4332
+ readonly action: string;
4333
+ readonly resource: string;
4334
+ readonly effect: "allow" | "deny" | "ask";
4335
+ }>;
4336
+ readonly revert?: {
4337
+ readonly messageID: string;
4338
+ readonly partID?: string;
4339
+ readonly snapshot?: string;
4340
+ readonly files?: ReadonlyArray<{
4341
+ readonly file: string;
4342
+ readonly patch: string;
4343
+ readonly additions: number;
4344
+ readonly deletions: number;
4345
+ readonly status: "added" | "deleted" | "modified";
4346
+ }>;
5506
4347
  };
5507
- readonly type: "idle";
5508
- readonly outcome: "succeeded" | "failed" | "interrupted";
5509
- readonly error?: {
5510
- readonly type: string;
5511
- readonly message: string;
5512
- readonly status?: number;
5513
- readonly response?: {
5514
- readonly body: string;
5515
- };
4348
+ readonly location: {
4349
+ readonly directory: string;
5516
4350
  };
5517
- }>;
4351
+ };
4352
+ readonly messages: ReadonlyArray<JsonValue>;
5518
4353
  readonly location?: {
5519
4354
  readonly directory: string;
5520
4355
  } | null;
@@ -5600,6 +4435,7 @@ export type SessionUpdateInput = {
5600
4435
  readonly resource: string;
5601
4436
  readonly effect: "allow" | "deny" | "ask";
5602
4437
  }> | undefined;
4438
+ readonly archived?: boolean | undefined;
5603
4439
  }["title"];
5604
4440
  readonly metadata?: {
5605
4441
  readonly title?: string | undefined;
@@ -5611,6 +4447,7 @@ export type SessionUpdateInput = {
5611
4447
  readonly resource: string;
5612
4448
  readonly effect: "allow" | "deny" | "ask";
5613
4449
  }> | undefined;
4450
+ readonly archived?: boolean | undefined;
5614
4451
  }["metadata"];
5615
4452
  readonly permissions?: {
5616
4453
  readonly title?: string | undefined;
@@ -5622,7 +4459,20 @@ export type SessionUpdateInput = {
5622
4459
  readonly resource: string;
5623
4460
  readonly effect: "allow" | "deny" | "ask";
5624
4461
  }> | undefined;
4462
+ readonly archived?: boolean | undefined;
5625
4463
  }["permissions"];
4464
+ readonly archived?: {
4465
+ readonly title?: string | undefined;
4466
+ readonly metadata?: {
4467
+ readonly [x: string]: JsonValue;
4468
+ } | undefined;
4469
+ readonly permissions?: ReadonlyArray<{
4470
+ readonly action: string;
4471
+ readonly resource: string;
4472
+ readonly effect: "allow" | "deny" | "ask";
4473
+ }> | undefined;
4474
+ readonly archived?: boolean | undefined;
4475
+ }["archived"];
5626
4476
  };
5627
4477
  export type SessionUpdateOutput = void;
5628
4478
  export type SessionMoveInput = {
@@ -7312,25 +6162,25 @@ export type MessageListInput = {
7312
6162
  readonly limit?: number | undefined;
7313
6163
  readonly order?: "asc" | "desc" | undefined;
7314
6164
  readonly cursor?: string | undefined;
7315
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6165
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7316
6166
  }["limit"];
7317
6167
  readonly order?: {
7318
6168
  readonly limit?: number | undefined;
7319
6169
  readonly order?: "asc" | "desc" | undefined;
7320
6170
  readonly cursor?: string | undefined;
7321
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6171
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7322
6172
  }["order"];
7323
6173
  readonly cursor?: {
7324
6174
  readonly limit?: number | undefined;
7325
6175
  readonly order?: "asc" | "desc" | undefined;
7326
6176
  readonly cursor?: string | undefined;
7327
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6177
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7328
6178
  }["cursor"];
7329
6179
  readonly type?: {
7330
6180
  readonly limit?: number | undefined;
7331
6181
  readonly order?: "asc" | "desc" | undefined;
7332
6182
  readonly cursor?: string | undefined;
7333
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6183
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7334
6184
  }["type"];
7335
6185
  };
7336
6186
  export type MessageListOutput = SessionMessagesResponse;
@@ -7375,6 +6225,58 @@ export type GenerateTextInput = {
7375
6225
  }["model"];
7376
6226
  };
7377
6227
  export type GenerateTextOutput = GenerateTextResponse["data"];
6228
+ export type VoiceModelsOutput = VoiceModelsResponse["data"];
6229
+ export type VoiceSessionInput = {
6230
+ readonly model: {
6231
+ readonly model: string;
6232
+ readonly session?: {
6233
+ readonly [x: string]: unknown;
6234
+ } | undefined;
6235
+ readonly transport: {
6236
+ readonly type: "webrtc";
6237
+ readonly sdp: string;
6238
+ readonly dcid?: number | undefined;
6239
+ } | {
6240
+ readonly type: "websocket";
6241
+ };
6242
+ }["model"];
6243
+ readonly session?: {
6244
+ readonly model: string;
6245
+ readonly session?: {
6246
+ readonly [x: string]: unknown;
6247
+ } | undefined;
6248
+ readonly transport: {
6249
+ readonly type: "webrtc";
6250
+ readonly sdp: string;
6251
+ readonly dcid?: number | undefined;
6252
+ } | {
6253
+ readonly type: "websocket";
6254
+ };
6255
+ }["session"];
6256
+ readonly transport: {
6257
+ readonly model: string;
6258
+ readonly session?: {
6259
+ readonly [x: string]: unknown;
6260
+ } | undefined;
6261
+ readonly transport: {
6262
+ readonly type: "webrtc";
6263
+ readonly sdp: string;
6264
+ readonly dcid?: number | undefined;
6265
+ } | {
6266
+ readonly type: "websocket";
6267
+ };
6268
+ }["transport"];
6269
+ };
6270
+ export type VoiceSessionOutput = VoiceSessionResponse["data"];
6271
+ export type VoiceInstructionsInput = {
6272
+ readonly sessionID: {
6273
+ readonly sessionID: string;
6274
+ }["sessionID"];
6275
+ readonly instructions: {
6276
+ readonly instructions: string;
6277
+ }["instructions"];
6278
+ };
6279
+ export type VoiceInstructionsOutput = void;
7378
6280
  export type ProviderListInput = {
7379
6281
  readonly location?: {
7380
6282
  readonly location?: {
@@ -7752,6 +6654,27 @@ export type McpResourceCatalogOutput = {
7752
6654
  location: LocationPublicRef;
7753
6655
  data: McpResourceCatalog;
7754
6656
  };
6657
+ export type McpClientTokenInput = {
6658
+ readonly location?: {
6659
+ readonly location?: {
6660
+ readonly directory?: string | undefined;
6661
+ } | undefined;
6662
+ readonly name: string;
6663
+ }["location"];
6664
+ readonly name: {
6665
+ readonly location?: {
6666
+ readonly directory?: string | undefined;
6667
+ } | undefined;
6668
+ readonly name: string;
6669
+ }["name"];
6670
+ readonly "x-opencode-ticket"?: {
6671
+ readonly "x-opencode-ticket"?: string | undefined;
6672
+ }["x-opencode-ticket"];
6673
+ };
6674
+ export type McpClientTokenOutput = {
6675
+ location: LocationPublicRef;
6676
+ data: PtyTicketConnectToken;
6677
+ };
7755
6678
  export type CredentialListOutput = {
7756
6679
  data: Array<CredentialEntry>;
7757
6680
  }["data"];
@@ -7775,9 +6698,6 @@ export type CredentialCreateInput = {
7775
6698
  readonly metadata?: {
7776
6699
  readonly [x: string]: JsonValue;
7777
6700
  };
7778
- readonly configuration?: {
7779
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7780
- };
7781
6701
  } | {
7782
6702
  readonly type: "external";
7783
6703
  readonly methodID: string;
@@ -7806,9 +6726,6 @@ export type CredentialCreateInput = {
7806
6726
  readonly metadata?: {
7807
6727
  readonly [x: string]: JsonValue;
7808
6728
  };
7809
- readonly configuration?: {
7810
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7811
- };
7812
6729
  } | {
7813
6730
  readonly type: "external";
7814
6731
  readonly methodID: string;
@@ -7837,9 +6754,6 @@ export type CredentialCreateInput = {
7837
6754
  readonly metadata?: {
7838
6755
  readonly [x: string]: JsonValue;
7839
6756
  };
7840
- readonly configuration?: {
7841
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7842
- };
7843
6757
  } | {
7844
6758
  readonly type: "external";
7845
6759
  readonly methodID: string;
@@ -7868,9 +6782,6 @@ export type CredentialCreateInput = {
7868
6782
  readonly metadata?: {
7869
6783
  readonly [x: string]: JsonValue;
7870
6784
  };
7871
- readonly configuration?: {
7872
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7873
- };
7874
6785
  } | {
7875
6786
  readonly type: "external";
7876
6787
  readonly methodID: string;
@@ -7899,9 +6810,6 @@ export type CredentialCreateInput = {
7899
6810
  readonly metadata?: {
7900
6811
  readonly [x: string]: JsonValue;
7901
6812
  };
7902
- readonly configuration?: {
7903
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7904
- };
7905
6813
  } | {
7906
6814
  readonly type: "external";
7907
6815
  readonly methodID: string;
@@ -8026,6 +6934,22 @@ export type PermissionSavedListInput = {
8026
6934
  export type PermissionSavedListOutput = {
8027
6935
  data: Array<PermissionSavedInfo>;
8028
6936
  }["data"];
6937
+ export type PermissionSavedUpdateInput = {
6938
+ readonly id: {
6939
+ readonly id: string;
6940
+ }["id"];
6941
+ readonly action?: {
6942
+ readonly action?: string | undefined;
6943
+ readonly resource?: string | undefined;
6944
+ }["action"];
6945
+ readonly resource?: {
6946
+ readonly action?: string | undefined;
6947
+ readonly resource?: string | undefined;
6948
+ }["resource"];
6949
+ };
6950
+ export type PermissionSavedUpdateOutput = {
6951
+ data: PermissionSavedInfo;
6952
+ }["data"];
8029
6953
  export type PermissionSavedRemoveInput = {
8030
6954
  readonly id: {
8031
6955
  readonly id: string;
@@ -8921,6 +7845,22 @@ export type VcsDiffOutput = {
8921
7845
  location: LocationPublicRef;
8922
7846
  data: Array<FileDiffInfo>;
8923
7847
  };
7848
+ export type DebugHeapDumpInput = {
7849
+ readonly directory?: {
7850
+ readonly directory?: string | undefined;
7851
+ }["directory"];
7852
+ };
7853
+ export type DebugHeapDumpOutput = {
7854
+ path: string;
7855
+ pid: number;
7856
+ memory: {
7857
+ rss: number;
7858
+ heapTotal: number;
7859
+ heapUsed: number;
7860
+ external: number;
7861
+ arrayBuffers: number;
7862
+ };
7863
+ };
8924
7864
  export type DebugLocationListOutput = Array<LocationPublicRef>;
8925
7865
  export type DebugLocationEvictInput = {
8926
7866
  readonly location?: {