@nikcli-ai/sdk 0.0.6

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