@saeeol/sdk 7.3.3 → 7.3.4

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 (39) hide show
  1. package/package.json +2 -2
  2. package/src/client.ts +64 -0
  3. package/src/gen/client/client.gen.ts +215 -0
  4. package/src/gen/client/index.ts +25 -0
  5. package/src/gen/client/types.gen.ts +222 -0
  6. package/src/gen/client/utils.gen.ts +287 -0
  7. package/src/gen/client.gen.ts +22 -0
  8. package/src/gen/core/auth.gen.ts +41 -0
  9. package/src/gen/core/bodySerializer.gen.ts +74 -0
  10. package/src/gen/core/params.gen.ts +144 -0
  11. package/src/gen/core/pathSerializer.gen.ts +167 -0
  12. package/src/gen/core/queryKeySerializer.gen.ts +111 -0
  13. package/src/gen/core/serverSentEvents.gen.ts +210 -0
  14. package/src/gen/core/types.gen.ts +91 -0
  15. package/src/gen/core/utils.gen.ts +109 -0
  16. package/src/gen/sdk.gen.ts +1197 -0
  17. package/src/gen/types.gen.ts +3905 -0
  18. package/src/index.ts +21 -0
  19. package/src/process.ts +31 -0
  20. package/src/server.ts +165 -0
  21. package/src/v2/client.ts +97 -0
  22. package/src/v2/data.ts +32 -0
  23. package/src/v2/gen/client/client.gen.ts +285 -0
  24. package/src/v2/gen/client/index.ts +25 -0
  25. package/src/v2/gen/client/types.gen.ts +202 -0
  26. package/src/v2/gen/client/utils.gen.ts +289 -0
  27. package/src/v2/gen/client.gen.ts +18 -0
  28. package/src/v2/gen/core/auth.gen.ts +41 -0
  29. package/src/v2/gen/core/bodySerializer.gen.ts +82 -0
  30. package/src/v2/gen/core/params.gen.ts +169 -0
  31. package/src/v2/gen/core/pathSerializer.gen.ts +167 -0
  32. package/src/v2/gen/core/queryKeySerializer.gen.ts +111 -0
  33. package/src/v2/gen/core/serverSentEvents.gen.ts +239 -0
  34. package/src/v2/gen/core/types.gen.ts +86 -0
  35. package/src/v2/gen/core/utils.gen.ts +137 -0
  36. package/src/v2/gen/sdk.gen.ts +6316 -0
  37. package/src/v2/gen/types.gen.ts +7495 -0
  38. package/src/v2/index.ts +23 -0
  39. package/src/v2/server.ts +163 -0
@@ -0,0 +1,1197 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { Options as ClientOptions, TDataShape, Client } from "./client/index.js"
4
+ import type {
5
+ GlobalEventData,
6
+ GlobalEventResponses,
7
+ ProjectListData,
8
+ ProjectListResponses,
9
+ ProjectCurrentData,
10
+ ProjectCurrentResponses,
11
+ PtyListData,
12
+ PtyListResponses,
13
+ PtyCreateData,
14
+ PtyCreateResponses,
15
+ PtyCreateErrors,
16
+ PtyRemoveData,
17
+ PtyRemoveResponses,
18
+ PtyRemoveErrors,
19
+ PtyGetData,
20
+ PtyGetResponses,
21
+ PtyGetErrors,
22
+ PtyUpdateData,
23
+ PtyUpdateResponses,
24
+ PtyUpdateErrors,
25
+ PtyConnectData,
26
+ PtyConnectResponses,
27
+ PtyConnectErrors,
28
+ ConfigGetData,
29
+ ConfigGetResponses,
30
+ ConfigUpdateData,
31
+ ConfigUpdateResponses,
32
+ ConfigUpdateErrors,
33
+ ToolIdsData,
34
+ ToolIdsResponses,
35
+ ToolIdsErrors,
36
+ ToolListData,
37
+ ToolListResponses,
38
+ ToolListErrors,
39
+ InstanceDisposeData,
40
+ InstanceDisposeResponses,
41
+ PathGetData,
42
+ PathGetResponses,
43
+ VcsGetData,
44
+ VcsGetResponses,
45
+ SessionListData,
46
+ SessionListResponses,
47
+ SessionCreateData,
48
+ SessionCreateResponses,
49
+ SessionCreateErrors,
50
+ SessionStatusData,
51
+ SessionStatusResponses,
52
+ SessionStatusErrors,
53
+ SessionDeleteData,
54
+ SessionDeleteResponses,
55
+ SessionDeleteErrors,
56
+ SessionGetData,
57
+ SessionGetResponses,
58
+ SessionGetErrors,
59
+ SessionUpdateData,
60
+ SessionUpdateResponses,
61
+ SessionUpdateErrors,
62
+ SessionChildrenData,
63
+ SessionChildrenResponses,
64
+ SessionChildrenErrors,
65
+ SessionTodoData,
66
+ SessionTodoResponses,
67
+ SessionTodoErrors,
68
+ SessionInitData,
69
+ SessionInitResponses,
70
+ SessionInitErrors,
71
+ SessionForkData,
72
+ SessionForkResponses,
73
+ SessionAbortData,
74
+ SessionAbortResponses,
75
+ SessionAbortErrors,
76
+ SessionUnshareData,
77
+ SessionUnshareResponses,
78
+ SessionUnshareErrors,
79
+ SessionShareData,
80
+ SessionShareResponses,
81
+ SessionShareErrors,
82
+ SessionDiffData,
83
+ SessionDiffResponses,
84
+ SessionDiffErrors,
85
+ SessionSummarizeData,
86
+ SessionSummarizeResponses,
87
+ SessionSummarizeErrors,
88
+ SessionMessagesData,
89
+ SessionMessagesResponses,
90
+ SessionMessagesErrors,
91
+ SessionPromptData,
92
+ SessionPromptResponses,
93
+ SessionPromptErrors,
94
+ SessionMessageData,
95
+ SessionMessageResponses,
96
+ SessionMessageErrors,
97
+ SessionPromptAsyncData,
98
+ SessionPromptAsyncResponses,
99
+ SessionPromptAsyncErrors,
100
+ SessionCommandData,
101
+ SessionCommandResponses,
102
+ SessionCommandErrors,
103
+ SessionShellData,
104
+ SessionShellResponses,
105
+ SessionShellErrors,
106
+ SessionRevertData,
107
+ SessionRevertResponses,
108
+ SessionRevertErrors,
109
+ SessionUnrevertData,
110
+ SessionUnrevertResponses,
111
+ SessionUnrevertErrors,
112
+ PostSessionIdPermissionsPermissionIdData,
113
+ PostSessionIdPermissionsPermissionIdResponses,
114
+ PostSessionIdPermissionsPermissionIdErrors,
115
+ CommandListData,
116
+ CommandListResponses,
117
+ ConfigProvidersData,
118
+ ConfigProvidersResponses,
119
+ ProviderListData,
120
+ ProviderListResponses,
121
+ ProviderAuthData,
122
+ ProviderAuthResponses,
123
+ ProviderOauthAuthorizeData,
124
+ ProviderOauthAuthorizeResponses,
125
+ ProviderOauthAuthorizeErrors,
126
+ ProviderOauthCallbackData,
127
+ ProviderOauthCallbackResponses,
128
+ ProviderOauthCallbackErrors,
129
+ FindTextData,
130
+ FindTextResponses,
131
+ FindFilesData,
132
+ FindFilesResponses,
133
+ FindSymbolsData,
134
+ FindSymbolsResponses,
135
+ FileListData,
136
+ FileListResponses,
137
+ FileReadData,
138
+ FileReadResponses,
139
+ FileStatusData,
140
+ FileStatusResponses,
141
+ AppLogData,
142
+ AppLogResponses,
143
+ AppLogErrors,
144
+ AppAgentsData,
145
+ AppAgentsResponses,
146
+ McpStatusData,
147
+ McpStatusResponses,
148
+ McpAddData,
149
+ McpAddResponses,
150
+ McpAddErrors,
151
+ McpAuthRemoveData,
152
+ McpAuthRemoveResponses,
153
+ McpAuthRemoveErrors,
154
+ McpAuthStartData,
155
+ McpAuthStartResponses,
156
+ McpAuthStartErrors,
157
+ McpAuthCallbackData,
158
+ McpAuthCallbackResponses,
159
+ McpAuthCallbackErrors,
160
+ McpAuthAuthenticateData,
161
+ McpAuthAuthenticateResponses,
162
+ McpAuthAuthenticateErrors,
163
+ McpConnectData,
164
+ McpConnectResponses,
165
+ McpDisconnectData,
166
+ McpDisconnectResponses,
167
+ LspStatusData,
168
+ LspStatusResponses,
169
+ FormatterStatusData,
170
+ FormatterStatusResponses,
171
+ TuiAppendPromptData,
172
+ TuiAppendPromptResponses,
173
+ TuiAppendPromptErrors,
174
+ TuiOpenHelpData,
175
+ TuiOpenHelpResponses,
176
+ TuiOpenSessionsData,
177
+ TuiOpenSessionsResponses,
178
+ TuiOpenThemesData,
179
+ TuiOpenThemesResponses,
180
+ TuiOpenModelsData,
181
+ TuiOpenModelsResponses,
182
+ TuiSubmitPromptData,
183
+ TuiSubmitPromptResponses,
184
+ TuiClearPromptData,
185
+ TuiClearPromptResponses,
186
+ TuiExecuteCommandData,
187
+ TuiExecuteCommandResponses,
188
+ TuiExecuteCommandErrors,
189
+ TuiShowToastData,
190
+ TuiShowToastResponses,
191
+ TuiPublishData,
192
+ TuiPublishResponses,
193
+ TuiPublishErrors,
194
+ TuiControlNextData,
195
+ TuiControlNextResponses,
196
+ TuiControlResponseData,
197
+ TuiControlResponseResponses,
198
+ AuthSetData,
199
+ AuthSetResponses,
200
+ AuthSetErrors,
201
+ EventSubscribeData,
202
+ EventSubscribeResponses,
203
+ } from "./types.gen.js"
204
+ import { client as _heyApiClient } from "./client.gen.js"
205
+
206
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<
207
+ TData,
208
+ ThrowOnError
209
+ > & {
210
+ /**
211
+ * You can provide a client instance returned by `createClient()` instead of
212
+ * individual options. This might be also useful if you want to implement a
213
+ * custom client.
214
+ */
215
+ client?: Client
216
+ /**
217
+ * You can pass arbitrary values through the `meta` object. This can be
218
+ * used to access values that aren't defined as part of the SDK function.
219
+ */
220
+ meta?: Record<string, unknown>
221
+ }
222
+
223
+ class _HeyApiClient {
224
+ protected _client: Client = _heyApiClient
225
+
226
+ constructor(args?: { client?: Client }) {
227
+ if (args?.client) {
228
+ this._client = args.client
229
+ }
230
+ }
231
+ }
232
+
233
+ class Global extends _HeyApiClient {
234
+ /**
235
+ * Get events
236
+ */
237
+ public event<ThrowOnError extends boolean = false>(options?: Options<GlobalEventData, ThrowOnError>) {
238
+ return (options?.client ?? this._client).get.sse<GlobalEventResponses, unknown, ThrowOnError>({
239
+ url: "/global/event",
240
+ ...options,
241
+ })
242
+ }
243
+ }
244
+
245
+ class Project extends _HeyApiClient {
246
+ /**
247
+ * List all projects
248
+ */
249
+ public list<ThrowOnError extends boolean = false>(options?: Options<ProjectListData, ThrowOnError>) {
250
+ return (options?.client ?? this._client).get<ProjectListResponses, unknown, ThrowOnError>({
251
+ url: "/project",
252
+ ...options,
253
+ })
254
+ }
255
+
256
+ /**
257
+ * Get the current project
258
+ */
259
+ public current<ThrowOnError extends boolean = false>(options?: Options<ProjectCurrentData, ThrowOnError>) {
260
+ return (options?.client ?? this._client).get<ProjectCurrentResponses, unknown, ThrowOnError>({
261
+ url: "/project/current",
262
+ ...options,
263
+ })
264
+ }
265
+ }
266
+
267
+ class Pty extends _HeyApiClient {
268
+ /**
269
+ * List all PTY sessions
270
+ */
271
+ public list<ThrowOnError extends boolean = false>(options?: Options<PtyListData, ThrowOnError>) {
272
+ return (options?.client ?? this._client).get<PtyListResponses, unknown, ThrowOnError>({
273
+ url: "/pty",
274
+ ...options,
275
+ })
276
+ }
277
+
278
+ /**
279
+ * Create a new PTY session
280
+ */
281
+ public create<ThrowOnError extends boolean = false>(options?: Options<PtyCreateData, ThrowOnError>) {
282
+ return (options?.client ?? this._client).post<PtyCreateResponses, PtyCreateErrors, ThrowOnError>({
283
+ url: "/pty",
284
+ ...options,
285
+ headers: {
286
+ "Content-Type": "application/json",
287
+ ...options?.headers,
288
+ },
289
+ })
290
+ }
291
+
292
+ /**
293
+ * Remove a PTY session
294
+ */
295
+ public remove<ThrowOnError extends boolean = false>(options: Options<PtyRemoveData, ThrowOnError>) {
296
+ return (options.client ?? this._client).delete<PtyRemoveResponses, PtyRemoveErrors, ThrowOnError>({
297
+ url: "/pty/{id}",
298
+ ...options,
299
+ })
300
+ }
301
+
302
+ /**
303
+ * Get PTY session info
304
+ */
305
+ public get<ThrowOnError extends boolean = false>(options: Options<PtyGetData, ThrowOnError>) {
306
+ return (options.client ?? this._client).get<PtyGetResponses, PtyGetErrors, ThrowOnError>({
307
+ url: "/pty/{id}",
308
+ ...options,
309
+ })
310
+ }
311
+
312
+ /**
313
+ * Update PTY session
314
+ */
315
+ public update<ThrowOnError extends boolean = false>(options: Options<PtyUpdateData, ThrowOnError>) {
316
+ return (options.client ?? this._client).put<PtyUpdateResponses, PtyUpdateErrors, ThrowOnError>({
317
+ url: "/pty/{id}",
318
+ ...options,
319
+ headers: {
320
+ "Content-Type": "application/json",
321
+ ...options.headers,
322
+ },
323
+ })
324
+ }
325
+
326
+ /**
327
+ * Connect to a PTY session
328
+ */
329
+ public connect<ThrowOnError extends boolean = false>(options: Options<PtyConnectData, ThrowOnError>) {
330
+ return (options.client ?? this._client).get<PtyConnectResponses, PtyConnectErrors, ThrowOnError>({
331
+ url: "/pty/{id}/connect",
332
+ ...options,
333
+ })
334
+ }
335
+ }
336
+
337
+ class Config extends _HeyApiClient {
338
+ /**
339
+ * Get config info
340
+ */
341
+ public get<ThrowOnError extends boolean = false>(options?: Options<ConfigGetData, ThrowOnError>) {
342
+ return (options?.client ?? this._client).get<ConfigGetResponses, unknown, ThrowOnError>({
343
+ url: "/config",
344
+ ...options,
345
+ })
346
+ }
347
+
348
+ /**
349
+ * Update config
350
+ */
351
+ public update<ThrowOnError extends boolean = false>(options?: Options<ConfigUpdateData, ThrowOnError>) {
352
+ return (options?.client ?? this._client).patch<ConfigUpdateResponses, ConfigUpdateErrors, ThrowOnError>({
353
+ url: "/config",
354
+ ...options,
355
+ headers: {
356
+ "Content-Type": "application/json",
357
+ ...options?.headers,
358
+ },
359
+ })
360
+ }
361
+
362
+ /**
363
+ * List all providers
364
+ */
365
+ public providers<ThrowOnError extends boolean = false>(options?: Options<ConfigProvidersData, ThrowOnError>) {
366
+ return (options?.client ?? this._client).get<ConfigProvidersResponses, unknown, ThrowOnError>({
367
+ url: "/config/providers",
368
+ ...options,
369
+ })
370
+ }
371
+ }
372
+
373
+ class Tool extends _HeyApiClient {
374
+ /**
375
+ * List all tool IDs (including built-in and dynamically registered)
376
+ */
377
+ public ids<ThrowOnError extends boolean = false>(options?: Options<ToolIdsData, ThrowOnError>) {
378
+ return (options?.client ?? this._client).get<ToolIdsResponses, ToolIdsErrors, ThrowOnError>({
379
+ url: "/experimental/tool/ids",
380
+ ...options,
381
+ })
382
+ }
383
+
384
+ /**
385
+ * List tools with JSON schema parameters for a provider/model
386
+ */
387
+ public list<ThrowOnError extends boolean = false>(options: Options<ToolListData, ThrowOnError>) {
388
+ return (options.client ?? this._client).get<ToolListResponses, ToolListErrors, ThrowOnError>({
389
+ url: "/experimental/tool",
390
+ ...options,
391
+ })
392
+ }
393
+ }
394
+
395
+ class Instance extends _HeyApiClient {
396
+ /**
397
+ * Dispose the current instance
398
+ */
399
+ public dispose<ThrowOnError extends boolean = false>(options?: Options<InstanceDisposeData, ThrowOnError>) {
400
+ return (options?.client ?? this._client).post<InstanceDisposeResponses, unknown, ThrowOnError>({
401
+ url: "/instance/dispose",
402
+ ...options,
403
+ })
404
+ }
405
+ }
406
+
407
+ class Path extends _HeyApiClient {
408
+ /**
409
+ * Get the current path
410
+ */
411
+ public get<ThrowOnError extends boolean = false>(options?: Options<PathGetData, ThrowOnError>) {
412
+ return (options?.client ?? this._client).get<PathGetResponses, unknown, ThrowOnError>({
413
+ url: "/path",
414
+ ...options,
415
+ })
416
+ }
417
+ }
418
+
419
+ class Vcs extends _HeyApiClient {
420
+ /**
421
+ * Get VCS info for the current instance
422
+ */
423
+ public get<ThrowOnError extends boolean = false>(options?: Options<VcsGetData, ThrowOnError>) {
424
+ return (options?.client ?? this._client).get<VcsGetResponses, unknown, ThrowOnError>({
425
+ url: "/vcs",
426
+ ...options,
427
+ })
428
+ }
429
+ }
430
+
431
+ class Session extends _HeyApiClient {
432
+ /**
433
+ * List all sessions
434
+ */
435
+ public list<ThrowOnError extends boolean = false>(options?: Options<SessionListData, ThrowOnError>) {
436
+ return (options?.client ?? this._client).get<SessionListResponses, unknown, ThrowOnError>({
437
+ url: "/session",
438
+ ...options,
439
+ })
440
+ }
441
+
442
+ /**
443
+ * Create a new session
444
+ */
445
+ public create<ThrowOnError extends boolean = false>(options?: Options<SessionCreateData, ThrowOnError>) {
446
+ return (options?.client ?? this._client).post<SessionCreateResponses, SessionCreateErrors, ThrowOnError>({
447
+ url: "/session",
448
+ ...options,
449
+ headers: {
450
+ "Content-Type": "application/json",
451
+ ...options?.headers,
452
+ },
453
+ })
454
+ }
455
+
456
+ /**
457
+ * Get session status
458
+ */
459
+ public status<ThrowOnError extends boolean = false>(options?: Options<SessionStatusData, ThrowOnError>) {
460
+ return (options?.client ?? this._client).get<SessionStatusResponses, SessionStatusErrors, ThrowOnError>({
461
+ url: "/session/status",
462
+ ...options,
463
+ })
464
+ }
465
+
466
+ /**
467
+ * Delete a session and all its data
468
+ */
469
+ public delete<ThrowOnError extends boolean = false>(options: Options<SessionDeleteData, ThrowOnError>) {
470
+ return (options.client ?? this._client).delete<SessionDeleteResponses, SessionDeleteErrors, ThrowOnError>({
471
+ url: "/session/{id}",
472
+ ...options,
473
+ })
474
+ }
475
+
476
+ /**
477
+ * Get session
478
+ */
479
+ public get<ThrowOnError extends boolean = false>(options: Options<SessionGetData, ThrowOnError>) {
480
+ return (options.client ?? this._client).get<SessionGetResponses, SessionGetErrors, ThrowOnError>({
481
+ url: "/session/{id}",
482
+ ...options,
483
+ })
484
+ }
485
+
486
+ /**
487
+ * Update session properties
488
+ */
489
+ public update<ThrowOnError extends boolean = false>(options: Options<SessionUpdateData, ThrowOnError>) {
490
+ return (options.client ?? this._client).patch<SessionUpdateResponses, SessionUpdateErrors, ThrowOnError>({
491
+ url: "/session/{id}",
492
+ ...options,
493
+ headers: {
494
+ "Content-Type": "application/json",
495
+ ...options.headers,
496
+ },
497
+ })
498
+ }
499
+
500
+ /**
501
+ * Get a session's children
502
+ */
503
+ public children<ThrowOnError extends boolean = false>(options: Options<SessionChildrenData, ThrowOnError>) {
504
+ return (options.client ?? this._client).get<SessionChildrenResponses, SessionChildrenErrors, ThrowOnError>({
505
+ url: "/session/{id}/children",
506
+ ...options,
507
+ })
508
+ }
509
+
510
+ /**
511
+ * Get the todo list for a session
512
+ */
513
+ public todo<ThrowOnError extends boolean = false>(options: Options<SessionTodoData, ThrowOnError>) {
514
+ return (options.client ?? this._client).get<SessionTodoResponses, SessionTodoErrors, ThrowOnError>({
515
+ url: "/session/{id}/todo",
516
+ ...options,
517
+ })
518
+ }
519
+
520
+ /**
521
+ * Analyze the app and create an AGENTS.md file
522
+ */
523
+ public init<ThrowOnError extends boolean = false>(options: Options<SessionInitData, ThrowOnError>) {
524
+ return (options.client ?? this._client).post<SessionInitResponses, SessionInitErrors, ThrowOnError>({
525
+ url: "/session/{id}/init",
526
+ ...options,
527
+ headers: {
528
+ "Content-Type": "application/json",
529
+ ...options.headers,
530
+ },
531
+ })
532
+ }
533
+
534
+ /**
535
+ * Fork an existing session at a specific message
536
+ */
537
+ public fork<ThrowOnError extends boolean = false>(options: Options<SessionForkData, ThrowOnError>) {
538
+ return (options.client ?? this._client).post<SessionForkResponses, unknown, ThrowOnError>({
539
+ url: "/session/{id}/fork",
540
+ ...options,
541
+ headers: {
542
+ "Content-Type": "application/json",
543
+ ...options.headers,
544
+ },
545
+ })
546
+ }
547
+
548
+ /**
549
+ * Abort a session
550
+ */
551
+ public abort<ThrowOnError extends boolean = false>(options: Options<SessionAbortData, ThrowOnError>) {
552
+ return (options.client ?? this._client).post<SessionAbortResponses, SessionAbortErrors, ThrowOnError>({
553
+ url: "/session/{id}/abort",
554
+ ...options,
555
+ })
556
+ }
557
+
558
+ /**
559
+ * Unshare the session
560
+ */
561
+ public unshare<ThrowOnError extends boolean = false>(options: Options<SessionUnshareData, ThrowOnError>) {
562
+ return (options.client ?? this._client).delete<SessionUnshareResponses, SessionUnshareErrors, ThrowOnError>({
563
+ url: "/session/{id}/share",
564
+ ...options,
565
+ })
566
+ }
567
+
568
+ /**
569
+ * Share a session
570
+ */
571
+ public share<ThrowOnError extends boolean = false>(options: Options<SessionShareData, ThrowOnError>) {
572
+ return (options.client ?? this._client).post<SessionShareResponses, SessionShareErrors, ThrowOnError>({
573
+ url: "/session/{id}/share",
574
+ ...options,
575
+ })
576
+ }
577
+
578
+ /**
579
+ * Get the diff for this session
580
+ */
581
+ public diff<ThrowOnError extends boolean = false>(options: Options<SessionDiffData, ThrowOnError>) {
582
+ return (options.client ?? this._client).get<SessionDiffResponses, SessionDiffErrors, ThrowOnError>({
583
+ url: "/session/{id}/diff",
584
+ ...options,
585
+ })
586
+ }
587
+
588
+ /**
589
+ * Summarize the session
590
+ */
591
+ public summarize<ThrowOnError extends boolean = false>(options: Options<SessionSummarizeData, ThrowOnError>) {
592
+ return (options.client ?? this._client).post<SessionSummarizeResponses, SessionSummarizeErrors, ThrowOnError>({
593
+ url: "/session/{id}/summarize",
594
+ ...options,
595
+ headers: {
596
+ "Content-Type": "application/json",
597
+ ...options.headers,
598
+ },
599
+ })
600
+ }
601
+
602
+ /**
603
+ * List messages for a session
604
+ */
605
+ public messages<ThrowOnError extends boolean = false>(options: Options<SessionMessagesData, ThrowOnError>) {
606
+ return (options.client ?? this._client).get<SessionMessagesResponses, SessionMessagesErrors, ThrowOnError>({
607
+ url: "/session/{id}/message",
608
+ ...options,
609
+ })
610
+ }
611
+
612
+ /**
613
+ * Create and send a new message to a session
614
+ */
615
+ public prompt<ThrowOnError extends boolean = false>(options: Options<SessionPromptData, ThrowOnError>) {
616
+ return (options.client ?? this._client).post<SessionPromptResponses, SessionPromptErrors, ThrowOnError>({
617
+ url: "/session/{id}/message",
618
+ ...options,
619
+ headers: {
620
+ "Content-Type": "application/json",
621
+ ...options.headers,
622
+ },
623
+ })
624
+ }
625
+
626
+ /**
627
+ * Get a message from a session
628
+ */
629
+ public message<ThrowOnError extends boolean = false>(options: Options<SessionMessageData, ThrowOnError>) {
630
+ return (options.client ?? this._client).get<SessionMessageResponses, SessionMessageErrors, ThrowOnError>({
631
+ url: "/session/{id}/message/{messageID}",
632
+ ...options,
633
+ })
634
+ }
635
+
636
+ /**
637
+ * Create and send a new message to a session, start if needed and return immediately
638
+ */
639
+ public promptAsync<ThrowOnError extends boolean = false>(options: Options<SessionPromptAsyncData, ThrowOnError>) {
640
+ return (options.client ?? this._client).post<SessionPromptAsyncResponses, SessionPromptAsyncErrors, ThrowOnError>({
641
+ url: "/session/{id}/prompt_async",
642
+ ...options,
643
+ headers: {
644
+ "Content-Type": "application/json",
645
+ ...options.headers,
646
+ },
647
+ })
648
+ }
649
+
650
+ /**
651
+ * Send a new command to a session
652
+ */
653
+ public command<ThrowOnError extends boolean = false>(options: Options<SessionCommandData, ThrowOnError>) {
654
+ return (options.client ?? this._client).post<SessionCommandResponses, SessionCommandErrors, ThrowOnError>({
655
+ url: "/session/{id}/command",
656
+ ...options,
657
+ headers: {
658
+ "Content-Type": "application/json",
659
+ ...options.headers,
660
+ },
661
+ })
662
+ }
663
+
664
+ /**
665
+ * Run a shell command
666
+ */
667
+ public shell<ThrowOnError extends boolean = false>(options: Options<SessionShellData, ThrowOnError>) {
668
+ return (options.client ?? this._client).post<SessionShellResponses, SessionShellErrors, ThrowOnError>({
669
+ url: "/session/{id}/shell",
670
+ ...options,
671
+ headers: {
672
+ "Content-Type": "application/json",
673
+ ...options.headers,
674
+ },
675
+ })
676
+ }
677
+
678
+ /**
679
+ * Revert a message
680
+ */
681
+ public revert<ThrowOnError extends boolean = false>(options: Options<SessionRevertData, ThrowOnError>) {
682
+ return (options.client ?? this._client).post<SessionRevertResponses, SessionRevertErrors, ThrowOnError>({
683
+ url: "/session/{id}/revert",
684
+ ...options,
685
+ headers: {
686
+ "Content-Type": "application/json",
687
+ ...options.headers,
688
+ },
689
+ })
690
+ }
691
+
692
+ /**
693
+ * Restore all reverted messages
694
+ */
695
+ public unrevert<ThrowOnError extends boolean = false>(options: Options<SessionUnrevertData, ThrowOnError>) {
696
+ return (options.client ?? this._client).post<SessionUnrevertResponses, SessionUnrevertErrors, ThrowOnError>({
697
+ url: "/session/{id}/unrevert",
698
+ ...options,
699
+ })
700
+ }
701
+ }
702
+
703
+ class Command extends _HeyApiClient {
704
+ /**
705
+ * List all commands
706
+ */
707
+ public list<ThrowOnError extends boolean = false>(options?: Options<CommandListData, ThrowOnError>) {
708
+ return (options?.client ?? this._client).get<CommandListResponses, unknown, ThrowOnError>({
709
+ url: "/command",
710
+ ...options,
711
+ })
712
+ }
713
+ }
714
+
715
+ class Oauth extends _HeyApiClient {
716
+ /**
717
+ * Authorize a provider using OAuth
718
+ */
719
+ public authorize<ThrowOnError extends boolean = false>(options: Options<ProviderOauthAuthorizeData, ThrowOnError>) {
720
+ return (options.client ?? this._client).post<
721
+ ProviderOauthAuthorizeResponses,
722
+ ProviderOauthAuthorizeErrors,
723
+ ThrowOnError
724
+ >({
725
+ url: "/provider/{id}/oauth/authorize",
726
+ ...options,
727
+ headers: {
728
+ "Content-Type": "application/json",
729
+ ...options.headers,
730
+ },
731
+ })
732
+ }
733
+
734
+ /**
735
+ * Handle OAuth callback for a provider
736
+ */
737
+ public callback<ThrowOnError extends boolean = false>(options: Options<ProviderOauthCallbackData, ThrowOnError>) {
738
+ return (options.client ?? this._client).post<
739
+ ProviderOauthCallbackResponses,
740
+ ProviderOauthCallbackErrors,
741
+ ThrowOnError
742
+ >({
743
+ url: "/provider/{id}/oauth/callback",
744
+ ...options,
745
+ headers: {
746
+ "Content-Type": "application/json",
747
+ ...options.headers,
748
+ },
749
+ })
750
+ }
751
+ }
752
+
753
+ class Provider extends _HeyApiClient {
754
+ /**
755
+ * List all providers
756
+ */
757
+ public list<ThrowOnError extends boolean = false>(options?: Options<ProviderListData, ThrowOnError>) {
758
+ return (options?.client ?? this._client).get<ProviderListResponses, unknown, ThrowOnError>({
759
+ url: "/provider",
760
+ ...options,
761
+ })
762
+ }
763
+
764
+ /**
765
+ * Get provider authentication methods
766
+ */
767
+ public auth<ThrowOnError extends boolean = false>(options?: Options<ProviderAuthData, ThrowOnError>) {
768
+ return (options?.client ?? this._client).get<ProviderAuthResponses, unknown, ThrowOnError>({
769
+ url: "/provider/auth",
770
+ ...options,
771
+ })
772
+ }
773
+ oauth = new Oauth({ client: this._client })
774
+ }
775
+
776
+ class Find extends _HeyApiClient {
777
+ /**
778
+ * Find text in files
779
+ */
780
+ public text<ThrowOnError extends boolean = false>(options: Options<FindTextData, ThrowOnError>) {
781
+ return (options.client ?? this._client).get<FindTextResponses, unknown, ThrowOnError>({
782
+ url: "/find",
783
+ ...options,
784
+ })
785
+ }
786
+
787
+ /**
788
+ * Find files
789
+ */
790
+ public files<ThrowOnError extends boolean = false>(options: Options<FindFilesData, ThrowOnError>) {
791
+ return (options.client ?? this._client).get<FindFilesResponses, unknown, ThrowOnError>({
792
+ url: "/find/file",
793
+ ...options,
794
+ })
795
+ }
796
+
797
+ /**
798
+ * Find workspace symbols
799
+ */
800
+ public symbols<ThrowOnError extends boolean = false>(options: Options<FindSymbolsData, ThrowOnError>) {
801
+ return (options.client ?? this._client).get<FindSymbolsResponses, unknown, ThrowOnError>({
802
+ url: "/find/symbol",
803
+ ...options,
804
+ })
805
+ }
806
+ }
807
+
808
+ class File extends _HeyApiClient {
809
+ /**
810
+ * List files and directories
811
+ */
812
+ public list<ThrowOnError extends boolean = false>(options: Options<FileListData, ThrowOnError>) {
813
+ return (options.client ?? this._client).get<FileListResponses, unknown, ThrowOnError>({
814
+ url: "/file",
815
+ ...options,
816
+ })
817
+ }
818
+
819
+ /**
820
+ * Read a file
821
+ */
822
+ public read<ThrowOnError extends boolean = false>(options: Options<FileReadData, ThrowOnError>) {
823
+ return (options.client ?? this._client).get<FileReadResponses, unknown, ThrowOnError>({
824
+ url: "/file/content",
825
+ ...options,
826
+ })
827
+ }
828
+
829
+ /**
830
+ * Get file status
831
+ */
832
+ public status<ThrowOnError extends boolean = false>(options?: Options<FileStatusData, ThrowOnError>) {
833
+ return (options?.client ?? this._client).get<FileStatusResponses, unknown, ThrowOnError>({
834
+ url: "/file/status",
835
+ ...options,
836
+ })
837
+ }
838
+ }
839
+
840
+ class App extends _HeyApiClient {
841
+ /**
842
+ * Write a log entry to the server logs
843
+ */
844
+ public log<ThrowOnError extends boolean = false>(options?: Options<AppLogData, ThrowOnError>) {
845
+ return (options?.client ?? this._client).post<AppLogResponses, AppLogErrors, ThrowOnError>({
846
+ url: "/log",
847
+ ...options,
848
+ headers: {
849
+ "Content-Type": "application/json",
850
+ ...options?.headers,
851
+ },
852
+ })
853
+ }
854
+
855
+ /**
856
+ * List all agents
857
+ */
858
+ public agents<ThrowOnError extends boolean = false>(options?: Options<AppAgentsData, ThrowOnError>) {
859
+ return (options?.client ?? this._client).get<AppAgentsResponses, unknown, ThrowOnError>({
860
+ url: "/agent",
861
+ ...options,
862
+ })
863
+ }
864
+ }
865
+
866
+ class Auth extends _HeyApiClient {
867
+ /**
868
+ * Remove OAuth credentials for an MCP server
869
+ */
870
+ public remove<ThrowOnError extends boolean = false>(options: Options<McpAuthRemoveData, ThrowOnError>) {
871
+ return (options.client ?? this._client).delete<McpAuthRemoveResponses, McpAuthRemoveErrors, ThrowOnError>({
872
+ url: "/mcp/{name}/auth",
873
+ ...options,
874
+ })
875
+ }
876
+
877
+ /**
878
+ * Start OAuth authentication flow for an MCP server
879
+ */
880
+ public start<ThrowOnError extends boolean = false>(options: Options<McpAuthStartData, ThrowOnError>) {
881
+ return (options.client ?? this._client).post<McpAuthStartResponses, McpAuthStartErrors, ThrowOnError>({
882
+ url: "/mcp/{name}/auth",
883
+ ...options,
884
+ })
885
+ }
886
+
887
+ /**
888
+ * Complete OAuth authentication with authorization code
889
+ */
890
+ public callback<ThrowOnError extends boolean = false>(options: Options<McpAuthCallbackData, ThrowOnError>) {
891
+ return (options.client ?? this._client).post<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError>({
892
+ url: "/mcp/{name}/auth/callback",
893
+ ...options,
894
+ headers: {
895
+ "Content-Type": "application/json",
896
+ ...options.headers,
897
+ },
898
+ })
899
+ }
900
+
901
+ /**
902
+ * Start OAuth flow and wait for callback (opens browser)
903
+ */
904
+ public authenticate<ThrowOnError extends boolean = false>(options: Options<McpAuthAuthenticateData, ThrowOnError>) {
905
+ return (options.client ?? this._client).post<McpAuthAuthenticateResponses, McpAuthAuthenticateErrors, ThrowOnError>(
906
+ {
907
+ url: "/mcp/{name}/auth/authenticate",
908
+ ...options,
909
+ },
910
+ )
911
+ }
912
+
913
+ /**
914
+ * Set authentication credentials
915
+ */
916
+ public set<ThrowOnError extends boolean = false>(options: Options<AuthSetData, ThrowOnError>) {
917
+ return (options.client ?? this._client).put<AuthSetResponses, AuthSetErrors, ThrowOnError>({
918
+ url: "/auth/{id}",
919
+ ...options,
920
+ headers: {
921
+ "Content-Type": "application/json",
922
+ ...options.headers,
923
+ },
924
+ })
925
+ }
926
+ }
927
+
928
+ class Mcp extends _HeyApiClient {
929
+ /**
930
+ * Get MCP server status
931
+ */
932
+ public status<ThrowOnError extends boolean = false>(options?: Options<McpStatusData, ThrowOnError>) {
933
+ return (options?.client ?? this._client).get<McpStatusResponses, unknown, ThrowOnError>({
934
+ url: "/mcp",
935
+ ...options,
936
+ })
937
+ }
938
+
939
+ /**
940
+ * Add MCP server dynamically
941
+ */
942
+ public add<ThrowOnError extends boolean = false>(options?: Options<McpAddData, ThrowOnError>) {
943
+ return (options?.client ?? this._client).post<McpAddResponses, McpAddErrors, ThrowOnError>({
944
+ url: "/mcp",
945
+ ...options,
946
+ headers: {
947
+ "Content-Type": "application/json",
948
+ ...options?.headers,
949
+ },
950
+ })
951
+ }
952
+
953
+ /**
954
+ * Connect an MCP server
955
+ */
956
+ public connect<ThrowOnError extends boolean = false>(options: Options<McpConnectData, ThrowOnError>) {
957
+ return (options.client ?? this._client).post<McpConnectResponses, unknown, ThrowOnError>({
958
+ url: "/mcp/{name}/connect",
959
+ ...options,
960
+ })
961
+ }
962
+
963
+ /**
964
+ * Disconnect an MCP server
965
+ */
966
+ public disconnect<ThrowOnError extends boolean = false>(options: Options<McpDisconnectData, ThrowOnError>) {
967
+ return (options.client ?? this._client).post<McpDisconnectResponses, unknown, ThrowOnError>({
968
+ url: "/mcp/{name}/disconnect",
969
+ ...options,
970
+ })
971
+ }
972
+
973
+ auth = new Auth({ client: this._client })
974
+ }
975
+
976
+ class Lsp extends _HeyApiClient {
977
+ /**
978
+ * Get LSP server status
979
+ */
980
+ public status<ThrowOnError extends boolean = false>(options?: Options<LspStatusData, ThrowOnError>) {
981
+ return (options?.client ?? this._client).get<LspStatusResponses, unknown, ThrowOnError>({
982
+ url: "/lsp",
983
+ ...options,
984
+ })
985
+ }
986
+ }
987
+
988
+ class Formatter extends _HeyApiClient {
989
+ /**
990
+ * Get formatter status
991
+ */
992
+ public status<ThrowOnError extends boolean = false>(options?: Options<FormatterStatusData, ThrowOnError>) {
993
+ return (options?.client ?? this._client).get<FormatterStatusResponses, unknown, ThrowOnError>({
994
+ url: "/formatter",
995
+ ...options,
996
+ })
997
+ }
998
+ }
999
+
1000
+ class Control extends _HeyApiClient {
1001
+ /**
1002
+ * Get the next TUI request from the queue
1003
+ */
1004
+ public next<ThrowOnError extends boolean = false>(options?: Options<TuiControlNextData, ThrowOnError>) {
1005
+ return (options?.client ?? this._client).get<TuiControlNextResponses, unknown, ThrowOnError>({
1006
+ url: "/tui/control/next",
1007
+ ...options,
1008
+ })
1009
+ }
1010
+
1011
+ /**
1012
+ * Submit a response to the TUI request queue
1013
+ */
1014
+ public response<ThrowOnError extends boolean = false>(options?: Options<TuiControlResponseData, ThrowOnError>) {
1015
+ return (options?.client ?? this._client).post<TuiControlResponseResponses, unknown, ThrowOnError>({
1016
+ url: "/tui/control/response",
1017
+ ...options,
1018
+ headers: {
1019
+ "Content-Type": "application/json",
1020
+ ...options?.headers,
1021
+ },
1022
+ })
1023
+ }
1024
+ }
1025
+
1026
+ class Tui extends _HeyApiClient {
1027
+ /**
1028
+ * Append prompt to the TUI
1029
+ */
1030
+ public appendPrompt<ThrowOnError extends boolean = false>(options?: Options<TuiAppendPromptData, ThrowOnError>) {
1031
+ return (options?.client ?? this._client).post<TuiAppendPromptResponses, TuiAppendPromptErrors, ThrowOnError>({
1032
+ url: "/tui/append-prompt",
1033
+ ...options,
1034
+ headers: {
1035
+ "Content-Type": "application/json",
1036
+ ...options?.headers,
1037
+ },
1038
+ })
1039
+ }
1040
+
1041
+ /**
1042
+ * Open the help dialog
1043
+ */
1044
+ public openHelp<ThrowOnError extends boolean = false>(options?: Options<TuiOpenHelpData, ThrowOnError>) {
1045
+ return (options?.client ?? this._client).post<TuiOpenHelpResponses, unknown, ThrowOnError>({
1046
+ url: "/tui/open-help",
1047
+ ...options,
1048
+ })
1049
+ }
1050
+
1051
+ /**
1052
+ * Open the session dialog
1053
+ */
1054
+ public openSessions<ThrowOnError extends boolean = false>(options?: Options<TuiOpenSessionsData, ThrowOnError>) {
1055
+ return (options?.client ?? this._client).post<TuiOpenSessionsResponses, unknown, ThrowOnError>({
1056
+ url: "/tui/open-sessions",
1057
+ ...options,
1058
+ })
1059
+ }
1060
+
1061
+ /**
1062
+ * Open the theme dialog
1063
+ */
1064
+ public openThemes<ThrowOnError extends boolean = false>(options?: Options<TuiOpenThemesData, ThrowOnError>) {
1065
+ return (options?.client ?? this._client).post<TuiOpenThemesResponses, unknown, ThrowOnError>({
1066
+ url: "/tui/open-themes",
1067
+ ...options,
1068
+ })
1069
+ }
1070
+
1071
+ /**
1072
+ * Open the model dialog
1073
+ */
1074
+ public openModels<ThrowOnError extends boolean = false>(options?: Options<TuiOpenModelsData, ThrowOnError>) {
1075
+ return (options?.client ?? this._client).post<TuiOpenModelsResponses, unknown, ThrowOnError>({
1076
+ url: "/tui/open-models",
1077
+ ...options,
1078
+ })
1079
+ }
1080
+
1081
+ /**
1082
+ * Submit the prompt
1083
+ */
1084
+ public submitPrompt<ThrowOnError extends boolean = false>(options?: Options<TuiSubmitPromptData, ThrowOnError>) {
1085
+ return (options?.client ?? this._client).post<TuiSubmitPromptResponses, unknown, ThrowOnError>({
1086
+ url: "/tui/submit-prompt",
1087
+ ...options,
1088
+ })
1089
+ }
1090
+
1091
+ /**
1092
+ * Clear the prompt
1093
+ */
1094
+ public clearPrompt<ThrowOnError extends boolean = false>(options?: Options<TuiClearPromptData, ThrowOnError>) {
1095
+ return (options?.client ?? this._client).post<TuiClearPromptResponses, unknown, ThrowOnError>({
1096
+ url: "/tui/clear-prompt",
1097
+ ...options,
1098
+ })
1099
+ }
1100
+
1101
+ /**
1102
+ * Execute a TUI command (e.g. agent_cycle)
1103
+ */
1104
+ public executeCommand<ThrowOnError extends boolean = false>(options?: Options<TuiExecuteCommandData, ThrowOnError>) {
1105
+ return (options?.client ?? this._client).post<TuiExecuteCommandResponses, TuiExecuteCommandErrors, ThrowOnError>({
1106
+ url: "/tui/execute-command",
1107
+ ...options,
1108
+ headers: {
1109
+ "Content-Type": "application/json",
1110
+ ...options?.headers,
1111
+ },
1112
+ })
1113
+ }
1114
+
1115
+ /**
1116
+ * Show a toast notification in the TUI
1117
+ */
1118
+ public showToast<ThrowOnError extends boolean = false>(options?: Options<TuiShowToastData, ThrowOnError>) {
1119
+ return (options?.client ?? this._client).post<TuiShowToastResponses, unknown, ThrowOnError>({
1120
+ url: "/tui/show-toast",
1121
+ ...options,
1122
+ headers: {
1123
+ "Content-Type": "application/json",
1124
+ ...options?.headers,
1125
+ },
1126
+ })
1127
+ }
1128
+
1129
+ /**
1130
+ * Publish a TUI event
1131
+ */
1132
+ public publish<ThrowOnError extends boolean = false>(options?: Options<TuiPublishData, ThrowOnError>) {
1133
+ return (options?.client ?? this._client).post<TuiPublishResponses, TuiPublishErrors, ThrowOnError>({
1134
+ url: "/tui/publish",
1135
+ ...options,
1136
+ headers: {
1137
+ "Content-Type": "application/json",
1138
+ ...options?.headers,
1139
+ },
1140
+ })
1141
+ }
1142
+ control = new Control({ client: this._client })
1143
+ }
1144
+
1145
+ class Event extends _HeyApiClient {
1146
+ /**
1147
+ * Get events
1148
+ */
1149
+ public subscribe<ThrowOnError extends boolean = false>(options?: Options<EventSubscribeData, ThrowOnError>) {
1150
+ return (options?.client ?? this._client).get.sse<EventSubscribeResponses, unknown, ThrowOnError>({
1151
+ url: "/event",
1152
+ ...options,
1153
+ })
1154
+ }
1155
+ }
1156
+
1157
+ export class SaeeolClient extends _HeyApiClient {
1158
+ /**
1159
+ * Respond to a permission request
1160
+ */
1161
+ public postSessionIdPermissionsPermissionId<ThrowOnError extends boolean = false>(
1162
+ options: Options<PostSessionIdPermissionsPermissionIdData, ThrowOnError>,
1163
+ ) {
1164
+ return (options.client ?? this._client).post<
1165
+ PostSessionIdPermissionsPermissionIdResponses,
1166
+ PostSessionIdPermissionsPermissionIdErrors,
1167
+ ThrowOnError
1168
+ >({
1169
+ url: "/session/{id}/permissions/{permissionID}",
1170
+ ...options,
1171
+ headers: {
1172
+ "Content-Type": "application/json",
1173
+ ...options.headers,
1174
+ },
1175
+ })
1176
+ }
1177
+ global = new Global({ client: this._client })
1178
+ project = new Project({ client: this._client })
1179
+ pty = new Pty({ client: this._client })
1180
+ config = new Config({ client: this._client })
1181
+ tool = new Tool({ client: this._client })
1182
+ instance = new Instance({ client: this._client })
1183
+ path = new Path({ client: this._client })
1184
+ vcs = new Vcs({ client: this._client })
1185
+ session = new Session({ client: this._client })
1186
+ command = new Command({ client: this._client })
1187
+ provider = new Provider({ client: this._client })
1188
+ find = new Find({ client: this._client })
1189
+ file = new File({ client: this._client })
1190
+ app = new App({ client: this._client })
1191
+ mcp = new Mcp({ client: this._client })
1192
+ lsp = new Lsp({ client: this._client })
1193
+ formatter = new Formatter({ client: this._client })
1194
+ tui = new Tui({ client: this._client })
1195
+ auth = new Auth({ client: this._client })
1196
+ event = new Event({ client: this._client })
1197
+ }