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