@pixelml/sdk 0.0.0-dev-202512250746

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/client.d.ts +7 -0
  2. package/dist/client.js +25 -0
  3. package/dist/gen/client/client.gen.d.ts +2 -0
  4. package/dist/gen/client/client.gen.js +165 -0
  5. package/dist/gen/client/index.d.ts +7 -0
  6. package/dist/gen/client/index.js +5 -0
  7. package/dist/gen/client/types.gen.d.ts +127 -0
  8. package/dist/gen/client/types.gen.js +2 -0
  9. package/dist/gen/client/utils.gen.d.ts +38 -0
  10. package/dist/gen/client/utils.gen.js +226 -0
  11. package/dist/gen/client.gen.d.ts +12 -0
  12. package/dist/gen/client.gen.js +5 -0
  13. package/dist/gen/core/auth.gen.d.ts +18 -0
  14. package/dist/gen/core/auth.gen.js +14 -0
  15. package/dist/gen/core/bodySerializer.gen.d.ts +17 -0
  16. package/dist/gen/core/bodySerializer.gen.js +57 -0
  17. package/dist/gen/core/params.gen.d.ts +33 -0
  18. package/dist/gen/core/params.gen.js +89 -0
  19. package/dist/gen/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/gen/core/pathSerializer.gen.js +106 -0
  21. package/dist/gen/core/serverSentEvents.gen.d.ts +59 -0
  22. package/dist/gen/core/serverSentEvents.gen.js +117 -0
  23. package/dist/gen/core/types.gen.d.ts +78 -0
  24. package/dist/gen/core/types.gen.js +2 -0
  25. package/dist/gen/core/utils.gen.d.ts +14 -0
  26. package/dist/gen/core/utils.gen.js +69 -0
  27. package/dist/gen/sdk.gen.d.ts +403 -0
  28. package/dist/gen/sdk.gen.js +881 -0
  29. package/dist/gen/types.gen.d.ts +3368 -0
  30. package/dist/gen/types.gen.js +2 -0
  31. package/dist/index.d.ts +10 -0
  32. package/dist/index.js +16 -0
  33. package/dist/server.d.ts +23 -0
  34. package/dist/server.js +91 -0
  35. package/dist/v2/client.d.ts +7 -0
  36. package/dist/v2/client.js +25 -0
  37. package/dist/v2/gen/client/client.gen.d.ts +2 -0
  38. package/dist/v2/gen/client/client.gen.js +225 -0
  39. package/dist/v2/gen/client/index.d.ts +8 -0
  40. package/dist/v2/gen/client/index.js +6 -0
  41. package/dist/v2/gen/client/types.gen.d.ts +117 -0
  42. package/dist/v2/gen/client/types.gen.js +2 -0
  43. package/dist/v2/gen/client/utils.gen.d.ts +33 -0
  44. package/dist/v2/gen/client/utils.gen.js +226 -0
  45. package/dist/v2/gen/client.gen.d.ts +12 -0
  46. package/dist/v2/gen/client.gen.js +3 -0
  47. package/dist/v2/gen/core/auth.gen.d.ts +18 -0
  48. package/dist/v2/gen/core/auth.gen.js +14 -0
  49. package/dist/v2/gen/core/bodySerializer.gen.d.ts +25 -0
  50. package/dist/v2/gen/core/bodySerializer.gen.js +57 -0
  51. package/dist/v2/gen/core/params.gen.d.ts +43 -0
  52. package/dist/v2/gen/core/params.gen.js +102 -0
  53. package/dist/v2/gen/core/pathSerializer.gen.d.ts +33 -0
  54. package/dist/v2/gen/core/pathSerializer.gen.js +106 -0
  55. package/dist/v2/gen/core/queryKeySerializer.gen.d.ts +18 -0
  56. package/dist/v2/gen/core/queryKeySerializer.gen.js +93 -0
  57. package/dist/v2/gen/core/serverSentEvents.gen.d.ts +71 -0
  58. package/dist/v2/gen/core/serverSentEvents.gen.js +131 -0
  59. package/dist/v2/gen/core/types.gen.d.ts +78 -0
  60. package/dist/v2/gen/core/types.gen.js +2 -0
  61. package/dist/v2/gen/core/utils.gen.d.ts +19 -0
  62. package/dist/v2/gen/core/utils.gen.js +87 -0
  63. package/dist/v2/gen/sdk.gen.d.ts +902 -0
  64. package/dist/v2/gen/sdk.gen.js +1726 -0
  65. package/dist/v2/gen/types.gen.d.ts +3719 -0
  66. package/dist/v2/gen/types.gen.js +2 -0
  67. package/dist/v2/index.d.ts +10 -0
  68. package/dist/v2/index.js +16 -0
  69. package/dist/v2/server.d.ts +23 -0
  70. package/dist/v2/server.js +91 -0
  71. package/package.json +50 -0
@@ -0,0 +1,1726 @@
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 ClawClient()" 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 Claw 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 Claw 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 Claw 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 Claw.
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 Claw 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 Claw.
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 Claw 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 Claw 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 Claw 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 Claw 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 Vcs extends HeyApiClient {
365
+ /**
366
+ * Get VCS info
367
+ *
368
+ * Retrieve version control system (VCS) information for the current project, such as git branch.
369
+ */
370
+ get(parameters, options) {
371
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
372
+ return (options?.client ?? this.client).get({
373
+ url: "/vcs",
374
+ ...options,
375
+ ...params,
376
+ });
377
+ }
378
+ }
379
+ export class Session extends HeyApiClient {
380
+ /**
381
+ * List sessions
382
+ *
383
+ * Get a list of all Claw sessions, sorted by most recently updated.
384
+ */
385
+ list(parameters, options) {
386
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
387
+ return (options?.client ?? this.client).get({
388
+ url: "/session",
389
+ ...options,
390
+ ...params,
391
+ });
392
+ }
393
+ /**
394
+ * Create session
395
+ *
396
+ * Create a new Claw session for interacting with AI assistants and managing conversations.
397
+ */
398
+ create(parameters, options) {
399
+ const params = buildClientParams([parameters], [
400
+ {
401
+ args: [
402
+ { in: "query", key: "directory" },
403
+ { in: "body", key: "parentID" },
404
+ { in: "body", key: "title" },
405
+ ],
406
+ },
407
+ ]);
408
+ return (options?.client ?? this.client).post({
409
+ url: "/session",
410
+ ...options,
411
+ ...params,
412
+ headers: {
413
+ "Content-Type": "application/json",
414
+ ...options?.headers,
415
+ ...params.headers,
416
+ },
417
+ });
418
+ }
419
+ /**
420
+ * Get session status
421
+ *
422
+ * Retrieve the current status of all sessions, including active, idle, and completed states.
423
+ */
424
+ status(parameters, options) {
425
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
426
+ return (options?.client ?? this.client).get({
427
+ url: "/session/status",
428
+ ...options,
429
+ ...params,
430
+ });
431
+ }
432
+ /**
433
+ * Delete session
434
+ *
435
+ * Delete a session and permanently remove all associated data, including messages and history.
436
+ */
437
+ delete(parameters, options) {
438
+ const params = buildClientParams([parameters], [
439
+ {
440
+ args: [
441
+ { in: "path", key: "sessionID" },
442
+ { in: "query", key: "directory" },
443
+ ],
444
+ },
445
+ ]);
446
+ return (options?.client ?? this.client).delete({
447
+ url: "/session/{sessionID}",
448
+ ...options,
449
+ ...params,
450
+ });
451
+ }
452
+ /**
453
+ * Get session
454
+ *
455
+ * Retrieve detailed information about a specific Claw session.
456
+ */
457
+ get(parameters, options) {
458
+ const params = buildClientParams([parameters], [
459
+ {
460
+ args: [
461
+ { in: "path", key: "sessionID" },
462
+ { in: "query", key: "directory" },
463
+ ],
464
+ },
465
+ ]);
466
+ return (options?.client ?? this.client).get({
467
+ url: "/session/{sessionID}",
468
+ ...options,
469
+ ...params,
470
+ });
471
+ }
472
+ /**
473
+ * Update session
474
+ *
475
+ * Update properties of an existing session, such as title or other metadata.
476
+ */
477
+ update(parameters, options) {
478
+ const params = buildClientParams([parameters], [
479
+ {
480
+ args: [
481
+ { in: "path", key: "sessionID" },
482
+ { in: "query", key: "directory" },
483
+ { in: "body", key: "title" },
484
+ { in: "body", key: "time" },
485
+ ],
486
+ },
487
+ ]);
488
+ return (options?.client ?? this.client).patch({
489
+ url: "/session/{sessionID}",
490
+ ...options,
491
+ ...params,
492
+ headers: {
493
+ "Content-Type": "application/json",
494
+ ...options?.headers,
495
+ ...params.headers,
496
+ },
497
+ });
498
+ }
499
+ /**
500
+ * Get session children
501
+ *
502
+ * Retrieve all child sessions that were forked from the specified parent session.
503
+ */
504
+ children(parameters, options) {
505
+ const params = buildClientParams([parameters], [
506
+ {
507
+ args: [
508
+ { in: "path", key: "sessionID" },
509
+ { in: "query", key: "directory" },
510
+ ],
511
+ },
512
+ ]);
513
+ return (options?.client ?? this.client).get({
514
+ url: "/session/{sessionID}/children",
515
+ ...options,
516
+ ...params,
517
+ });
518
+ }
519
+ /**
520
+ * Get session todos
521
+ *
522
+ * Retrieve the todo list associated with a specific session, showing tasks and action items.
523
+ */
524
+ todo(parameters, options) {
525
+ const params = buildClientParams([parameters], [
526
+ {
527
+ args: [
528
+ { in: "path", key: "sessionID" },
529
+ { in: "query", key: "directory" },
530
+ ],
531
+ },
532
+ ]);
533
+ return (options?.client ?? this.client).get({
534
+ url: "/session/{sessionID}/todo",
535
+ ...options,
536
+ ...params,
537
+ });
538
+ }
539
+ /**
540
+ * Initialize session
541
+ *
542
+ * Analyze the current application and create an AGENTS.md file with project-specific agent configurations.
543
+ */
544
+ init(parameters, options) {
545
+ const params = buildClientParams([parameters], [
546
+ {
547
+ args: [
548
+ { in: "path", key: "sessionID" },
549
+ { in: "query", key: "directory" },
550
+ { in: "body", key: "modelID" },
551
+ { in: "body", key: "providerID" },
552
+ { in: "body", key: "messageID" },
553
+ ],
554
+ },
555
+ ]);
556
+ return (options?.client ?? this.client).post({
557
+ url: "/session/{sessionID}/init",
558
+ ...options,
559
+ ...params,
560
+ headers: {
561
+ "Content-Type": "application/json",
562
+ ...options?.headers,
563
+ ...params.headers,
564
+ },
565
+ });
566
+ }
567
+ /**
568
+ * Fork session
569
+ *
570
+ * Create a new session by forking an existing session at a specific message point.
571
+ */
572
+ fork(parameters, options) {
573
+ const params = buildClientParams([parameters], [
574
+ {
575
+ args: [
576
+ { in: "path", key: "sessionID" },
577
+ { in: "query", key: "directory" },
578
+ { in: "body", key: "messageID" },
579
+ ],
580
+ },
581
+ ]);
582
+ return (options?.client ?? this.client).post({
583
+ url: "/session/{sessionID}/fork",
584
+ ...options,
585
+ ...params,
586
+ headers: {
587
+ "Content-Type": "application/json",
588
+ ...options?.headers,
589
+ ...params.headers,
590
+ },
591
+ });
592
+ }
593
+ /**
594
+ * Abort session
595
+ *
596
+ * Abort an active session and stop any ongoing AI processing or command execution.
597
+ */
598
+ abort(parameters, options) {
599
+ const params = buildClientParams([parameters], [
600
+ {
601
+ args: [
602
+ { in: "path", key: "sessionID" },
603
+ { in: "query", key: "directory" },
604
+ ],
605
+ },
606
+ ]);
607
+ return (options?.client ?? this.client).post({
608
+ url: "/session/{sessionID}/abort",
609
+ ...options,
610
+ ...params,
611
+ });
612
+ }
613
+ /**
614
+ * Unshare session
615
+ *
616
+ * Remove the shareable link for a session, making it private again.
617
+ */
618
+ unshare(parameters, options) {
619
+ const params = buildClientParams([parameters], [
620
+ {
621
+ args: [
622
+ { in: "path", key: "sessionID" },
623
+ { in: "query", key: "directory" },
624
+ ],
625
+ },
626
+ ]);
627
+ return (options?.client ?? this.client).delete({
628
+ url: "/session/{sessionID}/share",
629
+ ...options,
630
+ ...params,
631
+ });
632
+ }
633
+ /**
634
+ * Share session
635
+ *
636
+ * Create a shareable link for a session, allowing others to view the conversation.
637
+ */
638
+ share(parameters, options) {
639
+ const params = buildClientParams([parameters], [
640
+ {
641
+ args: [
642
+ { in: "path", key: "sessionID" },
643
+ { in: "query", key: "directory" },
644
+ ],
645
+ },
646
+ ]);
647
+ return (options?.client ?? this.client).post({
648
+ url: "/session/{sessionID}/share",
649
+ ...options,
650
+ ...params,
651
+ });
652
+ }
653
+ /**
654
+ * Get session diff
655
+ *
656
+ * Get all file changes (diffs) made during this session.
657
+ */
658
+ diff(parameters, options) {
659
+ const params = buildClientParams([parameters], [
660
+ {
661
+ args: [
662
+ { in: "path", key: "sessionID" },
663
+ { in: "query", key: "directory" },
664
+ { in: "query", key: "messageID" },
665
+ ],
666
+ },
667
+ ]);
668
+ return (options?.client ?? this.client).get({
669
+ url: "/session/{sessionID}/diff",
670
+ ...options,
671
+ ...params,
672
+ });
673
+ }
674
+ /**
675
+ * Summarize session
676
+ *
677
+ * Generate a concise summary of the session using AI compaction to preserve key information.
678
+ */
679
+ summarize(parameters, options) {
680
+ const params = buildClientParams([parameters], [
681
+ {
682
+ args: [
683
+ { in: "path", key: "sessionID" },
684
+ { in: "query", key: "directory" },
685
+ { in: "body", key: "providerID" },
686
+ { in: "body", key: "modelID" },
687
+ { in: "body", key: "auto" },
688
+ ],
689
+ },
690
+ ]);
691
+ return (options?.client ?? this.client).post({
692
+ url: "/session/{sessionID}/summarize",
693
+ ...options,
694
+ ...params,
695
+ headers: {
696
+ "Content-Type": "application/json",
697
+ ...options?.headers,
698
+ ...params.headers,
699
+ },
700
+ });
701
+ }
702
+ /**
703
+ * Get session messages
704
+ *
705
+ * Retrieve all messages in a session, including user prompts and AI responses.
706
+ */
707
+ messages(parameters, options) {
708
+ const params = buildClientParams([parameters], [
709
+ {
710
+ args: [
711
+ { in: "path", key: "sessionID" },
712
+ { in: "query", key: "directory" },
713
+ { in: "query", key: "limit" },
714
+ ],
715
+ },
716
+ ]);
717
+ return (options?.client ?? this.client).get({
718
+ url: "/session/{sessionID}/message",
719
+ ...options,
720
+ ...params,
721
+ });
722
+ }
723
+ /**
724
+ * Send message
725
+ *
726
+ * Create and send a new message to a session, streaming the AI response.
727
+ */
728
+ prompt(parameters, options) {
729
+ const params = buildClientParams([parameters], [
730
+ {
731
+ args: [
732
+ { in: "path", key: "sessionID" },
733
+ { in: "query", key: "directory" },
734
+ { in: "body", key: "messageID" },
735
+ { in: "body", key: "model" },
736
+ { in: "body", key: "agent" },
737
+ { in: "body", key: "noReply" },
738
+ { in: "body", key: "tools" },
739
+ { in: "body", key: "system" },
740
+ { in: "body", key: "parts" },
741
+ ],
742
+ },
743
+ ]);
744
+ return (options?.client ?? this.client).post({
745
+ url: "/session/{sessionID}/message",
746
+ ...options,
747
+ ...params,
748
+ headers: {
749
+ "Content-Type": "application/json",
750
+ ...options?.headers,
751
+ ...params.headers,
752
+ },
753
+ });
754
+ }
755
+ /**
756
+ * Get message
757
+ *
758
+ * Retrieve a specific message from a session by its message ID.
759
+ */
760
+ message(parameters, options) {
761
+ const params = buildClientParams([parameters], [
762
+ {
763
+ args: [
764
+ { in: "path", key: "sessionID" },
765
+ { in: "path", key: "messageID" },
766
+ { in: "query", key: "directory" },
767
+ ],
768
+ },
769
+ ]);
770
+ return (options?.client ?? this.client).get({
771
+ url: "/session/{sessionID}/message/{messageID}",
772
+ ...options,
773
+ ...params,
774
+ });
775
+ }
776
+ /**
777
+ * Send async message
778
+ *
779
+ * Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.
780
+ */
781
+ promptAsync(parameters, options) {
782
+ const params = buildClientParams([parameters], [
783
+ {
784
+ args: [
785
+ { in: "path", key: "sessionID" },
786
+ { in: "query", key: "directory" },
787
+ { in: "body", key: "messageID" },
788
+ { in: "body", key: "model" },
789
+ { in: "body", key: "agent" },
790
+ { in: "body", key: "noReply" },
791
+ { in: "body", key: "tools" },
792
+ { in: "body", key: "system" },
793
+ { in: "body", key: "parts" },
794
+ ],
795
+ },
796
+ ]);
797
+ return (options?.client ?? this.client).post({
798
+ url: "/session/{sessionID}/prompt_async",
799
+ ...options,
800
+ ...params,
801
+ headers: {
802
+ "Content-Type": "application/json",
803
+ ...options?.headers,
804
+ ...params.headers,
805
+ },
806
+ });
807
+ }
808
+ /**
809
+ * Send command
810
+ *
811
+ * Send a new command to a session for execution by the AI assistant.
812
+ */
813
+ command(parameters, options) {
814
+ const params = buildClientParams([parameters], [
815
+ {
816
+ args: [
817
+ { in: "path", key: "sessionID" },
818
+ { in: "query", key: "directory" },
819
+ { in: "body", key: "messageID" },
820
+ { in: "body", key: "agent" },
821
+ { in: "body", key: "model" },
822
+ { in: "body", key: "arguments" },
823
+ { in: "body", key: "command" },
824
+ ],
825
+ },
826
+ ]);
827
+ return (options?.client ?? this.client).post({
828
+ url: "/session/{sessionID}/command",
829
+ ...options,
830
+ ...params,
831
+ headers: {
832
+ "Content-Type": "application/json",
833
+ ...options?.headers,
834
+ ...params.headers,
835
+ },
836
+ });
837
+ }
838
+ /**
839
+ * Run shell command
840
+ *
841
+ * Execute a shell command within the session context and return the AI's response.
842
+ */
843
+ shell(parameters, options) {
844
+ const params = buildClientParams([parameters], [
845
+ {
846
+ args: [
847
+ { in: "path", key: "sessionID" },
848
+ { in: "query", key: "directory" },
849
+ { in: "body", key: "agent" },
850
+ { in: "body", key: "model" },
851
+ { in: "body", key: "command" },
852
+ ],
853
+ },
854
+ ]);
855
+ return (options?.client ?? this.client).post({
856
+ url: "/session/{sessionID}/shell",
857
+ ...options,
858
+ ...params,
859
+ headers: {
860
+ "Content-Type": "application/json",
861
+ ...options?.headers,
862
+ ...params.headers,
863
+ },
864
+ });
865
+ }
866
+ /**
867
+ * Revert message
868
+ *
869
+ * Revert a specific message in a session, undoing its effects and restoring the previous state.
870
+ */
871
+ revert(parameters, options) {
872
+ const params = buildClientParams([parameters], [
873
+ {
874
+ args: [
875
+ { in: "path", key: "sessionID" },
876
+ { in: "query", key: "directory" },
877
+ { in: "body", key: "messageID" },
878
+ { in: "body", key: "partID" },
879
+ ],
880
+ },
881
+ ]);
882
+ return (options?.client ?? this.client).post({
883
+ url: "/session/{sessionID}/revert",
884
+ ...options,
885
+ ...params,
886
+ headers: {
887
+ "Content-Type": "application/json",
888
+ ...options?.headers,
889
+ ...params.headers,
890
+ },
891
+ });
892
+ }
893
+ /**
894
+ * Restore reverted messages
895
+ *
896
+ * Restore all previously reverted messages in a session.
897
+ */
898
+ unrevert(parameters, options) {
899
+ const params = buildClientParams([parameters], [
900
+ {
901
+ args: [
902
+ { in: "path", key: "sessionID" },
903
+ { in: "query", key: "directory" },
904
+ ],
905
+ },
906
+ ]);
907
+ return (options?.client ?? this.client).post({
908
+ url: "/session/{sessionID}/unrevert",
909
+ ...options,
910
+ ...params,
911
+ });
912
+ }
913
+ }
914
+ export class Part extends HeyApiClient {
915
+ /**
916
+ * Delete a part from a message
917
+ */
918
+ delete(parameters, options) {
919
+ const params = buildClientParams([parameters], [
920
+ {
921
+ args: [
922
+ { in: "path", key: "sessionID" },
923
+ { in: "path", key: "messageID" },
924
+ { in: "path", key: "partID" },
925
+ { in: "query", key: "directory" },
926
+ ],
927
+ },
928
+ ]);
929
+ return (options?.client ?? this.client).delete({
930
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
931
+ ...options,
932
+ ...params,
933
+ });
934
+ }
935
+ /**
936
+ * Update a part in a message
937
+ */
938
+ update(parameters, options) {
939
+ const params = buildClientParams([parameters], [
940
+ {
941
+ args: [
942
+ { in: "path", key: "sessionID" },
943
+ { in: "path", key: "messageID" },
944
+ { in: "path", key: "partID" },
945
+ { in: "query", key: "directory" },
946
+ { key: "part", map: "body" },
947
+ ],
948
+ },
949
+ ]);
950
+ return (options?.client ?? this.client).patch({
951
+ url: "/session/{sessionID}/message/{messageID}/part/{partID}",
952
+ ...options,
953
+ ...params,
954
+ headers: {
955
+ "Content-Type": "application/json",
956
+ ...options?.headers,
957
+ ...params.headers,
958
+ },
959
+ });
960
+ }
961
+ }
962
+ export class Permission extends HeyApiClient {
963
+ /**
964
+ * Respond to permission
965
+ *
966
+ * Approve or deny a permission request from the AI assistant.
967
+ */
968
+ respond(parameters, options) {
969
+ const params = buildClientParams([parameters], [
970
+ {
971
+ args: [
972
+ { in: "path", key: "sessionID" },
973
+ { in: "path", key: "permissionID" },
974
+ { in: "query", key: "directory" },
975
+ { in: "body", key: "response" },
976
+ ],
977
+ },
978
+ ]);
979
+ return (options?.client ?? this.client).post({
980
+ url: "/session/{sessionID}/permissions/{permissionID}",
981
+ ...options,
982
+ ...params,
983
+ headers: {
984
+ "Content-Type": "application/json",
985
+ ...options?.headers,
986
+ ...params.headers,
987
+ },
988
+ });
989
+ }
990
+ }
991
+ export class Command extends HeyApiClient {
992
+ /**
993
+ * List commands
994
+ *
995
+ * Get a list of all available commands in the Claw system.
996
+ */
997
+ list(parameters, options) {
998
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
999
+ return (options?.client ?? this.client).get({
1000
+ url: "/command",
1001
+ ...options,
1002
+ ...params,
1003
+ });
1004
+ }
1005
+ }
1006
+ export class Oauth extends HeyApiClient {
1007
+ /**
1008
+ * OAuth authorize
1009
+ *
1010
+ * Initiate OAuth authorization for a specific AI provider to get an authorization URL.
1011
+ */
1012
+ authorize(parameters, options) {
1013
+ const params = buildClientParams([parameters], [
1014
+ {
1015
+ args: [
1016
+ { in: "path", key: "providerID" },
1017
+ { in: "query", key: "directory" },
1018
+ { in: "body", key: "method" },
1019
+ ],
1020
+ },
1021
+ ]);
1022
+ return (options?.client ?? this.client).post({
1023
+ url: "/provider/{providerID}/oauth/authorize",
1024
+ ...options,
1025
+ ...params,
1026
+ headers: {
1027
+ "Content-Type": "application/json",
1028
+ ...options?.headers,
1029
+ ...params.headers,
1030
+ },
1031
+ });
1032
+ }
1033
+ /**
1034
+ * OAuth callback
1035
+ *
1036
+ * Handle the OAuth callback from a provider after user authorization.
1037
+ */
1038
+ callback(parameters, options) {
1039
+ const params = buildClientParams([parameters], [
1040
+ {
1041
+ args: [
1042
+ { in: "path", key: "providerID" },
1043
+ { in: "query", key: "directory" },
1044
+ { in: "body", key: "method" },
1045
+ { in: "body", key: "code" },
1046
+ ],
1047
+ },
1048
+ ]);
1049
+ return (options?.client ?? this.client).post({
1050
+ url: "/provider/{providerID}/oauth/callback",
1051
+ ...options,
1052
+ ...params,
1053
+ headers: {
1054
+ "Content-Type": "application/json",
1055
+ ...options?.headers,
1056
+ ...params.headers,
1057
+ },
1058
+ });
1059
+ }
1060
+ }
1061
+ export class Provider extends HeyApiClient {
1062
+ /**
1063
+ * List providers
1064
+ *
1065
+ * Get a list of all available AI providers, including both available and connected ones.
1066
+ */
1067
+ list(parameters, options) {
1068
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1069
+ return (options?.client ?? this.client).get({
1070
+ url: "/provider",
1071
+ ...options,
1072
+ ...params,
1073
+ });
1074
+ }
1075
+ /**
1076
+ * Get provider auth methods
1077
+ *
1078
+ * Retrieve available authentication methods for all AI providers.
1079
+ */
1080
+ auth(parameters, options) {
1081
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1082
+ return (options?.client ?? this.client).get({
1083
+ url: "/provider/auth",
1084
+ ...options,
1085
+ ...params,
1086
+ });
1087
+ }
1088
+ oauth = new Oauth({ client: this.client });
1089
+ }
1090
+ export class Find extends HeyApiClient {
1091
+ /**
1092
+ * Find text
1093
+ *
1094
+ * Search for text patterns across files in the project using ripgrep.
1095
+ */
1096
+ text(parameters, options) {
1097
+ const params = buildClientParams([parameters], [
1098
+ {
1099
+ args: [
1100
+ { in: "query", key: "directory" },
1101
+ { in: "query", key: "pattern" },
1102
+ ],
1103
+ },
1104
+ ]);
1105
+ return (options?.client ?? this.client).get({
1106
+ url: "/find",
1107
+ ...options,
1108
+ ...params,
1109
+ });
1110
+ }
1111
+ /**
1112
+ * Find files
1113
+ *
1114
+ * Search for files by name or pattern in the project directory.
1115
+ */
1116
+ files(parameters, options) {
1117
+ const params = buildClientParams([parameters], [
1118
+ {
1119
+ args: [
1120
+ { in: "query", key: "directory" },
1121
+ { in: "query", key: "query" },
1122
+ { in: "query", key: "dirs" },
1123
+ ],
1124
+ },
1125
+ ]);
1126
+ return (options?.client ?? this.client).get({
1127
+ url: "/find/file",
1128
+ ...options,
1129
+ ...params,
1130
+ });
1131
+ }
1132
+ /**
1133
+ * Find symbols
1134
+ *
1135
+ * Search for workspace symbols like functions, classes, and variables using LSP.
1136
+ */
1137
+ symbols(parameters, options) {
1138
+ const params = buildClientParams([parameters], [
1139
+ {
1140
+ args: [
1141
+ { in: "query", key: "directory" },
1142
+ { in: "query", key: "query" },
1143
+ ],
1144
+ },
1145
+ ]);
1146
+ return (options?.client ?? this.client).get({
1147
+ url: "/find/symbol",
1148
+ ...options,
1149
+ ...params,
1150
+ });
1151
+ }
1152
+ }
1153
+ export class File extends HeyApiClient {
1154
+ /**
1155
+ * List files
1156
+ *
1157
+ * List files and directories in a specified path.
1158
+ */
1159
+ list(parameters, options) {
1160
+ const params = buildClientParams([parameters], [
1161
+ {
1162
+ args: [
1163
+ { in: "query", key: "directory" },
1164
+ { in: "query", key: "path" },
1165
+ ],
1166
+ },
1167
+ ]);
1168
+ return (options?.client ?? this.client).get({
1169
+ url: "/file",
1170
+ ...options,
1171
+ ...params,
1172
+ });
1173
+ }
1174
+ /**
1175
+ * Read file
1176
+ *
1177
+ * Read the content of a specified file.
1178
+ */
1179
+ read(parameters, options) {
1180
+ const params = buildClientParams([parameters], [
1181
+ {
1182
+ args: [
1183
+ { in: "query", key: "directory" },
1184
+ { in: "query", key: "path" },
1185
+ ],
1186
+ },
1187
+ ]);
1188
+ return (options?.client ?? this.client).get({
1189
+ url: "/file/content",
1190
+ ...options,
1191
+ ...params,
1192
+ });
1193
+ }
1194
+ /**
1195
+ * Get file status
1196
+ *
1197
+ * Get the git status of all files in the project.
1198
+ */
1199
+ status(parameters, options) {
1200
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1201
+ return (options?.client ?? this.client).get({
1202
+ url: "/file/status",
1203
+ ...options,
1204
+ ...params,
1205
+ });
1206
+ }
1207
+ }
1208
+ export class App extends HeyApiClient {
1209
+ /**
1210
+ * Write log
1211
+ *
1212
+ * Write a log entry to the server logs with specified level and metadata.
1213
+ */
1214
+ log(parameters, options) {
1215
+ const params = buildClientParams([parameters], [
1216
+ {
1217
+ args: [
1218
+ { in: "query", key: "directory" },
1219
+ { in: "body", key: "service" },
1220
+ { in: "body", key: "level" },
1221
+ { in: "body", key: "message" },
1222
+ { in: "body", key: "extra" },
1223
+ ],
1224
+ },
1225
+ ]);
1226
+ return (options?.client ?? this.client).post({
1227
+ url: "/log",
1228
+ ...options,
1229
+ ...params,
1230
+ headers: {
1231
+ "Content-Type": "application/json",
1232
+ ...options?.headers,
1233
+ ...params.headers,
1234
+ },
1235
+ });
1236
+ }
1237
+ /**
1238
+ * List agents
1239
+ *
1240
+ * Get a list of all available AI agents in the Claw system.
1241
+ */
1242
+ agents(parameters, options) {
1243
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1244
+ return (options?.client ?? this.client).get({
1245
+ url: "/agent",
1246
+ ...options,
1247
+ ...params,
1248
+ });
1249
+ }
1250
+ }
1251
+ export class Auth extends HeyApiClient {
1252
+ /**
1253
+ * Remove MCP OAuth
1254
+ *
1255
+ * Remove OAuth credentials for an MCP server
1256
+ */
1257
+ remove(parameters, options) {
1258
+ const params = buildClientParams([parameters], [
1259
+ {
1260
+ args: [
1261
+ { in: "path", key: "name" },
1262
+ { in: "query", key: "directory" },
1263
+ ],
1264
+ },
1265
+ ]);
1266
+ return (options?.client ?? this.client).delete({
1267
+ url: "/mcp/{name}/auth",
1268
+ ...options,
1269
+ ...params,
1270
+ });
1271
+ }
1272
+ /**
1273
+ * Start MCP OAuth
1274
+ *
1275
+ * Start OAuth authentication flow for a Model Context Protocol (MCP) server.
1276
+ */
1277
+ start(parameters, options) {
1278
+ const params = buildClientParams([parameters], [
1279
+ {
1280
+ args: [
1281
+ { in: "path", key: "name" },
1282
+ { in: "query", key: "directory" },
1283
+ ],
1284
+ },
1285
+ ]);
1286
+ return (options?.client ?? this.client).post({
1287
+ url: "/mcp/{name}/auth",
1288
+ ...options,
1289
+ ...params,
1290
+ });
1291
+ }
1292
+ /**
1293
+ * Complete MCP OAuth
1294
+ *
1295
+ * Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.
1296
+ */
1297
+ callback(parameters, options) {
1298
+ const params = buildClientParams([parameters], [
1299
+ {
1300
+ args: [
1301
+ { in: "path", key: "name" },
1302
+ { in: "query", key: "directory" },
1303
+ { in: "body", key: "code" },
1304
+ ],
1305
+ },
1306
+ ]);
1307
+ return (options?.client ?? this.client).post({
1308
+ url: "/mcp/{name}/auth/callback",
1309
+ ...options,
1310
+ ...params,
1311
+ headers: {
1312
+ "Content-Type": "application/json",
1313
+ ...options?.headers,
1314
+ ...params.headers,
1315
+ },
1316
+ });
1317
+ }
1318
+ /**
1319
+ * Authenticate MCP OAuth
1320
+ *
1321
+ * Start OAuth flow and wait for callback (opens browser)
1322
+ */
1323
+ authenticate(parameters, options) {
1324
+ const params = buildClientParams([parameters], [
1325
+ {
1326
+ args: [
1327
+ { in: "path", key: "name" },
1328
+ { in: "query", key: "directory" },
1329
+ ],
1330
+ },
1331
+ ]);
1332
+ return (options?.client ?? this.client).post({
1333
+ url: "/mcp/{name}/auth/authenticate",
1334
+ ...options,
1335
+ ...params,
1336
+ });
1337
+ }
1338
+ /**
1339
+ * Set auth credentials
1340
+ *
1341
+ * Set authentication credentials
1342
+ */
1343
+ set(parameters, options) {
1344
+ const params = buildClientParams([parameters], [
1345
+ {
1346
+ args: [
1347
+ { in: "path", key: "providerID" },
1348
+ { in: "query", key: "directory" },
1349
+ { key: "auth", map: "body" },
1350
+ ],
1351
+ },
1352
+ ]);
1353
+ return (options?.client ?? this.client).put({
1354
+ url: "/auth/{providerID}",
1355
+ ...options,
1356
+ ...params,
1357
+ headers: {
1358
+ "Content-Type": "application/json",
1359
+ ...options?.headers,
1360
+ ...params.headers,
1361
+ },
1362
+ });
1363
+ }
1364
+ }
1365
+ export class Mcp extends HeyApiClient {
1366
+ /**
1367
+ * Get MCP status
1368
+ *
1369
+ * Get the status of all Model Context Protocol (MCP) servers.
1370
+ */
1371
+ status(parameters, options) {
1372
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1373
+ return (options?.client ?? this.client).get({
1374
+ url: "/mcp",
1375
+ ...options,
1376
+ ...params,
1377
+ });
1378
+ }
1379
+ /**
1380
+ * Add MCP server
1381
+ *
1382
+ * Dynamically add a new Model Context Protocol (MCP) server to the system.
1383
+ */
1384
+ add(parameters, options) {
1385
+ const params = buildClientParams([parameters], [
1386
+ {
1387
+ args: [
1388
+ { in: "query", key: "directory" },
1389
+ { in: "body", key: "name" },
1390
+ { in: "body", key: "config" },
1391
+ ],
1392
+ },
1393
+ ]);
1394
+ return (options?.client ?? this.client).post({
1395
+ url: "/mcp",
1396
+ ...options,
1397
+ ...params,
1398
+ headers: {
1399
+ "Content-Type": "application/json",
1400
+ ...options?.headers,
1401
+ ...params.headers,
1402
+ },
1403
+ });
1404
+ }
1405
+ /**
1406
+ * Connect an MCP server
1407
+ */
1408
+ connect(parameters, options) {
1409
+ const params = buildClientParams([parameters], [
1410
+ {
1411
+ args: [
1412
+ { in: "path", key: "name" },
1413
+ { in: "query", key: "directory" },
1414
+ ],
1415
+ },
1416
+ ]);
1417
+ return (options?.client ?? this.client).post({
1418
+ url: "/mcp/{name}/connect",
1419
+ ...options,
1420
+ ...params,
1421
+ });
1422
+ }
1423
+ /**
1424
+ * Disconnect an MCP server
1425
+ */
1426
+ disconnect(parameters, options) {
1427
+ const params = buildClientParams([parameters], [
1428
+ {
1429
+ args: [
1430
+ { in: "path", key: "name" },
1431
+ { in: "query", key: "directory" },
1432
+ ],
1433
+ },
1434
+ ]);
1435
+ return (options?.client ?? this.client).post({
1436
+ url: "/mcp/{name}/disconnect",
1437
+ ...options,
1438
+ ...params,
1439
+ });
1440
+ }
1441
+ auth = new Auth({ client: this.client });
1442
+ }
1443
+ export class Lsp extends HeyApiClient {
1444
+ /**
1445
+ * Get LSP status
1446
+ *
1447
+ * Get LSP server status
1448
+ */
1449
+ status(parameters, options) {
1450
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1451
+ return (options?.client ?? this.client).get({
1452
+ url: "/lsp",
1453
+ ...options,
1454
+ ...params,
1455
+ });
1456
+ }
1457
+ }
1458
+ export class Formatter extends HeyApiClient {
1459
+ /**
1460
+ * Get formatter status
1461
+ *
1462
+ * Get formatter status
1463
+ */
1464
+ status(parameters, options) {
1465
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1466
+ return (options?.client ?? this.client).get({
1467
+ url: "/formatter",
1468
+ ...options,
1469
+ ...params,
1470
+ });
1471
+ }
1472
+ }
1473
+ export class Control extends HeyApiClient {
1474
+ /**
1475
+ * Get next TUI request
1476
+ *
1477
+ * Retrieve the next TUI (Terminal User Interface) request from the queue for processing.
1478
+ */
1479
+ next(parameters, options) {
1480
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1481
+ return (options?.client ?? this.client).get({
1482
+ url: "/tui/control/next",
1483
+ ...options,
1484
+ ...params,
1485
+ });
1486
+ }
1487
+ /**
1488
+ * Submit TUI response
1489
+ *
1490
+ * Submit a response to the TUI request queue to complete a pending request.
1491
+ */
1492
+ response(parameters, options) {
1493
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }, { in: "body" }] }]);
1494
+ return (options?.client ?? this.client).post({
1495
+ url: "/tui/control/response",
1496
+ ...options,
1497
+ ...params,
1498
+ headers: {
1499
+ "Content-Type": "application/json",
1500
+ ...options?.headers,
1501
+ ...params.headers,
1502
+ },
1503
+ });
1504
+ }
1505
+ }
1506
+ export class Tui extends HeyApiClient {
1507
+ /**
1508
+ * Append TUI prompt
1509
+ *
1510
+ * Append prompt to the TUI
1511
+ */
1512
+ appendPrompt(parameters, options) {
1513
+ const params = buildClientParams([parameters], [
1514
+ {
1515
+ args: [
1516
+ { in: "query", key: "directory" },
1517
+ { in: "body", key: "text" },
1518
+ ],
1519
+ },
1520
+ ]);
1521
+ return (options?.client ?? this.client).post({
1522
+ url: "/tui/append-prompt",
1523
+ ...options,
1524
+ ...params,
1525
+ headers: {
1526
+ "Content-Type": "application/json",
1527
+ ...options?.headers,
1528
+ ...params.headers,
1529
+ },
1530
+ });
1531
+ }
1532
+ /**
1533
+ * Open help dialog
1534
+ *
1535
+ * Open the help dialog in the TUI to display user assistance information.
1536
+ */
1537
+ openHelp(parameters, options) {
1538
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1539
+ return (options?.client ?? this.client).post({
1540
+ url: "/tui/open-help",
1541
+ ...options,
1542
+ ...params,
1543
+ });
1544
+ }
1545
+ /**
1546
+ * Open sessions dialog
1547
+ *
1548
+ * Open the session dialog
1549
+ */
1550
+ openSessions(parameters, options) {
1551
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1552
+ return (options?.client ?? this.client).post({
1553
+ url: "/tui/open-sessions",
1554
+ ...options,
1555
+ ...params,
1556
+ });
1557
+ }
1558
+ /**
1559
+ * Open themes dialog
1560
+ *
1561
+ * Open the theme dialog
1562
+ */
1563
+ openThemes(parameters, options) {
1564
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1565
+ return (options?.client ?? this.client).post({
1566
+ url: "/tui/open-themes",
1567
+ ...options,
1568
+ ...params,
1569
+ });
1570
+ }
1571
+ /**
1572
+ * Open models dialog
1573
+ *
1574
+ * Open the model dialog
1575
+ */
1576
+ openModels(parameters, options) {
1577
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1578
+ return (options?.client ?? this.client).post({
1579
+ url: "/tui/open-models",
1580
+ ...options,
1581
+ ...params,
1582
+ });
1583
+ }
1584
+ /**
1585
+ * Submit TUI prompt
1586
+ *
1587
+ * Submit the prompt
1588
+ */
1589
+ submitPrompt(parameters, options) {
1590
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1591
+ return (options?.client ?? this.client).post({
1592
+ url: "/tui/submit-prompt",
1593
+ ...options,
1594
+ ...params,
1595
+ });
1596
+ }
1597
+ /**
1598
+ * Clear TUI prompt
1599
+ *
1600
+ * Clear the prompt
1601
+ */
1602
+ clearPrompt(parameters, options) {
1603
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1604
+ return (options?.client ?? this.client).post({
1605
+ url: "/tui/clear-prompt",
1606
+ ...options,
1607
+ ...params,
1608
+ });
1609
+ }
1610
+ /**
1611
+ * Execute TUI command
1612
+ *
1613
+ * Execute a TUI command (e.g. agent_cycle)
1614
+ */
1615
+ executeCommand(parameters, options) {
1616
+ const params = buildClientParams([parameters], [
1617
+ {
1618
+ args: [
1619
+ { in: "query", key: "directory" },
1620
+ { in: "body", key: "command" },
1621
+ ],
1622
+ },
1623
+ ]);
1624
+ return (options?.client ?? this.client).post({
1625
+ url: "/tui/execute-command",
1626
+ ...options,
1627
+ ...params,
1628
+ headers: {
1629
+ "Content-Type": "application/json",
1630
+ ...options?.headers,
1631
+ ...params.headers,
1632
+ },
1633
+ });
1634
+ }
1635
+ /**
1636
+ * Show TUI toast
1637
+ *
1638
+ * Show a toast notification in the TUI
1639
+ */
1640
+ showToast(parameters, options) {
1641
+ const params = buildClientParams([parameters], [
1642
+ {
1643
+ args: [
1644
+ { in: "query", key: "directory" },
1645
+ { in: "body", key: "title" },
1646
+ { in: "body", key: "message" },
1647
+ { in: "body", key: "variant" },
1648
+ { in: "body", key: "duration" },
1649
+ ],
1650
+ },
1651
+ ]);
1652
+ return (options?.client ?? this.client).post({
1653
+ url: "/tui/show-toast",
1654
+ ...options,
1655
+ ...params,
1656
+ headers: {
1657
+ "Content-Type": "application/json",
1658
+ ...options?.headers,
1659
+ ...params.headers,
1660
+ },
1661
+ });
1662
+ }
1663
+ /**
1664
+ * Publish TUI event
1665
+ *
1666
+ * Publish a TUI event
1667
+ */
1668
+ publish(parameters, options) {
1669
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }, { in: "body" }] }]);
1670
+ return (options?.client ?? this.client).post({
1671
+ url: "/tui/publish",
1672
+ ...options,
1673
+ ...params,
1674
+ headers: {
1675
+ "Content-Type": "application/json",
1676
+ ...options?.headers,
1677
+ ...params.headers,
1678
+ },
1679
+ });
1680
+ }
1681
+ control = new Control({ client: this.client });
1682
+ }
1683
+ export class Event extends HeyApiClient {
1684
+ /**
1685
+ * Subscribe to events
1686
+ *
1687
+ * Get events
1688
+ */
1689
+ subscribe(parameters, options) {
1690
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "directory" }] }]);
1691
+ return (options?.client ?? this.client).sse.get({
1692
+ url: "/event",
1693
+ ...options,
1694
+ ...params,
1695
+ });
1696
+ }
1697
+ }
1698
+ export class ClawClient extends HeyApiClient {
1699
+ static __registry = new HeyApiRegistry();
1700
+ constructor(args) {
1701
+ super(args);
1702
+ ClawClient.__registry.set(this, args?.key);
1703
+ }
1704
+ global = new Global({ client: this.client });
1705
+ project = new Project({ client: this.client });
1706
+ pty = new Pty({ client: this.client });
1707
+ config = new Config({ client: this.client });
1708
+ tool = new Tool({ client: this.client });
1709
+ instance = new Instance({ client: this.client });
1710
+ path = new Path({ client: this.client });
1711
+ vcs = new Vcs({ client: this.client });
1712
+ session = new Session({ client: this.client });
1713
+ part = new Part({ client: this.client });
1714
+ permission = new Permission({ client: this.client });
1715
+ command = new Command({ client: this.client });
1716
+ provider = new Provider({ client: this.client });
1717
+ find = new Find({ client: this.client });
1718
+ file = new File({ client: this.client });
1719
+ app = new App({ client: this.client });
1720
+ mcp = new Mcp({ client: this.client });
1721
+ lsp = new Lsp({ client: this.client });
1722
+ formatter = new Formatter({ client: this.client });
1723
+ tui = new Tui({ client: this.client });
1724
+ auth = new Auth({ client: this.client });
1725
+ event = new Event({ client: this.client });
1726
+ }