@ericsanchezok/synergy-sdk 0.0.3 → 1.0.0

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