@100xprompt/sdk 0.0.0-dev-202607191034

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