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