@opencode-ai/sdk 1.2.15 → 1.2.17

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
  ],
@@ -407,61 +457,47 @@ export class Tool extends HeyApiClient {
407
457
  });
408
458
  }
409
459
  }
410
- export class Worktree extends HeyApiClient {
460
+ export class Workspace extends HeyApiClient {
411
461
  /**
412
- * Remove worktree
462
+ * List workspaces
413
463
  *
414
- * Remove a git worktree and delete its branch.
464
+ * List all workspaces.
415
465
  */
416
- remove(parameters, options) {
466
+ list(parameters, options) {
417
467
  const params = buildClientParams([parameters], [
418
468
  {
419
469
  args: [
420
470
  { in: "query", key: "directory" },
421
- { key: "worktreeRemoveInput", map: "body" },
471
+ { in: "query", key: "workspace" },
422
472
  ],
423
473
  },
424
474
  ]);
425
- return (options?.client ?? this.client).delete({
426
- url: "/experimental/worktree",
427
- ...options,
428
- ...params,
429
- headers: {
430
- "Content-Type": "application/json",
431
- ...options?.headers,
432
- ...params.headers,
433
- },
434
- });
435
- }
436
- /**
437
- * List worktrees
438
- *
439
- * List all sandbox worktrees for the current project.
440
- */
441
- list(parameters, options) {
442
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
443
475
  return (options?.client ?? this.client).get({
444
- url: "/experimental/worktree",
476
+ url: "/experimental/workspace",
445
477
  ...options,
446
478
  ...params,
447
479
  });
448
480
  }
449
481
  /**
450
- * Create worktree
482
+ * Create workspace
451
483
  *
452
- * Create a new git worktree for the current project and run any configured startup scripts.
484
+ * Create a workspace for the current project.
453
485
  */
454
486
  create(parameters, options) {
455
487
  const params = buildClientParams([parameters], [
456
488
  {
457
489
  args: [
458
490
  { in: "query", key: "directory" },
459
- { key: "worktreeCreateInput", map: "body" },
491
+ { in: "query", key: "workspace" },
492
+ { in: "body", key: "id" },
493
+ { in: "body", key: "type" },
494
+ { in: "body", key: "branch" },
495
+ { in: "body", key: "extra" },
460
496
  ],
461
497
  },
462
498
  ]);
463
499
  return (options?.client ?? this.client).post({
464
- url: "/experimental/worktree",
500
+ url: "/experimental/workspace",
465
501
  ...options,
466
502
  ...params,
467
503
  headers: {
@@ -472,28 +508,24 @@ export class Worktree extends HeyApiClient {
472
508
  });
473
509
  }
474
510
  /**
475
- * Reset worktree
511
+ * Remove workspace
476
512
  *
477
- * Reset a worktree branch to the primary default branch.
513
+ * Remove an existing workspace.
478
514
  */
479
- reset(parameters, options) {
515
+ remove(parameters, options) {
480
516
  const params = buildClientParams([parameters], [
481
517
  {
482
518
  args: [
519
+ { in: "path", key: "id" },
483
520
  { in: "query", key: "directory" },
484
- { key: "worktreeResetInput", map: "body" },
521
+ { in: "query", key: "workspace" },
485
522
  ],
486
523
  },
487
524
  ]);
488
- return (options?.client ?? this.client).post({
489
- url: "/experimental/worktree/reset",
525
+ return (options?.client ?? this.client).delete({
526
+ url: "/experimental/workspace/{id}",
490
527
  ...options,
491
528
  ...params,
492
- headers: {
493
- "Content-Type": "application/json",
494
- ...options?.headers,
495
- ...params.headers,
496
- },
497
529
  });
498
530
  }
499
531
  }
@@ -508,6 +540,7 @@ export class Session extends HeyApiClient {
508
540
  {
509
541
  args: [
510
542
  { in: "query", key: "directory" },
543
+ { in: "query", key: "workspace" },
511
544
  { in: "query", key: "roots" },
512
545
  { in: "query", key: "start" },
513
546
  { in: "query", key: "cursor" },
@@ -531,7 +564,14 @@ export class Resource extends HeyApiClient {
531
564
  * Get all available MCP resources from connected servers. Optionally filter by name.
532
565
  */
533
566
  list(parameters, options) {
534
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
567
+ const params = buildClientParams([parameters], [
568
+ {
569
+ args: [
570
+ { in: "query", key: "directory" },
571
+ { in: "query", key: "workspace" },
572
+ ],
573
+ },
574
+ ]);
535
575
  return (options?.client ?? this.client).get({
536
576
  url: "/experimental/resource",
537
577
  ...options,
@@ -540,6 +580,10 @@ export class Resource extends HeyApiClient {
540
580
  }
541
581
  }
542
582
  export class Experimental extends HeyApiClient {
583
+ _workspace;
584
+ get workspace() {
585
+ return (this._workspace ??= new Workspace({ client: this.client }));
586
+ }
543
587
  _session;
544
588
  get session() {
545
589
  return (this._session ??= new Session({ client: this.client }));
@@ -549,6 +593,106 @@ export class Experimental extends HeyApiClient {
549
593
  return (this._resource ??= new Resource({ client: this.client }));
550
594
  }
551
595
  }
596
+ export class Worktree extends HeyApiClient {
597
+ /**
598
+ * Remove worktree
599
+ *
600
+ * Remove a git worktree and delete its branch.
601
+ */
602
+ remove(parameters, options) {
603
+ const params = buildClientParams([parameters], [
604
+ {
605
+ args: [
606
+ { in: "query", key: "directory" },
607
+ { in: "query", key: "workspace" },
608
+ { key: "worktreeRemoveInput", map: "body" },
609
+ ],
610
+ },
611
+ ]);
612
+ return (options?.client ?? this.client).delete({
613
+ url: "/experimental/worktree",
614
+ ...options,
615
+ ...params,
616
+ headers: {
617
+ "Content-Type": "application/json",
618
+ ...options?.headers,
619
+ ...params.headers,
620
+ },
621
+ });
622
+ }
623
+ /**
624
+ * List worktrees
625
+ *
626
+ * List all sandbox worktrees for the current project.
627
+ */
628
+ list(parameters, options) {
629
+ const params = buildClientParams([parameters], [
630
+ {
631
+ args: [
632
+ { in: "query", key: "directory" },
633
+ { in: "query", key: "workspace" },
634
+ ],
635
+ },
636
+ ]);
637
+ return (options?.client ?? this.client).get({
638
+ url: "/experimental/worktree",
639
+ ...options,
640
+ ...params,
641
+ });
642
+ }
643
+ /**
644
+ * Create worktree
645
+ *
646
+ * Create a new git worktree for the current project and run any configured startup scripts.
647
+ */
648
+ create(parameters, options) {
649
+ const params = buildClientParams([parameters], [
650
+ {
651
+ args: [
652
+ { in: "query", key: "directory" },
653
+ { in: "query", key: "workspace" },
654
+ { key: "worktreeCreateInput", map: "body" },
655
+ ],
656
+ },
657
+ ]);
658
+ return (options?.client ?? this.client).post({
659
+ url: "/experimental/worktree",
660
+ ...options,
661
+ ...params,
662
+ headers: {
663
+ "Content-Type": "application/json",
664
+ ...options?.headers,
665
+ ...params.headers,
666
+ },
667
+ });
668
+ }
669
+ /**
670
+ * Reset worktree
671
+ *
672
+ * Reset a worktree branch to the primary default branch.
673
+ */
674
+ reset(parameters, options) {
675
+ const params = buildClientParams([parameters], [
676
+ {
677
+ args: [
678
+ { in: "query", key: "directory" },
679
+ { in: "query", key: "workspace" },
680
+ { key: "worktreeResetInput", map: "body" },
681
+ ],
682
+ },
683
+ ]);
684
+ return (options?.client ?? this.client).post({
685
+ url: "/experimental/worktree/reset",
686
+ ...options,
687
+ ...params,
688
+ headers: {
689
+ "Content-Type": "application/json",
690
+ ...options?.headers,
691
+ ...params.headers,
692
+ },
693
+ });
694
+ }
695
+ }
552
696
  export class Session2 extends HeyApiClient {
553
697
  /**
554
698
  * List sessions
@@ -560,6 +704,7 @@ export class Session2 extends HeyApiClient {
560
704
  {
561
705
  args: [
562
706
  { in: "query", key: "directory" },
707
+ { in: "query", key: "workspace" },
563
708
  { in: "query", key: "roots" },
564
709
  { in: "query", key: "start" },
565
710
  { in: "query", key: "search" },
@@ -583,6 +728,7 @@ export class Session2 extends HeyApiClient {
583
728
  {
584
729
  args: [
585
730
  { in: "query", key: "directory" },
731
+ { in: "query", key: "workspace" },
586
732
  { in: "body", key: "parentID" },
587
733
  { in: "body", key: "title" },
588
734
  { in: "body", key: "permission" },
@@ -606,7 +752,14 @@ export class Session2 extends HeyApiClient {
606
752
  * Retrieve the current status of all sessions, including active, idle, and completed states.
607
753
  */
608
754
  status(parameters, options) {
609
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
755
+ const params = buildClientParams([parameters], [
756
+ {
757
+ args: [
758
+ { in: "query", key: "directory" },
759
+ { in: "query", key: "workspace" },
760
+ ],
761
+ },
762
+ ]);
610
763
  return (options?.client ?? this.client).get({
611
764
  url: "/session/status",
612
765
  ...options,
@@ -624,6 +777,7 @@ export class Session2 extends HeyApiClient {
624
777
  args: [
625
778
  { in: "path", key: "sessionID" },
626
779
  { in: "query", key: "directory" },
780
+ { in: "query", key: "workspace" },
627
781
  ],
628
782
  },
629
783
  ]);
@@ -644,6 +798,7 @@ export class Session2 extends HeyApiClient {
644
798
  args: [
645
799
  { in: "path", key: "sessionID" },
646
800
  { in: "query", key: "directory" },
801
+ { in: "query", key: "workspace" },
647
802
  ],
648
803
  },
649
804
  ]);
@@ -664,6 +819,7 @@ export class Session2 extends HeyApiClient {
664
819
  args: [
665
820
  { in: "path", key: "sessionID" },
666
821
  { in: "query", key: "directory" },
822
+ { in: "query", key: "workspace" },
667
823
  { in: "body", key: "title" },
668
824
  { in: "body", key: "time" },
669
825
  ],
@@ -691,6 +847,7 @@ export class Session2 extends HeyApiClient {
691
847
  args: [
692
848
  { in: "path", key: "sessionID" },
693
849
  { in: "query", key: "directory" },
850
+ { in: "query", key: "workspace" },
694
851
  ],
695
852
  },
696
853
  ]);
@@ -711,6 +868,7 @@ export class Session2 extends HeyApiClient {
711
868
  args: [
712
869
  { in: "path", key: "sessionID" },
713
870
  { in: "query", key: "directory" },
871
+ { in: "query", key: "workspace" },
714
872
  ],
715
873
  },
716
874
  ]);
@@ -731,6 +889,7 @@ export class Session2 extends HeyApiClient {
731
889
  args: [
732
890
  { in: "path", key: "sessionID" },
733
891
  { in: "query", key: "directory" },
892
+ { in: "query", key: "workspace" },
734
893
  { in: "body", key: "modelID" },
735
894
  { in: "body", key: "providerID" },
736
895
  { in: "body", key: "messageID" },
@@ -759,6 +918,7 @@ export class Session2 extends HeyApiClient {
759
918
  args: [
760
919
  { in: "path", key: "sessionID" },
761
920
  { in: "query", key: "directory" },
921
+ { in: "query", key: "workspace" },
762
922
  { in: "body", key: "messageID" },
763
923
  ],
764
924
  },
@@ -785,6 +945,7 @@ export class Session2 extends HeyApiClient {
785
945
  args: [
786
946
  { in: "path", key: "sessionID" },
787
947
  { in: "query", key: "directory" },
948
+ { in: "query", key: "workspace" },
788
949
  ],
789
950
  },
790
951
  ]);
@@ -805,6 +966,7 @@ export class Session2 extends HeyApiClient {
805
966
  args: [
806
967
  { in: "path", key: "sessionID" },
807
968
  { in: "query", key: "directory" },
969
+ { in: "query", key: "workspace" },
808
970
  ],
809
971
  },
810
972
  ]);
@@ -825,6 +987,7 @@ export class Session2 extends HeyApiClient {
825
987
  args: [
826
988
  { in: "path", key: "sessionID" },
827
989
  { in: "query", key: "directory" },
990
+ { in: "query", key: "workspace" },
828
991
  ],
829
992
  },
830
993
  ]);
@@ -845,6 +1008,7 @@ export class Session2 extends HeyApiClient {
845
1008
  args: [
846
1009
  { in: "path", key: "sessionID" },
847
1010
  { in: "query", key: "directory" },
1011
+ { in: "query", key: "workspace" },
848
1012
  { in: "query", key: "messageID" },
849
1013
  ],
850
1014
  },
@@ -866,6 +1030,7 @@ export class Session2 extends HeyApiClient {
866
1030
  args: [
867
1031
  { in: "path", key: "sessionID" },
868
1032
  { in: "query", key: "directory" },
1033
+ { in: "query", key: "workspace" },
869
1034
  { in: "body", key: "providerID" },
870
1035
  { in: "body", key: "modelID" },
871
1036
  { in: "body", key: "auto" },
@@ -894,6 +1059,7 @@ export class Session2 extends HeyApiClient {
894
1059
  args: [
895
1060
  { in: "path", key: "sessionID" },
896
1061
  { in: "query", key: "directory" },
1062
+ { in: "query", key: "workspace" },
897
1063
  { in: "query", key: "limit" },
898
1064
  ],
899
1065
  },
@@ -915,6 +1081,7 @@ export class Session2 extends HeyApiClient {
915
1081
  args: [
916
1082
  { in: "path", key: "sessionID" },
917
1083
  { in: "query", key: "directory" },
1084
+ { in: "query", key: "workspace" },
918
1085
  { in: "body", key: "messageID" },
919
1086
  { in: "body", key: "model" },
920
1087
  { in: "body", key: "agent" },
@@ -950,6 +1117,7 @@ export class Session2 extends HeyApiClient {
950
1117
  { in: "path", key: "sessionID" },
951
1118
  { in: "path", key: "messageID" },
952
1119
  { in: "query", key: "directory" },
1120
+ { in: "query", key: "workspace" },
953
1121
  ],
954
1122
  },
955
1123
  ]);
@@ -971,6 +1139,7 @@ export class Session2 extends HeyApiClient {
971
1139
  { in: "path", key: "sessionID" },
972
1140
  { in: "path", key: "messageID" },
973
1141
  { in: "query", key: "directory" },
1142
+ { in: "query", key: "workspace" },
974
1143
  ],
975
1144
  },
976
1145
  ]);
@@ -991,6 +1160,7 @@ export class Session2 extends HeyApiClient {
991
1160
  args: [
992
1161
  { in: "path", key: "sessionID" },
993
1162
  { in: "query", key: "directory" },
1163
+ { in: "query", key: "workspace" },
994
1164
  { in: "body", key: "messageID" },
995
1165
  { in: "body", key: "model" },
996
1166
  { in: "body", key: "agent" },
@@ -1025,6 +1195,7 @@ export class Session2 extends HeyApiClient {
1025
1195
  args: [
1026
1196
  { in: "path", key: "sessionID" },
1027
1197
  { in: "query", key: "directory" },
1198
+ { in: "query", key: "workspace" },
1028
1199
  { in: "body", key: "messageID" },
1029
1200
  { in: "body", key: "agent" },
1030
1201
  { in: "body", key: "model" },
@@ -1057,6 +1228,7 @@ export class Session2 extends HeyApiClient {
1057
1228
  args: [
1058
1229
  { in: "path", key: "sessionID" },
1059
1230
  { in: "query", key: "directory" },
1231
+ { in: "query", key: "workspace" },
1060
1232
  { in: "body", key: "agent" },
1061
1233
  { in: "body", key: "model" },
1062
1234
  { in: "body", key: "command" },
@@ -1085,6 +1257,7 @@ export class Session2 extends HeyApiClient {
1085
1257
  args: [
1086
1258
  { in: "path", key: "sessionID" },
1087
1259
  { in: "query", key: "directory" },
1260
+ { in: "query", key: "workspace" },
1088
1261
  { in: "body", key: "messageID" },
1089
1262
  { in: "body", key: "partID" },
1090
1263
  ],
@@ -1112,6 +1285,7 @@ export class Session2 extends HeyApiClient {
1112
1285
  args: [
1113
1286
  { in: "path", key: "sessionID" },
1114
1287
  { in: "query", key: "directory" },
1288
+ { in: "query", key: "workspace" },
1115
1289
  ],
1116
1290
  },
1117
1291
  ]);
@@ -1134,6 +1308,7 @@ export class Part extends HeyApiClient {
1134
1308
  { in: "path", key: "messageID" },
1135
1309
  { in: "path", key: "partID" },
1136
1310
  { in: "query", key: "directory" },
1311
+ { in: "query", key: "workspace" },
1137
1312
  ],
1138
1313
  },
1139
1314
  ]);
@@ -1154,6 +1329,7 @@ export class Part extends HeyApiClient {
1154
1329
  { in: "path", key: "messageID" },
1155
1330
  { in: "path", key: "partID" },
1156
1331
  { in: "query", key: "directory" },
1332
+ { in: "query", key: "workspace" },
1157
1333
  { key: "part", map: "body" },
1158
1334
  ],
1159
1335
  },
@@ -1185,6 +1361,7 @@ export class Permission extends HeyApiClient {
1185
1361
  { in: "path", key: "sessionID" },
1186
1362
  { in: "path", key: "permissionID" },
1187
1363
  { in: "query", key: "directory" },
1364
+ { in: "query", key: "workspace" },
1188
1365
  { in: "body", key: "response" },
1189
1366
  ],
1190
1367
  },
@@ -1211,6 +1388,7 @@ export class Permission extends HeyApiClient {
1211
1388
  args: [
1212
1389
  { in: "path", key: "requestID" },
1213
1390
  { in: "query", key: "directory" },
1391
+ { in: "query", key: "workspace" },
1214
1392
  { in: "body", key: "reply" },
1215
1393
  { in: "body", key: "message" },
1216
1394
  ],
@@ -1233,7 +1411,14 @@ export class Permission extends HeyApiClient {
1233
1411
  * Get all pending permission requests across all sessions.
1234
1412
  */
1235
1413
  list(parameters, options) {
1236
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1414
+ const params = buildClientParams([parameters], [
1415
+ {
1416
+ args: [
1417
+ { in: "query", key: "directory" },
1418
+ { in: "query", key: "workspace" },
1419
+ ],
1420
+ },
1421
+ ]);
1237
1422
  return (options?.client ?? this.client).get({
1238
1423
  url: "/permission",
1239
1424
  ...options,
@@ -1248,7 +1433,14 @@ export class Question extends HeyApiClient {
1248
1433
  * Get all pending question requests across all sessions.
1249
1434
  */
1250
1435
  list(parameters, options) {
1251
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1436
+ const params = buildClientParams([parameters], [
1437
+ {
1438
+ args: [
1439
+ { in: "query", key: "directory" },
1440
+ { in: "query", key: "workspace" },
1441
+ ],
1442
+ },
1443
+ ]);
1252
1444
  return (options?.client ?? this.client).get({
1253
1445
  url: "/question",
1254
1446
  ...options,
@@ -1266,6 +1458,7 @@ export class Question extends HeyApiClient {
1266
1458
  args: [
1267
1459
  { in: "path", key: "requestID" },
1268
1460
  { in: "query", key: "directory" },
1461
+ { in: "query", key: "workspace" },
1269
1462
  { in: "body", key: "answers" },
1270
1463
  ],
1271
1464
  },
@@ -1292,6 +1485,7 @@ export class Question extends HeyApiClient {
1292
1485
  args: [
1293
1486
  { in: "path", key: "requestID" },
1294
1487
  { in: "query", key: "directory" },
1488
+ { in: "query", key: "workspace" },
1295
1489
  ],
1296
1490
  },
1297
1491
  ]);
@@ -1314,6 +1508,7 @@ export class Oauth extends HeyApiClient {
1314
1508
  args: [
1315
1509
  { in: "path", key: "providerID" },
1316
1510
  { in: "query", key: "directory" },
1511
+ { in: "query", key: "workspace" },
1317
1512
  { in: "body", key: "method" },
1318
1513
  ],
1319
1514
  },
@@ -1340,6 +1535,7 @@ export class Oauth extends HeyApiClient {
1340
1535
  args: [
1341
1536
  { in: "path", key: "providerID" },
1342
1537
  { in: "query", key: "directory" },
1538
+ { in: "query", key: "workspace" },
1343
1539
  { in: "body", key: "method" },
1344
1540
  { in: "body", key: "code" },
1345
1541
  ],
@@ -1364,7 +1560,14 @@ export class Provider extends HeyApiClient {
1364
1560
  * Get a list of all available AI providers, including both available and connected ones.
1365
1561
  */
1366
1562
  list(parameters, options) {
1367
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1563
+ const params = buildClientParams([parameters], [
1564
+ {
1565
+ args: [
1566
+ { in: "query", key: "directory" },
1567
+ { in: "query", key: "workspace" },
1568
+ ],
1569
+ },
1570
+ ]);
1368
1571
  return (options?.client ?? this.client).get({
1369
1572
  url: "/provider",
1370
1573
  ...options,
@@ -1377,7 +1580,14 @@ export class Provider extends HeyApiClient {
1377
1580
  * Retrieve available authentication methods for all AI providers.
1378
1581
  */
1379
1582
  auth(parameters, options) {
1380
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1583
+ const params = buildClientParams([parameters], [
1584
+ {
1585
+ args: [
1586
+ { in: "query", key: "directory" },
1587
+ { in: "query", key: "workspace" },
1588
+ ],
1589
+ },
1590
+ ]);
1381
1591
  return (options?.client ?? this.client).get({
1382
1592
  url: "/provider/auth",
1383
1593
  ...options,
@@ -1400,6 +1610,7 @@ export class Find extends HeyApiClient {
1400
1610
  {
1401
1611
  args: [
1402
1612
  { in: "query", key: "directory" },
1613
+ { in: "query", key: "workspace" },
1403
1614
  { in: "query", key: "pattern" },
1404
1615
  ],
1405
1616
  },
@@ -1420,6 +1631,7 @@ export class Find extends HeyApiClient {
1420
1631
  {
1421
1632
  args: [
1422
1633
  { in: "query", key: "directory" },
1634
+ { in: "query", key: "workspace" },
1423
1635
  { in: "query", key: "query" },
1424
1636
  { in: "query", key: "dirs" },
1425
1637
  { in: "query", key: "type" },
@@ -1443,6 +1655,7 @@ export class Find extends HeyApiClient {
1443
1655
  {
1444
1656
  args: [
1445
1657
  { in: "query", key: "directory" },
1658
+ { in: "query", key: "workspace" },
1446
1659
  { in: "query", key: "query" },
1447
1660
  ],
1448
1661
  },
@@ -1465,6 +1678,7 @@ export class File extends HeyApiClient {
1465
1678
  {
1466
1679
  args: [
1467
1680
  { in: "query", key: "directory" },
1681
+ { in: "query", key: "workspace" },
1468
1682
  { in: "query", key: "path" },
1469
1683
  ],
1470
1684
  },
@@ -1485,6 +1699,7 @@ export class File extends HeyApiClient {
1485
1699
  {
1486
1700
  args: [
1487
1701
  { in: "query", key: "directory" },
1702
+ { in: "query", key: "workspace" },
1488
1703
  { in: "query", key: "path" },
1489
1704
  ],
1490
1705
  },
@@ -1501,7 +1716,14 @@ export class File extends HeyApiClient {
1501
1716
  * Get the git status of all files in the project.
1502
1717
  */
1503
1718
  status(parameters, options) {
1504
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1719
+ const params = buildClientParams([parameters], [
1720
+ {
1721
+ args: [
1722
+ { in: "query", key: "directory" },
1723
+ { in: "query", key: "workspace" },
1724
+ ],
1725
+ },
1726
+ ]);
1505
1727
  return (options?.client ?? this.client).get({
1506
1728
  url: "/file/status",
1507
1729
  ...options,
@@ -1521,6 +1743,7 @@ export class Auth2 extends HeyApiClient {
1521
1743
  args: [
1522
1744
  { in: "path", key: "name" },
1523
1745
  { in: "query", key: "directory" },
1746
+ { in: "query", key: "workspace" },
1524
1747
  ],
1525
1748
  },
1526
1749
  ]);
@@ -1541,6 +1764,7 @@ export class Auth2 extends HeyApiClient {
1541
1764
  args: [
1542
1765
  { in: "path", key: "name" },
1543
1766
  { in: "query", key: "directory" },
1767
+ { in: "query", key: "workspace" },
1544
1768
  ],
1545
1769
  },
1546
1770
  ]);
@@ -1561,6 +1785,7 @@ export class Auth2 extends HeyApiClient {
1561
1785
  args: [
1562
1786
  { in: "path", key: "name" },
1563
1787
  { in: "query", key: "directory" },
1788
+ { in: "query", key: "workspace" },
1564
1789
  { in: "body", key: "code" },
1565
1790
  ],
1566
1791
  },
@@ -1587,6 +1812,7 @@ export class Auth2 extends HeyApiClient {
1587
1812
  args: [
1588
1813
  { in: "path", key: "name" },
1589
1814
  { in: "query", key: "directory" },
1815
+ { in: "query", key: "workspace" },
1590
1816
  ],
1591
1817
  },
1592
1818
  ]);
@@ -1604,7 +1830,14 @@ export class Mcp extends HeyApiClient {
1604
1830
  * Get the status of all Model Context Protocol (MCP) servers.
1605
1831
  */
1606
1832
  status(parameters, options) {
1607
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1833
+ const params = buildClientParams([parameters], [
1834
+ {
1835
+ args: [
1836
+ { in: "query", key: "directory" },
1837
+ { in: "query", key: "workspace" },
1838
+ ],
1839
+ },
1840
+ ]);
1608
1841
  return (options?.client ?? this.client).get({
1609
1842
  url: "/mcp",
1610
1843
  ...options,
@@ -1621,6 +1854,7 @@ export class Mcp extends HeyApiClient {
1621
1854
  {
1622
1855
  args: [
1623
1856
  { in: "query", key: "directory" },
1857
+ { in: "query", key: "workspace" },
1624
1858
  { in: "body", key: "name" },
1625
1859
  { in: "body", key: "config" },
1626
1860
  ],
@@ -1646,6 +1880,7 @@ export class Mcp extends HeyApiClient {
1646
1880
  args: [
1647
1881
  { in: "path", key: "name" },
1648
1882
  { in: "query", key: "directory" },
1883
+ { in: "query", key: "workspace" },
1649
1884
  ],
1650
1885
  },
1651
1886
  ]);
@@ -1664,6 +1899,7 @@ export class Mcp extends HeyApiClient {
1664
1899
  args: [
1665
1900
  { in: "path", key: "name" },
1666
1901
  { in: "query", key: "directory" },
1902
+ { in: "query", key: "workspace" },
1667
1903
  ],
1668
1904
  },
1669
1905
  ]);
@@ -1685,7 +1921,14 @@ export class Control extends HeyApiClient {
1685
1921
  * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
1686
1922
  */
1687
1923
  next(parameters, options) {
1688
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1924
+ const params = buildClientParams([parameters], [
1925
+ {
1926
+ args: [
1927
+ { in: "query", key: "directory" },
1928
+ { in: "query", key: "workspace" },
1929
+ ],
1930
+ },
1931
+ ]);
1689
1932
  return (options?.client ?? this.client).get({
1690
1933
  url: "/tui/control/next",
1691
1934
  ...options,
@@ -1702,6 +1945,7 @@ export class Control extends HeyApiClient {
1702
1945
  {
1703
1946
  args: [
1704
1947
  { in: "query", key: "directory" },
1948
+ { in: "query", key: "workspace" },
1705
1949
  { key: "body", map: "body" },
1706
1950
  ],
1707
1951
  },
@@ -1729,6 +1973,7 @@ export class Tui extends HeyApiClient {
1729
1973
  {
1730
1974
  args: [
1731
1975
  { in: "query", key: "directory" },
1976
+ { in: "query", key: "workspace" },
1732
1977
  { in: "body", key: "text" },
1733
1978
  ],
1734
1979
  },
@@ -1750,7 +1995,14 @@ export class Tui extends HeyApiClient {
1750
1995
  * Open the help dialog in the TUI to display user assistance information.
1751
1996
  */
1752
1997
  openHelp(parameters, options) {
1753
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1998
+ const params = buildClientParams([parameters], [
1999
+ {
2000
+ args: [
2001
+ { in: "query", key: "directory" },
2002
+ { in: "query", key: "workspace" },
2003
+ ],
2004
+ },
2005
+ ]);
1754
2006
  return (options?.client ?? this.client).post({
1755
2007
  url: "/tui/open-help",
1756
2008
  ...options,
@@ -1763,7 +2015,14 @@ export class Tui extends HeyApiClient {
1763
2015
  * Open the session dialog
1764
2016
  */
1765
2017
  openSessions(parameters, options) {
1766
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2018
+ const params = buildClientParams([parameters], [
2019
+ {
2020
+ args: [
2021
+ { in: "query", key: "directory" },
2022
+ { in: "query", key: "workspace" },
2023
+ ],
2024
+ },
2025
+ ]);
1767
2026
  return (options?.client ?? this.client).post({
1768
2027
  url: "/tui/open-sessions",
1769
2028
  ...options,
@@ -1776,7 +2035,14 @@ export class Tui extends HeyApiClient {
1776
2035
  * Open the theme dialog
1777
2036
  */
1778
2037
  openThemes(parameters, options) {
1779
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2038
+ const params = buildClientParams([parameters], [
2039
+ {
2040
+ args: [
2041
+ { in: "query", key: "directory" },
2042
+ { in: "query", key: "workspace" },
2043
+ ],
2044
+ },
2045
+ ]);
1780
2046
  return (options?.client ?? this.client).post({
1781
2047
  url: "/tui/open-themes",
1782
2048
  ...options,
@@ -1789,7 +2055,14 @@ export class Tui extends HeyApiClient {
1789
2055
  * Open the model dialog
1790
2056
  */
1791
2057
  openModels(parameters, options) {
1792
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2058
+ const params = buildClientParams([parameters], [
2059
+ {
2060
+ args: [
2061
+ { in: "query", key: "directory" },
2062
+ { in: "query", key: "workspace" },
2063
+ ],
2064
+ },
2065
+ ]);
1793
2066
  return (options?.client ?? this.client).post({
1794
2067
  url: "/tui/open-models",
1795
2068
  ...options,
@@ -1802,7 +2075,14 @@ export class Tui extends HeyApiClient {
1802
2075
  * Submit the prompt
1803
2076
  */
1804
2077
  submitPrompt(parameters, options) {
1805
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2078
+ const params = buildClientParams([parameters], [
2079
+ {
2080
+ args: [
2081
+ { in: "query", key: "directory" },
2082
+ { in: "query", key: "workspace" },
2083
+ ],
2084
+ },
2085
+ ]);
1806
2086
  return (options?.client ?? this.client).post({
1807
2087
  url: "/tui/submit-prompt",
1808
2088
  ...options,
@@ -1815,7 +2095,14 @@ export class Tui extends HeyApiClient {
1815
2095
  * Clear the prompt
1816
2096
  */
1817
2097
  clearPrompt(parameters, options) {
1818
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2098
+ const params = buildClientParams([parameters], [
2099
+ {
2100
+ args: [
2101
+ { in: "query", key: "directory" },
2102
+ { in: "query", key: "workspace" },
2103
+ ],
2104
+ },
2105
+ ]);
1819
2106
  return (options?.client ?? this.client).post({
1820
2107
  url: "/tui/clear-prompt",
1821
2108
  ...options,
@@ -1832,6 +2119,7 @@ export class Tui extends HeyApiClient {
1832
2119
  {
1833
2120
  args: [
1834
2121
  { in: "query", key: "directory" },
2122
+ { in: "query", key: "workspace" },
1835
2123
  { in: "body", key: "command" },
1836
2124
  ],
1837
2125
  },
@@ -1857,6 +2145,7 @@ export class Tui extends HeyApiClient {
1857
2145
  {
1858
2146
  args: [
1859
2147
  { in: "query", key: "directory" },
2148
+ { in: "query", key: "workspace" },
1860
2149
  { in: "body", key: "title" },
1861
2150
  { in: "body", key: "message" },
1862
2151
  { in: "body", key: "variant" },
@@ -1885,6 +2174,7 @@ export class Tui extends HeyApiClient {
1885
2174
  {
1886
2175
  args: [
1887
2176
  { in: "query", key: "directory" },
2177
+ { in: "query", key: "workspace" },
1888
2178
  { key: "body", map: "body" },
1889
2179
  ],
1890
2180
  },
@@ -1910,6 +2200,7 @@ export class Tui extends HeyApiClient {
1910
2200
  {
1911
2201
  args: [
1912
2202
  { in: "query", key: "directory" },
2203
+ { in: "query", key: "workspace" },
1913
2204
  { in: "body", key: "sessionID" },
1914
2205
  ],
1915
2206
  },
@@ -1937,7 +2228,14 @@ export class Instance extends HeyApiClient {
1937
2228
  * Clean up and dispose the current OpenCode instance, releasing all resources.
1938
2229
  */
1939
2230
  dispose(parameters, options) {
1940
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2231
+ const params = buildClientParams([parameters], [
2232
+ {
2233
+ args: [
2234
+ { in: "query", key: "directory" },
2235
+ { in: "query", key: "workspace" },
2236
+ ],
2237
+ },
2238
+ ]);
1941
2239
  return (options?.client ?? this.client).post({
1942
2240
  url: "/instance/dispose",
1943
2241
  ...options,
@@ -1952,7 +2250,14 @@ export class Path extends HeyApiClient {
1952
2250
  * Retrieve the current working directory and related path information for the OpenCode instance.
1953
2251
  */
1954
2252
  get(parameters, options) {
1955
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2253
+ const params = buildClientParams([parameters], [
2254
+ {
2255
+ args: [
2256
+ { in: "query", key: "directory" },
2257
+ { in: "query", key: "workspace" },
2258
+ ],
2259
+ },
2260
+ ]);
1956
2261
  return (options?.client ?? this.client).get({
1957
2262
  url: "/path",
1958
2263
  ...options,
@@ -1967,7 +2272,14 @@ export class Vcs extends HeyApiClient {
1967
2272
  * Retrieve version control system (VCS) information for the current project, such as git branch.
1968
2273
  */
1969
2274
  get(parameters, options) {
1970
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2275
+ const params = buildClientParams([parameters], [
2276
+ {
2277
+ args: [
2278
+ { in: "query", key: "directory" },
2279
+ { in: "query", key: "workspace" },
2280
+ ],
2281
+ },
2282
+ ]);
1971
2283
  return (options?.client ?? this.client).get({
1972
2284
  url: "/vcs",
1973
2285
  ...options,
@@ -1982,7 +2294,14 @@ export class Command extends HeyApiClient {
1982
2294
  * Get a list of all available commands in the OpenCode system.
1983
2295
  */
1984
2296
  list(parameters, options) {
1985
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2297
+ const params = buildClientParams([parameters], [
2298
+ {
2299
+ args: [
2300
+ { in: "query", key: "directory" },
2301
+ { in: "query", key: "workspace" },
2302
+ ],
2303
+ },
2304
+ ]);
1986
2305
  return (options?.client ?? this.client).get({
1987
2306
  url: "/command",
1988
2307
  ...options,
@@ -2001,6 +2320,7 @@ export class App extends HeyApiClient {
2001
2320
  {
2002
2321
  args: [
2003
2322
  { in: "query", key: "directory" },
2323
+ { in: "query", key: "workspace" },
2004
2324
  { in: "body", key: "service" },
2005
2325
  { in: "body", key: "level" },
2006
2326
  { in: "body", key: "message" },
@@ -2025,7 +2345,14 @@ export class App extends HeyApiClient {
2025
2345
  * Get a list of all available AI agents in the OpenCode system.
2026
2346
  */
2027
2347
  agents(parameters, options) {
2028
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2348
+ const params = buildClientParams([parameters], [
2349
+ {
2350
+ args: [
2351
+ { in: "query", key: "directory" },
2352
+ { in: "query", key: "workspace" },
2353
+ ],
2354
+ },
2355
+ ]);
2029
2356
  return (options?.client ?? this.client).get({
2030
2357
  url: "/agent",
2031
2358
  ...options,
@@ -2038,7 +2365,14 @@ export class App extends HeyApiClient {
2038
2365
  * Get a list of all available skills in the OpenCode system.
2039
2366
  */
2040
2367
  skills(parameters, options) {
2041
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2368
+ const params = buildClientParams([parameters], [
2369
+ {
2370
+ args: [
2371
+ { in: "query", key: "directory" },
2372
+ { in: "query", key: "workspace" },
2373
+ ],
2374
+ },
2375
+ ]);
2042
2376
  return (options?.client ?? this.client).get({
2043
2377
  url: "/skill",
2044
2378
  ...options,
@@ -2053,7 +2387,14 @@ export class Lsp extends HeyApiClient {
2053
2387
  * Get LSP server status
2054
2388
  */
2055
2389
  status(parameters, options) {
2056
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2390
+ const params = buildClientParams([parameters], [
2391
+ {
2392
+ args: [
2393
+ { in: "query", key: "directory" },
2394
+ { in: "query", key: "workspace" },
2395
+ ],
2396
+ },
2397
+ ]);
2057
2398
  return (options?.client ?? this.client).get({
2058
2399
  url: "/lsp",
2059
2400
  ...options,
@@ -2068,7 +2409,14 @@ export class Formatter extends HeyApiClient {
2068
2409
  * Get formatter status
2069
2410
  */
2070
2411
  status(parameters, options) {
2071
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2412
+ const params = buildClientParams([parameters], [
2413
+ {
2414
+ args: [
2415
+ { in: "query", key: "directory" },
2416
+ { in: "query", key: "workspace" },
2417
+ ],
2418
+ },
2419
+ ]);
2072
2420
  return (options?.client ?? this.client).get({
2073
2421
  url: "/formatter",
2074
2422
  ...options,
@@ -2083,7 +2431,14 @@ export class Event extends HeyApiClient {
2083
2431
  * Get events
2084
2432
  */
2085
2433
  subscribe(parameters, options) {
2086
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2434
+ const params = buildClientParams([parameters], [
2435
+ {
2436
+ args: [
2437
+ { in: "query", key: "directory" },
2438
+ { in: "query", key: "workspace" },
2439
+ ],
2440
+ },
2441
+ ]);
2087
2442
  return (options?.client ?? this.client).sse.get({
2088
2443
  url: "/event",
2089
2444
  ...options,
@@ -2121,14 +2476,14 @@ export class OpencodeClient extends HeyApiClient {
2121
2476
  get tool() {
2122
2477
  return (this._tool ??= new Tool({ client: this.client }));
2123
2478
  }
2124
- _worktree;
2125
- get worktree() {
2126
- return (this._worktree ??= new Worktree({ client: this.client }));
2127
- }
2128
2479
  _experimental;
2129
2480
  get experimental() {
2130
2481
  return (this._experimental ??= new Experimental({ client: this.client }));
2131
2482
  }
2483
+ _worktree;
2484
+ get worktree() {
2485
+ return (this._worktree ??= new Worktree({ client: this.client }));
2486
+ }
2132
2487
  _session;
2133
2488
  get session() {
2134
2489
  return (this._session ??= new Session2({ client: this.client }));