@opencode-ai/sdk 1.16.2 → 1.17.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.
@@ -1,7 +1,7 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
- export type Event = EventModelsDevRefreshed | EventPluginAdded | EventCatalogModelUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextPromptPromoted | EventSessionNextContextUpdated | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventAccountAdded | EventAccountRemoved | EventAccountSwitched | EventPermissionV2Asked | EventPermissionV2Replied | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectDirectoriesUpdated | EventProjectUpdated | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventVcsBranchUpdated | EventWorktreeReady | EventWorktreeFailed | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
4
+ export type Event = EventModelsDevRefreshed | EventPluginAdded | EventCatalogModelUpdated | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartRemoved | EventSessionNextAgentSwitched | EventSessionNextModelSwitched | EventSessionNextMoved | EventSessionNextPrompted | EventSessionNextPromptAdmitted | EventSessionNextPromptPromoted | EventSessionNextInterruptRequested | EventSessionNextContextUpdated | EventSessionNextSynthetic | EventSessionNextShellStarted | EventSessionNextShellEnded | EventSessionNextStepStarted | EventSessionNextStepEnded | EventSessionNextStepFailed | EventSessionNextTextStarted | EventSessionNextTextDelta | EventSessionNextTextEnded | EventSessionNextReasoningStarted | EventSessionNextReasoningDelta | EventSessionNextReasoningEnded | EventSessionNextToolInputStarted | EventSessionNextToolInputDelta | EventSessionNextToolInputEnded | EventSessionNextToolCalled | EventSessionNextToolProgress | EventSessionNextToolSuccess | EventSessionNextToolFailed | EventSessionNextRetried | EventSessionNextCompactionStarted | EventSessionNextCompactionDelta | EventSessionNextCompactionEnded | EventMessagePartDelta | EventSessionDiff | EventSessionError | EventInstallationUpdated | EventInstallationUpdateAvailable | EventFileEdited | EventAccountAdded | EventAccountRemoved | EventAccountSwitched | EventPermissionV2Asked | EventPermissionV2Replied | EventReferenceUpdated | EventFileWatcherUpdated | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventQuestionV2Asked | EventQuestionV2Replied | EventQuestionV2Rejected | EventTodoUpdated | EventLspUpdated | EventPermissionAsked | EventPermissionReplied | EventTuiPromptAppend2 | EventTuiCommandExecute2 | EventTuiToastShow2 | EventTuiSessionSelect2 | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventProjectDirectoriesUpdated | EventProjectUpdated | EventVcsBranchUpdated | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionStatus | EventSessionIdle | EventSessionCompacted | EventWorktreeReady | EventWorktreeFailed | EventWorkspaceReady | EventWorkspaceFailed | EventWorkspaceStatus | EventServerConnected | EventGlobalDisposed | EventServerInstanceDisposed;
5
5
  export type QuestionReplied = {
6
6
  sessionID: string;
7
7
  requestID: string;
@@ -470,7 +470,6 @@ export type Prompt = {
470
470
  text: string;
471
471
  files?: Array<PromptFileAttachment>;
472
472
  agents?: Array<PromptAgentAttachment>;
473
- references?: Array<PromptReferenceAttachment>;
474
473
  };
475
474
  export type Pty = {
476
475
  id: string;
@@ -678,6 +677,13 @@ export type GlobalEvent = {
678
677
  prompt: Prompt;
679
678
  timeCreated: number;
680
679
  };
680
+ } | {
681
+ id: string;
682
+ type: "session.next.interrupt.requested";
683
+ properties: {
684
+ timestamp: number;
685
+ sessionID: string;
686
+ };
681
687
  } | {
682
688
  id: string;
683
689
  type: "session.next.context.updated";
@@ -903,6 +909,7 @@ export type GlobalEvent = {
903
909
  [key: string]: unknown;
904
910
  };
905
911
  content: Array<ToolTextContent | ToolFileContent>;
912
+ outputPaths?: Array<string>;
906
913
  result?: unknown;
907
914
  provider: {
908
915
  executed: boolean;
@@ -956,6 +963,7 @@ export type GlobalEvent = {
956
963
  properties: {
957
964
  timestamp: number;
958
965
  sessionID: string;
966
+ messageID: string;
959
967
  text: string;
960
968
  };
961
969
  } | {
@@ -964,8 +972,10 @@ export type GlobalEvent = {
964
972
  properties: {
965
973
  timestamp: number;
966
974
  sessionID: string;
975
+ messageID: string;
976
+ reason: "auto" | "manual";
967
977
  text: string;
968
- include?: string;
978
+ recent: string;
969
979
  };
970
980
  } | {
971
981
  id: string;
@@ -1051,6 +1061,12 @@ export type GlobalEvent = {
1051
1061
  requestID: string;
1052
1062
  reply: PermissionV2Reply;
1053
1063
  };
1064
+ } | {
1065
+ id: string;
1066
+ type: "reference.updated";
1067
+ properties: {
1068
+ [key: string]: unknown;
1069
+ };
1054
1070
  } | {
1055
1071
  id: string;
1056
1072
  type: "file.watcher.updated";
@@ -1232,6 +1248,12 @@ export type GlobalEvent = {
1232
1248
  };
1233
1249
  sandboxes: Array<string>;
1234
1250
  };
1251
+ } | {
1252
+ id: string;
1253
+ type: "vcs.branch.updated";
1254
+ properties: {
1255
+ branch?: string;
1256
+ };
1235
1257
  } | {
1236
1258
  id: string;
1237
1259
  type: "question.asked";
@@ -1278,12 +1300,6 @@ export type GlobalEvent = {
1278
1300
  properties: {
1279
1301
  sessionID: string;
1280
1302
  };
1281
- } | {
1282
- id: string;
1283
- type: "vcs.branch.updated";
1284
- properties: {
1285
- branch?: string;
1286
- };
1287
1303
  } | {
1288
1304
  id: string;
1289
1305
  type: "worktree.ready";
@@ -1328,7 +1344,7 @@ export type GlobalEvent = {
1328
1344
  properties: {
1329
1345
  [key: string]: unknown;
1330
1346
  };
1331
- } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextPromptPromoted | SyncEventSessionNextContextUpdated | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionDelta | SyncEventSessionNextCompactionEnded;
1347
+ } | EventServerInstanceDisposed | SyncEventSessionCreated | SyncEventSessionUpdated | SyncEventSessionDeleted | SyncEventMessageUpdated | SyncEventMessageRemoved | SyncEventMessagePartUpdated | SyncEventMessagePartRemoved | SyncEventSessionNextAgentSwitched | SyncEventSessionNextModelSwitched | SyncEventSessionNextMoved | SyncEventSessionNextPrompted | SyncEventSessionNextPromptAdmitted | SyncEventSessionNextPromptPromoted | SyncEventSessionNextInterruptRequested | SyncEventSessionNextContextUpdated | SyncEventSessionNextSynthetic | SyncEventSessionNextShellStarted | SyncEventSessionNextShellEnded | SyncEventSessionNextStepStarted | SyncEventSessionNextStepEnded | SyncEventSessionNextStepFailed | SyncEventSessionNextTextStarted | SyncEventSessionNextTextEnded | SyncEventSessionNextReasoningStarted | SyncEventSessionNextReasoningEnded | SyncEventSessionNextToolInputStarted | SyncEventSessionNextToolInputEnded | SyncEventSessionNextToolCalled | SyncEventSessionNextToolProgress | SyncEventSessionNextToolSuccess | SyncEventSessionNextToolFailed | SyncEventSessionNextRetried | SyncEventSessionNextCompactionStarted | SyncEventSessionNextCompactionEnded;
1332
1348
  };
1333
1349
  /**
1334
1350
  * Log level
@@ -1446,7 +1462,7 @@ export type ProviderConfig = {
1446
1462
  temperature?: boolean;
1447
1463
  tool_call?: boolean;
1448
1464
  interleaved?: true | {
1449
- field: "reasoning_content" | "reasoning_details";
1465
+ field: "reasoning" | "reasoning_content" | "reasoning_details";
1450
1466
  };
1451
1467
  cost?: {
1452
1468
  input: number;
@@ -1704,7 +1720,7 @@ export type Model = {
1704
1720
  pdf: boolean;
1705
1721
  };
1706
1722
  interleaved: boolean | {
1707
- field: "reasoning_content" | "reasoning_details";
1723
+ field: "reasoning" | "reasoning_content" | "reasoning_details";
1708
1724
  };
1709
1725
  };
1710
1726
  cost: {
@@ -2044,6 +2060,7 @@ export type ProjectCopyError = {
2044
2060
  name: "ProjectCopyError";
2045
2061
  data: {
2046
2062
  message: string;
2063
+ forceRequired?: boolean;
2047
2064
  };
2048
2065
  };
2049
2066
  export type PtyNotFoundError = {
@@ -2242,7 +2259,7 @@ export type UnauthorizedError = {
2242
2259
  _tag: "UnauthorizedError";
2243
2260
  message: string;
2244
2261
  };
2245
- export type V2SessionsResponse = {
2262
+ export type SessionsResponse = {
2246
2263
  data: Array<SessionV2Info>;
2247
2264
  cursor: {
2248
2265
  previous?: string;
@@ -2273,7 +2290,7 @@ export type UnknownError1 = {
2273
2290
  message: string;
2274
2291
  ref?: string;
2275
2292
  };
2276
- export type V2SessionMessagesResponse = {
2293
+ export type SessionMessagesResponse = {
2277
2294
  data: Array<SessionMessage>;
2278
2295
  cursor: {
2279
2296
  previous?: string;
@@ -2358,6 +2375,19 @@ export type ModelV2Info = {
2358
2375
  body: {
2359
2376
  [key: string]: unknown;
2360
2377
  };
2378
+ generation?: {
2379
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2380
+ temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2381
+ topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2382
+ topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2383
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2384
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2385
+ seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2386
+ stop?: Array<string>;
2387
+ };
2388
+ options?: {
2389
+ [key: string]: unknown;
2390
+ };
2361
2391
  variant?: string;
2362
2392
  };
2363
2393
  variants: Array<{
@@ -2368,6 +2398,19 @@ export type ModelV2Info = {
2368
2398
  body: {
2369
2399
  [key: string]: unknown;
2370
2400
  };
2401
+ generation?: {
2402
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2403
+ temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2404
+ topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2405
+ topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2406
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2407
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2408
+ seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2409
+ stop?: Array<string>;
2410
+ };
2411
+ options?: {
2412
+ [key: string]: unknown;
2413
+ };
2371
2414
  }>;
2372
2415
  time: {
2373
2416
  released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
@@ -2412,17 +2455,6 @@ export type PromptAgentAttachment = {
2412
2455
  name: string;
2413
2456
  source?: PromptSource;
2414
2457
  };
2415
- export type PromptReferenceAttachment = {
2416
- name: string;
2417
- kind: "local" | "git" | "invalid";
2418
- uri?: string;
2419
- repository?: string;
2420
- branch?: string;
2421
- target?: string;
2422
- targetUri?: string;
2423
- problem?: string;
2424
- source?: PromptSource;
2425
- };
2426
2458
  export type SessionErrorUnknown = {
2427
2459
  type: "unknown";
2428
2460
  message: string;
@@ -2433,16 +2465,7 @@ export type ToolTextContent = {
2433
2465
  };
2434
2466
  export type ToolFileContent = {
2435
2467
  type: "file";
2436
- source: {
2437
- type: "data";
2438
- data: string;
2439
- } | {
2440
- type: "url";
2441
- url: string;
2442
- } | {
2443
- type: "file";
2444
- uri: string;
2445
- };
2468
+ uri: string;
2446
2469
  mime: string;
2447
2470
  name?: string;
2448
2471
  };
@@ -2725,6 +2748,20 @@ export type SyncEventSessionNextPromptPromoted = {
2725
2748
  };
2726
2749
  };
2727
2750
  };
2751
+ export type SyncEventSessionNextInterruptRequested = {
2752
+ type: "sync";
2753
+ id: string;
2754
+ syncEvent: {
2755
+ type: "session.next.interrupt.requested.1";
2756
+ id: string;
2757
+ seq: number;
2758
+ aggregateID: string;
2759
+ data: {
2760
+ timestamp: number;
2761
+ sessionID: string;
2762
+ };
2763
+ };
2764
+ };
2728
2765
  export type SyncEventSessionNextContextUpdated = {
2729
2766
  type: "sync";
2730
2767
  id: string;
@@ -3030,6 +3067,7 @@ export type SyncEventSessionNextToolSuccess = {
3030
3067
  [key: string]: unknown;
3031
3068
  };
3032
3069
  content: Array<ToolTextContent | ToolFileContent>;
3070
+ outputPaths?: Array<string>;
3033
3071
  result?: unknown;
3034
3072
  provider: {
3035
3073
  executed: boolean;
@@ -3100,34 +3138,21 @@ export type SyncEventSessionNextCompactionStarted = {
3100
3138
  };
3101
3139
  };
3102
3140
  };
3103
- export type SyncEventSessionNextCompactionDelta = {
3104
- type: "sync";
3105
- id: string;
3106
- syncEvent: {
3107
- type: "session.next.compaction.delta.1";
3108
- id: string;
3109
- seq: number;
3110
- aggregateID: string;
3111
- data: {
3112
- timestamp: number;
3113
- sessionID: string;
3114
- text: string;
3115
- };
3116
- };
3117
- };
3118
3141
  export type SyncEventSessionNextCompactionEnded = {
3119
3142
  type: "sync";
3120
3143
  id: string;
3121
3144
  syncEvent: {
3122
- type: "session.next.compaction.ended.1";
3145
+ type: "session.next.compaction.ended.2";
3123
3146
  id: string;
3124
3147
  seq: number;
3125
3148
  aggregateID: string;
3126
3149
  data: {
3127
3150
  timestamp: number;
3128
3151
  sessionID: string;
3152
+ messageID: string;
3153
+ reason: "auto" | "manual";
3129
3154
  text: string;
3130
- include?: string;
3155
+ recent: string;
3131
3156
  };
3132
3157
  };
3133
3158
  };
@@ -3137,7 +3162,10 @@ export type ConfigV2ExperimentalPolicy = {
3137
3162
  effect: PolicyEffect;
3138
3163
  resource: string;
3139
3164
  };
3140
- export type ProjectDirectories = Array<string>;
3165
+ export type ProjectDirectories = Array<{
3166
+ directory: string;
3167
+ type: "main" | "root" | "git_worktree";
3168
+ }>;
3141
3169
  export type ProjectCopyCopy = {
3142
3170
  directory: string;
3143
3171
  };
@@ -3254,7 +3282,6 @@ export type SessionMessageUser = {
3254
3282
  text: string;
3255
3283
  files?: Array<PromptFileAttachment>;
3256
3284
  agents?: Array<PromptAgentAttachment>;
3257
- references?: Array<PromptReferenceAttachment>;
3258
3285
  type: "user";
3259
3286
  };
3260
3287
  export type SessionMessageSynthetic = {
@@ -3330,6 +3357,7 @@ export type SessionMessageToolStateCompleted = {
3330
3357
  };
3331
3358
  attachments?: Array<PromptFileAttachment>;
3332
3359
  content: Array<ToolTextContent | ToolFileContent>;
3360
+ outputPaths?: Array<string>;
3333
3361
  structured: {
3334
3362
  [key: string]: unknown;
3335
3363
  };
@@ -3410,7 +3438,7 @@ export type SessionMessageCompaction = {
3410
3438
  type: "compaction";
3411
3439
  reason: "auto" | "manual";
3412
3440
  summary: string;
3413
- include?: string;
3441
+ recent: string;
3414
3442
  id: string;
3415
3443
  metadata?: {
3416
3444
  [key: string]: unknown;
@@ -3476,20 +3504,15 @@ export type PermissionSavedInfo = {
3476
3504
  action: string;
3477
3505
  resource: string;
3478
3506
  };
3479
- export type FileSystemTextContent = {
3480
- type: "text";
3481
- content: string;
3482
- mime: string;
3483
- };
3484
- export type FileSystemBinaryContent = {
3485
- type: "binary";
3507
+ export type FileSystemContent = {
3508
+ uri: string;
3509
+ name?: string;
3486
3510
  content: string;
3487
- encoding: "base64";
3511
+ encoding: "utf8" | "base64";
3488
3512
  mime: string;
3489
3513
  };
3490
3514
  export type FileSystemEntry = {
3491
3515
  path: string;
3492
- uri: string;
3493
3516
  type: "file" | "directory";
3494
3517
  mime: string;
3495
3518
  };
@@ -3527,6 +3550,20 @@ export type QuestionV2Reply = {
3527
3550
  */
3528
3551
  answers: Array<QuestionV2Answer>;
3529
3552
  };
3553
+ export type ReferenceLocalSource = {
3554
+ type: "local";
3555
+ path: string;
3556
+ };
3557
+ export type ReferenceGitSource = {
3558
+ type: "git";
3559
+ repository: string;
3560
+ branch?: string;
3561
+ };
3562
+ export type ReferenceInfo = {
3563
+ name: string;
3564
+ path: string;
3565
+ source: ReferenceLocalSource | ReferenceGitSource;
3566
+ };
3530
3567
  export type EventModelsDevRefreshed = {
3531
3568
  id: string;
3532
3569
  type: "models-dev.refreshed";
@@ -3574,6 +3611,19 @@ export type ModelV2Info1 = {
3574
3611
  body: {
3575
3612
  [key: string]: unknown;
3576
3613
  };
3614
+ generation?: {
3615
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity";
3616
+ temperature?: number | "NaN" | "Infinity" | "-Infinity";
3617
+ topP?: number | "NaN" | "Infinity" | "-Infinity";
3618
+ topK?: number | "NaN" | "Infinity" | "-Infinity";
3619
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity";
3620
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity";
3621
+ seed?: number | "NaN" | "Infinity" | "-Infinity";
3622
+ stop?: Array<string>;
3623
+ };
3624
+ options?: {
3625
+ [key: string]: unknown;
3626
+ };
3577
3627
  variant?: string;
3578
3628
  };
3579
3629
  variants: Array<{
@@ -3584,6 +3634,19 @@ export type ModelV2Info1 = {
3584
3634
  body: {
3585
3635
  [key: string]: unknown;
3586
3636
  };
3637
+ generation?: {
3638
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity";
3639
+ temperature?: number | "NaN" | "Infinity" | "-Infinity";
3640
+ topP?: number | "NaN" | "Infinity" | "-Infinity";
3641
+ topK?: number | "NaN" | "Infinity" | "-Infinity";
3642
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity";
3643
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity";
3644
+ seed?: number | "NaN" | "Infinity" | "-Infinity";
3645
+ stop?: Array<string>;
3646
+ };
3647
+ options?: {
3648
+ [key: string]: unknown;
3649
+ };
3587
3650
  }>;
3588
3651
  time: {
3589
3652
  released: number | "NaN" | "Infinity" | "-Infinity";
@@ -3740,6 +3803,14 @@ export type EventSessionNextPromptPromoted = {
3740
3803
  timeCreated: number;
3741
3804
  };
3742
3805
  };
3806
+ export type EventSessionNextInterruptRequested = {
3807
+ id: string;
3808
+ type: "session.next.interrupt.requested";
3809
+ properties: {
3810
+ timestamp: number;
3811
+ sessionID: string;
3812
+ };
3813
+ };
3743
3814
  export type EventSessionNextContextUpdated = {
3744
3815
  id: string;
3745
3816
  type: "session.next.context.updated";
@@ -3983,6 +4054,7 @@ export type EventSessionNextToolSuccess = {
3983
4054
  [key: string]: unknown;
3984
4055
  };
3985
4056
  content: Array<ToolTextContent | ToolFileContent>;
4057
+ outputPaths?: Array<string>;
3986
4058
  result?: unknown;
3987
4059
  provider: {
3988
4060
  executed: boolean;
@@ -4040,6 +4112,7 @@ export type EventSessionNextCompactionDelta = {
4040
4112
  properties: {
4041
4113
  timestamp: number;
4042
4114
  sessionID: string;
4115
+ messageID: string;
4043
4116
  text: string;
4044
4117
  };
4045
4118
  };
@@ -4049,8 +4122,10 @@ export type EventSessionNextCompactionEnded = {
4049
4122
  properties: {
4050
4123
  timestamp: number;
4051
4124
  sessionID: string;
4125
+ messageID: string;
4126
+ reason: "auto" | "manual";
4052
4127
  text: string;
4053
- include?: string;
4128
+ recent: string;
4054
4129
  };
4055
4130
  };
4056
4131
  export type EventMessagePartDelta = {
@@ -4148,6 +4223,13 @@ export type EventPermissionV2Replied = {
4148
4223
  reply: PermissionV2Reply;
4149
4224
  };
4150
4225
  };
4226
+ export type EventReferenceUpdated = {
4227
+ id: string;
4228
+ type: "reference.updated";
4229
+ properties: {
4230
+ [key: string]: unknown;
4231
+ };
4232
+ };
4151
4233
  export type EventFileWatcherUpdated = {
4152
4234
  id: string;
4153
4235
  type: "file.watcher.updated";
@@ -4316,6 +4398,13 @@ export type EventProjectUpdated = {
4316
4398
  sandboxes: Array<string>;
4317
4399
  };
4318
4400
  };
4401
+ export type EventVcsBranchUpdated = {
4402
+ id: string;
4403
+ type: "vcs.branch.updated";
4404
+ properties: {
4405
+ branch?: string;
4406
+ };
4407
+ };
4319
4408
  export type EventQuestionAsked = {
4320
4409
  id: string;
4321
4410
  type: "question.asked";
@@ -4368,13 +4457,6 @@ export type EventSessionCompacted = {
4368
4457
  sessionID: string;
4369
4458
  };
4370
4459
  };
4371
- export type EventVcsBranchUpdated = {
4372
- id: string;
4373
- type: "vcs.branch.updated";
4374
- properties: {
4375
- branch?: string;
4376
- };
4377
- };
4378
4460
  export type EventWorktreeReady = {
4379
4461
  id: string;
4380
4462
  type: "worktree.ready";
@@ -5884,12 +5966,12 @@ export type ProjectDirectoriesResponse = ProjectDirectoriesResponses[keyof Proje
5884
5966
  export type ExperimentalProjectCopyRemoveData = {
5885
5967
  body?: {
5886
5968
  directory: string;
5969
+ force: boolean;
5887
5970
  };
5888
5971
  path: {
5889
5972
  projectID: string;
5890
5973
  };
5891
5974
  query?: {
5892
- directory?: string;
5893
5975
  workspace?: string;
5894
5976
  };
5895
5977
  url: "/experimental/project/{projectID}/copy";
@@ -6735,7 +6817,7 @@ export type SessionMessagesResponses = {
6735
6817
  parts: Array<Part>;
6736
6818
  }>;
6737
6819
  };
6738
- export type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];
6820
+ export type SessionMessagesResponse2 = SessionMessagesResponses[keyof SessionMessagesResponses];
6739
6821
  export type SessionPromptData = {
6740
6822
  body?: {
6741
6823
  messageID?: string;
@@ -8047,9 +8129,9 @@ export type V2SessionListErrors = {
8047
8129
  export type V2SessionListError = V2SessionListErrors[keyof V2SessionListErrors];
8048
8130
  export type V2SessionListResponses = {
8049
8131
  /**
8050
- * V2SessionsResponse
8132
+ * SessionsResponse
8051
8133
  */
8052
- 200: V2SessionsResponse;
8134
+ 200: SessionsResponse;
8053
8135
  };
8054
8136
  export type V2SessionListResponse = V2SessionListResponses[keyof V2SessionListResponses];
8055
8137
  export type V2SessionPromptData = {
@@ -8233,11 +8315,11 @@ export type V2SessionMessagesErrors = {
8233
8315
  export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors];
8234
8316
  export type V2SessionMessagesResponses = {
8235
8317
  /**
8236
- * V2SessionMessagesResponse
8318
+ * SessionMessagesResponse
8237
8319
  */
8238
- 200: V2SessionMessagesResponse;
8320
+ 200: SessionMessagesResponse;
8239
8321
  };
8240
- export type V2SessionMessagesResponse2 = V2SessionMessagesResponses[keyof V2SessionMessagesResponses];
8322
+ export type V2SessionMessagesResponse = V2SessionMessagesResponses[keyof V2SessionMessagesResponses];
8241
8323
  export type V2ModelListData = {
8242
8324
  body?: never;
8243
8325
  path?: never;
@@ -8384,15 +8466,15 @@ export type V2PermissionRequestListResponses = {
8384
8466
  };
8385
8467
  };
8386
8468
  export type V2PermissionRequestListResponse = V2PermissionRequestListResponses[keyof V2PermissionRequestListResponses];
8387
- export type V2SessionPermissionListData = {
8469
+ export type V2PermissionSavedListData = {
8388
8470
  body?: never;
8389
- path: {
8390
- sessionID: string;
8471
+ path?: never;
8472
+ query?: {
8473
+ projectID?: string;
8391
8474
  };
8392
- query?: never;
8393
- url: "/api/session/{sessionID}/permission/request";
8475
+ url: "/api/permission/saved";
8394
8476
  };
8395
- export type V2SessionPermissionListErrors = {
8477
+ export type V2PermissionSavedListErrors = {
8396
8478
  /**
8397
8479
  * InvalidRequestError
8398
8480
  */
@@ -8401,34 +8483,26 @@ export type V2SessionPermissionListErrors = {
8401
8483
  * UnauthorizedError
8402
8484
  */
8403
8485
  401: UnauthorizedError;
8404
- /**
8405
- * SessionNotFoundError
8406
- */
8407
- 404: SessionNotFoundError;
8408
8486
  };
8409
- export type V2SessionPermissionListError = V2SessionPermissionListErrors[keyof V2SessionPermissionListErrors];
8410
- export type V2SessionPermissionListResponses = {
8487
+ export type V2PermissionSavedListError = V2PermissionSavedListErrors[keyof V2PermissionSavedListErrors];
8488
+ export type V2PermissionSavedListResponses = {
8411
8489
  /**
8412
8490
  * Success
8413
8491
  */
8414
8492
  200: {
8415
- data: Array<PermissionV2Request>;
8493
+ data: Array<PermissionSavedInfo>;
8416
8494
  };
8417
8495
  };
8418
- export type V2SessionPermissionListResponse = V2SessionPermissionListResponses[keyof V2SessionPermissionListResponses];
8419
- export type V2SessionPermissionReplyData = {
8420
- body: {
8421
- reply: PermissionV2Reply;
8422
- message?: string;
8423
- };
8496
+ export type V2PermissionSavedListResponse = V2PermissionSavedListResponses[keyof V2PermissionSavedListResponses];
8497
+ export type V2PermissionSavedRemoveData = {
8498
+ body?: never;
8424
8499
  path: {
8425
- sessionID: string;
8426
- requestID: string;
8500
+ id: string;
8427
8501
  };
8428
8502
  query?: never;
8429
- url: "/api/session/{sessionID}/permission/request/{requestID}/reply";
8503
+ url: "/api/permission/saved/{id}";
8430
8504
  };
8431
- export type V2SessionPermissionReplyErrors = {
8505
+ export type V2PermissionSavedRemoveErrors = {
8432
8506
  /**
8433
8507
  * InvalidRequestError
8434
8508
  */
@@ -8437,28 +8511,24 @@ export type V2SessionPermissionReplyErrors = {
8437
8511
  * UnauthorizedError
8438
8512
  */
8439
8513
  401: UnauthorizedError;
8440
- /**
8441
- * SessionNotFoundError | PermissionNotFoundError
8442
- */
8443
- 404: SessionNotFoundError | PermissionNotFoundError;
8444
8514
  };
8445
- export type V2SessionPermissionReplyError = V2SessionPermissionReplyErrors[keyof V2SessionPermissionReplyErrors];
8446
- export type V2SessionPermissionReplyResponses = {
8515
+ export type V2PermissionSavedRemoveError = V2PermissionSavedRemoveErrors[keyof V2PermissionSavedRemoveErrors];
8516
+ export type V2PermissionSavedRemoveResponses = {
8447
8517
  /**
8448
8518
  * <No Content>
8449
8519
  */
8450
8520
  204: void;
8451
8521
  };
8452
- export type V2SessionPermissionReplyResponse = V2SessionPermissionReplyResponses[keyof V2SessionPermissionReplyResponses];
8453
- export type V2PermissionSavedListData = {
8522
+ export type V2PermissionSavedRemoveResponse = V2PermissionSavedRemoveResponses[keyof V2PermissionSavedRemoveResponses];
8523
+ export type V2SessionPermissionListData = {
8454
8524
  body?: never;
8455
- path?: never;
8456
- query?: {
8457
- projectID?: string;
8525
+ path: {
8526
+ sessionID: string;
8458
8527
  };
8459
- url: "/api/permission/saved";
8528
+ query?: never;
8529
+ url: "/api/session/{sessionID}/permission";
8460
8530
  };
8461
- export type V2PermissionSavedListErrors = {
8531
+ export type V2SessionPermissionListErrors = {
8462
8532
  /**
8463
8533
  * InvalidRequestError
8464
8534
  */
@@ -8467,26 +8537,34 @@ export type V2PermissionSavedListErrors = {
8467
8537
  * UnauthorizedError
8468
8538
  */
8469
8539
  401: UnauthorizedError;
8540
+ /**
8541
+ * SessionNotFoundError
8542
+ */
8543
+ 404: SessionNotFoundError;
8470
8544
  };
8471
- export type V2PermissionSavedListError = V2PermissionSavedListErrors[keyof V2PermissionSavedListErrors];
8472
- export type V2PermissionSavedListResponses = {
8545
+ export type V2SessionPermissionListError = V2SessionPermissionListErrors[keyof V2SessionPermissionListErrors];
8546
+ export type V2SessionPermissionListResponses = {
8473
8547
  /**
8474
8548
  * Success
8475
8549
  */
8476
8550
  200: {
8477
- data: Array<PermissionSavedInfo>;
8551
+ data: Array<PermissionV2Request>;
8478
8552
  };
8479
8553
  };
8480
- export type V2PermissionSavedListResponse = V2PermissionSavedListResponses[keyof V2PermissionSavedListResponses];
8481
- export type V2PermissionSavedRemoveData = {
8482
- body?: never;
8554
+ export type V2SessionPermissionListResponse = V2SessionPermissionListResponses[keyof V2SessionPermissionListResponses];
8555
+ export type V2SessionPermissionReplyData = {
8556
+ body: {
8557
+ reply: PermissionV2Reply;
8558
+ message?: string;
8559
+ };
8483
8560
  path: {
8484
- id: string;
8561
+ sessionID: string;
8562
+ requestID: string;
8485
8563
  };
8486
8564
  query?: never;
8487
- url: "/api/permission/saved/{id}";
8565
+ url: "/api/session/{sessionID}/permission/{requestID}/reply";
8488
8566
  };
8489
- export type V2PermissionSavedRemoveErrors = {
8567
+ export type V2SessionPermissionReplyErrors = {
8490
8568
  /**
8491
8569
  * InvalidRequestError
8492
8570
  */
@@ -8495,15 +8573,19 @@ export type V2PermissionSavedRemoveErrors = {
8495
8573
  * UnauthorizedError
8496
8574
  */
8497
8575
  401: UnauthorizedError;
8576
+ /**
8577
+ * SessionNotFoundError | PermissionNotFoundError
8578
+ */
8579
+ 404: PermissionNotFoundError | SessionNotFoundError;
8498
8580
  };
8499
- export type V2PermissionSavedRemoveError = V2PermissionSavedRemoveErrors[keyof V2PermissionSavedRemoveErrors];
8500
- export type V2PermissionSavedRemoveResponses = {
8581
+ export type V2SessionPermissionReplyError = V2SessionPermissionReplyErrors[keyof V2SessionPermissionReplyErrors];
8582
+ export type V2SessionPermissionReplyResponses = {
8501
8583
  /**
8502
8584
  * <No Content>
8503
8585
  */
8504
8586
  204: void;
8505
8587
  };
8506
- export type V2PermissionSavedRemoveResponse = V2PermissionSavedRemoveResponses[keyof V2PermissionSavedRemoveResponses];
8588
+ export type V2SessionPermissionReplyResponse = V2SessionPermissionReplyResponses[keyof V2SessionPermissionReplyResponses];
8507
8589
  export type V2FsReadData = {
8508
8590
  body?: never;
8509
8591
  path?: never;
@@ -8513,7 +8595,6 @@ export type V2FsReadData = {
8513
8595
  workspace?: string;
8514
8596
  };
8515
8597
  path: string;
8516
- reference?: string;
8517
8598
  };
8518
8599
  url: "/api/fs/read";
8519
8600
  };
@@ -8534,7 +8615,7 @@ export type V2FsReadResponses = {
8534
8615
  */
8535
8616
  200: {
8536
8617
  location: LocationInfo;
8537
- data: FileSystemTextContent | FileSystemBinaryContent;
8618
+ data: FileSystemContent;
8538
8619
  };
8539
8620
  };
8540
8621
  export type V2FsReadResponse = V2FsReadResponses[keyof V2FsReadResponses];
@@ -8547,7 +8628,6 @@ export type V2FsListData = {
8547
8628
  workspace?: string;
8548
8629
  };
8549
8630
  path?: string;
8550
- reference?: string;
8551
8631
  };
8552
8632
  url: "/api/fs/list";
8553
8633
  };
@@ -8572,6 +8652,41 @@ export type V2FsListResponses = {
8572
8652
  };
8573
8653
  };
8574
8654
  export type V2FsListResponse = V2FsListResponses[keyof V2FsListResponses];
8655
+ export type V2FsFindData = {
8656
+ body?: never;
8657
+ path?: never;
8658
+ query: {
8659
+ location?: {
8660
+ directory?: string;
8661
+ workspace?: string;
8662
+ };
8663
+ query: string;
8664
+ type?: "file" | "directory";
8665
+ limit?: string;
8666
+ };
8667
+ url: "/api/fs/find";
8668
+ };
8669
+ export type V2FsFindErrors = {
8670
+ /**
8671
+ * InvalidRequestError
8672
+ */
8673
+ 400: InvalidRequestError;
8674
+ /**
8675
+ * UnauthorizedError
8676
+ */
8677
+ 401: UnauthorizedError;
8678
+ };
8679
+ export type V2FsFindError = V2FsFindErrors[keyof V2FsFindErrors];
8680
+ export type V2FsFindResponses = {
8681
+ /**
8682
+ * Success
8683
+ */
8684
+ 200: {
8685
+ location: LocationInfo;
8686
+ data: Array<FileSystemEntry>;
8687
+ };
8688
+ };
8689
+ export type V2FsFindResponse = V2FsFindResponses[keyof V2FsFindResponses];
8575
8690
  export type V2CommandListData = {
8576
8691
  body?: never;
8577
8692
  path?: never;
@@ -8704,7 +8819,7 @@ export type V2SessionQuestionReplyData = {
8704
8819
  requestID: string;
8705
8820
  };
8706
8821
  query?: never;
8707
- url: "/api/session/{sessionID}/question/request/{requestID}/reply";
8822
+ url: "/api/session/{sessionID}/question/{requestID}/reply";
8708
8823
  };
8709
8824
  export type V2SessionQuestionReplyErrors = {
8710
8825
  /**
@@ -8718,7 +8833,7 @@ export type V2SessionQuestionReplyErrors = {
8718
8833
  /**
8719
8834
  * SessionNotFoundError | QuestionNotFoundError
8720
8835
  */
8721
- 404: SessionNotFoundError | QuestionNotFoundError;
8836
+ 404: QuestionNotFoundError | SessionNotFoundError;
8722
8837
  };
8723
8838
  export type V2SessionQuestionReplyError = V2SessionQuestionReplyErrors[keyof V2SessionQuestionReplyErrors];
8724
8839
  export type V2SessionQuestionReplyResponses = {
@@ -8735,7 +8850,7 @@ export type V2SessionQuestionRejectData = {
8735
8850
  requestID: string;
8736
8851
  };
8737
8852
  query?: never;
8738
- url: "/api/session/{sessionID}/question/request/{requestID}/reject";
8853
+ url: "/api/session/{sessionID}/question/{requestID}/reject";
8739
8854
  };
8740
8855
  export type V2SessionQuestionRejectErrors = {
8741
8856
  /**
@@ -8749,7 +8864,7 @@ export type V2SessionQuestionRejectErrors = {
8749
8864
  /**
8750
8865
  * SessionNotFoundError | QuestionNotFoundError
8751
8866
  */
8752
- 404: SessionNotFoundError | QuestionNotFoundError;
8867
+ 404: QuestionNotFoundError | SessionNotFoundError;
8753
8868
  };
8754
8869
  export type V2SessionQuestionRejectError = V2SessionQuestionRejectErrors[keyof V2SessionQuestionRejectErrors];
8755
8870
  export type V2SessionQuestionRejectResponses = {
@@ -8759,6 +8874,38 @@ export type V2SessionQuestionRejectResponses = {
8759
8874
  204: void;
8760
8875
  };
8761
8876
  export type V2SessionQuestionRejectResponse = V2SessionQuestionRejectResponses[keyof V2SessionQuestionRejectResponses];
8877
+ export type V2ReferenceListData = {
8878
+ body?: never;
8879
+ path?: never;
8880
+ query?: {
8881
+ location?: {
8882
+ directory?: string;
8883
+ workspace?: string;
8884
+ };
8885
+ };
8886
+ url: "/api/reference";
8887
+ };
8888
+ export type V2ReferenceListErrors = {
8889
+ /**
8890
+ * InvalidRequestError
8891
+ */
8892
+ 400: InvalidRequestError;
8893
+ /**
8894
+ * UnauthorizedError
8895
+ */
8896
+ 401: UnauthorizedError;
8897
+ };
8898
+ export type V2ReferenceListError = V2ReferenceListErrors[keyof V2ReferenceListErrors];
8899
+ export type V2ReferenceListResponses = {
8900
+ /**
8901
+ * Success
8902
+ */
8903
+ 200: {
8904
+ location: LocationInfo;
8905
+ data: Array<ReferenceInfo>;
8906
+ };
8907
+ };
8908
+ export type V2ReferenceListResponse = V2ReferenceListResponses[keyof V2ReferenceListResponses];
8762
8909
  export type PtyConnectData = {
8763
8910
  body?: never;
8764
8911
  path: {