shuvcode 2.0.32-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 = {
@@ -238,6 +239,7 @@ export type GenerateTextResponse = {
238
239
  text: string;
239
240
  };
240
241
  };
242
+ export type VoiceTransportType = "webrtc" | "websocket";
241
243
  export type VoiceWebRTCTransport = {
242
244
  type: "webrtc";
243
245
  sdp: string;
@@ -345,6 +347,17 @@ export type McpResourceTemplate = {
345
347
  description?: string;
346
348
  mimeType?: string;
347
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
+ };
348
361
  export type ProjectVcs = string;
349
362
  export type ProjectIcon = {
350
363
  url?: string;
@@ -403,10 +416,6 @@ export type SessionStatus = {
403
416
  } | {
404
417
  type: "busy";
405
418
  };
406
- export type PtyTicketConnectToken = {
407
- ticket: string;
408
- expires_in: number;
409
- };
410
419
  export type PersistentPtyHandoff = {
411
420
  directory: string;
412
421
  instanceID: string;
@@ -493,14 +502,6 @@ export type ModelRef = {
493
502
  providerID: ProviderID;
494
503
  variant?: string;
495
504
  };
496
- export type SessionProviderContextProvenance = {
497
- providerID: ProviderID;
498
- provider: string;
499
- modelID: string;
500
- route: string;
501
- protocol: string;
502
- endpoint: string;
503
- };
504
505
  export type ProviderSettings = {
505
506
  timeout?: number | false;
506
507
  headerTimeout?: number | false;
@@ -599,7 +600,6 @@ export type SessionMessageCompactionRunning = {
599
600
  status: "running";
600
601
  reason: "auto" | "manual";
601
602
  summary: string;
602
- recent: string;
603
603
  };
604
604
  export type FileSystemEntry = {
605
605
  path: RelativePath;
@@ -720,12 +720,12 @@ export type ShellInfo1 = {
720
720
  export type SessionMessageAssistantText = {
721
721
  type: "text";
722
722
  text: string;
723
- state?: SessionMessageProviderState;
723
+ native?: SessionMessageNative;
724
724
  };
725
725
  export type SessionMessageAssistantReasoning = {
726
726
  type: "reasoning";
727
727
  text: string;
728
- state?: SessionMessageProviderState;
728
+ native?: SessionMessageNative;
729
729
  time?: {
730
730
  created: number;
731
731
  completed?: number;
@@ -805,12 +805,12 @@ export type LocationRef = {
805
805
  export type SessionMessageAssistantText1 = {
806
806
  type: "text";
807
807
  text: string;
808
- state?: SessionMessageProviderState1;
808
+ native?: SessionMessageNative1;
809
809
  };
810
810
  export type SessionMessageAssistantReasoning1 = {
811
811
  type: "reasoning";
812
812
  text: string;
813
- state?: SessionMessageProviderState1;
813
+ native?: SessionMessageNative1;
814
814
  time?: {
815
815
  created: number;
816
816
  completed?: number;
@@ -892,6 +892,7 @@ export type ModelCompatibility = {
892
892
  requireFinishReason?: boolean;
893
893
  requireAssistantAfterTool?: boolean;
894
894
  supportsPromptCacheKey?: boolean;
895
+ streamUsage?: boolean;
895
896
  cacheFormat?: ModelCacheFormat;
896
897
  supportsThinkingBlockBinding?: boolean;
897
898
  supportsEffortUpdates?: boolean;
@@ -903,6 +904,7 @@ export type ProviderCompatibility = {
903
904
  requireFinishReason?: boolean;
904
905
  requireAssistantAfterTool?: boolean;
905
906
  supportsPromptCacheKey?: boolean;
907
+ streamUsage?: boolean;
906
908
  cacheFormat?: ModelCacheFormat;
907
909
  };
908
910
  export type ModelCost = {
@@ -917,6 +919,14 @@ export type ModelCost = {
917
919
  write: MoneyUSDPerMillionTokens;
918
920
  };
919
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
+ };
920
930
  export type VoiceTransport = VoiceWebRTCTransport | VoiceWebSocketTransport;
921
931
  export type IntegrationCommandMethod = {
922
932
  id: IntegrationMethodID;
@@ -1121,7 +1131,7 @@ export type FormMultiselectField1 = {
1121
1131
  custom?: boolean;
1122
1132
  default?: Array<string>;
1123
1133
  };
1124
- export type FormAnswer2 = {
1134
+ export type FormAnswer1 = {
1125
1135
  [x: string]: FormValue1;
1126
1136
  };
1127
1137
  export type VcsInfo = {
@@ -1203,10 +1213,22 @@ export type SessionMessageModelSelected = {
1203
1213
  model: ModelRef;
1204
1214
  previous?: ModelRef;
1205
1215
  };
1206
- export type SessionProviderContext = {
1207
- version: 1;
1208
- provenance: SessionProviderContextProvenance;
1209
- 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;
1210
1232
  };
1211
1233
  export type ProviderRequest = {
1212
1234
  settings: ProviderSettings;
@@ -1393,6 +1415,40 @@ export type SessionViewed = {
1393
1415
  idle: number;
1394
1416
  };
1395
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
+ };
1396
1452
  export type SessionDeleted = {
1397
1453
  id: EventID;
1398
1454
  created: number;
@@ -1726,7 +1782,7 @@ export type SessionStepEnded = {
1726
1782
  assistantMessageID: SessionMessageID;
1727
1783
  finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
1728
1784
  rawFinish?: string;
1729
- providerState?: SessionMessageProviderState1;
1785
+ native?: SessionMessageNative1;
1730
1786
  cost: MoneyUSD;
1731
1787
  tokens: TokenUsageInfo;
1732
1788
  snapshot?: SnapshotID;
@@ -1752,7 +1808,7 @@ export type SessionStepFailed = {
1752
1808
  error: SessionStructuredError;
1753
1809
  finish?: "content-filter";
1754
1810
  rawFinish?: string;
1755
- providerState?: SessionMessageProviderState1;
1811
+ native?: SessionMessageNative1;
1756
1812
  cost?: MoneyUSD;
1757
1813
  tokens?: TokenUsageInfo;
1758
1814
  snapshot?: SnapshotID;
@@ -1796,7 +1852,7 @@ export type SessionTextEnded = {
1796
1852
  assistantMessageID: SessionMessageID;
1797
1853
  ordinal: number;
1798
1854
  text: string;
1799
- state?: SessionMessageProviderState1;
1855
+ native?: SessionMessageNative1;
1800
1856
  };
1801
1857
  };
1802
1858
  export type SessionReasoningStarted = {
@@ -1816,7 +1872,7 @@ export type SessionReasoningStarted = {
1816
1872
  sessionID: SessionID;
1817
1873
  assistantMessageID: SessionMessageID;
1818
1874
  ordinal: number;
1819
- state?: SessionMessageProviderState1;
1875
+ native?: SessionMessageNative1;
1820
1876
  };
1821
1877
  };
1822
1878
  export type SessionReasoningEnded = {
@@ -1837,7 +1893,7 @@ export type SessionReasoningEnded = {
1837
1893
  assistantMessageID: SessionMessageID;
1838
1894
  ordinal: number;
1839
1895
  text: string;
1840
- state?: SessionMessageProviderState1;
1896
+ native?: SessionMessageNative1;
1841
1897
  };
1842
1898
  };
1843
1899
  export type SessionToolInputStarted = {
@@ -1901,7 +1957,7 @@ export type SessionToolCalled = {
1901
1957
  [x: string]: any;
1902
1958
  };
1903
1959
  executed: boolean;
1904
- state?: SessionMessageProviderState1;
1960
+ native?: SessionMessageNative1;
1905
1961
  };
1906
1962
  };
1907
1963
  export type SessionToolSubagentPrepared = {
@@ -1967,10 +2023,32 @@ export type SessionCompactionStarted = {
1967
2023
  data: {
1968
2024
  sessionID: SessionID;
1969
2025
  reason: "auto" | "manual";
1970
- recent: string;
1971
2026
  inputID?: SessionMessageID;
1972
2027
  };
1973
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
+ };
1974
2052
  export type SessionCompactionFailed = {
1975
2053
  id: EventID;
1976
2054
  created: number;
@@ -2657,7 +2735,7 @@ export type SessionToolSuccess = {
2657
2735
  [x: string]: JsonValue;
2658
2736
  };
2659
2737
  executed: boolean;
2660
- resultState?: SessionMessageProviderState1;
2738
+ native?: SessionMessageNative1;
2661
2739
  };
2662
2740
  };
2663
2741
  export type SessionToolFailed = {
@@ -2683,7 +2761,7 @@ export type SessionToolFailed = {
2683
2761
  [x: string]: JsonValue;
2684
2762
  };
2685
2763
  executed: boolean;
2686
- resultState?: SessionMessageProviderState1;
2764
+ native?: SessionMessageNative1;
2687
2765
  };
2688
2766
  };
2689
2767
  export type SessionMessageToolStateCompleted1 = {
@@ -2717,14 +2795,6 @@ export type FormState = {
2717
2795
  status: "cancelled";
2718
2796
  message?: string;
2719
2797
  };
2720
- export type CredentialKey = {
2721
- type: "key";
2722
- key: string;
2723
- metadata?: {
2724
- [x: string]: JsonValue;
2725
- };
2726
- configuration?: FormAnswer;
2727
- };
2728
2798
  export type ProviderInfo = {
2729
2799
  id: ProviderID;
2730
2800
  canonical?: ProviderID;
@@ -2741,11 +2811,21 @@ export type ProviderInfo = {
2741
2811
  [x: string]: any;
2742
2812
  };
2743
2813
  };
2814
+ export type VoiceModelsResponse = {
2815
+ data: {
2816
+ models: Array<VoiceModel>;
2817
+ default?: string | undefined;
2818
+ };
2819
+ };
2744
2820
  export type VoiceSessionResponse = {
2745
2821
  data: {
2746
2822
  transport: VoiceTransport;
2823
+ session?: {
2824
+ id: string;
2825
+ } | undefined;
2747
2826
  };
2748
2827
  };
2828
+ export type CredentialValue = CredentialOAuth | CredentialKey | CredentialExternal;
2749
2829
  export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo;
2750
2830
  export type PtyCreated = {
2751
2831
  id: EventID;
@@ -2805,7 +2885,7 @@ export type FormReplied = {
2805
2885
  data: {
2806
2886
  id: FormID;
2807
2887
  sessionID: string;
2808
- answer: FormAnswer2;
2888
+ answer: FormAnswer1;
2809
2889
  };
2810
2890
  };
2811
2891
  export type SessionInboxMove = {
@@ -2842,50 +2922,7 @@ export type SessionStatsInfo = {
2842
2922
  activity: Array<SessionStatsActivity>;
2843
2923
  models: Array<SessionStatsModelUsage>;
2844
2924
  };
2845
- export type SessionMessageCompactionCompleted = {
2846
- type: "compaction";
2847
- id: SessionMessageID;
2848
- metadata?: {
2849
- [x: string]: JsonValue;
2850
- };
2851
- time: {
2852
- created: number;
2853
- };
2854
- status: "completed";
2855
- reason: "auto" | "manual";
2856
- model?: ModelRef;
2857
- providerState?: SessionMessageProviderState;
2858
- summary: string;
2859
- recent: string;
2860
- providerContext?: SessionProviderContext;
2861
- cost?: MoneyUSD;
2862
- tokens?: TokenUsageInfo;
2863
- };
2864
- export type SessionCompactionEnded = {
2865
- id: EventID;
2866
- created: number;
2867
- metadata?: {
2868
- [x: string]: any;
2869
- };
2870
- type: "session.compaction.ended";
2871
- durable: {
2872
- aggregateID: string;
2873
- seq: EventSeq;
2874
- version: 1;
2875
- };
2876
- location?: LocationRef;
2877
- data: {
2878
- sessionID: SessionID;
2879
- reason: "auto" | "manual";
2880
- model?: ModelRef;
2881
- providerState?: SessionMessageProviderState1;
2882
- providerContext?: SessionProviderContext;
2883
- text: string;
2884
- recent: string;
2885
- cost?: MoneyUSD;
2886
- tokens?: TokenUsageInfo;
2887
- };
2888
- };
2925
+ export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
2889
2926
  export type ModelInfo = {
2890
2927
  id: string;
2891
2928
  modelID: string;
@@ -3264,8 +3301,11 @@ export type ConfigEntry = {
3264
3301
  };
3265
3302
  experimental?: {
3266
3303
  portable_shell_scanner?: boolean;
3304
+ todo?: boolean;
3305
+ background_compaction?: boolean;
3267
3306
  subagent_depth?: number;
3268
3307
  jev?: boolean;
3308
+ location_idle_timeout?: string | false;
3269
3309
  policies?: Array<{
3270
3310
  action: "provider.use" | "tool.use" | "integration.use";
3271
3311
  resource: string;
@@ -3292,8 +3332,7 @@ export type SessionMessageAssistantTool = {
3292
3332
  id: string;
3293
3333
  name: string;
3294
3334
  executed?: boolean;
3295
- providerState?: SessionMessageProviderState;
3296
- providerResultState?: SessionMessageProviderState;
3335
+ native?: SessionMessageNative;
3297
3336
  state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning | SessionMessageToolStateCompleted | SessionMessageToolStateError;
3298
3337
  time: {
3299
3338
  created: number;
@@ -3323,8 +3362,7 @@ export type SessionMessageAssistantTool1 = {
3323
3362
  id: string;
3324
3363
  name: string;
3325
3364
  executed?: boolean;
3326
- providerState?: SessionMessageProviderState1;
3327
- providerResultState?: SessionMessageProviderState1;
3365
+ native?: SessionMessageNative1;
3328
3366
  state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning1 | SessionMessageToolStateCompleted1 | SessionMessageToolStateError1;
3329
3367
  time: {
3330
3368
  created: number;
@@ -3333,9 +3371,14 @@ export type SessionMessageAssistantTool1 = {
3333
3371
  };
3334
3372
  };
3335
3373
  export type FormFields = [FormField, ...Array<FormField>];
3336
- 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
+ };
3337
3381
  export type FormFields2 = [FormField1, ...Array<FormField1>];
3338
- export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
3339
3382
  export type SessionsResponse = {
3340
3383
  data: Array<SessionInfo>;
3341
3384
  cursor: {
@@ -3365,7 +3408,7 @@ export type SessionMessageAssistant = {
3365
3408
  };
3366
3409
  finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
3367
3410
  rawFinish?: string;
3368
- providerState?: SessionMessageProviderState;
3411
+ native?: SessionMessageNative;
3369
3412
  cost?: MoneyUSD;
3370
3413
  tokens?: TokenUsageInfo;
3371
3414
  error?: SessionStructuredError;
@@ -3423,13 +3466,6 @@ export type IntegrationExternalMethod = {
3423
3466
  label: string;
3424
3467
  form?: FormFields;
3425
3468
  };
3426
- export type CredentialEntry = {
3427
- id: CredentialID;
3428
- integrationID: IntegrationID;
3429
- label: string;
3430
- active: boolean;
3431
- value: CredentialValue;
3432
- };
3433
3469
  export type FormInfo1 = {
3434
3470
  id: FormID;
3435
3471
  sessionID: string;
@@ -3481,7 +3517,7 @@ export type SessionMessagesResponse = {
3481
3517
  next?: string | null;
3482
3518
  };
3483
3519
  };
3484
- 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;
3485
3521
  export type IntegrationInfo = {
3486
3522
  id: IntegrationID;
3487
3523
  name: string;
@@ -3491,7 +3527,7 @@ export type IntegrationInfo = {
3491
3527
  methods: Array<IntegrationMethod>;
3492
3528
  connections: Array<ConnectionInfo>;
3493
3529
  };
3494
- 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;
3495
3531
  export type SessionLogItem = SessionEventDurable | EventLogSynced;
3496
3532
  export type InvalidRequestError = {
3497
3533
  readonly _tag: "InvalidRequestError";
@@ -3636,12 +3672,23 @@ export type McpServerNotFoundError = {
3636
3672
  readonly message: string;
3637
3673
  };
3638
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;
3639
3680
  export type ProjectNotFoundError = {
3640
3681
  readonly _tag: "ProjectNotFoundError";
3641
3682
  readonly projectID: string;
3642
3683
  readonly message: string;
3643
3684
  };
3644
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;
3645
3692
  export type PermissionNotFoundError = {
3646
3693
  readonly _tag: "PermissionNotFoundError";
3647
3694
  readonly requestID: string;
@@ -3674,11 +3721,6 @@ export type PtyNotFoundError = {
3674
3721
  readonly message: string;
3675
3722
  };
3676
3723
  export declare const isPtyNotFoundError: (value: unknown) => value is PtyNotFoundError;
3677
- export type ForbiddenError = {
3678
- readonly _tag: "ForbiddenError";
3679
- readonly message: string;
3680
- };
3681
- export declare const isForbiddenError: (value: unknown) => value is ForbiddenError;
3682
3724
  export type ShellNotFoundError = {
3683
3725
  readonly _tag: "ShellNotFoundError";
3684
3726
  readonly id: string;
@@ -3784,6 +3826,7 @@ export type SessionListInput = {
3784
3826
  readonly order?: "asc" | "desc" | undefined;
3785
3827
  readonly search?: string | undefined;
3786
3828
  readonly parentID?: string | null | undefined;
3829
+ readonly archived?: boolean | undefined;
3787
3830
  readonly directory?: string | undefined;
3788
3831
  readonly project?: string | undefined;
3789
3832
  readonly subpath?: string | undefined;
@@ -3794,6 +3837,7 @@ export type SessionListInput = {
3794
3837
  readonly order?: "asc" | "desc" | undefined;
3795
3838
  readonly search?: string | undefined;
3796
3839
  readonly parentID?: string | null | undefined;
3840
+ readonly archived?: boolean | undefined;
3797
3841
  readonly directory?: string | undefined;
3798
3842
  readonly project?: string | undefined;
3799
3843
  readonly subpath?: string | undefined;
@@ -3804,6 +3848,7 @@ export type SessionListInput = {
3804
3848
  readonly order?: "asc" | "desc" | undefined;
3805
3849
  readonly search?: string | undefined;
3806
3850
  readonly parentID?: string | null | undefined;
3851
+ readonly archived?: boolean | undefined;
3807
3852
  readonly directory?: string | undefined;
3808
3853
  readonly project?: string | undefined;
3809
3854
  readonly subpath?: string | undefined;
@@ -3814,16 +3859,29 @@ export type SessionListInput = {
3814
3859
  readonly order?: "asc" | "desc" | undefined;
3815
3860
  readonly search?: string | undefined;
3816
3861
  readonly parentID?: string | null | undefined;
3862
+ readonly archived?: boolean | undefined;
3817
3863
  readonly directory?: string | undefined;
3818
3864
  readonly project?: string | undefined;
3819
3865
  readonly subpath?: string | undefined;
3820
3866
  readonly cursor?: string | undefined;
3821
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"];
3822
3879
  readonly directory?: {
3823
3880
  readonly limit?: number | undefined;
3824
3881
  readonly order?: "asc" | "desc" | undefined;
3825
3882
  readonly search?: string | undefined;
3826
3883
  readonly parentID?: string | null | undefined;
3884
+ readonly archived?: boolean | undefined;
3827
3885
  readonly directory?: string | undefined;
3828
3886
  readonly project?: string | undefined;
3829
3887
  readonly subpath?: string | undefined;
@@ -3834,6 +3892,7 @@ export type SessionListInput = {
3834
3892
  readonly order?: "asc" | "desc" | undefined;
3835
3893
  readonly search?: string | undefined;
3836
3894
  readonly parentID?: string | null | undefined;
3895
+ readonly archived?: boolean | undefined;
3837
3896
  readonly directory?: string | undefined;
3838
3897
  readonly project?: string | undefined;
3839
3898
  readonly subpath?: string | undefined;
@@ -3844,6 +3903,7 @@ export type SessionListInput = {
3844
3903
  readonly order?: "asc" | "desc" | undefined;
3845
3904
  readonly search?: string | undefined;
3846
3905
  readonly parentID?: string | null | undefined;
3906
+ readonly archived?: boolean | undefined;
3847
3907
  readonly directory?: string | undefined;
3848
3908
  readonly project?: string | undefined;
3849
3909
  readonly subpath?: string | undefined;
@@ -3854,6 +3914,7 @@ export type SessionListInput = {
3854
3914
  readonly order?: "asc" | "desc" | undefined;
3855
3915
  readonly search?: string | undefined;
3856
3916
  readonly parentID?: string | null | undefined;
3917
+ readonly archived?: boolean | undefined;
3857
3918
  readonly directory?: string | undefined;
3858
3919
  readonly project?: string | undefined;
3859
3920
  readonly subpath?: string | undefined;
@@ -4148,959 +4209,51 @@ export type SessionImportInput = {
4148
4209
  readonly directory: string;
4149
4210
  };
4150
4211
  };
4151
- readonly messages: ReadonlyArray<{
4152
- readonly id: string;
4153
- readonly metadata?: {
4154
- readonly [x: string]: JsonValue;
4155
- };
4156
- readonly time: {
4157
- readonly created: number;
4158
- };
4159
- readonly type: "agent-switched";
4160
- readonly agent: string;
4161
- readonly previous?: string;
4162
- } | {
4212
+ readonly messages: ReadonlyArray<JsonValue>;
4213
+ readonly location?: {
4214
+ readonly directory: string;
4215
+ } | null;
4216
+ }["info"];
4217
+ readonly messages: {
4218
+ readonly info: {
4163
4219
  readonly id: string;
4164
- readonly metadata?: {
4165
- readonly [x: string]: JsonValue;
4166
- };
4167
- readonly time: {
4168
- readonly created: number;
4169
- };
4170
- readonly type: "model-switched";
4171
- readonly model: {
4172
- readonly id: string;
4173
- readonly providerID: string;
4174
- 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
+ };
4175
4230
  };
4176
- readonly previous?: {
4231
+ readonly projectID: string;
4232
+ readonly agent?: string;
4233
+ readonly model?: {
4177
4234
  readonly id: string;
4178
4235
  readonly providerID: string;
4179
4236
  readonly variant?: string;
4180
4237
  };
4181
- } | {
4182
- readonly id: string;
4183
- readonly metadata?: {
4184
- 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
+ };
4185
4247
  };
4248
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
4186
4249
  readonly time: {
4187
4250
  readonly created: number;
4251
+ readonly updated: number;
4252
+ readonly idle?: number;
4253
+ readonly viewed?: number;
4254
+ readonly archived?: number;
4188
4255
  };
4189
- readonly type: "location-switched";
4190
- readonly projectID?: string;
4191
- readonly subpath?: string;
4192
- readonly location: {
4193
- readonly directory: string;
4194
- };
4195
- readonly previous?: {
4196
- readonly location: {
4197
- readonly directory: string;
4198
- };
4199
- readonly projectID?: string;
4200
- readonly subpath?: string;
4201
- } | null;
4202
- } | {
4203
- readonly id: string;
4204
- readonly metadata?: {
4205
- readonly [x: string]: JsonValue;
4206
- };
4207
- readonly time: {
4208
- readonly created: number;
4209
- };
4210
- readonly text: string;
4211
- readonly files?: ReadonlyArray<{
4212
- readonly data: string;
4213
- readonly mime: string;
4214
- readonly source: {
4215
- readonly type: "inline";
4216
- } | {
4217
- readonly type: "uri";
4218
- readonly uri: string;
4219
- };
4220
- readonly name?: string;
4221
- readonly description?: string;
4222
- readonly mention?: {
4223
- readonly start: number;
4224
- readonly end: number;
4225
- readonly text: string;
4226
- };
4227
- }>;
4228
- readonly agents?: ReadonlyArray<{
4229
- readonly name: string;
4230
- readonly mention?: {
4231
- readonly start: number;
4232
- readonly end: number;
4233
- readonly text: string;
4234
- };
4235
- }>;
4236
- readonly skills?: ReadonlyArray<{
4237
- readonly id: string;
4238
- readonly name: string;
4239
- readonly text?: string;
4240
- readonly mention?: {
4241
- readonly start: number;
4242
- readonly end: number;
4243
- readonly text: string;
4244
- };
4245
- }>;
4246
- readonly type: "user";
4247
- } | {
4248
- readonly id: string;
4249
- readonly metadata?: {
4250
- readonly [x: string]: JsonValue;
4251
- };
4252
- readonly time: {
4253
- readonly created: number;
4254
- };
4255
- readonly text: string;
4256
- readonly description?: string;
4257
- readonly type: "synthetic";
4258
- } | {
4259
- readonly id: string;
4260
- readonly metadata?: {
4261
- readonly [x: string]: JsonValue;
4262
- };
4263
- readonly time: {
4264
- readonly created: number;
4265
- };
4266
- readonly type: "system";
4267
- readonly text: string;
4268
- readonly description?: string;
4269
- } | {
4270
- readonly id: string;
4271
- readonly metadata?: {
4272
- readonly [x: string]: JsonValue;
4273
- };
4274
- readonly time: {
4275
- readonly created: number;
4276
- };
4277
- readonly type: "skill";
4278
- readonly skill: string;
4279
- readonly name: string;
4280
- readonly text: string;
4281
- } | {
4282
- readonly id: string;
4283
- readonly metadata?: {
4284
- readonly [x: string]: JsonValue;
4285
- };
4286
- readonly time: {
4287
- readonly created: number;
4288
- readonly completed?: number;
4289
- };
4290
- readonly type: "shell";
4291
- readonly shellID: string;
4292
- readonly command: string;
4293
- readonly status: "running" | "exited" | "timeout" | "killed";
4294
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
4295
- readonly output?: {
4296
- readonly output: string;
4297
- readonly cursor: number;
4298
- readonly size: number;
4299
- readonly truncated: boolean;
4300
- };
4301
- } | {
4302
- readonly id: string;
4303
- readonly metadata?: {
4304
- readonly [x: string]: JsonValue;
4305
- };
4306
- readonly time: {
4307
- readonly created: number;
4308
- readonly streamed?: number;
4309
- readonly completed?: number;
4310
- };
4311
- readonly type: "assistant";
4312
- readonly agent: string;
4313
- readonly model: {
4314
- readonly id: string;
4315
- readonly providerID: string;
4316
- readonly variant?: string;
4317
- };
4318
- readonly content: ReadonlyArray<{
4319
- readonly type: "text";
4320
- readonly text: string;
4321
- readonly state?: {
4322
- readonly [x: string]: JsonValue;
4323
- };
4324
- } | {
4325
- readonly type: "reasoning";
4326
- readonly text: string;
4327
- readonly state?: {
4328
- readonly [x: string]: JsonValue;
4329
- };
4330
- readonly time?: {
4331
- readonly created: number;
4332
- readonly completed?: number;
4333
- };
4334
- } | {
4335
- readonly type: "tool";
4336
- readonly id: string;
4337
- readonly name: string;
4338
- readonly executed?: boolean;
4339
- readonly providerState?: {
4340
- readonly [x: string]: JsonValue;
4341
- };
4342
- readonly providerResultState?: {
4343
- readonly [x: string]: JsonValue;
4344
- };
4345
- readonly state: {
4346
- readonly status: "streaming";
4347
- readonly input: string;
4348
- } | {
4349
- readonly status: "running";
4350
- readonly input: {
4351
- readonly [x: string]: JsonValue;
4352
- };
4353
- readonly metadata: {
4354
- readonly [x: string]: JsonValue;
4355
- };
4356
- } | {
4357
- readonly status: "completed";
4358
- readonly input: {
4359
- readonly [x: string]: JsonValue;
4360
- };
4361
- readonly content: readonly [
4362
- ({
4363
- readonly type: "text";
4364
- readonly text: string;
4365
- } | {
4366
- readonly type: "file";
4367
- readonly uri: string;
4368
- readonly mime: string;
4369
- readonly name?: string | null;
4370
- }),
4371
- ...Array<{
4372
- readonly type: "text";
4373
- readonly text: string;
4374
- } | {
4375
- readonly type: "file";
4376
- readonly uri: string;
4377
- readonly mime: string;
4378
- readonly name?: string | null;
4379
- }>
4380
- ];
4381
- readonly metadata?: {
4382
- readonly [x: string]: JsonValue;
4383
- };
4384
- } | {
4385
- readonly status: "error";
4386
- readonly input: {
4387
- readonly [x: string]: JsonValue;
4388
- };
4389
- readonly error: {
4390
- readonly type: string;
4391
- readonly message: string;
4392
- readonly status?: number;
4393
- readonly response?: {
4394
- readonly body: string;
4395
- };
4396
- };
4397
- readonly content?: readonly [
4398
- ({
4399
- readonly type: "text";
4400
- readonly text: string;
4401
- } | {
4402
- readonly type: "file";
4403
- readonly uri: string;
4404
- readonly mime: string;
4405
- readonly name?: string | null;
4406
- }),
4407
- ...Array<{
4408
- readonly type: "text";
4409
- readonly text: string;
4410
- } | {
4411
- readonly type: "file";
4412
- readonly uri: string;
4413
- readonly mime: string;
4414
- readonly name?: string | null;
4415
- }>
4416
- ];
4417
- readonly metadata?: {
4418
- readonly [x: string]: JsonValue;
4419
- };
4420
- };
4421
- readonly time: {
4422
- readonly created: number;
4423
- readonly ran?: number;
4424
- readonly completed?: number;
4425
- };
4426
- }>;
4427
- readonly snapshot?: {
4428
- readonly start?: string;
4429
- readonly end?: string;
4430
- readonly files?: ReadonlyArray<string>;
4431
- };
4432
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4433
- readonly rawFinish?: string;
4434
- readonly providerState?: {
4435
- readonly [x: string]: JsonValue;
4436
- };
4437
- readonly cost?: number;
4438
- readonly tokens?: {
4439
- readonly input: number;
4440
- readonly output: number;
4441
- readonly reasoning: number;
4442
- readonly cache: {
4443
- readonly read: number;
4444
- readonly write: number;
4445
- };
4446
- };
4447
- readonly error?: {
4448
- readonly type: string;
4449
- readonly message: string;
4450
- readonly status?: number;
4451
- readonly response?: {
4452
- readonly body: string;
4453
- };
4454
- };
4455
- readonly retry?: {
4456
- readonly attempt: number;
4457
- readonly at: number;
4458
- readonly error: {
4459
- readonly type: string;
4460
- readonly message: string;
4461
- readonly status?: number;
4462
- readonly response?: {
4463
- readonly body: string;
4464
- };
4465
- };
4466
- };
4467
- } | ({
4468
- readonly type: "compaction";
4469
- readonly id: string;
4470
- readonly metadata?: {
4471
- readonly [x: string]: JsonValue;
4472
- };
4473
- readonly time: {
4474
- readonly created: number;
4475
- };
4476
- readonly status: "running";
4477
- readonly reason: "auto" | "manual";
4478
- readonly summary: string;
4479
- readonly recent: string;
4480
- } | {
4481
- readonly type: "compaction";
4482
- readonly id: string;
4483
- readonly metadata?: {
4484
- readonly [x: string]: JsonValue;
4485
- };
4486
- readonly time: {
4487
- readonly created: number;
4488
- };
4489
- readonly status: "completed";
4490
- readonly reason: "auto" | "manual";
4491
- readonly model?: {
4492
- readonly id: string;
4493
- readonly providerID: string;
4494
- readonly variant?: string;
4495
- };
4496
- readonly providerState?: {
4497
- readonly [x: string]: JsonValue;
4498
- };
4499
- readonly summary: string;
4500
- readonly recent: string;
4501
- readonly providerContext?: {
4502
- readonly version: 1;
4503
- readonly provenance: {
4504
- readonly providerID: string;
4505
- readonly provider: string;
4506
- readonly modelID: string;
4507
- readonly route: string;
4508
- readonly protocol: string;
4509
- readonly endpoint: string;
4510
- };
4511
- readonly messages: JsonValue;
4512
- };
4513
- readonly cost?: number;
4514
- readonly tokens?: {
4515
- readonly input: number;
4516
- readonly output: number;
4517
- readonly reasoning: number;
4518
- readonly cache: {
4519
- readonly read: number;
4520
- readonly write: number;
4521
- };
4522
- };
4523
- } | {
4524
- readonly type: "compaction";
4525
- readonly id: string;
4526
- readonly metadata?: {
4527
- readonly [x: string]: JsonValue;
4528
- };
4529
- readonly time: {
4530
- readonly created: number;
4531
- };
4532
- readonly status: "failed";
4533
- readonly reason: "auto" | "manual";
4534
- readonly error: {
4535
- readonly type: string;
4536
- readonly message: string;
4537
- readonly status?: number;
4538
- readonly response?: {
4539
- readonly body: string;
4540
- };
4541
- };
4542
- readonly cost?: number;
4543
- readonly tokens?: {
4544
- readonly input: number;
4545
- readonly output: number;
4546
- readonly reasoning: number;
4547
- readonly cache: {
4548
- readonly read: number;
4549
- readonly write: number;
4550
- };
4551
- };
4552
- }) | {
4553
- readonly id: string;
4554
- readonly metadata?: {
4555
- readonly [x: string]: JsonValue;
4556
- };
4557
- readonly time: {
4558
- readonly created: number;
4559
- };
4560
- readonly type: "idle";
4561
- readonly outcome: "succeeded" | "failed" | "interrupted";
4562
- readonly error?: {
4563
- readonly type: string;
4564
- readonly message: string;
4565
- readonly status?: number;
4566
- readonly response?: {
4567
- readonly body: string;
4568
- };
4569
- };
4570
- }>;
4571
- readonly location?: {
4572
- readonly directory: string;
4573
- } | null;
4574
- }["info"];
4575
- readonly messages: {
4576
- readonly info: {
4577
- readonly id: string;
4578
- readonly parentID?: string;
4579
- readonly fork?: {
4580
- readonly sessionID: string;
4581
- readonly boundary: {
4582
- readonly type: "before";
4583
- readonly messageID: string;
4584
- } | {
4585
- readonly type: "through";
4586
- readonly messageID: string;
4587
- };
4588
- };
4589
- readonly projectID: string;
4590
- readonly agent?: string;
4591
- readonly model?: {
4592
- readonly id: string;
4593
- readonly providerID: string;
4594
- readonly variant?: string;
4595
- };
4596
- readonly cost: number;
4597
- readonly tokens: {
4598
- readonly input: number;
4599
- readonly output: number;
4600
- readonly reasoning: number;
4601
- readonly cache: {
4602
- readonly read: number;
4603
- readonly write: number;
4604
- };
4605
- };
4606
- readonly outcome?: "succeeded" | "failed" | "interrupted";
4607
- readonly time: {
4608
- readonly created: number;
4609
- readonly updated: number;
4610
- readonly idle?: number;
4611
- readonly viewed?: number;
4612
- readonly archived?: number;
4613
- };
4614
- readonly title?: string;
4615
- readonly subpath?: string;
4616
- readonly metadata?: {
4617
- readonly [x: string]: JsonValue;
4618
- };
4619
- readonly permissions?: ReadonlyArray<{
4620
- readonly action: string;
4621
- readonly resource: string;
4622
- readonly effect: "allow" | "deny" | "ask";
4623
- }>;
4624
- readonly revert?: {
4625
- readonly messageID: string;
4626
- readonly partID?: string;
4627
- readonly snapshot?: string;
4628
- readonly files?: ReadonlyArray<{
4629
- readonly file: string;
4630
- readonly patch: string;
4631
- readonly additions: number;
4632
- readonly deletions: number;
4633
- readonly status: "added" | "deleted" | "modified";
4634
- }>;
4635
- };
4636
- readonly location: {
4637
- readonly directory: string;
4638
- };
4639
- };
4640
- readonly messages: ReadonlyArray<{
4641
- readonly id: string;
4642
- readonly metadata?: {
4643
- readonly [x: string]: JsonValue;
4644
- };
4645
- readonly time: {
4646
- readonly created: number;
4647
- };
4648
- readonly type: "agent-switched";
4649
- readonly agent: string;
4650
- readonly previous?: string;
4651
- } | {
4652
- readonly id: string;
4653
- readonly metadata?: {
4654
- readonly [x: string]: JsonValue;
4655
- };
4656
- readonly time: {
4657
- readonly created: number;
4658
- };
4659
- readonly type: "model-switched";
4660
- readonly model: {
4661
- readonly id: string;
4662
- readonly providerID: string;
4663
- readonly variant?: string;
4664
- };
4665
- readonly previous?: {
4666
- readonly id: string;
4667
- readonly providerID: string;
4668
- readonly variant?: string;
4669
- };
4670
- } | {
4671
- readonly id: string;
4672
- readonly metadata?: {
4673
- readonly [x: string]: JsonValue;
4674
- };
4675
- readonly time: {
4676
- readonly created: number;
4677
- };
4678
- readonly type: "location-switched";
4679
- readonly projectID?: string;
4680
- readonly subpath?: string;
4681
- readonly location: {
4682
- readonly directory: string;
4683
- };
4684
- readonly previous?: {
4685
- readonly location: {
4686
- readonly directory: string;
4687
- };
4688
- readonly projectID?: string;
4689
- readonly subpath?: string;
4690
- } | null;
4691
- } | {
4692
- readonly id: string;
4693
- readonly metadata?: {
4694
- readonly [x: string]: JsonValue;
4695
- };
4696
- readonly time: {
4697
- readonly created: number;
4698
- };
4699
- readonly text: string;
4700
- readonly files?: ReadonlyArray<{
4701
- readonly data: string;
4702
- readonly mime: string;
4703
- readonly source: {
4704
- readonly type: "inline";
4705
- } | {
4706
- readonly type: "uri";
4707
- readonly uri: string;
4708
- };
4709
- readonly name?: string;
4710
- readonly description?: string;
4711
- readonly mention?: {
4712
- readonly start: number;
4713
- readonly end: number;
4714
- readonly text: string;
4715
- };
4716
- }>;
4717
- readonly agents?: ReadonlyArray<{
4718
- readonly name: string;
4719
- readonly mention?: {
4720
- readonly start: number;
4721
- readonly end: number;
4722
- readonly text: string;
4723
- };
4724
- }>;
4725
- readonly skills?: ReadonlyArray<{
4726
- readonly id: string;
4727
- readonly name: string;
4728
- readonly text?: string;
4729
- readonly mention?: {
4730
- readonly start: number;
4731
- readonly end: number;
4732
- readonly text: string;
4733
- };
4734
- }>;
4735
- readonly type: "user";
4736
- } | {
4737
- readonly id: string;
4738
- readonly metadata?: {
4739
- readonly [x: string]: JsonValue;
4740
- };
4741
- readonly time: {
4742
- readonly created: number;
4743
- };
4744
- readonly text: string;
4745
- readonly description?: string;
4746
- readonly type: "synthetic";
4747
- } | {
4748
- readonly id: string;
4749
- readonly metadata?: {
4750
- readonly [x: string]: JsonValue;
4751
- };
4752
- readonly time: {
4753
- readonly created: number;
4754
- };
4755
- readonly type: "system";
4756
- readonly text: string;
4757
- readonly description?: string;
4758
- } | {
4759
- readonly id: string;
4760
- readonly metadata?: {
4761
- readonly [x: string]: JsonValue;
4762
- };
4763
- readonly time: {
4764
- readonly created: number;
4765
- };
4766
- readonly type: "skill";
4767
- readonly skill: string;
4768
- readonly name: string;
4769
- readonly text: string;
4770
- } | {
4771
- readonly id: string;
4772
- readonly metadata?: {
4773
- readonly [x: string]: JsonValue;
4774
- };
4775
- readonly time: {
4776
- readonly created: number;
4777
- readonly completed?: number;
4778
- };
4779
- readonly type: "shell";
4780
- readonly shellID: string;
4781
- readonly command: string;
4782
- readonly status: "running" | "exited" | "timeout" | "killed";
4783
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
4784
- readonly output?: {
4785
- readonly output: string;
4786
- readonly cursor: number;
4787
- readonly size: number;
4788
- readonly truncated: boolean;
4789
- };
4790
- } | {
4791
- readonly id: string;
4792
- readonly metadata?: {
4793
- readonly [x: string]: JsonValue;
4794
- };
4795
- readonly time: {
4796
- readonly created: number;
4797
- readonly streamed?: number;
4798
- readonly completed?: number;
4799
- };
4800
- readonly type: "assistant";
4801
- readonly agent: string;
4802
- readonly model: {
4803
- readonly id: string;
4804
- readonly providerID: string;
4805
- readonly variant?: string;
4806
- };
4807
- readonly content: ReadonlyArray<{
4808
- readonly type: "text";
4809
- readonly text: string;
4810
- readonly state?: {
4811
- readonly [x: string]: JsonValue;
4812
- };
4813
- } | {
4814
- readonly type: "reasoning";
4815
- readonly text: string;
4816
- readonly state?: {
4817
- readonly [x: string]: JsonValue;
4818
- };
4819
- readonly time?: {
4820
- readonly created: number;
4821
- readonly completed?: number;
4822
- };
4823
- } | {
4824
- readonly type: "tool";
4825
- readonly id: string;
4826
- readonly name: string;
4827
- readonly executed?: boolean;
4828
- readonly providerState?: {
4829
- readonly [x: string]: JsonValue;
4830
- };
4831
- readonly providerResultState?: {
4832
- readonly [x: string]: JsonValue;
4833
- };
4834
- readonly state: {
4835
- readonly status: "streaming";
4836
- readonly input: string;
4837
- } | {
4838
- readonly status: "running";
4839
- readonly input: {
4840
- readonly [x: string]: JsonValue;
4841
- };
4842
- readonly metadata: {
4843
- readonly [x: string]: JsonValue;
4844
- };
4845
- } | {
4846
- readonly status: "completed";
4847
- readonly input: {
4848
- readonly [x: string]: JsonValue;
4849
- };
4850
- readonly content: readonly [
4851
- ({
4852
- readonly type: "text";
4853
- readonly text: string;
4854
- } | {
4855
- readonly type: "file";
4856
- readonly uri: string;
4857
- readonly mime: string;
4858
- readonly name?: string | null;
4859
- }),
4860
- ...Array<{
4861
- readonly type: "text";
4862
- readonly text: string;
4863
- } | {
4864
- readonly type: "file";
4865
- readonly uri: string;
4866
- readonly mime: string;
4867
- readonly name?: string | null;
4868
- }>
4869
- ];
4870
- readonly metadata?: {
4871
- readonly [x: string]: JsonValue;
4872
- };
4873
- } | {
4874
- readonly status: "error";
4875
- readonly input: {
4876
- readonly [x: string]: JsonValue;
4877
- };
4878
- readonly error: {
4879
- readonly type: string;
4880
- readonly message: string;
4881
- readonly status?: number;
4882
- readonly response?: {
4883
- readonly body: string;
4884
- };
4885
- };
4886
- readonly content?: readonly [
4887
- ({
4888
- readonly type: "text";
4889
- readonly text: string;
4890
- } | {
4891
- readonly type: "file";
4892
- readonly uri: string;
4893
- readonly mime: string;
4894
- readonly name?: string | null;
4895
- }),
4896
- ...Array<{
4897
- readonly type: "text";
4898
- readonly text: string;
4899
- } | {
4900
- readonly type: "file";
4901
- readonly uri: string;
4902
- readonly mime: string;
4903
- readonly name?: string | null;
4904
- }>
4905
- ];
4906
- readonly metadata?: {
4907
- readonly [x: string]: JsonValue;
4908
- };
4909
- };
4910
- readonly time: {
4911
- readonly created: number;
4912
- readonly ran?: number;
4913
- readonly completed?: number;
4914
- };
4915
- }>;
4916
- readonly snapshot?: {
4917
- readonly start?: string;
4918
- readonly end?: string;
4919
- readonly files?: ReadonlyArray<string>;
4920
- };
4921
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4922
- readonly rawFinish?: string;
4923
- readonly providerState?: {
4924
- readonly [x: string]: JsonValue;
4925
- };
4926
- readonly cost?: number;
4927
- readonly tokens?: {
4928
- readonly input: number;
4929
- readonly output: number;
4930
- readonly reasoning: number;
4931
- readonly cache: {
4932
- readonly read: number;
4933
- readonly write: number;
4934
- };
4935
- };
4936
- readonly error?: {
4937
- readonly type: string;
4938
- readonly message: string;
4939
- readonly status?: number;
4940
- readonly response?: {
4941
- readonly body: string;
4942
- };
4943
- };
4944
- readonly retry?: {
4945
- readonly attempt: number;
4946
- readonly at: number;
4947
- readonly error: {
4948
- readonly type: string;
4949
- readonly message: string;
4950
- readonly status?: number;
4951
- readonly response?: {
4952
- readonly body: string;
4953
- };
4954
- };
4955
- };
4956
- } | ({
4957
- readonly type: "compaction";
4958
- readonly id: string;
4959
- readonly metadata?: {
4960
- readonly [x: string]: JsonValue;
4961
- };
4962
- readonly time: {
4963
- readonly created: number;
4964
- };
4965
- readonly status: "running";
4966
- readonly reason: "auto" | "manual";
4967
- readonly summary: string;
4968
- readonly recent: string;
4969
- } | {
4970
- readonly type: "compaction";
4971
- readonly id: string;
4972
- readonly metadata?: {
4973
- readonly [x: string]: JsonValue;
4974
- };
4975
- readonly time: {
4976
- readonly created: number;
4977
- };
4978
- readonly status: "completed";
4979
- readonly reason: "auto" | "manual";
4980
- readonly model?: {
4981
- readonly id: string;
4982
- readonly providerID: string;
4983
- readonly variant?: string;
4984
- };
4985
- readonly providerState?: {
4986
- readonly [x: string]: JsonValue;
4987
- };
4988
- readonly summary: string;
4989
- readonly recent: string;
4990
- readonly providerContext?: {
4991
- readonly version: 1;
4992
- readonly provenance: {
4993
- readonly providerID: string;
4994
- readonly provider: string;
4995
- readonly modelID: string;
4996
- readonly route: string;
4997
- readonly protocol: string;
4998
- readonly endpoint: string;
4999
- };
5000
- readonly messages: JsonValue;
5001
- };
5002
- readonly cost?: number;
5003
- readonly tokens?: {
5004
- readonly input: number;
5005
- readonly output: number;
5006
- readonly reasoning: number;
5007
- readonly cache: {
5008
- readonly read: number;
5009
- readonly write: number;
5010
- };
5011
- };
5012
- } | {
5013
- readonly type: "compaction";
5014
- readonly id: string;
5015
- readonly metadata?: {
5016
- readonly [x: string]: JsonValue;
5017
- };
5018
- readonly time: {
5019
- readonly created: number;
5020
- };
5021
- readonly status: "failed";
5022
- readonly reason: "auto" | "manual";
5023
- readonly error: {
5024
- readonly type: string;
5025
- readonly message: string;
5026
- readonly status?: number;
5027
- readonly response?: {
5028
- readonly body: string;
5029
- };
5030
- };
5031
- readonly cost?: number;
5032
- readonly tokens?: {
5033
- readonly input: number;
5034
- readonly output: number;
5035
- readonly reasoning: number;
5036
- readonly cache: {
5037
- readonly read: number;
5038
- readonly write: number;
5039
- };
5040
- };
5041
- }) | {
5042
- readonly id: string;
5043
- readonly metadata?: {
5044
- readonly [x: string]: JsonValue;
5045
- };
5046
- readonly time: {
5047
- readonly created: number;
5048
- };
5049
- readonly type: "idle";
5050
- readonly outcome: "succeeded" | "failed" | "interrupted";
5051
- readonly error?: {
5052
- readonly type: string;
5053
- readonly message: string;
5054
- readonly status?: number;
5055
- readonly response?: {
5056
- readonly body: string;
5057
- };
5058
- };
5059
- }>;
5060
- readonly location?: {
5061
- readonly directory: string;
5062
- } | null;
5063
- }["messages"];
5064
- readonly location?: {
5065
- readonly info: {
5066
- readonly id: string;
5067
- readonly parentID?: string;
5068
- readonly fork?: {
5069
- readonly sessionID: string;
5070
- readonly boundary: {
5071
- readonly type: "before";
5072
- readonly messageID: string;
5073
- } | {
5074
- readonly type: "through";
5075
- readonly messageID: string;
5076
- };
5077
- };
5078
- readonly projectID: string;
5079
- readonly agent?: string;
5080
- readonly model?: {
5081
- readonly id: string;
5082
- readonly providerID: string;
5083
- readonly variant?: string;
5084
- };
5085
- readonly cost: number;
5086
- readonly tokens: {
5087
- readonly input: number;
5088
- readonly output: number;
5089
- readonly reasoning: number;
5090
- readonly cache: {
5091
- readonly read: number;
5092
- readonly write: number;
5093
- };
5094
- };
5095
- readonly outcome?: "succeeded" | "failed" | "interrupted";
5096
- readonly time: {
5097
- readonly created: number;
5098
- readonly updated: number;
5099
- readonly idle?: number;
5100
- readonly viewed?: number;
5101
- readonly archived?: number;
5102
- };
5103
- readonly title?: string;
4256
+ readonly title?: string;
5104
4257
  readonly subpath?: string;
5105
4258
  readonly metadata?: {
5106
4259
  readonly [x: string]: JsonValue;
@@ -5110,386 +4263,50 @@ export type SessionImportInput = {
5110
4263
  readonly resource: string;
5111
4264
  readonly effect: "allow" | "deny" | "ask";
5112
4265
  }>;
5113
- readonly revert?: {
5114
- readonly messageID: string;
5115
- readonly partID?: string;
5116
- readonly snapshot?: string;
5117
- readonly files?: ReadonlyArray<{
5118
- readonly file: string;
5119
- readonly patch: string;
5120
- readonly additions: number;
5121
- readonly deletions: number;
5122
- readonly status: "added" | "deleted" | "modified";
5123
- }>;
5124
- };
5125
- readonly location: {
5126
- readonly directory: string;
5127
- };
5128
- };
5129
- readonly messages: ReadonlyArray<{
5130
- readonly id: string;
5131
- readonly metadata?: {
5132
- readonly [x: string]: JsonValue;
5133
- };
5134
- readonly time: {
5135
- readonly created: number;
5136
- };
5137
- readonly type: "agent-switched";
5138
- readonly agent: string;
5139
- readonly previous?: string;
5140
- } | {
5141
- readonly id: string;
5142
- readonly metadata?: {
5143
- readonly [x: string]: JsonValue;
5144
- };
5145
- readonly time: {
5146
- readonly created: number;
5147
- };
5148
- readonly type: "model-switched";
5149
- readonly model: {
5150
- readonly id: string;
5151
- readonly providerID: string;
5152
- readonly variant?: string;
5153
- };
5154
- readonly previous?: {
5155
- readonly id: string;
5156
- readonly providerID: string;
5157
- readonly variant?: string;
5158
- };
5159
- } | {
5160
- readonly id: string;
5161
- readonly metadata?: {
5162
- readonly [x: string]: JsonValue;
5163
- };
5164
- readonly time: {
5165
- readonly created: number;
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
+ }>;
5166
4277
  };
5167
- readonly type: "location-switched";
5168
- readonly projectID?: string;
5169
- readonly subpath?: string;
5170
4278
  readonly location: {
5171
4279
  readonly directory: string;
5172
4280
  };
5173
- readonly previous?: {
5174
- readonly location: {
5175
- readonly directory: string;
5176
- };
5177
- readonly projectID?: string;
5178
- readonly subpath?: string;
5179
- } | null;
5180
- } | {
5181
- readonly id: string;
5182
- readonly metadata?: {
5183
- readonly [x: string]: JsonValue;
5184
- };
5185
- readonly time: {
5186
- readonly created: number;
5187
- };
5188
- readonly text: string;
5189
- readonly files?: ReadonlyArray<{
5190
- readonly data: string;
5191
- readonly mime: string;
5192
- readonly source: {
5193
- readonly type: "inline";
5194
- } | {
5195
- readonly type: "uri";
5196
- readonly uri: string;
5197
- };
5198
- readonly name?: string;
5199
- readonly description?: string;
5200
- readonly mention?: {
5201
- readonly start: number;
5202
- readonly end: number;
5203
- readonly text: string;
5204
- };
5205
- }>;
5206
- readonly agents?: ReadonlyArray<{
5207
- readonly name: string;
5208
- readonly mention?: {
5209
- readonly start: number;
5210
- readonly end: number;
5211
- readonly text: string;
5212
- };
5213
- }>;
5214
- readonly skills?: ReadonlyArray<{
5215
- readonly id: string;
5216
- readonly name: string;
5217
- readonly text?: string;
5218
- readonly mention?: {
5219
- readonly start: number;
5220
- readonly end: number;
5221
- readonly text: string;
5222
- };
5223
- }>;
5224
- readonly type: "user";
5225
- } | {
5226
- readonly id: string;
5227
- readonly metadata?: {
5228
- readonly [x: string]: JsonValue;
5229
- };
5230
- readonly time: {
5231
- readonly created: number;
5232
- };
5233
- readonly text: string;
5234
- readonly description?: string;
5235
- readonly type: "synthetic";
5236
- } | {
5237
- readonly id: string;
5238
- readonly metadata?: {
5239
- readonly [x: string]: JsonValue;
5240
- };
5241
- readonly time: {
5242
- readonly created: number;
5243
- };
5244
- readonly type: "system";
5245
- readonly text: string;
5246
- readonly description?: string;
5247
- } | {
5248
- readonly id: string;
5249
- readonly metadata?: {
5250
- readonly [x: string]: JsonValue;
5251
- };
5252
- readonly time: {
5253
- readonly created: number;
5254
- };
5255
- readonly type: "skill";
5256
- readonly skill: string;
5257
- readonly name: string;
5258
- readonly text: string;
5259
- } | {
5260
- readonly id: string;
5261
- readonly metadata?: {
5262
- readonly [x: string]: JsonValue;
5263
- };
5264
- readonly time: {
5265
- readonly created: number;
5266
- readonly completed?: number;
5267
- };
5268
- readonly type: "shell";
5269
- readonly shellID: string;
5270
- readonly command: string;
5271
- readonly status: "running" | "exited" | "timeout" | "killed";
5272
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
5273
- readonly output?: {
5274
- readonly output: string;
5275
- readonly cursor: number;
5276
- readonly size: number;
5277
- readonly truncated: boolean;
5278
- };
5279
- } | {
4281
+ };
4282
+ readonly messages: ReadonlyArray<JsonValue>;
4283
+ readonly location?: {
4284
+ readonly directory: string;
4285
+ } | null;
4286
+ }["messages"];
4287
+ readonly location?: {
4288
+ readonly info: {
5280
4289
  readonly id: string;
5281
- readonly metadata?: {
5282
- readonly [x: string]: JsonValue;
5283
- };
5284
- readonly time: {
5285
- readonly created: number;
5286
- readonly streamed?: number;
5287
- readonly completed?: number;
5288
- };
5289
- readonly type: "assistant";
5290
- readonly agent: string;
5291
- readonly model: {
5292
- readonly id: string;
5293
- readonly providerID: string;
5294
- readonly variant?: string;
5295
- };
5296
- readonly content: ReadonlyArray<{
5297
- readonly type: "text";
5298
- readonly text: string;
5299
- readonly state?: {
5300
- readonly [x: string]: JsonValue;
5301
- };
5302
- } | {
5303
- readonly type: "reasoning";
5304
- readonly text: string;
5305
- readonly state?: {
5306
- readonly [x: string]: JsonValue;
5307
- };
5308
- readonly time?: {
5309
- readonly created: number;
5310
- readonly completed?: number;
5311
- };
5312
- } | {
5313
- readonly type: "tool";
5314
- readonly id: string;
5315
- readonly name: string;
5316
- readonly executed?: boolean;
5317
- readonly providerState?: {
5318
- readonly [x: string]: JsonValue;
5319
- };
5320
- readonly providerResultState?: {
5321
- readonly [x: string]: JsonValue;
5322
- };
5323
- readonly state: {
5324
- readonly status: "streaming";
5325
- readonly input: string;
5326
- } | {
5327
- readonly status: "running";
5328
- readonly input: {
5329
- readonly [x: string]: JsonValue;
5330
- };
5331
- readonly metadata: {
5332
- readonly [x: string]: JsonValue;
5333
- };
5334
- } | {
5335
- readonly status: "completed";
5336
- readonly input: {
5337
- readonly [x: string]: JsonValue;
5338
- };
5339
- readonly content: readonly [
5340
- ({
5341
- readonly type: "text";
5342
- readonly text: string;
5343
- } | {
5344
- readonly type: "file";
5345
- readonly uri: string;
5346
- readonly mime: string;
5347
- readonly name?: string | null;
5348
- }),
5349
- ...Array<{
5350
- readonly type: "text";
5351
- readonly text: string;
5352
- } | {
5353
- readonly type: "file";
5354
- readonly uri: string;
5355
- readonly mime: string;
5356
- readonly name?: string | null;
5357
- }>
5358
- ];
5359
- readonly metadata?: {
5360
- readonly [x: string]: JsonValue;
5361
- };
4290
+ readonly parentID?: string;
4291
+ readonly fork?: {
4292
+ readonly sessionID: string;
4293
+ readonly boundary: {
4294
+ readonly type: "before";
4295
+ readonly messageID: string;
5362
4296
  } | {
5363
- readonly status: "error";
5364
- readonly input: {
5365
- readonly [x: string]: JsonValue;
5366
- };
5367
- readonly error: {
5368
- readonly type: string;
5369
- readonly message: string;
5370
- readonly status?: number;
5371
- readonly response?: {
5372
- readonly body: string;
5373
- };
5374
- };
5375
- readonly content?: readonly [
5376
- ({
5377
- readonly type: "text";
5378
- readonly text: string;
5379
- } | {
5380
- readonly type: "file";
5381
- readonly uri: string;
5382
- readonly mime: string;
5383
- readonly name?: string | null;
5384
- }),
5385
- ...Array<{
5386
- readonly type: "text";
5387
- readonly text: string;
5388
- } | {
5389
- readonly type: "file";
5390
- readonly uri: string;
5391
- readonly mime: string;
5392
- readonly name?: string | null;
5393
- }>
5394
- ];
5395
- readonly metadata?: {
5396
- readonly [x: string]: JsonValue;
5397
- };
5398
- };
5399
- readonly time: {
5400
- readonly created: number;
5401
- readonly ran?: number;
5402
- readonly completed?: number;
5403
- };
5404
- }>;
5405
- readonly snapshot?: {
5406
- readonly start?: string;
5407
- readonly end?: string;
5408
- readonly files?: ReadonlyArray<string>;
5409
- };
5410
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
5411
- readonly rawFinish?: string;
5412
- readonly providerState?: {
5413
- readonly [x: string]: JsonValue;
5414
- };
5415
- readonly cost?: number;
5416
- readonly tokens?: {
5417
- readonly input: number;
5418
- readonly output: number;
5419
- readonly reasoning: number;
5420
- readonly cache: {
5421
- readonly read: number;
5422
- readonly write: number;
5423
- };
5424
- };
5425
- readonly error?: {
5426
- readonly type: string;
5427
- readonly message: string;
5428
- readonly status?: number;
5429
- readonly response?: {
5430
- readonly body: string;
5431
- };
5432
- };
5433
- readonly retry?: {
5434
- readonly attempt: number;
5435
- readonly at: number;
5436
- readonly error: {
5437
- readonly type: string;
5438
- readonly message: string;
5439
- readonly status?: number;
5440
- readonly response?: {
5441
- readonly body: string;
5442
- };
4297
+ readonly type: "through";
4298
+ readonly messageID: string;
5443
4299
  };
5444
4300
  };
5445
- } | ({
5446
- readonly type: "compaction";
5447
- readonly id: string;
5448
- readonly metadata?: {
5449
- readonly [x: string]: JsonValue;
5450
- };
5451
- readonly time: {
5452
- readonly created: number;
5453
- };
5454
- readonly status: "running";
5455
- readonly reason: "auto" | "manual";
5456
- readonly summary: string;
5457
- readonly recent: string;
5458
- } | {
5459
- readonly type: "compaction";
5460
- readonly id: string;
5461
- readonly metadata?: {
5462
- readonly [x: string]: JsonValue;
5463
- };
5464
- readonly time: {
5465
- readonly created: number;
5466
- };
5467
- readonly status: "completed";
5468
- readonly reason: "auto" | "manual";
4301
+ readonly projectID: string;
4302
+ readonly agent?: string;
5469
4303
  readonly model?: {
5470
4304
  readonly id: string;
5471
4305
  readonly providerID: string;
5472
4306
  readonly variant?: string;
5473
4307
  };
5474
- readonly providerState?: {
5475
- readonly [x: string]: JsonValue;
5476
- };
5477
- readonly summary: string;
5478
- readonly recent: string;
5479
- readonly providerContext?: {
5480
- readonly version: 1;
5481
- readonly provenance: {
5482
- readonly providerID: string;
5483
- readonly provider: string;
5484
- readonly modelID: string;
5485
- readonly route: string;
5486
- readonly protocol: string;
5487
- readonly endpoint: string;
5488
- };
5489
- readonly messages: JsonValue;
5490
- };
5491
- readonly cost?: number;
5492
- readonly tokens?: {
4308
+ readonly cost: number;
4309
+ readonly tokens: {
5493
4310
  readonly input: number;
5494
4311
  readonly output: number;
5495
4312
  readonly reasoning: number;
@@ -5498,54 +4315,41 @@ export type SessionImportInput = {
5498
4315
  readonly write: number;
5499
4316
  };
5500
4317
  };
5501
- } | {
5502
- readonly type: "compaction";
5503
- readonly id: string;
5504
- readonly metadata?: {
5505
- readonly [x: string]: JsonValue;
5506
- };
4318
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
5507
4319
  readonly time: {
5508
4320
  readonly created: number;
4321
+ readonly updated: number;
4322
+ readonly idle?: number;
4323
+ readonly viewed?: number;
4324
+ readonly archived?: number;
5509
4325
  };
5510
- readonly status: "failed";
5511
- readonly reason: "auto" | "manual";
5512
- readonly error: {
5513
- readonly type: string;
5514
- readonly message: string;
5515
- readonly status?: number;
5516
- readonly response?: {
5517
- readonly body: string;
5518
- };
5519
- };
5520
- readonly cost?: number;
5521
- readonly tokens?: {
5522
- readonly input: number;
5523
- readonly output: number;
5524
- readonly reasoning: number;
5525
- readonly cache: {
5526
- readonly read: number;
5527
- readonly write: number;
5528
- };
5529
- };
5530
- }) | {
5531
- readonly id: string;
4326
+ readonly title?: string;
4327
+ readonly subpath?: string;
5532
4328
  readonly metadata?: {
5533
4329
  readonly [x: string]: JsonValue;
5534
4330
  };
5535
- readonly time: {
5536
- 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
+ }>;
5537
4347
  };
5538
- readonly type: "idle";
5539
- readonly outcome: "succeeded" | "failed" | "interrupted";
5540
- readonly error?: {
5541
- readonly type: string;
5542
- readonly message: string;
5543
- readonly status?: number;
5544
- readonly response?: {
5545
- readonly body: string;
5546
- };
4348
+ readonly location: {
4349
+ readonly directory: string;
5547
4350
  };
5548
- }>;
4351
+ };
4352
+ readonly messages: ReadonlyArray<JsonValue>;
5549
4353
  readonly location?: {
5550
4354
  readonly directory: string;
5551
4355
  } | null;
@@ -5631,6 +4435,7 @@ export type SessionUpdateInput = {
5631
4435
  readonly resource: string;
5632
4436
  readonly effect: "allow" | "deny" | "ask";
5633
4437
  }> | undefined;
4438
+ readonly archived?: boolean | undefined;
5634
4439
  }["title"];
5635
4440
  readonly metadata?: {
5636
4441
  readonly title?: string | undefined;
@@ -5642,6 +4447,7 @@ export type SessionUpdateInput = {
5642
4447
  readonly resource: string;
5643
4448
  readonly effect: "allow" | "deny" | "ask";
5644
4449
  }> | undefined;
4450
+ readonly archived?: boolean | undefined;
5645
4451
  }["metadata"];
5646
4452
  readonly permissions?: {
5647
4453
  readonly title?: string | undefined;
@@ -5653,7 +4459,20 @@ export type SessionUpdateInput = {
5653
4459
  readonly resource: string;
5654
4460
  readonly effect: "allow" | "deny" | "ask";
5655
4461
  }> | undefined;
4462
+ readonly archived?: boolean | undefined;
5656
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"];
5657
4476
  };
5658
4477
  export type SessionUpdateOutput = void;
5659
4478
  export type SessionMoveInput = {
@@ -7406,6 +6225,7 @@ export type GenerateTextInput = {
7406
6225
  }["model"];
7407
6226
  };
7408
6227
  export type GenerateTextOutput = GenerateTextResponse["data"];
6228
+ export type VoiceModelsOutput = VoiceModelsResponse["data"];
7409
6229
  export type VoiceSessionInput = {
7410
6230
  readonly model: {
7411
6231
  readonly model: string;
@@ -7448,6 +6268,15 @@ export type VoiceSessionInput = {
7448
6268
  }["transport"];
7449
6269
  };
7450
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;
7451
6280
  export type ProviderListInput = {
7452
6281
  readonly location?: {
7453
6282
  readonly location?: {
@@ -7825,6 +6654,27 @@ export type McpResourceCatalogOutput = {
7825
6654
  location: LocationPublicRef;
7826
6655
  data: McpResourceCatalog;
7827
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
+ };
7828
6678
  export type CredentialListOutput = {
7829
6679
  data: Array<CredentialEntry>;
7830
6680
  }["data"];
@@ -7848,9 +6698,6 @@ export type CredentialCreateInput = {
7848
6698
  readonly metadata?: {
7849
6699
  readonly [x: string]: JsonValue;
7850
6700
  };
7851
- readonly configuration?: {
7852
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7853
- };
7854
6701
  } | {
7855
6702
  readonly type: "external";
7856
6703
  readonly methodID: string;
@@ -7879,9 +6726,6 @@ export type CredentialCreateInput = {
7879
6726
  readonly metadata?: {
7880
6727
  readonly [x: string]: JsonValue;
7881
6728
  };
7882
- readonly configuration?: {
7883
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7884
- };
7885
6729
  } | {
7886
6730
  readonly type: "external";
7887
6731
  readonly methodID: string;
@@ -7910,9 +6754,6 @@ export type CredentialCreateInput = {
7910
6754
  readonly metadata?: {
7911
6755
  readonly [x: string]: JsonValue;
7912
6756
  };
7913
- readonly configuration?: {
7914
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7915
- };
7916
6757
  } | {
7917
6758
  readonly type: "external";
7918
6759
  readonly methodID: string;
@@ -7941,9 +6782,6 @@ export type CredentialCreateInput = {
7941
6782
  readonly metadata?: {
7942
6783
  readonly [x: string]: JsonValue;
7943
6784
  };
7944
- readonly configuration?: {
7945
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7946
- };
7947
6785
  } | {
7948
6786
  readonly type: "external";
7949
6787
  readonly methodID: string;
@@ -7972,9 +6810,6 @@ export type CredentialCreateInput = {
7972
6810
  readonly metadata?: {
7973
6811
  readonly [x: string]: JsonValue;
7974
6812
  };
7975
- readonly configuration?: {
7976
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7977
- };
7978
6813
  } | {
7979
6814
  readonly type: "external";
7980
6815
  readonly methodID: string;
@@ -8099,6 +6934,22 @@ export type PermissionSavedListInput = {
8099
6934
  export type PermissionSavedListOutput = {
8100
6935
  data: Array<PermissionSavedInfo>;
8101
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"];
8102
6953
  export type PermissionSavedRemoveInput = {
8103
6954
  readonly id: {
8104
6955
  readonly id: string;
@@ -8994,6 +7845,22 @@ export type VcsDiffOutput = {
8994
7845
  location: LocationPublicRef;
8995
7846
  data: Array<FileDiffInfo>;
8996
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
+ };
8997
7864
  export type DebugLocationListOutput = Array<LocationPublicRef>;
8998
7865
  export type DebugLocationEvictInput = {
8999
7866
  readonly location?: {