@ironcode-ai/sdk 1.5.4

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 +3380 -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 +1103 -0
  64. package/dist/v2/gen/sdk.gen.js +2146 -0
  65. package/dist/v2/gen/types.gen.d.ts +4342 -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 +51 -0
@@ -0,0 +1,2146 @@
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 IroncodeClient()" 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 IronCode 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 IronCode 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 IronCode 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 IronCode 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 IronCode 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 IronCode.
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 IronCode 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 IronCode.
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 IronCode 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 IronCode 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
+ * Reset worktree
476
+ *
477
+ * Reset a worktree branch to the primary default branch.
478
+ */
479
+ reset(parameters, options) {
480
+ const params = buildClientParams([parameters], [
481
+ {
482
+ args: [
483
+ { in: "query", key: "directory" },
484
+ { key: "worktreeResetInput", map: "body" },
485
+ ],
486
+ },
487
+ ]);
488
+ return (options?.client ?? this.client).post({
489
+ url: "/experimental/worktree/reset",
490
+ ...options,
491
+ ...params,
492
+ headers: {
493
+ "Content-Type": "application/json",
494
+ ...options?.headers,
495
+ ...params.headers,
496
+ },
497
+ });
498
+ }
499
+ }
500
+ export class Resource extends HeyApiClient {
501
+ /**
502
+ * Get MCP resources
503
+ *
504
+ * Get all available MCP resources from connected servers. Optionally filter by name.
505
+ */
506
+ list(parameters, options) {
507
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
508
+ return (options?.client ?? this.client).get({
509
+ url: "/experimental/resource",
510
+ ...options,
511
+ ...params,
512
+ });
513
+ }
514
+ }
515
+ export class Experimental extends HeyApiClient {
516
+ _resource;
517
+ get resource() {
518
+ return (this._resource ??= new Resource({ client: this.client }));
519
+ }
520
+ }
521
+ export class Session extends HeyApiClient {
522
+ /**
523
+ * List sessions
524
+ *
525
+ * Get a list of all IronCode sessions, sorted by most recently updated.
526
+ */
527
+ list(parameters, options) {
528
+ const params = buildClientParams([parameters], [
529
+ {
530
+ args: [
531
+ { in: "query", key: "directory" },
532
+ { in: "query", key: "roots" },
533
+ { in: "query", key: "start" },
534
+ { in: "query", key: "search" },
535
+ { in: "query", key: "limit" },
536
+ ],
537
+ },
538
+ ]);
539
+ return (options?.client ?? this.client).get({
540
+ url: "/session",
541
+ ...options,
542
+ ...params,
543
+ });
544
+ }
545
+ /**
546
+ * Create session
547
+ *
548
+ * Create a new IronCode session for interacting with AI assistants and managing conversations.
549
+ */
550
+ create(parameters, options) {
551
+ const params = buildClientParams([parameters], [
552
+ {
553
+ args: [
554
+ { in: "query", key: "directory" },
555
+ { in: "body", key: "parentID" },
556
+ { in: "body", key: "title" },
557
+ { in: "body", key: "permission" },
558
+ ],
559
+ },
560
+ ]);
561
+ return (options?.client ?? this.client).post({
562
+ url: "/session",
563
+ ...options,
564
+ ...params,
565
+ headers: {
566
+ "Content-Type": "application/json",
567
+ ...options?.headers,
568
+ ...params.headers,
569
+ },
570
+ });
571
+ }
572
+ /**
573
+ * Get session status
574
+ *
575
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
576
+ */
577
+ status(parameters, options) {
578
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
579
+ return (options?.client ?? this.client).get({
580
+ url: "/session/status",
581
+ ...options,
582
+ ...params,
583
+ });
584
+ }
585
+ /**
586
+ * Delete session
587
+ *
588
+ * Delete a session and permanently remove all associated data, including messages and history.
589
+ */
590
+ delete(parameters, options) {
591
+ const params = buildClientParams([parameters], [
592
+ {
593
+ args: [
594
+ { in: "path", key: "sessionID" },
595
+ { in: "query", key: "directory" },
596
+ ],
597
+ },
598
+ ]);
599
+ return (options?.client ?? this.client).delete({
600
+ url: "/session/{sessionID}",
601
+ ...options,
602
+ ...params,
603
+ });
604
+ }
605
+ /**
606
+ * Get session
607
+ *
608
+ * Retrieve detailed information about a specific IronCode session.
609
+ */
610
+ get(parameters, options) {
611
+ const params = buildClientParams([parameters], [
612
+ {
613
+ args: [
614
+ { in: "path", key: "sessionID" },
615
+ { in: "query", key: "directory" },
616
+ ],
617
+ },
618
+ ]);
619
+ return (options?.client ?? this.client).get({
620
+ url: "/session/{sessionID}",
621
+ ...options,
622
+ ...params,
623
+ });
624
+ }
625
+ /**
626
+ * Update session
627
+ *
628
+ * Update properties of an existing session, such as title or other metadata.
629
+ */
630
+ update(parameters, options) {
631
+ const params = buildClientParams([parameters], [
632
+ {
633
+ args: [
634
+ { in: "path", key: "sessionID" },
635
+ { in: "query", key: "directory" },
636
+ { in: "body", key: "title" },
637
+ { in: "body", key: "time" },
638
+ ],
639
+ },
640
+ ]);
641
+ return (options?.client ?? this.client).patch({
642
+ url: "/session/{sessionID}",
643
+ ...options,
644
+ ...params,
645
+ headers: {
646
+ "Content-Type": "application/json",
647
+ ...options?.headers,
648
+ ...params.headers,
649
+ },
650
+ });
651
+ }
652
+ /**
653
+ * Get session children
654
+ *
655
+ * Retrieve all child sessions that were forked from the specified parent session.
656
+ */
657
+ children(parameters, options) {
658
+ const params = buildClientParams([parameters], [
659
+ {
660
+ args: [
661
+ { in: "path", key: "sessionID" },
662
+ { in: "query", key: "directory" },
663
+ ],
664
+ },
665
+ ]);
666
+ return (options?.client ?? this.client).get({
667
+ url: "/session/{sessionID}/children",
668
+ ...options,
669
+ ...params,
670
+ });
671
+ }
672
+ /**
673
+ * Get session todos
674
+ *
675
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
676
+ */
677
+ todo(parameters, options) {
678
+ const params = buildClientParams([parameters], [
679
+ {
680
+ args: [
681
+ { in: "path", key: "sessionID" },
682
+ { in: "query", key: "directory" },
683
+ ],
684
+ },
685
+ ]);
686
+ return (options?.client ?? this.client).get({
687
+ url: "/session/{sessionID}/todo",
688
+ ...options,
689
+ ...params,
690
+ });
691
+ }
692
+ /**
693
+ * Initialize session
694
+ *
695
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
696
+ */
697
+ init(parameters, options) {
698
+ const params = buildClientParams([parameters], [
699
+ {
700
+ args: [
701
+ { in: "path", key: "sessionID" },
702
+ { in: "query", key: "directory" },
703
+ { in: "body", key: "modelID" },
704
+ { in: "body", key: "providerID" },
705
+ { in: "body", key: "messageID" },
706
+ ],
707
+ },
708
+ ]);
709
+ return (options?.client ?? this.client).post({
710
+ url: "/session/{sessionID}/init",
711
+ ...options,
712
+ ...params,
713
+ headers: {
714
+ "Content-Type": "application/json",
715
+ ...options?.headers,
716
+ ...params.headers,
717
+ },
718
+ });
719
+ }
720
+ /**
721
+ * Fork session
722
+ *
723
+ * Create a new session by forking an existing session at a specific message point.
724
+ */
725
+ fork(parameters, options) {
726
+ const params = buildClientParams([parameters], [
727
+ {
728
+ args: [
729
+ { in: "path", key: "sessionID" },
730
+ { in: "query", key: "directory" },
731
+ { in: "body", key: "messageID" },
732
+ ],
733
+ },
734
+ ]);
735
+ return (options?.client ?? this.client).post({
736
+ url: "/session/{sessionID}/fork",
737
+ ...options,
738
+ ...params,
739
+ headers: {
740
+ "Content-Type": "application/json",
741
+ ...options?.headers,
742
+ ...params.headers,
743
+ },
744
+ });
745
+ }
746
+ /**
747
+ * Abort session
748
+ *
749
+ * Abort an active session and stop any ongoing AI processing or command execution.
750
+ */
751
+ abort(parameters, options) {
752
+ const params = buildClientParams([parameters], [
753
+ {
754
+ args: [
755
+ { in: "path", key: "sessionID" },
756
+ { in: "query", key: "directory" },
757
+ ],
758
+ },
759
+ ]);
760
+ return (options?.client ?? this.client).post({
761
+ url: "/session/{sessionID}/abort",
762
+ ...options,
763
+ ...params,
764
+ });
765
+ }
766
+ /**
767
+ * Unshare session
768
+ *
769
+ * Remove the shareable link for a session, making it private again.
770
+ */
771
+ unshare(parameters, options) {
772
+ const params = buildClientParams([parameters], [
773
+ {
774
+ args: [
775
+ { in: "path", key: "sessionID" },
776
+ { in: "query", key: "directory" },
777
+ ],
778
+ },
779
+ ]);
780
+ return (options?.client ?? this.client).delete({
781
+ url: "/session/{sessionID}/share",
782
+ ...options,
783
+ ...params,
784
+ });
785
+ }
786
+ /**
787
+ * Share session
788
+ *
789
+ * Create a shareable link for a session, allowing others to view the conversation.
790
+ */
791
+ share(parameters, options) {
792
+ const params = buildClientParams([parameters], [
793
+ {
794
+ args: [
795
+ { in: "path", key: "sessionID" },
796
+ { in: "query", key: "directory" },
797
+ ],
798
+ },
799
+ ]);
800
+ return (options?.client ?? this.client).post({
801
+ url: "/session/{sessionID}/share",
802
+ ...options,
803
+ ...params,
804
+ });
805
+ }
806
+ /**
807
+ * Get message diff
808
+ *
809
+ * Get the file changes (diff) that resulted from a specific user message in the session.
810
+ */
811
+ diff(parameters, options) {
812
+ const params = buildClientParams([parameters], [
813
+ {
814
+ args: [
815
+ { in: "path", key: "sessionID" },
816
+ { in: "query", key: "directory" },
817
+ { in: "query", key: "messageID" },
818
+ ],
819
+ },
820
+ ]);
821
+ return (options?.client ?? this.client).get({
822
+ url: "/session/{sessionID}/diff",
823
+ ...options,
824
+ ...params,
825
+ });
826
+ }
827
+ /**
828
+ * Summarize session
829
+ *
830
+ * Generate a concise summary of the session using AI compaction to preserve key information.
831
+ */
832
+ summarize(parameters, options) {
833
+ const params = buildClientParams([parameters], [
834
+ {
835
+ args: [
836
+ { in: "path", key: "sessionID" },
837
+ { in: "query", key: "directory" },
838
+ { in: "body", key: "providerID" },
839
+ { in: "body", key: "modelID" },
840
+ { in: "body", key: "auto" },
841
+ ],
842
+ },
843
+ ]);
844
+ return (options?.client ?? this.client).post({
845
+ url: "/session/{sessionID}/summarize",
846
+ ...options,
847
+ ...params,
848
+ headers: {
849
+ "Content-Type": "application/json",
850
+ ...options?.headers,
851
+ ...params.headers,
852
+ },
853
+ });
854
+ }
855
+ /**
856
+ * Get session messages
857
+ *
858
+ * Retrieve all messages in a session, including user prompts and AI responses.
859
+ */
860
+ messages(parameters, options) {
861
+ const params = buildClientParams([parameters], [
862
+ {
863
+ args: [
864
+ { in: "path", key: "sessionID" },
865
+ { in: "query", key: "directory" },
866
+ { in: "query", key: "limit" },
867
+ ],
868
+ },
869
+ ]);
870
+ return (options?.client ?? this.client).get({
871
+ url: "/session/{sessionID}/message",
872
+ ...options,
873
+ ...params,
874
+ });
875
+ }
876
+ /**
877
+ * Send message
878
+ *
879
+ * Create and send a new message to a session, streaming the AI response.
880
+ */
881
+ prompt(parameters, options) {
882
+ const params = buildClientParams([parameters], [
883
+ {
884
+ args: [
885
+ { in: "path", key: "sessionID" },
886
+ { in: "query", key: "directory" },
887
+ { in: "body", key: "messageID" },
888
+ { in: "body", key: "model" },
889
+ { in: "body", key: "agent" },
890
+ { in: "body", key: "noReply" },
891
+ { in: "body", key: "tools" },
892
+ { in: "body", key: "system" },
893
+ { in: "body", key: "variant" },
894
+ { in: "body", key: "parts" },
895
+ ],
896
+ },
897
+ ]);
898
+ return (options?.client ?? this.client).post({
899
+ url: "/session/{sessionID}/message",
900
+ ...options,
901
+ ...params,
902
+ headers: {
903
+ "Content-Type": "application/json",
904
+ ...options?.headers,
905
+ ...params.headers,
906
+ },
907
+ });
908
+ }
909
+ /**
910
+ * Get message
911
+ *
912
+ * Retrieve a specific message from a session by its message ID.
913
+ */
914
+ message(parameters, options) {
915
+ const params = buildClientParams([parameters], [
916
+ {
917
+ args: [
918
+ { in: "path", key: "sessionID" },
919
+ { in: "path", key: "messageID" },
920
+ { in: "query", key: "directory" },
921
+ ],
922
+ },
923
+ ]);
924
+ return (options?.client ?? this.client).get({
925
+ url: "/session/{sessionID}/message/{messageID}",
926
+ ...options,
927
+ ...params,
928
+ });
929
+ }
930
+ /**
931
+ * Send async message
932
+ *
933
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
934
+ */
935
+ promptAsync(parameters, options) {
936
+ const params = buildClientParams([parameters], [
937
+ {
938
+ args: [
939
+ { in: "path", key: "sessionID" },
940
+ { in: "query", key: "directory" },
941
+ { in: "body", key: "messageID" },
942
+ { in: "body", key: "model" },
943
+ { in: "body", key: "agent" },
944
+ { in: "body", key: "noReply" },
945
+ { in: "body", key: "tools" },
946
+ { in: "body", key: "system" },
947
+ { in: "body", key: "variant" },
948
+ { in: "body", key: "parts" },
949
+ ],
950
+ },
951
+ ]);
952
+ return (options?.client ?? this.client).post({
953
+ url: "/session/{sessionID}/prompt_async",
954
+ ...options,
955
+ ...params,
956
+ headers: {
957
+ "Content-Type": "application/json",
958
+ ...options?.headers,
959
+ ...params.headers,
960
+ },
961
+ });
962
+ }
963
+ /**
964
+ * Send command
965
+ *
966
+ * Send a new command to a session for execution by the AI assistant.
967
+ */
968
+ command(parameters, options) {
969
+ const params = buildClientParams([parameters], [
970
+ {
971
+ args: [
972
+ { in: "path", key: "sessionID" },
973
+ { in: "query", key: "directory" },
974
+ { in: "body", key: "messageID" },
975
+ { in: "body", key: "agent" },
976
+ { in: "body", key: "model" },
977
+ { in: "body", key: "arguments" },
978
+ { in: "body", key: "command" },
979
+ { in: "body", key: "variant" },
980
+ { in: "body", key: "parts" },
981
+ ],
982
+ },
983
+ ]);
984
+ return (options?.client ?? this.client).post({
985
+ url: "/session/{sessionID}/command",
986
+ ...options,
987
+ ...params,
988
+ headers: {
989
+ "Content-Type": "application/json",
990
+ ...options?.headers,
991
+ ...params.headers,
992
+ },
993
+ });
994
+ }
995
+ /**
996
+ * Run shell command
997
+ *
998
+ * Execute a shell command within the session context and return the AI's response.
999
+ */
1000
+ shell(parameters, options) {
1001
+ const params = buildClientParams([parameters], [
1002
+ {
1003
+ args: [
1004
+ { in: "path", key: "sessionID" },
1005
+ { in: "query", key: "directory" },
1006
+ { in: "body", key: "agent" },
1007
+ { in: "body", key: "model" },
1008
+ { in: "body", key: "command" },
1009
+ ],
1010
+ },
1011
+ ]);
1012
+ return (options?.client ?? this.client).post({
1013
+ url: "/session/{sessionID}/shell",
1014
+ ...options,
1015
+ ...params,
1016
+ headers: {
1017
+ "Content-Type": "application/json",
1018
+ ...options?.headers,
1019
+ ...params.headers,
1020
+ },
1021
+ });
1022
+ }
1023
+ /**
1024
+ * Revert message
1025
+ *
1026
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
1027
+ */
1028
+ revert(parameters, options) {
1029
+ const params = buildClientParams([parameters], [
1030
+ {
1031
+ args: [
1032
+ { in: "path", key: "sessionID" },
1033
+ { in: "query", key: "directory" },
1034
+ { in: "body", key: "messageID" },
1035
+ { in: "body", key: "partID" },
1036
+ ],
1037
+ },
1038
+ ]);
1039
+ return (options?.client ?? this.client).post({
1040
+ url: "/session/{sessionID}/revert",
1041
+ ...options,
1042
+ ...params,
1043
+ headers: {
1044
+ "Content-Type": "application/json",
1045
+ ...options?.headers,
1046
+ ...params.headers,
1047
+ },
1048
+ });
1049
+ }
1050
+ /**
1051
+ * Restore reverted messages
1052
+ *
1053
+ * Restore all previously reverted messages in a session.
1054
+ */
1055
+ unrevert(parameters, options) {
1056
+ const params = buildClientParams([parameters], [
1057
+ {
1058
+ args: [
1059
+ { in: "path", key: "sessionID" },
1060
+ { in: "query", key: "directory" },
1061
+ ],
1062
+ },
1063
+ ]);
1064
+ return (options?.client ?? this.client).post({
1065
+ url: "/session/{sessionID}/unrevert",
1066
+ ...options,
1067
+ ...params,
1068
+ });
1069
+ }
1070
+ }
1071
+ export class Part extends HeyApiClient {
1072
+ /**
1073
+ * Delete a part from a message
1074
+ */
1075
+ delete(parameters, options) {
1076
+ const params = buildClientParams([parameters], [
1077
+ {
1078
+ args: [
1079
+ { in: "path", key: "sessionID" },
1080
+ { in: "path", key: "messageID" },
1081
+ { in: "path", key: "partID" },
1082
+ { in: "query", key: "directory" },
1083
+ ],
1084
+ },
1085
+ ]);
1086
+ return (options?.client ?? this.client).delete({
1087
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
1088
+ ...options,
1089
+ ...params,
1090
+ });
1091
+ }
1092
+ /**
1093
+ * Update a part in a message
1094
+ */
1095
+ update(parameters, options) {
1096
+ const params = buildClientParams([parameters], [
1097
+ {
1098
+ args: [
1099
+ { in: "path", key: "sessionID" },
1100
+ { in: "path", key: "messageID" },
1101
+ { in: "path", key: "partID" },
1102
+ { in: "query", key: "directory" },
1103
+ { key: "part", map: "body" },
1104
+ ],
1105
+ },
1106
+ ]);
1107
+ return (options?.client ?? this.client).patch({
1108
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
1109
+ ...options,
1110
+ ...params,
1111
+ headers: {
1112
+ "Content-Type": "application/json",
1113
+ ...options?.headers,
1114
+ ...params.headers,
1115
+ },
1116
+ });
1117
+ }
1118
+ }
1119
+ export class Permission extends HeyApiClient {
1120
+ /**
1121
+ * Respond to permission
1122
+ *
1123
+ * Approve or deny a permission request from the AI assistant.
1124
+ *
1125
+ * @deprecated
1126
+ */
1127
+ respond(parameters, options) {
1128
+ const params = buildClientParams([parameters], [
1129
+ {
1130
+ args: [
1131
+ { in: "path", key: "sessionID" },
1132
+ { in: "path", key: "permissionID" },
1133
+ { in: "query", key: "directory" },
1134
+ { in: "body", key: "response" },
1135
+ ],
1136
+ },
1137
+ ]);
1138
+ return (options?.client ?? this.client).post({
1139
+ url: "/session/{sessionID}/permissions/{permissionID}",
1140
+ ...options,
1141
+ ...params,
1142
+ headers: {
1143
+ "Content-Type": "application/json",
1144
+ ...options?.headers,
1145
+ ...params.headers,
1146
+ },
1147
+ });
1148
+ }
1149
+ /**
1150
+ * Respond to permission request
1151
+ *
1152
+ * Approve or deny a permission request from the AI assistant.
1153
+ */
1154
+ reply(parameters, options) {
1155
+ const params = buildClientParams([parameters], [
1156
+ {
1157
+ args: [
1158
+ { in: "path", key: "requestID" },
1159
+ { in: "query", key: "directory" },
1160
+ { in: "body", key: "reply" },
1161
+ { in: "body", key: "message" },
1162
+ ],
1163
+ },
1164
+ ]);
1165
+ return (options?.client ?? this.client).post({
1166
+ url: "/permission/{requestID}/reply",
1167
+ ...options,
1168
+ ...params,
1169
+ headers: {
1170
+ "Content-Type": "application/json",
1171
+ ...options?.headers,
1172
+ ...params.headers,
1173
+ },
1174
+ });
1175
+ }
1176
+ /**
1177
+ * List pending permissions
1178
+ *
1179
+ * Get all pending permission requests across all sessions.
1180
+ */
1181
+ list(parameters, options) {
1182
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1183
+ return (options?.client ?? this.client).get({
1184
+ url: "/permission",
1185
+ ...options,
1186
+ ...params,
1187
+ });
1188
+ }
1189
+ }
1190
+ export class Question extends HeyApiClient {
1191
+ /**
1192
+ * List pending questions
1193
+ *
1194
+ * Get all pending question requests across all sessions.
1195
+ */
1196
+ list(parameters, options) {
1197
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1198
+ return (options?.client ?? this.client).get({
1199
+ url: "/question",
1200
+ ...options,
1201
+ ...params,
1202
+ });
1203
+ }
1204
+ /**
1205
+ * Reply to question request
1206
+ *
1207
+ * Provide answers to a question request from the AI assistant.
1208
+ */
1209
+ reply(parameters, options) {
1210
+ const params = buildClientParams([parameters], [
1211
+ {
1212
+ args: [
1213
+ { in: "path", key: "requestID" },
1214
+ { in: "query", key: "directory" },
1215
+ { in: "body", key: "answers" },
1216
+ ],
1217
+ },
1218
+ ]);
1219
+ return (options?.client ?? this.client).post({
1220
+ url: "/question/{requestID}/reply",
1221
+ ...options,
1222
+ ...params,
1223
+ headers: {
1224
+ "Content-Type": "application/json",
1225
+ ...options?.headers,
1226
+ ...params.headers,
1227
+ },
1228
+ });
1229
+ }
1230
+ /**
1231
+ * Reject question request
1232
+ *
1233
+ * Reject a question request from the AI assistant.
1234
+ */
1235
+ reject(parameters, options) {
1236
+ const params = buildClientParams([parameters], [
1237
+ {
1238
+ args: [
1239
+ { in: "path", key: "requestID" },
1240
+ { in: "query", key: "directory" },
1241
+ ],
1242
+ },
1243
+ ]);
1244
+ return (options?.client ?? this.client).post({
1245
+ url: "/question/{requestID}/reject",
1246
+ ...options,
1247
+ ...params,
1248
+ });
1249
+ }
1250
+ }
1251
+ export class Oauth extends HeyApiClient {
1252
+ /**
1253
+ * OAuth authorize
1254
+ *
1255
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
1256
+ */
1257
+ authorize(parameters, options) {
1258
+ const params = buildClientParams([parameters], [
1259
+ {
1260
+ args: [
1261
+ { in: "path", key: "providerID" },
1262
+ { in: "query", key: "directory" },
1263
+ { in: "body", key: "method" },
1264
+ ],
1265
+ },
1266
+ ]);
1267
+ return (options?.client ?? this.client).post({
1268
+ url: "/provider/{providerID}/oauth/authorize",
1269
+ ...options,
1270
+ ...params,
1271
+ headers: {
1272
+ "Content-Type": "application/json",
1273
+ ...options?.headers,
1274
+ ...params.headers,
1275
+ },
1276
+ });
1277
+ }
1278
+ /**
1279
+ * OAuth callback
1280
+ *
1281
+ * Handle the OAuth callback from a provider after user authorization.
1282
+ */
1283
+ callback(parameters, options) {
1284
+ const params = buildClientParams([parameters], [
1285
+ {
1286
+ args: [
1287
+ { in: "path", key: "providerID" },
1288
+ { in: "query", key: "directory" },
1289
+ { in: "body", key: "method" },
1290
+ { in: "body", key: "code" },
1291
+ ],
1292
+ },
1293
+ ]);
1294
+ return (options?.client ?? this.client).post({
1295
+ url: "/provider/{providerID}/oauth/callback",
1296
+ ...options,
1297
+ ...params,
1298
+ headers: {
1299
+ "Content-Type": "application/json",
1300
+ ...options?.headers,
1301
+ ...params.headers,
1302
+ },
1303
+ });
1304
+ }
1305
+ }
1306
+ export class Provider extends HeyApiClient {
1307
+ /**
1308
+ * List providers
1309
+ *
1310
+ * Get a list of all available AI providers, including both available and connected ones.
1311
+ */
1312
+ list(parameters, options) {
1313
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1314
+ return (options?.client ?? this.client).get({
1315
+ url: "/provider",
1316
+ ...options,
1317
+ ...params,
1318
+ });
1319
+ }
1320
+ /**
1321
+ * Get provider auth methods
1322
+ *
1323
+ * Retrieve available authentication methods for all AI providers.
1324
+ */
1325
+ auth(parameters, options) {
1326
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1327
+ return (options?.client ?? this.client).get({
1328
+ url: "/provider/auth",
1329
+ ...options,
1330
+ ...params,
1331
+ });
1332
+ }
1333
+ _oauth;
1334
+ get oauth() {
1335
+ return (this._oauth ??= new Oauth({ client: this.client }));
1336
+ }
1337
+ }
1338
+ export class Find extends HeyApiClient {
1339
+ /**
1340
+ * Find text
1341
+ *
1342
+ * Search for text patterns across files in the project using ripgrep.
1343
+ */
1344
+ text(parameters, options) {
1345
+ const params = buildClientParams([parameters], [
1346
+ {
1347
+ args: [
1348
+ { in: "query", key: "directory" },
1349
+ { in: "query", key: "pattern" },
1350
+ ],
1351
+ },
1352
+ ]);
1353
+ return (options?.client ?? this.client).get({
1354
+ url: "/find",
1355
+ ...options,
1356
+ ...params,
1357
+ });
1358
+ }
1359
+ /**
1360
+ * Find files
1361
+ *
1362
+ * Search for files or directories by name or pattern in the project directory.
1363
+ */
1364
+ files(parameters, options) {
1365
+ const params = buildClientParams([parameters], [
1366
+ {
1367
+ args: [
1368
+ { in: "query", key: "directory" },
1369
+ { in: "query", key: "query" },
1370
+ { in: "query", key: "dirs" },
1371
+ { in: "query", key: "type" },
1372
+ { in: "query", key: "limit" },
1373
+ ],
1374
+ },
1375
+ ]);
1376
+ return (options?.client ?? this.client).get({
1377
+ url: "/find/file",
1378
+ ...options,
1379
+ ...params,
1380
+ });
1381
+ }
1382
+ /**
1383
+ * Find symbols
1384
+ *
1385
+ * Search for workspace symbols like functions, classes, and variables using LSP.
1386
+ */
1387
+ symbols(parameters, options) {
1388
+ const params = buildClientParams([parameters], [
1389
+ {
1390
+ args: [
1391
+ { in: "query", key: "directory" },
1392
+ { in: "query", key: "query" },
1393
+ ],
1394
+ },
1395
+ ]);
1396
+ return (options?.client ?? this.client).get({
1397
+ url: "/find/symbol",
1398
+ ...options,
1399
+ ...params,
1400
+ });
1401
+ }
1402
+ }
1403
+ export class File extends HeyApiClient {
1404
+ /**
1405
+ * List files
1406
+ *
1407
+ * List files and directories in a specified path.
1408
+ */
1409
+ list(parameters, options) {
1410
+ const params = buildClientParams([parameters], [
1411
+ {
1412
+ args: [
1413
+ { in: "query", key: "directory" },
1414
+ { in: "query", key: "path" },
1415
+ ],
1416
+ },
1417
+ ]);
1418
+ return (options?.client ?? this.client).get({
1419
+ url: "/file",
1420
+ ...options,
1421
+ ...params,
1422
+ });
1423
+ }
1424
+ /**
1425
+ * Read file
1426
+ *
1427
+ * Read the content of a specified file.
1428
+ */
1429
+ read(parameters, options) {
1430
+ const params = buildClientParams([parameters], [
1431
+ {
1432
+ args: [
1433
+ { in: "query", key: "directory" },
1434
+ { in: "query", key: "path" },
1435
+ ],
1436
+ },
1437
+ ]);
1438
+ return (options?.client ?? this.client).get({
1439
+ url: "/file/content",
1440
+ ...options,
1441
+ ...params,
1442
+ });
1443
+ }
1444
+ /**
1445
+ * Get file status
1446
+ *
1447
+ * Get the git status of all files in the project.
1448
+ */
1449
+ status(parameters, options) {
1450
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1451
+ return (options?.client ?? this.client).get({
1452
+ url: "/file/status",
1453
+ ...options,
1454
+ ...params,
1455
+ });
1456
+ }
1457
+ }
1458
+ export class Auth2 extends HeyApiClient {
1459
+ /**
1460
+ * Remove MCP OAuth
1461
+ *
1462
+ * Remove OAuth credentials for an MCP server
1463
+ */
1464
+ remove(parameters, options) {
1465
+ const params = buildClientParams([parameters], [
1466
+ {
1467
+ args: [
1468
+ { in: "path", key: "name" },
1469
+ { in: "query", key: "directory" },
1470
+ ],
1471
+ },
1472
+ ]);
1473
+ return (options?.client ?? this.client).delete({
1474
+ url: "/mcp/{name}/auth",
1475
+ ...options,
1476
+ ...params,
1477
+ });
1478
+ }
1479
+ /**
1480
+ * Start MCP OAuth
1481
+ *
1482
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
1483
+ */
1484
+ start(parameters, options) {
1485
+ const params = buildClientParams([parameters], [
1486
+ {
1487
+ args: [
1488
+ { in: "path", key: "name" },
1489
+ { in: "query", key: "directory" },
1490
+ ],
1491
+ },
1492
+ ]);
1493
+ return (options?.client ?? this.client).post({
1494
+ url: "/mcp/{name}/auth",
1495
+ ...options,
1496
+ ...params,
1497
+ });
1498
+ }
1499
+ /**
1500
+ * Complete MCP OAuth
1501
+ *
1502
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
1503
+ */
1504
+ callback(parameters, options) {
1505
+ const params = buildClientParams([parameters], [
1506
+ {
1507
+ args: [
1508
+ { in: "path", key: "name" },
1509
+ { in: "query", key: "directory" },
1510
+ { in: "body", key: "code" },
1511
+ ],
1512
+ },
1513
+ ]);
1514
+ return (options?.client ?? this.client).post({
1515
+ url: "/mcp/{name}/auth/callback",
1516
+ ...options,
1517
+ ...params,
1518
+ headers: {
1519
+ "Content-Type": "application/json",
1520
+ ...options?.headers,
1521
+ ...params.headers,
1522
+ },
1523
+ });
1524
+ }
1525
+ /**
1526
+ * Authenticate MCP OAuth
1527
+ *
1528
+ * Start OAuth flow and wait for callback (opens browser)
1529
+ */
1530
+ authenticate(parameters, options) {
1531
+ const params = buildClientParams([parameters], [
1532
+ {
1533
+ args: [
1534
+ { in: "path", key: "name" },
1535
+ { in: "query", key: "directory" },
1536
+ ],
1537
+ },
1538
+ ]);
1539
+ return (options?.client ?? this.client).post({
1540
+ url: "/mcp/{name}/auth/authenticate",
1541
+ ...options,
1542
+ ...params,
1543
+ });
1544
+ }
1545
+ }
1546
+ export class Mcp extends HeyApiClient {
1547
+ /**
1548
+ * Get MCP status
1549
+ *
1550
+ * Get the status of all Model Context Protocol (MCP) servers.
1551
+ */
1552
+ status(parameters, options) {
1553
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1554
+ return (options?.client ?? this.client).get({
1555
+ url: "/mcp",
1556
+ ...options,
1557
+ ...params,
1558
+ });
1559
+ }
1560
+ /**
1561
+ * Add MCP server
1562
+ *
1563
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
1564
+ */
1565
+ add(parameters, options) {
1566
+ const params = buildClientParams([parameters], [
1567
+ {
1568
+ args: [
1569
+ { in: "query", key: "directory" },
1570
+ { in: "body", key: "name" },
1571
+ { in: "body", key: "config" },
1572
+ ],
1573
+ },
1574
+ ]);
1575
+ return (options?.client ?? this.client).post({
1576
+ url: "/mcp",
1577
+ ...options,
1578
+ ...params,
1579
+ headers: {
1580
+ "Content-Type": "application/json",
1581
+ ...options?.headers,
1582
+ ...params.headers,
1583
+ },
1584
+ });
1585
+ }
1586
+ /**
1587
+ * Connect an MCP server
1588
+ */
1589
+ connect(parameters, options) {
1590
+ const params = buildClientParams([parameters], [
1591
+ {
1592
+ args: [
1593
+ { in: "path", key: "name" },
1594
+ { in: "query", key: "directory" },
1595
+ ],
1596
+ },
1597
+ ]);
1598
+ return (options?.client ?? this.client).post({
1599
+ url: "/mcp/{name}/connect",
1600
+ ...options,
1601
+ ...params,
1602
+ });
1603
+ }
1604
+ /**
1605
+ * Disconnect an MCP server
1606
+ */
1607
+ disconnect(parameters, options) {
1608
+ const params = buildClientParams([parameters], [
1609
+ {
1610
+ args: [
1611
+ { in: "path", key: "name" },
1612
+ { in: "query", key: "directory" },
1613
+ ],
1614
+ },
1615
+ ]);
1616
+ return (options?.client ?? this.client).post({
1617
+ url: "/mcp/{name}/disconnect",
1618
+ ...options,
1619
+ ...params,
1620
+ });
1621
+ }
1622
+ _auth;
1623
+ get auth() {
1624
+ return (this._auth ??= new Auth2({ client: this.client }));
1625
+ }
1626
+ }
1627
+ export class Control extends HeyApiClient {
1628
+ /**
1629
+ * Get next TUI request
1630
+ *
1631
+ * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
1632
+ */
1633
+ next(parameters, options) {
1634
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1635
+ return (options?.client ?? this.client).get({
1636
+ url: "/tui/control/next",
1637
+ ...options,
1638
+ ...params,
1639
+ });
1640
+ }
1641
+ /**
1642
+ * Submit TUI response
1643
+ *
1644
+ * Submit a response to the TUI request queue to complete a pending request.
1645
+ */
1646
+ response(parameters, options) {
1647
+ const params = buildClientParams([parameters], [
1648
+ {
1649
+ args: [
1650
+ { in: "query", key: "directory" },
1651
+ { key: "body", map: "body" },
1652
+ ],
1653
+ },
1654
+ ]);
1655
+ return (options?.client ?? this.client).post({
1656
+ url: "/tui/control/response",
1657
+ ...options,
1658
+ ...params,
1659
+ headers: {
1660
+ "Content-Type": "application/json",
1661
+ ...options?.headers,
1662
+ ...params.headers,
1663
+ },
1664
+ });
1665
+ }
1666
+ }
1667
+ export class Tui extends HeyApiClient {
1668
+ /**
1669
+ * Append TUI prompt
1670
+ *
1671
+ * Append prompt to the TUI
1672
+ */
1673
+ appendPrompt(parameters, options) {
1674
+ const params = buildClientParams([parameters], [
1675
+ {
1676
+ args: [
1677
+ { in: "query", key: "directory" },
1678
+ { in: "body", key: "text" },
1679
+ ],
1680
+ },
1681
+ ]);
1682
+ return (options?.client ?? this.client).post({
1683
+ url: "/tui/append-prompt",
1684
+ ...options,
1685
+ ...params,
1686
+ headers: {
1687
+ "Content-Type": "application/json",
1688
+ ...options?.headers,
1689
+ ...params.headers,
1690
+ },
1691
+ });
1692
+ }
1693
+ /**
1694
+ * Open help dialog
1695
+ *
1696
+ * Open the help dialog in the TUI to display user assistance information.
1697
+ */
1698
+ openHelp(parameters, options) {
1699
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1700
+ return (options?.client ?? this.client).post({
1701
+ url: "/tui/open-help",
1702
+ ...options,
1703
+ ...params,
1704
+ });
1705
+ }
1706
+ /**
1707
+ * Open sessions dialog
1708
+ *
1709
+ * Open the session dialog
1710
+ */
1711
+ openSessions(parameters, options) {
1712
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1713
+ return (options?.client ?? this.client).post({
1714
+ url: "/tui/open-sessions",
1715
+ ...options,
1716
+ ...params,
1717
+ });
1718
+ }
1719
+ /**
1720
+ * Open themes dialog
1721
+ *
1722
+ * Open the theme dialog
1723
+ */
1724
+ openThemes(parameters, options) {
1725
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1726
+ return (options?.client ?? this.client).post({
1727
+ url: "/tui/open-themes",
1728
+ ...options,
1729
+ ...params,
1730
+ });
1731
+ }
1732
+ /**
1733
+ * Open models dialog
1734
+ *
1735
+ * Open the model dialog
1736
+ */
1737
+ openModels(parameters, options) {
1738
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1739
+ return (options?.client ?? this.client).post({
1740
+ url: "/tui/open-models",
1741
+ ...options,
1742
+ ...params,
1743
+ });
1744
+ }
1745
+ /**
1746
+ * Submit TUI prompt
1747
+ *
1748
+ * Submit the prompt
1749
+ */
1750
+ submitPrompt(parameters, options) {
1751
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1752
+ return (options?.client ?? this.client).post({
1753
+ url: "/tui/submit-prompt",
1754
+ ...options,
1755
+ ...params,
1756
+ });
1757
+ }
1758
+ /**
1759
+ * Clear TUI prompt
1760
+ *
1761
+ * Clear the prompt
1762
+ */
1763
+ clearPrompt(parameters, options) {
1764
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1765
+ return (options?.client ?? this.client).post({
1766
+ url: "/tui/clear-prompt",
1767
+ ...options,
1768
+ ...params,
1769
+ });
1770
+ }
1771
+ /**
1772
+ * Execute TUI command
1773
+ *
1774
+ * Execute a TUI command (e.g. agent_cycle)
1775
+ */
1776
+ executeCommand(parameters, options) {
1777
+ const params = buildClientParams([parameters], [
1778
+ {
1779
+ args: [
1780
+ { in: "query", key: "directory" },
1781
+ { in: "body", key: "command" },
1782
+ ],
1783
+ },
1784
+ ]);
1785
+ return (options?.client ?? this.client).post({
1786
+ url: "/tui/execute-command",
1787
+ ...options,
1788
+ ...params,
1789
+ headers: {
1790
+ "Content-Type": "application/json",
1791
+ ...options?.headers,
1792
+ ...params.headers,
1793
+ },
1794
+ });
1795
+ }
1796
+ /**
1797
+ * Show TUI toast
1798
+ *
1799
+ * Show a toast notification in the TUI
1800
+ */
1801
+ showToast(parameters, options) {
1802
+ const params = buildClientParams([parameters], [
1803
+ {
1804
+ args: [
1805
+ { in: "query", key: "directory" },
1806
+ { in: "body", key: "title" },
1807
+ { in: "body", key: "message" },
1808
+ { in: "body", key: "variant" },
1809
+ { in: "body", key: "duration" },
1810
+ ],
1811
+ },
1812
+ ]);
1813
+ return (options?.client ?? this.client).post({
1814
+ url: "/tui/show-toast",
1815
+ ...options,
1816
+ ...params,
1817
+ headers: {
1818
+ "Content-Type": "application/json",
1819
+ ...options?.headers,
1820
+ ...params.headers,
1821
+ },
1822
+ });
1823
+ }
1824
+ /**
1825
+ * Publish TUI event
1826
+ *
1827
+ * Publish a TUI event
1828
+ */
1829
+ publish(parameters, options) {
1830
+ const params = buildClientParams([parameters], [
1831
+ {
1832
+ args: [
1833
+ { in: "query", key: "directory" },
1834
+ { key: "body", map: "body" },
1835
+ ],
1836
+ },
1837
+ ]);
1838
+ return (options?.client ?? this.client).post({
1839
+ url: "/tui/publish",
1840
+ ...options,
1841
+ ...params,
1842
+ headers: {
1843
+ "Content-Type": "application/json",
1844
+ ...options?.headers,
1845
+ ...params.headers,
1846
+ },
1847
+ });
1848
+ }
1849
+ /**
1850
+ * Select session
1851
+ *
1852
+ * Navigate the TUI to display the specified session.
1853
+ */
1854
+ selectSession(parameters, options) {
1855
+ const params = buildClientParams([parameters], [
1856
+ {
1857
+ args: [
1858
+ { in: "query", key: "directory" },
1859
+ { in: "body", key: "sessionID" },
1860
+ ],
1861
+ },
1862
+ ]);
1863
+ return (options?.client ?? this.client).post({
1864
+ url: "/tui/select-session",
1865
+ ...options,
1866
+ ...params,
1867
+ headers: {
1868
+ "Content-Type": "application/json",
1869
+ ...options?.headers,
1870
+ ...params.headers,
1871
+ },
1872
+ });
1873
+ }
1874
+ _control;
1875
+ get control() {
1876
+ return (this._control ??= new Control({ client: this.client }));
1877
+ }
1878
+ }
1879
+ export class Instance extends HeyApiClient {
1880
+ /**
1881
+ * Dispose instance
1882
+ *
1883
+ * Clean up and dispose the current IronCode instance, releasing all resources.
1884
+ */
1885
+ dispose(parameters, options) {
1886
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1887
+ return (options?.client ?? this.client).post({
1888
+ url: "/instance/dispose",
1889
+ ...options,
1890
+ ...params,
1891
+ });
1892
+ }
1893
+ }
1894
+ export class Path extends HeyApiClient {
1895
+ /**
1896
+ * Get paths
1897
+ *
1898
+ * Retrieve the current working directory and related path information for the IronCode instance.
1899
+ */
1900
+ get(parameters, options) {
1901
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1902
+ return (options?.client ?? this.client).get({
1903
+ url: "/path",
1904
+ ...options,
1905
+ ...params,
1906
+ });
1907
+ }
1908
+ }
1909
+ export class Vcs extends HeyApiClient {
1910
+ /**
1911
+ * Get VCS info
1912
+ *
1913
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
1914
+ */
1915
+ get(parameters, options) {
1916
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1917
+ return (options?.client ?? this.client).get({
1918
+ url: "/vcs",
1919
+ ...options,
1920
+ ...params,
1921
+ });
1922
+ }
1923
+ }
1924
+ export class Command extends HeyApiClient {
1925
+ /**
1926
+ * List commands
1927
+ *
1928
+ * Get a list of all available commands in the IronCode system.
1929
+ */
1930
+ list(parameters, options) {
1931
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1932
+ return (options?.client ?? this.client).get({
1933
+ url: "/command",
1934
+ ...options,
1935
+ ...params,
1936
+ });
1937
+ }
1938
+ }
1939
+ export class App extends HeyApiClient {
1940
+ /**
1941
+ * Write log
1942
+ *
1943
+ * Write a log entry to the server logs with specified level and metadata.
1944
+ */
1945
+ log(parameters, options) {
1946
+ const params = buildClientParams([parameters], [
1947
+ {
1948
+ args: [
1949
+ { in: "query", key: "directory" },
1950
+ { in: "body", key: "service" },
1951
+ { in: "body", key: "level" },
1952
+ { in: "body", key: "message" },
1953
+ { in: "body", key: "extra" },
1954
+ ],
1955
+ },
1956
+ ]);
1957
+ return (options?.client ?? this.client).post({
1958
+ url: "/log",
1959
+ ...options,
1960
+ ...params,
1961
+ headers: {
1962
+ "Content-Type": "application/json",
1963
+ ...options?.headers,
1964
+ ...params.headers,
1965
+ },
1966
+ });
1967
+ }
1968
+ /**
1969
+ * List agents
1970
+ *
1971
+ * Get a list of all available AI agents in the IronCode system.
1972
+ */
1973
+ agents(parameters, options) {
1974
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1975
+ return (options?.client ?? this.client).get({
1976
+ url: "/agent",
1977
+ ...options,
1978
+ ...params,
1979
+ });
1980
+ }
1981
+ /**
1982
+ * List skills
1983
+ *
1984
+ * Get a list of all available skills in the IronCode system.
1985
+ */
1986
+ skills(parameters, options) {
1987
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1988
+ return (options?.client ?? this.client).get({
1989
+ url: "/skill",
1990
+ ...options,
1991
+ ...params,
1992
+ });
1993
+ }
1994
+ }
1995
+ export class Lsp extends HeyApiClient {
1996
+ /**
1997
+ * Get LSP status
1998
+ *
1999
+ * Get LSP server status
2000
+ */
2001
+ status(parameters, options) {
2002
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2003
+ return (options?.client ?? this.client).get({
2004
+ url: "/lsp",
2005
+ ...options,
2006
+ ...params,
2007
+ });
2008
+ }
2009
+ }
2010
+ export class Formatter extends HeyApiClient {
2011
+ /**
2012
+ * Get formatter status
2013
+ *
2014
+ * Get formatter status
2015
+ */
2016
+ status(parameters, options) {
2017
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2018
+ return (options?.client ?? this.client).get({
2019
+ url: "/formatter",
2020
+ ...options,
2021
+ ...params,
2022
+ });
2023
+ }
2024
+ }
2025
+ export class Event extends HeyApiClient {
2026
+ /**
2027
+ * Subscribe to events
2028
+ *
2029
+ * Get events
2030
+ */
2031
+ subscribe(parameters, options) {
2032
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2033
+ return (options?.client ?? this.client).sse.get({
2034
+ url: "/event",
2035
+ ...options,
2036
+ ...params,
2037
+ });
2038
+ }
2039
+ }
2040
+ export class IroncodeClient extends HeyApiClient {
2041
+ static __registry = new HeyApiRegistry();
2042
+ constructor(args) {
2043
+ super(args);
2044
+ IroncodeClient.__registry.set(this, args?.key);
2045
+ }
2046
+ _global;
2047
+ get global() {
2048
+ return (this._global ??= new Global({ client: this.client }));
2049
+ }
2050
+ _auth;
2051
+ get auth() {
2052
+ return (this._auth ??= new Auth({ client: this.client }));
2053
+ }
2054
+ _project;
2055
+ get project() {
2056
+ return (this._project ??= new Project({ client: this.client }));
2057
+ }
2058
+ _pty;
2059
+ get pty() {
2060
+ return (this._pty ??= new Pty({ client: this.client }));
2061
+ }
2062
+ _config;
2063
+ get config() {
2064
+ return (this._config ??= new Config2({ client: this.client }));
2065
+ }
2066
+ _tool;
2067
+ get tool() {
2068
+ return (this._tool ??= new Tool({ client: this.client }));
2069
+ }
2070
+ _worktree;
2071
+ get worktree() {
2072
+ return (this._worktree ??= new Worktree({ client: this.client }));
2073
+ }
2074
+ _experimental;
2075
+ get experimental() {
2076
+ return (this._experimental ??= new Experimental({ client: this.client }));
2077
+ }
2078
+ _session;
2079
+ get session() {
2080
+ return (this._session ??= new Session({ client: this.client }));
2081
+ }
2082
+ _part;
2083
+ get part() {
2084
+ return (this._part ??= new Part({ client: this.client }));
2085
+ }
2086
+ _permission;
2087
+ get permission() {
2088
+ return (this._permission ??= new Permission({ client: this.client }));
2089
+ }
2090
+ _question;
2091
+ get question() {
2092
+ return (this._question ??= new Question({ client: this.client }));
2093
+ }
2094
+ _provider;
2095
+ get provider() {
2096
+ return (this._provider ??= new Provider({ client: this.client }));
2097
+ }
2098
+ _find;
2099
+ get find() {
2100
+ return (this._find ??= new Find({ client: this.client }));
2101
+ }
2102
+ _file;
2103
+ get file() {
2104
+ return (this._file ??= new File({ client: this.client }));
2105
+ }
2106
+ _mcp;
2107
+ get mcp() {
2108
+ return (this._mcp ??= new Mcp({ client: this.client }));
2109
+ }
2110
+ _tui;
2111
+ get tui() {
2112
+ return (this._tui ??= new Tui({ client: this.client }));
2113
+ }
2114
+ _instance;
2115
+ get instance() {
2116
+ return (this._instance ??= new Instance({ client: this.client }));
2117
+ }
2118
+ _path;
2119
+ get path() {
2120
+ return (this._path ??= new Path({ client: this.client }));
2121
+ }
2122
+ _vcs;
2123
+ get vcs() {
2124
+ return (this._vcs ??= new Vcs({ client: this.client }));
2125
+ }
2126
+ _command;
2127
+ get command() {
2128
+ return (this._command ??= new Command({ client: this.client }));
2129
+ }
2130
+ _app;
2131
+ get app() {
2132
+ return (this._app ??= new App({ client: this.client }));
2133
+ }
2134
+ _lsp;
2135
+ get lsp() {
2136
+ return (this._lsp ??= new Lsp({ client: this.client }));
2137
+ }
2138
+ _formatter;
2139
+ get formatter() {
2140
+ return (this._formatter ??= new Formatter({ client: this.client }));
2141
+ }
2142
+ _event;
2143
+ get event() {
2144
+ return (this._event ??= new Event({ client: this.client }));
2145
+ }
2146
+ }