@ericsanchezok/synergy-sdk 0.0.0-dev-202601171118

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