@engineer-ai/sdk 1.2.3 → 1.3.0

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.
Files changed (71) hide show
  1. package/dist/client.d.ts +7 -0
  2. package/dist/client.js +25 -0
  3. package/dist/gen/client/client.gen.d.ts +2 -0
  4. package/dist/gen/client/client.gen.js +165 -0
  5. package/dist/gen/client/index.d.ts +7 -0
  6. package/dist/gen/client/index.js +5 -0
  7. package/dist/gen/client/types.gen.d.ts +127 -0
  8. package/dist/gen/client/types.gen.js +2 -0
  9. package/dist/gen/client/utils.gen.d.ts +38 -0
  10. package/dist/gen/client/utils.gen.js +226 -0
  11. package/dist/gen/client.gen.d.ts +12 -0
  12. package/dist/gen/client.gen.js +5 -0
  13. package/dist/gen/core/auth.gen.d.ts +18 -0
  14. package/dist/gen/core/auth.gen.js +14 -0
  15. package/dist/gen/core/bodySerializer.gen.d.ts +17 -0
  16. package/dist/gen/core/bodySerializer.gen.js +57 -0
  17. package/dist/gen/core/params.gen.d.ts +33 -0
  18. package/dist/gen/core/params.gen.js +89 -0
  19. package/dist/gen/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/gen/core/pathSerializer.gen.js +106 -0
  21. package/dist/gen/core/serverSentEvents.gen.d.ts +59 -0
  22. package/dist/gen/core/serverSentEvents.gen.js +117 -0
  23. package/dist/gen/core/types.gen.d.ts +78 -0
  24. package/dist/gen/core/types.gen.js +2 -0
  25. package/dist/gen/core/utils.gen.d.ts +14 -0
  26. package/dist/gen/core/utils.gen.js +69 -0
  27. package/dist/gen/sdk.gen.d.ts +403 -0
  28. package/dist/gen/sdk.gen.js +881 -0
  29. package/dist/gen/types.gen.d.ts +3379 -0
  30. package/dist/gen/types.gen.js +2 -0
  31. package/dist/index.d.ts +10 -0
  32. package/dist/index.js +16 -0
  33. package/dist/server.d.ts +23 -0
  34. package/dist/server.js +94 -0
  35. package/dist/v2/client.d.ts +7 -0
  36. package/dist/v2/client.js +27 -0
  37. package/dist/v2/gen/client/client.gen.d.ts +2 -0
  38. package/dist/v2/gen/client/client.gen.js +232 -0
  39. package/dist/v2/gen/client/index.d.ts +8 -0
  40. package/dist/v2/gen/client/index.js +6 -0
  41. package/dist/v2/gen/client/types.gen.d.ts +117 -0
  42. package/dist/v2/gen/client/types.gen.js +2 -0
  43. package/dist/v2/gen/client/utils.gen.d.ts +33 -0
  44. package/dist/v2/gen/client/utils.gen.js +226 -0
  45. package/dist/v2/gen/client.gen.d.ts +12 -0
  46. package/dist/v2/gen/client.gen.js +3 -0
  47. package/dist/v2/gen/core/auth.gen.d.ts +18 -0
  48. package/dist/v2/gen/core/auth.gen.js +14 -0
  49. package/dist/v2/gen/core/bodySerializer.gen.d.ts +25 -0
  50. package/dist/v2/gen/core/bodySerializer.gen.js +57 -0
  51. package/dist/v2/gen/core/params.gen.d.ts +43 -0
  52. package/dist/v2/gen/core/params.gen.js +102 -0
  53. package/dist/v2/gen/core/pathSerializer.gen.d.ts +33 -0
  54. package/dist/v2/gen/core/pathSerializer.gen.js +106 -0
  55. package/dist/v2/gen/core/queryKeySerializer.gen.d.ts +18 -0
  56. package/dist/v2/gen/core/queryKeySerializer.gen.js +93 -0
  57. package/dist/v2/gen/core/serverSentEvents.gen.d.ts +71 -0
  58. package/dist/v2/gen/core/serverSentEvents.gen.js +133 -0
  59. package/dist/v2/gen/core/types.gen.d.ts +78 -0
  60. package/dist/v2/gen/core/types.gen.js +2 -0
  61. package/dist/v2/gen/core/utils.gen.d.ts +19 -0
  62. package/dist/v2/gen/core/utils.gen.js +87 -0
  63. package/dist/v2/gen/sdk.gen.d.ts +1204 -0
  64. package/dist/v2/gen/sdk.gen.js +2373 -0
  65. package/dist/v2/gen/types.gen.d.ts +4858 -0
  66. package/dist/v2/gen/types.gen.js +2 -0
  67. package/dist/v2/index.d.ts +10 -0
  68. package/dist/v2/index.js +16 -0
  69. package/dist/v2/server.d.ts +23 -0
  70. package/dist/v2/server.js +94 -0
  71. package/package.json +1 -1
@@ -0,0 +1,2373 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { client } from "./client.gen.js";
3
+ import { buildClientParams } from "./client/index.js";
4
+ class HeyApiClient {
5
+ client;
6
+ constructor(args) {
7
+ this.client = args?.client ?? client;
8
+ }
9
+ }
10
+ class HeyApiRegistry {
11
+ defaultKey = "default";
12
+ instances = new Map();
13
+ get(key) {
14
+ const instance = this.instances.get(key ?? this.defaultKey);
15
+ if (!instance) {
16
+ throw new Error(`No SDK client found. Create one with "new OpencodeClient()" to fix this error.`);
17
+ }
18
+ return instance;
19
+ }
20
+ set(value, key) {
21
+ this.instances.set(key ?? this.defaultKey, value);
22
+ }
23
+ }
24
+ export class Config extends HeyApiClient {
25
+ /**
26
+ * Get global configuration
27
+ *
28
+ * Retrieve the current global OpenCode configuration settings and preferences.
29
+ */
30
+ get(options) {
31
+ return (options?.client ?? this.client).get({
32
+ url: "/global/config",
33
+ ...options,
34
+ });
35
+ }
36
+ /**
37
+ * Update global configuration
38
+ *
39
+ * Update global OpenCode configuration settings and preferences.
40
+ */
41
+ update(parameters, options) {
42
+ const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
43
+ return (options?.client ?? this.client).patch({
44
+ url: "/global/config",
45
+ ...options,
46
+ ...params,
47
+ headers: {
48
+ "Content-Type": "application/json",
49
+ ...options?.headers,
50
+ ...params.headers,
51
+ },
52
+ });
53
+ }
54
+ }
55
+ export class Global extends HeyApiClient {
56
+ /**
57
+ * Get health
58
+ *
59
+ * Get health information about the OpenCode server.
60
+ */
61
+ health(options) {
62
+ return (options?.client ?? this.client).get({
63
+ url: "/global/health",
64
+ ...options,
65
+ });
66
+ }
67
+ /**
68
+ * Get global events
69
+ *
70
+ * Subscribe to global events from the OpenCode system using server-sent events.
71
+ */
72
+ event(options) {
73
+ return (options?.client ?? this.client).sse.get({
74
+ url: "/global/event",
75
+ ...options,
76
+ });
77
+ }
78
+ /**
79
+ * Dispose instance
80
+ *
81
+ * Clean up and dispose all OpenCode instances, releasing all resources.
82
+ */
83
+ dispose(options) {
84
+ return (options?.client ?? this.client).post({
85
+ url: "/global/dispose",
86
+ ...options,
87
+ });
88
+ }
89
+ _config;
90
+ get config() {
91
+ return (this._config ??= new Config({ client: this.client }));
92
+ }
93
+ }
94
+ export class Auth extends HeyApiClient {
95
+ /**
96
+ * Remove auth credentials
97
+ *
98
+ * Remove authentication credentials
99
+ */
100
+ remove(parameters, options) {
101
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "providerID" }] }]);
102
+ return (options?.client ?? this.client).delete({
103
+ url: "/auth/{providerID}",
104
+ ...options,
105
+ ...params,
106
+ });
107
+ }
108
+ /**
109
+ * Set auth credentials
110
+ *
111
+ * Set authentication credentials
112
+ */
113
+ set(parameters, options) {
114
+ const params = buildClientParams([parameters], [
115
+ {
116
+ args: [
117
+ { in: "path", key: "providerID" },
118
+ { key: "auth", map: "body" },
119
+ ],
120
+ },
121
+ ]);
122
+ return (options?.client ?? this.client).put({
123
+ url: "/auth/{providerID}",
124
+ ...options,
125
+ ...params,
126
+ headers: {
127
+ "Content-Type": "application/json",
128
+ ...options?.headers,
129
+ ...params.headers,
130
+ },
131
+ });
132
+ }
133
+ }
134
+ export class Project extends HeyApiClient {
135
+ /**
136
+ * List all projects
137
+ *
138
+ * Get a list of projects that have been opened with OpenCode.
139
+ */
140
+ list(parameters, options) {
141
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
142
+ return (options?.client ?? this.client).get({
143
+ url: "/project",
144
+ ...options,
145
+ ...params,
146
+ });
147
+ }
148
+ /**
149
+ * Get current project
150
+ *
151
+ * Retrieve the currently active project that OpenCode is working with.
152
+ */
153
+ current(parameters, options) {
154
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
155
+ return (options?.client ?? this.client).get({
156
+ url: "/project/current",
157
+ ...options,
158
+ ...params,
159
+ });
160
+ }
161
+ /**
162
+ * Update project
163
+ *
164
+ * Update project properties such as name, icon, and commands.
165
+ */
166
+ update(parameters, options) {
167
+ const params = buildClientParams([parameters], [
168
+ {
169
+ args: [
170
+ { in: "path", key: "projectID" },
171
+ { in: "query", key: "directory" },
172
+ { in: "body", key: "name" },
173
+ { in: "body", key: "icon" },
174
+ { in: "body", key: "commands" },
175
+ ],
176
+ },
177
+ ]);
178
+ return (options?.client ?? this.client).patch({
179
+ url: "/project/{projectID}",
180
+ ...options,
181
+ ...params,
182
+ headers: {
183
+ "Content-Type": "application/json",
184
+ ...options?.headers,
185
+ ...params.headers,
186
+ },
187
+ });
188
+ }
189
+ }
190
+ export class Pty extends HeyApiClient {
191
+ /**
192
+ * List PTY sessions
193
+ *
194
+ * Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
195
+ */
196
+ list(parameters, options) {
197
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
198
+ return (options?.client ?? this.client).get({
199
+ url: "/pty",
200
+ ...options,
201
+ ...params,
202
+ });
203
+ }
204
+ /**
205
+ * Create PTY session
206
+ *
207
+ * Create a new pseudo-terminal (PTY) session for running shell commands and processes.
208
+ */
209
+ create(parameters, options) {
210
+ const params = buildClientParams([parameters], [
211
+ {
212
+ args: [
213
+ { in: "query", key: "directory" },
214
+ { in: "body", key: "command" },
215
+ { in: "body", key: "args" },
216
+ { in: "body", key: "cwd" },
217
+ { in: "body", key: "title" },
218
+ { in: "body", key: "env" },
219
+ ],
220
+ },
221
+ ]);
222
+ return (options?.client ?? this.client).post({
223
+ url: "/pty",
224
+ ...options,
225
+ ...params,
226
+ headers: {
227
+ "Content-Type": "application/json",
228
+ ...options?.headers,
229
+ ...params.headers,
230
+ },
231
+ });
232
+ }
233
+ /**
234
+ * Remove PTY session
235
+ *
236
+ * Remove and terminate a specific pseudo-terminal (PTY) session.
237
+ */
238
+ remove(parameters, options) {
239
+ const params = buildClientParams([parameters], [
240
+ {
241
+ args: [
242
+ { in: "path", key: "ptyID" },
243
+ { in: "query", key: "directory" },
244
+ ],
245
+ },
246
+ ]);
247
+ return (options?.client ?? this.client).delete({
248
+ url: "/pty/{ptyID}",
249
+ ...options,
250
+ ...params,
251
+ });
252
+ }
253
+ /**
254
+ * Get PTY session
255
+ *
256
+ * Retrieve detailed information about a specific pseudo-terminal (PTY) session.
257
+ */
258
+ get(parameters, options) {
259
+ const params = buildClientParams([parameters], [
260
+ {
261
+ args: [
262
+ { in: "path", key: "ptyID" },
263
+ { in: "query", key: "directory" },
264
+ ],
265
+ },
266
+ ]);
267
+ return (options?.client ?? this.client).get({
268
+ url: "/pty/{ptyID}",
269
+ ...options,
270
+ ...params,
271
+ });
272
+ }
273
+ /**
274
+ * Update PTY session
275
+ *
276
+ * Update properties of an existing pseudo-terminal (PTY) session.
277
+ */
278
+ update(parameters, options) {
279
+ const params = buildClientParams([parameters], [
280
+ {
281
+ args: [
282
+ { in: "path", key: "ptyID" },
283
+ { in: "query", key: "directory" },
284
+ { in: "body", key: "title" },
285
+ { in: "body", key: "size" },
286
+ ],
287
+ },
288
+ ]);
289
+ return (options?.client ?? this.client).put({
290
+ url: "/pty/{ptyID}",
291
+ ...options,
292
+ ...params,
293
+ headers: {
294
+ "Content-Type": "application/json",
295
+ ...options?.headers,
296
+ ...params.headers,
297
+ },
298
+ });
299
+ }
300
+ /**
301
+ * Connect to PTY session
302
+ *
303
+ * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
304
+ */
305
+ connect(parameters, options) {
306
+ const params = buildClientParams([parameters], [
307
+ {
308
+ args: [
309
+ { in: "path", key: "ptyID" },
310
+ { in: "query", key: "directory" },
311
+ ],
312
+ },
313
+ ]);
314
+ return (options?.client ?? this.client).get({
315
+ url: "/pty/{ptyID}/connect",
316
+ ...options,
317
+ ...params,
318
+ });
319
+ }
320
+ }
321
+ export class Config2 extends HeyApiClient {
322
+ /**
323
+ * Get configuration
324
+ *
325
+ * Retrieve the current OpenCode configuration settings and preferences.
326
+ */
327
+ get(parameters, options) {
328
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
329
+ return (options?.client ?? this.client).get({
330
+ url: "/config",
331
+ ...options,
332
+ ...params,
333
+ });
334
+ }
335
+ /**
336
+ * Update configuration
337
+ *
338
+ * Update OpenCode configuration settings and preferences.
339
+ */
340
+ update(parameters, options) {
341
+ const params = buildClientParams([parameters], [
342
+ {
343
+ args: [
344
+ { in: "query", key: "directory" },
345
+ { key: "config", map: "body" },
346
+ ],
347
+ },
348
+ ]);
349
+ return (options?.client ?? this.client).patch({
350
+ url: "/config",
351
+ ...options,
352
+ ...params,
353
+ headers: {
354
+ "Content-Type": "application/json",
355
+ ...options?.headers,
356
+ ...params.headers,
357
+ },
358
+ });
359
+ }
360
+ /**
361
+ * List config providers
362
+ *
363
+ * Get a list of all configured AI providers and their default models.
364
+ */
365
+ providers(parameters, options) {
366
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
367
+ return (options?.client ?? this.client).get({
368
+ url: "/config/providers",
369
+ ...options,
370
+ ...params,
371
+ });
372
+ }
373
+ }
374
+ export class Tool extends HeyApiClient {
375
+ /**
376
+ * List tool IDs
377
+ *
378
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
379
+ */
380
+ ids(parameters, options) {
381
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
382
+ return (options?.client ?? this.client).get({
383
+ url: "/experimental/tool/ids",
384
+ ...options,
385
+ ...params,
386
+ });
387
+ }
388
+ /**
389
+ * List tools
390
+ *
391
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
392
+ */
393
+ list(parameters, options) {
394
+ const params = buildClientParams([parameters], [
395
+ {
396
+ args: [
397
+ { in: "query", key: "directory" },
398
+ { in: "query", key: "provider" },
399
+ { in: "query", key: "model" },
400
+ ],
401
+ },
402
+ ]);
403
+ return (options?.client ?? this.client).get({
404
+ url: "/experimental/tool",
405
+ ...options,
406
+ ...params,
407
+ });
408
+ }
409
+ }
410
+ export class Worktree extends HeyApiClient {
411
+ /**
412
+ * Remove worktree
413
+ *
414
+ * Remove a git worktree and delete its branch.
415
+ */
416
+ remove(parameters, options) {
417
+ const params = buildClientParams([parameters], [
418
+ {
419
+ args: [
420
+ { in: "query", key: "directory" },
421
+ { key: "worktreeRemoveInput", map: "body" },
422
+ ],
423
+ },
424
+ ]);
425
+ return (options?.client ?? this.client).delete({
426
+ url: "/experimental/worktree",
427
+ ...options,
428
+ ...params,
429
+ headers: {
430
+ "Content-Type": "application/json",
431
+ ...options?.headers,
432
+ ...params.headers,
433
+ },
434
+ });
435
+ }
436
+ /**
437
+ * List worktrees
438
+ *
439
+ * List all sandbox worktrees for the current project.
440
+ */
441
+ list(parameters, options) {
442
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
443
+ return (options?.client ?? this.client).get({
444
+ url: "/experimental/worktree",
445
+ ...options,
446
+ ...params,
447
+ });
448
+ }
449
+ /**
450
+ * Create worktree
451
+ *
452
+ * Create a new git worktree for the current project and run any configured startup scripts.
453
+ */
454
+ create(parameters, options) {
455
+ const params = buildClientParams([parameters], [
456
+ {
457
+ args: [
458
+ { in: "query", key: "directory" },
459
+ { key: "worktreeCreateInput", map: "body" },
460
+ ],
461
+ },
462
+ ]);
463
+ return (options?.client ?? this.client).post({
464
+ url: "/experimental/worktree",
465
+ ...options,
466
+ ...params,
467
+ headers: {
468
+ "Content-Type": "application/json",
469
+ ...options?.headers,
470
+ ...params.headers,
471
+ },
472
+ });
473
+ }
474
+ /**
475
+ * List worktrees with metadata
476
+ *
477
+ * List all worktrees for the current project with metadata (branch, gitUrls, rootDir, createdAt).
478
+ */
479
+ listMeta(parameters, options) {
480
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
481
+ return (options?.client ?? this.client).get({
482
+ url: "/experimental/worktree/meta",
483
+ ...options,
484
+ ...params,
485
+ });
486
+ }
487
+ /**
488
+ * Reset worktree
489
+ *
490
+ * Reset a worktree branch to the primary default branch.
491
+ */
492
+ reset(parameters, options) {
493
+ const params = buildClientParams([parameters], [
494
+ {
495
+ args: [
496
+ { in: "query", key: "directory" },
497
+ { key: "worktreeResetInput", map: "body" },
498
+ ],
499
+ },
500
+ ]);
501
+ return (options?.client ?? this.client).post({
502
+ url: "/experimental/worktree/reset",
503
+ ...options,
504
+ ...params,
505
+ headers: {
506
+ "Content-Type": "application/json",
507
+ ...options?.headers,
508
+ ...params.headers,
509
+ },
510
+ });
511
+ }
512
+ /**
513
+ * Switch worktree
514
+ *
515
+ * Switch the active workspace to a different worktree (or back to the main project). Re-initializes Instance context and updates session worktreeDirectory.
516
+ */
517
+ switch(parameters, options) {
518
+ const params = buildClientParams([parameters], [
519
+ {
520
+ args: [
521
+ { in: "query", key: "directory" },
522
+ { key: "worktreeSwitchInput", map: "body" },
523
+ ],
524
+ },
525
+ ]);
526
+ return (options?.client ?? this.client).post({
527
+ url: "/experimental/worktree/switch",
528
+ ...options,
529
+ ...params,
530
+ headers: {
531
+ "Content-Type": "application/json",
532
+ ...options?.headers,
533
+ ...params.headers,
534
+ },
535
+ });
536
+ }
537
+ }
538
+ export class Resource extends HeyApiClient {
539
+ /**
540
+ * Get MCP resources
541
+ *
542
+ * Get all available MCP resources from connected servers. Optionally filter by name.
543
+ */
544
+ list(parameters, options) {
545
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
546
+ return (options?.client ?? this.client).get({
547
+ url: "/experimental/resource",
548
+ ...options,
549
+ ...params,
550
+ });
551
+ }
552
+ }
553
+ export class Experimental extends HeyApiClient {
554
+ _resource;
555
+ get resource() {
556
+ return (this._resource ??= new Resource({ client: this.client }));
557
+ }
558
+ }
559
+ export class Session extends HeyApiClient {
560
+ /**
561
+ * List sessions
562
+ *
563
+ * Get a list of all OpenCode sessions, sorted by most recently updated.
564
+ */
565
+ list(parameters, options) {
566
+ const params = buildClientParams([parameters], [
567
+ {
568
+ args: [
569
+ { in: "query", key: "directory" },
570
+ { in: "query", key: "roots" },
571
+ { in: "query", key: "start" },
572
+ { in: "query", key: "search" },
573
+ { in: "query", key: "limit" },
574
+ ],
575
+ },
576
+ ]);
577
+ return (options?.client ?? this.client).get({
578
+ url: "/session",
579
+ ...options,
580
+ ...params,
581
+ });
582
+ }
583
+ /**
584
+ * Create session
585
+ *
586
+ * Create a new OpenCode session for interacting with AI assistants and managing conversations.
587
+ */
588
+ create(parameters, options) {
589
+ const params = buildClientParams([parameters], [
590
+ {
591
+ args: [
592
+ { in: "query", key: "directory" },
593
+ { in: "body", key: "parentID" },
594
+ { in: "body", key: "title" },
595
+ { in: "body", key: "type" },
596
+ { in: "body", key: "mode" },
597
+ { in: "body", key: "permission" },
598
+ ],
599
+ },
600
+ ]);
601
+ return (options?.client ?? this.client).post({
602
+ url: "/session",
603
+ ...options,
604
+ ...params,
605
+ headers: {
606
+ "Content-Type": "application/json",
607
+ ...options?.headers,
608
+ ...params.headers,
609
+ },
610
+ });
611
+ }
612
+ /**
613
+ * Get session status
614
+ *
615
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
616
+ */
617
+ status(parameters, options) {
618
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
619
+ return (options?.client ?? this.client).get({
620
+ url: "/session/status",
621
+ ...options,
622
+ ...params,
623
+ });
624
+ }
625
+ /**
626
+ * Delete session
627
+ *
628
+ * Delete a session and permanently remove all associated data, including messages and history.
629
+ */
630
+ delete(parameters, options) {
631
+ const params = buildClientParams([parameters], [
632
+ {
633
+ args: [
634
+ { in: "path", key: "sessionID" },
635
+ { in: "query", key: "directory" },
636
+ ],
637
+ },
638
+ ]);
639
+ return (options?.client ?? this.client).delete({
640
+ url: "/session/{sessionID}",
641
+ ...options,
642
+ ...params,
643
+ });
644
+ }
645
+ /**
646
+ * Get session
647
+ *
648
+ * Retrieve detailed information about a specific OpenCode session.
649
+ */
650
+ get(parameters, options) {
651
+ const params = buildClientParams([parameters], [
652
+ {
653
+ args: [
654
+ { in: "path", key: "sessionID" },
655
+ { in: "query", key: "directory" },
656
+ ],
657
+ },
658
+ ]);
659
+ return (options?.client ?? this.client).get({
660
+ url: "/session/{sessionID}",
661
+ ...options,
662
+ ...params,
663
+ });
664
+ }
665
+ /**
666
+ * Update session
667
+ *
668
+ * Update properties of an existing session, such as title or other metadata.
669
+ */
670
+ update(parameters, options) {
671
+ const params = buildClientParams([parameters], [
672
+ {
673
+ args: [
674
+ { in: "path", key: "sessionID" },
675
+ { in: "query", key: "directory" },
676
+ { in: "body", key: "title" },
677
+ { in: "body", key: "worktreeDirectory" },
678
+ { in: "body", key: "time" },
679
+ ],
680
+ },
681
+ ]);
682
+ return (options?.client ?? this.client).patch({
683
+ url: "/session/{sessionID}",
684
+ ...options,
685
+ ...params,
686
+ headers: {
687
+ "Content-Type": "application/json",
688
+ ...options?.headers,
689
+ ...params.headers,
690
+ },
691
+ });
692
+ }
693
+ /**
694
+ * Get session children
695
+ *
696
+ * Retrieve all child sessions that were forked from the specified parent session.
697
+ */
698
+ children(parameters, options) {
699
+ const params = buildClientParams([parameters], [
700
+ {
701
+ args: [
702
+ { in: "path", key: "sessionID" },
703
+ { in: "query", key: "directory" },
704
+ ],
705
+ },
706
+ ]);
707
+ return (options?.client ?? this.client).get({
708
+ url: "/session/{sessionID}/children",
709
+ ...options,
710
+ ...params,
711
+ });
712
+ }
713
+ /**
714
+ * Get session todos
715
+ *
716
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
717
+ */
718
+ todo(parameters, options) {
719
+ const params = buildClientParams([parameters], [
720
+ {
721
+ args: [
722
+ { in: "path", key: "sessionID" },
723
+ { in: "query", key: "directory" },
724
+ ],
725
+ },
726
+ ]);
727
+ return (options?.client ?? this.client).get({
728
+ url: "/session/{sessionID}/todo",
729
+ ...options,
730
+ ...params,
731
+ });
732
+ }
733
+ /**
734
+ * Initialize session
735
+ *
736
+ * Analyze the current application and create an ENGINEER.md file with project-specific agent configurations.
737
+ */
738
+ init(parameters, options) {
739
+ const params = buildClientParams([parameters], [
740
+ {
741
+ args: [
742
+ { in: "path", key: "sessionID" },
743
+ { in: "query", key: "directory" },
744
+ { in: "body", key: "modelID" },
745
+ { in: "body", key: "providerID" },
746
+ { in: "body", key: "messageID" },
747
+ ],
748
+ },
749
+ ]);
750
+ return (options?.client ?? this.client).post({
751
+ url: "/session/{sessionID}/init",
752
+ ...options,
753
+ ...params,
754
+ headers: {
755
+ "Content-Type": "application/json",
756
+ ...options?.headers,
757
+ ...params.headers,
758
+ },
759
+ });
760
+ }
761
+ /**
762
+ * Fork session
763
+ *
764
+ * Create a new session by forking an existing session at a specific message point.
765
+ */
766
+ fork(parameters, options) {
767
+ const params = buildClientParams([parameters], [
768
+ {
769
+ args: [
770
+ { in: "path", key: "sessionID" },
771
+ { in: "query", key: "directory" },
772
+ { in: "body", key: "messageID" },
773
+ ],
774
+ },
775
+ ]);
776
+ return (options?.client ?? this.client).post({
777
+ url: "/session/{sessionID}/fork",
778
+ ...options,
779
+ ...params,
780
+ headers: {
781
+ "Content-Type": "application/json",
782
+ ...options?.headers,
783
+ ...params.headers,
784
+ },
785
+ });
786
+ }
787
+ /**
788
+ * Abort session
789
+ *
790
+ * Abort an active session and stop any ongoing AI processing or command execution.
791
+ */
792
+ abort(parameters, options) {
793
+ const params = buildClientParams([parameters], [
794
+ {
795
+ args: [
796
+ { in: "path", key: "sessionID" },
797
+ { in: "query", key: "directory" },
798
+ ],
799
+ },
800
+ ]);
801
+ return (options?.client ?? this.client).post({
802
+ url: "/session/{sessionID}/abort",
803
+ ...options,
804
+ ...params,
805
+ });
806
+ }
807
+ /**
808
+ * Unshare session
809
+ *
810
+ * Remove the shareable link for a session, making it private again.
811
+ */
812
+ unshare(parameters, options) {
813
+ const params = buildClientParams([parameters], [
814
+ {
815
+ args: [
816
+ { in: "path", key: "sessionID" },
817
+ { in: "query", key: "directory" },
818
+ ],
819
+ },
820
+ ]);
821
+ return (options?.client ?? this.client).delete({
822
+ url: "/session/{sessionID}/share",
823
+ ...options,
824
+ ...params,
825
+ });
826
+ }
827
+ /**
828
+ * Share session
829
+ *
830
+ * Create a shareable link for a session, allowing others to view the conversation.
831
+ */
832
+ share(parameters, options) {
833
+ const params = buildClientParams([parameters], [
834
+ {
835
+ args: [
836
+ { in: "path", key: "sessionID" },
837
+ { in: "query", key: "directory" },
838
+ ],
839
+ },
840
+ ]);
841
+ return (options?.client ?? this.client).post({
842
+ url: "/session/{sessionID}/share",
843
+ ...options,
844
+ ...params,
845
+ });
846
+ }
847
+ /**
848
+ * Get message diff
849
+ *
850
+ * Get the file changes (diff) that resulted from a specific user message in the session.
851
+ */
852
+ diff(parameters, options) {
853
+ const params = buildClientParams([parameters], [
854
+ {
855
+ args: [
856
+ { in: "path", key: "sessionID" },
857
+ { in: "query", key: "directory" },
858
+ { in: "query", key: "messageID" },
859
+ ],
860
+ },
861
+ ]);
862
+ return (options?.client ?? this.client).get({
863
+ url: "/session/{sessionID}/diff",
864
+ ...options,
865
+ ...params,
866
+ });
867
+ }
868
+ /**
869
+ * Summarize session
870
+ *
871
+ * Generate a concise summary of the session using AI compaction to preserve key information.
872
+ */
873
+ summarize(parameters, options) {
874
+ const params = buildClientParams([parameters], [
875
+ {
876
+ args: [
877
+ { in: "path", key: "sessionID" },
878
+ { in: "query", key: "directory" },
879
+ { in: "body", key: "providerID" },
880
+ { in: "body", key: "modelID" },
881
+ { in: "body", key: "auto" },
882
+ ],
883
+ },
884
+ ]);
885
+ return (options?.client ?? this.client).post({
886
+ url: "/session/{sessionID}/summarize",
887
+ ...options,
888
+ ...params,
889
+ headers: {
890
+ "Content-Type": "application/json",
891
+ ...options?.headers,
892
+ ...params.headers,
893
+ },
894
+ });
895
+ }
896
+ /**
897
+ * Get session messages
898
+ *
899
+ * Retrieve all messages in a session, including user prompts and AI responses.
900
+ */
901
+ messages(parameters, options) {
902
+ const params = buildClientParams([parameters], [
903
+ {
904
+ args: [
905
+ { in: "path", key: "sessionID" },
906
+ { in: "query", key: "directory" },
907
+ { in: "query", key: "limit" },
908
+ ],
909
+ },
910
+ ]);
911
+ return (options?.client ?? this.client).get({
912
+ url: "/session/{sessionID}/message",
913
+ ...options,
914
+ ...params,
915
+ });
916
+ }
917
+ /**
918
+ * Send message
919
+ *
920
+ * Create and send a new message to a session, streaming the AI response.
921
+ */
922
+ prompt(parameters, options) {
923
+ const params = buildClientParams([parameters], [
924
+ {
925
+ args: [
926
+ { in: "path", key: "sessionID" },
927
+ { in: "query", key: "directory" },
928
+ { in: "body", key: "messageID" },
929
+ { in: "body", key: "model" },
930
+ { in: "body", key: "agent" },
931
+ { in: "body", key: "noReply" },
932
+ { in: "body", key: "tools" },
933
+ { in: "body", key: "system" },
934
+ { in: "body", key: "variant" },
935
+ { in: "body", key: "forkMessages" },
936
+ { in: "body", key: "parts" },
937
+ ],
938
+ },
939
+ ]);
940
+ return (options?.client ?? this.client).post({
941
+ url: "/session/{sessionID}/message",
942
+ ...options,
943
+ ...params,
944
+ headers: {
945
+ "Content-Type": "application/json",
946
+ ...options?.headers,
947
+ ...params.headers,
948
+ },
949
+ });
950
+ }
951
+ /**
952
+ * Get message
953
+ *
954
+ * Retrieve a specific message from a session by its message ID.
955
+ */
956
+ message(parameters, options) {
957
+ const params = buildClientParams([parameters], [
958
+ {
959
+ args: [
960
+ { in: "path", key: "sessionID" },
961
+ { in: "path", key: "messageID" },
962
+ { in: "query", key: "directory" },
963
+ ],
964
+ },
965
+ ]);
966
+ return (options?.client ?? this.client).get({
967
+ url: "/session/{sessionID}/message/{messageID}",
968
+ ...options,
969
+ ...params,
970
+ });
971
+ }
972
+ /**
973
+ * Send async message
974
+ *
975
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
976
+ */
977
+ promptAsync(parameters, options) {
978
+ const params = buildClientParams([parameters], [
979
+ {
980
+ args: [
981
+ { in: "path", key: "sessionID" },
982
+ { in: "query", key: "directory" },
983
+ { in: "body", key: "messageID" },
984
+ { in: "body", key: "model" },
985
+ { in: "body", key: "agent" },
986
+ { in: "body", key: "noReply" },
987
+ { in: "body", key: "tools" },
988
+ { in: "body", key: "system" },
989
+ { in: "body", key: "variant" },
990
+ { in: "body", key: "forkMessages" },
991
+ { in: "body", key: "parts" },
992
+ ],
993
+ },
994
+ ]);
995
+ return (options?.client ?? this.client).post({
996
+ url: "/session/{sessionID}/prompt_async",
997
+ ...options,
998
+ ...params,
999
+ headers: {
1000
+ "Content-Type": "application/json",
1001
+ ...options?.headers,
1002
+ ...params.headers,
1003
+ },
1004
+ });
1005
+ }
1006
+ /**
1007
+ * Send command
1008
+ *
1009
+ * Send a new command to a session for execution by the AI assistant.
1010
+ */
1011
+ command(parameters, options) {
1012
+ const params = buildClientParams([parameters], [
1013
+ {
1014
+ args: [
1015
+ { in: "path", key: "sessionID" },
1016
+ { in: "query", key: "directory" },
1017
+ { in: "body", key: "messageID" },
1018
+ { in: "body", key: "agent" },
1019
+ { in: "body", key: "model" },
1020
+ { in: "body", key: "arguments" },
1021
+ { in: "body", key: "command" },
1022
+ { in: "body", key: "variant" },
1023
+ { in: "body", key: "parts" },
1024
+ ],
1025
+ },
1026
+ ]);
1027
+ return (options?.client ?? this.client).post({
1028
+ url: "/session/{sessionID}/command",
1029
+ ...options,
1030
+ ...params,
1031
+ headers: {
1032
+ "Content-Type": "application/json",
1033
+ ...options?.headers,
1034
+ ...params.headers,
1035
+ },
1036
+ });
1037
+ }
1038
+ /**
1039
+ * Run shell command
1040
+ *
1041
+ * Execute a shell command within the session context and return the AI's response.
1042
+ */
1043
+ shell(parameters, options) {
1044
+ const params = buildClientParams([parameters], [
1045
+ {
1046
+ args: [
1047
+ { in: "path", key: "sessionID" },
1048
+ { in: "query", key: "directory" },
1049
+ { in: "body", key: "agent" },
1050
+ { in: "body", key: "model" },
1051
+ { in: "body", key: "command" },
1052
+ ],
1053
+ },
1054
+ ]);
1055
+ return (options?.client ?? this.client).post({
1056
+ url: "/session/{sessionID}/shell",
1057
+ ...options,
1058
+ ...params,
1059
+ headers: {
1060
+ "Content-Type": "application/json",
1061
+ ...options?.headers,
1062
+ ...params.headers,
1063
+ },
1064
+ });
1065
+ }
1066
+ /**
1067
+ * Revert message
1068
+ *
1069
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
1070
+ */
1071
+ revert(parameters, options) {
1072
+ const params = buildClientParams([parameters], [
1073
+ {
1074
+ args: [
1075
+ { in: "path", key: "sessionID" },
1076
+ { in: "query", key: "directory" },
1077
+ { in: "body", key: "messageID" },
1078
+ { in: "body", key: "partID" },
1079
+ ],
1080
+ },
1081
+ ]);
1082
+ return (options?.client ?? this.client).post({
1083
+ url: "/session/{sessionID}/revert",
1084
+ ...options,
1085
+ ...params,
1086
+ headers: {
1087
+ "Content-Type": "application/json",
1088
+ ...options?.headers,
1089
+ ...params.headers,
1090
+ },
1091
+ });
1092
+ }
1093
+ /**
1094
+ * Restore reverted messages
1095
+ *
1096
+ * Restore all previously reverted messages in a session.
1097
+ */
1098
+ unrevert(parameters, options) {
1099
+ const params = buildClientParams([parameters], [
1100
+ {
1101
+ args: [
1102
+ { in: "path", key: "sessionID" },
1103
+ { in: "query", key: "directory" },
1104
+ ],
1105
+ },
1106
+ ]);
1107
+ return (options?.client ?? this.client).post({
1108
+ url: "/session/{sessionID}/unrevert",
1109
+ ...options,
1110
+ ...params,
1111
+ });
1112
+ }
1113
+ }
1114
+ export class Part extends HeyApiClient {
1115
+ /**
1116
+ * Delete a part from a message
1117
+ */
1118
+ delete(parameters, options) {
1119
+ const params = buildClientParams([parameters], [
1120
+ {
1121
+ args: [
1122
+ { in: "path", key: "sessionID" },
1123
+ { in: "path", key: "messageID" },
1124
+ { in: "path", key: "partID" },
1125
+ { in: "query", key: "directory" },
1126
+ ],
1127
+ },
1128
+ ]);
1129
+ return (options?.client ?? this.client).delete({
1130
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
1131
+ ...options,
1132
+ ...params,
1133
+ });
1134
+ }
1135
+ /**
1136
+ * Update a part in a message
1137
+ */
1138
+ update(parameters, options) {
1139
+ const params = buildClientParams([parameters], [
1140
+ {
1141
+ args: [
1142
+ { in: "path", key: "sessionID" },
1143
+ { in: "path", key: "messageID" },
1144
+ { in: "path", key: "partID" },
1145
+ { in: "query", key: "directory" },
1146
+ { key: "part", map: "body" },
1147
+ ],
1148
+ },
1149
+ ]);
1150
+ return (options?.client ?? this.client).patch({
1151
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
1152
+ ...options,
1153
+ ...params,
1154
+ headers: {
1155
+ "Content-Type": "application/json",
1156
+ ...options?.headers,
1157
+ ...params.headers,
1158
+ },
1159
+ });
1160
+ }
1161
+ }
1162
+ export class Permission extends HeyApiClient {
1163
+ /**
1164
+ * Respond to permission
1165
+ *
1166
+ * Approve or deny a permission request from the AI assistant.
1167
+ *
1168
+ * @deprecated
1169
+ */
1170
+ respond(parameters, options) {
1171
+ const params = buildClientParams([parameters], [
1172
+ {
1173
+ args: [
1174
+ { in: "path", key: "sessionID" },
1175
+ { in: "path", key: "permissionID" },
1176
+ { in: "query", key: "directory" },
1177
+ { in: "body", key: "response" },
1178
+ ],
1179
+ },
1180
+ ]);
1181
+ return (options?.client ?? this.client).post({
1182
+ url: "/session/{sessionID}/permissions/{permissionID}",
1183
+ ...options,
1184
+ ...params,
1185
+ headers: {
1186
+ "Content-Type": "application/json",
1187
+ ...options?.headers,
1188
+ ...params.headers,
1189
+ },
1190
+ });
1191
+ }
1192
+ /**
1193
+ * Respond to permission request
1194
+ *
1195
+ * Approve or deny a permission request from the AI assistant.
1196
+ */
1197
+ reply(parameters, options) {
1198
+ const params = buildClientParams([parameters], [
1199
+ {
1200
+ args: [
1201
+ { in: "path", key: "requestID" },
1202
+ { in: "query", key: "directory" },
1203
+ { in: "body", key: "reply" },
1204
+ { in: "body", key: "message" },
1205
+ ],
1206
+ },
1207
+ ]);
1208
+ return (options?.client ?? this.client).post({
1209
+ url: "/permission/{requestID}/reply",
1210
+ ...options,
1211
+ ...params,
1212
+ headers: {
1213
+ "Content-Type": "application/json",
1214
+ ...options?.headers,
1215
+ ...params.headers,
1216
+ },
1217
+ });
1218
+ }
1219
+ /**
1220
+ * List pending permissions
1221
+ *
1222
+ * Get all pending permission requests across all sessions.
1223
+ */
1224
+ list(parameters, options) {
1225
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1226
+ return (options?.client ?? this.client).get({
1227
+ url: "/permission",
1228
+ ...options,
1229
+ ...params,
1230
+ });
1231
+ }
1232
+ }
1233
+ export class Question extends HeyApiClient {
1234
+ /**
1235
+ * List pending questions
1236
+ *
1237
+ * Get all pending question requests across all sessions.
1238
+ */
1239
+ list(parameters, options) {
1240
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1241
+ return (options?.client ?? this.client).get({
1242
+ url: "/question",
1243
+ ...options,
1244
+ ...params,
1245
+ });
1246
+ }
1247
+ /**
1248
+ * Reply to question request
1249
+ *
1250
+ * Provide answers to a question request from the AI assistant.
1251
+ */
1252
+ reply(parameters, options) {
1253
+ const params = buildClientParams([parameters], [
1254
+ {
1255
+ args: [
1256
+ { in: "path", key: "requestID" },
1257
+ { in: "query", key: "directory" },
1258
+ { in: "body", key: "answers" },
1259
+ ],
1260
+ },
1261
+ ]);
1262
+ return (options?.client ?? this.client).post({
1263
+ url: "/question/{requestID}/reply",
1264
+ ...options,
1265
+ ...params,
1266
+ headers: {
1267
+ "Content-Type": "application/json",
1268
+ ...options?.headers,
1269
+ ...params.headers,
1270
+ },
1271
+ });
1272
+ }
1273
+ /**
1274
+ * Reject question request
1275
+ *
1276
+ * Reject a question request from the AI assistant.
1277
+ */
1278
+ reject(parameters, options) {
1279
+ const params = buildClientParams([parameters], [
1280
+ {
1281
+ args: [
1282
+ { in: "path", key: "requestID" },
1283
+ { in: "query", key: "directory" },
1284
+ ],
1285
+ },
1286
+ ]);
1287
+ return (options?.client ?? this.client).post({
1288
+ url: "/question/{requestID}/reject",
1289
+ ...options,
1290
+ ...params,
1291
+ });
1292
+ }
1293
+ }
1294
+ export class Oauth extends HeyApiClient {
1295
+ /**
1296
+ * OAuth authorize
1297
+ *
1298
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
1299
+ */
1300
+ authorize(parameters, options) {
1301
+ const params = buildClientParams([parameters], [
1302
+ {
1303
+ args: [
1304
+ { in: "path", key: "providerID" },
1305
+ { in: "query", key: "directory" },
1306
+ { in: "body", key: "method" },
1307
+ ],
1308
+ },
1309
+ ]);
1310
+ return (options?.client ?? this.client).post({
1311
+ url: "/provider/{providerID}/oauth/authorize",
1312
+ ...options,
1313
+ ...params,
1314
+ headers: {
1315
+ "Content-Type": "application/json",
1316
+ ...options?.headers,
1317
+ ...params.headers,
1318
+ },
1319
+ });
1320
+ }
1321
+ /**
1322
+ * OAuth callback
1323
+ *
1324
+ * Handle the OAuth callback from a provider after user authorization.
1325
+ */
1326
+ callback(parameters, options) {
1327
+ const params = buildClientParams([parameters], [
1328
+ {
1329
+ args: [
1330
+ { in: "path", key: "providerID" },
1331
+ { in: "query", key: "directory" },
1332
+ { in: "body", key: "method" },
1333
+ { in: "body", key: "code" },
1334
+ ],
1335
+ },
1336
+ ]);
1337
+ return (options?.client ?? this.client).post({
1338
+ url: "/provider/{providerID}/oauth/callback",
1339
+ ...options,
1340
+ ...params,
1341
+ headers: {
1342
+ "Content-Type": "application/json",
1343
+ ...options?.headers,
1344
+ ...params.headers,
1345
+ },
1346
+ });
1347
+ }
1348
+ }
1349
+ export class Provider extends HeyApiClient {
1350
+ /**
1351
+ * List providers
1352
+ *
1353
+ * Get a list of all available AI providers, including both available and connected ones.
1354
+ */
1355
+ list(parameters, options) {
1356
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1357
+ return (options?.client ?? this.client).get({
1358
+ url: "/provider",
1359
+ ...options,
1360
+ ...params,
1361
+ });
1362
+ }
1363
+ /**
1364
+ * Get provider auth methods
1365
+ *
1366
+ * Retrieve available authentication methods for all AI providers.
1367
+ */
1368
+ auth(parameters, options) {
1369
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1370
+ return (options?.client ?? this.client).get({
1371
+ url: "/provider/auth",
1372
+ ...options,
1373
+ ...params,
1374
+ });
1375
+ }
1376
+ _oauth;
1377
+ get oauth() {
1378
+ return (this._oauth ??= new Oauth({ client: this.client }));
1379
+ }
1380
+ }
1381
+ export class Find extends HeyApiClient {
1382
+ /**
1383
+ * Find text
1384
+ *
1385
+ * Search for text patterns across files in the project using ripgrep.
1386
+ */
1387
+ text(parameters, options) {
1388
+ const params = buildClientParams([parameters], [
1389
+ {
1390
+ args: [
1391
+ { in: "query", key: "directory" },
1392
+ { in: "query", key: "pattern" },
1393
+ ],
1394
+ },
1395
+ ]);
1396
+ return (options?.client ?? this.client).get({
1397
+ url: "/find",
1398
+ ...options,
1399
+ ...params,
1400
+ });
1401
+ }
1402
+ /**
1403
+ * Find files
1404
+ *
1405
+ * Search for files or directories by name or pattern in the project directory.
1406
+ */
1407
+ files(parameters, options) {
1408
+ const params = buildClientParams([parameters], [
1409
+ {
1410
+ args: [
1411
+ { in: "query", key: "directory" },
1412
+ { in: "query", key: "query" },
1413
+ { in: "query", key: "dirs" },
1414
+ { in: "query", key: "type" },
1415
+ { in: "query", key: "limit" },
1416
+ ],
1417
+ },
1418
+ ]);
1419
+ return (options?.client ?? this.client).get({
1420
+ url: "/find/file",
1421
+ ...options,
1422
+ ...params,
1423
+ });
1424
+ }
1425
+ /**
1426
+ * Find symbols
1427
+ *
1428
+ * Search for workspace symbols like functions, classes, and variables using LSP.
1429
+ */
1430
+ symbols(parameters, options) {
1431
+ const params = buildClientParams([parameters], [
1432
+ {
1433
+ args: [
1434
+ { in: "query", key: "directory" },
1435
+ { in: "query", key: "query" },
1436
+ ],
1437
+ },
1438
+ ]);
1439
+ return (options?.client ?? this.client).get({
1440
+ url: "/find/symbol",
1441
+ ...options,
1442
+ ...params,
1443
+ });
1444
+ }
1445
+ }
1446
+ export class File extends HeyApiClient {
1447
+ /**
1448
+ * List files
1449
+ *
1450
+ * List files and directories in a specified path.
1451
+ */
1452
+ list(parameters, options) {
1453
+ const params = buildClientParams([parameters], [
1454
+ {
1455
+ args: [
1456
+ { in: "query", key: "directory" },
1457
+ { in: "query", key: "path" },
1458
+ ],
1459
+ },
1460
+ ]);
1461
+ return (options?.client ?? this.client).get({
1462
+ url: "/file",
1463
+ ...options,
1464
+ ...params,
1465
+ });
1466
+ }
1467
+ /**
1468
+ * Read file
1469
+ *
1470
+ * Read the content of a specified file.
1471
+ */
1472
+ read(parameters, options) {
1473
+ const params = buildClientParams([parameters], [
1474
+ {
1475
+ args: [
1476
+ { in: "query", key: "directory" },
1477
+ { in: "query", key: "path" },
1478
+ ],
1479
+ },
1480
+ ]);
1481
+ return (options?.client ?? this.client).get({
1482
+ url: "/file/content",
1483
+ ...options,
1484
+ ...params,
1485
+ });
1486
+ }
1487
+ /**
1488
+ * Get file status
1489
+ *
1490
+ * Get the git status of all files in the project.
1491
+ */
1492
+ status(parameters, options) {
1493
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1494
+ return (options?.client ?? this.client).get({
1495
+ url: "/file/status",
1496
+ ...options,
1497
+ ...params,
1498
+ });
1499
+ }
1500
+ }
1501
+ export class Auth2 extends HeyApiClient {
1502
+ /**
1503
+ * Remove MCP OAuth
1504
+ *
1505
+ * Remove OAuth credentials for an MCP server
1506
+ */
1507
+ remove(parameters, options) {
1508
+ const params = buildClientParams([parameters], [
1509
+ {
1510
+ args: [
1511
+ { in: "path", key: "name" },
1512
+ { in: "query", key: "directory" },
1513
+ ],
1514
+ },
1515
+ ]);
1516
+ return (options?.client ?? this.client).delete({
1517
+ url: "/mcp/{name}/auth",
1518
+ ...options,
1519
+ ...params,
1520
+ });
1521
+ }
1522
+ /**
1523
+ * Start MCP OAuth
1524
+ *
1525
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
1526
+ */
1527
+ start(parameters, options) {
1528
+ const params = buildClientParams([parameters], [
1529
+ {
1530
+ args: [
1531
+ { in: "path", key: "name" },
1532
+ { in: "query", key: "directory" },
1533
+ ],
1534
+ },
1535
+ ]);
1536
+ return (options?.client ?? this.client).post({
1537
+ url: "/mcp/{name}/auth",
1538
+ ...options,
1539
+ ...params,
1540
+ });
1541
+ }
1542
+ /**
1543
+ * Complete MCP OAuth
1544
+ *
1545
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
1546
+ */
1547
+ callback(parameters, options) {
1548
+ const params = buildClientParams([parameters], [
1549
+ {
1550
+ args: [
1551
+ { in: "path", key: "name" },
1552
+ { in: "query", key: "directory" },
1553
+ { in: "body", key: "code" },
1554
+ ],
1555
+ },
1556
+ ]);
1557
+ return (options?.client ?? this.client).post({
1558
+ url: "/mcp/{name}/auth/callback",
1559
+ ...options,
1560
+ ...params,
1561
+ headers: {
1562
+ "Content-Type": "application/json",
1563
+ ...options?.headers,
1564
+ ...params.headers,
1565
+ },
1566
+ });
1567
+ }
1568
+ /**
1569
+ * Authenticate MCP OAuth
1570
+ *
1571
+ * Start OAuth flow and wait for callback (opens browser)
1572
+ */
1573
+ authenticate(parameters, options) {
1574
+ const params = buildClientParams([parameters], [
1575
+ {
1576
+ args: [
1577
+ { in: "path", key: "name" },
1578
+ { in: "query", key: "directory" },
1579
+ ],
1580
+ },
1581
+ ]);
1582
+ return (options?.client ?? this.client).post({
1583
+ url: "/mcp/{name}/auth/authenticate",
1584
+ ...options,
1585
+ ...params,
1586
+ });
1587
+ }
1588
+ }
1589
+ export class Mcp extends HeyApiClient {
1590
+ /**
1591
+ * Get MCP status
1592
+ *
1593
+ * Get the status of all Model Context Protocol (MCP) servers.
1594
+ */
1595
+ status(parameters, options) {
1596
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1597
+ return (options?.client ?? this.client).get({
1598
+ url: "/mcp",
1599
+ ...options,
1600
+ ...params,
1601
+ });
1602
+ }
1603
+ /**
1604
+ * Add MCP server
1605
+ *
1606
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
1607
+ */
1608
+ add(parameters, options) {
1609
+ const params = buildClientParams([parameters], [
1610
+ {
1611
+ args: [
1612
+ { in: "query", key: "directory" },
1613
+ { in: "body", key: "name" },
1614
+ { in: "body", key: "config" },
1615
+ ],
1616
+ },
1617
+ ]);
1618
+ return (options?.client ?? this.client).post({
1619
+ url: "/mcp",
1620
+ ...options,
1621
+ ...params,
1622
+ headers: {
1623
+ "Content-Type": "application/json",
1624
+ ...options?.headers,
1625
+ ...params.headers,
1626
+ },
1627
+ });
1628
+ }
1629
+ /**
1630
+ * Connect an MCP server
1631
+ */
1632
+ connect(parameters, options) {
1633
+ const params = buildClientParams([parameters], [
1634
+ {
1635
+ args: [
1636
+ { in: "path", key: "name" },
1637
+ { in: "query", key: "directory" },
1638
+ ],
1639
+ },
1640
+ ]);
1641
+ return (options?.client ?? this.client).post({
1642
+ url: "/mcp/{name}/connect",
1643
+ ...options,
1644
+ ...params,
1645
+ });
1646
+ }
1647
+ /**
1648
+ * Disconnect an MCP server
1649
+ */
1650
+ disconnect(parameters, options) {
1651
+ const params = buildClientParams([parameters], [
1652
+ {
1653
+ args: [
1654
+ { in: "path", key: "name" },
1655
+ { in: "query", key: "directory" },
1656
+ ],
1657
+ },
1658
+ ]);
1659
+ return (options?.client ?? this.client).post({
1660
+ url: "/mcp/{name}/disconnect",
1661
+ ...options,
1662
+ ...params,
1663
+ });
1664
+ }
1665
+ _auth;
1666
+ get auth() {
1667
+ return (this._auth ??= new Auth2({ client: this.client }));
1668
+ }
1669
+ }
1670
+ export class Git extends HeyApiClient {
1671
+ /**
1672
+ * Check for unpushed changes
1673
+ *
1674
+ * Check all git repositories in the project for unpushed changes. Returns a map of gitRoot to changedFiles array.
1675
+ */
1676
+ check(parameters, options) {
1677
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1678
+ return (options?.client ?? this.client).get({
1679
+ url: "/git/check",
1680
+ ...options,
1681
+ ...params,
1682
+ });
1683
+ }
1684
+ }
1685
+ export class Control extends HeyApiClient {
1686
+ /**
1687
+ * Get next TUI request
1688
+ *
1689
+ * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
1690
+ */
1691
+ next(parameters, options) {
1692
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1693
+ return (options?.client ?? this.client).get({
1694
+ url: "/tui/control/next",
1695
+ ...options,
1696
+ ...params,
1697
+ });
1698
+ }
1699
+ /**
1700
+ * Submit TUI response
1701
+ *
1702
+ * Submit a response to the TUI request queue to complete a pending request.
1703
+ */
1704
+ response(parameters, options) {
1705
+ const params = buildClientParams([parameters], [
1706
+ {
1707
+ args: [
1708
+ { in: "query", key: "directory" },
1709
+ { key: "body", map: "body" },
1710
+ ],
1711
+ },
1712
+ ]);
1713
+ return (options?.client ?? this.client).post({
1714
+ url: "/tui/control/response",
1715
+ ...options,
1716
+ ...params,
1717
+ headers: {
1718
+ "Content-Type": "application/json",
1719
+ ...options?.headers,
1720
+ ...params.headers,
1721
+ },
1722
+ });
1723
+ }
1724
+ }
1725
+ export class Tui extends HeyApiClient {
1726
+ /**
1727
+ * Append TUI prompt
1728
+ *
1729
+ * Append prompt to the TUI
1730
+ */
1731
+ appendPrompt(parameters, options) {
1732
+ const params = buildClientParams([parameters], [
1733
+ {
1734
+ args: [
1735
+ { in: "query", key: "directory" },
1736
+ { in: "body", key: "text" },
1737
+ ],
1738
+ },
1739
+ ]);
1740
+ return (options?.client ?? this.client).post({
1741
+ url: "/tui/append-prompt",
1742
+ ...options,
1743
+ ...params,
1744
+ headers: {
1745
+ "Content-Type": "application/json",
1746
+ ...options?.headers,
1747
+ ...params.headers,
1748
+ },
1749
+ });
1750
+ }
1751
+ /**
1752
+ * Open help dialog
1753
+ *
1754
+ * Open the help dialog in the TUI to display user assistance information.
1755
+ */
1756
+ openHelp(parameters, options) {
1757
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1758
+ return (options?.client ?? this.client).post({
1759
+ url: "/tui/open-help",
1760
+ ...options,
1761
+ ...params,
1762
+ });
1763
+ }
1764
+ /**
1765
+ * Open sessions dialog
1766
+ *
1767
+ * Open the session dialog
1768
+ */
1769
+ openSessions(parameters, options) {
1770
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1771
+ return (options?.client ?? this.client).post({
1772
+ url: "/tui/open-sessions",
1773
+ ...options,
1774
+ ...params,
1775
+ });
1776
+ }
1777
+ /**
1778
+ * Open themes dialog
1779
+ *
1780
+ * Open the theme dialog
1781
+ */
1782
+ openThemes(parameters, options) {
1783
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1784
+ return (options?.client ?? this.client).post({
1785
+ url: "/tui/open-themes",
1786
+ ...options,
1787
+ ...params,
1788
+ });
1789
+ }
1790
+ /**
1791
+ * Open models dialog
1792
+ *
1793
+ * Open the model dialog
1794
+ */
1795
+ openModels(parameters, options) {
1796
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1797
+ return (options?.client ?? this.client).post({
1798
+ url: "/tui/open-models",
1799
+ ...options,
1800
+ ...params,
1801
+ });
1802
+ }
1803
+ /**
1804
+ * Submit TUI prompt
1805
+ *
1806
+ * Submit the prompt
1807
+ */
1808
+ submitPrompt(parameters, options) {
1809
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1810
+ return (options?.client ?? this.client).post({
1811
+ url: "/tui/submit-prompt",
1812
+ ...options,
1813
+ ...params,
1814
+ });
1815
+ }
1816
+ /**
1817
+ * Clear TUI prompt
1818
+ *
1819
+ * Clear the prompt
1820
+ */
1821
+ clearPrompt(parameters, options) {
1822
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1823
+ return (options?.client ?? this.client).post({
1824
+ url: "/tui/clear-prompt",
1825
+ ...options,
1826
+ ...params,
1827
+ });
1828
+ }
1829
+ /**
1830
+ * Execute TUI command
1831
+ *
1832
+ * Execute a TUI command (e.g. agent_cycle)
1833
+ */
1834
+ executeCommand(parameters, options) {
1835
+ const params = buildClientParams([parameters], [
1836
+ {
1837
+ args: [
1838
+ { in: "query", key: "directory" },
1839
+ { in: "body", key: "command" },
1840
+ ],
1841
+ },
1842
+ ]);
1843
+ return (options?.client ?? this.client).post({
1844
+ url: "/tui/execute-command",
1845
+ ...options,
1846
+ ...params,
1847
+ headers: {
1848
+ "Content-Type": "application/json",
1849
+ ...options?.headers,
1850
+ ...params.headers,
1851
+ },
1852
+ });
1853
+ }
1854
+ /**
1855
+ * Show TUI toast
1856
+ *
1857
+ * Show a toast notification in the TUI
1858
+ */
1859
+ showToast(parameters, options) {
1860
+ const params = buildClientParams([parameters], [
1861
+ {
1862
+ args: [
1863
+ { in: "query", key: "directory" },
1864
+ { in: "body", key: "title" },
1865
+ { in: "body", key: "message" },
1866
+ { in: "body", key: "variant" },
1867
+ { in: "body", key: "duration" },
1868
+ ],
1869
+ },
1870
+ ]);
1871
+ return (options?.client ?? this.client).post({
1872
+ url: "/tui/show-toast",
1873
+ ...options,
1874
+ ...params,
1875
+ headers: {
1876
+ "Content-Type": "application/json",
1877
+ ...options?.headers,
1878
+ ...params.headers,
1879
+ },
1880
+ });
1881
+ }
1882
+ /**
1883
+ * Publish TUI event
1884
+ *
1885
+ * Publish a TUI event
1886
+ */
1887
+ publish(parameters, options) {
1888
+ const params = buildClientParams([parameters], [
1889
+ {
1890
+ args: [
1891
+ { in: "query", key: "directory" },
1892
+ { key: "body", map: "body" },
1893
+ ],
1894
+ },
1895
+ ]);
1896
+ return (options?.client ?? this.client).post({
1897
+ url: "/tui/publish",
1898
+ ...options,
1899
+ ...params,
1900
+ headers: {
1901
+ "Content-Type": "application/json",
1902
+ ...options?.headers,
1903
+ ...params.headers,
1904
+ },
1905
+ });
1906
+ }
1907
+ /**
1908
+ * Select session
1909
+ *
1910
+ * Navigate the TUI to display the specified session.
1911
+ */
1912
+ selectSession(parameters, options) {
1913
+ const params = buildClientParams([parameters], [
1914
+ {
1915
+ args: [
1916
+ { in: "query", key: "directory" },
1917
+ { in: "body", key: "sessionID" },
1918
+ ],
1919
+ },
1920
+ ]);
1921
+ return (options?.client ?? this.client).post({
1922
+ url: "/tui/select-session",
1923
+ ...options,
1924
+ ...params,
1925
+ headers: {
1926
+ "Content-Type": "application/json",
1927
+ ...options?.headers,
1928
+ ...params.headers,
1929
+ },
1930
+ });
1931
+ }
1932
+ _control;
1933
+ get control() {
1934
+ return (this._control ??= new Control({ client: this.client }));
1935
+ }
1936
+ }
1937
+ export class Team extends HeyApiClient {
1938
+ /**
1939
+ * Get team config
1940
+ */
1941
+ config(parameters, options) {
1942
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1943
+ return (options?.client ?? this.client).get({
1944
+ url: "/team/config",
1945
+ ...options,
1946
+ ...params,
1947
+ });
1948
+ }
1949
+ /**
1950
+ * Get available team roles
1951
+ */
1952
+ roles(parameters, options) {
1953
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1954
+ return (options?.client ?? this.client).get({
1955
+ url: "/team/roles",
1956
+ ...options,
1957
+ ...params,
1958
+ });
1959
+ }
1960
+ /**
1961
+ * Get team status
1962
+ */
1963
+ status(parameters, options) {
1964
+ const params = buildClientParams([parameters], [
1965
+ {
1966
+ args: [
1967
+ { in: "query", key: "directory" },
1968
+ { in: "query", key: "sessionId" },
1969
+ ],
1970
+ },
1971
+ ]);
1972
+ return (options?.client ?? this.client).get({
1973
+ url: "/team/status",
1974
+ ...options,
1975
+ ...params,
1976
+ });
1977
+ }
1978
+ /**
1979
+ * Hire a team member
1980
+ */
1981
+ hire(parameters, options) {
1982
+ const params = buildClientParams([parameters], [
1983
+ {
1984
+ args: [
1985
+ { in: "query", key: "directory" },
1986
+ { in: "body", key: "sessionId" },
1987
+ { in: "body", key: "name" },
1988
+ { in: "body", key: "role" },
1989
+ ],
1990
+ },
1991
+ ]);
1992
+ return (options?.client ?? this.client).post({
1993
+ url: "/team/hire",
1994
+ ...options,
1995
+ ...params,
1996
+ headers: {
1997
+ "Content-Type": "application/json",
1998
+ ...options?.headers,
1999
+ ...params.headers,
2000
+ },
2001
+ });
2002
+ }
2003
+ /**
2004
+ * Hire a team member with auto-generated name
2005
+ */
2006
+ hireAuto(parameters, options) {
2007
+ const params = buildClientParams([parameters], [
2008
+ {
2009
+ args: [
2010
+ { in: "query", key: "directory" },
2011
+ { in: "body", key: "sessionId" },
2012
+ { in: "body", key: "role" },
2013
+ ],
2014
+ },
2015
+ ]);
2016
+ return (options?.client ?? this.client).post({
2017
+ url: "/team/hire-auto",
2018
+ ...options,
2019
+ ...params,
2020
+ headers: {
2021
+ "Content-Type": "application/json",
2022
+ ...options?.headers,
2023
+ ...params.headers,
2024
+ },
2025
+ });
2026
+ }
2027
+ /**
2028
+ * Fire a team member
2029
+ */
2030
+ fire(parameters, options) {
2031
+ const params = buildClientParams([parameters], [
2032
+ {
2033
+ args: [
2034
+ { in: "query", key: "directory" },
2035
+ { in: "body", key: "sessionId" },
2036
+ { in: "body", key: "name" },
2037
+ ],
2038
+ },
2039
+ ]);
2040
+ return (options?.client ?? this.client).post({
2041
+ url: "/team/fire",
2042
+ ...options,
2043
+ ...params,
2044
+ headers: {
2045
+ "Content-Type": "application/json",
2046
+ ...options?.headers,
2047
+ ...params.headers,
2048
+ },
2049
+ });
2050
+ }
2051
+ /**
2052
+ * Get messages for an agent
2053
+ */
2054
+ messages(parameters, options) {
2055
+ const params = buildClientParams([parameters], [
2056
+ {
2057
+ args: [
2058
+ { in: "path", key: "name" },
2059
+ { in: "query", key: "directory" },
2060
+ { in: "query", key: "sessionId" },
2061
+ { in: "query", key: "unread" },
2062
+ ],
2063
+ },
2064
+ ]);
2065
+ return (options?.client ?? this.client).get({
2066
+ url: "/team/messages/{name}",
2067
+ ...options,
2068
+ ...params,
2069
+ });
2070
+ }
2071
+ }
2072
+ export class Instance extends HeyApiClient {
2073
+ /**
2074
+ * Dispose instance
2075
+ *
2076
+ * Clean up and dispose the current OpenCode instance, releasing all resources.
2077
+ */
2078
+ dispose(parameters, options) {
2079
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2080
+ return (options?.client ?? this.client).post({
2081
+ url: "/instance/dispose",
2082
+ ...options,
2083
+ ...params,
2084
+ });
2085
+ }
2086
+ }
2087
+ export class Path extends HeyApiClient {
2088
+ /**
2089
+ * Get paths
2090
+ *
2091
+ * Retrieve the current working directory and related path information for the OpenCode instance.
2092
+ */
2093
+ get(parameters, options) {
2094
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2095
+ return (options?.client ?? this.client).get({
2096
+ url: "/path",
2097
+ ...options,
2098
+ ...params,
2099
+ });
2100
+ }
2101
+ }
2102
+ export class Vcs extends HeyApiClient {
2103
+ /**
2104
+ * Get VCS info
2105
+ *
2106
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
2107
+ */
2108
+ get(parameters, options) {
2109
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2110
+ return (options?.client ?? this.client).get({
2111
+ url: "/vcs",
2112
+ ...options,
2113
+ ...params,
2114
+ });
2115
+ }
2116
+ }
2117
+ export class Command extends HeyApiClient {
2118
+ /**
2119
+ * List commands
2120
+ *
2121
+ * Get a list of all available commands in the OpenCode system.
2122
+ */
2123
+ list(parameters, options) {
2124
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2125
+ return (options?.client ?? this.client).get({
2126
+ url: "/command",
2127
+ ...options,
2128
+ ...params,
2129
+ });
2130
+ }
2131
+ /**
2132
+ * Validate command
2133
+ *
2134
+ * Validate command arguments before execution. Returns validation error if invalid.
2135
+ */
2136
+ validate(parameters, options) {
2137
+ const params = buildClientParams([parameters], [
2138
+ {
2139
+ args: [
2140
+ { in: "query", key: "directory" },
2141
+ { in: "body", key: "command" },
2142
+ { in: "body", key: "arguments" },
2143
+ ],
2144
+ },
2145
+ ]);
2146
+ return (options?.client ?? this.client).post({
2147
+ url: "/command/validate",
2148
+ ...options,
2149
+ ...params,
2150
+ headers: {
2151
+ "Content-Type": "application/json",
2152
+ ...options?.headers,
2153
+ ...params.headers,
2154
+ },
2155
+ });
2156
+ }
2157
+ }
2158
+ export class App extends HeyApiClient {
2159
+ /**
2160
+ * Write log
2161
+ *
2162
+ * Write a log entry to the server logs with specified level and metadata.
2163
+ */
2164
+ log(parameters, options) {
2165
+ const params = buildClientParams([parameters], [
2166
+ {
2167
+ args: [
2168
+ { in: "query", key: "directory" },
2169
+ { in: "body", key: "service" },
2170
+ { in: "body", key: "level" },
2171
+ { in: "body", key: "message" },
2172
+ { in: "body", key: "extra" },
2173
+ ],
2174
+ },
2175
+ ]);
2176
+ return (options?.client ?? this.client).post({
2177
+ url: "/log",
2178
+ ...options,
2179
+ ...params,
2180
+ headers: {
2181
+ "Content-Type": "application/json",
2182
+ ...options?.headers,
2183
+ ...params.headers,
2184
+ },
2185
+ });
2186
+ }
2187
+ /**
2188
+ * List agents
2189
+ *
2190
+ * Get a list of all available AI agents in the Engineer system.
2191
+ */
2192
+ agents(parameters, options) {
2193
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2194
+ return (options?.client ?? this.client).get({
2195
+ url: "/agent",
2196
+ ...options,
2197
+ ...params,
2198
+ });
2199
+ }
2200
+ /**
2201
+ * List skills
2202
+ *
2203
+ * Get a list of all available skills in the OpenCode system.
2204
+ */
2205
+ skills(parameters, options) {
2206
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2207
+ return (options?.client ?? this.client).get({
2208
+ url: "/skill",
2209
+ ...options,
2210
+ ...params,
2211
+ });
2212
+ }
2213
+ }
2214
+ export class Lsp extends HeyApiClient {
2215
+ /**
2216
+ * Get LSP status
2217
+ *
2218
+ * Get LSP server status
2219
+ */
2220
+ status(parameters, options) {
2221
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2222
+ return (options?.client ?? this.client).get({
2223
+ url: "/lsp",
2224
+ ...options,
2225
+ ...params,
2226
+ });
2227
+ }
2228
+ }
2229
+ export class Formatter extends HeyApiClient {
2230
+ /**
2231
+ * Get formatter status
2232
+ *
2233
+ * Get formatter status
2234
+ */
2235
+ status(parameters, options) {
2236
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2237
+ return (options?.client ?? this.client).get({
2238
+ url: "/formatter",
2239
+ ...options,
2240
+ ...params,
2241
+ });
2242
+ }
2243
+ }
2244
+ export class Event extends HeyApiClient {
2245
+ /**
2246
+ * Subscribe to events
2247
+ *
2248
+ * Get events
2249
+ */
2250
+ subscribe(parameters, options) {
2251
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2252
+ return (options?.client ?? this.client).sse.get({
2253
+ url: "/event",
2254
+ ...options,
2255
+ ...params,
2256
+ });
2257
+ }
2258
+ }
2259
+ export class OpencodeClient extends HeyApiClient {
2260
+ static __registry = new HeyApiRegistry();
2261
+ constructor(args) {
2262
+ super(args);
2263
+ OpencodeClient.__registry.set(this, args?.key);
2264
+ }
2265
+ _global;
2266
+ get global() {
2267
+ return (this._global ??= new Global({ client: this.client }));
2268
+ }
2269
+ _auth;
2270
+ get auth() {
2271
+ return (this._auth ??= new Auth({ client: this.client }));
2272
+ }
2273
+ _project;
2274
+ get project() {
2275
+ return (this._project ??= new Project({ client: this.client }));
2276
+ }
2277
+ _pty;
2278
+ get pty() {
2279
+ return (this._pty ??= new Pty({ client: this.client }));
2280
+ }
2281
+ _config;
2282
+ get config() {
2283
+ return (this._config ??= new Config2({ client: this.client }));
2284
+ }
2285
+ _tool;
2286
+ get tool() {
2287
+ return (this._tool ??= new Tool({ client: this.client }));
2288
+ }
2289
+ _worktree;
2290
+ get worktree() {
2291
+ return (this._worktree ??= new Worktree({ client: this.client }));
2292
+ }
2293
+ _experimental;
2294
+ get experimental() {
2295
+ return (this._experimental ??= new Experimental({ client: this.client }));
2296
+ }
2297
+ _session;
2298
+ get session() {
2299
+ return (this._session ??= new Session({ client: this.client }));
2300
+ }
2301
+ _part;
2302
+ get part() {
2303
+ return (this._part ??= new Part({ client: this.client }));
2304
+ }
2305
+ _permission;
2306
+ get permission() {
2307
+ return (this._permission ??= new Permission({ client: this.client }));
2308
+ }
2309
+ _question;
2310
+ get question() {
2311
+ return (this._question ??= new Question({ client: this.client }));
2312
+ }
2313
+ _provider;
2314
+ get provider() {
2315
+ return (this._provider ??= new Provider({ client: this.client }));
2316
+ }
2317
+ _find;
2318
+ get find() {
2319
+ return (this._find ??= new Find({ client: this.client }));
2320
+ }
2321
+ _file;
2322
+ get file() {
2323
+ return (this._file ??= new File({ client: this.client }));
2324
+ }
2325
+ _mcp;
2326
+ get mcp() {
2327
+ return (this._mcp ??= new Mcp({ client: this.client }));
2328
+ }
2329
+ _git;
2330
+ get git() {
2331
+ return (this._git ??= new Git({ client: this.client }));
2332
+ }
2333
+ _tui;
2334
+ get tui() {
2335
+ return (this._tui ??= new Tui({ client: this.client }));
2336
+ }
2337
+ _team;
2338
+ get team() {
2339
+ return (this._team ??= new Team({ client: this.client }));
2340
+ }
2341
+ _instance;
2342
+ get instance() {
2343
+ return (this._instance ??= new Instance({ client: this.client }));
2344
+ }
2345
+ _path;
2346
+ get path() {
2347
+ return (this._path ??= new Path({ client: this.client }));
2348
+ }
2349
+ _vcs;
2350
+ get vcs() {
2351
+ return (this._vcs ??= new Vcs({ client: this.client }));
2352
+ }
2353
+ _command;
2354
+ get command() {
2355
+ return (this._command ??= new Command({ client: this.client }));
2356
+ }
2357
+ _app;
2358
+ get app() {
2359
+ return (this._app ??= new App({ client: this.client }));
2360
+ }
2361
+ _lsp;
2362
+ get lsp() {
2363
+ return (this._lsp ??= new Lsp({ client: this.client }));
2364
+ }
2365
+ _formatter;
2366
+ get formatter() {
2367
+ return (this._formatter ??= new Formatter({ client: this.client }));
2368
+ }
2369
+ _event;
2370
+ get event() {
2371
+ return (this._event ??= new Event({ client: this.client }));
2372
+ }
2373
+ }