@opencode-ai/sdk 0.0.0-dev-202606040530 → 0.0.0-dev-202606042324

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.
@@ -132,154 +132,24 @@ export class App extends HeyApiClient {
132
132
  });
133
133
  }
134
134
  }
135
- export class Config extends HeyApiClient {
136
- /**
137
- * Get global configuration
138
- *
139
- * Retrieve the current global OpenCode configuration settings and preferences.
140
- */
141
- get(options) {
142
- return (options?.client ?? this.client).get({
143
- url: "/global/config",
144
- ...options,
145
- });
146
- }
147
- /**
148
- * Update global configuration
149
- *
150
- * Update global OpenCode configuration settings and preferences.
151
- */
152
- update(parameters, options) {
153
- const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
154
- return (options?.client ?? this.client).patch({
155
- url: "/global/config",
156
- ...options,
157
- ...params,
158
- headers: {
159
- "Content-Type": "application/json",
160
- ...options?.headers,
161
- ...params.headers,
162
- },
163
- });
164
- }
165
- }
166
- export class Global extends HeyApiClient {
167
- /**
168
- * Get health
169
- *
170
- * Get health information about the OpenCode server.
171
- */
172
- health(options) {
173
- return (options?.client ?? this.client).get({
174
- url: "/global/health",
175
- ...options,
176
- });
177
- }
178
- /**
179
- * Get global events
180
- *
181
- * Subscribe to global events from the OpenCode system using server-sent events.
182
- */
183
- event(options) {
184
- return (options?.client ?? this.client).sse.get({
185
- url: "/global/event",
186
- ...options,
187
- });
188
- }
189
- /**
190
- * Dispose instance
191
- *
192
- * Clean up and dispose all OpenCode instances, releasing all resources.
193
- */
194
- dispose(options) {
195
- return (options?.client ?? this.client).post({
196
- url: "/global/dispose",
197
- ...options,
198
- });
199
- }
200
- /**
201
- * Upgrade opencode
202
- *
203
- * Upgrade opencode to the specified version or latest if not specified.
204
- */
205
- upgrade(parameters, options) {
206
- const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
207
- return (options?.client ?? this.client).post({
208
- url: "/global/upgrade",
209
- ...options,
210
- ...params,
211
- headers: {
212
- "Content-Type": "application/json",
213
- ...options?.headers,
214
- ...params.headers,
215
- },
216
- });
217
- }
218
- _config;
219
- get config() {
220
- return (this._config ??= new Config({ client: this.client }));
221
- }
222
- }
223
- export class Event extends HeyApiClient {
224
- /**
225
- * Subscribe to events
226
- *
227
- * Get events
228
- */
229
- subscribe(parameters, options) {
230
- const params = buildClientParams([parameters], [
231
- {
232
- args: [
233
- { in: "query", key: "directory" },
234
- { in: "query", key: "workspace" },
235
- ],
236
- },
237
- ]);
238
- return (options?.client ?? this.client).sse.get({
239
- url: "/event",
240
- ...options,
241
- ...params,
242
- });
243
- }
244
- }
245
- export class Config2 extends HeyApiClient {
246
- /**
247
- * Get configuration
248
- *
249
- * Retrieve the current OpenCode configuration settings and preferences.
250
- */
251
- get(parameters, options) {
252
- const params = buildClientParams([parameters], [
253
- {
254
- args: [
255
- { in: "query", key: "directory" },
256
- { in: "query", key: "workspace" },
257
- ],
258
- },
259
- ]);
260
- return (options?.client ?? this.client).get({
261
- url: "/config",
262
- ...options,
263
- ...params,
264
- });
265
- }
135
+ export class ControlPlane extends HeyApiClient {
266
136
  /**
267
- * Update configuration
137
+ * Move session
268
138
  *
269
- * Update OpenCode configuration settings and preferences.
139
+ * Move a session to another project directory, optionally transferring local changes.
270
140
  */
271
- update(parameters, options) {
141
+ moveSession(parameters, options) {
272
142
  const params = buildClientParams([parameters], [
273
143
  {
274
144
  args: [
275
- { in: "query", key: "directory" },
276
- { in: "query", key: "workspace" },
277
- { key: "config", map: "body" },
145
+ { in: "body", key: "sessionID" },
146
+ { in: "body", key: "destination" },
147
+ { in: "body", key: "moveChanges" },
278
148
  ],
279
149
  },
280
150
  ]);
281
- return (options?.client ?? this.client).patch({
282
- url: "/config",
151
+ return (options?.client ?? this.client).post({
152
+ url: "/experimental/control-plane/move-session",
283
153
  ...options,
284
154
  ...params,
285
155
  headers: {
@@ -289,26 +159,6 @@ export class Config2 extends HeyApiClient {
289
159
  },
290
160
  });
291
161
  }
292
- /**
293
- * List config providers
294
- *
295
- * Get a list of all configured AI providers and their default models.
296
- */
297
- providers(parameters, options) {
298
- const params = buildClientParams([parameters], [
299
- {
300
- args: [
301
- { in: "query", key: "directory" },
302
- { in: "query", key: "workspace" },
303
- ],
304
- },
305
- ]);
306
- return (options?.client ?? this.client).get({
307
- url: "/config/providers",
308
- ...options,
309
- ...params,
310
- });
311
- }
312
162
  }
313
163
  export class Console extends HeyApiClient {
314
164
  /**
@@ -475,18 +325,11 @@ export class ProjectCopy extends HeyApiClient {
475
325
  {
476
326
  args: [
477
327
  { in: "path", key: "projectID" },
478
- {
479
- in: "query",
480
- key: "query_directory",
481
- map: "directory",
482
- },
483
328
  { in: "query", key: "workspace" },
484
329
  { in: "body", key: "strategy" },
485
- {
486
- in: "body",
487
- key: "body_directory",
488
- map: "directory",
489
- },
330
+ { in: "body", key: "directory" },
331
+ { in: "body", key: "name" },
332
+ { in: "body", key: "context" },
490
333
  ],
491
334
  },
492
335
  ]);
@@ -690,6 +533,10 @@ export class Workspace extends HeyApiClient {
690
533
  }
691
534
  }
692
535
  export class Experimental extends HeyApiClient {
536
+ _controlPlane;
537
+ get controlPlane() {
538
+ return (this._controlPlane ??= new ControlPlane({ client: this.client }));
539
+ }
693
540
  _console;
694
541
  get console() {
695
542
  return (this._console ??= new Console({ client: this.client }));
@@ -711,68 +558,27 @@ export class Experimental extends HeyApiClient {
711
558
  return (this._workspace ??= new Workspace({ client: this.client }));
712
559
  }
713
560
  }
714
- export class Tool extends HeyApiClient {
715
- /**
716
- * List tools
717
- *
718
- * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
719
- */
720
- list(parameters, options) {
721
- const params = buildClientParams([parameters], [
722
- {
723
- args: [
724
- { in: "query", key: "directory" },
725
- { in: "query", key: "workspace" },
726
- { in: "query", key: "provider" },
727
- { in: "query", key: "model" },
728
- ],
729
- },
730
- ]);
731
- return (options?.client ?? this.client).get({
732
- url: "/experimental/tool",
733
- ...options,
734
- ...params,
735
- });
736
- }
561
+ export class Config extends HeyApiClient {
737
562
  /**
738
- * List tool IDs
563
+ * Get global configuration
739
564
  *
740
- * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
565
+ * Retrieve the current global OpenCode configuration settings and preferences.
741
566
  */
742
- ids(parameters, options) {
743
- const params = buildClientParams([parameters], [
744
- {
745
- args: [
746
- { in: "query", key: "directory" },
747
- { in: "query", key: "workspace" },
748
- ],
749
- },
750
- ]);
567
+ get(options) {
751
568
  return (options?.client ?? this.client).get({
752
- url: "/experimental/tool/ids",
569
+ url: "/global/config",
753
570
  ...options,
754
- ...params,
755
571
  });
756
572
  }
757
- }
758
- export class Worktree extends HeyApiClient {
759
573
  /**
760
- * Remove worktree
574
+ * Update global configuration
761
575
  *
762
- * Remove a git worktree and delete its branch.
576
+ * Update global OpenCode configuration settings and preferences.
763
577
  */
764
- remove(parameters, options) {
765
- const params = buildClientParams([parameters], [
766
- {
767
- args: [
768
- { in: "query", key: "directory" },
769
- { in: "query", key: "workspace" },
770
- { key: "worktreeRemoveInput", map: "body" },
771
- ],
772
- },
773
- ]);
774
- return (options?.client ?? this.client).delete({
775
- url: "/experimental/worktree",
578
+ update(parameters, options) {
579
+ const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
580
+ return (options?.client ?? this.client).patch({
581
+ url: "/global/config",
776
582
  ...options,
777
583
  ...params,
778
584
  headers: {
@@ -782,28 +588,247 @@ export class Worktree extends HeyApiClient {
782
588
  },
783
589
  });
784
590
  }
591
+ }
592
+ export class Global extends HeyApiClient {
785
593
  /**
786
- * List worktrees
594
+ * Get health
787
595
  *
788
- * List all sandbox worktrees for the current project.
596
+ * Get health information about the OpenCode server.
789
597
  */
790
- list(parameters, options) {
791
- const params = buildClientParams([parameters], [
792
- {
793
- args: [
794
- { in: "query", key: "directory" },
795
- { in: "query", key: "workspace" },
796
- ],
797
- },
798
- ]);
598
+ health(options) {
799
599
  return (options?.client ?? this.client).get({
800
- url: "/experimental/worktree",
600
+ url: "/global/health",
801
601
  ...options,
802
- ...params,
803
602
  });
804
603
  }
805
604
  /**
806
- * Create worktree
605
+ * Get global events
606
+ *
607
+ * Subscribe to global events from the OpenCode system using server-sent events.
608
+ */
609
+ event(options) {
610
+ return (options?.client ?? this.client).sse.get({
611
+ url: "/global/event",
612
+ ...options,
613
+ });
614
+ }
615
+ /**
616
+ * Dispose instance
617
+ *
618
+ * Clean up and dispose all OpenCode instances, releasing all resources.
619
+ */
620
+ dispose(options) {
621
+ return (options?.client ?? this.client).post({
622
+ url: "/global/dispose",
623
+ ...options,
624
+ });
625
+ }
626
+ /**
627
+ * Upgrade opencode
628
+ *
629
+ * Upgrade opencode to the specified version or latest if not specified.
630
+ */
631
+ upgrade(parameters, options) {
632
+ const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
633
+ return (options?.client ?? this.client).post({
634
+ url: "/global/upgrade",
635
+ ...options,
636
+ ...params,
637
+ headers: {
638
+ "Content-Type": "application/json",
639
+ ...options?.headers,
640
+ ...params.headers,
641
+ },
642
+ });
643
+ }
644
+ _config;
645
+ get config() {
646
+ return (this._config ??= new Config({ client: this.client }));
647
+ }
648
+ }
649
+ export class Event extends HeyApiClient {
650
+ /**
651
+ * Subscribe to events
652
+ *
653
+ * Get events
654
+ */
655
+ subscribe(parameters, options) {
656
+ const params = buildClientParams([parameters], [
657
+ {
658
+ args: [
659
+ { in: "query", key: "directory" },
660
+ { in: "query", key: "workspace" },
661
+ ],
662
+ },
663
+ ]);
664
+ return (options?.client ?? this.client).sse.get({
665
+ url: "/event",
666
+ ...options,
667
+ ...params,
668
+ });
669
+ }
670
+ }
671
+ export class Config2 extends HeyApiClient {
672
+ /**
673
+ * Get configuration
674
+ *
675
+ * Retrieve the current OpenCode configuration settings and preferences.
676
+ */
677
+ get(parameters, options) {
678
+ const params = buildClientParams([parameters], [
679
+ {
680
+ args: [
681
+ { in: "query", key: "directory" },
682
+ { in: "query", key: "workspace" },
683
+ ],
684
+ },
685
+ ]);
686
+ return (options?.client ?? this.client).get({
687
+ url: "/config",
688
+ ...options,
689
+ ...params,
690
+ });
691
+ }
692
+ /**
693
+ * Update configuration
694
+ *
695
+ * Update OpenCode configuration settings and preferences.
696
+ */
697
+ update(parameters, options) {
698
+ const params = buildClientParams([parameters], [
699
+ {
700
+ args: [
701
+ { in: "query", key: "directory" },
702
+ { in: "query", key: "workspace" },
703
+ { key: "config", map: "body" },
704
+ ],
705
+ },
706
+ ]);
707
+ return (options?.client ?? this.client).patch({
708
+ url: "/config",
709
+ ...options,
710
+ ...params,
711
+ headers: {
712
+ "Content-Type": "application/json",
713
+ ...options?.headers,
714
+ ...params.headers,
715
+ },
716
+ });
717
+ }
718
+ /**
719
+ * List config providers
720
+ *
721
+ * Get a list of all configured AI providers and their default models.
722
+ */
723
+ providers(parameters, options) {
724
+ const params = buildClientParams([parameters], [
725
+ {
726
+ args: [
727
+ { in: "query", key: "directory" },
728
+ { in: "query", key: "workspace" },
729
+ ],
730
+ },
731
+ ]);
732
+ return (options?.client ?? this.client).get({
733
+ url: "/config/providers",
734
+ ...options,
735
+ ...params,
736
+ });
737
+ }
738
+ }
739
+ export class Tool extends HeyApiClient {
740
+ /**
741
+ * List tools
742
+ *
743
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
744
+ */
745
+ list(parameters, options) {
746
+ const params = buildClientParams([parameters], [
747
+ {
748
+ args: [
749
+ { in: "query", key: "directory" },
750
+ { in: "query", key: "workspace" },
751
+ { in: "query", key: "provider" },
752
+ { in: "query", key: "model" },
753
+ ],
754
+ },
755
+ ]);
756
+ return (options?.client ?? this.client).get({
757
+ url: "/experimental/tool",
758
+ ...options,
759
+ ...params,
760
+ });
761
+ }
762
+ /**
763
+ * List tool IDs
764
+ *
765
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
766
+ */
767
+ ids(parameters, options) {
768
+ const params = buildClientParams([parameters], [
769
+ {
770
+ args: [
771
+ { in: "query", key: "directory" },
772
+ { in: "query", key: "workspace" },
773
+ ],
774
+ },
775
+ ]);
776
+ return (options?.client ?? this.client).get({
777
+ url: "/experimental/tool/ids",
778
+ ...options,
779
+ ...params,
780
+ });
781
+ }
782
+ }
783
+ export class Worktree extends HeyApiClient {
784
+ /**
785
+ * Remove worktree
786
+ *
787
+ * Remove a git worktree and delete its branch.
788
+ */
789
+ remove(parameters, options) {
790
+ const params = buildClientParams([parameters], [
791
+ {
792
+ args: [
793
+ { in: "query", key: "directory" },
794
+ { in: "query", key: "workspace" },
795
+ { key: "worktreeRemoveInput", map: "body" },
796
+ ],
797
+ },
798
+ ]);
799
+ return (options?.client ?? this.client).delete({
800
+ url: "/experimental/worktree",
801
+ ...options,
802
+ ...params,
803
+ headers: {
804
+ "Content-Type": "application/json",
805
+ ...options?.headers,
806
+ ...params.headers,
807
+ },
808
+ });
809
+ }
810
+ /**
811
+ * List worktrees
812
+ *
813
+ * List all sandbox worktrees for the current project.
814
+ */
815
+ list(parameters, options) {
816
+ const params = buildClientParams([parameters], [
817
+ {
818
+ args: [
819
+ { in: "query", key: "directory" },
820
+ { in: "query", key: "workspace" },
821
+ ],
822
+ },
823
+ ]);
824
+ return (options?.client ?? this.client).get({
825
+ url: "/experimental/worktree",
826
+ ...options,
827
+ ...params,
828
+ });
829
+ }
830
+ /**
831
+ * Create worktree
807
832
  *
808
833
  * Create a new git worktree for the current project and run any configured startup scripts.
809
834
  */
@@ -2726,38 +2751,44 @@ export class Sync extends HeyApiClient {
2726
2751
  return (this._history ??= new History({ client: this.client }));
2727
2752
  }
2728
2753
  }
2729
- export class Permission2 extends HeyApiClient {
2754
+ export class Control extends HeyApiClient {
2730
2755
  /**
2731
- * List session permission requests
2756
+ * Get next TUI request
2732
2757
  *
2733
- * Retrieve pending permission requests owned by a session.
2758
+ * Retrieve the next TUI request from the queue for processing.
2734
2759
  */
2735
- list(parameters, options) {
2736
- const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
2760
+ next(parameters, options) {
2761
+ const params = buildClientParams([parameters], [
2762
+ {
2763
+ args: [
2764
+ { in: "query", key: "directory" },
2765
+ { in: "query", key: "workspace" },
2766
+ ],
2767
+ },
2768
+ ]);
2737
2769
  return (options?.client ?? this.client).get({
2738
- url: "/api/session/{sessionID}/permission/request",
2770
+ url: "/tui/control/next",
2739
2771
  ...options,
2740
2772
  ...params,
2741
2773
  });
2742
2774
  }
2743
2775
  /**
2744
- * Reply to pending permission request
2776
+ * Submit TUI response
2745
2777
  *
2746
- * Respond to a pending permission request owned by a session.
2778
+ * Submit a response to the TUI request queue to complete a pending request.
2747
2779
  */
2748
- reply(parameters, options) {
2780
+ response(parameters, options) {
2749
2781
  const params = buildClientParams([parameters], [
2750
2782
  {
2751
2783
  args: [
2752
- { in: "path", key: "sessionID" },
2753
- { in: "path", key: "requestID" },
2754
- { in: "body", key: "reply" },
2755
- { in: "body", key: "message" },
2784
+ { in: "query", key: "directory" },
2785
+ { in: "query", key: "workspace" },
2786
+ { key: "body", map: "body" },
2756
2787
  ],
2757
2788
  },
2758
2789
  ]);
2759
2790
  return (options?.client ?? this.client).post({
2760
- url: "/api/session/{sessionID}/permission/request/{requestID}/reply",
2791
+ url: "/tui/control/response",
2761
2792
  ...options,
2762
2793
  ...params,
2763
2794
  headers: {
@@ -2768,24 +2799,24 @@ export class Permission2 extends HeyApiClient {
2768
2799
  });
2769
2800
  }
2770
2801
  }
2771
- export class Question2 extends HeyApiClient {
2802
+ export class Tui extends HeyApiClient {
2772
2803
  /**
2773
- * Reply to pending question request
2804
+ * Append TUI prompt
2774
2805
  *
2775
- * Answer a pending question request owned by a session.
2806
+ * Append prompt to the TUI.
2776
2807
  */
2777
- reply(parameters, options) {
2808
+ appendPrompt(parameters, options) {
2778
2809
  const params = buildClientParams([parameters], [
2779
2810
  {
2780
2811
  args: [
2781
- { in: "path", key: "sessionID" },
2782
- { in: "path", key: "requestID" },
2783
- { key: "questionV2Reply", map: "body" },
2812
+ { in: "query", key: "directory" },
2813
+ { in: "query", key: "workspace" },
2814
+ { in: "body", key: "text" },
2784
2815
  ],
2785
2816
  },
2786
2817
  ]);
2787
2818
  return (options?.client ?? this.client).post({
2788
- url: "/api/session/{sessionID}/question/request/{requestID}/reply",
2819
+ url: "/tui/append-prompt",
2789
2820
  ...options,
2790
2821
  ...params,
2791
2822
  headers: {
@@ -2796,411 +2827,401 @@ export class Question2 extends HeyApiClient {
2796
2827
  });
2797
2828
  }
2798
2829
  /**
2799
- * Reject pending question request
2830
+ * Open help dialog
2800
2831
  *
2801
- * Reject a pending question request owned by a session.
2832
+ * Open the help dialog in the TUI to display user assistance information.
2802
2833
  */
2803
- reject(parameters, options) {
2834
+ openHelp(parameters, options) {
2804
2835
  const params = buildClientParams([parameters], [
2805
2836
  {
2806
2837
  args: [
2807
- { in: "path", key: "sessionID" },
2808
- { in: "path", key: "requestID" },
2838
+ { in: "query", key: "directory" },
2839
+ { in: "query", key: "workspace" },
2809
2840
  ],
2810
2841
  },
2811
2842
  ]);
2812
2843
  return (options?.client ?? this.client).post({
2813
- url: "/api/session/{sessionID}/question/request/{requestID}/reject",
2844
+ url: "/tui/open-help",
2814
2845
  ...options,
2815
2846
  ...params,
2816
2847
  });
2817
2848
  }
2818
- }
2819
- export class Session3 extends HeyApiClient {
2820
2849
  /**
2821
- * List v2 sessions
2850
+ * Open sessions dialog
2822
2851
  *
2823
- * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
2852
+ * Open the session dialog.
2824
2853
  */
2825
- list(parameters, options) {
2854
+ openSessions(parameters, options) {
2826
2855
  const params = buildClientParams([parameters], [
2827
2856
  {
2828
2857
  args: [
2829
- { in: "query", key: "workspace" },
2830
- { in: "query", key: "limit" },
2831
- { in: "query", key: "order" },
2832
- { in: "query", key: "search" },
2833
2858
  { in: "query", key: "directory" },
2834
- { in: "query", key: "project" },
2835
- { in: "query", key: "subpath" },
2836
- { in: "query", key: "cursor" },
2859
+ { in: "query", key: "workspace" },
2837
2860
  ],
2838
2861
  },
2839
2862
  ]);
2840
- return (options?.client ?? this.client).get({
2841
- url: "/api/session",
2863
+ return (options?.client ?? this.client).post({
2864
+ url: "/tui/open-sessions",
2842
2865
  ...options,
2843
2866
  ...params,
2844
2867
  });
2845
2868
  }
2846
2869
  /**
2847
- * Send v2 message
2870
+ * Open themes dialog
2848
2871
  *
2849
- * Durably admit one v2 session input and schedule agent-loop execution unless resume is false.
2872
+ * Open the theme dialog.
2850
2873
  */
2851
- prompt(parameters, options) {
2874
+ openThemes(parameters, options) {
2852
2875
  const params = buildClientParams([parameters], [
2853
2876
  {
2854
2877
  args: [
2855
- { in: "path", key: "sessionID" },
2856
2878
  { in: "query", key: "directory" },
2857
2879
  { in: "query", key: "workspace" },
2858
- { in: "body", key: "id" },
2859
- { in: "body", key: "prompt" },
2860
- { in: "body", key: "delivery" },
2861
- { in: "body", key: "resume" },
2862
2880
  ],
2863
2881
  },
2864
2882
  ]);
2865
2883
  return (options?.client ?? this.client).post({
2866
- url: "/api/session/{sessionID}/prompt",
2884
+ url: "/tui/open-themes",
2867
2885
  ...options,
2868
2886
  ...params,
2869
- headers: {
2870
- "Content-Type": "application/json",
2871
- ...options?.headers,
2872
- ...params.headers,
2873
- },
2874
2887
  });
2875
2888
  }
2876
2889
  /**
2877
- * Compact v2 session
2890
+ * Open models dialog
2878
2891
  *
2879
- * Compact a v2 session conversation.
2892
+ * Open the model dialog.
2880
2893
  */
2881
- compact(parameters, options) {
2894
+ openModels(parameters, options) {
2882
2895
  const params = buildClientParams([parameters], [
2883
2896
  {
2884
2897
  args: [
2885
- { in: "path", key: "sessionID" },
2886
2898
  { in: "query", key: "directory" },
2887
2899
  { in: "query", key: "workspace" },
2888
2900
  ],
2889
2901
  },
2890
2902
  ]);
2891
2903
  return (options?.client ?? this.client).post({
2892
- url: "/api/session/{sessionID}/compact",
2904
+ url: "/tui/open-models",
2893
2905
  ...options,
2894
2906
  ...params,
2895
2907
  });
2896
2908
  }
2897
2909
  /**
2898
- * Wait for v2 session
2910
+ * Submit TUI prompt
2899
2911
  *
2900
- * Wait for a v2 session agent loop to become idle.
2912
+ * Submit the prompt.
2901
2913
  */
2902
- wait(parameters, options) {
2914
+ submitPrompt(parameters, options) {
2903
2915
  const params = buildClientParams([parameters], [
2904
2916
  {
2905
2917
  args: [
2906
- { in: "path", key: "sessionID" },
2907
2918
  { in: "query", key: "directory" },
2908
2919
  { in: "query", key: "workspace" },
2909
2920
  ],
2910
2921
  },
2911
2922
  ]);
2912
2923
  return (options?.client ?? this.client).post({
2913
- url: "/api/session/{sessionID}/wait",
2924
+ url: "/tui/submit-prompt",
2914
2925
  ...options,
2915
2926
  ...params,
2916
2927
  });
2917
2928
  }
2918
2929
  /**
2919
- * Get v2 session context
2930
+ * Clear TUI prompt
2920
2931
  *
2921
- * Retrieve the active context messages for a v2 session (all messages after the last compaction).
2932
+ * Clear the prompt.
2922
2933
  */
2923
- context(parameters, options) {
2934
+ clearPrompt(parameters, options) {
2924
2935
  const params = buildClientParams([parameters], [
2925
2936
  {
2926
2937
  args: [
2927
- { in: "path", key: "sessionID" },
2928
2938
  { in: "query", key: "directory" },
2929
2939
  { in: "query", key: "workspace" },
2930
2940
  ],
2931
2941
  },
2932
2942
  ]);
2933
- return (options?.client ?? this.client).get({
2934
- url: "/api/session/{sessionID}/context",
2943
+ return (options?.client ?? this.client).post({
2944
+ url: "/tui/clear-prompt",
2935
2945
  ...options,
2936
2946
  ...params,
2937
2947
  });
2938
2948
  }
2939
2949
  /**
2940
- * Get v2 session messages
2950
+ * Execute TUI command
2941
2951
  *
2942
- * Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
2952
+ * Execute a TUI command.
2943
2953
  */
2944
- messages(parameters, options) {
2954
+ executeCommand(parameters, options) {
2945
2955
  const params = buildClientParams([parameters], [
2946
2956
  {
2947
2957
  args: [
2948
- { in: "path", key: "sessionID" },
2949
2958
  { in: "query", key: "directory" },
2950
2959
  { in: "query", key: "workspace" },
2951
- { in: "query", key: "limit" },
2952
- { in: "query", key: "order" },
2953
- { in: "query", key: "cursor" },
2960
+ { in: "body", key: "command" },
2954
2961
  ],
2955
2962
  },
2956
2963
  ]);
2957
- return (options?.client ?? this.client).get({
2958
- url: "/api/session/{sessionID}/message",
2964
+ return (options?.client ?? this.client).post({
2965
+ url: "/tui/execute-command",
2959
2966
  ...options,
2960
2967
  ...params,
2968
+ headers: {
2969
+ "Content-Type": "application/json",
2970
+ ...options?.headers,
2971
+ ...params.headers,
2972
+ },
2961
2973
  });
2962
2974
  }
2963
- _permission;
2964
- get permission() {
2965
- return (this._permission ??= new Permission2({ client: this.client }));
2966
- }
2967
- _question;
2968
- get question() {
2969
- return (this._question ??= new Question2({ client: this.client }));
2970
- }
2971
- }
2972
- export class Model extends HeyApiClient {
2973
2975
  /**
2974
- * List v2 models
2976
+ * Show TUI toast
2975
2977
  *
2976
- * Retrieve available v2 models ordered by release date.
2978
+ * Show a toast notification in the TUI.
2977
2979
  */
2978
- list(parameters, options) {
2979
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
2980
- return (options?.client ?? this.client).get({
2981
- url: "/api/model",
2980
+ showToast(parameters, options) {
2981
+ const params = buildClientParams([parameters], [
2982
+ {
2983
+ args: [
2984
+ { in: "query", key: "directory" },
2985
+ { in: "query", key: "workspace" },
2986
+ { in: "body", key: "title" },
2987
+ { in: "body", key: "message" },
2988
+ { in: "body", key: "variant" },
2989
+ { in: "body", key: "duration" },
2990
+ ],
2991
+ },
2992
+ ]);
2993
+ return (options?.client ?? this.client).post({
2994
+ url: "/tui/show-toast",
2982
2995
  ...options,
2983
2996
  ...params,
2997
+ headers: {
2998
+ "Content-Type": "application/json",
2999
+ ...options?.headers,
3000
+ ...params.headers,
3001
+ },
2984
3002
  });
2985
3003
  }
2986
- }
2987
- export class Provider2 extends HeyApiClient {
2988
3004
  /**
2989
- * List v2 providers
3005
+ * Publish TUI event
2990
3006
  *
2991
- * Retrieve active v2 AI providers so clients can show provider availability and configuration.
3007
+ * Publish a TUI event.
2992
3008
  */
2993
- list(parameters, options) {
2994
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
2995
- return (options?.client ?? this.client).get({
2996
- url: "/api/provider",
3009
+ publish(parameters, options) {
3010
+ const params = buildClientParams([parameters], [
3011
+ {
3012
+ args: [
3013
+ { in: "query", key: "directory" },
3014
+ { in: "query", key: "workspace" },
3015
+ { key: "body", map: "body" },
3016
+ ],
3017
+ },
3018
+ ]);
3019
+ return (options?.client ?? this.client).post({
3020
+ url: "/tui/publish",
2997
3021
  ...options,
2998
3022
  ...params,
3023
+ headers: {
3024
+ "Content-Type": "application/json",
3025
+ ...options?.headers,
3026
+ ...params.headers,
3027
+ },
2999
3028
  });
3000
3029
  }
3001
3030
  /**
3002
- * Get v2 provider
3031
+ * Select session
3003
3032
  *
3004
- * Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
3033
+ * Navigate the TUI to display the specified session.
3005
3034
  */
3006
- get(parameters, options) {
3035
+ selectSession(parameters, options) {
3007
3036
  const params = buildClientParams([parameters], [
3008
3037
  {
3009
3038
  args: [
3010
- { in: "path", key: "providerID" },
3011
- { in: "query", key: "location" },
3039
+ { in: "query", key: "directory" },
3040
+ { in: "query", key: "workspace" },
3041
+ { in: "body", key: "sessionID" },
3012
3042
  ],
3013
3043
  },
3014
3044
  ]);
3015
- return (options?.client ?? this.client).get({
3016
- url: "/api/provider/{providerID}",
3045
+ return (options?.client ?? this.client).post({
3046
+ url: "/tui/select-session",
3017
3047
  ...options,
3018
3048
  ...params,
3049
+ headers: {
3050
+ "Content-Type": "application/json",
3051
+ ...options?.headers,
3052
+ ...params.headers,
3053
+ },
3019
3054
  });
3020
3055
  }
3056
+ _control;
3057
+ get control() {
3058
+ return (this._control ??= new Control({ client: this.client }));
3059
+ }
3021
3060
  }
3022
- export class Request extends HeyApiClient {
3061
+ export class Health extends HeyApiClient {
3023
3062
  /**
3024
- * List pending permission requests
3063
+ * Check v2 server health
3025
3064
  *
3026
- * Retrieve pending permission requests for a location.
3065
+ * Check whether the v2 API server is ready to accept requests.
3027
3066
  */
3028
- list(parameters, options) {
3029
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3067
+ get(options) {
3030
3068
  return (options?.client ?? this.client).get({
3031
- url: "/api/permission/request",
3069
+ url: "/api/health",
3032
3070
  ...options,
3033
- ...params,
3034
3071
  });
3035
3072
  }
3036
3073
  }
3037
- export class Saved extends HeyApiClient {
3074
+ export class Agent extends HeyApiClient {
3038
3075
  /**
3039
- * List saved permissions
3076
+ * List v2 agents
3040
3077
  *
3041
- * Retrieve saved permissions, optionally filtered by project.
3078
+ * Retrieve currently registered v2 agents.
3042
3079
  */
3043
3080
  list(parameters, options) {
3044
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "projectID" }] }]);
3081
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3045
3082
  return (options?.client ?? this.client).get({
3046
- url: "/api/permission/saved",
3083
+ url: "/api/agent",
3047
3084
  ...options,
3048
3085
  ...params,
3049
3086
  });
3050
3087
  }
3088
+ }
3089
+ export class Permission2 extends HeyApiClient {
3051
3090
  /**
3052
- * Remove saved permission
3091
+ * List session permission requests
3053
3092
  *
3054
- * Remove a saved permission by ID.
3093
+ * Retrieve pending permission requests owned by a session.
3055
3094
  */
3056
- remove(parameters, options) {
3057
- const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
3058
- return (options?.client ?? this.client).delete({
3059
- url: "/api/permission/saved/{id}",
3095
+ list(parameters, options) {
3096
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3097
+ return (options?.client ?? this.client).get({
3098
+ url: "/api/session/{sessionID}/permission/request",
3060
3099
  ...options,
3061
3100
  ...params,
3062
3101
  });
3063
3102
  }
3064
- }
3065
- export class Permission3 extends HeyApiClient {
3066
- _request;
3067
- get request() {
3068
- return (this._request ??= new Request({ client: this.client }));
3069
- }
3070
- _saved;
3071
- get saved() {
3072
- return (this._saved ??= new Saved({ client: this.client }));
3073
- }
3074
- }
3075
- export class Fs extends HeyApiClient {
3076
3103
  /**
3077
- * Read file
3104
+ * Reply to pending permission request
3078
3105
  *
3079
- * Read one file relative to the requested location.
3106
+ * Respond to a pending permission request owned by a session.
3080
3107
  */
3081
- read(parameters, options) {
3108
+ reply(parameters, options) {
3082
3109
  const params = buildClientParams([parameters], [
3083
3110
  {
3084
3111
  args: [
3085
- { in: "query", key: "location" },
3086
- { in: "query", key: "path" },
3087
- { in: "query", key: "reference" },
3112
+ { in: "path", key: "sessionID" },
3113
+ { in: "path", key: "requestID" },
3114
+ { in: "body", key: "reply" },
3115
+ { in: "body", key: "message" },
3088
3116
  ],
3089
3117
  },
3090
3118
  ]);
3091
- return (options?.client ?? this.client).get({
3092
- url: "/api/fs/read",
3119
+ return (options?.client ?? this.client).post({
3120
+ url: "/api/session/{sessionID}/permission/request/{requestID}/reply",
3093
3121
  ...options,
3094
3122
  ...params,
3123
+ headers: {
3124
+ "Content-Type": "application/json",
3125
+ ...options?.headers,
3126
+ ...params.headers,
3127
+ },
3095
3128
  });
3096
3129
  }
3130
+ }
3131
+ export class Question2 extends HeyApiClient {
3097
3132
  /**
3098
- * List directory
3133
+ * Reply to pending question request
3099
3134
  *
3100
- * List direct children of one directory relative to the requested location.
3135
+ * Answer a pending question request owned by a session.
3101
3136
  */
3102
- list(parameters, options) {
3137
+ reply(parameters, options) {
3103
3138
  const params = buildClientParams([parameters], [
3104
3139
  {
3105
3140
  args: [
3106
- { in: "query", key: "location" },
3107
- { in: "query", key: "path" },
3108
- { in: "query", key: "reference" },
3141
+ { in: "path", key: "sessionID" },
3142
+ { in: "path", key: "requestID" },
3143
+ { key: "questionV2Reply", map: "body" },
3109
3144
  ],
3110
3145
  },
3111
3146
  ]);
3112
- return (options?.client ?? this.client).get({
3113
- url: "/api/fs/list",
3147
+ return (options?.client ?? this.client).post({
3148
+ url: "/api/session/{sessionID}/question/request/{requestID}/reply",
3114
3149
  ...options,
3115
3150
  ...params,
3151
+ headers: {
3152
+ "Content-Type": "application/json",
3153
+ ...options?.headers,
3154
+ ...params.headers,
3155
+ },
3116
3156
  });
3117
3157
  }
3118
- }
3119
- export class Request2 extends HeyApiClient {
3120
3158
  /**
3121
- * List pending question requests
3159
+ * Reject pending question request
3122
3160
  *
3123
- * Retrieve pending question requests for a location.
3161
+ * Reject a pending question request owned by a session.
3124
3162
  */
3125
- list(parameters, options) {
3126
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3127
- return (options?.client ?? this.client).get({
3128
- url: "/api/question/request",
3163
+ reject(parameters, options) {
3164
+ const params = buildClientParams([parameters], [
3165
+ {
3166
+ args: [
3167
+ { in: "path", key: "sessionID" },
3168
+ { in: "path", key: "requestID" },
3169
+ ],
3170
+ },
3171
+ ]);
3172
+ return (options?.client ?? this.client).post({
3173
+ url: "/api/session/{sessionID}/question/request/{requestID}/reject",
3129
3174
  ...options,
3130
3175
  ...params,
3131
3176
  });
3132
3177
  }
3133
3178
  }
3134
- export class Question3 extends HeyApiClient {
3135
- _request;
3136
- get request() {
3137
- return (this._request ??= new Request2({ client: this.client }));
3138
- }
3139
- }
3140
- export class V2 extends HeyApiClient {
3141
- _session;
3142
- get session() {
3143
- return (this._session ??= new Session3({ client: this.client }));
3144
- }
3145
- _model;
3146
- get model() {
3147
- return (this._model ??= new Model({ client: this.client }));
3148
- }
3149
- _provider;
3150
- get provider() {
3151
- return (this._provider ??= new Provider2({ client: this.client }));
3152
- }
3153
- _permission;
3154
- get permission() {
3155
- return (this._permission ??= new Permission3({ client: this.client }));
3156
- }
3157
- _fs;
3158
- get fs() {
3159
- return (this._fs ??= new Fs({ client: this.client }));
3160
- }
3161
- _question;
3162
- get question() {
3163
- return (this._question ??= new Question3({ client: this.client }));
3164
- }
3165
- }
3166
- export class Control extends HeyApiClient {
3179
+ export class Session3 extends HeyApiClient {
3167
3180
  /**
3168
- * Get next TUI request
3181
+ * List v2 sessions
3169
3182
  *
3170
- * Retrieve the next TUI request from the queue for processing.
3183
+ * Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
3171
3184
  */
3172
- next(parameters, options) {
3185
+ list(parameters, options) {
3173
3186
  const params = buildClientParams([parameters], [
3174
3187
  {
3175
3188
  args: [
3176
- { in: "query", key: "directory" },
3177
3189
  { in: "query", key: "workspace" },
3190
+ { in: "query", key: "limit" },
3191
+ { in: "query", key: "order" },
3192
+ { in: "query", key: "search" },
3193
+ { in: "query", key: "directory" },
3194
+ { in: "query", key: "project" },
3195
+ { in: "query", key: "subpath" },
3196
+ { in: "query", key: "cursor" },
3178
3197
  ],
3179
3198
  },
3180
3199
  ]);
3181
3200
  return (options?.client ?? this.client).get({
3182
- url: "/tui/control/next",
3201
+ url: "/api/session",
3183
3202
  ...options,
3184
3203
  ...params,
3185
3204
  });
3186
3205
  }
3187
3206
  /**
3188
- * Submit TUI response
3207
+ * Send v2 message
3189
3208
  *
3190
- * Submit a response to the TUI request queue to complete a pending request.
3209
+ * Durably admit one v2 session input and schedule agent-loop execution unless resume is false.
3191
3210
  */
3192
- response(parameters, options) {
3211
+ prompt(parameters, options) {
3193
3212
  const params = buildClientParams([parameters], [
3194
3213
  {
3195
3214
  args: [
3196
- { in: "query", key: "directory" },
3197
- { in: "query", key: "workspace" },
3198
- { key: "body", map: "body" },
3215
+ { in: "path", key: "sessionID" },
3216
+ { in: "body", key: "id" },
3217
+ { in: "body", key: "prompt" },
3218
+ { in: "body", key: "delivery" },
3219
+ { in: "body", key: "resume" },
3199
3220
  ],
3200
3221
  },
3201
3222
  ]);
3202
3223
  return (options?.client ?? this.client).post({
3203
- url: "/tui/control/response",
3224
+ url: "/api/session/{sessionID}/prompt",
3204
3225
  ...options,
3205
3226
  ...params,
3206
3227
  headers: {
@@ -3210,264 +3231,333 @@ export class Control extends HeyApiClient {
3210
3231
  },
3211
3232
  });
3212
3233
  }
3213
- }
3214
- export class Tui extends HeyApiClient {
3215
3234
  /**
3216
- * Append TUI prompt
3235
+ * Compact v2 session
3217
3236
  *
3218
- * Append prompt to the TUI.
3237
+ * Compact a v2 session conversation.
3219
3238
  */
3220
- appendPrompt(parameters, options) {
3221
- const params = buildClientParams([parameters], [
3222
- {
3223
- args: [
3224
- { in: "query", key: "directory" },
3225
- { in: "query", key: "workspace" },
3226
- { in: "body", key: "text" },
3227
- ],
3228
- },
3229
- ]);
3239
+ compact(parameters, options) {
3240
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3230
3241
  return (options?.client ?? this.client).post({
3231
- url: "/tui/append-prompt",
3242
+ url: "/api/session/{sessionID}/compact",
3232
3243
  ...options,
3233
3244
  ...params,
3234
- headers: {
3235
- "Content-Type": "application/json",
3236
- ...options?.headers,
3237
- ...params.headers,
3238
- },
3239
3245
  });
3240
3246
  }
3241
3247
  /**
3242
- * Open help dialog
3248
+ * Wait for v2 session
3243
3249
  *
3244
- * Open the help dialog in the TUI to display user assistance information.
3250
+ * Wait for a v2 session agent loop to become idle.
3245
3251
  */
3246
- openHelp(parameters, options) {
3247
- const params = buildClientParams([parameters], [
3248
- {
3249
- args: [
3250
- { in: "query", key: "directory" },
3251
- { in: "query", key: "workspace" },
3252
- ],
3253
- },
3254
- ]);
3252
+ wait(parameters, options) {
3253
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3255
3254
  return (options?.client ?? this.client).post({
3256
- url: "/tui/open-help",
3255
+ url: "/api/session/{sessionID}/wait",
3257
3256
  ...options,
3258
3257
  ...params,
3259
3258
  });
3260
3259
  }
3261
3260
  /**
3262
- * Open sessions dialog
3261
+ * Get v2 session context
3263
3262
  *
3264
- * Open the session dialog.
3263
+ * Retrieve the active context messages for a v2 session (all messages after the last compaction).
3265
3264
  */
3266
- openSessions(parameters, options) {
3267
- const params = buildClientParams([parameters], [
3268
- {
3269
- args: [
3270
- { in: "query", key: "directory" },
3271
- { in: "query", key: "workspace" },
3272
- ],
3273
- },
3274
- ]);
3275
- return (options?.client ?? this.client).post({
3276
- url: "/tui/open-sessions",
3265
+ context(parameters, options) {
3266
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
3267
+ return (options?.client ?? this.client).get({
3268
+ url: "/api/session/{sessionID}/context",
3277
3269
  ...options,
3278
3270
  ...params,
3279
3271
  });
3280
3272
  }
3281
3273
  /**
3282
- * Open themes dialog
3274
+ * Get v2 session messages
3283
3275
  *
3284
- * Open the theme dialog.
3276
+ * Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
3285
3277
  */
3286
- openThemes(parameters, options) {
3278
+ messages(parameters, options) {
3287
3279
  const params = buildClientParams([parameters], [
3288
3280
  {
3289
3281
  args: [
3290
- { in: "query", key: "directory" },
3291
- { in: "query", key: "workspace" },
3282
+ { in: "path", key: "sessionID" },
3283
+ { in: "query", key: "limit" },
3284
+ { in: "query", key: "order" },
3285
+ { in: "query", key: "cursor" },
3292
3286
  ],
3293
3287
  },
3294
3288
  ]);
3295
- return (options?.client ?? this.client).post({
3296
- url: "/tui/open-themes",
3289
+ return (options?.client ?? this.client).get({
3290
+ url: "/api/session/{sessionID}/message",
3297
3291
  ...options,
3298
3292
  ...params,
3299
3293
  });
3300
3294
  }
3295
+ _permission;
3296
+ get permission() {
3297
+ return (this._permission ??= new Permission2({ client: this.client }));
3298
+ }
3299
+ _question;
3300
+ get question() {
3301
+ return (this._question ??= new Question2({ client: this.client }));
3302
+ }
3303
+ }
3304
+ export class Model extends HeyApiClient {
3301
3305
  /**
3302
- * Open models dialog
3306
+ * List v2 models
3303
3307
  *
3304
- * Open the model dialog.
3308
+ * Retrieve available v2 models ordered by release date.
3305
3309
  */
3306
- openModels(parameters, options) {
3307
- const params = buildClientParams([parameters], [
3308
- {
3309
- args: [
3310
- { in: "query", key: "directory" },
3311
- { in: "query", key: "workspace" },
3312
- ],
3313
- },
3314
- ]);
3315
- return (options?.client ?? this.client).post({
3316
- url: "/tui/open-models",
3310
+ list(parameters, options) {
3311
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3312
+ return (options?.client ?? this.client).get({
3313
+ url: "/api/model",
3317
3314
  ...options,
3318
3315
  ...params,
3319
3316
  });
3320
3317
  }
3318
+ }
3319
+ export class Provider2 extends HeyApiClient {
3321
3320
  /**
3322
- * Submit TUI prompt
3321
+ * List v2 providers
3323
3322
  *
3324
- * Submit the prompt.
3323
+ * Retrieve active v2 AI providers so clients can show provider availability and configuration.
3325
3324
  */
3326
- submitPrompt(parameters, options) {
3327
- const params = buildClientParams([parameters], [
3328
- {
3329
- args: [
3330
- { in: "query", key: "directory" },
3331
- { in: "query", key: "workspace" },
3332
- ],
3333
- },
3334
- ]);
3335
- return (options?.client ?? this.client).post({
3336
- url: "/tui/submit-prompt",
3325
+ list(parameters, options) {
3326
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3327
+ return (options?.client ?? this.client).get({
3328
+ url: "/api/provider",
3337
3329
  ...options,
3338
3330
  ...params,
3339
3331
  });
3340
3332
  }
3341
3333
  /**
3342
- * Clear TUI prompt
3334
+ * Get v2 provider
3343
3335
  *
3344
- * Clear the prompt.
3336
+ * Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
3345
3337
  */
3346
- clearPrompt(parameters, options) {
3338
+ get(parameters, options) {
3347
3339
  const params = buildClientParams([parameters], [
3348
3340
  {
3349
3341
  args: [
3350
- { in: "query", key: "directory" },
3351
- { in: "query", key: "workspace" },
3342
+ { in: "path", key: "providerID" },
3343
+ { in: "query", key: "location" },
3352
3344
  ],
3353
3345
  },
3354
3346
  ]);
3355
- return (options?.client ?? this.client).post({
3356
- url: "/tui/clear-prompt",
3347
+ return (options?.client ?? this.client).get({
3348
+ url: "/api/provider/{providerID}",
3357
3349
  ...options,
3358
3350
  ...params,
3359
3351
  });
3360
3352
  }
3353
+ }
3354
+ export class Request extends HeyApiClient {
3361
3355
  /**
3362
- * Execute TUI command
3356
+ * List pending permission requests
3363
3357
  *
3364
- * Execute a TUI command.
3358
+ * Retrieve pending permission requests for a location.
3365
3359
  */
3366
- executeCommand(parameters, options) {
3367
- const params = buildClientParams([parameters], [
3368
- {
3369
- args: [
3370
- { in: "query", key: "directory" },
3371
- { in: "query", key: "workspace" },
3372
- { in: "body", key: "command" },
3373
- ],
3374
- },
3375
- ]);
3376
- return (options?.client ?? this.client).post({
3377
- url: "/tui/execute-command",
3360
+ list(parameters, options) {
3361
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3362
+ return (options?.client ?? this.client).get({
3363
+ url: "/api/permission/request",
3378
3364
  ...options,
3379
3365
  ...params,
3380
- headers: {
3381
- "Content-Type": "application/json",
3382
- ...options?.headers,
3383
- ...params.headers,
3384
- },
3385
3366
  });
3386
3367
  }
3368
+ }
3369
+ export class Saved extends HeyApiClient {
3387
3370
  /**
3388
- * Show TUI toast
3371
+ * List saved permissions
3389
3372
  *
3390
- * Show a toast notification in the TUI.
3373
+ * Retrieve saved permissions, optionally filtered by project.
3391
3374
  */
3392
- showToast(parameters, options) {
3393
- const params = buildClientParams([parameters], [
3394
- {
3395
- args: [
3396
- { in: "query", key: "directory" },
3397
- { in: "query", key: "workspace" },
3398
- { in: "body", key: "title" },
3399
- { in: "body", key: "message" },
3400
- { in: "body", key: "variant" },
3401
- { in: "body", key: "duration" },
3402
- ],
3403
- },
3404
- ]);
3405
- return (options?.client ?? this.client).post({
3406
- url: "/tui/show-toast",
3375
+ list(parameters, options) {
3376
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "projectID" }] }]);
3377
+ return (options?.client ?? this.client).get({
3378
+ url: "/api/permission/saved",
3407
3379
  ...options,
3408
3380
  ...params,
3409
- headers: {
3410
- "Content-Type": "application/json",
3411
- ...options?.headers,
3412
- ...params.headers,
3413
- },
3414
3381
  });
3415
3382
  }
3416
3383
  /**
3417
- * Publish TUI event
3384
+ * Remove saved permission
3418
3385
  *
3419
- * Publish a TUI event.
3386
+ * Remove a saved permission by ID.
3420
3387
  */
3421
- publish(parameters, options) {
3388
+ remove(parameters, options) {
3389
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
3390
+ return (options?.client ?? this.client).delete({
3391
+ url: "/api/permission/saved/{id}",
3392
+ ...options,
3393
+ ...params,
3394
+ });
3395
+ }
3396
+ }
3397
+ export class Permission3 extends HeyApiClient {
3398
+ _request;
3399
+ get request() {
3400
+ return (this._request ??= new Request({ client: this.client }));
3401
+ }
3402
+ _saved;
3403
+ get saved() {
3404
+ return (this._saved ??= new Saved({ client: this.client }));
3405
+ }
3406
+ }
3407
+ export class Fs extends HeyApiClient {
3408
+ /**
3409
+ * Read file
3410
+ *
3411
+ * Read one file relative to the requested location.
3412
+ */
3413
+ read(parameters, options) {
3422
3414
  const params = buildClientParams([parameters], [
3423
3415
  {
3424
3416
  args: [
3425
- { in: "query", key: "directory" },
3426
- { in: "query", key: "workspace" },
3427
- { key: "body", map: "body" },
3417
+ { in: "query", key: "location" },
3418
+ { in: "query", key: "path" },
3419
+ { in: "query", key: "reference" },
3428
3420
  ],
3429
3421
  },
3430
3422
  ]);
3431
- return (options?.client ?? this.client).post({
3432
- url: "/tui/publish",
3423
+ return (options?.client ?? this.client).get({
3424
+ url: "/api/fs/read",
3433
3425
  ...options,
3434
3426
  ...params,
3435
- headers: {
3436
- "Content-Type": "application/json",
3437
- ...options?.headers,
3438
- ...params.headers,
3439
- },
3440
3427
  });
3441
3428
  }
3442
3429
  /**
3443
- * Select session
3430
+ * List directory
3444
3431
  *
3445
- * Navigate the TUI to display the specified session.
3432
+ * List direct children of one directory relative to the requested location.
3446
3433
  */
3447
- selectSession(parameters, options) {
3434
+ list(parameters, options) {
3448
3435
  const params = buildClientParams([parameters], [
3449
3436
  {
3450
3437
  args: [
3451
- { in: "query", key: "directory" },
3452
- { in: "query", key: "workspace" },
3453
- { in: "body", key: "sessionID" },
3438
+ { in: "query", key: "location" },
3439
+ { in: "query", key: "path" },
3440
+ { in: "query", key: "reference" },
3454
3441
  ],
3455
3442
  },
3456
3443
  ]);
3457
- return (options?.client ?? this.client).post({
3458
- url: "/tui/select-session",
3444
+ return (options?.client ?? this.client).get({
3445
+ url: "/api/fs/list",
3459
3446
  ...options,
3460
3447
  ...params,
3461
- headers: {
3462
- "Content-Type": "application/json",
3463
- ...options?.headers,
3464
- ...params.headers,
3465
- },
3466
3448
  });
3467
3449
  }
3468
- _control;
3469
- get control() {
3470
- return (this._control ??= new Control({ client: this.client }));
3450
+ }
3451
+ export class Command2 extends HeyApiClient {
3452
+ /**
3453
+ * List v2 commands
3454
+ *
3455
+ * Retrieve currently registered v2 commands.
3456
+ */
3457
+ list(parameters, options) {
3458
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3459
+ return (options?.client ?? this.client).get({
3460
+ url: "/api/command",
3461
+ ...options,
3462
+ ...params,
3463
+ });
3464
+ }
3465
+ }
3466
+ export class Skill extends HeyApiClient {
3467
+ /**
3468
+ * List v2 skills
3469
+ *
3470
+ * Retrieve currently registered v2 skills.
3471
+ */
3472
+ list(parameters, options) {
3473
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3474
+ return (options?.client ?? this.client).get({
3475
+ url: "/api/skill",
3476
+ ...options,
3477
+ ...params,
3478
+ });
3479
+ }
3480
+ }
3481
+ export class Event2 extends HeyApiClient {
3482
+ /**
3483
+ * Subscribe to v2 events
3484
+ *
3485
+ * Subscribe to native EventV2 payloads for a location.
3486
+ */
3487
+ subscribe(parameters, options) {
3488
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3489
+ return (options?.client ?? this.client).sse.get({
3490
+ url: "/api/event",
3491
+ ...options,
3492
+ ...params,
3493
+ });
3494
+ }
3495
+ }
3496
+ export class Request2 extends HeyApiClient {
3497
+ /**
3498
+ * List pending question requests
3499
+ *
3500
+ * Retrieve pending question requests for a location.
3501
+ */
3502
+ list(parameters, options) {
3503
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3504
+ return (options?.client ?? this.client).get({
3505
+ url: "/api/question/request",
3506
+ ...options,
3507
+ ...params,
3508
+ });
3509
+ }
3510
+ }
3511
+ export class Question3 extends HeyApiClient {
3512
+ _request;
3513
+ get request() {
3514
+ return (this._request ??= new Request2({ client: this.client }));
3515
+ }
3516
+ }
3517
+ export class V2 extends HeyApiClient {
3518
+ _health;
3519
+ get health() {
3520
+ return (this._health ??= new Health({ client: this.client }));
3521
+ }
3522
+ _agent;
3523
+ get agent() {
3524
+ return (this._agent ??= new Agent({ client: this.client }));
3525
+ }
3526
+ _session;
3527
+ get session() {
3528
+ return (this._session ??= new Session3({ client: this.client }));
3529
+ }
3530
+ _model;
3531
+ get model() {
3532
+ return (this._model ??= new Model({ client: this.client }));
3533
+ }
3534
+ _provider;
3535
+ get provider() {
3536
+ return (this._provider ??= new Provider2({ client: this.client }));
3537
+ }
3538
+ _permission;
3539
+ get permission() {
3540
+ return (this._permission ??= new Permission3({ client: this.client }));
3541
+ }
3542
+ _fs;
3543
+ get fs() {
3544
+ return (this._fs ??= new Fs({ client: this.client }));
3545
+ }
3546
+ _command;
3547
+ get command() {
3548
+ return (this._command ??= new Command2({ client: this.client }));
3549
+ }
3550
+ _skill;
3551
+ get skill() {
3552
+ return (this._skill ??= new Skill({ client: this.client }));
3553
+ }
3554
+ _event;
3555
+ get event() {
3556
+ return (this._event ??= new Event2({ client: this.client }));
3557
+ }
3558
+ _question;
3559
+ get question() {
3560
+ return (this._question ??= new Question3({ client: this.client }));
3471
3561
  }
3472
3562
  }
3473
3563
  export class OpencodeClient extends HeyApiClient {
@@ -3484,6 +3574,10 @@ export class OpencodeClient extends HeyApiClient {
3484
3574
  get app() {
3485
3575
  return (this._app ??= new App({ client: this.client }));
3486
3576
  }
3577
+ _experimental;
3578
+ get experimental() {
3579
+ return (this._experimental ??= new Experimental({ client: this.client }));
3580
+ }
3487
3581
  _global;
3488
3582
  get global() {
3489
3583
  return (this._global ??= new Global({ client: this.client }));
@@ -3496,10 +3590,6 @@ export class OpencodeClient extends HeyApiClient {
3496
3590
  get config() {
3497
3591
  return (this._config ??= new Config2({ client: this.client }));
3498
3592
  }
3499
- _experimental;
3500
- get experimental() {
3501
- return (this._experimental ??= new Experimental({ client: this.client }));
3502
- }
3503
3593
  _tool;
3504
3594
  get tool() {
3505
3595
  return (this._tool ??= new Tool({ client: this.client }));
@@ -3576,12 +3666,12 @@ export class OpencodeClient extends HeyApiClient {
3576
3666
  get sync() {
3577
3667
  return (this._sync ??= new Sync({ client: this.client }));
3578
3668
  }
3579
- _v2;
3580
- get v2() {
3581
- return (this._v2 ??= new V2({ client: this.client }));
3582
- }
3583
3669
  _tui;
3584
3670
  get tui() {
3585
3671
  return (this._tui ??= new Tui({ client: this.client }));
3586
3672
  }
3673
+ _v2;
3674
+ get v2() {
3675
+ return (this._v2 ??= new V2({ client: this.client }));
3676
+ }
3587
3677
  }