@cyberstrike-io/sdk 0.0.0-dev-202603171927

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