@opencode-ai/sdk 1.2.15 → 1.2.16

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.
@@ -138,7 +138,14 @@ export class Project extends HeyApiClient {
138
138
  * Get a list of projects that have been opened with OpenCode.
139
139
  */
140
140
  list(parameters, options) {
141
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
141
+ const params = buildClientParams([parameters], [
142
+ {
143
+ args: [
144
+ { in: "query", key: "directory" },
145
+ { in: "query", key: "workspace" },
146
+ ],
147
+ },
148
+ ]);
142
149
  return (options?.client ?? this.client).get({
143
150
  url: "/project",
144
151
  ...options,
@@ -151,7 +158,14 @@ export class Project extends HeyApiClient {
151
158
  * Retrieve the currently active project that OpenCode is working with.
152
159
  */
153
160
  current(parameters, options) {
154
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
161
+ const params = buildClientParams([parameters], [
162
+ {
163
+ args: [
164
+ { in: "query", key: "directory" },
165
+ { in: "query", key: "workspace" },
166
+ ],
167
+ },
168
+ ]);
155
169
  return (options?.client ?? this.client).get({
156
170
  url: "/project/current",
157
171
  ...options,
@@ -169,6 +183,7 @@ export class Project extends HeyApiClient {
169
183
  args: [
170
184
  { in: "path", key: "projectID" },
171
185
  { in: "query", key: "directory" },
186
+ { in: "query", key: "workspace" },
172
187
  { in: "body", key: "name" },
173
188
  { in: "body", key: "icon" },
174
189
  { in: "body", key: "commands" },
@@ -194,7 +209,14 @@ export class Pty extends HeyApiClient {
194
209
  * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
195
210
  */
196
211
  list(parameters, options) {
197
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
212
+ const params = buildClientParams([parameters], [
213
+ {
214
+ args: [
215
+ { in: "query", key: "directory" },
216
+ { in: "query", key: "workspace" },
217
+ ],
218
+ },
219
+ ]);
198
220
  return (options?.client ?? this.client).get({
199
221
  url: "/pty",
200
222
  ...options,
@@ -211,6 +233,7 @@ export class Pty extends HeyApiClient {
211
233
  {
212
234
  args: [
213
235
  { in: "query", key: "directory" },
236
+ { in: "query", key: "workspace" },
214
237
  { in: "body", key: "command" },
215
238
  { in: "body", key: "args" },
216
239
  { in: "body", key: "cwd" },
@@ -241,6 +264,7 @@ export class Pty extends HeyApiClient {
241
264
  args: [
242
265
  { in: "path", key: "ptyID" },
243
266
  { in: "query", key: "directory" },
267
+ { in: "query", key: "workspace" },
244
268
  ],
245
269
  },
246
270
  ]);
@@ -261,6 +285,7 @@ export class Pty extends HeyApiClient {
261
285
  args: [
262
286
  { in: "path", key: "ptyID" },
263
287
  { in: "query", key: "directory" },
288
+ { in: "query", key: "workspace" },
264
289
  ],
265
290
  },
266
291
  ]);
@@ -281,6 +306,7 @@ export class Pty extends HeyApiClient {
281
306
  args: [
282
307
  { in: "path", key: "ptyID" },
283
308
  { in: "query", key: "directory" },
309
+ { in: "query", key: "workspace" },
284
310
  { in: "body", key: "title" },
285
311
  { in: "body", key: "size" },
286
312
  ],
@@ -308,6 +334,7 @@ export class Pty extends HeyApiClient {
308
334
  args: [
309
335
  { in: "path", key: "ptyID" },
310
336
  { in: "query", key: "directory" },
337
+ { in: "query", key: "workspace" },
311
338
  ],
312
339
  },
313
340
  ]);
@@ -325,7 +352,14 @@ export class Config2 extends HeyApiClient {
325
352
  * Retrieve the current OpenCode configuration settings and preferences.
326
353
  */
327
354
  get(parameters, options) {
328
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
355
+ const params = buildClientParams([parameters], [
356
+ {
357
+ args: [
358
+ { in: "query", key: "directory" },
359
+ { in: "query", key: "workspace" },
360
+ ],
361
+ },
362
+ ]);
329
363
  return (options?.client ?? this.client).get({
330
364
  url: "/config",
331
365
  ...options,
@@ -342,6 +376,7 @@ export class Config2 extends HeyApiClient {
342
376
  {
343
377
  args: [
344
378
  { in: "query", key: "directory" },
379
+ { in: "query", key: "workspace" },
345
380
  { key: "config", map: "body" },
346
381
  ],
347
382
  },
@@ -363,7 +398,14 @@ export class Config2 extends HeyApiClient {
363
398
  * Get a list of all configured AI providers and their default models.
364
399
  */
365
400
  providers(parameters, options) {
366
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
401
+ const params = buildClientParams([parameters], [
402
+ {
403
+ args: [
404
+ { in: "query", key: "directory" },
405
+ { in: "query", key: "workspace" },
406
+ ],
407
+ },
408
+ ]);
367
409
  return (options?.client ?? this.client).get({
368
410
  url: "/config/providers",
369
411
  ...options,
@@ -378,7 +420,14 @@ export class Tool extends HeyApiClient {
378
420
  * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
379
421
  */
380
422
  ids(parameters, options) {
381
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
423
+ const params = buildClientParams([parameters], [
424
+ {
425
+ args: [
426
+ { in: "query", key: "directory" },
427
+ { in: "query", key: "workspace" },
428
+ ],
429
+ },
430
+ ]);
382
431
  return (options?.client ?? this.client).get({
383
432
  url: "/experimental/tool/ids",
384
433
  ...options,
@@ -395,6 +444,7 @@ export class Tool extends HeyApiClient {
395
444
  {
396
445
  args: [
397
446
  { in: "query", key: "directory" },
447
+ { in: "query", key: "workspace" },
398
448
  { in: "query", key: "provider" },
399
449
  { in: "query", key: "model" },
400
450
  ],
@@ -418,6 +468,7 @@ export class Worktree extends HeyApiClient {
418
468
  {
419
469
  args: [
420
470
  { in: "query", key: "directory" },
471
+ { in: "query", key: "workspace" },
421
472
  { key: "worktreeRemoveInput", map: "body" },
422
473
  ],
423
474
  },
@@ -439,7 +490,14 @@ export class Worktree extends HeyApiClient {
439
490
  * List all sandbox worktrees for the current project.
440
491
  */
441
492
  list(parameters, options) {
442
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
493
+ const params = buildClientParams([parameters], [
494
+ {
495
+ args: [
496
+ { in: "query", key: "directory" },
497
+ { in: "query", key: "workspace" },
498
+ ],
499
+ },
500
+ ]);
443
501
  return (options?.client ?? this.client).get({
444
502
  url: "/experimental/worktree",
445
503
  ...options,
@@ -456,6 +514,7 @@ export class Worktree extends HeyApiClient {
456
514
  {
457
515
  args: [
458
516
  { in: "query", key: "directory" },
517
+ { in: "query", key: "workspace" },
459
518
  { key: "worktreeCreateInput", map: "body" },
460
519
  ],
461
520
  },
@@ -481,6 +540,7 @@ export class Worktree extends HeyApiClient {
481
540
  {
482
541
  args: [
483
542
  { in: "query", key: "directory" },
543
+ { in: "query", key: "workspace" },
484
544
  { key: "worktreeResetInput", map: "body" },
485
545
  ],
486
546
  },
@@ -497,6 +557,77 @@ export class Worktree extends HeyApiClient {
497
557
  });
498
558
  }
499
559
  }
560
+ export class Workspace extends HeyApiClient {
561
+ /**
562
+ * Remove workspace
563
+ *
564
+ * Remove an existing workspace.
565
+ */
566
+ remove(parameters, options) {
567
+ const params = buildClientParams([parameters], [
568
+ {
569
+ args: [
570
+ { in: "path", key: "id" },
571
+ { in: "query", key: "directory" },
572
+ { in: "query", key: "workspace" },
573
+ ],
574
+ },
575
+ ]);
576
+ return (options?.client ?? this.client).delete({
577
+ url: "/experimental/workspace/{id}",
578
+ ...options,
579
+ ...params,
580
+ });
581
+ }
582
+ /**
583
+ * Create workspace
584
+ *
585
+ * Create a workspace for the current project.
586
+ */
587
+ create(parameters, options) {
588
+ const params = buildClientParams([parameters], [
589
+ {
590
+ args: [
591
+ { in: "path", key: "id" },
592
+ { in: "query", key: "directory" },
593
+ { in: "query", key: "workspace" },
594
+ { in: "body", key: "branch" },
595
+ { in: "body", key: "config" },
596
+ ],
597
+ },
598
+ ]);
599
+ return (options?.client ?? this.client).post({
600
+ url: "/experimental/workspace/{id}",
601
+ ...options,
602
+ ...params,
603
+ headers: {
604
+ "Content-Type": "application/json",
605
+ ...options?.headers,
606
+ ...params.headers,
607
+ },
608
+ });
609
+ }
610
+ /**
611
+ * List workspaces
612
+ *
613
+ * List all workspaces.
614
+ */
615
+ list(parameters, options) {
616
+ const params = buildClientParams([parameters], [
617
+ {
618
+ args: [
619
+ { in: "query", key: "directory" },
620
+ { in: "query", key: "workspace" },
621
+ ],
622
+ },
623
+ ]);
624
+ return (options?.client ?? this.client).get({
625
+ url: "/experimental/workspace",
626
+ ...options,
627
+ ...params,
628
+ });
629
+ }
630
+ }
500
631
  export class Session extends HeyApiClient {
501
632
  /**
502
633
  * List sessions
@@ -508,6 +639,7 @@ export class Session extends HeyApiClient {
508
639
  {
509
640
  args: [
510
641
  { in: "query", key: "directory" },
642
+ { in: "query", key: "workspace" },
511
643
  { in: "query", key: "roots" },
512
644
  { in: "query", key: "start" },
513
645
  { in: "query", key: "cursor" },
@@ -531,7 +663,14 @@ export class Resource extends HeyApiClient {
531
663
  * Get all available MCP resources from connected servers. Optionally filter by name.
532
664
  */
533
665
  list(parameters, options) {
534
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
666
+ const params = buildClientParams([parameters], [
667
+ {
668
+ args: [
669
+ { in: "query", key: "directory" },
670
+ { in: "query", key: "workspace" },
671
+ ],
672
+ },
673
+ ]);
535
674
  return (options?.client ?? this.client).get({
536
675
  url: "/experimental/resource",
537
676
  ...options,
@@ -540,6 +679,10 @@ export class Resource extends HeyApiClient {
540
679
  }
541
680
  }
542
681
  export class Experimental extends HeyApiClient {
682
+ _workspace;
683
+ get workspace() {
684
+ return (this._workspace ??= new Workspace({ client: this.client }));
685
+ }
543
686
  _session;
544
687
  get session() {
545
688
  return (this._session ??= new Session({ client: this.client }));
@@ -560,6 +703,7 @@ export class Session2 extends HeyApiClient {
560
703
  {
561
704
  args: [
562
705
  { in: "query", key: "directory" },
706
+ { in: "query", key: "workspace" },
563
707
  { in: "query", key: "roots" },
564
708
  { in: "query", key: "start" },
565
709
  { in: "query", key: "search" },
@@ -583,6 +727,7 @@ export class Session2 extends HeyApiClient {
583
727
  {
584
728
  args: [
585
729
  { in: "query", key: "directory" },
730
+ { in: "query", key: "workspace" },
586
731
  { in: "body", key: "parentID" },
587
732
  { in: "body", key: "title" },
588
733
  { in: "body", key: "permission" },
@@ -606,7 +751,14 @@ export class Session2 extends HeyApiClient {
606
751
  * Retrieve the current status of all sessions, including active, idle, and completed states.
607
752
  */
608
753
  status(parameters, options) {
609
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
754
+ const params = buildClientParams([parameters], [
755
+ {
756
+ args: [
757
+ { in: "query", key: "directory" },
758
+ { in: "query", key: "workspace" },
759
+ ],
760
+ },
761
+ ]);
610
762
  return (options?.client ?? this.client).get({
611
763
  url: "/session/status",
612
764
  ...options,
@@ -624,6 +776,7 @@ export class Session2 extends HeyApiClient {
624
776
  args: [
625
777
  { in: "path", key: "sessionID" },
626
778
  { in: "query", key: "directory" },
779
+ { in: "query", key: "workspace" },
627
780
  ],
628
781
  },
629
782
  ]);
@@ -644,6 +797,7 @@ export class Session2 extends HeyApiClient {
644
797
  args: [
645
798
  { in: "path", key: "sessionID" },
646
799
  { in: "query", key: "directory" },
800
+ { in: "query", key: "workspace" },
647
801
  ],
648
802
  },
649
803
  ]);
@@ -664,6 +818,7 @@ export class Session2 extends HeyApiClient {
664
818
  args: [
665
819
  { in: "path", key: "sessionID" },
666
820
  { in: "query", key: "directory" },
821
+ { in: "query", key: "workspace" },
667
822
  { in: "body", key: "title" },
668
823
  { in: "body", key: "time" },
669
824
  ],
@@ -691,6 +846,7 @@ export class Session2 extends HeyApiClient {
691
846
  args: [
692
847
  { in: "path", key: "sessionID" },
693
848
  { in: "query", key: "directory" },
849
+ { in: "query", key: "workspace" },
694
850
  ],
695
851
  },
696
852
  ]);
@@ -711,6 +867,7 @@ export class Session2 extends HeyApiClient {
711
867
  args: [
712
868
  { in: "path", key: "sessionID" },
713
869
  { in: "query", key: "directory" },
870
+ { in: "query", key: "workspace" },
714
871
  ],
715
872
  },
716
873
  ]);
@@ -731,6 +888,7 @@ export class Session2 extends HeyApiClient {
731
888
  args: [
732
889
  { in: "path", key: "sessionID" },
733
890
  { in: "query", key: "directory" },
891
+ { in: "query", key: "workspace" },
734
892
  { in: "body", key: "modelID" },
735
893
  { in: "body", key: "providerID" },
736
894
  { in: "body", key: "messageID" },
@@ -759,6 +917,7 @@ export class Session2 extends HeyApiClient {
759
917
  args: [
760
918
  { in: "path", key: "sessionID" },
761
919
  { in: "query", key: "directory" },
920
+ { in: "query", key: "workspace" },
762
921
  { in: "body", key: "messageID" },
763
922
  ],
764
923
  },
@@ -785,6 +944,7 @@ export class Session2 extends HeyApiClient {
785
944
  args: [
786
945
  { in: "path", key: "sessionID" },
787
946
  { in: "query", key: "directory" },
947
+ { in: "query", key: "workspace" },
788
948
  ],
789
949
  },
790
950
  ]);
@@ -805,6 +965,7 @@ export class Session2 extends HeyApiClient {
805
965
  args: [
806
966
  { in: "path", key: "sessionID" },
807
967
  { in: "query", key: "directory" },
968
+ { in: "query", key: "workspace" },
808
969
  ],
809
970
  },
810
971
  ]);
@@ -825,6 +986,7 @@ export class Session2 extends HeyApiClient {
825
986
  args: [
826
987
  { in: "path", key: "sessionID" },
827
988
  { in: "query", key: "directory" },
989
+ { in: "query", key: "workspace" },
828
990
  ],
829
991
  },
830
992
  ]);
@@ -845,6 +1007,7 @@ export class Session2 extends HeyApiClient {
845
1007
  args: [
846
1008
  { in: "path", key: "sessionID" },
847
1009
  { in: "query", key: "directory" },
1010
+ { in: "query", key: "workspace" },
848
1011
  { in: "query", key: "messageID" },
849
1012
  ],
850
1013
  },
@@ -866,6 +1029,7 @@ export class Session2 extends HeyApiClient {
866
1029
  args: [
867
1030
  { in: "path", key: "sessionID" },
868
1031
  { in: "query", key: "directory" },
1032
+ { in: "query", key: "workspace" },
869
1033
  { in: "body", key: "providerID" },
870
1034
  { in: "body", key: "modelID" },
871
1035
  { in: "body", key: "auto" },
@@ -894,6 +1058,7 @@ export class Session2 extends HeyApiClient {
894
1058
  args: [
895
1059
  { in: "path", key: "sessionID" },
896
1060
  { in: "query", key: "directory" },
1061
+ { in: "query", key: "workspace" },
897
1062
  { in: "query", key: "limit" },
898
1063
  ],
899
1064
  },
@@ -915,6 +1080,7 @@ export class Session2 extends HeyApiClient {
915
1080
  args: [
916
1081
  { in: "path", key: "sessionID" },
917
1082
  { in: "query", key: "directory" },
1083
+ { in: "query", key: "workspace" },
918
1084
  { in: "body", key: "messageID" },
919
1085
  { in: "body", key: "model" },
920
1086
  { in: "body", key: "agent" },
@@ -950,6 +1116,7 @@ export class Session2 extends HeyApiClient {
950
1116
  { in: "path", key: "sessionID" },
951
1117
  { in: "path", key: "messageID" },
952
1118
  { in: "query", key: "directory" },
1119
+ { in: "query", key: "workspace" },
953
1120
  ],
954
1121
  },
955
1122
  ]);
@@ -971,6 +1138,7 @@ export class Session2 extends HeyApiClient {
971
1138
  { in: "path", key: "sessionID" },
972
1139
  { in: "path", key: "messageID" },
973
1140
  { in: "query", key: "directory" },
1141
+ { in: "query", key: "workspace" },
974
1142
  ],
975
1143
  },
976
1144
  ]);
@@ -991,6 +1159,7 @@ export class Session2 extends HeyApiClient {
991
1159
  args: [
992
1160
  { in: "path", key: "sessionID" },
993
1161
  { in: "query", key: "directory" },
1162
+ { in: "query", key: "workspace" },
994
1163
  { in: "body", key: "messageID" },
995
1164
  { in: "body", key: "model" },
996
1165
  { in: "body", key: "agent" },
@@ -1025,6 +1194,7 @@ export class Session2 extends HeyApiClient {
1025
1194
  args: [
1026
1195
  { in: "path", key: "sessionID" },
1027
1196
  { in: "query", key: "directory" },
1197
+ { in: "query", key: "workspace" },
1028
1198
  { in: "body", key: "messageID" },
1029
1199
  { in: "body", key: "agent" },
1030
1200
  { in: "body", key: "model" },
@@ -1057,6 +1227,7 @@ export class Session2 extends HeyApiClient {
1057
1227
  args: [
1058
1228
  { in: "path", key: "sessionID" },
1059
1229
  { in: "query", key: "directory" },
1230
+ { in: "query", key: "workspace" },
1060
1231
  { in: "body", key: "agent" },
1061
1232
  { in: "body", key: "model" },
1062
1233
  { in: "body", key: "command" },
@@ -1085,6 +1256,7 @@ export class Session2 extends HeyApiClient {
1085
1256
  args: [
1086
1257
  { in: "path", key: "sessionID" },
1087
1258
  { in: "query", key: "directory" },
1259
+ { in: "query", key: "workspace" },
1088
1260
  { in: "body", key: "messageID" },
1089
1261
  { in: "body", key: "partID" },
1090
1262
  ],
@@ -1112,6 +1284,7 @@ export class Session2 extends HeyApiClient {
1112
1284
  args: [
1113
1285
  { in: "path", key: "sessionID" },
1114
1286
  { in: "query", key: "directory" },
1287
+ { in: "query", key: "workspace" },
1115
1288
  ],
1116
1289
  },
1117
1290
  ]);
@@ -1134,6 +1307,7 @@ export class Part extends HeyApiClient {
1134
1307
  { in: "path", key: "messageID" },
1135
1308
  { in: "path", key: "partID" },
1136
1309
  { in: "query", key: "directory" },
1310
+ { in: "query", key: "workspace" },
1137
1311
  ],
1138
1312
  },
1139
1313
  ]);
@@ -1154,6 +1328,7 @@ export class Part extends HeyApiClient {
1154
1328
  { in: "path", key: "messageID" },
1155
1329
  { in: "path", key: "partID" },
1156
1330
  { in: "query", key: "directory" },
1331
+ { in: "query", key: "workspace" },
1157
1332
  { key: "part", map: "body" },
1158
1333
  ],
1159
1334
  },
@@ -1185,6 +1360,7 @@ export class Permission extends HeyApiClient {
1185
1360
  { in: "path", key: "sessionID" },
1186
1361
  { in: "path", key: "permissionID" },
1187
1362
  { in: "query", key: "directory" },
1363
+ { in: "query", key: "workspace" },
1188
1364
  { in: "body", key: "response" },
1189
1365
  ],
1190
1366
  },
@@ -1211,6 +1387,7 @@ export class Permission extends HeyApiClient {
1211
1387
  args: [
1212
1388
  { in: "path", key: "requestID" },
1213
1389
  { in: "query", key: "directory" },
1390
+ { in: "query", key: "workspace" },
1214
1391
  { in: "body", key: "reply" },
1215
1392
  { in: "body", key: "message" },
1216
1393
  ],
@@ -1233,7 +1410,14 @@ export class Permission extends HeyApiClient {
1233
1410
  * Get all pending permission requests across all sessions.
1234
1411
  */
1235
1412
  list(parameters, options) {
1236
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1413
+ const params = buildClientParams([parameters], [
1414
+ {
1415
+ args: [
1416
+ { in: "query", key: "directory" },
1417
+ { in: "query", key: "workspace" },
1418
+ ],
1419
+ },
1420
+ ]);
1237
1421
  return (options?.client ?? this.client).get({
1238
1422
  url: "/permission",
1239
1423
  ...options,
@@ -1248,7 +1432,14 @@ export class Question extends HeyApiClient {
1248
1432
  * Get all pending question requests across all sessions.
1249
1433
  */
1250
1434
  list(parameters, options) {
1251
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1435
+ const params = buildClientParams([parameters], [
1436
+ {
1437
+ args: [
1438
+ { in: "query", key: "directory" },
1439
+ { in: "query", key: "workspace" },
1440
+ ],
1441
+ },
1442
+ ]);
1252
1443
  return (options?.client ?? this.client).get({
1253
1444
  url: "/question",
1254
1445
  ...options,
@@ -1266,6 +1457,7 @@ export class Question extends HeyApiClient {
1266
1457
  args: [
1267
1458
  { in: "path", key: "requestID" },
1268
1459
  { in: "query", key: "directory" },
1460
+ { in: "query", key: "workspace" },
1269
1461
  { in: "body", key: "answers" },
1270
1462
  ],
1271
1463
  },
@@ -1292,6 +1484,7 @@ export class Question extends HeyApiClient {
1292
1484
  args: [
1293
1485
  { in: "path", key: "requestID" },
1294
1486
  { in: "query", key: "directory" },
1487
+ { in: "query", key: "workspace" },
1295
1488
  ],
1296
1489
  },
1297
1490
  ]);
@@ -1314,6 +1507,7 @@ export class Oauth extends HeyApiClient {
1314
1507
  args: [
1315
1508
  { in: "path", key: "providerID" },
1316
1509
  { in: "query", key: "directory" },
1510
+ { in: "query", key: "workspace" },
1317
1511
  { in: "body", key: "method" },
1318
1512
  ],
1319
1513
  },
@@ -1340,6 +1534,7 @@ export class Oauth extends HeyApiClient {
1340
1534
  args: [
1341
1535
  { in: "path", key: "providerID" },
1342
1536
  { in: "query", key: "directory" },
1537
+ { in: "query", key: "workspace" },
1343
1538
  { in: "body", key: "method" },
1344
1539
  { in: "body", key: "code" },
1345
1540
  ],
@@ -1364,7 +1559,14 @@ export class Provider extends HeyApiClient {
1364
1559
  * Get a list of all available AI providers, including both available and connected ones.
1365
1560
  */
1366
1561
  list(parameters, options) {
1367
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1562
+ const params = buildClientParams([parameters], [
1563
+ {
1564
+ args: [
1565
+ { in: "query", key: "directory" },
1566
+ { in: "query", key: "workspace" },
1567
+ ],
1568
+ },
1569
+ ]);
1368
1570
  return (options?.client ?? this.client).get({
1369
1571
  url: "/provider",
1370
1572
  ...options,
@@ -1377,7 +1579,14 @@ export class Provider extends HeyApiClient {
1377
1579
  * Retrieve available authentication methods for all AI providers.
1378
1580
  */
1379
1581
  auth(parameters, options) {
1380
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1582
+ const params = buildClientParams([parameters], [
1583
+ {
1584
+ args: [
1585
+ { in: "query", key: "directory" },
1586
+ { in: "query", key: "workspace" },
1587
+ ],
1588
+ },
1589
+ ]);
1381
1590
  return (options?.client ?? this.client).get({
1382
1591
  url: "/provider/auth",
1383
1592
  ...options,
@@ -1400,6 +1609,7 @@ export class Find extends HeyApiClient {
1400
1609
  {
1401
1610
  args: [
1402
1611
  { in: "query", key: "directory" },
1612
+ { in: "query", key: "workspace" },
1403
1613
  { in: "query", key: "pattern" },
1404
1614
  ],
1405
1615
  },
@@ -1420,6 +1630,7 @@ export class Find extends HeyApiClient {
1420
1630
  {
1421
1631
  args: [
1422
1632
  { in: "query", key: "directory" },
1633
+ { in: "query", key: "workspace" },
1423
1634
  { in: "query", key: "query" },
1424
1635
  { in: "query", key: "dirs" },
1425
1636
  { in: "query", key: "type" },
@@ -1443,6 +1654,7 @@ export class Find extends HeyApiClient {
1443
1654
  {
1444
1655
  args: [
1445
1656
  { in: "query", key: "directory" },
1657
+ { in: "query", key: "workspace" },
1446
1658
  { in: "query", key: "query" },
1447
1659
  ],
1448
1660
  },
@@ -1465,6 +1677,7 @@ export class File extends HeyApiClient {
1465
1677
  {
1466
1678
  args: [
1467
1679
  { in: "query", key: "directory" },
1680
+ { in: "query", key: "workspace" },
1468
1681
  { in: "query", key: "path" },
1469
1682
  ],
1470
1683
  },
@@ -1485,6 +1698,7 @@ export class File extends HeyApiClient {
1485
1698
  {
1486
1699
  args: [
1487
1700
  { in: "query", key: "directory" },
1701
+ { in: "query", key: "workspace" },
1488
1702
  { in: "query", key: "path" },
1489
1703
  ],
1490
1704
  },
@@ -1501,7 +1715,14 @@ export class File extends HeyApiClient {
1501
1715
  * Get the git status of all files in the project.
1502
1716
  */
1503
1717
  status(parameters, options) {
1504
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1718
+ const params = buildClientParams([parameters], [
1719
+ {
1720
+ args: [
1721
+ { in: "query", key: "directory" },
1722
+ { in: "query", key: "workspace" },
1723
+ ],
1724
+ },
1725
+ ]);
1505
1726
  return (options?.client ?? this.client).get({
1506
1727
  url: "/file/status",
1507
1728
  ...options,
@@ -1521,6 +1742,7 @@ export class Auth2 extends HeyApiClient {
1521
1742
  args: [
1522
1743
  { in: "path", key: "name" },
1523
1744
  { in: "query", key: "directory" },
1745
+ { in: "query", key: "workspace" },
1524
1746
  ],
1525
1747
  },
1526
1748
  ]);
@@ -1541,6 +1763,7 @@ export class Auth2 extends HeyApiClient {
1541
1763
  args: [
1542
1764
  { in: "path", key: "name" },
1543
1765
  { in: "query", key: "directory" },
1766
+ { in: "query", key: "workspace" },
1544
1767
  ],
1545
1768
  },
1546
1769
  ]);
@@ -1561,6 +1784,7 @@ export class Auth2 extends HeyApiClient {
1561
1784
  args: [
1562
1785
  { in: "path", key: "name" },
1563
1786
  { in: "query", key: "directory" },
1787
+ { in: "query", key: "workspace" },
1564
1788
  { in: "body", key: "code" },
1565
1789
  ],
1566
1790
  },
@@ -1587,6 +1811,7 @@ export class Auth2 extends HeyApiClient {
1587
1811
  args: [
1588
1812
  { in: "path", key: "name" },
1589
1813
  { in: "query", key: "directory" },
1814
+ { in: "query", key: "workspace" },
1590
1815
  ],
1591
1816
  },
1592
1817
  ]);
@@ -1604,7 +1829,14 @@ export class Mcp extends HeyApiClient {
1604
1829
  * Get the status of all Model Context Protocol (MCP) servers.
1605
1830
  */
1606
1831
  status(parameters, options) {
1607
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1832
+ const params = buildClientParams([parameters], [
1833
+ {
1834
+ args: [
1835
+ { in: "query", key: "directory" },
1836
+ { in: "query", key: "workspace" },
1837
+ ],
1838
+ },
1839
+ ]);
1608
1840
  return (options?.client ?? this.client).get({
1609
1841
  url: "/mcp",
1610
1842
  ...options,
@@ -1621,6 +1853,7 @@ export class Mcp extends HeyApiClient {
1621
1853
  {
1622
1854
  args: [
1623
1855
  { in: "query", key: "directory" },
1856
+ { in: "query", key: "workspace" },
1624
1857
  { in: "body", key: "name" },
1625
1858
  { in: "body", key: "config" },
1626
1859
  ],
@@ -1646,6 +1879,7 @@ export class Mcp extends HeyApiClient {
1646
1879
  args: [
1647
1880
  { in: "path", key: "name" },
1648
1881
  { in: "query", key: "directory" },
1882
+ { in: "query", key: "workspace" },
1649
1883
  ],
1650
1884
  },
1651
1885
  ]);
@@ -1664,6 +1898,7 @@ export class Mcp extends HeyApiClient {
1664
1898
  args: [
1665
1899
  { in: "path", key: "name" },
1666
1900
  { in: "query", key: "directory" },
1901
+ { in: "query", key: "workspace" },
1667
1902
  ],
1668
1903
  },
1669
1904
  ]);
@@ -1685,7 +1920,14 @@ export class Control extends HeyApiClient {
1685
1920
  * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
1686
1921
  */
1687
1922
  next(parameters, options) {
1688
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1923
+ const params = buildClientParams([parameters], [
1924
+ {
1925
+ args: [
1926
+ { in: "query", key: "directory" },
1927
+ { in: "query", key: "workspace" },
1928
+ ],
1929
+ },
1930
+ ]);
1689
1931
  return (options?.client ?? this.client).get({
1690
1932
  url: "/tui/control/next",
1691
1933
  ...options,
@@ -1702,6 +1944,7 @@ export class Control extends HeyApiClient {
1702
1944
  {
1703
1945
  args: [
1704
1946
  { in: "query", key: "directory" },
1947
+ { in: "query", key: "workspace" },
1705
1948
  { key: "body", map: "body" },
1706
1949
  ],
1707
1950
  },
@@ -1729,6 +1972,7 @@ export class Tui extends HeyApiClient {
1729
1972
  {
1730
1973
  args: [
1731
1974
  { in: "query", key: "directory" },
1975
+ { in: "query", key: "workspace" },
1732
1976
  { in: "body", key: "text" },
1733
1977
  ],
1734
1978
  },
@@ -1750,7 +1994,14 @@ export class Tui extends HeyApiClient {
1750
1994
  * Open the help dialog in the TUI to display user assistance information.
1751
1995
  */
1752
1996
  openHelp(parameters, options) {
1753
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1997
+ const params = buildClientParams([parameters], [
1998
+ {
1999
+ args: [
2000
+ { in: "query", key: "directory" },
2001
+ { in: "query", key: "workspace" },
2002
+ ],
2003
+ },
2004
+ ]);
1754
2005
  return (options?.client ?? this.client).post({
1755
2006
  url: "/tui/open-help",
1756
2007
  ...options,
@@ -1763,7 +2014,14 @@ export class Tui extends HeyApiClient {
1763
2014
  * Open the session dialog
1764
2015
  */
1765
2016
  openSessions(parameters, options) {
1766
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2017
+ const params = buildClientParams([parameters], [
2018
+ {
2019
+ args: [
2020
+ { in: "query", key: "directory" },
2021
+ { in: "query", key: "workspace" },
2022
+ ],
2023
+ },
2024
+ ]);
1767
2025
  return (options?.client ?? this.client).post({
1768
2026
  url: "/tui/open-sessions",
1769
2027
  ...options,
@@ -1776,7 +2034,14 @@ export class Tui extends HeyApiClient {
1776
2034
  * Open the theme dialog
1777
2035
  */
1778
2036
  openThemes(parameters, options) {
1779
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2037
+ const params = buildClientParams([parameters], [
2038
+ {
2039
+ args: [
2040
+ { in: "query", key: "directory" },
2041
+ { in: "query", key: "workspace" },
2042
+ ],
2043
+ },
2044
+ ]);
1780
2045
  return (options?.client ?? this.client).post({
1781
2046
  url: "/tui/open-themes",
1782
2047
  ...options,
@@ -1789,7 +2054,14 @@ export class Tui extends HeyApiClient {
1789
2054
  * Open the model dialog
1790
2055
  */
1791
2056
  openModels(parameters, options) {
1792
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2057
+ const params = buildClientParams([parameters], [
2058
+ {
2059
+ args: [
2060
+ { in: "query", key: "directory" },
2061
+ { in: "query", key: "workspace" },
2062
+ ],
2063
+ },
2064
+ ]);
1793
2065
  return (options?.client ?? this.client).post({
1794
2066
  url: "/tui/open-models",
1795
2067
  ...options,
@@ -1802,7 +2074,14 @@ export class Tui extends HeyApiClient {
1802
2074
  * Submit the prompt
1803
2075
  */
1804
2076
  submitPrompt(parameters, options) {
1805
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2077
+ const params = buildClientParams([parameters], [
2078
+ {
2079
+ args: [
2080
+ { in: "query", key: "directory" },
2081
+ { in: "query", key: "workspace" },
2082
+ ],
2083
+ },
2084
+ ]);
1806
2085
  return (options?.client ?? this.client).post({
1807
2086
  url: "/tui/submit-prompt",
1808
2087
  ...options,
@@ -1815,7 +2094,14 @@ export class Tui extends HeyApiClient {
1815
2094
  * Clear the prompt
1816
2095
  */
1817
2096
  clearPrompt(parameters, options) {
1818
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2097
+ const params = buildClientParams([parameters], [
2098
+ {
2099
+ args: [
2100
+ { in: "query", key: "directory" },
2101
+ { in: "query", key: "workspace" },
2102
+ ],
2103
+ },
2104
+ ]);
1819
2105
  return (options?.client ?? this.client).post({
1820
2106
  url: "/tui/clear-prompt",
1821
2107
  ...options,
@@ -1832,6 +2118,7 @@ export class Tui extends HeyApiClient {
1832
2118
  {
1833
2119
  args: [
1834
2120
  { in: "query", key: "directory" },
2121
+ { in: "query", key: "workspace" },
1835
2122
  { in: "body", key: "command" },
1836
2123
  ],
1837
2124
  },
@@ -1857,6 +2144,7 @@ export class Tui extends HeyApiClient {
1857
2144
  {
1858
2145
  args: [
1859
2146
  { in: "query", key: "directory" },
2147
+ { in: "query", key: "workspace" },
1860
2148
  { in: "body", key: "title" },
1861
2149
  { in: "body", key: "message" },
1862
2150
  { in: "body", key: "variant" },
@@ -1885,6 +2173,7 @@ export class Tui extends HeyApiClient {
1885
2173
  {
1886
2174
  args: [
1887
2175
  { in: "query", key: "directory" },
2176
+ { in: "query", key: "workspace" },
1888
2177
  { key: "body", map: "body" },
1889
2178
  ],
1890
2179
  },
@@ -1910,6 +2199,7 @@ export class Tui extends HeyApiClient {
1910
2199
  {
1911
2200
  args: [
1912
2201
  { in: "query", key: "directory" },
2202
+ { in: "query", key: "workspace" },
1913
2203
  { in: "body", key: "sessionID" },
1914
2204
  ],
1915
2205
  },
@@ -1937,7 +2227,14 @@ export class Instance extends HeyApiClient {
1937
2227
  * Clean up and dispose the current OpenCode instance, releasing all resources.
1938
2228
  */
1939
2229
  dispose(parameters, options) {
1940
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2230
+ const params = buildClientParams([parameters], [
2231
+ {
2232
+ args: [
2233
+ { in: "query", key: "directory" },
2234
+ { in: "query", key: "workspace" },
2235
+ ],
2236
+ },
2237
+ ]);
1941
2238
  return (options?.client ?? this.client).post({
1942
2239
  url: "/instance/dispose",
1943
2240
  ...options,
@@ -1952,7 +2249,14 @@ export class Path extends HeyApiClient {
1952
2249
  * Retrieve the current working directory and related path information for the OpenCode instance.
1953
2250
  */
1954
2251
  get(parameters, options) {
1955
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2252
+ const params = buildClientParams([parameters], [
2253
+ {
2254
+ args: [
2255
+ { in: "query", key: "directory" },
2256
+ { in: "query", key: "workspace" },
2257
+ ],
2258
+ },
2259
+ ]);
1956
2260
  return (options?.client ?? this.client).get({
1957
2261
  url: "/path",
1958
2262
  ...options,
@@ -1967,7 +2271,14 @@ export class Vcs extends HeyApiClient {
1967
2271
  * Retrieve version control system (VCS) information for the current project, such as git branch.
1968
2272
  */
1969
2273
  get(parameters, options) {
1970
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2274
+ const params = buildClientParams([parameters], [
2275
+ {
2276
+ args: [
2277
+ { in: "query", key: "directory" },
2278
+ { in: "query", key: "workspace" },
2279
+ ],
2280
+ },
2281
+ ]);
1971
2282
  return (options?.client ?? this.client).get({
1972
2283
  url: "/vcs",
1973
2284
  ...options,
@@ -1982,7 +2293,14 @@ export class Command extends HeyApiClient {
1982
2293
  * Get a list of all available commands in the OpenCode system.
1983
2294
  */
1984
2295
  list(parameters, options) {
1985
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2296
+ const params = buildClientParams([parameters], [
2297
+ {
2298
+ args: [
2299
+ { in: "query", key: "directory" },
2300
+ { in: "query", key: "workspace" },
2301
+ ],
2302
+ },
2303
+ ]);
1986
2304
  return (options?.client ?? this.client).get({
1987
2305
  url: "/command",
1988
2306
  ...options,
@@ -2001,6 +2319,7 @@ export class App extends HeyApiClient {
2001
2319
  {
2002
2320
  args: [
2003
2321
  { in: "query", key: "directory" },
2322
+ { in: "query", key: "workspace" },
2004
2323
  { in: "body", key: "service" },
2005
2324
  { in: "body", key: "level" },
2006
2325
  { in: "body", key: "message" },
@@ -2025,7 +2344,14 @@ export class App extends HeyApiClient {
2025
2344
  * Get a list of all available AI agents in the OpenCode system.
2026
2345
  */
2027
2346
  agents(parameters, options) {
2028
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2347
+ const params = buildClientParams([parameters], [
2348
+ {
2349
+ args: [
2350
+ { in: "query", key: "directory" },
2351
+ { in: "query", key: "workspace" },
2352
+ ],
2353
+ },
2354
+ ]);
2029
2355
  return (options?.client ?? this.client).get({
2030
2356
  url: "/agent",
2031
2357
  ...options,
@@ -2038,7 +2364,14 @@ export class App extends HeyApiClient {
2038
2364
  * Get a list of all available skills in the OpenCode system.
2039
2365
  */
2040
2366
  skills(parameters, options) {
2041
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2367
+ const params = buildClientParams([parameters], [
2368
+ {
2369
+ args: [
2370
+ { in: "query", key: "directory" },
2371
+ { in: "query", key: "workspace" },
2372
+ ],
2373
+ },
2374
+ ]);
2042
2375
  return (options?.client ?? this.client).get({
2043
2376
  url: "/skill",
2044
2377
  ...options,
@@ -2053,7 +2386,14 @@ export class Lsp extends HeyApiClient {
2053
2386
  * Get LSP server status
2054
2387
  */
2055
2388
  status(parameters, options) {
2056
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2389
+ const params = buildClientParams([parameters], [
2390
+ {
2391
+ args: [
2392
+ { in: "query", key: "directory" },
2393
+ { in: "query", key: "workspace" },
2394
+ ],
2395
+ },
2396
+ ]);
2057
2397
  return (options?.client ?? this.client).get({
2058
2398
  url: "/lsp",
2059
2399
  ...options,
@@ -2068,7 +2408,14 @@ export class Formatter extends HeyApiClient {
2068
2408
  * Get formatter status
2069
2409
  */
2070
2410
  status(parameters, options) {
2071
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2411
+ const params = buildClientParams([parameters], [
2412
+ {
2413
+ args: [
2414
+ { in: "query", key: "directory" },
2415
+ { in: "query", key: "workspace" },
2416
+ ],
2417
+ },
2418
+ ]);
2072
2419
  return (options?.client ?? this.client).get({
2073
2420
  url: "/formatter",
2074
2421
  ...options,
@@ -2083,7 +2430,14 @@ export class Event extends HeyApiClient {
2083
2430
  * Get events
2084
2431
  */
2085
2432
  subscribe(parameters, options) {
2086
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2433
+ const params = buildClientParams([parameters], [
2434
+ {
2435
+ args: [
2436
+ { in: "query", key: "directory" },
2437
+ { in: "query", key: "workspace" },
2438
+ ],
2439
+ },
2440
+ ]);
2087
2441
  return (options?.client ?? this.client).sse.get({
2088
2442
  url: "/event",
2089
2443
  ...options,