@opencode/client 2.0.31 → 2.1.0

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.
Files changed (64) hide show
  1. package/dist/chunks/{contract-2ny4vxct.js → rpc-runtime-2ny4vxct.js} +2 -2
  2. package/dist/chunks/{contract-csw6v8a4.js → rpc-runtime-3d7b8k62.js} +4 -4
  3. package/dist/chunks/{contract-m77rqa4a.js → rpc-runtime-61wt4y9h.js} +22 -17
  4. package/dist/chunks/{contract-1y4a697q.js → rpc-runtime-6vp15eh6.js} +1 -1
  5. package/dist/chunks/{contract-j4tgja9b.js → rpc-runtime-91bd4p6h.js} +1 -1
  6. package/dist/chunks/{contract-vt9jbch8.js → rpc-runtime-ezt8t3fk.js} +2 -1
  7. package/dist/chunks/{contract-frbwqjmf.js → rpc-runtime-frbwqjmf.js} +1 -1
  8. package/dist/chunks/{contract-qfk0hgz0.js → rpc-runtime-nv358xrg.js} +27 -3
  9. package/dist/chunks/{contract-9swsjjg0.js → rpc-runtime-q4y9w4td.js} +24 -5
  10. package/dist/chunks/{contract-t1xa31vm.js → rpc-runtime-t1xa31vm.js} +1 -1
  11. package/dist/chunks/{contract-4yh01835.js → rpc-runtime-tjkwftgd.js} +5 -5
  12. package/dist/chunks/{contract-w1w809zr.js → rpc-runtime-w1w809zr.js} +2 -2
  13. package/dist/contract.js +1 -1
  14. package/dist/effect/api/api.d.ts +91 -29
  15. package/dist/effect/client.d.ts +1389 -1361
  16. package/dist/effect/client.js +8 -8
  17. package/dist/effect/generated/client-error.js +1 -1
  18. package/dist/effect/generated/client.d.ts +1279 -1251
  19. package/dist/effect/generated/client.js +3 -3
  20. package/dist/effect/generated/index.js +4 -4
  21. package/dist/effect/index.js +8 -8
  22. package/dist/effect/rpc.js +2 -2
  23. package/dist/effect/service.js +6 -6
  24. package/dist/promise/client.d.ts +13 -7
  25. package/dist/promise/client.js +7 -7
  26. package/dist/promise/generated/client-error.js +1 -1
  27. package/dist/promise/generated/client.d.ts +8 -2
  28. package/dist/promise/generated/client.js +2 -2
  29. package/dist/promise/generated/index.js +6 -4
  30. package/dist/promise/generated/types.d.ts +286 -1429
  31. package/dist/promise/generated/types.js +3 -1
  32. package/dist/promise/index.js +10 -8
  33. package/dist/promise/rpc.js +2 -2
  34. package/dist/promise/service.js +6 -6
  35. package/dist/pty-handoff.js +1 -1
  36. package/dist/rpc-runtime.d.ts +5 -5
  37. package/dist/rpc-runtime.js +1 -1
  38. package/dist/service-contender.js +1 -1
  39. package/dist/service-probe.d.ts +5 -5
  40. package/dist/service-probe.js +3 -3
  41. package/dist/service-timing.js +1 -1
  42. package/dist/service-version.js +1 -1
  43. package/dist/service.js +1 -1
  44. package/dist/shared-events.js +1 -1
  45. package/dist/solid/connection.js +1 -1
  46. package/dist/solid/data.js +9 -9
  47. package/dist/solid/index.js +12 -12
  48. package/dist/solid/pty.js +1 -1
  49. package/dist/solid/usage.js +1 -1
  50. package/package.json +6 -6
  51. /package/dist/chunks/{contract-6mptkzbc.js → rpc-runtime-6mptkzbc.js} +0 -0
  52. /package/dist/chunks/{contract-7f0py9js.js → rpc-runtime-7f0py9js.js} +0 -0
  53. /package/dist/chunks/{contract-8s2anffy.js → rpc-runtime-8s2anffy.js} +0 -0
  54. /package/dist/chunks/{contract-9rqn6x4v.js → rpc-runtime-9rqn6x4v.js} +0 -0
  55. /package/dist/chunks/{contract-gne7h7mq.js → rpc-runtime-gne7h7mq.js} +0 -0
  56. /package/dist/chunks/{contract-js54wxgp.js → rpc-runtime-js54wxgp.js} +0 -0
  57. /package/dist/chunks/{contract-m2eywc8w.js → rpc-runtime-m2eywc8w.js} +0 -0
  58. /package/dist/chunks/{contract-qav6mfdz.js → rpc-runtime-qav6mfdz.js} +0 -0
  59. /package/dist/chunks/{contract-sxt88q69.js → rpc-runtime-sxt88q69.js} +0 -0
  60. /package/dist/chunks/{contract-ve4aws36.js → rpc-runtime-ve4aws36.js} +0 -0
  61. /package/dist/chunks/{contract-vmytr4q8.js → rpc-runtime-vmytr4q8.js} +0 -0
  62. /package/dist/chunks/{contract-vyas3vgt.js → rpc-runtime-vyas3vgt.js} +0 -0
  63. /package/dist/chunks/{contract-xgnj2w4v.js → rpc-runtime-xgnj2w4v.js} +0 -0
  64. /package/dist/chunks/{contract-ydhz1zrh.js → rpc-runtime-ydhz1zrh.js} +0 -0
@@ -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 = {
@@ -180,7 +180,7 @@ export type SessionInboxSyntheticPayload1 = {
180
180
  [x: string]: any;
181
181
  };
182
182
  };
183
- export type SessionMessageProviderState1 = {
183
+ export type SessionMessageNative1 = {
184
184
  [x: string]: any;
185
185
  };
186
186
  export type ToolFileContent1 = {
@@ -238,6 +238,16 @@ export type GenerateTextResponse = {
238
238
  text: string;
239
239
  };
240
240
  };
241
+ export type VoiceWebRTCTransport = {
242
+ type: "webrtc";
243
+ sdp: string;
244
+ };
245
+ export type VoiceWebSocketTransport = {
246
+ type: "websocket";
247
+ url: string;
248
+ token: string;
249
+ expiresAt: number;
250
+ };
241
251
  export type IntegrationID = string;
242
252
  export type IntegrationMethodID = string;
243
253
  export type IntegrationEnvMethod = {
@@ -335,6 +345,13 @@ export type McpResourceTemplate = {
335
345
  description?: string;
336
346
  mimeType?: string;
337
347
  };
348
+ export type CredentialKey = {
349
+ type: "key";
350
+ key: string;
351
+ metadata?: {
352
+ [x: string]: JsonValue;
353
+ };
354
+ };
338
355
  export type ProjectVcs = string;
339
356
  export type ProjectIcon = {
340
357
  url?: string;
@@ -483,14 +500,6 @@ export type ModelRef = {
483
500
  providerID: ProviderID;
484
501
  variant?: string;
485
502
  };
486
- export type SessionProviderContextProvenance = {
487
- providerID: ProviderID;
488
- provider: string;
489
- modelID: string;
490
- route: string;
491
- protocol: string;
492
- endpoint: string;
493
- };
494
503
  export type ProviderSettings = {
495
504
  timeout?: number | false;
496
505
  headerTimeout?: number | false;
@@ -589,7 +598,6 @@ export type SessionMessageCompactionRunning = {
589
598
  status: "running";
590
599
  reason: "auto" | "manual";
591
600
  summary: string;
592
- recent: string;
593
601
  };
594
602
  export type FileSystemEntry = {
595
603
  path: RelativePath;
@@ -710,12 +718,12 @@ export type ShellInfo1 = {
710
718
  export type SessionMessageAssistantText = {
711
719
  type: "text";
712
720
  text: string;
713
- state?: SessionMessageProviderState;
721
+ native?: SessionMessageNative;
714
722
  };
715
723
  export type SessionMessageAssistantReasoning = {
716
724
  type: "reasoning";
717
725
  text: string;
718
- state?: SessionMessageProviderState;
726
+ native?: SessionMessageNative;
719
727
  time?: {
720
728
  created: number;
721
729
  completed?: number;
@@ -795,12 +803,12 @@ export type LocationRef = {
795
803
  export type SessionMessageAssistantText1 = {
796
804
  type: "text";
797
805
  text: string;
798
- state?: SessionMessageProviderState1;
806
+ native?: SessionMessageNative1;
799
807
  };
800
808
  export type SessionMessageAssistantReasoning1 = {
801
809
  type: "reasoning";
802
810
  text: string;
803
- state?: SessionMessageProviderState1;
811
+ native?: SessionMessageNative1;
804
812
  time?: {
805
813
  created: number;
806
814
  completed?: number;
@@ -882,6 +890,7 @@ export type ModelCompatibility = {
882
890
  requireFinishReason?: boolean;
883
891
  requireAssistantAfterTool?: boolean;
884
892
  supportsPromptCacheKey?: boolean;
893
+ streamUsage?: boolean;
885
894
  cacheFormat?: ModelCacheFormat;
886
895
  supportsThinkingBlockBinding?: boolean;
887
896
  supportsEffortUpdates?: boolean;
@@ -893,6 +902,7 @@ export type ProviderCompatibility = {
893
902
  requireFinishReason?: boolean;
894
903
  requireAssistantAfterTool?: boolean;
895
904
  supportsPromptCacheKey?: boolean;
905
+ streamUsage?: boolean;
896
906
  cacheFormat?: ModelCacheFormat;
897
907
  };
898
908
  export type ModelCost = {
@@ -907,6 +917,7 @@ export type ModelCost = {
907
917
  write: MoneyUSDPerMillionTokens;
908
918
  };
909
919
  };
920
+ export type VoiceTransport = VoiceWebRTCTransport | VoiceWebSocketTransport;
910
921
  export type IntegrationCommandMethod = {
911
922
  id: IntegrationMethodID;
912
923
  type: "command";
@@ -1110,7 +1121,7 @@ export type FormMultiselectField1 = {
1110
1121
  custom?: boolean;
1111
1122
  default?: Array<string>;
1112
1123
  };
1113
- export type FormAnswer2 = {
1124
+ export type FormAnswer1 = {
1114
1125
  [x: string]: FormValue1;
1115
1126
  };
1116
1127
  export type VcsInfo = {
@@ -1192,10 +1203,22 @@ export type SessionMessageModelSelected = {
1192
1203
  model: ModelRef;
1193
1204
  previous?: ModelRef;
1194
1205
  };
1195
- export type SessionProviderContext = {
1196
- version: 1;
1197
- provenance: SessionProviderContextProvenance;
1198
- messages: JsonValue;
1206
+ export type SessionMessageCompactionCompleted = {
1207
+ type: "compaction";
1208
+ id: SessionMessageID;
1209
+ metadata?: {
1210
+ [x: string]: JsonValue;
1211
+ };
1212
+ time: {
1213
+ created: number;
1214
+ };
1215
+ status: "completed";
1216
+ reason: "auto" | "manual";
1217
+ model?: ModelRef;
1218
+ native?: SessionMessageNative;
1219
+ summary: string;
1220
+ cost?: MoneyUSD;
1221
+ tokens?: TokenUsageInfo;
1199
1222
  };
1200
1223
  export type ProviderRequest = {
1201
1224
  settings: ProviderSettings;
@@ -1382,6 +1405,40 @@ export type SessionViewed = {
1382
1405
  idle: number;
1383
1406
  };
1384
1407
  };
1408
+ export type SessionArchived = {
1409
+ id: EventID;
1410
+ created: number;
1411
+ metadata?: {
1412
+ [x: string]: any;
1413
+ };
1414
+ type: "session.archived";
1415
+ durable: {
1416
+ aggregateID: string;
1417
+ seq: EventSeq;
1418
+ version: 1;
1419
+ };
1420
+ location?: LocationRef;
1421
+ data: {
1422
+ sessionID: SessionID;
1423
+ };
1424
+ };
1425
+ export type SessionUnarchived = {
1426
+ id: EventID;
1427
+ created: number;
1428
+ metadata?: {
1429
+ [x: string]: any;
1430
+ };
1431
+ type: "session.unarchived";
1432
+ durable: {
1433
+ aggregateID: string;
1434
+ seq: EventSeq;
1435
+ version: 1;
1436
+ };
1437
+ location?: LocationRef;
1438
+ data: {
1439
+ sessionID: SessionID;
1440
+ };
1441
+ };
1385
1442
  export type SessionDeleted = {
1386
1443
  id: EventID;
1387
1444
  created: number;
@@ -1715,7 +1772,7 @@ export type SessionStepEnded = {
1715
1772
  assistantMessageID: SessionMessageID;
1716
1773
  finish: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
1717
1774
  rawFinish?: string;
1718
- providerState?: SessionMessageProviderState1;
1775
+ native?: SessionMessageNative1;
1719
1776
  cost: MoneyUSD;
1720
1777
  tokens: TokenUsageInfo;
1721
1778
  snapshot?: SnapshotID;
@@ -1741,7 +1798,7 @@ export type SessionStepFailed = {
1741
1798
  error: SessionStructuredError;
1742
1799
  finish?: "content-filter";
1743
1800
  rawFinish?: string;
1744
- providerState?: SessionMessageProviderState1;
1801
+ native?: SessionMessageNative1;
1745
1802
  cost?: MoneyUSD;
1746
1803
  tokens?: TokenUsageInfo;
1747
1804
  snapshot?: SnapshotID;
@@ -1785,7 +1842,7 @@ export type SessionTextEnded = {
1785
1842
  assistantMessageID: SessionMessageID;
1786
1843
  ordinal: number;
1787
1844
  text: string;
1788
- state?: SessionMessageProviderState1;
1845
+ native?: SessionMessageNative1;
1789
1846
  };
1790
1847
  };
1791
1848
  export type SessionReasoningStarted = {
@@ -1805,7 +1862,7 @@ export type SessionReasoningStarted = {
1805
1862
  sessionID: SessionID;
1806
1863
  assistantMessageID: SessionMessageID;
1807
1864
  ordinal: number;
1808
- state?: SessionMessageProviderState1;
1865
+ native?: SessionMessageNative1;
1809
1866
  };
1810
1867
  };
1811
1868
  export type SessionReasoningEnded = {
@@ -1826,7 +1883,7 @@ export type SessionReasoningEnded = {
1826
1883
  assistantMessageID: SessionMessageID;
1827
1884
  ordinal: number;
1828
1885
  text: string;
1829
- state?: SessionMessageProviderState1;
1886
+ native?: SessionMessageNative1;
1830
1887
  };
1831
1888
  };
1832
1889
  export type SessionToolInputStarted = {
@@ -1890,7 +1947,7 @@ export type SessionToolCalled = {
1890
1947
  [x: string]: any;
1891
1948
  };
1892
1949
  executed: boolean;
1893
- state?: SessionMessageProviderState1;
1950
+ native?: SessionMessageNative1;
1894
1951
  };
1895
1952
  };
1896
1953
  export type SessionRetryScheduled = {
@@ -1930,10 +1987,32 @@ export type SessionCompactionStarted = {
1930
1987
  data: {
1931
1988
  sessionID: SessionID;
1932
1989
  reason: "auto" | "manual";
1933
- recent: string;
1934
1990
  inputID?: SessionMessageID;
1935
1991
  };
1936
1992
  };
1993
+ export type SessionCompactionEnded = {
1994
+ id: EventID;
1995
+ created: number;
1996
+ metadata?: {
1997
+ [x: string]: any;
1998
+ };
1999
+ type: "session.compaction.ended";
2000
+ durable: {
2001
+ aggregateID: string;
2002
+ seq: EventSeq;
2003
+ version: 1;
2004
+ };
2005
+ location?: LocationRef;
2006
+ data: {
2007
+ sessionID: SessionID;
2008
+ reason: "auto" | "manual";
2009
+ model?: ModelRef;
2010
+ native?: SessionMessageNative1;
2011
+ text: string;
2012
+ cost?: MoneyUSD;
2013
+ tokens?: TokenUsageInfo;
2014
+ };
2015
+ };
1937
2016
  export type SessionCompactionFailed = {
1938
2017
  id: EventID;
1939
2018
  created: number;
@@ -2607,7 +2686,7 @@ export type SessionToolSuccess = {
2607
2686
  [x: string]: JsonValue;
2608
2687
  };
2609
2688
  executed: boolean;
2610
- resultState?: SessionMessageProviderState1;
2689
+ native?: SessionMessageNative1;
2611
2690
  };
2612
2691
  };
2613
2692
  export type SessionToolFailed = {
@@ -2633,7 +2712,7 @@ export type SessionToolFailed = {
2633
2712
  [x: string]: JsonValue;
2634
2713
  };
2635
2714
  executed: boolean;
2636
- resultState?: SessionMessageProviderState1;
2715
+ native?: SessionMessageNative1;
2637
2716
  };
2638
2717
  };
2639
2718
  export type SessionMessageToolStateCompleted1 = {
@@ -2667,14 +2746,6 @@ export type FormState = {
2667
2746
  status: "cancelled";
2668
2747
  message?: string;
2669
2748
  };
2670
- export type CredentialKey = {
2671
- type: "key";
2672
- key: string;
2673
- metadata?: {
2674
- [x: string]: JsonValue;
2675
- };
2676
- configuration?: FormAnswer;
2677
- };
2678
2749
  export type ProviderInfo = {
2679
2750
  id: ProviderID;
2680
2751
  canonical?: ProviderID;
@@ -2691,6 +2762,12 @@ export type ProviderInfo = {
2691
2762
  [x: string]: any;
2692
2763
  };
2693
2764
  };
2765
+ export type VoiceSessionResponse = {
2766
+ data: {
2767
+ transport: VoiceTransport;
2768
+ };
2769
+ };
2770
+ export type CredentialValue = CredentialOAuth | CredentialKey | CredentialExternal;
2694
2771
  export type ConnectionInfo = ConnectionCredentialInfo | ConnectionEnvInfo;
2695
2772
  export type PtyCreated = {
2696
2773
  id: EventID;
@@ -2750,7 +2827,7 @@ export type FormReplied = {
2750
2827
  data: {
2751
2828
  id: FormID;
2752
2829
  sessionID: string;
2753
- answer: FormAnswer2;
2830
+ answer: FormAnswer1;
2754
2831
  };
2755
2832
  };
2756
2833
  export type SessionInboxMove = {
@@ -2787,50 +2864,7 @@ export type SessionStatsInfo = {
2787
2864
  activity: Array<SessionStatsActivity>;
2788
2865
  models: Array<SessionStatsModelUsage>;
2789
2866
  };
2790
- export type SessionMessageCompactionCompleted = {
2791
- type: "compaction";
2792
- id: SessionMessageID;
2793
- metadata?: {
2794
- [x: string]: JsonValue;
2795
- };
2796
- time: {
2797
- created: number;
2798
- };
2799
- status: "completed";
2800
- reason: "auto" | "manual";
2801
- model?: ModelRef;
2802
- providerState?: SessionMessageProviderState;
2803
- summary: string;
2804
- recent: string;
2805
- providerContext?: SessionProviderContext;
2806
- cost?: MoneyUSD;
2807
- tokens?: TokenUsageInfo;
2808
- };
2809
- export type SessionCompactionEnded = {
2810
- id: EventID;
2811
- created: number;
2812
- metadata?: {
2813
- [x: string]: any;
2814
- };
2815
- type: "session.compaction.ended";
2816
- durable: {
2817
- aggregateID: string;
2818
- seq: EventSeq;
2819
- version: 1;
2820
- };
2821
- location?: LocationRef;
2822
- data: {
2823
- sessionID: SessionID;
2824
- reason: "auto" | "manual";
2825
- model?: ModelRef;
2826
- providerState?: SessionMessageProviderState1;
2827
- providerContext?: SessionProviderContext;
2828
- text: string;
2829
- recent: string;
2830
- cost?: MoneyUSD;
2831
- tokens?: TokenUsageInfo;
2832
- };
2833
- };
2867
+ export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
2834
2868
  export type ModelInfo = {
2835
2869
  id: string;
2836
2870
  modelID: string;
@@ -3209,6 +3243,7 @@ export type ConfigEntry = {
3209
3243
  };
3210
3244
  experimental?: {
3211
3245
  portable_shell_scanner?: boolean;
3246
+ todo?: boolean;
3212
3247
  subagent_depth?: number;
3213
3248
  policies?: Array<{
3214
3249
  action: "provider.use" | "tool.use" | "integration.use";
@@ -3236,8 +3271,7 @@ export type SessionMessageAssistantTool = {
3236
3271
  id: string;
3237
3272
  name: string;
3238
3273
  executed?: boolean;
3239
- providerState?: SessionMessageProviderState;
3240
- providerResultState?: SessionMessageProviderState;
3274
+ native?: SessionMessageNative;
3241
3275
  state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning | SessionMessageToolStateCompleted | SessionMessageToolStateError;
3242
3276
  time: {
3243
3277
  created: number;
@@ -3267,8 +3301,7 @@ export type SessionMessageAssistantTool1 = {
3267
3301
  id: string;
3268
3302
  name: string;
3269
3303
  executed?: boolean;
3270
- providerState?: SessionMessageProviderState1;
3271
- providerResultState?: SessionMessageProviderState1;
3304
+ native?: SessionMessageNative1;
3272
3305
  state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning1 | SessionMessageToolStateCompleted1 | SessionMessageToolStateError1;
3273
3306
  time: {
3274
3307
  created: number;
@@ -3277,9 +3310,14 @@ export type SessionMessageAssistantTool1 = {
3277
3310
  };
3278
3311
  };
3279
3312
  export type FormFields = [FormField, ...Array<FormField>];
3280
- export type CredentialValue = CredentialOAuth | CredentialKey | CredentialExternal;
3313
+ export type CredentialEntry = {
3314
+ id: CredentialID;
3315
+ integrationID: IntegrationID;
3316
+ label: string;
3317
+ active: boolean;
3318
+ value: CredentialValue;
3319
+ };
3281
3320
  export type FormFields2 = [FormField1, ...Array<FormField1>];
3282
- export type SessionMessageCompaction = SessionMessageCompactionRunning | SessionMessageCompactionCompleted | SessionMessageCompactionFailed;
3283
3321
  export type SessionsResponse = {
3284
3322
  data: Array<SessionInfo>;
3285
3323
  cursor: {
@@ -3309,7 +3347,7 @@ export type SessionMessageAssistant = {
3309
3347
  };
3310
3348
  finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
3311
3349
  rawFinish?: string;
3312
- providerState?: SessionMessageProviderState;
3350
+ native?: SessionMessageNative;
3313
3351
  cost?: MoneyUSD;
3314
3352
  tokens?: TokenUsageInfo;
3315
3353
  error?: SessionStructuredError;
@@ -3367,13 +3405,6 @@ export type IntegrationExternalMethod = {
3367
3405
  label: string;
3368
3406
  form?: FormFields;
3369
3407
  };
3370
- export type CredentialEntry = {
3371
- id: CredentialID;
3372
- integrationID: IntegrationID;
3373
- label: string;
3374
- active: boolean;
3375
- value: CredentialValue;
3376
- };
3377
3408
  export type FormInfo1 = {
3378
3409
  id: FormID;
3379
3410
  sessionID: string;
@@ -3425,7 +3456,7 @@ export type SessionMessagesResponse = {
3425
3456
  next?: string | null;
3426
3457
  };
3427
3458
  };
3428
- 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 | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded | SessionMessageContentUpdated;
3459
+ 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 | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded | SessionMessageContentUpdated;
3429
3460
  export type IntegrationInfo = {
3430
3461
  id: IntegrationID;
3431
3462
  name: string;
@@ -3435,7 +3466,7 @@ export type IntegrationInfo = {
3435
3466
  methods: Array<IntegrationMethod>;
3436
3467
  connections: Array<ConnectionInfo>;
3437
3468
  };
3438
- 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 | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | 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;
3469
+ 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 | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | 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;
3439
3470
  export type SessionLogItem = SessionEventDurable | EventLogSynced;
3440
3471
  export type InvalidRequestError = {
3441
3472
  readonly _tag: "InvalidRequestError";
@@ -3586,6 +3617,12 @@ export type ProjectNotFoundError = {
3586
3617
  readonly message: string;
3587
3618
  };
3588
3619
  export declare const isProjectNotFoundError: (value: unknown) => value is ProjectNotFoundError;
3620
+ export type PermissionSavedNotFoundError = {
3621
+ readonly _tag: "PermissionSavedNotFoundError";
3622
+ readonly id: string;
3623
+ readonly message: string;
3624
+ };
3625
+ export declare const isPermissionSavedNotFoundError: (value: unknown) => value is PermissionSavedNotFoundError;
3589
3626
  export type PermissionNotFoundError = {
3590
3627
  readonly _tag: "PermissionNotFoundError";
3591
3628
  readonly requestID: string;
@@ -3728,6 +3765,7 @@ export type SessionListInput = {
3728
3765
  readonly order?: "asc" | "desc" | undefined;
3729
3766
  readonly search?: string | undefined;
3730
3767
  readonly parentID?: string | null | undefined;
3768
+ readonly archived?: boolean | undefined;
3731
3769
  readonly directory?: string | undefined;
3732
3770
  readonly project?: string | undefined;
3733
3771
  readonly subpath?: string | undefined;
@@ -3738,6 +3776,7 @@ export type SessionListInput = {
3738
3776
  readonly order?: "asc" | "desc" | undefined;
3739
3777
  readonly search?: string | undefined;
3740
3778
  readonly parentID?: string | null | undefined;
3779
+ readonly archived?: boolean | undefined;
3741
3780
  readonly directory?: string | undefined;
3742
3781
  readonly project?: string | undefined;
3743
3782
  readonly subpath?: string | undefined;
@@ -3748,6 +3787,7 @@ export type SessionListInput = {
3748
3787
  readonly order?: "asc" | "desc" | undefined;
3749
3788
  readonly search?: string | undefined;
3750
3789
  readonly parentID?: string | null | undefined;
3790
+ readonly archived?: boolean | undefined;
3751
3791
  readonly directory?: string | undefined;
3752
3792
  readonly project?: string | undefined;
3753
3793
  readonly subpath?: string | undefined;
@@ -3758,16 +3798,29 @@ export type SessionListInput = {
3758
3798
  readonly order?: "asc" | "desc" | undefined;
3759
3799
  readonly search?: string | undefined;
3760
3800
  readonly parentID?: string | null | undefined;
3801
+ readonly archived?: boolean | undefined;
3761
3802
  readonly directory?: string | undefined;
3762
3803
  readonly project?: string | undefined;
3763
3804
  readonly subpath?: string | undefined;
3764
3805
  readonly cursor?: string | undefined;
3765
3806
  }["parentID"];
3807
+ readonly archived?: {
3808
+ readonly limit?: number | undefined;
3809
+ readonly order?: "asc" | "desc" | undefined;
3810
+ readonly search?: string | undefined;
3811
+ readonly parentID?: string | null | undefined;
3812
+ readonly archived?: boolean | undefined;
3813
+ readonly directory?: string | undefined;
3814
+ readonly project?: string | undefined;
3815
+ readonly subpath?: string | undefined;
3816
+ readonly cursor?: string | undefined;
3817
+ }["archived"];
3766
3818
  readonly directory?: {
3767
3819
  readonly limit?: number | undefined;
3768
3820
  readonly order?: "asc" | "desc" | undefined;
3769
3821
  readonly search?: string | undefined;
3770
3822
  readonly parentID?: string | null | undefined;
3823
+ readonly archived?: boolean | undefined;
3771
3824
  readonly directory?: string | undefined;
3772
3825
  readonly project?: string | undefined;
3773
3826
  readonly subpath?: string | undefined;
@@ -3778,6 +3831,7 @@ export type SessionListInput = {
3778
3831
  readonly order?: "asc" | "desc" | undefined;
3779
3832
  readonly search?: string | undefined;
3780
3833
  readonly parentID?: string | null | undefined;
3834
+ readonly archived?: boolean | undefined;
3781
3835
  readonly directory?: string | undefined;
3782
3836
  readonly project?: string | undefined;
3783
3837
  readonly subpath?: string | undefined;
@@ -3788,6 +3842,7 @@ export type SessionListInput = {
3788
3842
  readonly order?: "asc" | "desc" | undefined;
3789
3843
  readonly search?: string | undefined;
3790
3844
  readonly parentID?: string | null | undefined;
3845
+ readonly archived?: boolean | undefined;
3791
3846
  readonly directory?: string | undefined;
3792
3847
  readonly project?: string | undefined;
3793
3848
  readonly subpath?: string | undefined;
@@ -3798,6 +3853,7 @@ export type SessionListInput = {
3798
3853
  readonly order?: "asc" | "desc" | undefined;
3799
3854
  readonly search?: string | undefined;
3800
3855
  readonly parentID?: string | null | undefined;
3856
+ readonly archived?: boolean | undefined;
3801
3857
  readonly directory?: string | undefined;
3802
3858
  readonly project?: string | undefined;
3803
3859
  readonly subpath?: string | undefined;
@@ -4092,915 +4148,77 @@ export type SessionImportInput = {
4092
4148
  readonly directory: string;
4093
4149
  };
4094
4150
  };
4095
- readonly messages: ReadonlyArray<{
4096
- readonly id: string;
4097
- readonly metadata?: {
4098
- readonly [x: string]: JsonValue;
4099
- };
4100
- readonly time: {
4101
- readonly created: number;
4102
- };
4103
- readonly type: "agent-switched";
4104
- readonly agent: string;
4105
- readonly previous?: string;
4106
- } | {
4151
+ readonly messages: ReadonlyArray<JsonValue>;
4152
+ readonly location?: {
4153
+ readonly directory: string;
4154
+ } | null;
4155
+ }["info"];
4156
+ readonly messages: {
4157
+ readonly info: {
4107
4158
  readonly id: string;
4108
- readonly metadata?: {
4109
- readonly [x: string]: JsonValue;
4110
- };
4111
- readonly time: {
4112
- readonly created: number;
4113
- };
4114
- readonly type: "model-switched";
4115
- readonly model: {
4116
- readonly id: string;
4117
- readonly providerID: string;
4118
- readonly variant?: string;
4159
+ readonly parentID?: string;
4160
+ readonly fork?: {
4161
+ readonly sessionID: string;
4162
+ readonly boundary: {
4163
+ readonly type: "before";
4164
+ readonly messageID: string;
4165
+ } | {
4166
+ readonly type: "through";
4167
+ readonly messageID: string;
4168
+ };
4119
4169
  };
4120
- readonly previous?: {
4170
+ readonly projectID: string;
4171
+ readonly agent?: string;
4172
+ readonly model?: {
4121
4173
  readonly id: string;
4122
4174
  readonly providerID: string;
4123
4175
  readonly variant?: string;
4124
4176
  };
4125
- } | {
4126
- readonly id: string;
4127
- readonly metadata?: {
4128
- readonly [x: string]: JsonValue;
4177
+ readonly cost: number;
4178
+ readonly tokens: {
4179
+ readonly input: number;
4180
+ readonly output: number;
4181
+ readonly reasoning: number;
4182
+ readonly cache: {
4183
+ readonly read: number;
4184
+ readonly write: number;
4185
+ };
4129
4186
  };
4187
+ readonly outcome?: "succeeded" | "failed" | "interrupted";
4130
4188
  readonly time: {
4131
4189
  readonly created: number;
4190
+ readonly updated: number;
4191
+ readonly idle?: number;
4192
+ readonly viewed?: number;
4193
+ readonly archived?: number;
4132
4194
  };
4133
- readonly type: "location-switched";
4134
- readonly projectID?: string;
4195
+ readonly title?: string;
4135
4196
  readonly subpath?: string;
4136
- readonly location: {
4137
- readonly directory: string;
4138
- };
4139
- readonly previous?: {
4140
- readonly location: {
4141
- readonly directory: string;
4142
- };
4143
- readonly projectID?: string;
4144
- readonly subpath?: string;
4145
- } | null;
4146
- } | {
4147
- readonly id: string;
4148
4197
  readonly metadata?: {
4149
4198
  readonly [x: string]: JsonValue;
4150
4199
  };
4151
- readonly time: {
4152
- readonly created: number;
4153
- };
4154
- readonly text: string;
4155
- readonly files?: ReadonlyArray<{
4156
- readonly data: string;
4157
- readonly mime: string;
4158
- readonly source: {
4159
- readonly type: "inline";
4160
- } | {
4161
- readonly type: "uri";
4162
- readonly uri: string;
4163
- };
4164
- readonly name?: string;
4165
- readonly description?: string;
4166
- readonly mention?: {
4167
- readonly start: number;
4168
- readonly end: number;
4169
- readonly text: string;
4170
- };
4171
- }>;
4172
- readonly agents?: ReadonlyArray<{
4173
- readonly name: string;
4174
- readonly mention?: {
4175
- readonly start: number;
4176
- readonly end: number;
4177
- readonly text: string;
4178
- };
4179
- }>;
4180
- readonly skills?: ReadonlyArray<{
4181
- readonly id: string;
4182
- readonly name: string;
4183
- readonly text?: string;
4184
- readonly mention?: {
4185
- readonly start: number;
4186
- readonly end: number;
4187
- readonly text: string;
4188
- };
4200
+ readonly permissions?: ReadonlyArray<{
4201
+ readonly action: string;
4202
+ readonly resource: string;
4203
+ readonly effect: "allow" | "deny" | "ask";
4189
4204
  }>;
4190
- readonly type: "user";
4191
- } | {
4192
- readonly id: string;
4193
- readonly metadata?: {
4194
- readonly [x: string]: JsonValue;
4195
- };
4196
- readonly time: {
4197
- readonly created: number;
4198
- };
4199
- readonly text: string;
4200
- readonly description?: string;
4201
- readonly type: "synthetic";
4202
- } | {
4203
- readonly id: string;
4204
- readonly metadata?: {
4205
- readonly [x: string]: JsonValue;
4206
- };
4207
- readonly time: {
4208
- readonly created: number;
4209
- };
4210
- readonly type: "system";
4211
- readonly text: string;
4212
- readonly description?: string;
4213
- } | {
4214
- readonly id: string;
4215
- readonly metadata?: {
4216
- readonly [x: string]: JsonValue;
4217
- };
4218
- readonly time: {
4219
- readonly created: number;
4220
- };
4221
- readonly type: "skill";
4222
- readonly skill: string;
4223
- readonly name: string;
4224
- readonly text: string;
4225
- } | {
4226
- readonly id: string;
4227
- readonly metadata?: {
4228
- readonly [x: string]: JsonValue;
4229
- };
4230
- readonly time: {
4231
- readonly created: number;
4232
- readonly completed?: number;
4233
- };
4234
- readonly type: "shell";
4235
- readonly shellID: string;
4236
- readonly command: string;
4237
- readonly status: "running" | "exited" | "timeout" | "killed";
4238
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
4239
- readonly output?: {
4240
- readonly output: string;
4241
- readonly cursor: number;
4242
- readonly size: number;
4243
- readonly truncated: boolean;
4244
- };
4245
- } | {
4246
- readonly id: string;
4247
- readonly metadata?: {
4248
- readonly [x: string]: JsonValue;
4249
- };
4250
- readonly time: {
4251
- readonly created: number;
4252
- readonly streamed?: number;
4253
- readonly completed?: number;
4254
- };
4255
- readonly type: "assistant";
4256
- readonly agent: string;
4257
- readonly model: {
4258
- readonly id: string;
4259
- readonly providerID: string;
4260
- readonly variant?: string;
4261
- };
4262
- readonly content: ReadonlyArray<{
4263
- readonly type: "text";
4264
- readonly text: string;
4265
- readonly state?: {
4266
- readonly [x: string]: JsonValue;
4267
- };
4268
- } | {
4269
- readonly type: "reasoning";
4270
- readonly text: string;
4271
- readonly state?: {
4272
- readonly [x: string]: JsonValue;
4273
- };
4274
- readonly time?: {
4275
- readonly created: number;
4276
- readonly completed?: number;
4277
- };
4278
- } | {
4279
- readonly type: "tool";
4280
- readonly id: string;
4281
- readonly name: string;
4282
- readonly executed?: boolean;
4283
- readonly providerState?: {
4284
- readonly [x: string]: JsonValue;
4285
- };
4286
- readonly providerResultState?: {
4287
- readonly [x: string]: JsonValue;
4288
- };
4289
- readonly state: {
4290
- readonly status: "streaming";
4291
- readonly input: string;
4292
- } | {
4293
- readonly status: "running";
4294
- readonly input: {
4295
- readonly [x: string]: JsonValue;
4296
- };
4297
- readonly metadata: {
4298
- readonly [x: string]: JsonValue;
4299
- };
4300
- } | {
4301
- readonly status: "completed";
4302
- readonly input: {
4303
- readonly [x: string]: JsonValue;
4304
- };
4305
- readonly content: readonly [
4306
- ({
4307
- readonly type: "text";
4308
- readonly text: string;
4309
- } | {
4310
- readonly type: "file";
4311
- readonly uri: string;
4312
- readonly mime: string;
4313
- readonly name?: string | null;
4314
- }),
4315
- ...Array<{
4316
- readonly type: "text";
4317
- readonly text: string;
4318
- } | {
4319
- readonly type: "file";
4320
- readonly uri: string;
4321
- readonly mime: string;
4322
- readonly name?: string | null;
4323
- }>
4324
- ];
4325
- readonly metadata?: {
4326
- readonly [x: string]: JsonValue;
4327
- };
4328
- } | {
4329
- readonly status: "error";
4330
- readonly input: {
4331
- readonly [x: string]: JsonValue;
4332
- };
4333
- readonly error: {
4334
- readonly type: string;
4335
- readonly message: string;
4336
- readonly status?: number;
4337
- readonly response?: {
4338
- readonly body: string;
4339
- };
4340
- };
4341
- readonly content?: readonly [
4342
- ({
4343
- readonly type: "text";
4344
- readonly text: string;
4345
- } | {
4346
- readonly type: "file";
4347
- readonly uri: string;
4348
- readonly mime: string;
4349
- readonly name?: string | null;
4350
- }),
4351
- ...Array<{
4352
- readonly type: "text";
4353
- readonly text: string;
4354
- } | {
4355
- readonly type: "file";
4356
- readonly uri: string;
4357
- readonly mime: string;
4358
- readonly name?: string | null;
4359
- }>
4360
- ];
4361
- readonly metadata?: {
4362
- readonly [x: string]: JsonValue;
4363
- };
4364
- };
4365
- readonly time: {
4366
- readonly created: number;
4367
- readonly ran?: number;
4368
- readonly completed?: number;
4369
- };
4370
- }>;
4371
- readonly snapshot?: {
4372
- readonly start?: string;
4373
- readonly end?: string;
4374
- readonly files?: ReadonlyArray<string>;
4375
- };
4376
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4377
- readonly rawFinish?: string;
4378
- readonly providerState?: {
4379
- readonly [x: string]: JsonValue;
4380
- };
4381
- readonly cost?: number;
4382
- readonly tokens?: {
4383
- readonly input: number;
4384
- readonly output: number;
4385
- readonly reasoning: number;
4386
- readonly cache: {
4387
- readonly read: number;
4388
- readonly write: number;
4389
- };
4390
- };
4391
- readonly error?: {
4392
- readonly type: string;
4393
- readonly message: string;
4394
- readonly status?: number;
4395
- readonly response?: {
4396
- readonly body: string;
4397
- };
4398
- };
4399
- readonly retry?: {
4400
- readonly attempt: number;
4401
- readonly at: number;
4402
- readonly error: {
4403
- readonly type: string;
4404
- readonly message: string;
4405
- readonly status?: number;
4406
- readonly response?: {
4407
- readonly body: string;
4408
- };
4409
- };
4410
- };
4411
- } | ({
4412
- readonly type: "compaction";
4413
- readonly id: string;
4414
- readonly metadata?: {
4415
- readonly [x: string]: JsonValue;
4416
- };
4417
- readonly time: {
4418
- readonly created: number;
4419
- };
4420
- readonly status: "running";
4421
- readonly reason: "auto" | "manual";
4422
- readonly summary: string;
4423
- readonly recent: string;
4424
- } | {
4425
- readonly type: "compaction";
4426
- readonly id: string;
4427
- readonly metadata?: {
4428
- readonly [x: string]: JsonValue;
4429
- };
4430
- readonly time: {
4431
- readonly created: number;
4432
- };
4433
- readonly status: "completed";
4434
- readonly reason: "auto" | "manual";
4435
- readonly model?: {
4436
- readonly id: string;
4437
- readonly providerID: string;
4438
- readonly variant?: string;
4439
- };
4440
- readonly providerState?: {
4441
- readonly [x: string]: JsonValue;
4442
- };
4443
- readonly summary: string;
4444
- readonly recent: string;
4445
- readonly providerContext?: {
4446
- readonly version: 1;
4447
- readonly provenance: {
4448
- readonly providerID: string;
4449
- readonly provider: string;
4450
- readonly modelID: string;
4451
- readonly route: string;
4452
- readonly protocol: string;
4453
- readonly endpoint: string;
4454
- };
4455
- readonly messages: JsonValue;
4456
- };
4457
- readonly cost?: number;
4458
- readonly tokens?: {
4459
- readonly input: number;
4460
- readonly output: number;
4461
- readonly reasoning: number;
4462
- readonly cache: {
4463
- readonly read: number;
4464
- readonly write: number;
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: "failed";
4477
- readonly reason: "auto" | "manual";
4478
- readonly error: {
4479
- readonly type: string;
4480
- readonly message: string;
4481
- readonly status?: number;
4482
- readonly response?: {
4483
- readonly body: string;
4484
- };
4485
- };
4486
- readonly cost?: number;
4487
- readonly tokens?: {
4488
- readonly input: number;
4489
- readonly output: number;
4490
- readonly reasoning: number;
4491
- readonly cache: {
4492
- readonly read: number;
4493
- readonly write: number;
4494
- };
4495
- };
4496
- }) | {
4497
- readonly id: string;
4498
- readonly metadata?: {
4499
- readonly [x: string]: JsonValue;
4500
- };
4501
- readonly time: {
4502
- readonly created: number;
4503
- };
4504
- readonly type: "idle";
4505
- readonly outcome: "succeeded" | "failed" | "interrupted";
4506
- readonly error?: {
4507
- readonly type: string;
4508
- readonly message: string;
4509
- readonly status?: number;
4510
- readonly response?: {
4511
- readonly body: string;
4512
- };
4513
- };
4514
- }>;
4515
- readonly location?: {
4516
- readonly directory: string;
4517
- } | null;
4518
- }["info"];
4519
- readonly messages: {
4520
- readonly info: {
4521
- readonly id: string;
4522
- readonly parentID?: string;
4523
- readonly fork?: {
4524
- readonly sessionID: string;
4525
- readonly boundary: {
4526
- readonly type: "before";
4527
- readonly messageID: string;
4528
- } | {
4529
- readonly type: "through";
4530
- readonly messageID: string;
4531
- };
4532
- };
4533
- readonly projectID: string;
4534
- readonly agent?: string;
4535
- readonly model?: {
4536
- readonly id: string;
4537
- readonly providerID: string;
4538
- readonly variant?: string;
4539
- };
4540
- readonly cost: number;
4541
- readonly tokens: {
4542
- readonly input: number;
4543
- readonly output: number;
4544
- readonly reasoning: number;
4545
- readonly cache: {
4546
- readonly read: number;
4547
- readonly write: number;
4548
- };
4549
- };
4550
- readonly outcome?: "succeeded" | "failed" | "interrupted";
4551
- readonly time: {
4552
- readonly created: number;
4553
- readonly updated: number;
4554
- readonly idle?: number;
4555
- readonly viewed?: number;
4556
- readonly archived?: number;
4557
- };
4558
- readonly title?: string;
4559
- readonly subpath?: string;
4560
- readonly metadata?: {
4561
- readonly [x: string]: JsonValue;
4562
- };
4563
- readonly permissions?: ReadonlyArray<{
4564
- readonly action: string;
4565
- readonly resource: string;
4566
- readonly effect: "allow" | "deny" | "ask";
4567
- }>;
4568
- readonly revert?: {
4569
- readonly messageID: string;
4570
- readonly partID?: string;
4571
- readonly snapshot?: string;
4572
- readonly files?: ReadonlyArray<{
4573
- readonly file: string;
4574
- readonly patch: string;
4575
- readonly additions: number;
4576
- readonly deletions: number;
4577
- readonly status: "added" | "deleted" | "modified";
4578
- }>;
4579
- };
4580
- readonly location: {
4581
- readonly directory: string;
4582
- };
4583
- };
4584
- readonly messages: ReadonlyArray<{
4585
- readonly id: string;
4586
- readonly metadata?: {
4587
- readonly [x: string]: JsonValue;
4588
- };
4589
- readonly time: {
4590
- readonly created: number;
4591
- };
4592
- readonly type: "agent-switched";
4593
- readonly agent: string;
4594
- readonly previous?: string;
4595
- } | {
4596
- readonly id: string;
4597
- readonly metadata?: {
4598
- readonly [x: string]: JsonValue;
4599
- };
4600
- readonly time: {
4601
- readonly created: number;
4602
- };
4603
- readonly type: "model-switched";
4604
- readonly model: {
4605
- readonly id: string;
4606
- readonly providerID: string;
4607
- readonly variant?: string;
4608
- };
4609
- readonly previous?: {
4610
- readonly id: string;
4611
- readonly providerID: string;
4612
- readonly variant?: string;
4613
- };
4614
- } | {
4615
- readonly id: string;
4616
- readonly metadata?: {
4617
- readonly [x: string]: JsonValue;
4618
- };
4619
- readonly time: {
4620
- readonly created: number;
4621
- };
4622
- readonly type: "location-switched";
4623
- readonly projectID?: string;
4624
- readonly subpath?: string;
4625
- readonly location: {
4626
- readonly directory: string;
4627
- };
4628
- readonly previous?: {
4629
- readonly location: {
4630
- readonly directory: string;
4631
- };
4632
- readonly projectID?: string;
4633
- readonly subpath?: string;
4634
- } | null;
4635
- } | {
4636
- readonly id: string;
4637
- readonly metadata?: {
4638
- readonly [x: string]: JsonValue;
4639
- };
4640
- readonly time: {
4641
- readonly created: number;
4642
- };
4643
- readonly text: string;
4644
- readonly files?: ReadonlyArray<{
4645
- readonly data: string;
4646
- readonly mime: string;
4647
- readonly source: {
4648
- readonly type: "inline";
4649
- } | {
4650
- readonly type: "uri";
4651
- readonly uri: string;
4652
- };
4653
- readonly name?: string;
4654
- readonly description?: string;
4655
- readonly mention?: {
4656
- readonly start: number;
4657
- readonly end: number;
4658
- readonly text: string;
4659
- };
4660
- }>;
4661
- readonly agents?: ReadonlyArray<{
4662
- readonly name: string;
4663
- readonly mention?: {
4664
- readonly start: number;
4665
- readonly end: number;
4666
- readonly text: string;
4667
- };
4668
- }>;
4669
- readonly skills?: ReadonlyArray<{
4670
- readonly id: string;
4671
- readonly name: string;
4672
- readonly text?: string;
4673
- readonly mention?: {
4674
- readonly start: number;
4675
- readonly end: number;
4676
- readonly text: string;
4677
- };
4678
- }>;
4679
- readonly type: "user";
4680
- } | {
4681
- readonly id: string;
4682
- readonly metadata?: {
4683
- readonly [x: string]: JsonValue;
4684
- };
4685
- readonly time: {
4686
- readonly created: number;
4687
- };
4688
- readonly text: string;
4689
- readonly description?: string;
4690
- readonly type: "synthetic";
4691
- } | {
4692
- readonly id: string;
4693
- readonly metadata?: {
4694
- readonly [x: string]: JsonValue;
4695
- };
4696
- readonly time: {
4697
- readonly created: number;
4698
- };
4699
- readonly type: "system";
4700
- readonly text: string;
4701
- readonly description?: string;
4702
- } | {
4703
- readonly id: string;
4704
- readonly metadata?: {
4705
- readonly [x: string]: JsonValue;
4706
- };
4707
- readonly time: {
4708
- readonly created: number;
4709
- };
4710
- readonly type: "skill";
4711
- readonly skill: string;
4712
- readonly name: string;
4713
- readonly text: string;
4714
- } | {
4715
- readonly id: string;
4716
- readonly metadata?: {
4717
- readonly [x: string]: JsonValue;
4718
- };
4719
- readonly time: {
4720
- readonly created: number;
4721
- readonly completed?: number;
4722
- };
4723
- readonly type: "shell";
4724
- readonly shellID: string;
4725
- readonly command: string;
4726
- readonly status: "running" | "exited" | "timeout" | "killed";
4727
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
4728
- readonly output?: {
4729
- readonly output: string;
4730
- readonly cursor: number;
4731
- readonly size: number;
4732
- readonly truncated: boolean;
4733
- };
4734
- } | {
4735
- readonly id: string;
4736
- readonly metadata?: {
4737
- readonly [x: string]: JsonValue;
4738
- };
4739
- readonly time: {
4740
- readonly created: number;
4741
- readonly streamed?: number;
4742
- readonly completed?: number;
4743
- };
4744
- readonly type: "assistant";
4745
- readonly agent: string;
4746
- readonly model: {
4747
- readonly id: string;
4748
- readonly providerID: string;
4749
- readonly variant?: string;
4750
- };
4751
- readonly content: ReadonlyArray<{
4752
- readonly type: "text";
4753
- readonly text: string;
4754
- readonly state?: {
4755
- readonly [x: string]: JsonValue;
4756
- };
4757
- } | {
4758
- readonly type: "reasoning";
4759
- readonly text: string;
4760
- readonly state?: {
4761
- readonly [x: string]: JsonValue;
4762
- };
4763
- readonly time?: {
4764
- readonly created: number;
4765
- readonly completed?: number;
4766
- };
4767
- } | {
4768
- readonly type: "tool";
4769
- readonly id: string;
4770
- readonly name: string;
4771
- readonly executed?: boolean;
4772
- readonly providerState?: {
4773
- readonly [x: string]: JsonValue;
4774
- };
4775
- readonly providerResultState?: {
4776
- readonly [x: string]: JsonValue;
4777
- };
4778
- readonly state: {
4779
- readonly status: "streaming";
4780
- readonly input: string;
4781
- } | {
4782
- readonly status: "running";
4783
- readonly input: {
4784
- readonly [x: string]: JsonValue;
4785
- };
4786
- readonly metadata: {
4787
- readonly [x: string]: JsonValue;
4788
- };
4789
- } | {
4790
- readonly status: "completed";
4791
- readonly input: {
4792
- readonly [x: string]: JsonValue;
4793
- };
4794
- readonly content: readonly [
4795
- ({
4796
- readonly type: "text";
4797
- readonly text: string;
4798
- } | {
4799
- readonly type: "file";
4800
- readonly uri: string;
4801
- readonly mime: string;
4802
- readonly name?: string | null;
4803
- }),
4804
- ...Array<{
4805
- readonly type: "text";
4806
- readonly text: string;
4807
- } | {
4808
- readonly type: "file";
4809
- readonly uri: string;
4810
- readonly mime: string;
4811
- readonly name?: string | null;
4812
- }>
4813
- ];
4814
- readonly metadata?: {
4815
- readonly [x: string]: JsonValue;
4816
- };
4817
- } | {
4818
- readonly status: "error";
4819
- readonly input: {
4820
- readonly [x: string]: JsonValue;
4821
- };
4822
- readonly error: {
4823
- readonly type: string;
4824
- readonly message: string;
4825
- readonly status?: number;
4826
- readonly response?: {
4827
- readonly body: string;
4828
- };
4829
- };
4830
- readonly content?: readonly [
4831
- ({
4832
- readonly type: "text";
4833
- readonly text: string;
4834
- } | {
4835
- readonly type: "file";
4836
- readonly uri: string;
4837
- readonly mime: string;
4838
- readonly name?: string | null;
4839
- }),
4840
- ...Array<{
4841
- readonly type: "text";
4842
- readonly text: string;
4843
- } | {
4844
- readonly type: "file";
4845
- readonly uri: string;
4846
- readonly mime: string;
4847
- readonly name?: string | null;
4848
- }>
4849
- ];
4850
- readonly metadata?: {
4851
- readonly [x: string]: JsonValue;
4852
- };
4853
- };
4854
- readonly time: {
4855
- readonly created: number;
4856
- readonly ran?: number;
4857
- readonly completed?: number;
4858
- };
4859
- }>;
4860
- readonly snapshot?: {
4861
- readonly start?: string;
4862
- readonly end?: string;
4863
- readonly files?: ReadonlyArray<string>;
4864
- };
4865
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
4866
- readonly rawFinish?: string;
4867
- readonly providerState?: {
4868
- readonly [x: string]: JsonValue;
4869
- };
4870
- readonly cost?: number;
4871
- readonly tokens?: {
4872
- readonly input: number;
4873
- readonly output: number;
4874
- readonly reasoning: number;
4875
- readonly cache: {
4876
- readonly read: number;
4877
- readonly write: number;
4878
- };
4879
- };
4880
- readonly error?: {
4881
- readonly type: string;
4882
- readonly message: string;
4883
- readonly status?: number;
4884
- readonly response?: {
4885
- readonly body: string;
4886
- };
4887
- };
4888
- readonly retry?: {
4889
- readonly attempt: number;
4890
- readonly at: number;
4891
- readonly error: {
4892
- readonly type: string;
4893
- readonly message: string;
4894
- readonly status?: number;
4895
- readonly response?: {
4896
- readonly body: string;
4897
- };
4898
- };
4899
- };
4900
- } | ({
4901
- readonly type: "compaction";
4902
- readonly id: string;
4903
- readonly metadata?: {
4904
- readonly [x: string]: JsonValue;
4905
- };
4906
- readonly time: {
4907
- readonly created: number;
4908
- };
4909
- readonly status: "running";
4910
- readonly reason: "auto" | "manual";
4911
- readonly summary: string;
4912
- readonly recent: string;
4913
- } | {
4914
- readonly type: "compaction";
4915
- readonly id: string;
4916
- readonly metadata?: {
4917
- readonly [x: string]: JsonValue;
4918
- };
4919
- readonly time: {
4920
- readonly created: number;
4921
- };
4922
- readonly status: "completed";
4923
- readonly reason: "auto" | "manual";
4924
- readonly model?: {
4925
- readonly id: string;
4926
- readonly providerID: string;
4927
- readonly variant?: string;
4928
- };
4929
- readonly providerState?: {
4930
- readonly [x: string]: JsonValue;
4931
- };
4932
- readonly summary: string;
4933
- readonly recent: string;
4934
- readonly providerContext?: {
4935
- readonly version: 1;
4936
- readonly provenance: {
4937
- readonly providerID: string;
4938
- readonly provider: string;
4939
- readonly modelID: string;
4940
- readonly route: string;
4941
- readonly protocol: string;
4942
- readonly endpoint: string;
4943
- };
4944
- readonly messages: JsonValue;
4945
- };
4946
- readonly cost?: number;
4947
- readonly tokens?: {
4948
- readonly input: number;
4949
- readonly output: number;
4950
- readonly reasoning: number;
4951
- readonly cache: {
4952
- readonly read: number;
4953
- readonly write: number;
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: "failed";
4966
- readonly reason: "auto" | "manual";
4967
- readonly error: {
4968
- readonly type: string;
4969
- readonly message: string;
4970
- readonly status?: number;
4971
- readonly response?: {
4972
- readonly body: string;
4973
- };
4974
- };
4975
- readonly cost?: number;
4976
- readonly tokens?: {
4977
- readonly input: number;
4978
- readonly output: number;
4979
- readonly reasoning: number;
4980
- readonly cache: {
4981
- readonly read: number;
4982
- readonly write: number;
4983
- };
4984
- };
4985
- }) | {
4986
- readonly id: string;
4987
- readonly metadata?: {
4988
- readonly [x: string]: JsonValue;
4989
- };
4990
- readonly time: {
4991
- readonly created: number;
4205
+ readonly revert?: {
4206
+ readonly messageID: string;
4207
+ readonly partID?: string;
4208
+ readonly snapshot?: string;
4209
+ readonly files?: ReadonlyArray<{
4210
+ readonly file: string;
4211
+ readonly patch: string;
4212
+ readonly additions: number;
4213
+ readonly deletions: number;
4214
+ readonly status: "added" | "deleted" | "modified";
4215
+ }>;
4992
4216
  };
4993
- readonly type: "idle";
4994
- readonly outcome: "succeeded" | "failed" | "interrupted";
4995
- readonly error?: {
4996
- readonly type: string;
4997
- readonly message: string;
4998
- readonly status?: number;
4999
- readonly response?: {
5000
- readonly body: string;
5001
- };
4217
+ readonly location: {
4218
+ readonly directory: string;
5002
4219
  };
5003
- }>;
4220
+ };
4221
+ readonly messages: ReadonlyArray<JsonValue>;
5004
4222
  readonly location?: {
5005
4223
  readonly directory: string;
5006
4224
  } | null;
@@ -5070,426 +4288,7 @@ export type SessionImportInput = {
5070
4288
  readonly directory: string;
5071
4289
  };
5072
4290
  };
5073
- readonly messages: ReadonlyArray<{
5074
- readonly id: string;
5075
- readonly metadata?: {
5076
- readonly [x: string]: JsonValue;
5077
- };
5078
- readonly time: {
5079
- readonly created: number;
5080
- };
5081
- readonly type: "agent-switched";
5082
- readonly agent: string;
5083
- readonly previous?: string;
5084
- } | {
5085
- readonly id: string;
5086
- readonly metadata?: {
5087
- readonly [x: string]: JsonValue;
5088
- };
5089
- readonly time: {
5090
- readonly created: number;
5091
- };
5092
- readonly type: "model-switched";
5093
- readonly model: {
5094
- readonly id: string;
5095
- readonly providerID: string;
5096
- readonly variant?: string;
5097
- };
5098
- readonly previous?: {
5099
- readonly id: string;
5100
- readonly providerID: string;
5101
- readonly variant?: string;
5102
- };
5103
- } | {
5104
- readonly id: string;
5105
- readonly metadata?: {
5106
- readonly [x: string]: JsonValue;
5107
- };
5108
- readonly time: {
5109
- readonly created: number;
5110
- };
5111
- readonly type: "location-switched";
5112
- readonly projectID?: string;
5113
- readonly subpath?: string;
5114
- readonly location: {
5115
- readonly directory: string;
5116
- };
5117
- readonly previous?: {
5118
- readonly location: {
5119
- readonly directory: string;
5120
- };
5121
- readonly projectID?: string;
5122
- readonly subpath?: string;
5123
- } | null;
5124
- } | {
5125
- readonly id: string;
5126
- readonly metadata?: {
5127
- readonly [x: string]: JsonValue;
5128
- };
5129
- readonly time: {
5130
- readonly created: number;
5131
- };
5132
- readonly text: string;
5133
- readonly files?: ReadonlyArray<{
5134
- readonly data: string;
5135
- readonly mime: string;
5136
- readonly source: {
5137
- readonly type: "inline";
5138
- } | {
5139
- readonly type: "uri";
5140
- readonly uri: string;
5141
- };
5142
- readonly name?: string;
5143
- readonly description?: string;
5144
- readonly mention?: {
5145
- readonly start: number;
5146
- readonly end: number;
5147
- readonly text: string;
5148
- };
5149
- }>;
5150
- readonly agents?: ReadonlyArray<{
5151
- readonly name: string;
5152
- readonly mention?: {
5153
- readonly start: number;
5154
- readonly end: number;
5155
- readonly text: string;
5156
- };
5157
- }>;
5158
- readonly skills?: ReadonlyArray<{
5159
- readonly id: string;
5160
- readonly name: string;
5161
- readonly text?: string;
5162
- readonly mention?: {
5163
- readonly start: number;
5164
- readonly end: number;
5165
- readonly text: string;
5166
- };
5167
- }>;
5168
- readonly type: "user";
5169
- } | {
5170
- readonly id: string;
5171
- readonly metadata?: {
5172
- readonly [x: string]: JsonValue;
5173
- };
5174
- readonly time: {
5175
- readonly created: number;
5176
- };
5177
- readonly text: string;
5178
- readonly description?: string;
5179
- readonly type: "synthetic";
5180
- } | {
5181
- readonly id: string;
5182
- readonly metadata?: {
5183
- readonly [x: string]: JsonValue;
5184
- };
5185
- readonly time: {
5186
- readonly created: number;
5187
- };
5188
- readonly type: "system";
5189
- readonly text: string;
5190
- readonly description?: string;
5191
- } | {
5192
- readonly id: string;
5193
- readonly metadata?: {
5194
- readonly [x: string]: JsonValue;
5195
- };
5196
- readonly time: {
5197
- readonly created: number;
5198
- };
5199
- readonly type: "skill";
5200
- readonly skill: string;
5201
- readonly name: string;
5202
- readonly text: string;
5203
- } | {
5204
- readonly id: string;
5205
- readonly metadata?: {
5206
- readonly [x: string]: JsonValue;
5207
- };
5208
- readonly time: {
5209
- readonly created: number;
5210
- readonly completed?: number;
5211
- };
5212
- readonly type: "shell";
5213
- readonly shellID: string;
5214
- readonly command: string;
5215
- readonly status: "running" | "exited" | "timeout" | "killed";
5216
- readonly exit?: number | "Infinity" | "-Infinity" | "NaN";
5217
- readonly output?: {
5218
- readonly output: string;
5219
- readonly cursor: number;
5220
- readonly size: number;
5221
- readonly truncated: boolean;
5222
- };
5223
- } | {
5224
- readonly id: string;
5225
- readonly metadata?: {
5226
- readonly [x: string]: JsonValue;
5227
- };
5228
- readonly time: {
5229
- readonly created: number;
5230
- readonly streamed?: number;
5231
- readonly completed?: number;
5232
- };
5233
- readonly type: "assistant";
5234
- readonly agent: string;
5235
- readonly model: {
5236
- readonly id: string;
5237
- readonly providerID: string;
5238
- readonly variant?: string;
5239
- };
5240
- readonly content: ReadonlyArray<{
5241
- readonly type: "text";
5242
- readonly text: string;
5243
- readonly state?: {
5244
- readonly [x: string]: JsonValue;
5245
- };
5246
- } | {
5247
- readonly type: "reasoning";
5248
- readonly text: string;
5249
- readonly state?: {
5250
- readonly [x: string]: JsonValue;
5251
- };
5252
- readonly time?: {
5253
- readonly created: number;
5254
- readonly completed?: number;
5255
- };
5256
- } | {
5257
- readonly type: "tool";
5258
- readonly id: string;
5259
- readonly name: string;
5260
- readonly executed?: boolean;
5261
- readonly providerState?: {
5262
- readonly [x: string]: JsonValue;
5263
- };
5264
- readonly providerResultState?: {
5265
- readonly [x: string]: JsonValue;
5266
- };
5267
- readonly state: {
5268
- readonly status: "streaming";
5269
- readonly input: string;
5270
- } | {
5271
- readonly status: "running";
5272
- readonly input: {
5273
- readonly [x: string]: JsonValue;
5274
- };
5275
- readonly metadata: {
5276
- readonly [x: string]: JsonValue;
5277
- };
5278
- } | {
5279
- readonly status: "completed";
5280
- readonly input: {
5281
- readonly [x: string]: JsonValue;
5282
- };
5283
- readonly content: readonly [
5284
- ({
5285
- readonly type: "text";
5286
- readonly text: string;
5287
- } | {
5288
- readonly type: "file";
5289
- readonly uri: string;
5290
- readonly mime: string;
5291
- readonly name?: string | null;
5292
- }),
5293
- ...Array<{
5294
- readonly type: "text";
5295
- readonly text: string;
5296
- } | {
5297
- readonly type: "file";
5298
- readonly uri: string;
5299
- readonly mime: string;
5300
- readonly name?: string | null;
5301
- }>
5302
- ];
5303
- readonly metadata?: {
5304
- readonly [x: string]: JsonValue;
5305
- };
5306
- } | {
5307
- readonly status: "error";
5308
- readonly input: {
5309
- readonly [x: string]: JsonValue;
5310
- };
5311
- readonly error: {
5312
- readonly type: string;
5313
- readonly message: string;
5314
- readonly status?: number;
5315
- readonly response?: {
5316
- readonly body: string;
5317
- };
5318
- };
5319
- readonly content?: readonly [
5320
- ({
5321
- readonly type: "text";
5322
- readonly text: string;
5323
- } | {
5324
- readonly type: "file";
5325
- readonly uri: string;
5326
- readonly mime: string;
5327
- readonly name?: string | null;
5328
- }),
5329
- ...Array<{
5330
- readonly type: "text";
5331
- readonly text: string;
5332
- } | {
5333
- readonly type: "file";
5334
- readonly uri: string;
5335
- readonly mime: string;
5336
- readonly name?: string | null;
5337
- }>
5338
- ];
5339
- readonly metadata?: {
5340
- readonly [x: string]: JsonValue;
5341
- };
5342
- };
5343
- readonly time: {
5344
- readonly created: number;
5345
- readonly ran?: number;
5346
- readonly completed?: number;
5347
- };
5348
- }>;
5349
- readonly snapshot?: {
5350
- readonly start?: string;
5351
- readonly end?: string;
5352
- readonly files?: ReadonlyArray<string>;
5353
- };
5354
- readonly finish?: "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown";
5355
- readonly rawFinish?: string;
5356
- readonly providerState?: {
5357
- readonly [x: string]: JsonValue;
5358
- };
5359
- readonly cost?: number;
5360
- readonly tokens?: {
5361
- readonly input: number;
5362
- readonly output: number;
5363
- readonly reasoning: number;
5364
- readonly cache: {
5365
- readonly read: number;
5366
- readonly write: number;
5367
- };
5368
- };
5369
- readonly error?: {
5370
- readonly type: string;
5371
- readonly message: string;
5372
- readonly status?: number;
5373
- readonly response?: {
5374
- readonly body: string;
5375
- };
5376
- };
5377
- readonly retry?: {
5378
- readonly attempt: number;
5379
- readonly at: number;
5380
- readonly error: {
5381
- readonly type: string;
5382
- readonly message: string;
5383
- readonly status?: number;
5384
- readonly response?: {
5385
- readonly body: string;
5386
- };
5387
- };
5388
- };
5389
- } | ({
5390
- readonly type: "compaction";
5391
- readonly id: string;
5392
- readonly metadata?: {
5393
- readonly [x: string]: JsonValue;
5394
- };
5395
- readonly time: {
5396
- readonly created: number;
5397
- };
5398
- readonly status: "running";
5399
- readonly reason: "auto" | "manual";
5400
- readonly summary: string;
5401
- readonly recent: string;
5402
- } | {
5403
- readonly type: "compaction";
5404
- readonly id: string;
5405
- readonly metadata?: {
5406
- readonly [x: string]: JsonValue;
5407
- };
5408
- readonly time: {
5409
- readonly created: number;
5410
- };
5411
- readonly status: "completed";
5412
- readonly reason: "auto" | "manual";
5413
- readonly model?: {
5414
- readonly id: string;
5415
- readonly providerID: string;
5416
- readonly variant?: string;
5417
- };
5418
- readonly providerState?: {
5419
- readonly [x: string]: JsonValue;
5420
- };
5421
- readonly summary: string;
5422
- readonly recent: string;
5423
- readonly providerContext?: {
5424
- readonly version: 1;
5425
- readonly provenance: {
5426
- readonly providerID: string;
5427
- readonly provider: string;
5428
- readonly modelID: string;
5429
- readonly route: string;
5430
- readonly protocol: string;
5431
- readonly endpoint: string;
5432
- };
5433
- readonly messages: JsonValue;
5434
- };
5435
- readonly cost?: number;
5436
- readonly tokens?: {
5437
- readonly input: number;
5438
- readonly output: number;
5439
- readonly reasoning: number;
5440
- readonly cache: {
5441
- readonly read: number;
5442
- readonly write: number;
5443
- };
5444
- };
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: "failed";
5455
- readonly reason: "auto" | "manual";
5456
- readonly error: {
5457
- readonly type: string;
5458
- readonly message: string;
5459
- readonly status?: number;
5460
- readonly response?: {
5461
- readonly body: string;
5462
- };
5463
- };
5464
- readonly cost?: number;
5465
- readonly tokens?: {
5466
- readonly input: number;
5467
- readonly output: number;
5468
- readonly reasoning: number;
5469
- readonly cache: {
5470
- readonly read: number;
5471
- readonly write: number;
5472
- };
5473
- };
5474
- }) | {
5475
- readonly id: string;
5476
- readonly metadata?: {
5477
- readonly [x: string]: JsonValue;
5478
- };
5479
- readonly time: {
5480
- readonly created: number;
5481
- };
5482
- readonly type: "idle";
5483
- readonly outcome: "succeeded" | "failed" | "interrupted";
5484
- readonly error?: {
5485
- readonly type: string;
5486
- readonly message: string;
5487
- readonly status?: number;
5488
- readonly response?: {
5489
- readonly body: string;
5490
- };
5491
- };
5492
- }>;
4291
+ readonly messages: ReadonlyArray<JsonValue>;
5493
4292
  readonly location?: {
5494
4293
  readonly directory: string;
5495
4294
  } | null;
@@ -5575,6 +4374,7 @@ export type SessionUpdateInput = {
5575
4374
  readonly resource: string;
5576
4375
  readonly effect: "allow" | "deny" | "ask";
5577
4376
  }> | undefined;
4377
+ readonly archived?: boolean | undefined;
5578
4378
  }["title"];
5579
4379
  readonly metadata?: {
5580
4380
  readonly title?: string | undefined;
@@ -5586,6 +4386,7 @@ export type SessionUpdateInput = {
5586
4386
  readonly resource: string;
5587
4387
  readonly effect: "allow" | "deny" | "ask";
5588
4388
  }> | undefined;
4389
+ readonly archived?: boolean | undefined;
5589
4390
  }["metadata"];
5590
4391
  readonly permissions?: {
5591
4392
  readonly title?: string | undefined;
@@ -5597,7 +4398,20 @@ export type SessionUpdateInput = {
5597
4398
  readonly resource: string;
5598
4399
  readonly effect: "allow" | "deny" | "ask";
5599
4400
  }> | undefined;
4401
+ readonly archived?: boolean | undefined;
5600
4402
  }["permissions"];
4403
+ readonly archived?: {
4404
+ readonly title?: string | undefined;
4405
+ readonly metadata?: {
4406
+ readonly [x: string]: JsonValue;
4407
+ } | undefined;
4408
+ readonly permissions?: ReadonlyArray<{
4409
+ readonly action: string;
4410
+ readonly resource: string;
4411
+ readonly effect: "allow" | "deny" | "ask";
4412
+ }> | undefined;
4413
+ readonly archived?: boolean | undefined;
4414
+ }["archived"];
5601
4415
  };
5602
4416
  export type SessionUpdateOutput = void;
5603
4417
  export type SessionMoveInput = {
@@ -7271,25 +6085,25 @@ export type MessageListInput = {
7271
6085
  readonly limit?: number | undefined;
7272
6086
  readonly order?: "asc" | "desc" | undefined;
7273
6087
  readonly cursor?: string | undefined;
7274
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6088
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7275
6089
  }["limit"];
7276
6090
  readonly order?: {
7277
6091
  readonly limit?: number | undefined;
7278
6092
  readonly order?: "asc" | "desc" | undefined;
7279
6093
  readonly cursor?: string | undefined;
7280
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6094
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7281
6095
  }["order"];
7282
6096
  readonly cursor?: {
7283
6097
  readonly limit?: number | undefined;
7284
6098
  readonly order?: "asc" | "desc" | undefined;
7285
6099
  readonly cursor?: string | undefined;
7286
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6100
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7287
6101
  }["cursor"];
7288
6102
  readonly type?: {
7289
6103
  readonly limit?: number | undefined;
7290
6104
  readonly order?: "asc" | "desc" | undefined;
7291
6105
  readonly cursor?: string | undefined;
7292
- readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | undefined;
6106
+ readonly type?: "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | undefined;
7293
6107
  }["type"];
7294
6108
  };
7295
6109
  export type MessageListOutput = SessionMessagesResponse;
@@ -7334,6 +6148,48 @@ export type GenerateTextInput = {
7334
6148
  }["model"];
7335
6149
  };
7336
6150
  export type GenerateTextOutput = GenerateTextResponse["data"];
6151
+ export type VoiceSessionInput = {
6152
+ readonly model: {
6153
+ readonly model: string;
6154
+ readonly session?: {
6155
+ readonly [x: string]: unknown;
6156
+ } | undefined;
6157
+ readonly transport: {
6158
+ readonly type: "webrtc";
6159
+ readonly sdp: string;
6160
+ readonly dcid?: number | undefined;
6161
+ } | {
6162
+ readonly type: "websocket";
6163
+ };
6164
+ }["model"];
6165
+ readonly session?: {
6166
+ readonly model: string;
6167
+ readonly session?: {
6168
+ readonly [x: string]: unknown;
6169
+ } | undefined;
6170
+ readonly transport: {
6171
+ readonly type: "webrtc";
6172
+ readonly sdp: string;
6173
+ readonly dcid?: number | undefined;
6174
+ } | {
6175
+ readonly type: "websocket";
6176
+ };
6177
+ }["session"];
6178
+ readonly transport: {
6179
+ readonly model: string;
6180
+ readonly session?: {
6181
+ readonly [x: string]: unknown;
6182
+ } | undefined;
6183
+ readonly transport: {
6184
+ readonly type: "webrtc";
6185
+ readonly sdp: string;
6186
+ readonly dcid?: number | undefined;
6187
+ } | {
6188
+ readonly type: "websocket";
6189
+ };
6190
+ }["transport"];
6191
+ };
6192
+ export type VoiceSessionOutput = VoiceSessionResponse["data"];
7337
6193
  export type ProviderListInput = {
7338
6194
  readonly location?: {
7339
6195
  readonly location?: {
@@ -7734,9 +6590,6 @@ export type CredentialCreateInput = {
7734
6590
  readonly metadata?: {
7735
6591
  readonly [x: string]: JsonValue;
7736
6592
  };
7737
- readonly configuration?: {
7738
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7739
- };
7740
6593
  } | {
7741
6594
  readonly type: "external";
7742
6595
  readonly methodID: string;
@@ -7765,9 +6618,6 @@ export type CredentialCreateInput = {
7765
6618
  readonly metadata?: {
7766
6619
  readonly [x: string]: JsonValue;
7767
6620
  };
7768
- readonly configuration?: {
7769
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7770
- };
7771
6621
  } | {
7772
6622
  readonly type: "external";
7773
6623
  readonly methodID: string;
@@ -7796,9 +6646,6 @@ export type CredentialCreateInput = {
7796
6646
  readonly metadata?: {
7797
6647
  readonly [x: string]: JsonValue;
7798
6648
  };
7799
- readonly configuration?: {
7800
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7801
- };
7802
6649
  } | {
7803
6650
  readonly type: "external";
7804
6651
  readonly methodID: string;
@@ -7827,9 +6674,6 @@ export type CredentialCreateInput = {
7827
6674
  readonly metadata?: {
7828
6675
  readonly [x: string]: JsonValue;
7829
6676
  };
7830
- readonly configuration?: {
7831
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7832
- };
7833
6677
  } | {
7834
6678
  readonly type: "external";
7835
6679
  readonly methodID: string;
@@ -7858,9 +6702,6 @@ export type CredentialCreateInput = {
7858
6702
  readonly metadata?: {
7859
6703
  readonly [x: string]: JsonValue;
7860
6704
  };
7861
- readonly configuration?: {
7862
- readonly [x: string]: string | number | "Infinity" | "-Infinity" | "NaN" | boolean | ReadonlyArray<string>;
7863
- };
7864
6705
  } | {
7865
6706
  readonly type: "external";
7866
6707
  readonly methodID: string;
@@ -7985,6 +6826,22 @@ export type PermissionSavedListInput = {
7985
6826
  export type PermissionSavedListOutput = {
7986
6827
  data: Array<PermissionSavedInfo>;
7987
6828
  }["data"];
6829
+ export type PermissionSavedUpdateInput = {
6830
+ readonly id: {
6831
+ readonly id: string;
6832
+ }["id"];
6833
+ readonly action?: {
6834
+ readonly action?: string | undefined;
6835
+ readonly resource?: string | undefined;
6836
+ }["action"];
6837
+ readonly resource?: {
6838
+ readonly action?: string | undefined;
6839
+ readonly resource?: string | undefined;
6840
+ }["resource"];
6841
+ };
6842
+ export type PermissionSavedUpdateOutput = {
6843
+ data: PermissionSavedInfo;
6844
+ }["data"];
7988
6845
  export type PermissionSavedRemoveInput = {
7989
6846
  readonly id: {
7990
6847
  readonly id: string;