@opencode-ai/sdk 1.16.2 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1344,21 +1360,6 @@ export type ServerConfig = {
1344
1360
  mdnsDomain?: string;
1345
1361
  cors?: Array<string>;
1346
1362
  };
1347
- export type ReferenceConfigEntry = string | {
1348
- /**
1349
- * Git repository URL, host/path reference, or GitHub owner/repo shorthand
1350
- */
1351
- repository: string;
1352
- branch?: string;
1353
- } | {
1354
- /**
1355
- * Absolute path, ~/ path, or workspace-relative path to a local reference directory
1356
- */
1357
- path: string;
1358
- };
1359
- export type ReferenceConfig = {
1360
- [key: string]: ReferenceConfigEntry;
1361
- };
1362
1363
  export type PermissionActionConfig = "ask" | "allow" | "deny";
1363
1364
  export type PermissionObjectConfig = {
1364
1365
  [key: string]: PermissionActionConfig;
@@ -1446,7 +1447,7 @@ export type ProviderConfig = {
1446
1447
  temperature?: boolean;
1447
1448
  tool_call?: boolean;
1448
1449
  interleaved?: true | {
1449
- field: "reasoning_content" | "reasoning_details";
1450
+ field: "reasoning" | "reasoning_content" | "reasoning_details";
1450
1451
  };
1451
1452
  cost?: {
1452
1453
  input: number;
@@ -1566,7 +1567,12 @@ export type Config = {
1566
1567
  paths?: Array<string>;
1567
1568
  urls?: Array<string>;
1568
1569
  };
1569
- reference?: ReferenceConfig;
1570
+ references?: {
1571
+ [key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal;
1572
+ };
1573
+ reference?: {
1574
+ [key: string]: string | ConfigV2ReferenceGit | ConfigV2ReferenceLocal;
1575
+ };
1570
1576
  watcher?: {
1571
1577
  ignore?: Array<string>;
1572
1578
  };
@@ -1704,7 +1710,7 @@ export type Model = {
1704
1710
  pdf: boolean;
1705
1711
  };
1706
1712
  interleaved: boolean | {
1707
- field: "reasoning_content" | "reasoning_details";
1713
+ field: "reasoning" | "reasoning_content" | "reasoning_details";
1708
1714
  };
1709
1715
  };
1710
1716
  cost: {
@@ -2044,6 +2050,7 @@ export type ProjectCopyError = {
2044
2050
  name: "ProjectCopyError";
2045
2051
  data: {
2046
2052
  message: string;
2053
+ forceRequired?: boolean;
2047
2054
  };
2048
2055
  };
2049
2056
  export type PtyNotFoundError = {
@@ -2242,7 +2249,7 @@ export type UnauthorizedError = {
2242
2249
  _tag: "UnauthorizedError";
2243
2250
  message: string;
2244
2251
  };
2245
- export type V2SessionsResponse = {
2252
+ export type SessionsResponse = {
2246
2253
  data: Array<SessionV2Info>;
2247
2254
  cursor: {
2248
2255
  previous?: string;
@@ -2273,7 +2280,7 @@ export type UnknownError1 = {
2273
2280
  message: string;
2274
2281
  ref?: string;
2275
2282
  };
2276
- export type V2SessionMessagesResponse = {
2283
+ export type SessionMessagesResponse = {
2277
2284
  data: Array<SessionMessage>;
2278
2285
  cursor: {
2279
2286
  previous?: string;
@@ -2358,6 +2365,19 @@ export type ModelV2Info = {
2358
2365
  body: {
2359
2366
  [key: string]: unknown;
2360
2367
  };
2368
+ generation?: {
2369
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2370
+ temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2371
+ topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2372
+ topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2373
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2374
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2375
+ seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2376
+ stop?: Array<string>;
2377
+ };
2378
+ options?: {
2379
+ [key: string]: unknown;
2380
+ };
2361
2381
  variant?: string;
2362
2382
  };
2363
2383
  variants: Array<{
@@ -2368,6 +2388,19 @@ export type ModelV2Info = {
2368
2388
  body: {
2369
2389
  [key: string]: unknown;
2370
2390
  };
2391
+ generation?: {
2392
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2393
+ temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2394
+ topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2395
+ topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2396
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2397
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2398
+ seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
2399
+ stop?: Array<string>;
2400
+ };
2401
+ options?: {
2402
+ [key: string]: unknown;
2403
+ };
2371
2404
  }>;
2372
2405
  time: {
2373
2406
  released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN";
@@ -2412,17 +2445,6 @@ export type PromptAgentAttachment = {
2412
2445
  name: string;
2413
2446
  source?: PromptSource;
2414
2447
  };
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
2448
  export type SessionErrorUnknown = {
2427
2449
  type: "unknown";
2428
2450
  message: string;
@@ -2433,16 +2455,7 @@ export type ToolTextContent = {
2433
2455
  };
2434
2456
  export type ToolFileContent = {
2435
2457
  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
- };
2458
+ uri: string;
2446
2459
  mime: string;
2447
2460
  name?: string;
2448
2461
  };
@@ -2725,6 +2738,20 @@ export type SyncEventSessionNextPromptPromoted = {
2725
2738
  };
2726
2739
  };
2727
2740
  };
2741
+ export type SyncEventSessionNextInterruptRequested = {
2742
+ type: "sync";
2743
+ id: string;
2744
+ syncEvent: {
2745
+ type: "session.next.interrupt.requested.1";
2746
+ id: string;
2747
+ seq: number;
2748
+ aggregateID: string;
2749
+ data: {
2750
+ timestamp: number;
2751
+ sessionID: string;
2752
+ };
2753
+ };
2754
+ };
2728
2755
  export type SyncEventSessionNextContextUpdated = {
2729
2756
  type: "sync";
2730
2757
  id: string;
@@ -3030,6 +3057,7 @@ export type SyncEventSessionNextToolSuccess = {
3030
3057
  [key: string]: unknown;
3031
3058
  };
3032
3059
  content: Array<ToolTextContent | ToolFileContent>;
3060
+ outputPaths?: Array<string>;
3033
3061
  result?: unknown;
3034
3062
  provider: {
3035
3063
  executed: boolean;
@@ -3100,44 +3128,45 @@ export type SyncEventSessionNextCompactionStarted = {
3100
3128
  };
3101
3129
  };
3102
3130
  };
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
3131
  export type SyncEventSessionNextCompactionEnded = {
3119
3132
  type: "sync";
3120
3133
  id: string;
3121
3134
  syncEvent: {
3122
- type: "session.next.compaction.ended.1";
3135
+ type: "session.next.compaction.ended.2";
3123
3136
  id: string;
3124
3137
  seq: number;
3125
3138
  aggregateID: string;
3126
3139
  data: {
3127
3140
  timestamp: number;
3128
3141
  sessionID: string;
3142
+ messageID: string;
3143
+ reason: "auto" | "manual";
3129
3144
  text: string;
3130
- include?: string;
3145
+ recent: string;
3131
3146
  };
3132
3147
  };
3133
3148
  };
3149
+ export type ConfigV2ReferenceGit = {
3150
+ repository: string;
3151
+ branch?: string;
3152
+ description?: string;
3153
+ hidden?: boolean;
3154
+ };
3155
+ export type ConfigV2ReferenceLocal = {
3156
+ path: string;
3157
+ description?: string;
3158
+ hidden?: boolean;
3159
+ };
3134
3160
  export type PolicyEffect = "allow" | "deny";
3135
3161
  export type ConfigV2ExperimentalPolicy = {
3136
3162
  action: "provider.use";
3137
3163
  effect: PolicyEffect;
3138
3164
  resource: string;
3139
3165
  };
3140
- export type ProjectDirectories = Array<string>;
3166
+ export type ProjectDirectories = Array<{
3167
+ directory: string;
3168
+ type: "main" | "root" | "git_worktree";
3169
+ }>;
3141
3170
  export type ProjectCopyCopy = {
3142
3171
  directory: string;
3143
3172
  };
@@ -3254,7 +3283,6 @@ export type SessionMessageUser = {
3254
3283
  text: string;
3255
3284
  files?: Array<PromptFileAttachment>;
3256
3285
  agents?: Array<PromptAgentAttachment>;
3257
- references?: Array<PromptReferenceAttachment>;
3258
3286
  type: "user";
3259
3287
  };
3260
3288
  export type SessionMessageSynthetic = {
@@ -3330,6 +3358,7 @@ export type SessionMessageToolStateCompleted = {
3330
3358
  };
3331
3359
  attachments?: Array<PromptFileAttachment>;
3332
3360
  content: Array<ToolTextContent | ToolFileContent>;
3361
+ outputPaths?: Array<string>;
3333
3362
  structured: {
3334
3363
  [key: string]: unknown;
3335
3364
  };
@@ -3410,7 +3439,7 @@ export type SessionMessageCompaction = {
3410
3439
  type: "compaction";
3411
3440
  reason: "auto" | "manual";
3412
3441
  summary: string;
3413
- include?: string;
3442
+ recent: string;
3414
3443
  id: string;
3415
3444
  metadata?: {
3416
3445
  [key: string]: unknown;
@@ -3476,20 +3505,15 @@ export type PermissionSavedInfo = {
3476
3505
  action: string;
3477
3506
  resource: string;
3478
3507
  };
3479
- export type FileSystemTextContent = {
3480
- type: "text";
3481
- content: string;
3482
- mime: string;
3483
- };
3484
- export type FileSystemBinaryContent = {
3485
- type: "binary";
3508
+ export type FileSystemContent = {
3509
+ uri: string;
3510
+ name?: string;
3486
3511
  content: string;
3487
- encoding: "base64";
3512
+ encoding: "utf8" | "base64";
3488
3513
  mime: string;
3489
3514
  };
3490
3515
  export type FileSystemEntry = {
3491
3516
  path: string;
3492
- uri: string;
3493
3517
  type: "file" | "directory";
3494
3518
  mime: string;
3495
3519
  };
@@ -3527,6 +3551,26 @@ export type QuestionV2Reply = {
3527
3551
  */
3528
3552
  answers: Array<QuestionV2Answer>;
3529
3553
  };
3554
+ export type ReferenceLocalSource = {
3555
+ type: "local";
3556
+ path: string;
3557
+ description?: string;
3558
+ hidden?: boolean;
3559
+ };
3560
+ export type ReferenceGitSource = {
3561
+ type: "git";
3562
+ repository: string;
3563
+ branch?: string;
3564
+ description?: string;
3565
+ hidden?: boolean;
3566
+ };
3567
+ export type ReferenceInfo = {
3568
+ name: string;
3569
+ path: string;
3570
+ description?: string;
3571
+ hidden?: boolean;
3572
+ source: ReferenceLocalSource | ReferenceGitSource;
3573
+ };
3530
3574
  export type EventModelsDevRefreshed = {
3531
3575
  id: string;
3532
3576
  type: "models-dev.refreshed";
@@ -3574,6 +3618,19 @@ export type ModelV2Info1 = {
3574
3618
  body: {
3575
3619
  [key: string]: unknown;
3576
3620
  };
3621
+ generation?: {
3622
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity";
3623
+ temperature?: number | "NaN" | "Infinity" | "-Infinity";
3624
+ topP?: number | "NaN" | "Infinity" | "-Infinity";
3625
+ topK?: number | "NaN" | "Infinity" | "-Infinity";
3626
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity";
3627
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity";
3628
+ seed?: number | "NaN" | "Infinity" | "-Infinity";
3629
+ stop?: Array<string>;
3630
+ };
3631
+ options?: {
3632
+ [key: string]: unknown;
3633
+ };
3577
3634
  variant?: string;
3578
3635
  };
3579
3636
  variants: Array<{
@@ -3584,6 +3641,19 @@ export type ModelV2Info1 = {
3584
3641
  body: {
3585
3642
  [key: string]: unknown;
3586
3643
  };
3644
+ generation?: {
3645
+ maxTokens?: number | "NaN" | "Infinity" | "-Infinity";
3646
+ temperature?: number | "NaN" | "Infinity" | "-Infinity";
3647
+ topP?: number | "NaN" | "Infinity" | "-Infinity";
3648
+ topK?: number | "NaN" | "Infinity" | "-Infinity";
3649
+ frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity";
3650
+ presencePenalty?: number | "NaN" | "Infinity" | "-Infinity";
3651
+ seed?: number | "NaN" | "Infinity" | "-Infinity";
3652
+ stop?: Array<string>;
3653
+ };
3654
+ options?: {
3655
+ [key: string]: unknown;
3656
+ };
3587
3657
  }>;
3588
3658
  time: {
3589
3659
  released: number | "NaN" | "Infinity" | "-Infinity";
@@ -3740,6 +3810,14 @@ export type EventSessionNextPromptPromoted = {
3740
3810
  timeCreated: number;
3741
3811
  };
3742
3812
  };
3813
+ export type EventSessionNextInterruptRequested = {
3814
+ id: string;
3815
+ type: "session.next.interrupt.requested";
3816
+ properties: {
3817
+ timestamp: number;
3818
+ sessionID: string;
3819
+ };
3820
+ };
3743
3821
  export type EventSessionNextContextUpdated = {
3744
3822
  id: string;
3745
3823
  type: "session.next.context.updated";
@@ -3983,6 +4061,7 @@ export type EventSessionNextToolSuccess = {
3983
4061
  [key: string]: unknown;
3984
4062
  };
3985
4063
  content: Array<ToolTextContent | ToolFileContent>;
4064
+ outputPaths?: Array<string>;
3986
4065
  result?: unknown;
3987
4066
  provider: {
3988
4067
  executed: boolean;
@@ -4040,6 +4119,7 @@ export type EventSessionNextCompactionDelta = {
4040
4119
  properties: {
4041
4120
  timestamp: number;
4042
4121
  sessionID: string;
4122
+ messageID: string;
4043
4123
  text: string;
4044
4124
  };
4045
4125
  };
@@ -4049,8 +4129,10 @@ export type EventSessionNextCompactionEnded = {
4049
4129
  properties: {
4050
4130
  timestamp: number;
4051
4131
  sessionID: string;
4132
+ messageID: string;
4133
+ reason: "auto" | "manual";
4052
4134
  text: string;
4053
- include?: string;
4135
+ recent: string;
4054
4136
  };
4055
4137
  };
4056
4138
  export type EventMessagePartDelta = {
@@ -4148,6 +4230,13 @@ export type EventPermissionV2Replied = {
4148
4230
  reply: PermissionV2Reply;
4149
4231
  };
4150
4232
  };
4233
+ export type EventReferenceUpdated = {
4234
+ id: string;
4235
+ type: "reference.updated";
4236
+ properties: {
4237
+ [key: string]: unknown;
4238
+ };
4239
+ };
4151
4240
  export type EventFileWatcherUpdated = {
4152
4241
  id: string;
4153
4242
  type: "file.watcher.updated";
@@ -4316,6 +4405,13 @@ export type EventProjectUpdated = {
4316
4405
  sandboxes: Array<string>;
4317
4406
  };
4318
4407
  };
4408
+ export type EventVcsBranchUpdated = {
4409
+ id: string;
4410
+ type: "vcs.branch.updated";
4411
+ properties: {
4412
+ branch?: string;
4413
+ };
4414
+ };
4319
4415
  export type EventQuestionAsked = {
4320
4416
  id: string;
4321
4417
  type: "question.asked";
@@ -4368,13 +4464,6 @@ export type EventSessionCompacted = {
4368
4464
  sessionID: string;
4369
4465
  };
4370
4466
  };
4371
- export type EventVcsBranchUpdated = {
4372
- id: string;
4373
- type: "vcs.branch.updated";
4374
- properties: {
4375
- branch?: string;
4376
- };
4377
- };
4378
4467
  export type EventWorktreeReady = {
4379
4468
  id: string;
4380
4469
  type: "worktree.ready";
@@ -5884,12 +5973,12 @@ export type ProjectDirectoriesResponse = ProjectDirectoriesResponses[keyof Proje
5884
5973
  export type ExperimentalProjectCopyRemoveData = {
5885
5974
  body?: {
5886
5975
  directory: string;
5976
+ force: boolean;
5887
5977
  };
5888
5978
  path: {
5889
5979
  projectID: string;
5890
5980
  };
5891
5981
  query?: {
5892
- directory?: string;
5893
5982
  workspace?: string;
5894
5983
  };
5895
5984
  url: "/experimental/project/{projectID}/copy";
@@ -6735,7 +6824,7 @@ export type SessionMessagesResponses = {
6735
6824
  parts: Array<Part>;
6736
6825
  }>;
6737
6826
  };
6738
- export type SessionMessagesResponse = SessionMessagesResponses[keyof SessionMessagesResponses];
6827
+ export type SessionMessagesResponse2 = SessionMessagesResponses[keyof SessionMessagesResponses];
6739
6828
  export type SessionPromptData = {
6740
6829
  body?: {
6741
6830
  messageID?: string;
@@ -8047,9 +8136,9 @@ export type V2SessionListErrors = {
8047
8136
  export type V2SessionListError = V2SessionListErrors[keyof V2SessionListErrors];
8048
8137
  export type V2SessionListResponses = {
8049
8138
  /**
8050
- * V2SessionsResponse
8139
+ * SessionsResponse
8051
8140
  */
8052
- 200: V2SessionsResponse;
8141
+ 200: SessionsResponse;
8053
8142
  };
8054
8143
  export type V2SessionListResponse = V2SessionListResponses[keyof V2SessionListResponses];
8055
8144
  export type V2SessionPromptData = {
@@ -8233,11 +8322,11 @@ export type V2SessionMessagesErrors = {
8233
8322
  export type V2SessionMessagesError = V2SessionMessagesErrors[keyof V2SessionMessagesErrors];
8234
8323
  export type V2SessionMessagesResponses = {
8235
8324
  /**
8236
- * V2SessionMessagesResponse
8325
+ * SessionMessagesResponse
8237
8326
  */
8238
- 200: V2SessionMessagesResponse;
8327
+ 200: SessionMessagesResponse;
8239
8328
  };
8240
- export type V2SessionMessagesResponse2 = V2SessionMessagesResponses[keyof V2SessionMessagesResponses];
8329
+ export type V2SessionMessagesResponse = V2SessionMessagesResponses[keyof V2SessionMessagesResponses];
8241
8330
  export type V2ModelListData = {
8242
8331
  body?: never;
8243
8332
  path?: never;
@@ -8384,15 +8473,15 @@ export type V2PermissionRequestListResponses = {
8384
8473
  };
8385
8474
  };
8386
8475
  export type V2PermissionRequestListResponse = V2PermissionRequestListResponses[keyof V2PermissionRequestListResponses];
8387
- export type V2SessionPermissionListData = {
8476
+ export type V2PermissionSavedListData = {
8388
8477
  body?: never;
8389
- path: {
8390
- sessionID: string;
8478
+ path?: never;
8479
+ query?: {
8480
+ projectID?: string;
8391
8481
  };
8392
- query?: never;
8393
- url: "/api/session/{sessionID}/permission/request";
8482
+ url: "/api/permission/saved";
8394
8483
  };
8395
- export type V2SessionPermissionListErrors = {
8484
+ export type V2PermissionSavedListErrors = {
8396
8485
  /**
8397
8486
  * InvalidRequestError
8398
8487
  */
@@ -8401,34 +8490,26 @@ export type V2SessionPermissionListErrors = {
8401
8490
  * UnauthorizedError
8402
8491
  */
8403
8492
  401: UnauthorizedError;
8404
- /**
8405
- * SessionNotFoundError
8406
- */
8407
- 404: SessionNotFoundError;
8408
8493
  };
8409
- export type V2SessionPermissionListError = V2SessionPermissionListErrors[keyof V2SessionPermissionListErrors];
8410
- export type V2SessionPermissionListResponses = {
8494
+ export type V2PermissionSavedListError = V2PermissionSavedListErrors[keyof V2PermissionSavedListErrors];
8495
+ export type V2PermissionSavedListResponses = {
8411
8496
  /**
8412
8497
  * Success
8413
8498
  */
8414
8499
  200: {
8415
- data: Array<PermissionV2Request>;
8500
+ data: Array<PermissionSavedInfo>;
8416
8501
  };
8417
8502
  };
8418
- export type V2SessionPermissionListResponse = V2SessionPermissionListResponses[keyof V2SessionPermissionListResponses];
8419
- export type V2SessionPermissionReplyData = {
8420
- body: {
8421
- reply: PermissionV2Reply;
8422
- message?: string;
8423
- };
8503
+ export type V2PermissionSavedListResponse = V2PermissionSavedListResponses[keyof V2PermissionSavedListResponses];
8504
+ export type V2PermissionSavedRemoveData = {
8505
+ body?: never;
8424
8506
  path: {
8425
- sessionID: string;
8426
- requestID: string;
8507
+ id: string;
8427
8508
  };
8428
8509
  query?: never;
8429
- url: "/api/session/{sessionID}/permission/request/{requestID}/reply";
8510
+ url: "/api/permission/saved/{id}";
8430
8511
  };
8431
- export type V2SessionPermissionReplyErrors = {
8512
+ export type V2PermissionSavedRemoveErrors = {
8432
8513
  /**
8433
8514
  * InvalidRequestError
8434
8515
  */
@@ -8437,28 +8518,24 @@ export type V2SessionPermissionReplyErrors = {
8437
8518
  * UnauthorizedError
8438
8519
  */
8439
8520
  401: UnauthorizedError;
8440
- /**
8441
- * SessionNotFoundError | PermissionNotFoundError
8442
- */
8443
- 404: SessionNotFoundError | PermissionNotFoundError;
8444
8521
  };
8445
- export type V2SessionPermissionReplyError = V2SessionPermissionReplyErrors[keyof V2SessionPermissionReplyErrors];
8446
- export type V2SessionPermissionReplyResponses = {
8522
+ export type V2PermissionSavedRemoveError = V2PermissionSavedRemoveErrors[keyof V2PermissionSavedRemoveErrors];
8523
+ export type V2PermissionSavedRemoveResponses = {
8447
8524
  /**
8448
8525
  * <No Content>
8449
8526
  */
8450
8527
  204: void;
8451
8528
  };
8452
- export type V2SessionPermissionReplyResponse = V2SessionPermissionReplyResponses[keyof V2SessionPermissionReplyResponses];
8453
- export type V2PermissionSavedListData = {
8529
+ export type V2PermissionSavedRemoveResponse = V2PermissionSavedRemoveResponses[keyof V2PermissionSavedRemoveResponses];
8530
+ export type V2SessionPermissionListData = {
8454
8531
  body?: never;
8455
- path?: never;
8456
- query?: {
8457
- projectID?: string;
8532
+ path: {
8533
+ sessionID: string;
8458
8534
  };
8459
- url: "/api/permission/saved";
8535
+ query?: never;
8536
+ url: "/api/session/{sessionID}/permission";
8460
8537
  };
8461
- export type V2PermissionSavedListErrors = {
8538
+ export type V2SessionPermissionListErrors = {
8462
8539
  /**
8463
8540
  * InvalidRequestError
8464
8541
  */
@@ -8467,26 +8544,34 @@ export type V2PermissionSavedListErrors = {
8467
8544
  * UnauthorizedError
8468
8545
  */
8469
8546
  401: UnauthorizedError;
8547
+ /**
8548
+ * SessionNotFoundError
8549
+ */
8550
+ 404: SessionNotFoundError;
8470
8551
  };
8471
- export type V2PermissionSavedListError = V2PermissionSavedListErrors[keyof V2PermissionSavedListErrors];
8472
- export type V2PermissionSavedListResponses = {
8552
+ export type V2SessionPermissionListError = V2SessionPermissionListErrors[keyof V2SessionPermissionListErrors];
8553
+ export type V2SessionPermissionListResponses = {
8473
8554
  /**
8474
8555
  * Success
8475
8556
  */
8476
8557
  200: {
8477
- data: Array<PermissionSavedInfo>;
8558
+ data: Array<PermissionV2Request>;
8478
8559
  };
8479
8560
  };
8480
- export type V2PermissionSavedListResponse = V2PermissionSavedListResponses[keyof V2PermissionSavedListResponses];
8481
- export type V2PermissionSavedRemoveData = {
8482
- body?: never;
8561
+ export type V2SessionPermissionListResponse = V2SessionPermissionListResponses[keyof V2SessionPermissionListResponses];
8562
+ export type V2SessionPermissionReplyData = {
8563
+ body: {
8564
+ reply: PermissionV2Reply;
8565
+ message?: string;
8566
+ };
8483
8567
  path: {
8484
- id: string;
8568
+ sessionID: string;
8569
+ requestID: string;
8485
8570
  };
8486
8571
  query?: never;
8487
- url: "/api/permission/saved/{id}";
8572
+ url: "/api/session/{sessionID}/permission/{requestID}/reply";
8488
8573
  };
8489
- export type V2PermissionSavedRemoveErrors = {
8574
+ export type V2SessionPermissionReplyErrors = {
8490
8575
  /**
8491
8576
  * InvalidRequestError
8492
8577
  */
@@ -8495,15 +8580,19 @@ export type V2PermissionSavedRemoveErrors = {
8495
8580
  * UnauthorizedError
8496
8581
  */
8497
8582
  401: UnauthorizedError;
8583
+ /**
8584
+ * SessionNotFoundError | PermissionNotFoundError
8585
+ */
8586
+ 404: PermissionNotFoundError | SessionNotFoundError;
8498
8587
  };
8499
- export type V2PermissionSavedRemoveError = V2PermissionSavedRemoveErrors[keyof V2PermissionSavedRemoveErrors];
8500
- export type V2PermissionSavedRemoveResponses = {
8588
+ export type V2SessionPermissionReplyError = V2SessionPermissionReplyErrors[keyof V2SessionPermissionReplyErrors];
8589
+ export type V2SessionPermissionReplyResponses = {
8501
8590
  /**
8502
8591
  * <No Content>
8503
8592
  */
8504
8593
  204: void;
8505
8594
  };
8506
- export type V2PermissionSavedRemoveResponse = V2PermissionSavedRemoveResponses[keyof V2PermissionSavedRemoveResponses];
8595
+ export type V2SessionPermissionReplyResponse = V2SessionPermissionReplyResponses[keyof V2SessionPermissionReplyResponses];
8507
8596
  export type V2FsReadData = {
8508
8597
  body?: never;
8509
8598
  path?: never;
@@ -8513,7 +8602,6 @@ export type V2FsReadData = {
8513
8602
  workspace?: string;
8514
8603
  };
8515
8604
  path: string;
8516
- reference?: string;
8517
8605
  };
8518
8606
  url: "/api/fs/read";
8519
8607
  };
@@ -8534,7 +8622,7 @@ export type V2FsReadResponses = {
8534
8622
  */
8535
8623
  200: {
8536
8624
  location: LocationInfo;
8537
- data: FileSystemTextContent | FileSystemBinaryContent;
8625
+ data: FileSystemContent;
8538
8626
  };
8539
8627
  };
8540
8628
  export type V2FsReadResponse = V2FsReadResponses[keyof V2FsReadResponses];
@@ -8547,7 +8635,6 @@ export type V2FsListData = {
8547
8635
  workspace?: string;
8548
8636
  };
8549
8637
  path?: string;
8550
- reference?: string;
8551
8638
  };
8552
8639
  url: "/api/fs/list";
8553
8640
  };
@@ -8572,6 +8659,41 @@ export type V2FsListResponses = {
8572
8659
  };
8573
8660
  };
8574
8661
  export type V2FsListResponse = V2FsListResponses[keyof V2FsListResponses];
8662
+ export type V2FsFindData = {
8663
+ body?: never;
8664
+ path?: never;
8665
+ query: {
8666
+ location?: {
8667
+ directory?: string;
8668
+ workspace?: string;
8669
+ };
8670
+ query: string;
8671
+ type?: "file" | "directory";
8672
+ limit?: string;
8673
+ };
8674
+ url: "/api/fs/find";
8675
+ };
8676
+ export type V2FsFindErrors = {
8677
+ /**
8678
+ * InvalidRequestError
8679
+ */
8680
+ 400: InvalidRequestError;
8681
+ /**
8682
+ * UnauthorizedError
8683
+ */
8684
+ 401: UnauthorizedError;
8685
+ };
8686
+ export type V2FsFindError = V2FsFindErrors[keyof V2FsFindErrors];
8687
+ export type V2FsFindResponses = {
8688
+ /**
8689
+ * Success
8690
+ */
8691
+ 200: {
8692
+ location: LocationInfo;
8693
+ data: Array<FileSystemEntry>;
8694
+ };
8695
+ };
8696
+ export type V2FsFindResponse = V2FsFindResponses[keyof V2FsFindResponses];
8575
8697
  export type V2CommandListData = {
8576
8698
  body?: never;
8577
8699
  path?: never;
@@ -8704,7 +8826,7 @@ export type V2SessionQuestionReplyData = {
8704
8826
  requestID: string;
8705
8827
  };
8706
8828
  query?: never;
8707
- url: "/api/session/{sessionID}/question/request/{requestID}/reply";
8829
+ url: "/api/session/{sessionID}/question/{requestID}/reply";
8708
8830
  };
8709
8831
  export type V2SessionQuestionReplyErrors = {
8710
8832
  /**
@@ -8718,7 +8840,7 @@ export type V2SessionQuestionReplyErrors = {
8718
8840
  /**
8719
8841
  * SessionNotFoundError | QuestionNotFoundError
8720
8842
  */
8721
- 404: SessionNotFoundError | QuestionNotFoundError;
8843
+ 404: QuestionNotFoundError | SessionNotFoundError;
8722
8844
  };
8723
8845
  export type V2SessionQuestionReplyError = V2SessionQuestionReplyErrors[keyof V2SessionQuestionReplyErrors];
8724
8846
  export type V2SessionQuestionReplyResponses = {
@@ -8735,7 +8857,7 @@ export type V2SessionQuestionRejectData = {
8735
8857
  requestID: string;
8736
8858
  };
8737
8859
  query?: never;
8738
- url: "/api/session/{sessionID}/question/request/{requestID}/reject";
8860
+ url: "/api/session/{sessionID}/question/{requestID}/reject";
8739
8861
  };
8740
8862
  export type V2SessionQuestionRejectErrors = {
8741
8863
  /**
@@ -8749,7 +8871,7 @@ export type V2SessionQuestionRejectErrors = {
8749
8871
  /**
8750
8872
  * SessionNotFoundError | QuestionNotFoundError
8751
8873
  */
8752
- 404: SessionNotFoundError | QuestionNotFoundError;
8874
+ 404: QuestionNotFoundError | SessionNotFoundError;
8753
8875
  };
8754
8876
  export type V2SessionQuestionRejectError = V2SessionQuestionRejectErrors[keyof V2SessionQuestionRejectErrors];
8755
8877
  export type V2SessionQuestionRejectResponses = {
@@ -8759,6 +8881,38 @@ export type V2SessionQuestionRejectResponses = {
8759
8881
  204: void;
8760
8882
  };
8761
8883
  export type V2SessionQuestionRejectResponse = V2SessionQuestionRejectResponses[keyof V2SessionQuestionRejectResponses];
8884
+ export type V2ReferenceListData = {
8885
+ body?: never;
8886
+ path?: never;
8887
+ query?: {
8888
+ location?: {
8889
+ directory?: string;
8890
+ workspace?: string;
8891
+ };
8892
+ };
8893
+ url: "/api/reference";
8894
+ };
8895
+ export type V2ReferenceListErrors = {
8896
+ /**
8897
+ * InvalidRequestError
8898
+ */
8899
+ 400: InvalidRequestError;
8900
+ /**
8901
+ * UnauthorizedError
8902
+ */
8903
+ 401: UnauthorizedError;
8904
+ };
8905
+ export type V2ReferenceListError = V2ReferenceListErrors[keyof V2ReferenceListErrors];
8906
+ export type V2ReferenceListResponses = {
8907
+ /**
8908
+ * Success
8909
+ */
8910
+ 200: {
8911
+ location: LocationInfo;
8912
+ data: Array<ReferenceInfo>;
8913
+ };
8914
+ };
8915
+ export type V2ReferenceListResponse = V2ReferenceListResponses[keyof V2ReferenceListResponses];
8762
8916
  export type PtyConnectData = {
8763
8917
  body?: never;
8764
8918
  path: {