@jonsoc/sdk 1.1.34 → 1.1.49

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