@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,881 +1,3810 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { client as _heyApiClient } from "./client.gen.js";
3
- class _HeyApiClient {
4
- _client = _heyApiClient;
2
+ import { client } from "./client.gen.js";
3
+ import { buildClientParams, formDataBodySerializer, } from "./client/index.js";
4
+ class HeyApiClient {
5
+ client;
5
6
  constructor(args) {
6
- if (args?.client) {
7
- this._client = args.client;
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.`);
8
17
  }
18
+ return instance;
19
+ }
20
+ set(value, key) {
21
+ this.instances.set(key ?? this.defaultKey, value);
9
22
  }
10
23
  }
11
- class Global extends _HeyApiClient {
24
+ export class Agenda extends HeyApiClient {
12
25
  /**
13
- * Get events
26
+ * List all agenda items across scopes
27
+ *
28
+ * List all agenda items from every scope, sorted by creation time descending.
29
+ */
30
+ list(options) {
31
+ return (options?.client ?? this.client).get({
32
+ url: "/global/agenda",
33
+ ...options,
34
+ });
35
+ }
36
+ /**
37
+ * List sessions for agenda item
38
+ *
39
+ * List all sessions triggered by a specific agenda item.
40
+ */
41
+ sessions(parameters, options) {
42
+ const params = buildClientParams([parameters], [
43
+ {
44
+ args: [
45
+ { in: "path", key: "id" },
46
+ { in: "query", key: "directory" },
47
+ ],
48
+ },
49
+ ]);
50
+ return (options?.client ?? this.client).get({
51
+ url: "/agenda/{id}/sessions",
52
+ ...options,
53
+ ...params,
54
+ });
55
+ }
56
+ /**
57
+ * List runs for agenda item
58
+ *
59
+ * List the execution history for a specific agenda item.
60
+ */
61
+ runs(parameters, options) {
62
+ const params = buildClientParams([parameters], [
63
+ {
64
+ args: [
65
+ { in: "path", key: "id" },
66
+ { in: "query", key: "directory" },
67
+ ],
68
+ },
69
+ ]);
70
+ return (options?.client ?? this.client).get({
71
+ url: "/agenda/{id}/runs",
72
+ ...options,
73
+ ...params,
74
+ });
75
+ }
76
+ /**
77
+ * Trigger agenda item
78
+ *
79
+ * Manually trigger an agenda item for immediate execution.
80
+ */
81
+ trigger(parameters, options) {
82
+ const params = buildClientParams([parameters], [
83
+ {
84
+ args: [
85
+ { in: "path", key: "id" },
86
+ { in: "query", key: "directory" },
87
+ ],
88
+ },
89
+ ]);
90
+ return (options?.client ?? this.client).post({
91
+ url: "/agenda/{id}/trigger",
92
+ ...options,
93
+ ...params,
94
+ });
95
+ }
96
+ /**
97
+ * Activate agenda item
98
+ *
99
+ * Resume or activate a paused or pending agenda item.
100
+ */
101
+ activate(parameters, options) {
102
+ const params = buildClientParams([parameters], [
103
+ {
104
+ args: [
105
+ { in: "path", key: "id" },
106
+ { in: "query", key: "directory" },
107
+ ],
108
+ },
109
+ ]);
110
+ return (options?.client ?? this.client).post({
111
+ url: "/agenda/{id}/activate",
112
+ ...options,
113
+ ...params,
114
+ });
115
+ }
116
+ /**
117
+ * Pause agenda item
118
+ *
119
+ * Pause an active agenda item, suspending its triggers.
120
+ */
121
+ pause(parameters, options) {
122
+ const params = buildClientParams([parameters], [
123
+ {
124
+ args: [
125
+ { in: "path", key: "id" },
126
+ { in: "query", key: "directory" },
127
+ ],
128
+ },
129
+ ]);
130
+ return (options?.client ?? this.client).post({
131
+ url: "/agenda/{id}/pause",
132
+ ...options,
133
+ ...params,
134
+ });
135
+ }
136
+ /**
137
+ * Complete agenda item
138
+ *
139
+ * Mark an agenda item as done.
140
+ */
141
+ complete(parameters, options) {
142
+ const params = buildClientParams([parameters], [
143
+ {
144
+ args: [
145
+ { in: "path", key: "id" },
146
+ { in: "query", key: "directory" },
147
+ ],
148
+ },
149
+ ]);
150
+ return (options?.client ?? this.client).post({
151
+ url: "/agenda/{id}/complete",
152
+ ...options,
153
+ ...params,
154
+ });
155
+ }
156
+ /**
157
+ * Cancel agenda item
158
+ *
159
+ * Cancel an agenda item, stopping all triggers and future executions.
160
+ */
161
+ cancel(parameters, options) {
162
+ const params = buildClientParams([parameters], [
163
+ {
164
+ args: [
165
+ { in: "path", key: "id" },
166
+ { in: "query", key: "directory" },
167
+ ],
168
+ },
169
+ ]);
170
+ return (options?.client ?? this.client).post({
171
+ url: "/agenda/{id}/cancel",
172
+ ...options,
173
+ ...params,
174
+ });
175
+ }
176
+ /**
177
+ * Delete agenda item
178
+ *
179
+ * Delete an agenda item and all its run history permanently.
180
+ */
181
+ remove(parameters, options) {
182
+ const params = buildClientParams([parameters], [
183
+ {
184
+ args: [
185
+ { in: "path", key: "id" },
186
+ { in: "query", key: "directory" },
187
+ ],
188
+ },
189
+ ]);
190
+ return (options?.client ?? this.client).delete({
191
+ url: "/agenda/{id}",
192
+ ...options,
193
+ ...params,
194
+ });
195
+ }
196
+ /**
197
+ * Get agenda item
198
+ *
199
+ * Get a specific agenda item by ID.
200
+ */
201
+ get(parameters, options) {
202
+ const params = buildClientParams([parameters], [
203
+ {
204
+ args: [
205
+ { in: "path", key: "id" },
206
+ { in: "query", key: "directory" },
207
+ ],
208
+ },
209
+ ]);
210
+ return (options?.client ?? this.client).get({
211
+ url: "/agenda/{id}",
212
+ ...options,
213
+ ...params,
214
+ });
215
+ }
216
+ /**
217
+ * Update agenda item
218
+ *
219
+ * Update fields of an existing agenda item.
220
+ */
221
+ update(parameters, options) {
222
+ const params = buildClientParams([parameters], [
223
+ {
224
+ args: [
225
+ { in: "path", key: "id" },
226
+ { in: "query", key: "directory" },
227
+ { key: "agendaPatchInput", map: "body" },
228
+ ],
229
+ },
230
+ ]);
231
+ return (options?.client ?? this.client).patch({
232
+ url: "/agenda/{id}",
233
+ ...options,
234
+ ...params,
235
+ headers: {
236
+ "Content-Type": "application/json",
237
+ ...options?.headers,
238
+ ...params.headers,
239
+ },
240
+ });
241
+ }
242
+ /**
243
+ * Create agenda item
244
+ *
245
+ * Create a new agenda item with optional triggers, task, and delivery configuration.
246
+ */
247
+ create(parameters, options) {
248
+ const params = buildClientParams([parameters], [
249
+ {
250
+ args: [
251
+ { in: "query", key: "directory" },
252
+ { key: "agendaCreateInput", map: "body" },
253
+ ],
254
+ },
255
+ ]);
256
+ return (options?.client ?? this.client).post({
257
+ url: "/agenda",
258
+ ...options,
259
+ ...params,
260
+ headers: {
261
+ "Content-Type": "application/json",
262
+ ...options?.headers,
263
+ ...params.headers,
264
+ },
265
+ });
266
+ }
267
+ }
268
+ export class Global extends HeyApiClient {
269
+ /**
270
+ * Get health
271
+ *
272
+ * Get health information about the Synergy server.
273
+ */
274
+ health(options) {
275
+ return (options?.client ?? this.client).get({
276
+ url: "/global/health",
277
+ ...options,
278
+ });
279
+ }
280
+ /**
281
+ * Get global events
282
+ *
283
+ * Subscribe to global events from the Synergy system using server-sent events.
14
284
  */
15
285
  event(options) {
16
- return (options?.client ?? this._client).get.sse({
286
+ return (options?.client ?? this.client).sse.get({
17
287
  url: "/global/event",
18
288
  ...options,
19
289
  });
20
290
  }
291
+ /**
292
+ * Dispose instance
293
+ *
294
+ * Clean up and dispose all Synergy instances, releasing all resources.
295
+ */
296
+ dispose(options) {
297
+ return (options?.client ?? this.client).post({
298
+ url: "/global/dispose",
299
+ ...options,
300
+ });
301
+ }
302
+ agenda = new Agenda({ client: this.client });
303
+ }
304
+ export class Credentials extends HeyApiClient {
305
+ /**
306
+ * Check local credential status
307
+ *
308
+ * Check whether local Holos credentials exist without verifying them against the remote API. Returns existence, agent ID, and a masked secret.
309
+ */
310
+ status(parameters, options) {
311
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
312
+ return (options?.client ?? this.client).get({
313
+ url: "/holos/credentials/status",
314
+ ...options,
315
+ ...params,
316
+ });
317
+ }
318
+ }
319
+ export class Profile extends HeyApiClient {
320
+ /**
321
+ * Get profile
322
+ *
323
+ * Retrieve the current agent profile.
324
+ */
325
+ get(parameters, options) {
326
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
327
+ return (options?.client ?? this.client).get({
328
+ url: "/holos/profile",
329
+ ...options,
330
+ ...params,
331
+ });
332
+ }
333
+ /**
334
+ * Update profile
335
+ *
336
+ * Update the current agent profile.
337
+ */
338
+ update(parameters, options) {
339
+ const params = buildClientParams([parameters], [
340
+ {
341
+ args: [
342
+ { in: "query", key: "directory" },
343
+ { in: "body", key: "name" },
344
+ { in: "body", key: "bio" },
345
+ { in: "body", key: "avatar" },
346
+ ],
347
+ },
348
+ ]);
349
+ return (options?.client ?? this.client).put({
350
+ url: "/holos/profile",
351
+ ...options,
352
+ ...params,
353
+ headers: {
354
+ "Content-Type": "application/json",
355
+ ...options?.headers,
356
+ ...params.headers,
357
+ },
358
+ });
359
+ }
360
+ /**
361
+ * Reset profile initialization
362
+ *
363
+ * Set the profile initialized flag to false, allowing the user to re-run the onboarding setup flow.
364
+ */
365
+ reset(parameters, options) {
366
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
367
+ return (options?.client ?? this.client).post({
368
+ url: "/holos/profile/reset",
369
+ ...options,
370
+ ...params,
371
+ });
372
+ }
373
+ /**
374
+ * Upload profile avatar
375
+ *
376
+ * Upload an image as the profile avatar. Saves the image as an asset and updates the profile.
377
+ */
378
+ avatar(parameters, options) {
379
+ const params = buildClientParams([parameters], [
380
+ {
381
+ args: [
382
+ { in: "query", key: "directory" },
383
+ { in: "body", key: "file" },
384
+ ],
385
+ },
386
+ ]);
387
+ return (options?.client ?? this.client).post({
388
+ ...formDataBodySerializer,
389
+ url: "/holos/profile/avatar",
390
+ ...options,
391
+ ...params,
392
+ headers: {
393
+ "Content-Type": null,
394
+ ...options?.headers,
395
+ ...params.headers,
396
+ },
397
+ });
398
+ }
399
+ }
400
+ export class Contact extends HeyApiClient {
401
+ /**
402
+ * List contacts
403
+ *
404
+ * List all contacts.
405
+ */
406
+ list(parameters, options) {
407
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
408
+ return (options?.client ?? this.client).get({
409
+ url: "/holos/contact",
410
+ ...options,
411
+ ...params,
412
+ });
413
+ }
414
+ /**
415
+ * Add contact
416
+ *
417
+ * Add a new contact.
418
+ */
419
+ add(parameters, options) {
420
+ const params = buildClientParams([parameters], [
421
+ {
422
+ args: [
423
+ { in: "query", key: "directory" },
424
+ { in: "body", key: "id" },
425
+ { in: "body", key: "holosId" },
426
+ { in: "body", key: "name" },
427
+ { in: "body", key: "bio" },
428
+ ],
429
+ },
430
+ ]);
431
+ return (options?.client ?? this.client).post({
432
+ url: "/holos/contact",
433
+ ...options,
434
+ ...params,
435
+ headers: {
436
+ "Content-Type": "application/json",
437
+ ...options?.headers,
438
+ ...params.headers,
439
+ },
440
+ });
441
+ }
442
+ /**
443
+ * Remove contact
444
+ *
445
+ * Remove a contact and notify the peer via WebSocket.
446
+ */
447
+ remove(parameters, options) {
448
+ const params = buildClientParams([parameters], [
449
+ {
450
+ args: [
451
+ { in: "path", key: "id" },
452
+ { in: "query", key: "directory" },
453
+ ],
454
+ },
455
+ ]);
456
+ return (options?.client ?? this.client).delete({
457
+ url: "/holos/contact/{id}",
458
+ ...options,
459
+ ...params,
460
+ });
461
+ }
462
+ /**
463
+ * Get contact
464
+ *
465
+ * Get a specific contact by ID.
466
+ */
467
+ get(parameters, options) {
468
+ const params = buildClientParams([parameters], [
469
+ {
470
+ args: [
471
+ { in: "path", key: "id" },
472
+ { in: "query", key: "directory" },
473
+ ],
474
+ },
475
+ ]);
476
+ return (options?.client ?? this.client).get({
477
+ url: "/holos/contact/{id}",
478
+ ...options,
479
+ ...params,
480
+ });
481
+ }
482
+ /**
483
+ * Update contact config
484
+ *
485
+ * Update per-contact configuration (autoReply, autoInitiate, blocked).
486
+ */
487
+ updateConfig(parameters, options) {
488
+ const params = buildClientParams([parameters], [
489
+ {
490
+ args: [
491
+ { in: "path", key: "id" },
492
+ { in: "query", key: "directory" },
493
+ { in: "body", key: "autoReply" },
494
+ { in: "body", key: "autoInitiate" },
495
+ { in: "body", key: "blocked" },
496
+ { in: "body", key: "maxAutoTurns" },
497
+ ],
498
+ },
499
+ ]);
500
+ return (options?.client ?? this.client).put({
501
+ url: "/holos/contact/{id}/config",
502
+ ...options,
503
+ ...params,
504
+ headers: {
505
+ "Content-Type": "application/json",
506
+ ...options?.headers,
507
+ ...params.headers,
508
+ },
509
+ });
510
+ }
511
+ /**
512
+ * Get or create session for contact
513
+ *
514
+ * Returns the friend session for a contact, creating one if it doesn't exist yet.
515
+ */
516
+ session(parameters, options) {
517
+ const params = buildClientParams([parameters], [
518
+ {
519
+ args: [
520
+ { in: "path", key: "id" },
521
+ { in: "query", key: "directory" },
522
+ ],
523
+ },
524
+ ]);
525
+ return (options?.client ?? this.client).get({
526
+ url: "/holos/contact/{id}/session",
527
+ ...options,
528
+ ...params,
529
+ });
530
+ }
531
+ /**
532
+ * Send message to contact
533
+ *
534
+ * Send a message to a contact via the friend session mailbox. The outbound hook handles Holos WS delivery automatically.
535
+ */
536
+ sendMessage(parameters, options) {
537
+ const params = buildClientParams([parameters], [
538
+ {
539
+ args: [
540
+ { in: "path", key: "id" },
541
+ { in: "query", key: "directory" },
542
+ { in: "body", key: "text" },
543
+ { in: "body", key: "replyToMessageId" },
544
+ ],
545
+ },
546
+ ]);
547
+ return (options?.client ?? this.client).post({
548
+ url: "/holos/contact/{id}/message",
549
+ ...options,
550
+ ...params,
551
+ headers: {
552
+ "Content-Type": "application/json",
553
+ ...options?.headers,
554
+ ...params.headers,
555
+ },
556
+ });
557
+ }
558
+ }
559
+ export class FriendRequest extends HeyApiClient {
560
+ /**
561
+ * List friend requests
562
+ *
563
+ * List all friend requests.
564
+ */
565
+ list(parameters, options) {
566
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
567
+ return (options?.client ?? this.client).get({
568
+ url: "/holos/friend-request",
569
+ ...options,
570
+ ...params,
571
+ });
572
+ }
573
+ /**
574
+ * Create friend request
575
+ *
576
+ * Create a new outgoing friend request.
577
+ */
578
+ create(parameters, options) {
579
+ const params = buildClientParams([parameters], [
580
+ {
581
+ args: [
582
+ { in: "query", key: "directory" },
583
+ { in: "body", key: "id" },
584
+ { in: "body", key: "peerId" },
585
+ { in: "body", key: "peerName" },
586
+ ],
587
+ },
588
+ ]);
589
+ return (options?.client ?? this.client).post({
590
+ url: "/holos/friend-request",
591
+ ...options,
592
+ ...params,
593
+ headers: {
594
+ "Content-Type": "application/json",
595
+ ...options?.headers,
596
+ ...params.headers,
597
+ },
598
+ });
599
+ }
600
+ /**
601
+ * Remove friend request
602
+ *
603
+ * Remove a friend request.
604
+ */
605
+ remove(parameters, options) {
606
+ const params = buildClientParams([parameters], [
607
+ {
608
+ args: [
609
+ { in: "path", key: "id" },
610
+ { in: "query", key: "directory" },
611
+ ],
612
+ },
613
+ ]);
614
+ return (options?.client ?? this.client).delete({
615
+ url: "/holos/friend-request/{id}",
616
+ ...options,
617
+ ...params,
618
+ });
619
+ }
620
+ /**
621
+ * Send friend request
622
+ *
623
+ * Send an outgoing friend request to another agent via WebSocket.
624
+ */
625
+ send(parameters, options) {
626
+ const params = buildClientParams([parameters], [
627
+ {
628
+ args: [
629
+ { in: "query", key: "directory" },
630
+ { in: "body", key: "peerId" },
631
+ { in: "body", key: "peerName" },
632
+ { in: "body", key: "peerBio" },
633
+ ],
634
+ },
635
+ ]);
636
+ return (options?.client ?? this.client).post({
637
+ url: "/holos/friend-request/send",
638
+ ...options,
639
+ ...params,
640
+ headers: {
641
+ "Content-Type": "application/json",
642
+ ...options?.headers,
643
+ ...params.headers,
644
+ },
645
+ });
646
+ }
647
+ /**
648
+ * Respond to friend request
649
+ *
650
+ * Accept or reject a friend request. Sends the response over WebSocket and updates local storage.
651
+ */
652
+ respond(parameters, options) {
653
+ const params = buildClientParams([parameters], [
654
+ {
655
+ args: [
656
+ { in: "path", key: "id" },
657
+ { in: "query", key: "directory" },
658
+ { in: "body", key: "status" },
659
+ ],
660
+ },
661
+ ]);
662
+ return (options?.client ?? this.client).put({
663
+ url: "/holos/friend-request/{id}/respond",
664
+ ...options,
665
+ ...params,
666
+ headers: {
667
+ "Content-Type": "application/json",
668
+ ...options?.headers,
669
+ ...params.headers,
670
+ },
671
+ });
672
+ }
673
+ }
674
+ export class Agents extends HeyApiClient {
675
+ /**
676
+ * List agents
677
+ *
678
+ * List available agents from the Holos platform.
679
+ */
680
+ list(parameters, options) {
681
+ const params = buildClientParams([parameters], [
682
+ {
683
+ args: [
684
+ { in: "query", key: "directory" },
685
+ { in: "query", key: "limit" },
686
+ { in: "query", key: "offset" },
687
+ { in: "query", key: "need_active" },
688
+ ],
689
+ },
690
+ ]);
691
+ return (options?.client ?? this.client).get({
692
+ url: "/holos/agents",
693
+ ...options,
694
+ ...params,
695
+ });
696
+ }
697
+ /**
698
+ * Get agent
699
+ *
700
+ * Get a specific agent's profile from the Holos platform.
701
+ */
702
+ get(parameters, options) {
703
+ const params = buildClientParams([parameters], [
704
+ {
705
+ args: [
706
+ { in: "path", key: "agentId" },
707
+ { in: "query", key: "directory" },
708
+ ],
709
+ },
710
+ ]);
711
+ return (options?.client ?? this.client).get({
712
+ url: "/holos/agents/{agentId}",
713
+ ...options,
714
+ ...params,
715
+ });
716
+ }
717
+ }
718
+ export class Queue extends HeyApiClient {
719
+ /**
720
+ * List message queue
721
+ *
722
+ * List all pending messages in the outgoing message queue.
723
+ */
724
+ list(parameters, options) {
725
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
726
+ return (options?.client ?? this.client).get({
727
+ url: "/holos/queue",
728
+ ...options,
729
+ ...params,
730
+ });
731
+ }
732
+ }
733
+ export class FriendReply extends HeyApiClient {
734
+ /**
735
+ * List friend reply sub-sessions
736
+ *
737
+ * List all sub-session mappings for a friend session. Maps trigger message IDs to sub-session IDs.
738
+ */
739
+ list(parameters, options) {
740
+ const params = buildClientParams([parameters], [
741
+ {
742
+ args: [
743
+ { in: "path", key: "sessionId" },
744
+ { in: "query", key: "directory" },
745
+ ],
746
+ },
747
+ ]);
748
+ return (options?.client ?? this.client).get({
749
+ url: "/holos/friend-reply/{sessionId}",
750
+ ...options,
751
+ ...params,
752
+ });
753
+ }
21
754
  }
22
- class Project extends _HeyApiClient {
755
+ export class Holos extends HeyApiClient {
756
+ /**
757
+ * Initiate Holos login
758
+ *
759
+ * Generate a Holos bind URL for browser-based login. Returns a URL to open in a popup.
760
+ */
761
+ login(options) {
762
+ return (options?.client ?? this.client).post({
763
+ url: "/holos/login",
764
+ ...options,
765
+ });
766
+ }
767
+ /**
768
+ * Holos login callback
769
+ *
770
+ * Handles the redirect from Holos after user login. Exchanges the code for credentials.
771
+ */
772
+ callback(options) {
773
+ return (options?.client ?? this.client).get({
774
+ url: "/holos/callback",
775
+ ...options,
776
+ });
777
+ }
778
+ /**
779
+ * Clear Holos credentials
780
+ *
781
+ * Remove stored Holos credentials and disconnect the channel. Used for sign-out.
782
+ */
783
+ logout(options) {
784
+ return (options?.client ?? this.client).delete({
785
+ url: "/holos/credentials",
786
+ ...options,
787
+ });
788
+ }
789
+ /**
790
+ * Set agent credentials
791
+ *
792
+ * Validate and save existing agent credentials. Validates by fetching a ws_token, then saves and reloads the channel.
793
+ */
794
+ credentials(parameters, options) {
795
+ const params = buildClientParams([parameters], [
796
+ {
797
+ args: [
798
+ { in: "body", key: "agentId" },
799
+ { in: "body", key: "agentSecret" },
800
+ ],
801
+ },
802
+ ]);
803
+ return (options?.client ?? this.client).post({
804
+ url: "/holos/credentials",
805
+ ...options,
806
+ ...params,
807
+ headers: {
808
+ "Content-Type": "application/json",
809
+ ...options?.headers,
810
+ ...params.headers,
811
+ },
812
+ });
813
+ }
814
+ /**
815
+ * Reconnect Holos channel
816
+ *
817
+ * Reload the Holos channel connection. Useful when the WebSocket disconnects.
818
+ */
819
+ reconnect(options) {
820
+ return (options?.client ?? this.client).post({
821
+ url: "/holos/reconnect",
822
+ ...options,
823
+ });
824
+ }
825
+ /**
826
+ * Verify Holos credentials
827
+ *
828
+ * Check whether the stored agent credentials are still valid by attempting to fetch a ws_token from Holos.
829
+ */
830
+ verify(parameters, options) {
831
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
832
+ return (options?.client ?? this.client).get({
833
+ url: "/holos/verify",
834
+ ...options,
835
+ ...params,
836
+ });
837
+ }
838
+ /**
839
+ * Get friend presence
840
+ *
841
+ * Get the online/offline status of all contacts from the presence cache.
842
+ */
843
+ presence(parameters, options) {
844
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
845
+ return (options?.client ?? this.client).get({
846
+ url: "/holos/presence",
847
+ ...options,
848
+ ...params,
849
+ });
850
+ }
851
+ /**
852
+ * Refresh friend presence
853
+ *
854
+ * Trigger a fresh presence probe for all unblocked Holos contacts.
855
+ */
856
+ refreshPresence(parameters, options) {
857
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
858
+ return (options?.client ?? this.client).post({
859
+ url: "/holos/refresh-presence",
860
+ ...options,
861
+ ...params,
862
+ });
863
+ }
864
+ credentials2 = new Credentials({ client: this.client });
865
+ profile = new Profile({ client: this.client });
866
+ contact = new Contact({ client: this.client });
867
+ friendRequest = new FriendRequest({ client: this.client });
868
+ agents = new Agents({ client: this.client });
869
+ queue = new Queue({ client: this.client });
870
+ friendReply = new FriendReply({ client: this.client });
871
+ }
872
+ export class Scope extends HeyApiClient {
873
+ /**
874
+ * List all scopes
875
+ *
876
+ * Get a list of scopes that have been opened with Synergy.
877
+ */
878
+ list(parameters, options) {
879
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
880
+ return (options?.client ?? this.client).get({
881
+ url: "/scope",
882
+ ...options,
883
+ ...params,
884
+ });
885
+ }
886
+ /**
887
+ * Get current scope
888
+ *
889
+ * Retrieve the currently active scope that Synergy is working with.
890
+ */
891
+ current(parameters, options) {
892
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
893
+ return (options?.client ?? this.client).get({
894
+ url: "/scope/current",
895
+ ...options,
896
+ ...params,
897
+ });
898
+ }
899
+ /**
900
+ * Remove scope
901
+ *
902
+ * Remove a scope from the tracked list. Does not delete scope files or session data.
903
+ */
904
+ remove(parameters, options) {
905
+ const params = buildClientParams([parameters], [
906
+ {
907
+ args: [
908
+ { in: "path", key: "scopeID" },
909
+ { in: "query", key: "directory" },
910
+ ],
911
+ },
912
+ ]);
913
+ return (options?.client ?? this.client).delete({
914
+ url: "/scope/{scopeID}",
915
+ ...options,
916
+ ...params,
917
+ });
918
+ }
919
+ /**
920
+ * Update scope
921
+ *
922
+ * Update scope properties such as name, icon and color.
923
+ */
924
+ update(parameters, options) {
925
+ const params = buildClientParams([parameters], [
926
+ {
927
+ args: [
928
+ { in: "path", key: "scopeID" },
929
+ { in: "query", key: "directory" },
930
+ { in: "body", key: "name" },
931
+ { in: "body", key: "icon" },
932
+ ],
933
+ },
934
+ ]);
935
+ return (options?.client ?? this.client).patch({
936
+ url: "/scope/{scopeID}",
937
+ ...options,
938
+ ...params,
939
+ headers: {
940
+ "Content-Type": "application/json",
941
+ ...options?.headers,
942
+ ...params.headers,
943
+ },
944
+ });
945
+ }
946
+ }
947
+ export class Git extends HeyApiClient {
948
+ /**
949
+ * Initialize git repository
950
+ *
951
+ * Initialize a git repository in the specified directory if one does not already exist.
952
+ */
953
+ init(parameters, options) {
954
+ const params = buildClientParams([parameters], [
955
+ {
956
+ args: [
957
+ {
958
+ in: "query",
959
+ key: "query_directory",
960
+ map: "directory",
961
+ },
962
+ {
963
+ in: "body",
964
+ key: "body_directory",
965
+ map: "directory",
966
+ },
967
+ ],
968
+ },
969
+ ]);
970
+ return (options?.client ?? this.client).post({
971
+ url: "/git/init",
972
+ ...options,
973
+ ...params,
974
+ headers: {
975
+ "Content-Type": "application/json",
976
+ ...options?.headers,
977
+ ...params.headers,
978
+ },
979
+ });
980
+ }
981
+ }
982
+ export class Pty extends HeyApiClient {
983
+ /**
984
+ * List PTY sessions
985
+ *
986
+ * Get a list of all active pseudo-terminal (PTY) sessions managed by Synergy.
987
+ */
988
+ list(parameters, options) {
989
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
990
+ return (options?.client ?? this.client).get({
991
+ url: "/pty",
992
+ ...options,
993
+ ...params,
994
+ });
995
+ }
996
+ /**
997
+ * Create PTY session
998
+ *
999
+ * Create a new pseudo-terminal (PTY) session for running shell commands and processes.
1000
+ */
1001
+ create(parameters, options) {
1002
+ const params = buildClientParams([parameters], [
1003
+ {
1004
+ args: [
1005
+ { in: "query", key: "directory" },
1006
+ { in: "body", key: "command" },
1007
+ { in: "body", key: "args" },
1008
+ { in: "body", key: "cwd" },
1009
+ { in: "body", key: "title" },
1010
+ { in: "body", key: "env" },
1011
+ ],
1012
+ },
1013
+ ]);
1014
+ return (options?.client ?? this.client).post({
1015
+ url: "/pty",
1016
+ ...options,
1017
+ ...params,
1018
+ headers: {
1019
+ "Content-Type": "application/json",
1020
+ ...options?.headers,
1021
+ ...params.headers,
1022
+ },
1023
+ });
1024
+ }
1025
+ /**
1026
+ * Remove PTY session
1027
+ *
1028
+ * Remove and terminate a specific pseudo-terminal (PTY) session.
1029
+ */
1030
+ remove(parameters, options) {
1031
+ const params = buildClientParams([parameters], [
1032
+ {
1033
+ args: [
1034
+ { in: "path", key: "ptyID" },
1035
+ { in: "query", key: "directory" },
1036
+ ],
1037
+ },
1038
+ ]);
1039
+ return (options?.client ?? this.client).delete({
1040
+ url: "/pty/{ptyID}",
1041
+ ...options,
1042
+ ...params,
1043
+ });
1044
+ }
1045
+ /**
1046
+ * Get PTY session
1047
+ *
1048
+ * Retrieve detailed information about a specific pseudo-terminal (PTY) session.
1049
+ */
1050
+ get(parameters, options) {
1051
+ const params = buildClientParams([parameters], [
1052
+ {
1053
+ args: [
1054
+ { in: "path", key: "ptyID" },
1055
+ { in: "query", key: "directory" },
1056
+ ],
1057
+ },
1058
+ ]);
1059
+ return (options?.client ?? this.client).get({
1060
+ url: "/pty/{ptyID}",
1061
+ ...options,
1062
+ ...params,
1063
+ });
1064
+ }
1065
+ /**
1066
+ * Update PTY session
1067
+ *
1068
+ * Update properties of an existing pseudo-terminal (PTY) session.
1069
+ */
1070
+ update(parameters, options) {
1071
+ const params = buildClientParams([parameters], [
1072
+ {
1073
+ args: [
1074
+ { in: "path", key: "ptyID" },
1075
+ { in: "query", key: "directory" },
1076
+ { in: "body", key: "title" },
1077
+ { in: "body", key: "size" },
1078
+ ],
1079
+ },
1080
+ ]);
1081
+ return (options?.client ?? this.client).put({
1082
+ url: "/pty/{ptyID}",
1083
+ ...options,
1084
+ ...params,
1085
+ headers: {
1086
+ "Content-Type": "application/json",
1087
+ ...options?.headers,
1088
+ ...params.headers,
1089
+ },
1090
+ });
1091
+ }
1092
+ /**
1093
+ * Connect to PTY session
1094
+ *
1095
+ * Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
1096
+ */
1097
+ connect(parameters, options) {
1098
+ const params = buildClientParams([parameters], [
1099
+ {
1100
+ args: [
1101
+ { in: "path", key: "ptyID" },
1102
+ { in: "query", key: "directory" },
1103
+ ],
1104
+ },
1105
+ ]);
1106
+ return (options?.client ?? this.client).get({
1107
+ url: "/pty/{ptyID}/connect",
1108
+ ...options,
1109
+ ...params,
1110
+ });
1111
+ }
1112
+ }
1113
+ export class _Set extends HeyApiClient {
1114
+ /**
1115
+ * List Config Sets
1116
+ *
1117
+ * List all global Config Sets and indicate which one is active.
1118
+ */
1119
+ list(parameters, options) {
1120
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1121
+ return (options?.client ?? this.client).get({
1122
+ url: "/config/sets",
1123
+ ...options,
1124
+ ...params,
1125
+ });
1126
+ }
1127
+ /**
1128
+ * Create Config Set
1129
+ *
1130
+ * Create a new global Config Set, defaulting to a copy of the current active raw global config.
1131
+ */
1132
+ create(parameters, options) {
1133
+ const params = buildClientParams([parameters], [
1134
+ {
1135
+ args: [
1136
+ { in: "query", key: "directory" },
1137
+ { key: "configSetCreateInput", map: "body" },
1138
+ ],
1139
+ },
1140
+ ]);
1141
+ return (options?.client ?? this.client).post({
1142
+ url: "/config/sets",
1143
+ ...options,
1144
+ ...params,
1145
+ headers: {
1146
+ "Content-Type": "application/json",
1147
+ ...options?.headers,
1148
+ ...params.headers,
1149
+ },
1150
+ });
1151
+ }
1152
+ /**
1153
+ * Delete Config Set
1154
+ *
1155
+ * Delete an inactive non-default global Config Set.
1156
+ */
1157
+ delete(parameters, options) {
1158
+ const params = buildClientParams([parameters], [
1159
+ {
1160
+ args: [
1161
+ { in: "path", key: "name" },
1162
+ { in: "query", key: "directory" },
1163
+ ],
1164
+ },
1165
+ ]);
1166
+ return (options?.client ?? this.client).delete({
1167
+ url: "/config/sets/{name}",
1168
+ ...options,
1169
+ ...params,
1170
+ });
1171
+ }
1172
+ /**
1173
+ * Get Config Set
1174
+ *
1175
+ * Read a global Config Set and its raw configuration.
1176
+ */
1177
+ get(parameters, options) {
1178
+ const params = buildClientParams([parameters], [
1179
+ {
1180
+ args: [
1181
+ { in: "path", key: "name" },
1182
+ { in: "query", key: "directory" },
1183
+ ],
1184
+ },
1185
+ ]);
1186
+ return (options?.client ?? this.client).get({
1187
+ url: "/config/sets/{name}",
1188
+ ...options,
1189
+ ...params,
1190
+ });
1191
+ }
1192
+ /**
1193
+ * Update Config Set
1194
+ *
1195
+ * Patch a global Config Set raw configuration.
1196
+ */
1197
+ update(parameters, options) {
1198
+ const params = buildClientParams([parameters], [
1199
+ {
1200
+ args: [
1201
+ { in: "path", key: "name" },
1202
+ { in: "query", key: "directory" },
1203
+ { key: "config", map: "body" },
1204
+ ],
1205
+ },
1206
+ ]);
1207
+ return (options?.client ?? this.client).patch({
1208
+ url: "/config/sets/{name}",
1209
+ ...options,
1210
+ ...params,
1211
+ headers: {
1212
+ "Content-Type": "application/json",
1213
+ ...options?.headers,
1214
+ ...params.headers,
1215
+ },
1216
+ });
1217
+ }
1218
+ /**
1219
+ * Activate Config Set
1220
+ *
1221
+ * Activate a global Config Set and reload global runtime configuration.
1222
+ */
1223
+ activate(parameters, options) {
1224
+ const params = buildClientParams([parameters], [
1225
+ {
1226
+ args: [
1227
+ { in: "path", key: "name" },
1228
+ { in: "query", key: "directory" },
1229
+ ],
1230
+ },
1231
+ ]);
1232
+ return (options?.client ?? this.client).post({
1233
+ url: "/config/sets/{name}/activate",
1234
+ ...options,
1235
+ ...params,
1236
+ });
1237
+ }
1238
+ }
1239
+ export class Config extends HeyApiClient {
1240
+ /**
1241
+ * Get configuration
1242
+ *
1243
+ * Retrieve the current Synergy configuration settings and preferences.
1244
+ */
1245
+ get(parameters, options) {
1246
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1247
+ return (options?.client ?? this.client).get({
1248
+ url: "/config",
1249
+ ...options,
1250
+ ...params,
1251
+ });
1252
+ }
1253
+ /**
1254
+ * Update configuration
1255
+ *
1256
+ * Update Synergy configuration settings and preferences.
1257
+ */
1258
+ update(parameters, options) {
1259
+ const params = buildClientParams([parameters], [
1260
+ {
1261
+ args: [
1262
+ { in: "query", key: "directory" },
1263
+ { key: "config", map: "body" },
1264
+ ],
1265
+ },
1266
+ ]);
1267
+ return (options?.client ?? this.client).patch({
1268
+ url: "/config",
1269
+ ...options,
1270
+ ...params,
1271
+ headers: {
1272
+ "Content-Type": "application/json",
1273
+ ...options?.headers,
1274
+ ...params.headers,
1275
+ },
1276
+ });
1277
+ }
1278
+ /**
1279
+ * Get global configuration
1280
+ *
1281
+ * Retrieve only the active global Config Set raw configuration (without project or remote layers).
1282
+ */
1283
+ global(parameters, options) {
1284
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1285
+ return (options?.client ?? this.client).get({
1286
+ url: "/config/global",
1287
+ ...options,
1288
+ ...params,
1289
+ });
1290
+ }
1291
+ /**
1292
+ * List config providers
1293
+ *
1294
+ * Get a list of all configured AI providers and their default models.
1295
+ */
1296
+ providers(parameters, options) {
1297
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1298
+ return (options?.client ?? this.client).get({
1299
+ url: "/config/providers",
1300
+ ...options,
1301
+ ...params,
1302
+ });
1303
+ }
1304
+ set = new _Set({ client: this.client });
1305
+ }
1306
+ export class Runtime extends HeyApiClient {
1307
+ /**
1308
+ * Reload runtime state
1309
+ *
1310
+ * Reload Synergy runtime subsystems after self-configuration changes.
1311
+ */
1312
+ reload(parameters, options) {
1313
+ const params = buildClientParams([parameters], [
1314
+ {
1315
+ args: [
1316
+ { in: "query", key: "directory" },
1317
+ { in: "body", key: "targets" },
1318
+ { in: "body", key: "scope" },
1319
+ { in: "body", key: "force" },
1320
+ { in: "body", key: "reason" },
1321
+ ],
1322
+ },
1323
+ ]);
1324
+ return (options?.client ?? this.client).post({
1325
+ url: "/runtime/reload",
1326
+ ...options,
1327
+ ...params,
1328
+ headers: {
1329
+ "Content-Type": "application/json",
1330
+ ...options?.headers,
1331
+ ...params.headers,
1332
+ },
1333
+ });
1334
+ }
1335
+ }
1336
+ export class Tool extends HeyApiClient {
1337
+ /**
1338
+ * List tool IDs
1339
+ *
1340
+ * Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
1341
+ */
1342
+ ids(parameters, options) {
1343
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1344
+ return (options?.client ?? this.client).get({
1345
+ url: "/experimental/tool/ids",
1346
+ ...options,
1347
+ ...params,
1348
+ });
1349
+ }
1350
+ /**
1351
+ * List tools
1352
+ *
1353
+ * Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
1354
+ */
1355
+ list(parameters, options) {
1356
+ const params = buildClientParams([parameters], [
1357
+ {
1358
+ args: [
1359
+ { in: "query", key: "directory" },
1360
+ { in: "query", key: "provider" },
1361
+ { in: "query", key: "model" },
1362
+ ],
1363
+ },
1364
+ ]);
1365
+ return (options?.client ?? this.client).get({
1366
+ url: "/experimental/tool",
1367
+ ...options,
1368
+ ...params,
1369
+ });
1370
+ }
1371
+ }
1372
+ export class Instance extends HeyApiClient {
1373
+ /**
1374
+ * Dispose instance
1375
+ *
1376
+ * Clean up and dispose the current Synergy instance, releasing all resources.
1377
+ */
1378
+ dispose(parameters, options) {
1379
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1380
+ return (options?.client ?? this.client).post({
1381
+ url: "/instance/dispose",
1382
+ ...options,
1383
+ ...params,
1384
+ });
1385
+ }
1386
+ }
1387
+ export class Path extends HeyApiClient {
1388
+ /**
1389
+ * Get paths
1390
+ *
1391
+ * Retrieve the current working directory and related path information for the Synergy instance.
1392
+ */
1393
+ get(parameters, options) {
1394
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1395
+ return (options?.client ?? this.client).get({
1396
+ url: "/path",
1397
+ ...options,
1398
+ ...params,
1399
+ });
1400
+ }
1401
+ }
1402
+ export class Worktree extends HeyApiClient {
1403
+ /**
1404
+ * List worktrees
1405
+ *
1406
+ * List all sandbox worktrees for the current project.
1407
+ */
1408
+ list(parameters, options) {
1409
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1410
+ return (options?.client ?? this.client).get({
1411
+ url: "/experimental/worktree",
1412
+ ...options,
1413
+ ...params,
1414
+ });
1415
+ }
1416
+ /**
1417
+ * Create worktree
1418
+ *
1419
+ * Create a new git worktree for the current project.
1420
+ */
1421
+ create(parameters, options) {
1422
+ const params = buildClientParams([parameters], [
1423
+ {
1424
+ args: [
1425
+ { in: "query", key: "directory" },
1426
+ { key: "worktreeCreateInput", map: "body" },
1427
+ ],
1428
+ },
1429
+ ]);
1430
+ return (options?.client ?? this.client).post({
1431
+ url: "/experimental/worktree",
1432
+ ...options,
1433
+ ...params,
1434
+ headers: {
1435
+ "Content-Type": "application/json",
1436
+ ...options?.headers,
1437
+ ...params.headers,
1438
+ },
1439
+ });
1440
+ }
1441
+ }
1442
+ export class Vcs extends HeyApiClient {
1443
+ /**
1444
+ * Get VCS info
1445
+ *
1446
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
1447
+ */
1448
+ get(parameters, options) {
1449
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1450
+ return (options?.client ?? this.client).get({
1451
+ url: "/vcs",
1452
+ ...options,
1453
+ ...params,
1454
+ });
1455
+ }
1456
+ }
1457
+ export class Feedback extends HeyApiClient {
1458
+ /**
1459
+ * List session feedback
1460
+ *
1461
+ * Get all feedback for a session.
1462
+ */
1463
+ list(parameters, options) {
1464
+ const params = buildClientParams([parameters], [
1465
+ {
1466
+ args: [
1467
+ { in: "path", key: "sessionID" },
1468
+ { in: "query", key: "directory" },
1469
+ ],
1470
+ },
1471
+ ]);
1472
+ return (options?.client ?? this.client).get({
1473
+ url: "/session/{sessionID}/feedback",
1474
+ ...options,
1475
+ ...params,
1476
+ });
1477
+ }
1478
+ /**
1479
+ * Set message feedback
1480
+ *
1481
+ * Rate an assistant message with thumbs up or down.
1482
+ */
1483
+ set(parameters, options) {
1484
+ const params = buildClientParams([parameters], [
1485
+ {
1486
+ args: [
1487
+ { in: "path", key: "sessionID" },
1488
+ { in: "query", key: "directory" },
1489
+ { in: "body", key: "userMessageID" },
1490
+ { in: "body", key: "assistantMessageID" },
1491
+ { in: "body", key: "rating" },
1492
+ ],
1493
+ },
1494
+ ]);
1495
+ return (options?.client ?? this.client).post({
1496
+ url: "/session/{sessionID}/feedback",
1497
+ ...options,
1498
+ ...params,
1499
+ headers: {
1500
+ "Content-Type": "application/json",
1501
+ ...options?.headers,
1502
+ ...params.headers,
1503
+ },
1504
+ });
1505
+ }
1506
+ /**
1507
+ * Delete message feedback
1508
+ *
1509
+ * Remove feedback for a specific assistant message.
1510
+ */
1511
+ delete(parameters, options) {
1512
+ const params = buildClientParams([parameters], [
1513
+ {
1514
+ args: [
1515
+ { in: "path", key: "sessionID" },
1516
+ { in: "path", key: "messageID" },
1517
+ { in: "query", key: "directory" },
1518
+ ],
1519
+ },
1520
+ ]);
1521
+ return (options?.client ?? this.client).delete({
1522
+ url: "/session/{sessionID}/feedback/{messageID}",
1523
+ ...options,
1524
+ ...params,
1525
+ });
1526
+ }
1527
+ /**
1528
+ * Get message feedback
1529
+ *
1530
+ * Get feedback for a specific assistant message.
1531
+ */
1532
+ get(parameters, options) {
1533
+ const params = buildClientParams([parameters], [
1534
+ {
1535
+ args: [
1536
+ { in: "path", key: "sessionID" },
1537
+ { in: "path", key: "messageID" },
1538
+ { in: "query", key: "directory" },
1539
+ ],
1540
+ },
1541
+ ]);
1542
+ return (options?.client ?? this.client).get({
1543
+ url: "/session/{sessionID}/feedback/{messageID}",
1544
+ ...options,
1545
+ ...params,
1546
+ });
1547
+ }
1548
+ }
1549
+ export class Session extends HeyApiClient {
1550
+ /**
1551
+ * List sessions
1552
+ *
1553
+ * Get a list of all Synergy sessions, sorted by most recently updated.
1554
+ */
1555
+ list(parameters, options) {
1556
+ const params = buildClientParams([parameters], [
1557
+ {
1558
+ args: [
1559
+ { in: "query", key: "directory" },
1560
+ { in: "query", key: "start" },
1561
+ { in: "query", key: "search" },
1562
+ { in: "query", key: "limit" },
1563
+ ],
1564
+ },
1565
+ ]);
1566
+ return (options?.client ?? this.client).get({
1567
+ url: "/session",
1568
+ ...options,
1569
+ ...params,
1570
+ });
1571
+ }
1572
+ /**
1573
+ * Create session
1574
+ *
1575
+ * Create a new Synergy session for interacting with AI assistants and managing conversations.
1576
+ */
1577
+ create(parameters, options) {
1578
+ const params = buildClientParams([parameters], [
1579
+ {
1580
+ args: [
1581
+ { in: "query", key: "directory" },
1582
+ { in: "body", key: "parentID" },
1583
+ { in: "body", key: "title" },
1584
+ { in: "body", key: "id" },
1585
+ ],
1586
+ },
1587
+ ]);
1588
+ return (options?.client ?? this.client).post({
1589
+ url: "/session",
1590
+ ...options,
1591
+ ...params,
1592
+ headers: {
1593
+ "Content-Type": "application/json",
1594
+ ...options?.headers,
1595
+ ...params.headers,
1596
+ },
1597
+ });
1598
+ }
1599
+ /**
1600
+ * Get session status
1601
+ *
1602
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
1603
+ */
1604
+ status(parameters, options) {
1605
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1606
+ return (options?.client ?? this.client).get({
1607
+ url: "/session/status",
1608
+ ...options,
1609
+ ...params,
1610
+ });
1611
+ }
1612
+ /**
1613
+ * Delete session
1614
+ *
1615
+ * Delete a session and permanently remove all associated data, including messages and history.
1616
+ */
1617
+ delete(parameters, options) {
1618
+ const params = buildClientParams([parameters], [
1619
+ {
1620
+ args: [
1621
+ { in: "path", key: "sessionID" },
1622
+ { in: "query", key: "directory" },
1623
+ ],
1624
+ },
1625
+ ]);
1626
+ return (options?.client ?? this.client).delete({
1627
+ url: "/session/{sessionID}",
1628
+ ...options,
1629
+ ...params,
1630
+ });
1631
+ }
1632
+ /**
1633
+ * Get session
1634
+ *
1635
+ * Retrieve detailed information about a specific Synergy session.
1636
+ */
1637
+ get(parameters, options) {
1638
+ const params = buildClientParams([parameters], [
1639
+ {
1640
+ args: [
1641
+ { in: "path", key: "sessionID" },
1642
+ { in: "query", key: "directory" },
1643
+ ],
1644
+ },
1645
+ ]);
1646
+ return (options?.client ?? this.client).get({
1647
+ url: "/session/{sessionID}",
1648
+ ...options,
1649
+ ...params,
1650
+ });
1651
+ }
1652
+ /**
1653
+ * Update session
1654
+ *
1655
+ * Update properties of an existing session, such as title or other metadata.
1656
+ */
1657
+ update(parameters, options) {
1658
+ const params = buildClientParams([parameters], [
1659
+ {
1660
+ args: [
1661
+ { in: "path", key: "sessionID" },
1662
+ { in: "query", key: "directory" },
1663
+ { in: "body", key: "title" },
1664
+ { in: "body", key: "pinned" },
1665
+ { in: "body", key: "time" },
1666
+ ],
1667
+ },
1668
+ ]);
1669
+ return (options?.client ?? this.client).patch({
1670
+ url: "/session/{sessionID}",
1671
+ ...options,
1672
+ ...params,
1673
+ headers: {
1674
+ "Content-Type": "application/json",
1675
+ ...options?.headers,
1676
+ ...params.headers,
1677
+ },
1678
+ });
1679
+ }
1680
+ /**
1681
+ * Get session children
1682
+ *
1683
+ * Retrieve all child sessions that were forked from the specified parent session.
1684
+ */
1685
+ children(parameters, options) {
1686
+ const params = buildClientParams([parameters], [
1687
+ {
1688
+ args: [
1689
+ { in: "path", key: "sessionID" },
1690
+ { in: "query", key: "directory" },
1691
+ ],
1692
+ },
1693
+ ]);
1694
+ return (options?.client ?? this.client).get({
1695
+ url: "/session/{sessionID}/children",
1696
+ ...options,
1697
+ ...params,
1698
+ });
1699
+ }
1700
+ /**
1701
+ * Get session todos
1702
+ *
1703
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
1704
+ */
1705
+ todo(parameters, options) {
1706
+ const params = buildClientParams([parameters], [
1707
+ {
1708
+ args: [
1709
+ { in: "path", key: "sessionID" },
1710
+ { in: "query", key: "directory" },
1711
+ ],
1712
+ },
1713
+ ]);
1714
+ return (options?.client ?? this.client).get({
1715
+ url: "/session/{sessionID}/todo",
1716
+ ...options,
1717
+ ...params,
1718
+ });
1719
+ }
1720
+ /**
1721
+ * Get session DAG
1722
+ *
1723
+ * Retrieve the task DAG associated with a specific session.
1724
+ */
1725
+ dag(parameters, options) {
1726
+ const params = buildClientParams([parameters], [
1727
+ {
1728
+ args: [
1729
+ { in: "path", key: "sessionID" },
1730
+ { in: "query", key: "directory" },
1731
+ ],
1732
+ },
1733
+ ]);
1734
+ return (options?.client ?? this.client).get({
1735
+ url: "/session/{sessionID}/dag",
1736
+ ...options,
1737
+ ...params,
1738
+ });
1739
+ }
1740
+ /**
1741
+ * Initialize session
1742
+ *
1743
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
1744
+ */
1745
+ init(parameters, options) {
1746
+ const params = buildClientParams([parameters], [
1747
+ {
1748
+ args: [
1749
+ { in: "path", key: "sessionID" },
1750
+ { in: "query", key: "directory" },
1751
+ { in: "body", key: "modelID" },
1752
+ { in: "body", key: "providerID" },
1753
+ { in: "body", key: "messageID" },
1754
+ ],
1755
+ },
1756
+ ]);
1757
+ return (options?.client ?? this.client).post({
1758
+ url: "/session/{sessionID}/init",
1759
+ ...options,
1760
+ ...params,
1761
+ headers: {
1762
+ "Content-Type": "application/json",
1763
+ ...options?.headers,
1764
+ ...params.headers,
1765
+ },
1766
+ });
1767
+ }
1768
+ /**
1769
+ * Fork session
1770
+ *
1771
+ * Create a new session by forking an existing session at a specific message point.
1772
+ */
1773
+ fork(parameters, options) {
1774
+ const params = buildClientParams([parameters], [
1775
+ {
1776
+ args: [
1777
+ { in: "path", key: "sessionID" },
1778
+ { in: "query", key: "directory" },
1779
+ { in: "body", key: "messageID" },
1780
+ ],
1781
+ },
1782
+ ]);
1783
+ return (options?.client ?? this.client).post({
1784
+ url: "/session/{sessionID}/fork",
1785
+ ...options,
1786
+ ...params,
1787
+ headers: {
1788
+ "Content-Type": "application/json",
1789
+ ...options?.headers,
1790
+ ...params.headers,
1791
+ },
1792
+ });
1793
+ }
1794
+ /**
1795
+ * Abort session
1796
+ *
1797
+ * Abort an active session and stop any ongoing AI processing or command execution.
1798
+ */
1799
+ abort(parameters, options) {
1800
+ const params = buildClientParams([parameters], [
1801
+ {
1802
+ args: [
1803
+ { in: "path", key: "sessionID" },
1804
+ { in: "query", key: "directory" },
1805
+ ],
1806
+ },
1807
+ ]);
1808
+ return (options?.client ?? this.client).post({
1809
+ url: "/session/{sessionID}/abort",
1810
+ ...options,
1811
+ ...params,
1812
+ });
1813
+ }
1814
+ /**
1815
+ * Summarize session
1816
+ *
1817
+ * Generate a concise summary of the session using AI compaction to preserve key information.
1818
+ */
1819
+ summarize(parameters, options) {
1820
+ const params = buildClientParams([parameters], [
1821
+ {
1822
+ args: [
1823
+ { in: "path", key: "sessionID" },
1824
+ { in: "query", key: "directory" },
1825
+ { in: "body", key: "providerID" },
1826
+ { in: "body", key: "modelID" },
1827
+ { in: "body", key: "auto" },
1828
+ ],
1829
+ },
1830
+ ]);
1831
+ return (options?.client ?? this.client).post({
1832
+ url: "/session/{sessionID}/summarize",
1833
+ ...options,
1834
+ ...params,
1835
+ headers: {
1836
+ "Content-Type": "application/json",
1837
+ ...options?.headers,
1838
+ ...params.headers,
1839
+ },
1840
+ });
1841
+ }
1842
+ /**
1843
+ * Get session messages
1844
+ *
1845
+ * Retrieve all messages in a session, including user prompts and AI responses.
1846
+ */
1847
+ messages(parameters, options) {
1848
+ const params = buildClientParams([parameters], [
1849
+ {
1850
+ args: [
1851
+ { in: "path", key: "sessionID" },
1852
+ { in: "query", key: "directory" },
1853
+ { in: "query", key: "limit" },
1854
+ ],
1855
+ },
1856
+ ]);
1857
+ return (options?.client ?? this.client).get({
1858
+ url: "/session/{sessionID}/message",
1859
+ ...options,
1860
+ ...params,
1861
+ });
1862
+ }
1863
+ /**
1864
+ * Send message
1865
+ *
1866
+ * Create and send a new message to a session, streaming the AI response.
1867
+ */
1868
+ prompt(parameters, options) {
1869
+ const params = buildClientParams([parameters], [
1870
+ {
1871
+ args: [
1872
+ { in: "path", key: "sessionID" },
1873
+ { in: "query", key: "directory" },
1874
+ { in: "body", key: "messageID" },
1875
+ { in: "body", key: "model" },
1876
+ { in: "body", key: "agent" },
1877
+ { in: "body", key: "noReply" },
1878
+ { in: "body", key: "metadata" },
1879
+ { in: "body", key: "summary" },
1880
+ { in: "body", key: "tools" },
1881
+ { in: "body", key: "system" },
1882
+ { in: "body", key: "variant" },
1883
+ { in: "body", key: "parts" },
1884
+ ],
1885
+ },
1886
+ ]);
1887
+ return (options?.client ?? this.client).post({
1888
+ url: "/session/{sessionID}/message",
1889
+ ...options,
1890
+ ...params,
1891
+ headers: {
1892
+ "Content-Type": "application/json",
1893
+ ...options?.headers,
1894
+ ...params.headers,
1895
+ },
1896
+ });
1897
+ }
1898
+ /**
1899
+ * Get session diff
1900
+ *
1901
+ * Get all file changes (diffs) made during this session.
1902
+ */
1903
+ diff(parameters, options) {
1904
+ const params = buildClientParams([parameters], [
1905
+ {
1906
+ args: [
1907
+ { in: "path", key: "sessionID" },
1908
+ { in: "query", key: "directory" },
1909
+ ],
1910
+ },
1911
+ ]);
1912
+ return (options?.client ?? this.client).get({
1913
+ url: "/session/{sessionID}/diff",
1914
+ ...options,
1915
+ ...params,
1916
+ });
1917
+ }
1918
+ /**
1919
+ * Get message
1920
+ *
1921
+ * Retrieve a specific message from a session by its message ID.
1922
+ */
1923
+ message(parameters, options) {
1924
+ const params = buildClientParams([parameters], [
1925
+ {
1926
+ args: [
1927
+ { in: "path", key: "sessionID" },
1928
+ { in: "path", key: "messageID" },
1929
+ { in: "query", key: "directory" },
1930
+ ],
1931
+ },
1932
+ ]);
1933
+ return (options?.client ?? this.client).get({
1934
+ url: "/session/{sessionID}/message/{messageID}",
1935
+ ...options,
1936
+ ...params,
1937
+ });
1938
+ }
1939
+ /**
1940
+ * Send async message
1941
+ *
1942
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
1943
+ */
1944
+ promptAsync(parameters, options) {
1945
+ const params = buildClientParams([parameters], [
1946
+ {
1947
+ args: [
1948
+ { in: "path", key: "sessionID" },
1949
+ { in: "query", key: "directory" },
1950
+ { in: "body", key: "messageID" },
1951
+ { in: "body", key: "model" },
1952
+ { in: "body", key: "agent" },
1953
+ { in: "body", key: "noReply" },
1954
+ { in: "body", key: "metadata" },
1955
+ { in: "body", key: "summary" },
1956
+ { in: "body", key: "tools" },
1957
+ { in: "body", key: "system" },
1958
+ { in: "body", key: "variant" },
1959
+ { in: "body", key: "parts" },
1960
+ ],
1961
+ },
1962
+ ]);
1963
+ return (options?.client ?? this.client).post({
1964
+ url: "/session/{sessionID}/prompt_async",
1965
+ ...options,
1966
+ ...params,
1967
+ headers: {
1968
+ "Content-Type": "application/json",
1969
+ ...options?.headers,
1970
+ ...params.headers,
1971
+ },
1972
+ });
1973
+ }
1974
+ /**
1975
+ * Send command
1976
+ *
1977
+ * Send a new command to a session for execution by the AI assistant.
1978
+ */
1979
+ command(parameters, options) {
1980
+ const params = buildClientParams([parameters], [
1981
+ {
1982
+ args: [
1983
+ { in: "path", key: "sessionID" },
1984
+ { in: "query", key: "directory" },
1985
+ { in: "body", key: "messageID" },
1986
+ { in: "body", key: "agent" },
1987
+ { in: "body", key: "model" },
1988
+ { in: "body", key: "arguments" },
1989
+ { in: "body", key: "command" },
1990
+ { in: "body", key: "variant" },
1991
+ { in: "body", key: "parts" },
1992
+ ],
1993
+ },
1994
+ ]);
1995
+ return (options?.client ?? this.client).post({
1996
+ url: "/session/{sessionID}/command",
1997
+ ...options,
1998
+ ...params,
1999
+ headers: {
2000
+ "Content-Type": "application/json",
2001
+ ...options?.headers,
2002
+ ...params.headers,
2003
+ },
2004
+ });
2005
+ }
2006
+ /**
2007
+ * Run shell command
2008
+ *
2009
+ * Execute a shell command within the session context and return the AI's response.
2010
+ */
2011
+ shell(parameters, options) {
2012
+ const params = buildClientParams([parameters], [
2013
+ {
2014
+ args: [
2015
+ { in: "path", key: "sessionID" },
2016
+ { in: "query", key: "directory" },
2017
+ { in: "body", key: "agent" },
2018
+ { in: "body", key: "model" },
2019
+ { in: "body", key: "command" },
2020
+ ],
2021
+ },
2022
+ ]);
2023
+ return (options?.client ?? this.client).post({
2024
+ url: "/session/{sessionID}/shell",
2025
+ ...options,
2026
+ ...params,
2027
+ headers: {
2028
+ "Content-Type": "application/json",
2029
+ ...options?.headers,
2030
+ ...params.headers,
2031
+ },
2032
+ });
2033
+ }
23
2034
  /**
24
- * List all projects
2035
+ * Revert message
2036
+ *
2037
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
25
2038
  */
26
- list(options) {
27
- return (options?.client ?? this._client).get({
28
- url: "/project",
2039
+ revert(parameters, options) {
2040
+ const params = buildClientParams([parameters], [
2041
+ {
2042
+ args: [
2043
+ { in: "path", key: "sessionID" },
2044
+ { in: "query", key: "directory" },
2045
+ { in: "body", key: "messageID" },
2046
+ { in: "body", key: "partID" },
2047
+ ],
2048
+ },
2049
+ ]);
2050
+ return (options?.client ?? this.client).post({
2051
+ url: "/session/{sessionID}/revert",
29
2052
  ...options,
2053
+ ...params,
2054
+ headers: {
2055
+ "Content-Type": "application/json",
2056
+ ...options?.headers,
2057
+ ...params.headers,
2058
+ },
30
2059
  });
31
2060
  }
32
2061
  /**
33
- * Get the current project
2062
+ * Restore reverted messages
2063
+ *
2064
+ * Restore all previously reverted messages in a session.
34
2065
  */
35
- current(options) {
36
- return (options?.client ?? this._client).get({
37
- url: "/project/current",
2066
+ unrevert(parameters, options) {
2067
+ const params = buildClientParams([parameters], [
2068
+ {
2069
+ args: [
2070
+ { in: "path", key: "sessionID" },
2071
+ { in: "query", key: "directory" },
2072
+ ],
2073
+ },
2074
+ ]);
2075
+ return (options?.client ?? this.client).post({
2076
+ url: "/session/{sessionID}/unrevert",
38
2077
  ...options,
2078
+ ...params,
39
2079
  });
40
2080
  }
2081
+ feedback = new Feedback({ client: this.client });
41
2082
  }
42
- class Pty extends _HeyApiClient {
43
- /**
44
- * List all PTY sessions
45
- */
46
- list(options) {
47
- return (options?.client ?? this._client).get({
48
- url: "/pty",
2083
+ export class Part extends HeyApiClient {
2084
+ /**
2085
+ * Delete a part from a message
2086
+ */
2087
+ delete(parameters, options) {
2088
+ const params = buildClientParams([parameters], [
2089
+ {
2090
+ args: [
2091
+ { in: "path", key: "sessionID" },
2092
+ { in: "path", key: "messageID" },
2093
+ { in: "path", key: "partID" },
2094
+ { in: "query", key: "directory" },
2095
+ ],
2096
+ },
2097
+ ]);
2098
+ return (options?.client ?? this.client).delete({
2099
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
49
2100
  ...options,
2101
+ ...params,
50
2102
  });
51
2103
  }
52
2104
  /**
53
- * Create a new PTY session
2105
+ * Update a part in a message
54
2106
  */
55
- create(options) {
56
- return (options?.client ?? this._client).post({
57
- url: "/pty",
2107
+ update(parameters, options) {
2108
+ const params = buildClientParams([parameters], [
2109
+ {
2110
+ args: [
2111
+ { in: "path", key: "sessionID" },
2112
+ { in: "path", key: "messageID" },
2113
+ { in: "path", key: "partID" },
2114
+ { in: "query", key: "directory" },
2115
+ { key: "part", map: "body" },
2116
+ ],
2117
+ },
2118
+ ]);
2119
+ return (options?.client ?? this.client).patch({
2120
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
2121
+ ...options,
2122
+ ...params,
2123
+ headers: {
2124
+ "Content-Type": "application/json",
2125
+ ...options?.headers,
2126
+ ...params.headers,
2127
+ },
2128
+ });
2129
+ }
2130
+ }
2131
+ export class Permission extends HeyApiClient {
2132
+ /**
2133
+ * Respond to permission
2134
+ *
2135
+ * Approve or deny a permission request from the AI assistant.
2136
+ *
2137
+ * @deprecated
2138
+ */
2139
+ respond(parameters, options) {
2140
+ const params = buildClientParams([parameters], [
2141
+ {
2142
+ args: [
2143
+ { in: "path", key: "sessionID" },
2144
+ { in: "path", key: "permissionID" },
2145
+ { in: "query", key: "directory" },
2146
+ { in: "body", key: "response" },
2147
+ ],
2148
+ },
2149
+ ]);
2150
+ return (options?.client ?? this.client).post({
2151
+ url: "/session/{sessionID}/permissions/{permissionID}",
58
2152
  ...options,
2153
+ ...params,
59
2154
  headers: {
60
2155
  "Content-Type": "application/json",
61
2156
  ...options?.headers,
2157
+ ...params.headers,
62
2158
  },
63
2159
  });
64
2160
  }
65
2161
  /**
66
- * Remove a PTY session
2162
+ * Respond to permission request
2163
+ *
2164
+ * Approve or deny a permission request from the AI assistant.
67
2165
  */
68
- remove(options) {
69
- return (options.client ?? this._client).delete({
70
- url: "/pty/{id}",
2166
+ reply(parameters, options) {
2167
+ const params = buildClientParams([parameters], [
2168
+ {
2169
+ args: [
2170
+ { in: "path", key: "requestID" },
2171
+ { in: "query", key: "directory" },
2172
+ { in: "body", key: "reply" },
2173
+ { in: "body", key: "message" },
2174
+ ],
2175
+ },
2176
+ ]);
2177
+ return (options?.client ?? this.client).post({
2178
+ url: "/permission/{requestID}/reply",
71
2179
  ...options,
2180
+ ...params,
2181
+ headers: {
2182
+ "Content-Type": "application/json",
2183
+ ...options?.headers,
2184
+ ...params.headers,
2185
+ },
72
2186
  });
73
2187
  }
74
2188
  /**
75
- * Get PTY session info
2189
+ * Check allow-all status
2190
+ *
2191
+ * Check if allow-all mode is enabled for a session.
76
2192
  */
77
- get(options) {
78
- return (options.client ?? this._client).get({
79
- url: "/pty/{id}",
2193
+ isAllowingAll(parameters, options) {
2194
+ const params = buildClientParams([parameters], [
2195
+ {
2196
+ args: [
2197
+ { in: "query", key: "directory" },
2198
+ { in: "query", key: "sessionID" },
2199
+ ],
2200
+ },
2201
+ ]);
2202
+ return (options?.client ?? this.client).get({
2203
+ url: "/permission/allow-all",
80
2204
  ...options,
2205
+ ...params,
81
2206
  });
82
2207
  }
83
2208
  /**
84
- * Update PTY session
2209
+ * Set allow-all for a session
2210
+ *
2211
+ * Enable or disable allow-all mode for a session. When enabled, all permission requests are automatically approved and any currently pending permissions are resolved.
85
2212
  */
86
- update(options) {
87
- return (options.client ?? this._client).put({
88
- url: "/pty/{id}",
2213
+ setAllowAll(parameters, options) {
2214
+ const params = buildClientParams([parameters], [
2215
+ {
2216
+ args: [
2217
+ { in: "query", key: "directory" },
2218
+ { in: "body", key: "sessionID" },
2219
+ { in: "body", key: "enabled" },
2220
+ ],
2221
+ },
2222
+ ]);
2223
+ return (options?.client ?? this.client).post({
2224
+ url: "/permission/allow-all",
89
2225
  ...options,
2226
+ ...params,
90
2227
  headers: {
91
2228
  "Content-Type": "application/json",
92
- ...options.headers,
2229
+ ...options?.headers,
2230
+ ...params.headers,
93
2231
  },
94
2232
  });
95
2233
  }
96
2234
  /**
97
- * Connect to a PTY session
2235
+ * List pending permissions
2236
+ *
2237
+ * Get all pending permission requests across all sessions.
98
2238
  */
99
- connect(options) {
100
- return (options.client ?? this._client).get({
101
- url: "/pty/{id}/connect",
2239
+ list(parameters, options) {
2240
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2241
+ return (options?.client ?? this.client).get({
2242
+ url: "/permission",
102
2243
  ...options,
2244
+ ...params,
103
2245
  });
104
2246
  }
105
2247
  }
106
- class Config extends _HeyApiClient {
2248
+ export class Question extends HeyApiClient {
107
2249
  /**
108
- * Get config info
2250
+ * List pending questions
2251
+ *
2252
+ * Get all pending question requests across all sessions.
109
2253
  */
110
- get(options) {
111
- return (options?.client ?? this._client).get({
112
- url: "/config",
2254
+ list(parameters, options) {
2255
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2256
+ return (options?.client ?? this.client).get({
2257
+ url: "/question",
113
2258
  ...options,
2259
+ ...params,
114
2260
  });
115
2261
  }
116
2262
  /**
117
- * Update config
2263
+ * Reply to question request
2264
+ *
2265
+ * Provide answers to a question request from the AI assistant.
118
2266
  */
119
- update(options) {
120
- return (options?.client ?? this._client).patch({
121
- url: "/config",
2267
+ reply(parameters, options) {
2268
+ const params = buildClientParams([parameters], [
2269
+ {
2270
+ args: [
2271
+ { in: "path", key: "requestID" },
2272
+ { in: "query", key: "directory" },
2273
+ { in: "body", key: "answers" },
2274
+ ],
2275
+ },
2276
+ ]);
2277
+ return (options?.client ?? this.client).post({
2278
+ url: "/question/{requestID}/reply",
122
2279
  ...options,
2280
+ ...params,
123
2281
  headers: {
124
2282
  "Content-Type": "application/json",
125
2283
  ...options?.headers,
2284
+ ...params.headers,
126
2285
  },
127
2286
  });
128
2287
  }
129
2288
  /**
130
- * List all providers
2289
+ * Reject question request
2290
+ *
2291
+ * Reject a question request from the AI assistant.
131
2292
  */
132
- providers(options) {
133
- return (options?.client ?? this._client).get({
134
- url: "/config/providers",
2293
+ reject(parameters, options) {
2294
+ const params = buildClientParams([parameters], [
2295
+ {
2296
+ args: [
2297
+ { in: "path", key: "requestID" },
2298
+ { in: "query", key: "directory" },
2299
+ ],
2300
+ },
2301
+ ]);
2302
+ return (options?.client ?? this.client).post({
2303
+ url: "/question/{requestID}/reject",
135
2304
  ...options,
2305
+ ...params,
136
2306
  });
137
2307
  }
138
2308
  }
139
- class Tool extends _HeyApiClient {
140
- /**
141
- * List all tool IDs (including built-in and dynamically registered)
142
- */
143
- ids(options) {
144
- return (options?.client ?? this._client).get({
145
- url: "/experimental/tool/ids",
2309
+ export class Cortex extends HeyApiClient {
2310
+ /**
2311
+ * List Cortex tasks
2312
+ *
2313
+ * List all background tasks, optionally filtered by session
2314
+ */
2315
+ list(parameters, options) {
2316
+ const params = buildClientParams([parameters], [
2317
+ {
2318
+ args: [
2319
+ { in: "query", key: "directory" },
2320
+ { in: "query", key: "sessionID" },
2321
+ ],
2322
+ },
2323
+ ]);
2324
+ return (options?.client ?? this.client).get({
2325
+ url: "/cortex/tasks",
146
2326
  ...options,
2327
+ ...params,
147
2328
  });
148
2329
  }
149
2330
  /**
150
- * List tools with JSON schema parameters for a provider/model
2331
+ * Get Cortex task
2332
+ *
2333
+ * Get a specific background task by ID
151
2334
  */
152
- list(options) {
153
- return (options.client ?? this._client).get({
154
- url: "/experimental/tool",
2335
+ get(parameters, options) {
2336
+ const params = buildClientParams([parameters], [
2337
+ {
2338
+ args: [
2339
+ { in: "path", key: "taskID" },
2340
+ { in: "query", key: "directory" },
2341
+ ],
2342
+ },
2343
+ ]);
2344
+ return (options?.client ?? this.client).get({
2345
+ url: "/cortex/tasks/{taskID}",
155
2346
  ...options,
2347
+ ...params,
156
2348
  });
157
2349
  }
158
- }
159
- class Instance extends _HeyApiClient {
160
2350
  /**
161
- * Dispose the current instance
2351
+ * Get task output
2352
+ *
2353
+ * Get the output of a completed background task
162
2354
  */
163
- dispose(options) {
164
- return (options?.client ?? this._client).post({
165
- url: "/instance/dispose",
2355
+ output(parameters, options) {
2356
+ const params = buildClientParams([parameters], [
2357
+ {
2358
+ args: [
2359
+ { in: "path", key: "taskID" },
2360
+ { in: "query", key: "directory" },
2361
+ ],
2362
+ },
2363
+ ]);
2364
+ return (options?.client ?? this.client).get({
2365
+ url: "/cortex/tasks/{taskID}/output",
166
2366
  ...options,
2367
+ ...params,
167
2368
  });
168
2369
  }
169
- }
170
- class Path extends _HeyApiClient {
171
2370
  /**
172
- * Get the current path
2371
+ * Cancel Cortex task
2372
+ *
2373
+ * Cancel a running background task
173
2374
  */
174
- get(options) {
175
- return (options?.client ?? this._client).get({
176
- url: "/path",
2375
+ cancel(parameters, options) {
2376
+ const params = buildClientParams([parameters], [
2377
+ {
2378
+ args: [
2379
+ { in: "path", key: "taskID" },
2380
+ { in: "query", key: "directory" },
2381
+ ],
2382
+ },
2383
+ ]);
2384
+ return (options?.client ?? this.client).post({
2385
+ url: "/cortex/tasks/{taskID}/cancel",
177
2386
  ...options,
2387
+ ...params,
178
2388
  });
179
2389
  }
180
2390
  }
181
- class Vcs extends _HeyApiClient {
2391
+ export class Command extends HeyApiClient {
182
2392
  /**
183
- * Get VCS info for the current instance
2393
+ * List commands
2394
+ *
2395
+ * Get a list of all available commands in the Synergy system.
184
2396
  */
185
- get(options) {
186
- return (options?.client ?? this._client).get({
187
- url: "/vcs",
2397
+ list(parameters, options) {
2398
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2399
+ return (options?.client ?? this.client).get({
2400
+ url: "/command",
188
2401
  ...options,
2402
+ ...params,
189
2403
  });
190
2404
  }
191
2405
  }
192
- class Session extends _HeyApiClient {
193
- /**
194
- * List all sessions
195
- */
196
- list(options) {
197
- return (options?.client ?? this._client).get({
198
- url: "/session",
2406
+ export class Oauth extends HeyApiClient {
2407
+ /**
2408
+ * OAuth authorize
2409
+ *
2410
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
2411
+ */
2412
+ authorize(parameters, options) {
2413
+ const params = buildClientParams([parameters], [
2414
+ {
2415
+ args: [
2416
+ { in: "path", key: "providerID" },
2417
+ { in: "query", key: "directory" },
2418
+ { in: "body", key: "method" },
2419
+ ],
2420
+ },
2421
+ ]);
2422
+ return (options?.client ?? this.client).post({
2423
+ url: "/provider/{providerID}/oauth/authorize",
199
2424
  ...options,
2425
+ ...params,
2426
+ headers: {
2427
+ "Content-Type": "application/json",
2428
+ ...options?.headers,
2429
+ ...params.headers,
2430
+ },
200
2431
  });
201
2432
  }
202
2433
  /**
203
- * Create a new session
2434
+ * OAuth callback
2435
+ *
2436
+ * Handle the OAuth callback from a provider after user authorization.
204
2437
  */
205
- create(options) {
206
- return (options?.client ?? this._client).post({
207
- url: "/session",
2438
+ callback(parameters, options) {
2439
+ const params = buildClientParams([parameters], [
2440
+ {
2441
+ args: [
2442
+ { in: "path", key: "providerID" },
2443
+ { in: "query", key: "directory" },
2444
+ { in: "body", key: "method" },
2445
+ { in: "body", key: "code" },
2446
+ ],
2447
+ },
2448
+ ]);
2449
+ return (options?.client ?? this.client).post({
2450
+ url: "/provider/{providerID}/oauth/callback",
208
2451
  ...options,
2452
+ ...params,
209
2453
  headers: {
210
2454
  "Content-Type": "application/json",
211
2455
  ...options?.headers,
2456
+ ...params.headers,
212
2457
  },
213
2458
  });
214
2459
  }
2460
+ }
2461
+ export class Provider extends HeyApiClient {
215
2462
  /**
216
- * Get session status
2463
+ * List providers
2464
+ *
2465
+ * Get a list of all available AI providers, including both available and connected ones.
217
2466
  */
218
- status(options) {
219
- return (options?.client ?? this._client).get({
220
- url: "/session/status",
2467
+ list(parameters, options) {
2468
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2469
+ return (options?.client ?? this.client).get({
2470
+ url: "/provider",
221
2471
  ...options,
2472
+ ...params,
222
2473
  });
223
2474
  }
224
2475
  /**
225
- * Delete a session and all its data
2476
+ * Get provider auth methods
2477
+ *
2478
+ * Retrieve available authentication methods for all AI providers.
226
2479
  */
227
- delete(options) {
228
- return (options.client ?? this._client).delete({
229
- url: "/session/{id}",
2480
+ auth(parameters, options) {
2481
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2482
+ return (options?.client ?? this.client).get({
2483
+ url: "/provider/auth",
230
2484
  ...options,
2485
+ ...params,
231
2486
  });
232
2487
  }
2488
+ oauth = new Oauth({ client: this.client });
2489
+ }
2490
+ export class Skill extends HeyApiClient {
233
2491
  /**
234
- * Get session
2492
+ * List skills
2493
+ *
2494
+ * Get a list of all available skills in the Synergy system.
235
2495
  */
236
- get(options) {
237
- return (options.client ?? this._client).get({
238
- url: "/session/{id}",
2496
+ list(parameters, options) {
2497
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2498
+ return (options?.client ?? this.client).get({
2499
+ url: "/skill",
239
2500
  ...options,
2501
+ ...params,
240
2502
  });
241
2503
  }
242
2504
  /**
243
- * Update session properties
2505
+ * Reload skills
2506
+ *
2507
+ * Reload all skills by rescanning skill directories.
244
2508
  */
245
- update(options) {
246
- return (options.client ?? this._client).patch({
247
- url: "/session/{id}",
2509
+ reload(parameters, options) {
2510
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2511
+ return (options?.client ?? this.client).post({
2512
+ url: "/skill/reload",
248
2513
  ...options,
249
- headers: {
250
- "Content-Type": "application/json",
251
- ...options.headers,
252
- },
2514
+ ...params,
253
2515
  });
254
2516
  }
255
2517
  /**
256
- * Get a session's children
2518
+ * Delete a skill
2519
+ *
2520
+ * Delete a non-builtin skill by removing its directory from disk.
257
2521
  */
258
- children(options) {
259
- return (options.client ?? this._client).get({
260
- url: "/session/{id}/children",
2522
+ remove(parameters, options) {
2523
+ const params = buildClientParams([parameters], [
2524
+ {
2525
+ args: [
2526
+ { in: "path", key: "name" },
2527
+ { in: "query", key: "directory" },
2528
+ ],
2529
+ },
2530
+ ]);
2531
+ return (options?.client ?? this.client).delete({
2532
+ url: "/skill/{name}",
261
2533
  ...options,
2534
+ ...params,
262
2535
  });
263
2536
  }
264
2537
  /**
265
- * Get the todo list for a session
2538
+ * Import a skill
2539
+ *
2540
+ * Import a skill from a .skill or .zip file. Extracts to the project or global skill directory.
266
2541
  */
267
- todo(options) {
268
- return (options.client ?? this._client).get({
269
- url: "/session/{id}/todo",
2542
+ import(parameters, options) {
2543
+ const params = buildClientParams([parameters], [
2544
+ {
2545
+ args: [
2546
+ { in: "query", key: "directory" },
2547
+ { in: "body", key: "file" },
2548
+ { in: "body", key: "scope" },
2549
+ ],
2550
+ },
2551
+ ]);
2552
+ return (options?.client ?? this.client).post({
2553
+ ...formDataBodySerializer,
2554
+ url: "/skill/import",
270
2555
  ...options,
2556
+ ...params,
2557
+ headers: {
2558
+ "Content-Type": null,
2559
+ ...options?.headers,
2560
+ ...params.headers,
2561
+ },
271
2562
  });
272
2563
  }
273
2564
  /**
274
- * Analyze the app and create an AGENTS.md file
2565
+ * Import a skill from URL
2566
+ *
2567
+ * Download a .zip file from a URL and import it as a skill.
275
2568
  */
276
- init(options) {
277
- return (options.client ?? this._client).post({
278
- url: "/session/{id}/init",
2569
+ importUrl(parameters, options) {
2570
+ const params = buildClientParams([parameters], [
2571
+ {
2572
+ args: [
2573
+ { in: "query", key: "directory" },
2574
+ { in: "body", key: "url" },
2575
+ { in: "body", key: "scope" },
2576
+ ],
2577
+ },
2578
+ ]);
2579
+ return (options?.client ?? this.client).post({
2580
+ url: "/skill/import-url",
279
2581
  ...options,
2582
+ ...params,
280
2583
  headers: {
281
2584
  "Content-Type": "application/json",
282
- ...options.headers,
2585
+ ...options?.headers,
2586
+ ...params.headers,
283
2587
  },
284
2588
  });
285
2589
  }
286
- /**
287
- * Fork an existing session at a specific message
288
- */
289
- fork(options) {
290
- return (options.client ?? this._client).post({
291
- url: "/session/{id}/fork",
292
- ...options,
293
- headers: {
294
- "Content-Type": "application/json",
295
- ...options.headers,
2590
+ }
2591
+ export class Find extends HeyApiClient {
2592
+ /**
2593
+ * Find text
2594
+ *
2595
+ * Search for text patterns across files in the project using ripgrep.
2596
+ */
2597
+ text(parameters, options) {
2598
+ const params = buildClientParams([parameters], [
2599
+ {
2600
+ args: [
2601
+ { in: "query", key: "directory" },
2602
+ { in: "query", key: "pattern" },
2603
+ ],
296
2604
  },
2605
+ ]);
2606
+ return (options?.client ?? this.client).get({
2607
+ url: "/find",
2608
+ ...options,
2609
+ ...params,
297
2610
  });
298
2611
  }
299
2612
  /**
300
- * Abort a session
301
- */
302
- abort(options) {
303
- return (options.client ?? this._client).post({
304
- url: "/session/{id}/abort",
2613
+ * Find files
2614
+ *
2615
+ * Search for files or directories by name or pattern in the project directory.
2616
+ */
2617
+ files(parameters, options) {
2618
+ const params = buildClientParams([parameters], [
2619
+ {
2620
+ args: [
2621
+ { in: "query", key: "directory" },
2622
+ { in: "query", key: "query" },
2623
+ { in: "query", key: "dirs" },
2624
+ { in: "query", key: "type" },
2625
+ { in: "query", key: "limit" },
2626
+ ],
2627
+ },
2628
+ ]);
2629
+ return (options?.client ?? this.client).get({
2630
+ url: "/find/file",
305
2631
  ...options,
2632
+ ...params,
306
2633
  });
307
2634
  }
308
2635
  /**
309
- * Unshare the session
2636
+ * Find symbols
2637
+ *
2638
+ * Search for workspace symbols like functions, classes, and variables using LSP.
310
2639
  */
311
- unshare(options) {
312
- return (options.client ?? this._client).delete({
313
- url: "/session/{id}/share",
2640
+ symbols(parameters, options) {
2641
+ const params = buildClientParams([parameters], [
2642
+ {
2643
+ args: [
2644
+ { in: "query", key: "directory" },
2645
+ { in: "query", key: "query" },
2646
+ ],
2647
+ },
2648
+ ]);
2649
+ return (options?.client ?? this.client).get({
2650
+ url: "/find/symbol",
314
2651
  ...options,
2652
+ ...params,
315
2653
  });
316
2654
  }
317
- /**
318
- * Share a session
319
- */
320
- share(options) {
321
- return (options.client ?? this._client).post({
322
- url: "/session/{id}/share",
2655
+ }
2656
+ export class File extends HeyApiClient {
2657
+ /**
2658
+ * List files
2659
+ *
2660
+ * List files and directories in a specified path.
2661
+ */
2662
+ list(parameters, options) {
2663
+ const params = buildClientParams([parameters], [
2664
+ {
2665
+ args: [
2666
+ { in: "query", key: "directory" },
2667
+ { in: "query", key: "path" },
2668
+ ],
2669
+ },
2670
+ ]);
2671
+ return (options?.client ?? this.client).get({
2672
+ url: "/file",
323
2673
  ...options,
2674
+ ...params,
324
2675
  });
325
2676
  }
326
2677
  /**
327
- * Get the diff for this session
2678
+ * Read file
2679
+ *
2680
+ * Read the content of a specified file.
328
2681
  */
329
- diff(options) {
330
- return (options.client ?? this._client).get({
331
- url: "/session/{id}/diff",
2682
+ read(parameters, options) {
2683
+ const params = buildClientParams([parameters], [
2684
+ {
2685
+ args: [
2686
+ { in: "query", key: "directory" },
2687
+ { in: "query", key: "path" },
2688
+ ],
2689
+ },
2690
+ ]);
2691
+ return (options?.client ?? this.client).get({
2692
+ url: "/file/content",
332
2693
  ...options,
2694
+ ...params,
333
2695
  });
334
2696
  }
335
2697
  /**
336
- * Summarize the session
2698
+ * Get file status
2699
+ *
2700
+ * Get the git status of all files in the project.
337
2701
  */
338
- summarize(options) {
339
- return (options.client ?? this._client).post({
340
- url: "/session/{id}/summarize",
2702
+ status(parameters, options) {
2703
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2704
+ return (options?.client ?? this.client).get({
2705
+ url: "/file/status",
341
2706
  ...options,
2707
+ ...params,
2708
+ });
2709
+ }
2710
+ }
2711
+ export class Experience extends HeyApiClient {
2712
+ /**
2713
+ * Search experiences
2714
+ *
2715
+ * Semantic search across experience records using embedding similarity and Q-value hybrid scoring.
2716
+ */
2717
+ search(parameters, options) {
2718
+ const params = buildClientParams([parameters], [
2719
+ {
2720
+ args: [
2721
+ { in: "query", key: "directory" },
2722
+ { in: "body", key: "query" },
2723
+ { in: "body", key: "scopeID" },
2724
+ { in: "body", key: "topK" },
2725
+ ],
2726
+ },
2727
+ ]);
2728
+ return (options?.client ?? this.client).post({
2729
+ url: "/engram/experience/search",
2730
+ ...options,
2731
+ ...params,
342
2732
  headers: {
343
2733
  "Content-Type": "application/json",
344
- ...options.headers,
2734
+ ...options?.headers,
2735
+ ...params.headers,
345
2736
  },
346
2737
  });
347
2738
  }
348
2739
  /**
349
- * List messages for a session
2740
+ * Delete experience
2741
+ *
2742
+ * Delete a specific experience record permanently.
350
2743
  */
351
- messages(options) {
352
- return (options.client ?? this._client).get({
353
- url: "/session/{id}/message",
2744
+ remove(parameters, options) {
2745
+ const params = buildClientParams([parameters], [
2746
+ {
2747
+ args: [
2748
+ { in: "path", key: "id" },
2749
+ { in: "query", key: "directory" },
2750
+ ],
2751
+ },
2752
+ ]);
2753
+ return (options?.client ?? this.client).delete({
2754
+ url: "/engram/experience/{id}",
354
2755
  ...options,
2756
+ ...params,
355
2757
  });
356
2758
  }
357
2759
  /**
358
- * Create and send a new message to a session
2760
+ * Get experience detail
2761
+ *
2762
+ * Get a specific experience record with its full content (script/raw).
359
2763
  */
360
- prompt(options) {
361
- return (options.client ?? this._client).post({
362
- url: "/session/{id}/message",
363
- ...options,
364
- headers: {
365
- "Content-Type": "application/json",
366
- ...options.headers,
2764
+ get(parameters, options) {
2765
+ const params = buildClientParams([parameters], [
2766
+ {
2767
+ args: [
2768
+ { in: "path", key: "id" },
2769
+ { in: "query", key: "directory" },
2770
+ ],
367
2771
  },
2772
+ ]);
2773
+ return (options?.client ?? this.client).get({
2774
+ url: "/engram/experience/{id}",
2775
+ ...options,
2776
+ ...params,
368
2777
  });
369
2778
  }
370
2779
  /**
371
- * Get a message from a session
2780
+ * Apply reward to experience
2781
+ *
2782
+ * Apply an external reward to a specific experience. Use this to inject rewards from benchmark frameworks or custom evaluation pipelines. Provide either a direct composite reward value, or multi-dimensional reward scores.
372
2783
  */
373
- message(options) {
374
- return (options.client ?? this._client).get({
375
- url: "/session/{id}/message/{messageID}",
2784
+ applyReward(parameters, options) {
2785
+ const params = buildClientParams([parameters], [
2786
+ {
2787
+ args: [
2788
+ { in: "path", key: "id" },
2789
+ { in: "query", key: "directory" },
2790
+ { in: "body", key: "reward" },
2791
+ { in: "body", key: "rewards" },
2792
+ ],
2793
+ },
2794
+ ]);
2795
+ return (options?.client ?? this.client).put({
2796
+ url: "/engram/experience/{id}/reward",
376
2797
  ...options,
2798
+ ...params,
2799
+ headers: {
2800
+ "Content-Type": "application/json",
2801
+ ...options?.headers,
2802
+ ...params.headers,
2803
+ },
377
2804
  });
378
2805
  }
379
2806
  /**
380
- * Create and send a new message to a session, start if needed and return immediately
2807
+ * List experiences
2808
+ *
2809
+ * List all experience records, optionally filtered by project ID.
381
2810
  */
382
- promptAsync(options) {
383
- return (options.client ?? this._client).post({
384
- url: "/session/{id}/prompt_async",
385
- ...options,
386
- headers: {
387
- "Content-Type": "application/json",
388
- ...options.headers,
2811
+ list(parameters, options) {
2812
+ const params = buildClientParams([parameters], [
2813
+ {
2814
+ args: [
2815
+ { in: "query", key: "directory" },
2816
+ { in: "query", key: "scopeID" },
2817
+ ],
389
2818
  },
2819
+ ]);
2820
+ return (options?.client ?? this.client).get({
2821
+ url: "/engram/experience",
2822
+ ...options,
2823
+ ...params,
390
2824
  });
391
2825
  }
2826
+ }
2827
+ export class Engram extends HeyApiClient {
392
2828
  /**
393
- * Send a new command to a session
2829
+ * Get memory stats
2830
+ *
2831
+ * Get statistics about the memory database including counts and file size.
394
2832
  */
395
- command(options) {
396
- return (options.client ?? this._client).post({
397
- url: "/session/{id}/command",
2833
+ stats(parameters, options) {
2834
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2835
+ return (options?.client ?? this.client).get({
2836
+ url: "/engram/stats",
398
2837
  ...options,
399
- headers: {
400
- "Content-Type": "application/json",
401
- ...options.headers,
402
- },
2838
+ ...params,
403
2839
  });
404
2840
  }
405
2841
  /**
406
- * Run a shell command
2842
+ * Search memories
2843
+ *
2844
+ * Semantic search across active memories using embedding similarity. Requires embedding API to be configured.
407
2845
  */
408
- shell(options) {
409
- return (options.client ?? this._client).post({
410
- url: "/session/{id}/shell",
2846
+ search(parameters, options) {
2847
+ const params = buildClientParams([parameters], [
2848
+ {
2849
+ args: [
2850
+ { in: "query", key: "directory" },
2851
+ { in: "body", key: "query" },
2852
+ { in: "body", key: "topK" },
2853
+ ],
2854
+ },
2855
+ ]);
2856
+ return (options?.client ?? this.client).post({
2857
+ url: "/engram/search",
411
2858
  ...options,
2859
+ ...params,
412
2860
  headers: {
413
2861
  "Content-Type": "application/json",
414
- ...options.headers,
2862
+ ...options?.headers,
2863
+ ...params.headers,
415
2864
  },
416
2865
  });
417
2866
  }
418
2867
  /**
419
- * Revert a message
2868
+ * Reset memory data
2869
+ *
2870
+ * Reset (delete) memory data by type. Supports resetting active memories, passive experiences, or both. Requires confirm=true to prevent accidental deletion.
420
2871
  */
421
- revert(options) {
422
- return (options.client ?? this._client).post({
423
- url: "/session/{id}/revert",
2872
+ reset(parameters, options) {
2873
+ const params = buildClientParams([parameters], [
2874
+ {
2875
+ args: [
2876
+ { in: "query", key: "directory" },
2877
+ { in: "body", key: "type" },
2878
+ { in: "body", key: "scopeID" },
2879
+ { in: "body", key: "confirm" },
2880
+ ],
2881
+ },
2882
+ ]);
2883
+ return (options?.client ?? this.client).post({
2884
+ url: "/engram/reset",
424
2885
  ...options,
2886
+ ...params,
425
2887
  headers: {
426
2888
  "Content-Type": "application/json",
427
- ...options.headers,
2889
+ ...options?.headers,
2890
+ ...params.headers,
428
2891
  },
429
2892
  });
430
2893
  }
431
2894
  /**
432
- * Restore all reverted messages
2895
+ * Delete memory
2896
+ *
2897
+ * Delete a specific active memory permanently.
433
2898
  */
434
- unrevert(options) {
435
- return (options.client ?? this._client).post({
436
- url: "/session/{id}/unrevert",
2899
+ remove(parameters, options) {
2900
+ const params = buildClientParams([parameters], [
2901
+ {
2902
+ args: [
2903
+ { in: "path", key: "id" },
2904
+ { in: "query", key: "directory" },
2905
+ ],
2906
+ },
2907
+ ]);
2908
+ return (options?.client ?? this.client).delete({
2909
+ url: "/engram/{id}",
437
2910
  ...options,
2911
+ ...params,
438
2912
  });
439
2913
  }
440
- }
441
- class Command extends _HeyApiClient {
442
2914
  /**
443
- * List all commands
2915
+ * Get memory
2916
+ *
2917
+ * Get a specific active memory by ID.
444
2918
  */
445
- list(options) {
446
- return (options?.client ?? this._client).get({
447
- url: "/command",
2919
+ get(parameters, options) {
2920
+ const params = buildClientParams([parameters], [
2921
+ {
2922
+ args: [
2923
+ { in: "path", key: "id" },
2924
+ { in: "query", key: "directory" },
2925
+ ],
2926
+ },
2927
+ ]);
2928
+ return (options?.client ?? this.client).get({
2929
+ url: "/engram/{id}",
448
2930
  ...options,
2931
+ ...params,
449
2932
  });
450
2933
  }
451
- }
452
- class Oauth extends _HeyApiClient {
453
2934
  /**
454
- * Authorize a provider using OAuth
2935
+ * List memories
2936
+ *
2937
+ * List all active (agent-curated) memories, optionally filtered by category.
455
2938
  */
456
- authorize(options) {
457
- return (options.client ?? this._client).post({
458
- url: "/provider/{id}/oauth/authorize",
459
- ...options,
460
- headers: {
461
- "Content-Type": "application/json",
462
- ...options.headers,
2939
+ list(parameters, options) {
2940
+ const params = buildClientParams([parameters], [
2941
+ {
2942
+ args: [
2943
+ { in: "query", key: "directory" },
2944
+ { in: "query", key: "category" },
2945
+ ],
463
2946
  },
2947
+ ]);
2948
+ return (options?.client ?? this.client).get({
2949
+ url: "/engram",
2950
+ ...options,
2951
+ ...params,
464
2952
  });
465
2953
  }
2954
+ experience = new Experience({ client: this.client });
2955
+ }
2956
+ export class Note extends HeyApiClient {
466
2957
  /**
467
- * Handle OAuth callback for a provider
2958
+ * List all notes grouped by scope
2959
+ *
2960
+ * List all notes across all scopes, grouped by scope ID.
468
2961
  */
469
- callback(options) {
470
- return (options.client ?? this._client).post({
471
- url: "/provider/{id}/oauth/callback",
2962
+ listAll(parameters, options) {
2963
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2964
+ return (options?.client ?? this.client).get({
2965
+ url: "/note/all",
472
2966
  ...options,
473
- headers: {
474
- "Content-Type": "application/json",
475
- ...options.headers,
476
- },
2967
+ ...params,
477
2968
  });
478
2969
  }
479
- }
480
- class Provider extends _HeyApiClient {
481
2970
  /**
482
- * List all providers
2971
+ * Export note
2972
+ *
2973
+ * Export a note as Markdown or HTML.
483
2974
  */
484
- list(options) {
485
- return (options?.client ?? this._client).get({
486
- url: "/provider",
2975
+ export(parameters, options) {
2976
+ const params = buildClientParams([parameters], [
2977
+ {
2978
+ args: [
2979
+ { in: "path", key: "id" },
2980
+ { in: "query", key: "directory" },
2981
+ { in: "query", key: "format" },
2982
+ ],
2983
+ },
2984
+ ]);
2985
+ return (options?.client ?? this.client).get({
2986
+ url: "/note/export/{id}",
487
2987
  ...options,
2988
+ ...params,
488
2989
  });
489
2990
  }
490
2991
  /**
491
- * Get provider authentication methods
2992
+ * List notes
2993
+ *
2994
+ * List all notes for the current scope, including global notes.
492
2995
  */
493
- auth(options) {
494
- return (options?.client ?? this._client).get({
495
- url: "/provider/auth",
2996
+ list(parameters, options) {
2997
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
2998
+ return (options?.client ?? this.client).get({
2999
+ url: "/note",
496
3000
  ...options,
3001
+ ...params,
497
3002
  });
498
3003
  }
499
- oauth = new Oauth({ client: this._client });
500
- }
501
- class Find extends _HeyApiClient {
502
3004
  /**
503
- * Find text in files
3005
+ * Create note
3006
+ *
3007
+ * Create a new note in the current scope.
504
3008
  */
505
- text(options) {
506
- return (options.client ?? this._client).get({
507
- url: "/find",
3009
+ create(parameters, options) {
3010
+ const params = buildClientParams([parameters], [
3011
+ {
3012
+ args: [
3013
+ { in: "query", key: "directory" },
3014
+ { key: "noteCreateInput", map: "body" },
3015
+ ],
3016
+ },
3017
+ ]);
3018
+ return (options?.client ?? this.client).post({
3019
+ url: "/note",
508
3020
  ...options,
3021
+ ...params,
3022
+ headers: {
3023
+ "Content-Type": "application/json",
3024
+ ...options?.headers,
3025
+ ...params.headers,
3026
+ },
509
3027
  });
510
3028
  }
511
3029
  /**
512
- * Find files
3030
+ * Delete note
3031
+ *
3032
+ * Delete a note permanently.
513
3033
  */
514
- files(options) {
515
- return (options.client ?? this._client).get({
516
- url: "/find/file",
3034
+ remove(parameters, options) {
3035
+ const params = buildClientParams([parameters], [
3036
+ {
3037
+ args: [
3038
+ { in: "path", key: "id" },
3039
+ { in: "query", key: "directory" },
3040
+ ],
3041
+ },
3042
+ ]);
3043
+ return (options?.client ?? this.client).delete({
3044
+ url: "/note/{id}",
517
3045
  ...options,
3046
+ ...params,
518
3047
  });
519
3048
  }
520
3049
  /**
521
- * Find workspace symbols
3050
+ * Get note
3051
+ *
3052
+ * Get a specific note by ID.
522
3053
  */
523
- symbols(options) {
524
- return (options.client ?? this._client).get({
525
- url: "/find/symbol",
3054
+ get(parameters, options) {
3055
+ const params = buildClientParams([parameters], [
3056
+ {
3057
+ args: [
3058
+ { in: "path", key: "id" },
3059
+ { in: "query", key: "directory" },
3060
+ ],
3061
+ },
3062
+ ]);
3063
+ return (options?.client ?? this.client).get({
3064
+ url: "/note/{id}",
526
3065
  ...options,
3066
+ ...params,
527
3067
  });
528
3068
  }
529
- }
530
- class File extends _HeyApiClient {
531
3069
  /**
532
- * List files and directories
3070
+ * Update note
3071
+ *
3072
+ * Update a note's content or metadata.
533
3073
  */
534
- list(options) {
535
- return (options.client ?? this._client).get({
536
- url: "/file",
3074
+ update(parameters, options) {
3075
+ const params = buildClientParams([parameters], [
3076
+ {
3077
+ args: [
3078
+ { in: "path", key: "id" },
3079
+ { in: "query", key: "directory" },
3080
+ { key: "notePatchInput", map: "body" },
3081
+ ],
3082
+ },
3083
+ ]);
3084
+ return (options?.client ?? this.client).put({
3085
+ url: "/note/{id}",
537
3086
  ...options,
3087
+ ...params,
3088
+ headers: {
3089
+ "Content-Type": "application/json",
3090
+ ...options?.headers,
3091
+ ...params.headers,
3092
+ },
538
3093
  });
539
3094
  }
540
- /**
541
- * Read a file
542
- */
543
- read(options) {
544
- return (options.client ?? this._client).get({
545
- url: "/file/content",
3095
+ }
3096
+ export class Asset extends HeyApiClient {
3097
+ /**
3098
+ * Upload asset
3099
+ *
3100
+ * Upload a binary asset (image, video, etc.) and get a reference URL.
3101
+ */
3102
+ upload(parameters, options) {
3103
+ const params = buildClientParams([parameters], [
3104
+ {
3105
+ args: [
3106
+ { in: "query", key: "directory" },
3107
+ { in: "body", key: "file" },
3108
+ ],
3109
+ },
3110
+ ]);
3111
+ return (options?.client ?? this.client).post({
3112
+ ...formDataBodySerializer,
3113
+ url: "/asset",
546
3114
  ...options,
3115
+ ...params,
3116
+ headers: {
3117
+ "Content-Type": null,
3118
+ ...options?.headers,
3119
+ ...params.headers,
3120
+ },
547
3121
  });
548
3122
  }
549
3123
  /**
550
- * Get file status
3124
+ * Get asset
3125
+ *
3126
+ * Download a previously uploaded asset.
551
3127
  */
552
- status(options) {
553
- return (options?.client ?? this._client).get({
554
- url: "/file/status",
3128
+ get(parameters, options) {
3129
+ const params = buildClientParams([parameters], [
3130
+ {
3131
+ args: [
3132
+ { in: "path", key: "id" },
3133
+ { in: "query", key: "directory" },
3134
+ ],
3135
+ },
3136
+ ]);
3137
+ return (options?.client ?? this.client).get({
3138
+ url: "/asset/{id}",
555
3139
  ...options,
3140
+ ...params,
556
3141
  });
557
3142
  }
558
3143
  }
559
- class App extends _HeyApiClient {
560
- /**
561
- * Write a log entry to the server logs
562
- */
563
- log(options) {
564
- return (options?.client ?? this._client).post({
3144
+ export class App extends HeyApiClient {
3145
+ /**
3146
+ * Write log
3147
+ *
3148
+ * Write a log entry to the server logs with specified level and metadata.
3149
+ */
3150
+ log(parameters, options) {
3151
+ const params = buildClientParams([parameters], [
3152
+ {
3153
+ args: [
3154
+ { in: "query", key: "directory" },
3155
+ { in: "body", key: "service" },
3156
+ { in: "body", key: "level" },
3157
+ { in: "body", key: "message" },
3158
+ { in: "body", key: "extra" },
3159
+ ],
3160
+ },
3161
+ ]);
3162
+ return (options?.client ?? this.client).post({
565
3163
  url: "/log",
566
3164
  ...options,
3165
+ ...params,
567
3166
  headers: {
568
3167
  "Content-Type": "application/json",
569
3168
  ...options?.headers,
3169
+ ...params.headers,
570
3170
  },
571
3171
  });
572
3172
  }
573
3173
  /**
574
- * List all agents
3174
+ * List agents
3175
+ *
3176
+ * Get a list of all available AI agents in the Synergy system.
575
3177
  */
576
- agents(options) {
577
- return (options?.client ?? this._client).get({
3178
+ agents(parameters, options) {
3179
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3180
+ return (options?.client ?? this.client).get({
578
3181
  url: "/agent",
579
3182
  ...options,
3183
+ ...params,
3184
+ });
3185
+ }
3186
+ /**
3187
+ * Get or create app channel session
3188
+ *
3189
+ * Returns the active Home session, creating one if none exists.
3190
+ */
3191
+ session(parameters, options) {
3192
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3193
+ return (options?.client ?? this.client).get({
3194
+ url: "/channel/app/session",
3195
+ ...options,
3196
+ ...params,
3197
+ });
3198
+ }
3199
+ /**
3200
+ * Reset app channel session
3201
+ *
3202
+ * Archives the current Home session. The next call to get session will create a fresh one.
3203
+ */
3204
+ reset(parameters, options) {
3205
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3206
+ return (options?.client ?? this.client).post({
3207
+ url: "/channel/app/reset",
3208
+ ...options,
3209
+ ...params,
580
3210
  });
581
3211
  }
582
3212
  }
583
- class Auth extends _HeyApiClient {
3213
+ export class Auth extends HeyApiClient {
584
3214
  /**
3215
+ * Remove MCP OAuth
3216
+ *
585
3217
  * Remove OAuth credentials for an MCP server
586
3218
  */
587
- remove(options) {
588
- return (options.client ?? this._client).delete({
3219
+ remove(parameters, options) {
3220
+ const params = buildClientParams([parameters], [
3221
+ {
3222
+ args: [
3223
+ { in: "path", key: "name" },
3224
+ { in: "query", key: "directory" },
3225
+ ],
3226
+ },
3227
+ ]);
3228
+ return (options?.client ?? this.client).delete({
589
3229
  url: "/mcp/{name}/auth",
590
3230
  ...options,
3231
+ ...params,
591
3232
  });
592
3233
  }
593
3234
  /**
594
- * Start OAuth authentication flow for an MCP server
3235
+ * Start MCP OAuth
3236
+ *
3237
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
595
3238
  */
596
- start(options) {
597
- return (options.client ?? this._client).post({
3239
+ start(parameters, options) {
3240
+ const params = buildClientParams([parameters], [
3241
+ {
3242
+ args: [
3243
+ { in: "path", key: "name" },
3244
+ { in: "query", key: "directory" },
3245
+ ],
3246
+ },
3247
+ ]);
3248
+ return (options?.client ?? this.client).post({
598
3249
  url: "/mcp/{name}/auth",
599
3250
  ...options,
3251
+ ...params,
600
3252
  });
601
3253
  }
602
3254
  /**
603
- * Complete OAuth authentication with authorization code
3255
+ * Complete MCP OAuth
3256
+ *
3257
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
604
3258
  */
605
- callback(options) {
606
- return (options.client ?? this._client).post({
3259
+ callback(parameters, options) {
3260
+ const params = buildClientParams([parameters], [
3261
+ {
3262
+ args: [
3263
+ { in: "path", key: "name" },
3264
+ { in: "query", key: "directory" },
3265
+ { in: "body", key: "code" },
3266
+ ],
3267
+ },
3268
+ ]);
3269
+ return (options?.client ?? this.client).post({
607
3270
  url: "/mcp/{name}/auth/callback",
608
3271
  ...options,
3272
+ ...params,
609
3273
  headers: {
610
3274
  "Content-Type": "application/json",
611
- ...options.headers,
3275
+ ...options?.headers,
3276
+ ...params.headers,
612
3277
  },
613
3278
  });
614
3279
  }
615
3280
  /**
3281
+ * Authenticate MCP OAuth
3282
+ *
616
3283
  * Start OAuth flow and wait for callback (opens browser)
617
3284
  */
618
- authenticate(options) {
619
- return (options.client ?? this._client).post({
3285
+ authenticate(parameters, options) {
3286
+ const params = buildClientParams([parameters], [
3287
+ {
3288
+ args: [
3289
+ { in: "path", key: "name" },
3290
+ { in: "query", key: "directory" },
3291
+ ],
3292
+ },
3293
+ ]);
3294
+ return (options?.client ?? this.client).post({
620
3295
  url: "/mcp/{name}/auth/authenticate",
621
3296
  ...options,
3297
+ ...params,
622
3298
  });
623
3299
  }
624
3300
  /**
3301
+ * Set auth credentials
3302
+ *
625
3303
  * Set authentication credentials
626
3304
  */
627
- set(options) {
628
- return (options.client ?? this._client).put({
629
- url: "/auth/{id}",
3305
+ set(parameters, options) {
3306
+ const params = buildClientParams([parameters], [
3307
+ {
3308
+ args: [
3309
+ { in: "path", key: "providerID" },
3310
+ { in: "query", key: "directory" },
3311
+ { key: "auth", map: "body" },
3312
+ ],
3313
+ },
3314
+ ]);
3315
+ return (options?.client ?? this.client).put({
3316
+ url: "/auth/{providerID}",
630
3317
  ...options,
3318
+ ...params,
631
3319
  headers: {
632
3320
  "Content-Type": "application/json",
633
- ...options.headers,
3321
+ ...options?.headers,
3322
+ ...params.headers,
634
3323
  },
635
3324
  });
636
3325
  }
637
3326
  }
638
- class Mcp extends _HeyApiClient {
3327
+ export class Mcp extends HeyApiClient {
639
3328
  /**
640
- * Get MCP server status
3329
+ * Get MCP status
3330
+ *
3331
+ * Get the status of all Model Context Protocol (MCP) servers.
641
3332
  */
642
- status(options) {
643
- return (options?.client ?? this._client).get({
3333
+ status(parameters, options) {
3334
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3335
+ return (options?.client ?? this.client).get({
644
3336
  url: "/mcp",
645
3337
  ...options,
3338
+ ...params,
646
3339
  });
647
3340
  }
648
3341
  /**
649
- * Add MCP server dynamically
3342
+ * Add MCP server
3343
+ *
3344
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
650
3345
  */
651
- add(options) {
652
- return (options?.client ?? this._client).post({
3346
+ add(parameters, options) {
3347
+ const params = buildClientParams([parameters], [
3348
+ {
3349
+ args: [
3350
+ { in: "query", key: "directory" },
3351
+ { in: "body", key: "name" },
3352
+ { in: "body", key: "config" },
3353
+ ],
3354
+ },
3355
+ ]);
3356
+ return (options?.client ?? this.client).post({
653
3357
  url: "/mcp",
654
3358
  ...options,
3359
+ ...params,
655
3360
  headers: {
656
3361
  "Content-Type": "application/json",
657
3362
  ...options?.headers,
3363
+ ...params.headers,
658
3364
  },
659
3365
  });
660
3366
  }
661
3367
  /**
662
3368
  * Connect an MCP server
663
3369
  */
664
- connect(options) {
665
- return (options.client ?? this._client).post({
3370
+ connect(parameters, options) {
3371
+ const params = buildClientParams([parameters], [
3372
+ {
3373
+ args: [
3374
+ { in: "path", key: "name" },
3375
+ { in: "query", key: "directory" },
3376
+ ],
3377
+ },
3378
+ ]);
3379
+ return (options?.client ?? this.client).post({
666
3380
  url: "/mcp/{name}/connect",
667
3381
  ...options,
3382
+ ...params,
668
3383
  });
669
3384
  }
670
3385
  /**
671
3386
  * Disconnect an MCP server
672
3387
  */
673
- disconnect(options) {
674
- return (options.client ?? this._client).post({
3388
+ disconnect(parameters, options) {
3389
+ const params = buildClientParams([parameters], [
3390
+ {
3391
+ args: [
3392
+ { in: "path", key: "name" },
3393
+ { in: "query", key: "directory" },
3394
+ ],
3395
+ },
3396
+ ]);
3397
+ return (options?.client ?? this.client).post({
675
3398
  url: "/mcp/{name}/disconnect",
676
3399
  ...options,
3400
+ ...params,
3401
+ });
3402
+ }
3403
+ auth = new Auth({ client: this.client });
3404
+ }
3405
+ export class Genesis extends HeyApiClient {
3406
+ /**
3407
+ * Get or create genesis channel session
3408
+ *
3409
+ * Returns the active Genesis setup session, creating one if none exists.
3410
+ */
3411
+ session(parameters, options) {
3412
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3413
+ return (options?.client ?? this.client).get({
3414
+ url: "/channel/genesis/session",
3415
+ ...options,
3416
+ ...params,
3417
+ });
3418
+ }
3419
+ /**
3420
+ * Reset genesis channel session
3421
+ *
3422
+ * Archives the current Genesis session. The next call to get session will create a fresh one.
3423
+ */
3424
+ reset(parameters, options) {
3425
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3426
+ return (options?.client ?? this.client).post({
3427
+ url: "/channel/genesis/reset",
3428
+ ...options,
3429
+ ...params,
3430
+ });
3431
+ }
3432
+ }
3433
+ export class Channel extends HeyApiClient {
3434
+ /**
3435
+ * Get channel status
3436
+ *
3437
+ * Get the status of all messaging channel connections
3438
+ */
3439
+ status(parameters, options) {
3440
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3441
+ return (options?.client ?? this.client).get({
3442
+ url: "/channel",
3443
+ ...options,
3444
+ ...params,
3445
+ });
3446
+ }
3447
+ /**
3448
+ * Disconnect channel account
3449
+ *
3450
+ * Disconnect a specific channel account
3451
+ */
3452
+ disconnect(parameters, options) {
3453
+ const params = buildClientParams([parameters], [
3454
+ {
3455
+ args: [
3456
+ { in: "path", key: "channelType" },
3457
+ { in: "path", key: "accountId" },
3458
+ { in: "query", key: "directory" },
3459
+ ],
3460
+ },
3461
+ ]);
3462
+ return (options?.client ?? this.client).post({
3463
+ url: "/channel/{channelType}/{accountId}/disconnect",
3464
+ ...options,
3465
+ ...params,
3466
+ });
3467
+ }
3468
+ app = new App({ client: this.client });
3469
+ genesis = new Genesis({ client: this.client });
3470
+ }
3471
+ export class Resource extends HeyApiClient {
3472
+ /**
3473
+ * Get MCP resources
3474
+ *
3475
+ * Get all available MCP resources from connected servers. Optionally filter by name.
3476
+ */
3477
+ list(parameters, options) {
3478
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3479
+ return (options?.client ?? this.client).get({
3480
+ url: "/experimental/resource",
3481
+ ...options,
3482
+ ...params,
677
3483
  });
678
3484
  }
679
- auth = new Auth({ client: this._client });
680
3485
  }
681
- class Lsp extends _HeyApiClient {
3486
+ export class Experimental extends HeyApiClient {
3487
+ resource = new Resource({ client: this.client });
3488
+ }
3489
+ export class Lsp extends HeyApiClient {
682
3490
  /**
3491
+ * Get LSP status
3492
+ *
683
3493
  * Get LSP server status
684
3494
  */
685
- status(options) {
686
- return (options?.client ?? this._client).get({
3495
+ status(parameters, options) {
3496
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3497
+ return (options?.client ?? this.client).get({
687
3498
  url: "/lsp",
688
3499
  ...options,
3500
+ ...params,
689
3501
  });
690
3502
  }
691
3503
  }
692
- class Formatter extends _HeyApiClient {
3504
+ export class Formatter extends HeyApiClient {
693
3505
  /**
3506
+ * Get formatter status
3507
+ *
694
3508
  * Get formatter status
695
3509
  */
696
- status(options) {
697
- return (options?.client ?? this._client).get({
3510
+ status(parameters, options) {
3511
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3512
+ return (options?.client ?? this.client).get({
698
3513
  url: "/formatter",
699
3514
  ...options,
3515
+ ...params,
700
3516
  });
701
3517
  }
702
3518
  }
703
- class Control extends _HeyApiClient {
3519
+ export class Control extends HeyApiClient {
704
3520
  /**
705
- * Get the next TUI request from the queue
3521
+ * Get next TUI request
3522
+ *
3523
+ * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
706
3524
  */
707
- next(options) {
708
- return (options?.client ?? this._client).get({
3525
+ next(parameters, options) {
3526
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3527
+ return (options?.client ?? this.client).get({
709
3528
  url: "/tui/control/next",
710
3529
  ...options,
3530
+ ...params,
711
3531
  });
712
3532
  }
713
3533
  /**
714
- * Submit a response to the TUI request queue
3534
+ * Submit TUI response
3535
+ *
3536
+ * Submit a response to the TUI request queue to complete a pending request.
715
3537
  */
716
- response(options) {
717
- return (options?.client ?? this._client).post({
3538
+ response(parameters, options) {
3539
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }, { in: "body" }] }]);
3540
+ return (options?.client ?? this.client).post({
718
3541
  url: "/tui/control/response",
719
3542
  ...options,
3543
+ ...params,
720
3544
  headers: {
721
3545
  "Content-Type": "application/json",
722
3546
  ...options?.headers,
3547
+ ...params.headers,
723
3548
  },
724
3549
  });
725
3550
  }
726
3551
  }
727
- class Tui extends _HeyApiClient {
3552
+ export class Tui extends HeyApiClient {
728
3553
  /**
3554
+ * Append TUI prompt
3555
+ *
729
3556
  * Append prompt to the TUI
730
3557
  */
731
- appendPrompt(options) {
732
- return (options?.client ?? this._client).post({
3558
+ appendPrompt(parameters, options) {
3559
+ const params = buildClientParams([parameters], [
3560
+ {
3561
+ args: [
3562
+ { in: "query", key: "directory" },
3563
+ { in: "body", key: "text" },
3564
+ ],
3565
+ },
3566
+ ]);
3567
+ return (options?.client ?? this.client).post({
733
3568
  url: "/tui/append-prompt",
734
3569
  ...options,
3570
+ ...params,
735
3571
  headers: {
736
3572
  "Content-Type": "application/json",
737
3573
  ...options?.headers,
3574
+ ...params.headers,
738
3575
  },
739
3576
  });
740
3577
  }
741
3578
  /**
742
- * Open the help dialog
3579
+ * Open help dialog
3580
+ *
3581
+ * Open the help dialog in the TUI to display user assistance information.
743
3582
  */
744
- openHelp(options) {
745
- return (options?.client ?? this._client).post({
3583
+ openHelp(parameters, options) {
3584
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3585
+ return (options?.client ?? this.client).post({
746
3586
  url: "/tui/open-help",
747
3587
  ...options,
3588
+ ...params,
748
3589
  });
749
3590
  }
750
3591
  /**
3592
+ * Open sessions dialog
3593
+ *
751
3594
  * Open the session dialog
752
3595
  */
753
- openSessions(options) {
754
- return (options?.client ?? this._client).post({
3596
+ openSessions(parameters, options) {
3597
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3598
+ return (options?.client ?? this.client).post({
755
3599
  url: "/tui/open-sessions",
756
3600
  ...options,
3601
+ ...params,
757
3602
  });
758
3603
  }
759
3604
  /**
3605
+ * Open themes dialog
3606
+ *
760
3607
  * Open the theme dialog
761
3608
  */
762
- openThemes(options) {
763
- return (options?.client ?? this._client).post({
3609
+ openThemes(parameters, options) {
3610
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3611
+ return (options?.client ?? this.client).post({
764
3612
  url: "/tui/open-themes",
765
3613
  ...options,
3614
+ ...params,
766
3615
  });
767
3616
  }
768
3617
  /**
3618
+ * Open models dialog
3619
+ *
769
3620
  * Open the model dialog
770
3621
  */
771
- openModels(options) {
772
- return (options?.client ?? this._client).post({
3622
+ openModels(parameters, options) {
3623
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3624
+ return (options?.client ?? this.client).post({
773
3625
  url: "/tui/open-models",
774
3626
  ...options,
3627
+ ...params,
775
3628
  });
776
3629
  }
777
3630
  /**
3631
+ * Submit TUI prompt
3632
+ *
778
3633
  * Submit the prompt
779
3634
  */
780
- submitPrompt(options) {
781
- return (options?.client ?? this._client).post({
3635
+ submitPrompt(parameters, options) {
3636
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3637
+ return (options?.client ?? this.client).post({
782
3638
  url: "/tui/submit-prompt",
783
3639
  ...options,
3640
+ ...params,
784
3641
  });
785
3642
  }
786
3643
  /**
3644
+ * Clear TUI prompt
3645
+ *
787
3646
  * Clear the prompt
788
3647
  */
789
- clearPrompt(options) {
790
- return (options?.client ?? this._client).post({
3648
+ clearPrompt(parameters, options) {
3649
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3650
+ return (options?.client ?? this.client).post({
791
3651
  url: "/tui/clear-prompt",
792
3652
  ...options,
3653
+ ...params,
793
3654
  });
794
3655
  }
795
3656
  /**
3657
+ * Execute TUI command
3658
+ *
796
3659
  * Execute a TUI command (e.g. agent_cycle)
797
3660
  */
798
- executeCommand(options) {
799
- return (options?.client ?? this._client).post({
3661
+ executeCommand(parameters, options) {
3662
+ const params = buildClientParams([parameters], [
3663
+ {
3664
+ args: [
3665
+ { in: "query", key: "directory" },
3666
+ { in: "body", key: "command" },
3667
+ ],
3668
+ },
3669
+ ]);
3670
+ return (options?.client ?? this.client).post({
800
3671
  url: "/tui/execute-command",
801
3672
  ...options,
3673
+ ...params,
802
3674
  headers: {
803
3675
  "Content-Type": "application/json",
804
3676
  ...options?.headers,
3677
+ ...params.headers,
805
3678
  },
806
3679
  });
807
3680
  }
808
3681
  /**
3682
+ * Show TUI toast
3683
+ *
809
3684
  * Show a toast notification in the TUI
810
3685
  */
811
- showToast(options) {
812
- return (options?.client ?? this._client).post({
3686
+ showToast(parameters, options) {
3687
+ const params = buildClientParams([parameters], [
3688
+ {
3689
+ args: [
3690
+ { in: "query", key: "directory" },
3691
+ { in: "body", key: "title" },
3692
+ { in: "body", key: "message" },
3693
+ { in: "body", key: "variant" },
3694
+ { in: "body", key: "duration" },
3695
+ ],
3696
+ },
3697
+ ]);
3698
+ return (options?.client ?? this.client).post({
813
3699
  url: "/tui/show-toast",
814
3700
  ...options,
3701
+ ...params,
815
3702
  headers: {
816
3703
  "Content-Type": "application/json",
817
3704
  ...options?.headers,
3705
+ ...params.headers,
818
3706
  },
819
3707
  });
820
3708
  }
821
3709
  /**
3710
+ * Publish TUI event
3711
+ *
822
3712
  * Publish a TUI event
823
3713
  */
824
- publish(options) {
825
- return (options?.client ?? this._client).post({
3714
+ publish(parameters, options) {
3715
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }, { in: "body" }] }]);
3716
+ return (options?.client ?? this.client).post({
826
3717
  url: "/tui/publish",
827
3718
  ...options,
3719
+ ...params,
828
3720
  headers: {
829
3721
  "Content-Type": "application/json",
830
3722
  ...options?.headers,
3723
+ ...params.headers,
831
3724
  },
832
3725
  });
833
3726
  }
834
- control = new Control({ client: this._client });
835
- }
836
- class Event extends _HeyApiClient {
837
3727
  /**
838
- * Get events
3728
+ * Select session
3729
+ *
3730
+ * Navigate the TUI to display the specified session.
839
3731
  */
840
- subscribe(options) {
841
- return (options?.client ?? this._client).get.sse({
842
- url: "/event",
3732
+ selectSession(parameters, options) {
3733
+ const params = buildClientParams([parameters], [
3734
+ {
3735
+ args: [
3736
+ { in: "query", key: "directory" },
3737
+ { in: "body", key: "sessionID" },
3738
+ ],
3739
+ },
3740
+ ]);
3741
+ return (options?.client ?? this.client).post({
3742
+ url: "/tui/select-session",
843
3743
  ...options,
3744
+ ...params,
3745
+ headers: {
3746
+ "Content-Type": "application/json",
3747
+ ...options?.headers,
3748
+ ...params.headers,
3749
+ },
844
3750
  });
845
3751
  }
3752
+ control = new Control({ client: this.client });
846
3753
  }
847
- export class OpencodeClient extends _HeyApiClient {
3754
+ export class Event extends HeyApiClient {
848
3755
  /**
849
- * Respond to a permission request
3756
+ * Subscribe to events
3757
+ *
3758
+ * Get events
850
3759
  */
851
- postSessionIdPermissionsPermissionId(options) {
852
- return (options.client ?? this._client).post({
853
- url: "/session/{id}/permissions/{permissionID}",
3760
+ subscribe(parameters, options) {
3761
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
3762
+ return (options?.client ?? this.client).sse.get({
3763
+ url: "/event",
854
3764
  ...options,
855
- headers: {
856
- "Content-Type": "application/json",
857
- ...options.headers,
858
- },
3765
+ ...params,
859
3766
  });
860
3767
  }
861
- global = new Global({ client: this._client });
862
- project = new Project({ client: this._client });
863
- pty = new Pty({ client: this._client });
864
- config = new Config({ client: this._client });
865
- tool = new Tool({ client: this._client });
866
- instance = new Instance({ client: this._client });
867
- path = new Path({ client: this._client });
868
- vcs = new Vcs({ client: this._client });
869
- session = new Session({ client: this._client });
870
- command = new Command({ client: this._client });
871
- provider = new Provider({ client: this._client });
872
- find = new Find({ client: this._client });
873
- file = new File({ client: this._client });
874
- app = new App({ client: this._client });
875
- mcp = new Mcp({ client: this._client });
876
- lsp = new Lsp({ client: this._client });
877
- formatter = new Formatter({ client: this._client });
878
- tui = new Tui({ client: this._client });
879
- auth = new Auth({ client: this._client });
880
- event = new Event({ client: this._client });
3768
+ }
3769
+ export class SynergyClient extends HeyApiClient {
3770
+ static __registry = new HeyApiRegistry();
3771
+ constructor(args) {
3772
+ super(args);
3773
+ SynergyClient.__registry.set(this, args?.key);
3774
+ }
3775
+ global = new Global({ client: this.client });
3776
+ holos = new Holos({ client: this.client });
3777
+ scope = new Scope({ client: this.client });
3778
+ git = new Git({ client: this.client });
3779
+ pty = new Pty({ client: this.client });
3780
+ config = new Config({ client: this.client });
3781
+ runtime = new Runtime({ client: this.client });
3782
+ tool = new Tool({ client: this.client });
3783
+ instance = new Instance({ client: this.client });
3784
+ path = new Path({ client: this.client });
3785
+ worktree = new Worktree({ client: this.client });
3786
+ vcs = new Vcs({ client: this.client });
3787
+ session = new Session({ client: this.client });
3788
+ part = new Part({ client: this.client });
3789
+ permission = new Permission({ client: this.client });
3790
+ question = new Question({ client: this.client });
3791
+ cortex = new Cortex({ client: this.client });
3792
+ command = new Command({ client: this.client });
3793
+ provider = new Provider({ client: this.client });
3794
+ skill = new Skill({ client: this.client });
3795
+ find = new Find({ client: this.client });
3796
+ file = new File({ client: this.client });
3797
+ engram = new Engram({ client: this.client });
3798
+ agenda = new Agenda({ client: this.client });
3799
+ note = new Note({ client: this.client });
3800
+ asset = new Asset({ client: this.client });
3801
+ app = new App({ client: this.client });
3802
+ mcp = new Mcp({ client: this.client });
3803
+ channel = new Channel({ client: this.client });
3804
+ experimental = new Experimental({ client: this.client });
3805
+ lsp = new Lsp({ client: this.client });
3806
+ formatter = new Formatter({ client: this.client });
3807
+ tui = new Tui({ client: this.client });
3808
+ auth = new Auth({ client: this.client });
3809
+ event = new Event({ client: this.client });
881
3810
  }