@matrix-ai/sdk 1.1.59 → 1.1.61

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,13 +158,40 @@ 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,
158
172
  ...params,
159
173
  });
160
174
  }
175
+ /**
176
+ * Initialize git repository
177
+ *
178
+ * Create a git repository for the current project and return the refreshed project info.
179
+ */
180
+ initGit(parameters, options) {
181
+ const params = buildClientParams([parameters], [
182
+ {
183
+ args: [
184
+ { in: "query", key: "directory" },
185
+ { in: "query", key: "workspace" },
186
+ ],
187
+ },
188
+ ]);
189
+ return (options?.client ?? this.client).post({
190
+ url: "/project/git/init",
191
+ ...options,
192
+ ...params,
193
+ });
194
+ }
161
195
  /**
162
196
  * Update project
163
197
  *
@@ -169,6 +203,7 @@ export class Project extends HeyApiClient {
169
203
  args: [
170
204
  { in: "path", key: "projectID" },
171
205
  { in: "query", key: "directory" },
206
+ { in: "query", key: "workspace" },
172
207
  { in: "body", key: "name" },
173
208
  { in: "body", key: "icon" },
174
209
  { in: "body", key: "commands" },
@@ -194,7 +229,14 @@ export class Pty extends HeyApiClient {
194
229
  * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
195
230
  */
196
231
  list(parameters, options) {
197
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
232
+ const params = buildClientParams([parameters], [
233
+ {
234
+ args: [
235
+ { in: "query", key: "directory" },
236
+ { in: "query", key: "workspace" },
237
+ ],
238
+ },
239
+ ]);
198
240
  return (options?.client ?? this.client).get({
199
241
  url: "/pty",
200
242
  ...options,
@@ -211,6 +253,7 @@ export class Pty extends HeyApiClient {
211
253
  {
212
254
  args: [
213
255
  { in: "query", key: "directory" },
256
+ { in: "query", key: "workspace" },
214
257
  { in: "body", key: "command" },
215
258
  { in: "body", key: "args" },
216
259
  { in: "body", key: "cwd" },
@@ -241,6 +284,7 @@ export class Pty extends HeyApiClient {
241
284
  args: [
242
285
  { in: "path", key: "ptyID" },
243
286
  { in: "query", key: "directory" },
287
+ { in: "query", key: "workspace" },
244
288
  ],
245
289
  },
246
290
  ]);
@@ -261,6 +305,7 @@ export class Pty extends HeyApiClient {
261
305
  args: [
262
306
  { in: "path", key: "ptyID" },
263
307
  { in: "query", key: "directory" },
308
+ { in: "query", key: "workspace" },
264
309
  ],
265
310
  },
266
311
  ]);
@@ -281,6 +326,7 @@ export class Pty extends HeyApiClient {
281
326
  args: [
282
327
  { in: "path", key: "ptyID" },
283
328
  { in: "query", key: "directory" },
329
+ { in: "query", key: "workspace" },
284
330
  { in: "body", key: "title" },
285
331
  { in: "body", key: "size" },
286
332
  ],
@@ -308,6 +354,7 @@ export class Pty extends HeyApiClient {
308
354
  args: [
309
355
  { in: "path", key: "ptyID" },
310
356
  { in: "query", key: "directory" },
357
+ { in: "query", key: "workspace" },
311
358
  ],
312
359
  },
313
360
  ]);
@@ -325,7 +372,14 @@ export class Config2 extends HeyApiClient {
325
372
  * Retrieve the current OpenCode configuration settings and preferences.
326
373
  */
327
374
  get(parameters, options) {
328
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
375
+ const params = buildClientParams([parameters], [
376
+ {
377
+ args: [
378
+ { in: "query", key: "directory" },
379
+ { in: "query", key: "workspace" },
380
+ ],
381
+ },
382
+ ]);
329
383
  return (options?.client ?? this.client).get({
330
384
  url: "/config",
331
385
  ...options,
@@ -342,6 +396,7 @@ export class Config2 extends HeyApiClient {
342
396
  {
343
397
  args: [
344
398
  { in: "query", key: "directory" },
399
+ { in: "query", key: "workspace" },
345
400
  { key: "config", map: "body" },
346
401
  ],
347
402
  },
@@ -363,7 +418,14 @@ export class Config2 extends HeyApiClient {
363
418
  * Get a list of all configured AI providers and their default models.
364
419
  */
365
420
  providers(parameters, options) {
366
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
421
+ const params = buildClientParams([parameters], [
422
+ {
423
+ args: [
424
+ { in: "query", key: "directory" },
425
+ { in: "query", key: "workspace" },
426
+ ],
427
+ },
428
+ ]);
367
429
  return (options?.client ?? this.client).get({
368
430
  url: "/config/providers",
369
431
  ...options,
@@ -378,7 +440,14 @@ export class Tool extends HeyApiClient {
378
440
  * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
379
441
  */
380
442
  ids(parameters, options) {
381
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
443
+ const params = buildClientParams([parameters], [
444
+ {
445
+ args: [
446
+ { in: "query", key: "directory" },
447
+ { in: "query", key: "workspace" },
448
+ ],
449
+ },
450
+ ]);
382
451
  return (options?.client ?? this.client).get({
383
452
  url: "/experimental/tool/ids",
384
453
  ...options,
@@ -395,6 +464,7 @@ export class Tool extends HeyApiClient {
395
464
  {
396
465
  args: [
397
466
  { in: "query", key: "directory" },
467
+ { in: "query", key: "workspace" },
398
468
  { in: "query", key: "provider" },
399
469
  { in: "query", key: "model" },
400
470
  ],
@@ -407,6 +477,142 @@ export class Tool extends HeyApiClient {
407
477
  });
408
478
  }
409
479
  }
480
+ export class Workspace extends HeyApiClient {
481
+ /**
482
+ * List workspaces
483
+ *
484
+ * List all workspaces.
485
+ */
486
+ list(parameters, options) {
487
+ const params = buildClientParams([parameters], [
488
+ {
489
+ args: [
490
+ { in: "query", key: "directory" },
491
+ { in: "query", key: "workspace" },
492
+ ],
493
+ },
494
+ ]);
495
+ return (options?.client ?? this.client).get({
496
+ url: "/experimental/workspace",
497
+ ...options,
498
+ ...params,
499
+ });
500
+ }
501
+ /**
502
+ * Create workspace
503
+ *
504
+ * Create a workspace for the current project.
505
+ */
506
+ create(parameters, options) {
507
+ const params = buildClientParams([parameters], [
508
+ {
509
+ args: [
510
+ { in: "query", key: "directory" },
511
+ { in: "query", key: "workspace" },
512
+ { in: "body", key: "id" },
513
+ { in: "body", key: "type" },
514
+ { in: "body", key: "branch" },
515
+ { in: "body", key: "extra" },
516
+ ],
517
+ },
518
+ ]);
519
+ return (options?.client ?? this.client).post({
520
+ url: "/experimental/workspace",
521
+ ...options,
522
+ ...params,
523
+ headers: {
524
+ "Content-Type": "application/json",
525
+ ...options?.headers,
526
+ ...params.headers,
527
+ },
528
+ });
529
+ }
530
+ /**
531
+ * Remove workspace
532
+ *
533
+ * Remove an existing workspace.
534
+ */
535
+ remove(parameters, options) {
536
+ const params = buildClientParams([parameters], [
537
+ {
538
+ args: [
539
+ { in: "path", key: "id" },
540
+ { in: "query", key: "directory" },
541
+ { in: "query", key: "workspace" },
542
+ ],
543
+ },
544
+ ]);
545
+ return (options?.client ?? this.client).delete({
546
+ url: "/experimental/workspace/{id}",
547
+ ...options,
548
+ ...params,
549
+ });
550
+ }
551
+ }
552
+ export class Session extends HeyApiClient {
553
+ /**
554
+ * List sessions
555
+ *
556
+ * Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
557
+ */
558
+ list(parameters, options) {
559
+ const params = buildClientParams([parameters], [
560
+ {
561
+ args: [
562
+ { in: "query", key: "directory" },
563
+ { in: "query", key: "workspace" },
564
+ { in: "query", key: "roots" },
565
+ { in: "query", key: "start" },
566
+ { in: "query", key: "cursor" },
567
+ { in: "query", key: "search" },
568
+ { in: "query", key: "limit" },
569
+ { in: "query", key: "archived" },
570
+ ],
571
+ },
572
+ ]);
573
+ return (options?.client ?? this.client).get({
574
+ url: "/experimental/session",
575
+ ...options,
576
+ ...params,
577
+ });
578
+ }
579
+ }
580
+ export class Resource extends HeyApiClient {
581
+ /**
582
+ * Get MCP resources
583
+ *
584
+ * Get all available MCP resources from connected servers. Optionally filter by name.
585
+ */
586
+ list(parameters, options) {
587
+ const params = buildClientParams([parameters], [
588
+ {
589
+ args: [
590
+ { in: "query", key: "directory" },
591
+ { in: "query", key: "workspace" },
592
+ ],
593
+ },
594
+ ]);
595
+ return (options?.client ?? this.client).get({
596
+ url: "/experimental/resource",
597
+ ...options,
598
+ ...params,
599
+ });
600
+ }
601
+ }
602
+ export class Experimental extends HeyApiClient {
603
+ _workspace;
604
+ get workspace() {
605
+ return (this._workspace ??= new Workspace({ client: this.client }));
606
+ }
607
+ _session;
608
+ get session() {
609
+ return (this._session ??= new Session({ client: this.client }));
610
+ }
611
+ _resource;
612
+ get resource() {
613
+ return (this._resource ??= new Resource({ client: this.client }));
614
+ }
615
+ }
410
616
  export class Worktree extends HeyApiClient {
411
617
  /**
412
618
  * Remove worktree
@@ -418,6 +624,7 @@ export class Worktree extends HeyApiClient {
418
624
  {
419
625
  args: [
420
626
  { in: "query", key: "directory" },
627
+ { in: "query", key: "workspace" },
421
628
  { key: "worktreeRemoveInput", map: "body" },
422
629
  ],
423
630
  },
@@ -439,7 +646,14 @@ export class Worktree extends HeyApiClient {
439
646
  * List all sandbox worktrees for the current project.
440
647
  */
441
648
  list(parameters, options) {
442
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
649
+ const params = buildClientParams([parameters], [
650
+ {
651
+ args: [
652
+ { in: "query", key: "directory" },
653
+ { in: "query", key: "workspace" },
654
+ ],
655
+ },
656
+ ]);
443
657
  return (options?.client ?? this.client).get({
444
658
  url: "/experimental/worktree",
445
659
  ...options,
@@ -456,6 +670,7 @@ export class Worktree extends HeyApiClient {
456
670
  {
457
671
  args: [
458
672
  { in: "query", key: "directory" },
673
+ { in: "query", key: "workspace" },
459
674
  { key: "worktreeCreateInput", map: "body" },
460
675
  ],
461
676
  },
@@ -481,6 +696,7 @@ export class Worktree extends HeyApiClient {
481
696
  {
482
697
  args: [
483
698
  { in: "query", key: "directory" },
699
+ { in: "query", key: "workspace" },
484
700
  { key: "worktreeResetInput", map: "body" },
485
701
  ],
486
702
  },
@@ -497,28 +713,7 @@ export class Worktree extends HeyApiClient {
497
713
  });
498
714
  }
499
715
  }
500
- export class Resource extends HeyApiClient {
501
- /**
502
- * Get MCP resources
503
- *
504
- * Get all available MCP resources from connected servers. Optionally filter by name.
505
- */
506
- list(parameters, options) {
507
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
508
- return (options?.client ?? this.client).get({
509
- url: "/experimental/resource",
510
- ...options,
511
- ...params,
512
- });
513
- }
514
- }
515
- export class Experimental extends HeyApiClient {
516
- _resource;
517
- get resource() {
518
- return (this._resource ??= new Resource({ client: this.client }));
519
- }
520
- }
521
- export class Session extends HeyApiClient {
716
+ export class Session2 extends HeyApiClient {
522
717
  /**
523
718
  * List sessions
524
719
  *
@@ -529,6 +724,7 @@ export class Session extends HeyApiClient {
529
724
  {
530
725
  args: [
531
726
  { in: "query", key: "directory" },
727
+ { in: "query", key: "workspace" },
532
728
  { in: "query", key: "roots" },
533
729
  { in: "query", key: "start" },
534
730
  { in: "query", key: "search" },
@@ -552,6 +748,7 @@ export class Session extends HeyApiClient {
552
748
  {
553
749
  args: [
554
750
  { in: "query", key: "directory" },
751
+ { in: "query", key: "workspace" },
555
752
  { in: "body", key: "parentID" },
556
753
  { in: "body", key: "title" },
557
754
  { in: "body", key: "permission" },
@@ -575,7 +772,14 @@ export class Session extends HeyApiClient {
575
772
  * Retrieve the current status of all sessions, including active, idle, and completed states.
576
773
  */
577
774
  status(parameters, options) {
578
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
775
+ const params = buildClientParams([parameters], [
776
+ {
777
+ args: [
778
+ { in: "query", key: "directory" },
779
+ { in: "query", key: "workspace" },
780
+ ],
781
+ },
782
+ ]);
579
783
  return (options?.client ?? this.client).get({
580
784
  url: "/session/status",
581
785
  ...options,
@@ -593,6 +797,7 @@ export class Session extends HeyApiClient {
593
797
  args: [
594
798
  { in: "path", key: "sessionID" },
595
799
  { in: "query", key: "directory" },
800
+ { in: "query", key: "workspace" },
596
801
  ],
597
802
  },
598
803
  ]);
@@ -613,6 +818,7 @@ export class Session extends HeyApiClient {
613
818
  args: [
614
819
  { in: "path", key: "sessionID" },
615
820
  { in: "query", key: "directory" },
821
+ { in: "query", key: "workspace" },
616
822
  ],
617
823
  },
618
824
  ]);
@@ -633,6 +839,7 @@ export class Session extends HeyApiClient {
633
839
  args: [
634
840
  { in: "path", key: "sessionID" },
635
841
  { in: "query", key: "directory" },
842
+ { in: "query", key: "workspace" },
636
843
  { in: "body", key: "title" },
637
844
  { in: "body", key: "time" },
638
845
  ],
@@ -660,6 +867,7 @@ export class Session extends HeyApiClient {
660
867
  args: [
661
868
  { in: "path", key: "sessionID" },
662
869
  { in: "query", key: "directory" },
870
+ { in: "query", key: "workspace" },
663
871
  ],
664
872
  },
665
873
  ]);
@@ -680,6 +888,7 @@ export class Session extends HeyApiClient {
680
888
  args: [
681
889
  { in: "path", key: "sessionID" },
682
890
  { in: "query", key: "directory" },
891
+ { in: "query", key: "workspace" },
683
892
  ],
684
893
  },
685
894
  ]);
@@ -700,6 +909,7 @@ export class Session extends HeyApiClient {
700
909
  args: [
701
910
  { in: "path", key: "sessionID" },
702
911
  { in: "query", key: "directory" },
912
+ { in: "query", key: "workspace" },
703
913
  { in: "body", key: "modelID" },
704
914
  { in: "body", key: "providerID" },
705
915
  { in: "body", key: "messageID" },
@@ -728,6 +938,7 @@ export class Session extends HeyApiClient {
728
938
  args: [
729
939
  { in: "path", key: "sessionID" },
730
940
  { in: "query", key: "directory" },
941
+ { in: "query", key: "workspace" },
731
942
  { in: "body", key: "messageID" },
732
943
  ],
733
944
  },
@@ -754,6 +965,7 @@ export class Session extends HeyApiClient {
754
965
  args: [
755
966
  { in: "path", key: "sessionID" },
756
967
  { in: "query", key: "directory" },
968
+ { in: "query", key: "workspace" },
757
969
  ],
758
970
  },
759
971
  ]);
@@ -774,6 +986,7 @@ export class Session extends HeyApiClient {
774
986
  args: [
775
987
  { in: "path", key: "sessionID" },
776
988
  { in: "query", key: "directory" },
989
+ { in: "query", key: "workspace" },
777
990
  ],
778
991
  },
779
992
  ]);
@@ -794,6 +1007,7 @@ export class Session extends HeyApiClient {
794
1007
  args: [
795
1008
  { in: "path", key: "sessionID" },
796
1009
  { in: "query", key: "directory" },
1010
+ { in: "query", key: "workspace" },
797
1011
  ],
798
1012
  },
799
1013
  ]);
@@ -814,6 +1028,7 @@ export class Session extends HeyApiClient {
814
1028
  args: [
815
1029
  { in: "path", key: "sessionID" },
816
1030
  { in: "query", key: "directory" },
1031
+ { in: "query", key: "workspace" },
817
1032
  { in: "query", key: "messageID" },
818
1033
  ],
819
1034
  },
@@ -835,6 +1050,7 @@ export class Session extends HeyApiClient {
835
1050
  args: [
836
1051
  { in: "path", key: "sessionID" },
837
1052
  { in: "query", key: "directory" },
1053
+ { in: "query", key: "workspace" },
838
1054
  { in: "body", key: "providerID" },
839
1055
  { in: "body", key: "modelID" },
840
1056
  { in: "body", key: "auto" },
@@ -863,6 +1079,7 @@ export class Session extends HeyApiClient {
863
1079
  args: [
864
1080
  { in: "path", key: "sessionID" },
865
1081
  { in: "query", key: "directory" },
1082
+ { in: "query", key: "workspace" },
866
1083
  { in: "query", key: "limit" },
867
1084
  ],
868
1085
  },
@@ -884,11 +1101,13 @@ export class Session extends HeyApiClient {
884
1101
  args: [
885
1102
  { in: "path", key: "sessionID" },
886
1103
  { in: "query", key: "directory" },
1104
+ { in: "query", key: "workspace" },
887
1105
  { in: "body", key: "messageID" },
888
1106
  { in: "body", key: "model" },
889
1107
  { in: "body", key: "agent" },
890
1108
  { in: "body", key: "noReply" },
891
1109
  { in: "body", key: "tools" },
1110
+ { in: "body", key: "format" },
892
1111
  { in: "body", key: "system" },
893
1112
  { in: "body", key: "variant" },
894
1113
  { in: "body", key: "parts" },
@@ -906,6 +1125,28 @@ export class Session extends HeyApiClient {
906
1125
  },
907
1126
  });
908
1127
  }
1128
+ /**
1129
+ * Delete message
1130
+ *
1131
+ * Permanently delete a specific message (and all of its parts) from a session. This does not revert any file changes that may have been made while processing the message.
1132
+ */
1133
+ deleteMessage(parameters, options) {
1134
+ const params = buildClientParams([parameters], [
1135
+ {
1136
+ args: [
1137
+ { in: "path", key: "sessionID" },
1138
+ { in: "path", key: "messageID" },
1139
+ { in: "query", key: "directory" },
1140
+ { in: "query", key: "workspace" },
1141
+ ],
1142
+ },
1143
+ ]);
1144
+ return (options?.client ?? this.client).delete({
1145
+ url: "/session/{sessionID}/message/{messageID}",
1146
+ ...options,
1147
+ ...params,
1148
+ });
1149
+ }
909
1150
  /**
910
1151
  * Get message
911
1152
  *
@@ -918,6 +1159,7 @@ export class Session extends HeyApiClient {
918
1159
  { in: "path", key: "sessionID" },
919
1160
  { in: "path", key: "messageID" },
920
1161
  { in: "query", key: "directory" },
1162
+ { in: "query", key: "workspace" },
921
1163
  ],
922
1164
  },
923
1165
  ]);
@@ -938,11 +1180,13 @@ export class Session extends HeyApiClient {
938
1180
  args: [
939
1181
  { in: "path", key: "sessionID" },
940
1182
  { in: "query", key: "directory" },
1183
+ { in: "query", key: "workspace" },
941
1184
  { in: "body", key: "messageID" },
942
1185
  { in: "body", key: "model" },
943
1186
  { in: "body", key: "agent" },
944
1187
  { in: "body", key: "noReply" },
945
1188
  { in: "body", key: "tools" },
1189
+ { in: "body", key: "format" },
946
1190
  { in: "body", key: "system" },
947
1191
  { in: "body", key: "variant" },
948
1192
  { in: "body", key: "parts" },
@@ -971,6 +1215,7 @@ export class Session extends HeyApiClient {
971
1215
  args: [
972
1216
  { in: "path", key: "sessionID" },
973
1217
  { in: "query", key: "directory" },
1218
+ { in: "query", key: "workspace" },
974
1219
  { in: "body", key: "messageID" },
975
1220
  { in: "body", key: "agent" },
976
1221
  { in: "body", key: "model" },
@@ -1003,6 +1248,7 @@ export class Session extends HeyApiClient {
1003
1248
  args: [
1004
1249
  { in: "path", key: "sessionID" },
1005
1250
  { in: "query", key: "directory" },
1251
+ { in: "query", key: "workspace" },
1006
1252
  { in: "body", key: "agent" },
1007
1253
  { in: "body", key: "model" },
1008
1254
  { in: "body", key: "command" },
@@ -1031,6 +1277,7 @@ export class Session extends HeyApiClient {
1031
1277
  args: [
1032
1278
  { in: "path", key: "sessionID" },
1033
1279
  { in: "query", key: "directory" },
1280
+ { in: "query", key: "workspace" },
1034
1281
  { in: "body", key: "messageID" },
1035
1282
  { in: "body", key: "partID" },
1036
1283
  ],
@@ -1058,6 +1305,7 @@ export class Session extends HeyApiClient {
1058
1305
  args: [
1059
1306
  { in: "path", key: "sessionID" },
1060
1307
  { in: "query", key: "directory" },
1308
+ { in: "query", key: "workspace" },
1061
1309
  ],
1062
1310
  },
1063
1311
  ]);
@@ -1080,6 +1328,7 @@ export class Part extends HeyApiClient {
1080
1328
  { in: "path", key: "messageID" },
1081
1329
  { in: "path", key: "partID" },
1082
1330
  { in: "query", key: "directory" },
1331
+ { in: "query", key: "workspace" },
1083
1332
  ],
1084
1333
  },
1085
1334
  ]);
@@ -1100,6 +1349,7 @@ export class Part extends HeyApiClient {
1100
1349
  { in: "path", key: "messageID" },
1101
1350
  { in: "path", key: "partID" },
1102
1351
  { in: "query", key: "directory" },
1352
+ { in: "query", key: "workspace" },
1103
1353
  { key: "part", map: "body" },
1104
1354
  ],
1105
1355
  },
@@ -1131,6 +1381,7 @@ export class Permission extends HeyApiClient {
1131
1381
  { in: "path", key: "sessionID" },
1132
1382
  { in: "path", key: "permissionID" },
1133
1383
  { in: "query", key: "directory" },
1384
+ { in: "query", key: "workspace" },
1134
1385
  { in: "body", key: "response" },
1135
1386
  ],
1136
1387
  },
@@ -1157,6 +1408,7 @@ export class Permission extends HeyApiClient {
1157
1408
  args: [
1158
1409
  { in: "path", key: "requestID" },
1159
1410
  { in: "query", key: "directory" },
1411
+ { in: "query", key: "workspace" },
1160
1412
  { in: "body", key: "reply" },
1161
1413
  { in: "body", key: "message" },
1162
1414
  ],
@@ -1179,7 +1431,14 @@ export class Permission extends HeyApiClient {
1179
1431
  * Get all pending permission requests across all sessions.
1180
1432
  */
1181
1433
  list(parameters, options) {
1182
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1434
+ const params = buildClientParams([parameters], [
1435
+ {
1436
+ args: [
1437
+ { in: "query", key: "directory" },
1438
+ { in: "query", key: "workspace" },
1439
+ ],
1440
+ },
1441
+ ]);
1183
1442
  return (options?.client ?? this.client).get({
1184
1443
  url: "/permission",
1185
1444
  ...options,
@@ -1194,7 +1453,14 @@ export class Question extends HeyApiClient {
1194
1453
  * Get all pending question requests across all sessions.
1195
1454
  */
1196
1455
  list(parameters, options) {
1197
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1456
+ const params = buildClientParams([parameters], [
1457
+ {
1458
+ args: [
1459
+ { in: "query", key: "directory" },
1460
+ { in: "query", key: "workspace" },
1461
+ ],
1462
+ },
1463
+ ]);
1198
1464
  return (options?.client ?? this.client).get({
1199
1465
  url: "/question",
1200
1466
  ...options,
@@ -1212,6 +1478,7 @@ export class Question extends HeyApiClient {
1212
1478
  args: [
1213
1479
  { in: "path", key: "requestID" },
1214
1480
  { in: "query", key: "directory" },
1481
+ { in: "query", key: "workspace" },
1215
1482
  { in: "body", key: "answers" },
1216
1483
  ],
1217
1484
  },
@@ -1238,6 +1505,7 @@ export class Question extends HeyApiClient {
1238
1505
  args: [
1239
1506
  { in: "path", key: "requestID" },
1240
1507
  { in: "query", key: "directory" },
1508
+ { in: "query", key: "workspace" },
1241
1509
  ],
1242
1510
  },
1243
1511
  ]);
@@ -1260,6 +1528,7 @@ export class Oauth extends HeyApiClient {
1260
1528
  args: [
1261
1529
  { in: "path", key: "providerID" },
1262
1530
  { in: "query", key: "directory" },
1531
+ { in: "query", key: "workspace" },
1263
1532
  { in: "body", key: "method" },
1264
1533
  ],
1265
1534
  },
@@ -1286,6 +1555,7 @@ export class Oauth extends HeyApiClient {
1286
1555
  args: [
1287
1556
  { in: "path", key: "providerID" },
1288
1557
  { in: "query", key: "directory" },
1558
+ { in: "query", key: "workspace" },
1289
1559
  { in: "body", key: "method" },
1290
1560
  { in: "body", key: "code" },
1291
1561
  ],
@@ -1310,7 +1580,14 @@ export class Provider extends HeyApiClient {
1310
1580
  * Get a list of all available AI providers, including both available and connected ones.
1311
1581
  */
1312
1582
  list(parameters, options) {
1313
- 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
+ ]);
1314
1591
  return (options?.client ?? this.client).get({
1315
1592
  url: "/provider",
1316
1593
  ...options,
@@ -1323,7 +1600,14 @@ export class Provider extends HeyApiClient {
1323
1600
  * Retrieve available authentication methods for all AI providers.
1324
1601
  */
1325
1602
  auth(parameters, options) {
1326
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1603
+ const params = buildClientParams([parameters], [
1604
+ {
1605
+ args: [
1606
+ { in: "query", key: "directory" },
1607
+ { in: "query", key: "workspace" },
1608
+ ],
1609
+ },
1610
+ ]);
1327
1611
  return (options?.client ?? this.client).get({
1328
1612
  url: "/provider/auth",
1329
1613
  ...options,
@@ -1346,6 +1630,7 @@ export class Find extends HeyApiClient {
1346
1630
  {
1347
1631
  args: [
1348
1632
  { in: "query", key: "directory" },
1633
+ { in: "query", key: "workspace" },
1349
1634
  { in: "query", key: "pattern" },
1350
1635
  ],
1351
1636
  },
@@ -1366,6 +1651,7 @@ export class Find extends HeyApiClient {
1366
1651
  {
1367
1652
  args: [
1368
1653
  { in: "query", key: "directory" },
1654
+ { in: "query", key: "workspace" },
1369
1655
  { in: "query", key: "query" },
1370
1656
  { in: "query", key: "dirs" },
1371
1657
  { in: "query", key: "type" },
@@ -1389,6 +1675,7 @@ export class Find extends HeyApiClient {
1389
1675
  {
1390
1676
  args: [
1391
1677
  { in: "query", key: "directory" },
1678
+ { in: "query", key: "workspace" },
1392
1679
  { in: "query", key: "query" },
1393
1680
  ],
1394
1681
  },
@@ -1411,6 +1698,7 @@ export class File extends HeyApiClient {
1411
1698
  {
1412
1699
  args: [
1413
1700
  { in: "query", key: "directory" },
1701
+ { in: "query", key: "workspace" },
1414
1702
  { in: "query", key: "path" },
1415
1703
  ],
1416
1704
  },
@@ -1431,6 +1719,7 @@ export class File extends HeyApiClient {
1431
1719
  {
1432
1720
  args: [
1433
1721
  { in: "query", key: "directory" },
1722
+ { in: "query", key: "workspace" },
1434
1723
  { in: "query", key: "path" },
1435
1724
  ],
1436
1725
  },
@@ -1447,7 +1736,14 @@ export class File extends HeyApiClient {
1447
1736
  * Get the git status of all files in the project.
1448
1737
  */
1449
1738
  status(parameters, options) {
1450
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1739
+ const params = buildClientParams([parameters], [
1740
+ {
1741
+ args: [
1742
+ { in: "query", key: "directory" },
1743
+ { in: "query", key: "workspace" },
1744
+ ],
1745
+ },
1746
+ ]);
1451
1747
  return (options?.client ?? this.client).get({
1452
1748
  url: "/file/status",
1453
1749
  ...options,
@@ -1467,6 +1763,7 @@ export class Auth2 extends HeyApiClient {
1467
1763
  args: [
1468
1764
  { in: "path", key: "name" },
1469
1765
  { in: "query", key: "directory" },
1766
+ { in: "query", key: "workspace" },
1470
1767
  ],
1471
1768
  },
1472
1769
  ]);
@@ -1487,6 +1784,7 @@ export class Auth2 extends HeyApiClient {
1487
1784
  args: [
1488
1785
  { in: "path", key: "name" },
1489
1786
  { in: "query", key: "directory" },
1787
+ { in: "query", key: "workspace" },
1490
1788
  ],
1491
1789
  },
1492
1790
  ]);
@@ -1507,6 +1805,7 @@ export class Auth2 extends HeyApiClient {
1507
1805
  args: [
1508
1806
  { in: "path", key: "name" },
1509
1807
  { in: "query", key: "directory" },
1808
+ { in: "query", key: "workspace" },
1510
1809
  { in: "body", key: "code" },
1511
1810
  ],
1512
1811
  },
@@ -1533,6 +1832,7 @@ export class Auth2 extends HeyApiClient {
1533
1832
  args: [
1534
1833
  { in: "path", key: "name" },
1535
1834
  { in: "query", key: "directory" },
1835
+ { in: "query", key: "workspace" },
1536
1836
  ],
1537
1837
  },
1538
1838
  ]);
@@ -1550,7 +1850,14 @@ export class Mcp extends HeyApiClient {
1550
1850
  * Get the status of all Model Context Protocol (MCP) servers.
1551
1851
  */
1552
1852
  status(parameters, options) {
1553
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1853
+ const params = buildClientParams([parameters], [
1854
+ {
1855
+ args: [
1856
+ { in: "query", key: "directory" },
1857
+ { in: "query", key: "workspace" },
1858
+ ],
1859
+ },
1860
+ ]);
1554
1861
  return (options?.client ?? this.client).get({
1555
1862
  url: "/mcp",
1556
1863
  ...options,
@@ -1567,6 +1874,7 @@ export class Mcp extends HeyApiClient {
1567
1874
  {
1568
1875
  args: [
1569
1876
  { in: "query", key: "directory" },
1877
+ { in: "query", key: "workspace" },
1570
1878
  { in: "body", key: "name" },
1571
1879
  { in: "body", key: "config" },
1572
1880
  ],
@@ -1592,6 +1900,7 @@ export class Mcp extends HeyApiClient {
1592
1900
  args: [
1593
1901
  { in: "path", key: "name" },
1594
1902
  { in: "query", key: "directory" },
1903
+ { in: "query", key: "workspace" },
1595
1904
  ],
1596
1905
  },
1597
1906
  ]);
@@ -1610,6 +1919,7 @@ export class Mcp extends HeyApiClient {
1610
1919
  args: [
1611
1920
  { in: "path", key: "name" },
1612
1921
  { in: "query", key: "directory" },
1922
+ { in: "query", key: "workspace" },
1613
1923
  ],
1614
1924
  },
1615
1925
  ]);
@@ -1631,7 +1941,14 @@ export class Control extends HeyApiClient {
1631
1941
  * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
1632
1942
  */
1633
1943
  next(parameters, options) {
1634
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1944
+ const params = buildClientParams([parameters], [
1945
+ {
1946
+ args: [
1947
+ { in: "query", key: "directory" },
1948
+ { in: "query", key: "workspace" },
1949
+ ],
1950
+ },
1951
+ ]);
1635
1952
  return (options?.client ?? this.client).get({
1636
1953
  url: "/tui/control/next",
1637
1954
  ...options,
@@ -1648,6 +1965,7 @@ export class Control extends HeyApiClient {
1648
1965
  {
1649
1966
  args: [
1650
1967
  { in: "query", key: "directory" },
1968
+ { in: "query", key: "workspace" },
1651
1969
  { key: "body", map: "body" },
1652
1970
  ],
1653
1971
  },
@@ -1675,6 +1993,7 @@ export class Tui extends HeyApiClient {
1675
1993
  {
1676
1994
  args: [
1677
1995
  { in: "query", key: "directory" },
1996
+ { in: "query", key: "workspace" },
1678
1997
  { in: "body", key: "text" },
1679
1998
  ],
1680
1999
  },
@@ -1696,7 +2015,14 @@ export class Tui extends HeyApiClient {
1696
2015
  * Open the help dialog in the TUI to display user assistance information.
1697
2016
  */
1698
2017
  openHelp(parameters, options) {
1699
- 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
+ ]);
1700
2026
  return (options?.client ?? this.client).post({
1701
2027
  url: "/tui/open-help",
1702
2028
  ...options,
@@ -1709,7 +2035,14 @@ export class Tui extends HeyApiClient {
1709
2035
  * Open the session dialog
1710
2036
  */
1711
2037
  openSessions(parameters, options) {
1712
- 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
+ ]);
1713
2046
  return (options?.client ?? this.client).post({
1714
2047
  url: "/tui/open-sessions",
1715
2048
  ...options,
@@ -1722,7 +2055,14 @@ export class Tui extends HeyApiClient {
1722
2055
  * Open the theme dialog
1723
2056
  */
1724
2057
  openThemes(parameters, options) {
1725
- 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
+ ]);
1726
2066
  return (options?.client ?? this.client).post({
1727
2067
  url: "/tui/open-themes",
1728
2068
  ...options,
@@ -1735,7 +2075,14 @@ export class Tui extends HeyApiClient {
1735
2075
  * Open the model dialog
1736
2076
  */
1737
2077
  openModels(parameters, options) {
1738
- 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
+ ]);
1739
2086
  return (options?.client ?? this.client).post({
1740
2087
  url: "/tui/open-models",
1741
2088
  ...options,
@@ -1748,7 +2095,14 @@ export class Tui extends HeyApiClient {
1748
2095
  * Submit the prompt
1749
2096
  */
1750
2097
  submitPrompt(parameters, options) {
1751
- 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
+ ]);
1752
2106
  return (options?.client ?? this.client).post({
1753
2107
  url: "/tui/submit-prompt",
1754
2108
  ...options,
@@ -1761,7 +2115,14 @@ export class Tui extends HeyApiClient {
1761
2115
  * Clear the prompt
1762
2116
  */
1763
2117
  clearPrompt(parameters, options) {
1764
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2118
+ const params = buildClientParams([parameters], [
2119
+ {
2120
+ args: [
2121
+ { in: "query", key: "directory" },
2122
+ { in: "query", key: "workspace" },
2123
+ ],
2124
+ },
2125
+ ]);
1765
2126
  return (options?.client ?? this.client).post({
1766
2127
  url: "/tui/clear-prompt",
1767
2128
  ...options,
@@ -1778,6 +2139,7 @@ export class Tui extends HeyApiClient {
1778
2139
  {
1779
2140
  args: [
1780
2141
  { in: "query", key: "directory" },
2142
+ { in: "query", key: "workspace" },
1781
2143
  { in: "body", key: "command" },
1782
2144
  ],
1783
2145
  },
@@ -1803,6 +2165,7 @@ export class Tui extends HeyApiClient {
1803
2165
  {
1804
2166
  args: [
1805
2167
  { in: "query", key: "directory" },
2168
+ { in: "query", key: "workspace" },
1806
2169
  { in: "body", key: "title" },
1807
2170
  { in: "body", key: "message" },
1808
2171
  { in: "body", key: "variant" },
@@ -1831,6 +2194,7 @@ export class Tui extends HeyApiClient {
1831
2194
  {
1832
2195
  args: [
1833
2196
  { in: "query", key: "directory" },
2197
+ { in: "query", key: "workspace" },
1834
2198
  { key: "body", map: "body" },
1835
2199
  ],
1836
2200
  },
@@ -1856,6 +2220,7 @@ export class Tui extends HeyApiClient {
1856
2220
  {
1857
2221
  args: [
1858
2222
  { in: "query", key: "directory" },
2223
+ { in: "query", key: "workspace" },
1859
2224
  { in: "body", key: "sessionID" },
1860
2225
  ],
1861
2226
  },
@@ -1883,7 +2248,14 @@ export class Instance extends HeyApiClient {
1883
2248
  * Clean up and dispose the current OpenCode instance, releasing all resources.
1884
2249
  */
1885
2250
  dispose(parameters, options) {
1886
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2251
+ const params = buildClientParams([parameters], [
2252
+ {
2253
+ args: [
2254
+ { in: "query", key: "directory" },
2255
+ { in: "query", key: "workspace" },
2256
+ ],
2257
+ },
2258
+ ]);
1887
2259
  return (options?.client ?? this.client).post({
1888
2260
  url: "/instance/dispose",
1889
2261
  ...options,
@@ -1898,7 +2270,14 @@ export class Path extends HeyApiClient {
1898
2270
  * Retrieve the current working directory and related path information for the OpenCode instance.
1899
2271
  */
1900
2272
  get(parameters, options) {
1901
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2273
+ const params = buildClientParams([parameters], [
2274
+ {
2275
+ args: [
2276
+ { in: "query", key: "directory" },
2277
+ { in: "query", key: "workspace" },
2278
+ ],
2279
+ },
2280
+ ]);
1902
2281
  return (options?.client ?? this.client).get({
1903
2282
  url: "/path",
1904
2283
  ...options,
@@ -1913,7 +2292,14 @@ export class Vcs extends HeyApiClient {
1913
2292
  * Retrieve version control system (VCS) information for the current project, such as git branch.
1914
2293
  */
1915
2294
  get(parameters, options) {
1916
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2295
+ const params = buildClientParams([parameters], [
2296
+ {
2297
+ args: [
2298
+ { in: "query", key: "directory" },
2299
+ { in: "query", key: "workspace" },
2300
+ ],
2301
+ },
2302
+ ]);
1917
2303
  return (options?.client ?? this.client).get({
1918
2304
  url: "/vcs",
1919
2305
  ...options,
@@ -1928,7 +2314,14 @@ export class Command extends HeyApiClient {
1928
2314
  * Get a list of all available commands in the OpenCode system.
1929
2315
  */
1930
2316
  list(parameters, options) {
1931
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2317
+ const params = buildClientParams([parameters], [
2318
+ {
2319
+ args: [
2320
+ { in: "query", key: "directory" },
2321
+ { in: "query", key: "workspace" },
2322
+ ],
2323
+ },
2324
+ ]);
1932
2325
  return (options?.client ?? this.client).get({
1933
2326
  url: "/command",
1934
2327
  ...options,
@@ -1947,6 +2340,7 @@ export class App extends HeyApiClient {
1947
2340
  {
1948
2341
  args: [
1949
2342
  { in: "query", key: "directory" },
2343
+ { in: "query", key: "workspace" },
1950
2344
  { in: "body", key: "service" },
1951
2345
  { in: "body", key: "level" },
1952
2346
  { in: "body", key: "message" },
@@ -1971,7 +2365,14 @@ export class App extends HeyApiClient {
1971
2365
  * Get a list of all available AI agents in the OpenCode system.
1972
2366
  */
1973
2367
  agents(parameters, options) {
1974
- 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
+ ]);
1975
2376
  return (options?.client ?? this.client).get({
1976
2377
  url: "/agent",
1977
2378
  ...options,
@@ -1984,7 +2385,14 @@ export class App extends HeyApiClient {
1984
2385
  * Get a list of all available skills in the OpenCode system.
1985
2386
  */
1986
2387
  skills(parameters, options) {
1987
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2388
+ const params = buildClientParams([parameters], [
2389
+ {
2390
+ args: [
2391
+ { in: "query", key: "directory" },
2392
+ { in: "query", key: "workspace" },
2393
+ ],
2394
+ },
2395
+ ]);
1988
2396
  return (options?.client ?? this.client).get({
1989
2397
  url: "/skill",
1990
2398
  ...options,
@@ -1999,7 +2407,14 @@ export class Lsp extends HeyApiClient {
1999
2407
  * Get LSP server status
2000
2408
  */
2001
2409
  status(parameters, options) {
2002
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2410
+ const params = buildClientParams([parameters], [
2411
+ {
2412
+ args: [
2413
+ { in: "query", key: "directory" },
2414
+ { in: "query", key: "workspace" },
2415
+ ],
2416
+ },
2417
+ ]);
2003
2418
  return (options?.client ?? this.client).get({
2004
2419
  url: "/lsp",
2005
2420
  ...options,
@@ -2014,7 +2429,14 @@ export class Formatter extends HeyApiClient {
2014
2429
  * Get formatter status
2015
2430
  */
2016
2431
  status(parameters, options) {
2017
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2432
+ const params = buildClientParams([parameters], [
2433
+ {
2434
+ args: [
2435
+ { in: "query", key: "directory" },
2436
+ { in: "query", key: "workspace" },
2437
+ ],
2438
+ },
2439
+ ]);
2018
2440
  return (options?.client ?? this.client).get({
2019
2441
  url: "/formatter",
2020
2442
  ...options,
@@ -2029,7 +2451,14 @@ export class Event extends HeyApiClient {
2029
2451
  * Get events
2030
2452
  */
2031
2453
  subscribe(parameters, options) {
2032
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2454
+ const params = buildClientParams([parameters], [
2455
+ {
2456
+ args: [
2457
+ { in: "query", key: "directory" },
2458
+ { in: "query", key: "workspace" },
2459
+ ],
2460
+ },
2461
+ ]);
2033
2462
  return (options?.client ?? this.client).sse.get({
2034
2463
  url: "/event",
2035
2464
  ...options,
@@ -2067,17 +2496,17 @@ export class OpencodeClient extends HeyApiClient {
2067
2496
  get tool() {
2068
2497
  return (this._tool ??= new Tool({ client: this.client }));
2069
2498
  }
2070
- _worktree;
2071
- get worktree() {
2072
- return (this._worktree ??= new Worktree({ client: this.client }));
2073
- }
2074
2499
  _experimental;
2075
2500
  get experimental() {
2076
2501
  return (this._experimental ??= new Experimental({ client: this.client }));
2077
2502
  }
2503
+ _worktree;
2504
+ get worktree() {
2505
+ return (this._worktree ??= new Worktree({ client: this.client }));
2506
+ }
2078
2507
  _session;
2079
2508
  get session() {
2080
- return (this._session ??= new Session({ client: this.client }));
2509
+ return (this._session ??= new Session2({ client: this.client }));
2081
2510
  }
2082
2511
  _part;
2083
2512
  get part() {