@opencode-ai/sdk 1.15.13 → 1.16.1
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.
- package/dist/v2/client.d.ts +1 -0
- package/dist/v2/client.js +4 -2
- package/dist/v2/gen/sdk.gen.d.ts +497 -230
- package/dist/v2/gen/sdk.gen.js +886 -427
- package/dist/v2/gen/types.gen.d.ts +6051 -4215
- package/package.json +1 -1
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -132,80 +132,24 @@ export class App extends HeyApiClient {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
export class
|
|
136
|
-
/**
|
|
137
|
-
* Get global configuration
|
|
138
|
-
*
|
|
139
|
-
* Retrieve the current global OpenCode configuration settings and preferences.
|
|
140
|
-
*/
|
|
141
|
-
get(options) {
|
|
142
|
-
return (options?.client ?? this.client).get({
|
|
143
|
-
url: "/global/config",
|
|
144
|
-
...options,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
135
|
+
export class ControlPlane extends HeyApiClient {
|
|
147
136
|
/**
|
|
148
|
-
*
|
|
137
|
+
* Move session
|
|
149
138
|
*
|
|
150
|
-
*
|
|
139
|
+
* Move a session to another project directory, optionally transferring local changes.
|
|
151
140
|
*/
|
|
152
|
-
|
|
153
|
-
const params = buildClientParams([parameters], [
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
...options?.headers,
|
|
161
|
-
...params.headers,
|
|
141
|
+
moveSession(parameters, options) {
|
|
142
|
+
const params = buildClientParams([parameters], [
|
|
143
|
+
{
|
|
144
|
+
args: [
|
|
145
|
+
{ in: "body", key: "sessionID" },
|
|
146
|
+
{ in: "body", key: "destination" },
|
|
147
|
+
{ in: "body", key: "moveChanges" },
|
|
148
|
+
],
|
|
162
149
|
},
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
export class Global extends HeyApiClient {
|
|
167
|
-
/**
|
|
168
|
-
* Get health
|
|
169
|
-
*
|
|
170
|
-
* Get health information about the OpenCode server.
|
|
171
|
-
*/
|
|
172
|
-
health(options) {
|
|
173
|
-
return (options?.client ?? this.client).get({
|
|
174
|
-
url: "/global/health",
|
|
175
|
-
...options,
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Get global events
|
|
180
|
-
*
|
|
181
|
-
* Subscribe to global events from the OpenCode system using server-sent events.
|
|
182
|
-
*/
|
|
183
|
-
event(options) {
|
|
184
|
-
return (options?.client ?? this.client).sse.get({
|
|
185
|
-
url: "/global/event",
|
|
186
|
-
...options,
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Dispose instance
|
|
191
|
-
*
|
|
192
|
-
* Clean up and dispose all OpenCode instances, releasing all resources.
|
|
193
|
-
*/
|
|
194
|
-
dispose(options) {
|
|
195
|
-
return (options?.client ?? this.client).post({
|
|
196
|
-
url: "/global/dispose",
|
|
197
|
-
...options,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Upgrade opencode
|
|
202
|
-
*
|
|
203
|
-
* Upgrade opencode to the specified version or latest if not specified.
|
|
204
|
-
*/
|
|
205
|
-
upgrade(parameters, options) {
|
|
206
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
|
|
150
|
+
]);
|
|
207
151
|
return (options?.client ?? this.client).post({
|
|
208
|
-
url: "/
|
|
152
|
+
url: "/experimental/control-plane/move-session",
|
|
209
153
|
...options,
|
|
210
154
|
...params,
|
|
211
155
|
headers: {
|
|
@@ -215,18 +159,14 @@ export class Global extends HeyApiClient {
|
|
|
215
159
|
},
|
|
216
160
|
});
|
|
217
161
|
}
|
|
218
|
-
_config;
|
|
219
|
-
get config() {
|
|
220
|
-
return (this._config ??= new Config({ client: this.client }));
|
|
221
|
-
}
|
|
222
162
|
}
|
|
223
|
-
export class
|
|
163
|
+
export class Console extends HeyApiClient {
|
|
224
164
|
/**
|
|
225
|
-
*
|
|
165
|
+
* Get active Console provider metadata
|
|
226
166
|
*
|
|
227
|
-
* Get
|
|
167
|
+
* Get the active Console org name and the set of provider IDs managed by that Console org.
|
|
228
168
|
*/
|
|
229
|
-
|
|
169
|
+
get(parameters, options) {
|
|
230
170
|
const params = buildClientParams([parameters], [
|
|
231
171
|
{
|
|
232
172
|
args: [
|
|
@@ -235,20 +175,18 @@ export class Event extends HeyApiClient {
|
|
|
235
175
|
],
|
|
236
176
|
},
|
|
237
177
|
]);
|
|
238
|
-
return (options?.client ?? this.client).
|
|
239
|
-
url: "/
|
|
178
|
+
return (options?.client ?? this.client).get({
|
|
179
|
+
url: "/experimental/console",
|
|
240
180
|
...options,
|
|
241
181
|
...params,
|
|
242
182
|
});
|
|
243
183
|
}
|
|
244
|
-
}
|
|
245
|
-
export class Config2 extends HeyApiClient {
|
|
246
184
|
/**
|
|
247
|
-
*
|
|
185
|
+
* List switchable Console orgs
|
|
248
186
|
*
|
|
249
|
-
*
|
|
187
|
+
* Get the available Console orgs across logged-in accounts, including the current active org.
|
|
250
188
|
*/
|
|
251
|
-
|
|
189
|
+
listOrgs(parameters, options) {
|
|
252
190
|
const params = buildClientParams([parameters], [
|
|
253
191
|
{
|
|
254
192
|
args: [
|
|
@@ -258,28 +196,29 @@ export class Config2 extends HeyApiClient {
|
|
|
258
196
|
},
|
|
259
197
|
]);
|
|
260
198
|
return (options?.client ?? this.client).get({
|
|
261
|
-
url: "/
|
|
199
|
+
url: "/experimental/console/orgs",
|
|
262
200
|
...options,
|
|
263
201
|
...params,
|
|
264
202
|
});
|
|
265
203
|
}
|
|
266
204
|
/**
|
|
267
|
-
*
|
|
205
|
+
* Switch active Console org
|
|
268
206
|
*
|
|
269
|
-
*
|
|
207
|
+
* Persist a new active Console account/org selection for the current local OpenCode state.
|
|
270
208
|
*/
|
|
271
|
-
|
|
209
|
+
switchOrg(parameters, options) {
|
|
272
210
|
const params = buildClientParams([parameters], [
|
|
273
211
|
{
|
|
274
212
|
args: [
|
|
275
213
|
{ in: "query", key: "directory" },
|
|
276
214
|
{ in: "query", key: "workspace" },
|
|
277
|
-
{
|
|
215
|
+
{ in: "body", key: "accountID" },
|
|
216
|
+
{ in: "body", key: "orgID" },
|
|
278
217
|
],
|
|
279
218
|
},
|
|
280
219
|
]);
|
|
281
|
-
return (options?.client ?? this.client).
|
|
282
|
-
url: "/
|
|
220
|
+
return (options?.client ?? this.client).post({
|
|
221
|
+
url: "/experimental/console/switch",
|
|
283
222
|
...options,
|
|
284
223
|
...params,
|
|
285
224
|
headers: {
|
|
@@ -289,54 +228,63 @@ export class Config2 extends HeyApiClient {
|
|
|
289
228
|
},
|
|
290
229
|
});
|
|
291
230
|
}
|
|
231
|
+
}
|
|
232
|
+
export class Session extends HeyApiClient {
|
|
292
233
|
/**
|
|
293
|
-
* List
|
|
234
|
+
* List sessions
|
|
294
235
|
*
|
|
295
|
-
* Get a list of all
|
|
236
|
+
* Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
|
|
296
237
|
*/
|
|
297
|
-
|
|
238
|
+
list(parameters, options) {
|
|
298
239
|
const params = buildClientParams([parameters], [
|
|
299
240
|
{
|
|
300
241
|
args: [
|
|
301
242
|
{ in: "query", key: "directory" },
|
|
302
243
|
{ in: "query", key: "workspace" },
|
|
244
|
+
{ in: "query", key: "roots" },
|
|
245
|
+
{ in: "query", key: "start" },
|
|
246
|
+
{ in: "query", key: "cursor" },
|
|
247
|
+
{ in: "query", key: "search" },
|
|
248
|
+
{ in: "query", key: "limit" },
|
|
249
|
+
{ in: "query", key: "archived" },
|
|
303
250
|
],
|
|
304
251
|
},
|
|
305
252
|
]);
|
|
306
253
|
return (options?.client ?? this.client).get({
|
|
307
|
-
url: "/
|
|
254
|
+
url: "/experimental/session",
|
|
308
255
|
...options,
|
|
309
256
|
...params,
|
|
310
257
|
});
|
|
311
258
|
}
|
|
312
|
-
}
|
|
313
|
-
export class Console extends HeyApiClient {
|
|
314
259
|
/**
|
|
315
|
-
*
|
|
260
|
+
* Background subagents
|
|
316
261
|
*
|
|
317
|
-
*
|
|
262
|
+
* Detach any synchronous subagents currently blocking the session and continue them in the background.
|
|
318
263
|
*/
|
|
319
|
-
|
|
264
|
+
background(parameters, options) {
|
|
320
265
|
const params = buildClientParams([parameters], [
|
|
321
266
|
{
|
|
322
267
|
args: [
|
|
268
|
+
{ in: "path", key: "sessionID" },
|
|
323
269
|
{ in: "query", key: "directory" },
|
|
324
270
|
{ in: "query", key: "workspace" },
|
|
325
271
|
],
|
|
326
272
|
},
|
|
327
273
|
]);
|
|
328
|
-
return (options?.client ?? this.client).
|
|
329
|
-
url: "/experimental/
|
|
274
|
+
return (options?.client ?? this.client).post({
|
|
275
|
+
url: "/experimental/session/{sessionID}/background",
|
|
330
276
|
...options,
|
|
331
277
|
...params,
|
|
332
278
|
});
|
|
333
279
|
}
|
|
280
|
+
}
|
|
281
|
+
export class Resource extends HeyApiClient {
|
|
334
282
|
/**
|
|
335
|
-
*
|
|
283
|
+
* Get MCP resources
|
|
336
284
|
*
|
|
337
|
-
* Get
|
|
285
|
+
* Get all available MCP resources from connected servers. Optionally filter by name.
|
|
338
286
|
*/
|
|
339
|
-
|
|
287
|
+
list(parameters, options) {
|
|
340
288
|
const params = buildClientParams([parameters], [
|
|
341
289
|
{
|
|
342
290
|
args: [
|
|
@@ -346,29 +294,39 @@ export class Console extends HeyApiClient {
|
|
|
346
294
|
},
|
|
347
295
|
]);
|
|
348
296
|
return (options?.client ?? this.client).get({
|
|
349
|
-
url: "/experimental/
|
|
297
|
+
url: "/experimental/resource",
|
|
350
298
|
...options,
|
|
351
299
|
...params,
|
|
352
300
|
});
|
|
353
301
|
}
|
|
302
|
+
}
|
|
303
|
+
export class ProjectCopy extends HeyApiClient {
|
|
354
304
|
/**
|
|
355
|
-
*
|
|
305
|
+
* Remove project copy
|
|
356
306
|
*
|
|
357
|
-
*
|
|
307
|
+
* Remove a local physical copy of a project using the selected strategy.
|
|
358
308
|
*/
|
|
359
|
-
|
|
309
|
+
remove(parameters, options) {
|
|
360
310
|
const params = buildClientParams([parameters], [
|
|
361
311
|
{
|
|
362
312
|
args: [
|
|
363
|
-
{ in: "
|
|
313
|
+
{ in: "path", key: "projectID" },
|
|
314
|
+
{
|
|
315
|
+
in: "query",
|
|
316
|
+
key: "query_directory",
|
|
317
|
+
map: "directory",
|
|
318
|
+
},
|
|
364
319
|
{ in: "query", key: "workspace" },
|
|
365
|
-
{
|
|
366
|
-
|
|
320
|
+
{
|
|
321
|
+
in: "body",
|
|
322
|
+
key: "body_directory",
|
|
323
|
+
map: "directory",
|
|
324
|
+
},
|
|
367
325
|
],
|
|
368
326
|
},
|
|
369
327
|
]);
|
|
370
|
-
return (options?.client ?? this.client).
|
|
371
|
-
url: "/experimental/
|
|
328
|
+
return (options?.client ?? this.client).delete({
|
|
329
|
+
url: "/experimental/project/{projectID}/copy",
|
|
372
330
|
...options,
|
|
373
331
|
...params,
|
|
374
332
|
headers: {
|
|
@@ -378,52 +336,52 @@ export class Console extends HeyApiClient {
|
|
|
378
336
|
},
|
|
379
337
|
});
|
|
380
338
|
}
|
|
381
|
-
}
|
|
382
|
-
export class Session extends HeyApiClient {
|
|
383
339
|
/**
|
|
384
|
-
*
|
|
340
|
+
* Create project copy
|
|
385
341
|
*
|
|
386
|
-
*
|
|
342
|
+
* Create a local physical copy of a project using the selected strategy.
|
|
387
343
|
*/
|
|
388
|
-
|
|
344
|
+
create(parameters, options) {
|
|
389
345
|
const params = buildClientParams([parameters], [
|
|
390
346
|
{
|
|
391
347
|
args: [
|
|
392
|
-
{ in: "
|
|
348
|
+
{ in: "path", key: "projectID" },
|
|
393
349
|
{ in: "query", key: "workspace" },
|
|
394
|
-
{ in: "
|
|
395
|
-
{ in: "
|
|
396
|
-
{ in: "
|
|
397
|
-
{ in: "
|
|
398
|
-
{ in: "query", key: "limit" },
|
|
399
|
-
{ in: "query", key: "archived" },
|
|
350
|
+
{ in: "body", key: "strategy" },
|
|
351
|
+
{ in: "body", key: "directory" },
|
|
352
|
+
{ in: "body", key: "name" },
|
|
353
|
+
{ in: "body", key: "context" },
|
|
400
354
|
],
|
|
401
355
|
},
|
|
402
356
|
]);
|
|
403
|
-
return (options?.client ?? this.client).
|
|
404
|
-
url: "/experimental/
|
|
357
|
+
return (options?.client ?? this.client).post({
|
|
358
|
+
url: "/experimental/project/{projectID}/copy",
|
|
405
359
|
...options,
|
|
406
360
|
...params,
|
|
361
|
+
headers: {
|
|
362
|
+
"Content-Type": "application/json",
|
|
363
|
+
...options?.headers,
|
|
364
|
+
...params.headers,
|
|
365
|
+
},
|
|
407
366
|
});
|
|
408
367
|
}
|
|
409
|
-
}
|
|
410
|
-
export class Resource extends HeyApiClient {
|
|
411
368
|
/**
|
|
412
|
-
*
|
|
369
|
+
* Refresh project copies
|
|
413
370
|
*
|
|
414
|
-
*
|
|
371
|
+
* Discover local project copies using one or all configured strategies.
|
|
415
372
|
*/
|
|
416
|
-
|
|
373
|
+
refresh(parameters, options) {
|
|
417
374
|
const params = buildClientParams([parameters], [
|
|
418
375
|
{
|
|
419
376
|
args: [
|
|
377
|
+
{ in: "path", key: "projectID" },
|
|
420
378
|
{ in: "query", key: "directory" },
|
|
421
379
|
{ in: "query", key: "workspace" },
|
|
422
380
|
],
|
|
423
381
|
},
|
|
424
382
|
]);
|
|
425
|
-
return (options?.client ?? this.client).
|
|
426
|
-
url: "/experimental/
|
|
383
|
+
return (options?.client ?? this.client).post({
|
|
384
|
+
url: "/experimental/project/{projectID}/copy/refresh",
|
|
427
385
|
...options,
|
|
428
386
|
...params,
|
|
429
387
|
});
|
|
@@ -596,6 +554,10 @@ export class Workspace extends HeyApiClient {
|
|
|
596
554
|
}
|
|
597
555
|
}
|
|
598
556
|
export class Experimental extends HeyApiClient {
|
|
557
|
+
_controlPlane;
|
|
558
|
+
get controlPlane() {
|
|
559
|
+
return (this._controlPlane ??= new ControlPlane({ client: this.client }));
|
|
560
|
+
}
|
|
599
561
|
_console;
|
|
600
562
|
get console() {
|
|
601
563
|
return (this._console ??= new Console({ client: this.client }));
|
|
@@ -608,60 +570,242 @@ export class Experimental extends HeyApiClient {
|
|
|
608
570
|
get resource() {
|
|
609
571
|
return (this._resource ??= new Resource({ client: this.client }));
|
|
610
572
|
}
|
|
573
|
+
_projectCopy;
|
|
574
|
+
get projectCopy() {
|
|
575
|
+
return (this._projectCopy ??= new ProjectCopy({ client: this.client }));
|
|
576
|
+
}
|
|
611
577
|
_workspace;
|
|
612
578
|
get workspace() {
|
|
613
579
|
return (this._workspace ??= new Workspace({ client: this.client }));
|
|
614
580
|
}
|
|
615
581
|
}
|
|
616
|
-
export class
|
|
582
|
+
export class Config extends HeyApiClient {
|
|
617
583
|
/**
|
|
618
|
-
*
|
|
584
|
+
* Get global configuration
|
|
619
585
|
*
|
|
620
|
-
*
|
|
586
|
+
* Retrieve the current global OpenCode configuration settings and preferences.
|
|
621
587
|
*/
|
|
622
|
-
|
|
623
|
-
const params = buildClientParams([parameters], [
|
|
624
|
-
{
|
|
625
|
-
args: [
|
|
626
|
-
{ in: "query", key: "directory" },
|
|
627
|
-
{ in: "query", key: "workspace" },
|
|
628
|
-
{ in: "query", key: "provider" },
|
|
629
|
-
{ in: "query", key: "model" },
|
|
630
|
-
],
|
|
631
|
-
},
|
|
632
|
-
]);
|
|
588
|
+
get(options) {
|
|
633
589
|
return (options?.client ?? this.client).get({
|
|
634
|
-
url: "/
|
|
590
|
+
url: "/global/config",
|
|
635
591
|
...options,
|
|
636
|
-
...params,
|
|
637
592
|
});
|
|
638
593
|
}
|
|
639
594
|
/**
|
|
640
|
-
*
|
|
595
|
+
* Update global configuration
|
|
641
596
|
*
|
|
642
|
-
*
|
|
597
|
+
* Update global OpenCode configuration settings and preferences.
|
|
643
598
|
*/
|
|
644
|
-
|
|
645
|
-
const params = buildClientParams([parameters], [
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
{ in: "query", key: "directory" },
|
|
649
|
-
{ in: "query", key: "workspace" },
|
|
650
|
-
],
|
|
651
|
-
},
|
|
652
|
-
]);
|
|
653
|
-
return (options?.client ?? this.client).get({
|
|
654
|
-
url: "/experimental/tool/ids",
|
|
599
|
+
update(parameters, options) {
|
|
600
|
+
const params = buildClientParams([parameters], [{ args: [{ key: "config", map: "body" }] }]);
|
|
601
|
+
return (options?.client ?? this.client).patch({
|
|
602
|
+
url: "/global/config",
|
|
655
603
|
...options,
|
|
656
604
|
...params,
|
|
605
|
+
headers: {
|
|
606
|
+
"Content-Type": "application/json",
|
|
607
|
+
...options?.headers,
|
|
608
|
+
...params.headers,
|
|
609
|
+
},
|
|
657
610
|
});
|
|
658
611
|
}
|
|
659
612
|
}
|
|
660
|
-
export class
|
|
613
|
+
export class Global extends HeyApiClient {
|
|
661
614
|
/**
|
|
662
|
-
*
|
|
615
|
+
* Get health
|
|
663
616
|
*
|
|
664
|
-
*
|
|
617
|
+
* Get health information about the OpenCode server.
|
|
618
|
+
*/
|
|
619
|
+
health(options) {
|
|
620
|
+
return (options?.client ?? this.client).get({
|
|
621
|
+
url: "/global/health",
|
|
622
|
+
...options,
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Get global events
|
|
627
|
+
*
|
|
628
|
+
* Subscribe to global events from the OpenCode system using server-sent events.
|
|
629
|
+
*/
|
|
630
|
+
event(options) {
|
|
631
|
+
return (options?.client ?? this.client).sse.get({
|
|
632
|
+
url: "/global/event",
|
|
633
|
+
...options,
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Dispose instance
|
|
638
|
+
*
|
|
639
|
+
* Clean up and dispose all OpenCode instances, releasing all resources.
|
|
640
|
+
*/
|
|
641
|
+
dispose(options) {
|
|
642
|
+
return (options?.client ?? this.client).post({
|
|
643
|
+
url: "/global/dispose",
|
|
644
|
+
...options,
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Upgrade opencode
|
|
649
|
+
*
|
|
650
|
+
* Upgrade opencode to the specified version or latest if not specified.
|
|
651
|
+
*/
|
|
652
|
+
upgrade(parameters, options) {
|
|
653
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "body", key: "target" }] }]);
|
|
654
|
+
return (options?.client ?? this.client).post({
|
|
655
|
+
url: "/global/upgrade",
|
|
656
|
+
...options,
|
|
657
|
+
...params,
|
|
658
|
+
headers: {
|
|
659
|
+
"Content-Type": "application/json",
|
|
660
|
+
...options?.headers,
|
|
661
|
+
...params.headers,
|
|
662
|
+
},
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
_config;
|
|
666
|
+
get config() {
|
|
667
|
+
return (this._config ??= new Config({ client: this.client }));
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
export class Event extends HeyApiClient {
|
|
671
|
+
/**
|
|
672
|
+
* Subscribe to events
|
|
673
|
+
*
|
|
674
|
+
* Get events
|
|
675
|
+
*/
|
|
676
|
+
subscribe(parameters, options) {
|
|
677
|
+
const params = buildClientParams([parameters], [
|
|
678
|
+
{
|
|
679
|
+
args: [
|
|
680
|
+
{ in: "query", key: "directory" },
|
|
681
|
+
{ in: "query", key: "workspace" },
|
|
682
|
+
],
|
|
683
|
+
},
|
|
684
|
+
]);
|
|
685
|
+
return (options?.client ?? this.client).sse.get({
|
|
686
|
+
url: "/event",
|
|
687
|
+
...options,
|
|
688
|
+
...params,
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
export class Config2 extends HeyApiClient {
|
|
693
|
+
/**
|
|
694
|
+
* Get configuration
|
|
695
|
+
*
|
|
696
|
+
* Retrieve the current OpenCode configuration settings and preferences.
|
|
697
|
+
*/
|
|
698
|
+
get(parameters, options) {
|
|
699
|
+
const params = buildClientParams([parameters], [
|
|
700
|
+
{
|
|
701
|
+
args: [
|
|
702
|
+
{ in: "query", key: "directory" },
|
|
703
|
+
{ in: "query", key: "workspace" },
|
|
704
|
+
],
|
|
705
|
+
},
|
|
706
|
+
]);
|
|
707
|
+
return (options?.client ?? this.client).get({
|
|
708
|
+
url: "/config",
|
|
709
|
+
...options,
|
|
710
|
+
...params,
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Update configuration
|
|
715
|
+
*
|
|
716
|
+
* Update OpenCode configuration settings and preferences.
|
|
717
|
+
*/
|
|
718
|
+
update(parameters, options) {
|
|
719
|
+
const params = buildClientParams([parameters], [
|
|
720
|
+
{
|
|
721
|
+
args: [
|
|
722
|
+
{ in: "query", key: "directory" },
|
|
723
|
+
{ in: "query", key: "workspace" },
|
|
724
|
+
{ key: "config", map: "body" },
|
|
725
|
+
],
|
|
726
|
+
},
|
|
727
|
+
]);
|
|
728
|
+
return (options?.client ?? this.client).patch({
|
|
729
|
+
url: "/config",
|
|
730
|
+
...options,
|
|
731
|
+
...params,
|
|
732
|
+
headers: {
|
|
733
|
+
"Content-Type": "application/json",
|
|
734
|
+
...options?.headers,
|
|
735
|
+
...params.headers,
|
|
736
|
+
},
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* List config providers
|
|
741
|
+
*
|
|
742
|
+
* Get a list of all configured AI providers and their default models.
|
|
743
|
+
*/
|
|
744
|
+
providers(parameters, options) {
|
|
745
|
+
const params = buildClientParams([parameters], [
|
|
746
|
+
{
|
|
747
|
+
args: [
|
|
748
|
+
{ in: "query", key: "directory" },
|
|
749
|
+
{ in: "query", key: "workspace" },
|
|
750
|
+
],
|
|
751
|
+
},
|
|
752
|
+
]);
|
|
753
|
+
return (options?.client ?? this.client).get({
|
|
754
|
+
url: "/config/providers",
|
|
755
|
+
...options,
|
|
756
|
+
...params,
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
export class Tool extends HeyApiClient {
|
|
761
|
+
/**
|
|
762
|
+
* List tools
|
|
763
|
+
*
|
|
764
|
+
* Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
|
|
765
|
+
*/
|
|
766
|
+
list(parameters, options) {
|
|
767
|
+
const params = buildClientParams([parameters], [
|
|
768
|
+
{
|
|
769
|
+
args: [
|
|
770
|
+
{ in: "query", key: "directory" },
|
|
771
|
+
{ in: "query", key: "workspace" },
|
|
772
|
+
{ in: "query", key: "provider" },
|
|
773
|
+
{ in: "query", key: "model" },
|
|
774
|
+
],
|
|
775
|
+
},
|
|
776
|
+
]);
|
|
777
|
+
return (options?.client ?? this.client).get({
|
|
778
|
+
url: "/experimental/tool",
|
|
779
|
+
...options,
|
|
780
|
+
...params,
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* List tool IDs
|
|
785
|
+
*
|
|
786
|
+
* Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
|
|
787
|
+
*/
|
|
788
|
+
ids(parameters, options) {
|
|
789
|
+
const params = buildClientParams([parameters], [
|
|
790
|
+
{
|
|
791
|
+
args: [
|
|
792
|
+
{ in: "query", key: "directory" },
|
|
793
|
+
{ in: "query", key: "workspace" },
|
|
794
|
+
],
|
|
795
|
+
},
|
|
796
|
+
]);
|
|
797
|
+
return (options?.client ?? this.client).get({
|
|
798
|
+
url: "/experimental/tool/ids",
|
|
799
|
+
...options,
|
|
800
|
+
...params,
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
export class Worktree extends HeyApiClient {
|
|
805
|
+
/**
|
|
806
|
+
* Remove worktree
|
|
807
|
+
*
|
|
808
|
+
* Remove a git worktree and delete its branch.
|
|
665
809
|
*/
|
|
666
810
|
remove(parameters, options) {
|
|
667
811
|
const params = buildClientParams([parameters], [
|
|
@@ -1388,6 +1532,27 @@ export class Project extends HeyApiClient {
|
|
|
1388
1532
|
},
|
|
1389
1533
|
});
|
|
1390
1534
|
}
|
|
1535
|
+
/**
|
|
1536
|
+
* List project directories
|
|
1537
|
+
*
|
|
1538
|
+
* List known local absolute directories for a project.
|
|
1539
|
+
*/
|
|
1540
|
+
directories(parameters, options) {
|
|
1541
|
+
const params = buildClientParams([parameters], [
|
|
1542
|
+
{
|
|
1543
|
+
args: [
|
|
1544
|
+
{ in: "path", key: "projectID" },
|
|
1545
|
+
{ in: "query", key: "directory" },
|
|
1546
|
+
{ in: "query", key: "workspace" },
|
|
1547
|
+
],
|
|
1548
|
+
},
|
|
1549
|
+
]);
|
|
1550
|
+
return (options?.client ?? this.client).get({
|
|
1551
|
+
url: "/project/{projectID}/directories",
|
|
1552
|
+
...options,
|
|
1553
|
+
...params,
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1391
1556
|
}
|
|
1392
1557
|
export class Pty extends HeyApiClient {
|
|
1393
1558
|
/**
|
|
@@ -2607,53 +2772,44 @@ export class Sync extends HeyApiClient {
|
|
|
2607
2772
|
return (this._history ??= new History({ client: this.client }));
|
|
2608
2773
|
}
|
|
2609
2774
|
}
|
|
2610
|
-
export class
|
|
2775
|
+
export class Control extends HeyApiClient {
|
|
2611
2776
|
/**
|
|
2612
|
-
*
|
|
2777
|
+
* Get next TUI request
|
|
2613
2778
|
*
|
|
2614
|
-
* Retrieve
|
|
2779
|
+
* Retrieve the next TUI request from the queue for processing.
|
|
2615
2780
|
*/
|
|
2616
|
-
|
|
2781
|
+
next(parameters, options) {
|
|
2617
2782
|
const params = buildClientParams([parameters], [
|
|
2618
2783
|
{
|
|
2619
2784
|
args: [
|
|
2620
2785
|
{ in: "query", key: "directory" },
|
|
2621
2786
|
{ in: "query", key: "workspace" },
|
|
2622
|
-
{ in: "query", key: "limit" },
|
|
2623
|
-
{ in: "query", key: "order" },
|
|
2624
|
-
{ in: "query", key: "path" },
|
|
2625
|
-
{ in: "query", key: "roots" },
|
|
2626
|
-
{ in: "query", key: "start" },
|
|
2627
|
-
{ in: "query", key: "search" },
|
|
2628
|
-
{ in: "query", key: "cursor" },
|
|
2629
2787
|
],
|
|
2630
2788
|
},
|
|
2631
2789
|
]);
|
|
2632
2790
|
return (options?.client ?? this.client).get({
|
|
2633
|
-
url: "/
|
|
2791
|
+
url: "/tui/control/next",
|
|
2634
2792
|
...options,
|
|
2635
2793
|
...params,
|
|
2636
2794
|
});
|
|
2637
2795
|
}
|
|
2638
2796
|
/**
|
|
2639
|
-
*
|
|
2797
|
+
* Submit TUI response
|
|
2640
2798
|
*
|
|
2641
|
-
*
|
|
2799
|
+
* Submit a response to the TUI request queue to complete a pending request.
|
|
2642
2800
|
*/
|
|
2643
|
-
|
|
2801
|
+
response(parameters, options) {
|
|
2644
2802
|
const params = buildClientParams([parameters], [
|
|
2645
2803
|
{
|
|
2646
2804
|
args: [
|
|
2647
|
-
{ in: "path", key: "sessionID" },
|
|
2648
2805
|
{ in: "query", key: "directory" },
|
|
2649
2806
|
{ in: "query", key: "workspace" },
|
|
2650
|
-
{
|
|
2651
|
-
{ in: "body", key: "delivery" },
|
|
2807
|
+
{ key: "body", map: "body" },
|
|
2652
2808
|
],
|
|
2653
2809
|
},
|
|
2654
2810
|
]);
|
|
2655
2811
|
return (options?.client ?? this.client).post({
|
|
2656
|
-
url: "/
|
|
2812
|
+
url: "/tui/control/response",
|
|
2657
2813
|
...options,
|
|
2658
2814
|
...params,
|
|
2659
2815
|
headers: {
|
|
@@ -2663,235 +2819,36 @@ export class Session3 extends HeyApiClient {
|
|
|
2663
2819
|
},
|
|
2664
2820
|
});
|
|
2665
2821
|
}
|
|
2822
|
+
}
|
|
2823
|
+
export class Tui extends HeyApiClient {
|
|
2666
2824
|
/**
|
|
2667
|
-
*
|
|
2825
|
+
* Append TUI prompt
|
|
2668
2826
|
*
|
|
2669
|
-
*
|
|
2827
|
+
* Append prompt to the TUI.
|
|
2670
2828
|
*/
|
|
2671
|
-
|
|
2829
|
+
appendPrompt(parameters, options) {
|
|
2672
2830
|
const params = buildClientParams([parameters], [
|
|
2673
2831
|
{
|
|
2674
2832
|
args: [
|
|
2675
|
-
{ in: "path", key: "sessionID" },
|
|
2676
2833
|
{ in: "query", key: "directory" },
|
|
2677
2834
|
{ in: "query", key: "workspace" },
|
|
2835
|
+
{ in: "body", key: "text" },
|
|
2678
2836
|
],
|
|
2679
2837
|
},
|
|
2680
2838
|
]);
|
|
2681
2839
|
return (options?.client ?? this.client).post({
|
|
2682
|
-
url: "/
|
|
2840
|
+
url: "/tui/append-prompt",
|
|
2683
2841
|
...options,
|
|
2684
2842
|
...params,
|
|
2843
|
+
headers: {
|
|
2844
|
+
"Content-Type": "application/json",
|
|
2845
|
+
...options?.headers,
|
|
2846
|
+
...params.headers,
|
|
2847
|
+
},
|
|
2685
2848
|
});
|
|
2686
2849
|
}
|
|
2687
2850
|
/**
|
|
2688
|
-
*
|
|
2689
|
-
*
|
|
2690
|
-
* Wait for a v2 session agent loop to become idle.
|
|
2691
|
-
*/
|
|
2692
|
-
wait(parameters, options) {
|
|
2693
|
-
const params = buildClientParams([parameters], [
|
|
2694
|
-
{
|
|
2695
|
-
args: [
|
|
2696
|
-
{ in: "path", key: "sessionID" },
|
|
2697
|
-
{ in: "query", key: "directory" },
|
|
2698
|
-
{ in: "query", key: "workspace" },
|
|
2699
|
-
],
|
|
2700
|
-
},
|
|
2701
|
-
]);
|
|
2702
|
-
return (options?.client ?? this.client).post({
|
|
2703
|
-
url: "/api/session/{sessionID}/wait",
|
|
2704
|
-
...options,
|
|
2705
|
-
...params,
|
|
2706
|
-
});
|
|
2707
|
-
}
|
|
2708
|
-
/**
|
|
2709
|
-
* Get v2 session context
|
|
2710
|
-
*
|
|
2711
|
-
* Retrieve the active context messages for a v2 session (all messages after the last compaction).
|
|
2712
|
-
*/
|
|
2713
|
-
context(parameters, options) {
|
|
2714
|
-
const params = buildClientParams([parameters], [
|
|
2715
|
-
{
|
|
2716
|
-
args: [
|
|
2717
|
-
{ in: "path", key: "sessionID" },
|
|
2718
|
-
{ in: "query", key: "directory" },
|
|
2719
|
-
{ in: "query", key: "workspace" },
|
|
2720
|
-
],
|
|
2721
|
-
},
|
|
2722
|
-
]);
|
|
2723
|
-
return (options?.client ?? this.client).get({
|
|
2724
|
-
url: "/api/session/{sessionID}/context",
|
|
2725
|
-
...options,
|
|
2726
|
-
...params,
|
|
2727
|
-
});
|
|
2728
|
-
}
|
|
2729
|
-
/**
|
|
2730
|
-
* Get v2 session messages
|
|
2731
|
-
*
|
|
2732
|
-
* Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
|
|
2733
|
-
*/
|
|
2734
|
-
messages(parameters, options) {
|
|
2735
|
-
const params = buildClientParams([parameters], [
|
|
2736
|
-
{
|
|
2737
|
-
args: [
|
|
2738
|
-
{ in: "path", key: "sessionID" },
|
|
2739
|
-
{ in: "query", key: "directory" },
|
|
2740
|
-
{ in: "query", key: "workspace" },
|
|
2741
|
-
{ in: "query", key: "limit" },
|
|
2742
|
-
{ in: "query", key: "order" },
|
|
2743
|
-
{ in: "query", key: "cursor" },
|
|
2744
|
-
],
|
|
2745
|
-
},
|
|
2746
|
-
]);
|
|
2747
|
-
return (options?.client ?? this.client).get({
|
|
2748
|
-
url: "/api/session/{sessionID}/message",
|
|
2749
|
-
...options,
|
|
2750
|
-
...params,
|
|
2751
|
-
});
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
export class Model extends HeyApiClient {
|
|
2755
|
-
/**
|
|
2756
|
-
* List v2 models
|
|
2757
|
-
*
|
|
2758
|
-
* Retrieve available v2 models ordered by release date.
|
|
2759
|
-
*/
|
|
2760
|
-
list(parameters, options) {
|
|
2761
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
2762
|
-
return (options?.client ?? this.client).get({
|
|
2763
|
-
url: "/api/model",
|
|
2764
|
-
...options,
|
|
2765
|
-
...params,
|
|
2766
|
-
});
|
|
2767
|
-
}
|
|
2768
|
-
}
|
|
2769
|
-
export class Provider2 extends HeyApiClient {
|
|
2770
|
-
/**
|
|
2771
|
-
* List v2 providers
|
|
2772
|
-
*
|
|
2773
|
-
* Retrieve active v2 AI providers so clients can show provider availability and configuration.
|
|
2774
|
-
*/
|
|
2775
|
-
list(parameters, options) {
|
|
2776
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
2777
|
-
return (options?.client ?? this.client).get({
|
|
2778
|
-
url: "/api/provider",
|
|
2779
|
-
...options,
|
|
2780
|
-
...params,
|
|
2781
|
-
});
|
|
2782
|
-
}
|
|
2783
|
-
/**
|
|
2784
|
-
* Get v2 provider
|
|
2785
|
-
*
|
|
2786
|
-
* Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
|
|
2787
|
-
*/
|
|
2788
|
-
get(parameters, options) {
|
|
2789
|
-
const params = buildClientParams([parameters], [
|
|
2790
|
-
{
|
|
2791
|
-
args: [
|
|
2792
|
-
{ in: "path", key: "providerID" },
|
|
2793
|
-
{ in: "query", key: "location" },
|
|
2794
|
-
],
|
|
2795
|
-
},
|
|
2796
|
-
]);
|
|
2797
|
-
return (options?.client ?? this.client).get({
|
|
2798
|
-
url: "/api/provider/{providerID}",
|
|
2799
|
-
...options,
|
|
2800
|
-
...params,
|
|
2801
|
-
});
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
export class V2 extends HeyApiClient {
|
|
2805
|
-
_session;
|
|
2806
|
-
get session() {
|
|
2807
|
-
return (this._session ??= new Session3({ client: this.client }));
|
|
2808
|
-
}
|
|
2809
|
-
_model;
|
|
2810
|
-
get model() {
|
|
2811
|
-
return (this._model ??= new Model({ client: this.client }));
|
|
2812
|
-
}
|
|
2813
|
-
_provider;
|
|
2814
|
-
get provider() {
|
|
2815
|
-
return (this._provider ??= new Provider2({ client: this.client }));
|
|
2816
|
-
}
|
|
2817
|
-
}
|
|
2818
|
-
export class Control extends HeyApiClient {
|
|
2819
|
-
/**
|
|
2820
|
-
* Get next TUI request
|
|
2821
|
-
*
|
|
2822
|
-
* Retrieve the next TUI request from the queue for processing.
|
|
2823
|
-
*/
|
|
2824
|
-
next(parameters, options) {
|
|
2825
|
-
const params = buildClientParams([parameters], [
|
|
2826
|
-
{
|
|
2827
|
-
args: [
|
|
2828
|
-
{ in: "query", key: "directory" },
|
|
2829
|
-
{ in: "query", key: "workspace" },
|
|
2830
|
-
],
|
|
2831
|
-
},
|
|
2832
|
-
]);
|
|
2833
|
-
return (options?.client ?? this.client).get({
|
|
2834
|
-
url: "/tui/control/next",
|
|
2835
|
-
...options,
|
|
2836
|
-
...params,
|
|
2837
|
-
});
|
|
2838
|
-
}
|
|
2839
|
-
/**
|
|
2840
|
-
* Submit TUI response
|
|
2841
|
-
*
|
|
2842
|
-
* Submit a response to the TUI request queue to complete a pending request.
|
|
2843
|
-
*/
|
|
2844
|
-
response(parameters, options) {
|
|
2845
|
-
const params = buildClientParams([parameters], [
|
|
2846
|
-
{
|
|
2847
|
-
args: [
|
|
2848
|
-
{ in: "query", key: "directory" },
|
|
2849
|
-
{ in: "query", key: "workspace" },
|
|
2850
|
-
{ key: "body", map: "body" },
|
|
2851
|
-
],
|
|
2852
|
-
},
|
|
2853
|
-
]);
|
|
2854
|
-
return (options?.client ?? this.client).post({
|
|
2855
|
-
url: "/tui/control/response",
|
|
2856
|
-
...options,
|
|
2857
|
-
...params,
|
|
2858
|
-
headers: {
|
|
2859
|
-
"Content-Type": "application/json",
|
|
2860
|
-
...options?.headers,
|
|
2861
|
-
...params.headers,
|
|
2862
|
-
},
|
|
2863
|
-
});
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
export class Tui extends HeyApiClient {
|
|
2867
|
-
/**
|
|
2868
|
-
* Append TUI prompt
|
|
2869
|
-
*
|
|
2870
|
-
* Append prompt to the TUI.
|
|
2871
|
-
*/
|
|
2872
|
-
appendPrompt(parameters, options) {
|
|
2873
|
-
const params = buildClientParams([parameters], [
|
|
2874
|
-
{
|
|
2875
|
-
args: [
|
|
2876
|
-
{ in: "query", key: "directory" },
|
|
2877
|
-
{ in: "query", key: "workspace" },
|
|
2878
|
-
{ in: "body", key: "text" },
|
|
2879
|
-
],
|
|
2880
|
-
},
|
|
2881
|
-
]);
|
|
2882
|
-
return (options?.client ?? this.client).post({
|
|
2883
|
-
url: "/tui/append-prompt",
|
|
2884
|
-
...options,
|
|
2885
|
-
...params,
|
|
2886
|
-
headers: {
|
|
2887
|
-
"Content-Type": "application/json",
|
|
2888
|
-
...options?.headers,
|
|
2889
|
-
...params.headers,
|
|
2890
|
-
},
|
|
2891
|
-
});
|
|
2892
|
-
}
|
|
2893
|
-
/**
|
|
2894
|
-
* Open help dialog
|
|
2851
|
+
* Open help dialog
|
|
2895
2852
|
*
|
|
2896
2853
|
* Open the help dialog in the TUI to display user assistance information.
|
|
2897
2854
|
*/
|
|
@@ -3122,36 +3079,538 @@ export class Tui extends HeyApiClient {
|
|
|
3122
3079
|
return (this._control ??= new Control({ client: this.client }));
|
|
3123
3080
|
}
|
|
3124
3081
|
}
|
|
3125
|
-
export class
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
get app() {
|
|
3137
|
-
return (this._app ??= new App({ client: this.client }));
|
|
3138
|
-
}
|
|
3139
|
-
_global;
|
|
3140
|
-
get global() {
|
|
3141
|
-
return (this._global ??= new Global({ client: this.client }));
|
|
3082
|
+
export class Health extends HeyApiClient {
|
|
3083
|
+
/**
|
|
3084
|
+
* Check v2 server health
|
|
3085
|
+
*
|
|
3086
|
+
* Check whether the v2 API server is ready to accept requests.
|
|
3087
|
+
*/
|
|
3088
|
+
get(options) {
|
|
3089
|
+
return (options?.client ?? this.client).get({
|
|
3090
|
+
url: "/api/health",
|
|
3091
|
+
...options,
|
|
3092
|
+
});
|
|
3142
3093
|
}
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3094
|
+
}
|
|
3095
|
+
export class Agent extends HeyApiClient {
|
|
3096
|
+
/**
|
|
3097
|
+
* List v2 agents
|
|
3098
|
+
*
|
|
3099
|
+
* Retrieve currently registered v2 agents.
|
|
3100
|
+
*/
|
|
3101
|
+
list(parameters, options) {
|
|
3102
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3103
|
+
return (options?.client ?? this.client).get({
|
|
3104
|
+
url: "/api/agent",
|
|
3105
|
+
...options,
|
|
3106
|
+
...params,
|
|
3107
|
+
});
|
|
3146
3108
|
}
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3109
|
+
}
|
|
3110
|
+
export class Permission2 extends HeyApiClient {
|
|
3111
|
+
/**
|
|
3112
|
+
* List session permission requests
|
|
3113
|
+
*
|
|
3114
|
+
* Retrieve pending permission requests owned by a session.
|
|
3115
|
+
*/
|
|
3116
|
+
list(parameters, options) {
|
|
3117
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3118
|
+
return (options?.client ?? this.client).get({
|
|
3119
|
+
url: "/api/session/{sessionID}/permission/request",
|
|
3120
|
+
...options,
|
|
3121
|
+
...params,
|
|
3122
|
+
});
|
|
3150
3123
|
}
|
|
3151
|
-
|
|
3152
|
-
|
|
3124
|
+
/**
|
|
3125
|
+
* Reply to pending permission request
|
|
3126
|
+
*
|
|
3127
|
+
* Respond to a pending permission request owned by a session.
|
|
3128
|
+
*/
|
|
3129
|
+
reply(parameters, options) {
|
|
3130
|
+
const params = buildClientParams([parameters], [
|
|
3131
|
+
{
|
|
3132
|
+
args: [
|
|
3133
|
+
{ in: "path", key: "sessionID" },
|
|
3134
|
+
{ in: "path", key: "requestID" },
|
|
3135
|
+
{ in: "body", key: "reply" },
|
|
3136
|
+
{ in: "body", key: "message" },
|
|
3137
|
+
],
|
|
3138
|
+
},
|
|
3139
|
+
]);
|
|
3140
|
+
return (options?.client ?? this.client).post({
|
|
3141
|
+
url: "/api/session/{sessionID}/permission/request/{requestID}/reply",
|
|
3142
|
+
...options,
|
|
3143
|
+
...params,
|
|
3144
|
+
headers: {
|
|
3145
|
+
"Content-Type": "application/json",
|
|
3146
|
+
...options?.headers,
|
|
3147
|
+
...params.headers,
|
|
3148
|
+
},
|
|
3149
|
+
});
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
export class Question2 extends HeyApiClient {
|
|
3153
|
+
/**
|
|
3154
|
+
* Reply to pending question request
|
|
3155
|
+
*
|
|
3156
|
+
* Answer a pending question request owned by a session.
|
|
3157
|
+
*/
|
|
3158
|
+
reply(parameters, options) {
|
|
3159
|
+
const params = buildClientParams([parameters], [
|
|
3160
|
+
{
|
|
3161
|
+
args: [
|
|
3162
|
+
{ in: "path", key: "sessionID" },
|
|
3163
|
+
{ in: "path", key: "requestID" },
|
|
3164
|
+
{ key: "questionV2Reply", map: "body" },
|
|
3165
|
+
],
|
|
3166
|
+
},
|
|
3167
|
+
]);
|
|
3168
|
+
return (options?.client ?? this.client).post({
|
|
3169
|
+
url: "/api/session/{sessionID}/question/request/{requestID}/reply",
|
|
3170
|
+
...options,
|
|
3171
|
+
...params,
|
|
3172
|
+
headers: {
|
|
3173
|
+
"Content-Type": "application/json",
|
|
3174
|
+
...options?.headers,
|
|
3175
|
+
...params.headers,
|
|
3176
|
+
},
|
|
3177
|
+
});
|
|
3178
|
+
}
|
|
3179
|
+
/**
|
|
3180
|
+
* Reject pending question request
|
|
3181
|
+
*
|
|
3182
|
+
* Reject a pending question request owned by a session.
|
|
3183
|
+
*/
|
|
3184
|
+
reject(parameters, options) {
|
|
3185
|
+
const params = buildClientParams([parameters], [
|
|
3186
|
+
{
|
|
3187
|
+
args: [
|
|
3188
|
+
{ in: "path", key: "sessionID" },
|
|
3189
|
+
{ in: "path", key: "requestID" },
|
|
3190
|
+
],
|
|
3191
|
+
},
|
|
3192
|
+
]);
|
|
3193
|
+
return (options?.client ?? this.client).post({
|
|
3194
|
+
url: "/api/session/{sessionID}/question/request/{requestID}/reject",
|
|
3195
|
+
...options,
|
|
3196
|
+
...params,
|
|
3197
|
+
});
|
|
3198
|
+
}
|
|
3199
|
+
}
|
|
3200
|
+
export class Session3 extends HeyApiClient {
|
|
3201
|
+
/**
|
|
3202
|
+
* List v2 sessions
|
|
3203
|
+
*
|
|
3204
|
+
* Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
|
|
3205
|
+
*/
|
|
3206
|
+
list(parameters, options) {
|
|
3207
|
+
const params = buildClientParams([parameters], [
|
|
3208
|
+
{
|
|
3209
|
+
args: [
|
|
3210
|
+
{ in: "query", key: "workspace" },
|
|
3211
|
+
{ in: "query", key: "limit" },
|
|
3212
|
+
{ in: "query", key: "order" },
|
|
3213
|
+
{ in: "query", key: "search" },
|
|
3214
|
+
{ in: "query", key: "directory" },
|
|
3215
|
+
{ in: "query", key: "project" },
|
|
3216
|
+
{ in: "query", key: "subpath" },
|
|
3217
|
+
{ in: "query", key: "cursor" },
|
|
3218
|
+
],
|
|
3219
|
+
},
|
|
3220
|
+
]);
|
|
3221
|
+
return (options?.client ?? this.client).get({
|
|
3222
|
+
url: "/api/session",
|
|
3223
|
+
...options,
|
|
3224
|
+
...params,
|
|
3225
|
+
});
|
|
3226
|
+
}
|
|
3227
|
+
/**
|
|
3228
|
+
* Send v2 message
|
|
3229
|
+
*
|
|
3230
|
+
* Durably admit one v2 session input and schedule agent-loop execution unless resume is false.
|
|
3231
|
+
*/
|
|
3232
|
+
prompt(parameters, options) {
|
|
3233
|
+
const params = buildClientParams([parameters], [
|
|
3234
|
+
{
|
|
3235
|
+
args: [
|
|
3236
|
+
{ in: "path", key: "sessionID" },
|
|
3237
|
+
{ in: "body", key: "id" },
|
|
3238
|
+
{ in: "body", key: "prompt" },
|
|
3239
|
+
{ in: "body", key: "delivery" },
|
|
3240
|
+
{ in: "body", key: "resume" },
|
|
3241
|
+
],
|
|
3242
|
+
},
|
|
3243
|
+
]);
|
|
3244
|
+
return (options?.client ?? this.client).post({
|
|
3245
|
+
url: "/api/session/{sessionID}/prompt",
|
|
3246
|
+
...options,
|
|
3247
|
+
...params,
|
|
3248
|
+
headers: {
|
|
3249
|
+
"Content-Type": "application/json",
|
|
3250
|
+
...options?.headers,
|
|
3251
|
+
...params.headers,
|
|
3252
|
+
},
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3255
|
+
/**
|
|
3256
|
+
* Compact v2 session
|
|
3257
|
+
*
|
|
3258
|
+
* Compact a v2 session conversation.
|
|
3259
|
+
*/
|
|
3260
|
+
compact(parameters, options) {
|
|
3261
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3262
|
+
return (options?.client ?? this.client).post({
|
|
3263
|
+
url: "/api/session/{sessionID}/compact",
|
|
3264
|
+
...options,
|
|
3265
|
+
...params,
|
|
3266
|
+
});
|
|
3267
|
+
}
|
|
3268
|
+
/**
|
|
3269
|
+
* Wait for v2 session
|
|
3270
|
+
*
|
|
3271
|
+
* Wait for a v2 session agent loop to become idle.
|
|
3272
|
+
*/
|
|
3273
|
+
wait(parameters, options) {
|
|
3274
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3275
|
+
return (options?.client ?? this.client).post({
|
|
3276
|
+
url: "/api/session/{sessionID}/wait",
|
|
3277
|
+
...options,
|
|
3278
|
+
...params,
|
|
3279
|
+
});
|
|
3280
|
+
}
|
|
3281
|
+
/**
|
|
3282
|
+
* Get v2 session context
|
|
3283
|
+
*
|
|
3284
|
+
* Retrieve the active context messages for a v2 session (all messages after the last compaction).
|
|
3285
|
+
*/
|
|
3286
|
+
context(parameters, options) {
|
|
3287
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
3288
|
+
return (options?.client ?? this.client).get({
|
|
3289
|
+
url: "/api/session/{sessionID}/context",
|
|
3290
|
+
...options,
|
|
3291
|
+
...params,
|
|
3292
|
+
});
|
|
3293
|
+
}
|
|
3294
|
+
/**
|
|
3295
|
+
* Get v2 session messages
|
|
3296
|
+
*
|
|
3297
|
+
* Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
|
|
3298
|
+
*/
|
|
3299
|
+
messages(parameters, options) {
|
|
3300
|
+
const params = buildClientParams([parameters], [
|
|
3301
|
+
{
|
|
3302
|
+
args: [
|
|
3303
|
+
{ in: "path", key: "sessionID" },
|
|
3304
|
+
{ in: "query", key: "limit" },
|
|
3305
|
+
{ in: "query", key: "order" },
|
|
3306
|
+
{ in: "query", key: "cursor" },
|
|
3307
|
+
],
|
|
3308
|
+
},
|
|
3309
|
+
]);
|
|
3310
|
+
return (options?.client ?? this.client).get({
|
|
3311
|
+
url: "/api/session/{sessionID}/message",
|
|
3312
|
+
...options,
|
|
3313
|
+
...params,
|
|
3314
|
+
});
|
|
3315
|
+
}
|
|
3316
|
+
_permission;
|
|
3317
|
+
get permission() {
|
|
3318
|
+
return (this._permission ??= new Permission2({ client: this.client }));
|
|
3319
|
+
}
|
|
3320
|
+
_question;
|
|
3321
|
+
get question() {
|
|
3322
|
+
return (this._question ??= new Question2({ client: this.client }));
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
export class Model extends HeyApiClient {
|
|
3326
|
+
/**
|
|
3327
|
+
* List v2 models
|
|
3328
|
+
*
|
|
3329
|
+
* Retrieve available v2 models ordered by release date.
|
|
3330
|
+
*/
|
|
3331
|
+
list(parameters, options) {
|
|
3332
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3333
|
+
return (options?.client ?? this.client).get({
|
|
3334
|
+
url: "/api/model",
|
|
3335
|
+
...options,
|
|
3336
|
+
...params,
|
|
3337
|
+
});
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
export class Provider2 extends HeyApiClient {
|
|
3341
|
+
/**
|
|
3342
|
+
* List v2 providers
|
|
3343
|
+
*
|
|
3344
|
+
* Retrieve active v2 AI providers so clients can show provider availability and configuration.
|
|
3345
|
+
*/
|
|
3346
|
+
list(parameters, options) {
|
|
3347
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3348
|
+
return (options?.client ?? this.client).get({
|
|
3349
|
+
url: "/api/provider",
|
|
3350
|
+
...options,
|
|
3351
|
+
...params,
|
|
3352
|
+
});
|
|
3353
|
+
}
|
|
3354
|
+
/**
|
|
3355
|
+
* Get v2 provider
|
|
3356
|
+
*
|
|
3357
|
+
* Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
|
|
3358
|
+
*/
|
|
3359
|
+
get(parameters, options) {
|
|
3360
|
+
const params = buildClientParams([parameters], [
|
|
3361
|
+
{
|
|
3362
|
+
args: [
|
|
3363
|
+
{ in: "path", key: "providerID" },
|
|
3364
|
+
{ in: "query", key: "location" },
|
|
3365
|
+
],
|
|
3366
|
+
},
|
|
3367
|
+
]);
|
|
3368
|
+
return (options?.client ?? this.client).get({
|
|
3369
|
+
url: "/api/provider/{providerID}",
|
|
3370
|
+
...options,
|
|
3371
|
+
...params,
|
|
3372
|
+
});
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3375
|
+
export class Request extends HeyApiClient {
|
|
3376
|
+
/**
|
|
3377
|
+
* List pending permission requests
|
|
3378
|
+
*
|
|
3379
|
+
* Retrieve pending permission requests for a location.
|
|
3380
|
+
*/
|
|
3381
|
+
list(parameters, options) {
|
|
3382
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3383
|
+
return (options?.client ?? this.client).get({
|
|
3384
|
+
url: "/api/permission/request",
|
|
3385
|
+
...options,
|
|
3386
|
+
...params,
|
|
3387
|
+
});
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
export class Saved extends HeyApiClient {
|
|
3391
|
+
/**
|
|
3392
|
+
* List saved permissions
|
|
3393
|
+
*
|
|
3394
|
+
* Retrieve saved permissions, optionally filtered by project.
|
|
3395
|
+
*/
|
|
3396
|
+
list(parameters, options) {
|
|
3397
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "projectID" }] }]);
|
|
3398
|
+
return (options?.client ?? this.client).get({
|
|
3399
|
+
url: "/api/permission/saved",
|
|
3400
|
+
...options,
|
|
3401
|
+
...params,
|
|
3402
|
+
});
|
|
3403
|
+
}
|
|
3404
|
+
/**
|
|
3405
|
+
* Remove saved permission
|
|
3406
|
+
*
|
|
3407
|
+
* Remove a saved permission by ID.
|
|
3408
|
+
*/
|
|
3409
|
+
remove(parameters, options) {
|
|
3410
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "id" }] }]);
|
|
3411
|
+
return (options?.client ?? this.client).delete({
|
|
3412
|
+
url: "/api/permission/saved/{id}",
|
|
3413
|
+
...options,
|
|
3414
|
+
...params,
|
|
3415
|
+
});
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3418
|
+
export class Permission3 extends HeyApiClient {
|
|
3419
|
+
_request;
|
|
3420
|
+
get request() {
|
|
3421
|
+
return (this._request ??= new Request({ client: this.client }));
|
|
3422
|
+
}
|
|
3423
|
+
_saved;
|
|
3424
|
+
get saved() {
|
|
3425
|
+
return (this._saved ??= new Saved({ client: this.client }));
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
export class Fs extends HeyApiClient {
|
|
3429
|
+
/**
|
|
3430
|
+
* Read file
|
|
3431
|
+
*
|
|
3432
|
+
* Read one file relative to the requested location.
|
|
3433
|
+
*/
|
|
3434
|
+
read(parameters, options) {
|
|
3435
|
+
const params = buildClientParams([parameters], [
|
|
3436
|
+
{
|
|
3437
|
+
args: [
|
|
3438
|
+
{ in: "query", key: "location" },
|
|
3439
|
+
{ in: "query", key: "path" },
|
|
3440
|
+
{ in: "query", key: "reference" },
|
|
3441
|
+
],
|
|
3442
|
+
},
|
|
3443
|
+
]);
|
|
3444
|
+
return (options?.client ?? this.client).get({
|
|
3445
|
+
url: "/api/fs/read",
|
|
3446
|
+
...options,
|
|
3447
|
+
...params,
|
|
3448
|
+
});
|
|
3449
|
+
}
|
|
3450
|
+
/**
|
|
3451
|
+
* List directory
|
|
3452
|
+
*
|
|
3453
|
+
* List direct children of one directory relative to the requested location.
|
|
3454
|
+
*/
|
|
3455
|
+
list(parameters, options) {
|
|
3456
|
+
const params = buildClientParams([parameters], [
|
|
3457
|
+
{
|
|
3458
|
+
args: [
|
|
3459
|
+
{ in: "query", key: "location" },
|
|
3460
|
+
{ in: "query", key: "path" },
|
|
3461
|
+
{ in: "query", key: "reference" },
|
|
3462
|
+
],
|
|
3463
|
+
},
|
|
3464
|
+
]);
|
|
3465
|
+
return (options?.client ?? this.client).get({
|
|
3466
|
+
url: "/api/fs/list",
|
|
3467
|
+
...options,
|
|
3468
|
+
...params,
|
|
3469
|
+
});
|
|
3470
|
+
}
|
|
3471
|
+
}
|
|
3472
|
+
export class Command2 extends HeyApiClient {
|
|
3473
|
+
/**
|
|
3474
|
+
* List v2 commands
|
|
3475
|
+
*
|
|
3476
|
+
* Retrieve currently registered v2 commands.
|
|
3477
|
+
*/
|
|
3478
|
+
list(parameters, options) {
|
|
3479
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3480
|
+
return (options?.client ?? this.client).get({
|
|
3481
|
+
url: "/api/command",
|
|
3482
|
+
...options,
|
|
3483
|
+
...params,
|
|
3484
|
+
});
|
|
3485
|
+
}
|
|
3486
|
+
}
|
|
3487
|
+
export class Skill extends HeyApiClient {
|
|
3488
|
+
/**
|
|
3489
|
+
* List v2 skills
|
|
3490
|
+
*
|
|
3491
|
+
* Retrieve currently registered v2 skills.
|
|
3492
|
+
*/
|
|
3493
|
+
list(parameters, options) {
|
|
3494
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3495
|
+
return (options?.client ?? this.client).get({
|
|
3496
|
+
url: "/api/skill",
|
|
3497
|
+
...options,
|
|
3498
|
+
...params,
|
|
3499
|
+
});
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
export class Event2 extends HeyApiClient {
|
|
3503
|
+
/**
|
|
3504
|
+
* Subscribe to v2 events
|
|
3505
|
+
*
|
|
3506
|
+
* Subscribe to native EventV2 payloads for a location.
|
|
3507
|
+
*/
|
|
3508
|
+
subscribe(parameters, options) {
|
|
3509
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3510
|
+
return (options?.client ?? this.client).sse.get({
|
|
3511
|
+
url: "/api/event",
|
|
3512
|
+
...options,
|
|
3513
|
+
...params,
|
|
3514
|
+
});
|
|
3515
|
+
}
|
|
3516
|
+
}
|
|
3517
|
+
export class Request2 extends HeyApiClient {
|
|
3518
|
+
/**
|
|
3519
|
+
* List pending question requests
|
|
3520
|
+
*
|
|
3521
|
+
* Retrieve pending question requests for a location.
|
|
3522
|
+
*/
|
|
3523
|
+
list(parameters, options) {
|
|
3524
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
3525
|
+
return (options?.client ?? this.client).get({
|
|
3526
|
+
url: "/api/question/request",
|
|
3527
|
+
...options,
|
|
3528
|
+
...params,
|
|
3529
|
+
});
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
export class Question3 extends HeyApiClient {
|
|
3533
|
+
_request;
|
|
3534
|
+
get request() {
|
|
3535
|
+
return (this._request ??= new Request2({ client: this.client }));
|
|
3536
|
+
}
|
|
3537
|
+
}
|
|
3538
|
+
export class V2 extends HeyApiClient {
|
|
3539
|
+
_health;
|
|
3540
|
+
get health() {
|
|
3541
|
+
return (this._health ??= new Health({ client: this.client }));
|
|
3542
|
+
}
|
|
3543
|
+
_agent;
|
|
3544
|
+
get agent() {
|
|
3545
|
+
return (this._agent ??= new Agent({ client: this.client }));
|
|
3546
|
+
}
|
|
3547
|
+
_session;
|
|
3548
|
+
get session() {
|
|
3549
|
+
return (this._session ??= new Session3({ client: this.client }));
|
|
3550
|
+
}
|
|
3551
|
+
_model;
|
|
3552
|
+
get model() {
|
|
3553
|
+
return (this._model ??= new Model({ client: this.client }));
|
|
3554
|
+
}
|
|
3555
|
+
_provider;
|
|
3556
|
+
get provider() {
|
|
3557
|
+
return (this._provider ??= new Provider2({ client: this.client }));
|
|
3558
|
+
}
|
|
3559
|
+
_permission;
|
|
3560
|
+
get permission() {
|
|
3561
|
+
return (this._permission ??= new Permission3({ client: this.client }));
|
|
3562
|
+
}
|
|
3563
|
+
_fs;
|
|
3564
|
+
get fs() {
|
|
3565
|
+
return (this._fs ??= new Fs({ client: this.client }));
|
|
3566
|
+
}
|
|
3567
|
+
_command;
|
|
3568
|
+
get command() {
|
|
3569
|
+
return (this._command ??= new Command2({ client: this.client }));
|
|
3570
|
+
}
|
|
3571
|
+
_skill;
|
|
3572
|
+
get skill() {
|
|
3573
|
+
return (this._skill ??= new Skill({ client: this.client }));
|
|
3574
|
+
}
|
|
3575
|
+
_event;
|
|
3576
|
+
get event() {
|
|
3577
|
+
return (this._event ??= new Event2({ client: this.client }));
|
|
3578
|
+
}
|
|
3579
|
+
_question;
|
|
3580
|
+
get question() {
|
|
3581
|
+
return (this._question ??= new Question3({ client: this.client }));
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
export class OpencodeClient extends HeyApiClient {
|
|
3585
|
+
static __registry = new HeyApiRegistry();
|
|
3586
|
+
constructor(args) {
|
|
3587
|
+
super(args);
|
|
3588
|
+
OpencodeClient.__registry.set(this, args?.key);
|
|
3589
|
+
}
|
|
3590
|
+
_auth;
|
|
3591
|
+
get auth() {
|
|
3592
|
+
return (this._auth ??= new Auth({ client: this.client }));
|
|
3593
|
+
}
|
|
3594
|
+
_app;
|
|
3595
|
+
get app() {
|
|
3596
|
+
return (this._app ??= new App({ client: this.client }));
|
|
3597
|
+
}
|
|
3598
|
+
_experimental;
|
|
3599
|
+
get experimental() {
|
|
3153
3600
|
return (this._experimental ??= new Experimental({ client: this.client }));
|
|
3154
3601
|
}
|
|
3602
|
+
_global;
|
|
3603
|
+
get global() {
|
|
3604
|
+
return (this._global ??= new Global({ client: this.client }));
|
|
3605
|
+
}
|
|
3606
|
+
_event;
|
|
3607
|
+
get event() {
|
|
3608
|
+
return (this._event ??= new Event({ client: this.client }));
|
|
3609
|
+
}
|
|
3610
|
+
_config;
|
|
3611
|
+
get config() {
|
|
3612
|
+
return (this._config ??= new Config2({ client: this.client }));
|
|
3613
|
+
}
|
|
3155
3614
|
_tool;
|
|
3156
3615
|
get tool() {
|
|
3157
3616
|
return (this._tool ??= new Tool({ client: this.client }));
|
|
@@ -3228,12 +3687,12 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
3228
3687
|
get sync() {
|
|
3229
3688
|
return (this._sync ??= new Sync({ client: this.client }));
|
|
3230
3689
|
}
|
|
3231
|
-
_v2;
|
|
3232
|
-
get v2() {
|
|
3233
|
-
return (this._v2 ??= new V2({ client: this.client }));
|
|
3234
|
-
}
|
|
3235
3690
|
_tui;
|
|
3236
3691
|
get tui() {
|
|
3237
3692
|
return (this._tui ??= new Tui({ client: this.client }));
|
|
3238
3693
|
}
|
|
3694
|
+
_v2;
|
|
3695
|
+
get v2() {
|
|
3696
|
+
return (this._v2 ??= new V2({ client: this.client }));
|
|
3697
|
+
}
|
|
3239
3698
|
}
|