@opencode-ai/sdk 1.4.7 → 1.4.9
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/gen/sdk.gen.d.ts +138 -138
- package/dist/v2/gen/sdk.gen.js +202 -202
- package/dist/v2/gen/types.gen.d.ts +148 -150
- package/package.json +1 -1
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -220,11 +220,11 @@ export class App extends HeyApiClient {
|
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
export class
|
|
223
|
+
export class Adaptor extends HeyApiClient {
|
|
224
224
|
/**
|
|
225
|
-
* List
|
|
225
|
+
* List workspace adaptors
|
|
226
226
|
*
|
|
227
|
-
*
|
|
227
|
+
* List all available workspace adaptors for the current project.
|
|
228
228
|
*/
|
|
229
229
|
list(parameters, options) {
|
|
230
230
|
const params = buildClientParams([parameters], [
|
|
@@ -236,17 +236,19 @@ export class Project extends HeyApiClient {
|
|
|
236
236
|
},
|
|
237
237
|
]);
|
|
238
238
|
return (options?.client ?? this.client).get({
|
|
239
|
-
url: "/
|
|
239
|
+
url: "/experimental/workspace/adaptor",
|
|
240
240
|
...options,
|
|
241
241
|
...params,
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
+
}
|
|
245
|
+
export class Workspace extends HeyApiClient {
|
|
244
246
|
/**
|
|
245
|
-
*
|
|
247
|
+
* List workspaces
|
|
246
248
|
*
|
|
247
|
-
*
|
|
249
|
+
* List all workspaces.
|
|
248
250
|
*/
|
|
249
|
-
|
|
251
|
+
list(parameters, options) {
|
|
250
252
|
const params = buildClientParams([parameters], [
|
|
251
253
|
{
|
|
252
254
|
args: [
|
|
@@ -256,103 +258,99 @@ export class Project extends HeyApiClient {
|
|
|
256
258
|
},
|
|
257
259
|
]);
|
|
258
260
|
return (options?.client ?? this.client).get({
|
|
259
|
-
url: "/
|
|
261
|
+
url: "/experimental/workspace",
|
|
260
262
|
...options,
|
|
261
263
|
...params,
|
|
262
264
|
});
|
|
263
265
|
}
|
|
264
266
|
/**
|
|
265
|
-
*
|
|
267
|
+
* Create workspace
|
|
266
268
|
*
|
|
267
|
-
* Create a
|
|
269
|
+
* Create a workspace for the current project.
|
|
268
270
|
*/
|
|
269
|
-
|
|
271
|
+
create(parameters, options) {
|
|
270
272
|
const params = buildClientParams([parameters], [
|
|
271
273
|
{
|
|
272
274
|
args: [
|
|
273
275
|
{ in: "query", key: "directory" },
|
|
274
276
|
{ in: "query", key: "workspace" },
|
|
277
|
+
{ in: "body", key: "id" },
|
|
278
|
+
{ in: "body", key: "type" },
|
|
279
|
+
{ in: "body", key: "branch" },
|
|
280
|
+
{ in: "body", key: "extra" },
|
|
275
281
|
],
|
|
276
282
|
},
|
|
277
283
|
]);
|
|
278
284
|
return (options?.client ?? this.client).post({
|
|
279
|
-
url: "/
|
|
285
|
+
url: "/experimental/workspace",
|
|
280
286
|
...options,
|
|
281
287
|
...params,
|
|
288
|
+
headers: {
|
|
289
|
+
"Content-Type": "application/json",
|
|
290
|
+
...options?.headers,
|
|
291
|
+
...params.headers,
|
|
292
|
+
},
|
|
282
293
|
});
|
|
283
294
|
}
|
|
284
295
|
/**
|
|
285
|
-
*
|
|
296
|
+
* Workspace status
|
|
286
297
|
*
|
|
287
|
-
*
|
|
298
|
+
* Get connection status for workspaces in the current project.
|
|
288
299
|
*/
|
|
289
|
-
|
|
300
|
+
status(parameters, options) {
|
|
290
301
|
const params = buildClientParams([parameters], [
|
|
291
302
|
{
|
|
292
303
|
args: [
|
|
293
|
-
{ in: "path", key: "projectID" },
|
|
294
304
|
{ in: "query", key: "directory" },
|
|
295
305
|
{ in: "query", key: "workspace" },
|
|
296
|
-
{ in: "body", key: "name" },
|
|
297
|
-
{ in: "body", key: "icon" },
|
|
298
|
-
{ in: "body", key: "commands" },
|
|
299
306
|
],
|
|
300
307
|
},
|
|
301
308
|
]);
|
|
302
|
-
return (options?.client ?? this.client).
|
|
303
|
-
url: "/
|
|
309
|
+
return (options?.client ?? this.client).get({
|
|
310
|
+
url: "/experimental/workspace/status",
|
|
304
311
|
...options,
|
|
305
312
|
...params,
|
|
306
|
-
headers: {
|
|
307
|
-
"Content-Type": "application/json",
|
|
308
|
-
...options?.headers,
|
|
309
|
-
...params.headers,
|
|
310
|
-
},
|
|
311
313
|
});
|
|
312
314
|
}
|
|
313
|
-
}
|
|
314
|
-
export class Pty extends HeyApiClient {
|
|
315
315
|
/**
|
|
316
|
-
*
|
|
316
|
+
* Remove workspace
|
|
317
317
|
*
|
|
318
|
-
*
|
|
318
|
+
* Remove an existing workspace.
|
|
319
319
|
*/
|
|
320
|
-
|
|
320
|
+
remove(parameters, options) {
|
|
321
321
|
const params = buildClientParams([parameters], [
|
|
322
322
|
{
|
|
323
323
|
args: [
|
|
324
|
+
{ in: "path", key: "id" },
|
|
324
325
|
{ in: "query", key: "directory" },
|
|
325
326
|
{ in: "query", key: "workspace" },
|
|
326
327
|
],
|
|
327
328
|
},
|
|
328
329
|
]);
|
|
329
|
-
return (options?.client ?? this.client).
|
|
330
|
-
url: "/
|
|
330
|
+
return (options?.client ?? this.client).delete({
|
|
331
|
+
url: "/experimental/workspace/{id}",
|
|
331
332
|
...options,
|
|
332
333
|
...params,
|
|
333
334
|
});
|
|
334
335
|
}
|
|
335
336
|
/**
|
|
336
|
-
*
|
|
337
|
+
* Restore session into workspace
|
|
337
338
|
*
|
|
338
|
-
*
|
|
339
|
+
* Replay a session's sync events into the target workspace in batches.
|
|
339
340
|
*/
|
|
340
|
-
|
|
341
|
+
sessionRestore(parameters, options) {
|
|
341
342
|
const params = buildClientParams([parameters], [
|
|
342
343
|
{
|
|
343
344
|
args: [
|
|
345
|
+
{ in: "path", key: "id" },
|
|
344
346
|
{ in: "query", key: "directory" },
|
|
345
347
|
{ in: "query", key: "workspace" },
|
|
346
|
-
{ in: "body", key: "
|
|
347
|
-
{ in: "body", key: "args" },
|
|
348
|
-
{ in: "body", key: "cwd" },
|
|
349
|
-
{ in: "body", key: "title" },
|
|
350
|
-
{ in: "body", key: "env" },
|
|
348
|
+
{ in: "body", key: "sessionID" },
|
|
351
349
|
],
|
|
352
350
|
},
|
|
353
351
|
]);
|
|
354
352
|
return (options?.client ?? this.client).post({
|
|
355
|
-
url: "/
|
|
353
|
+
url: "/experimental/workspace/{id}/session-restore",
|
|
356
354
|
...options,
|
|
357
355
|
...params,
|
|
358
356
|
headers: {
|
|
@@ -362,67 +360,70 @@ export class Pty extends HeyApiClient {
|
|
|
362
360
|
},
|
|
363
361
|
});
|
|
364
362
|
}
|
|
363
|
+
_adaptor;
|
|
364
|
+
get adaptor() {
|
|
365
|
+
return (this._adaptor ??= new Adaptor({ client: this.client }));
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
export class Console extends HeyApiClient {
|
|
365
369
|
/**
|
|
366
|
-
*
|
|
370
|
+
* Get active Console provider metadata
|
|
367
371
|
*
|
|
368
|
-
*
|
|
372
|
+
* Get the active Console org name and the set of provider IDs managed by that Console org.
|
|
369
373
|
*/
|
|
370
|
-
|
|
374
|
+
get(parameters, options) {
|
|
371
375
|
const params = buildClientParams([parameters], [
|
|
372
376
|
{
|
|
373
377
|
args: [
|
|
374
|
-
{ in: "path", key: "ptyID" },
|
|
375
378
|
{ in: "query", key: "directory" },
|
|
376
379
|
{ in: "query", key: "workspace" },
|
|
377
380
|
],
|
|
378
381
|
},
|
|
379
382
|
]);
|
|
380
|
-
return (options?.client ?? this.client).
|
|
381
|
-
url: "/
|
|
383
|
+
return (options?.client ?? this.client).get({
|
|
384
|
+
url: "/experimental/console",
|
|
382
385
|
...options,
|
|
383
386
|
...params,
|
|
384
387
|
});
|
|
385
388
|
}
|
|
386
389
|
/**
|
|
387
|
-
*
|
|
390
|
+
* List switchable Console orgs
|
|
388
391
|
*
|
|
389
|
-
*
|
|
392
|
+
* Get the available Console orgs across logged-in accounts, including the current active org.
|
|
390
393
|
*/
|
|
391
|
-
|
|
394
|
+
listOrgs(parameters, options) {
|
|
392
395
|
const params = buildClientParams([parameters], [
|
|
393
396
|
{
|
|
394
397
|
args: [
|
|
395
|
-
{ in: "path", key: "ptyID" },
|
|
396
398
|
{ in: "query", key: "directory" },
|
|
397
399
|
{ in: "query", key: "workspace" },
|
|
398
400
|
],
|
|
399
401
|
},
|
|
400
402
|
]);
|
|
401
403
|
return (options?.client ?? this.client).get({
|
|
402
|
-
url: "/
|
|
404
|
+
url: "/experimental/console/orgs",
|
|
403
405
|
...options,
|
|
404
406
|
...params,
|
|
405
407
|
});
|
|
406
408
|
}
|
|
407
409
|
/**
|
|
408
|
-
*
|
|
410
|
+
* Switch active Console org
|
|
409
411
|
*
|
|
410
|
-
*
|
|
412
|
+
* Persist a new active Console account/org selection for the current local OpenCode state.
|
|
411
413
|
*/
|
|
412
|
-
|
|
414
|
+
switchOrg(parameters, options) {
|
|
413
415
|
const params = buildClientParams([parameters], [
|
|
414
416
|
{
|
|
415
417
|
args: [
|
|
416
|
-
{ in: "path", key: "ptyID" },
|
|
417
418
|
{ in: "query", key: "directory" },
|
|
418
419
|
{ in: "query", key: "workspace" },
|
|
419
|
-
{ in: "body", key: "
|
|
420
|
-
{ in: "body", key: "
|
|
420
|
+
{ in: "body", key: "accountID" },
|
|
421
|
+
{ in: "body", key: "orgID" },
|
|
421
422
|
],
|
|
422
423
|
},
|
|
423
424
|
]);
|
|
424
|
-
return (options?.client ?? this.client).
|
|
425
|
-
url: "/
|
|
425
|
+
return (options?.client ?? this.client).post({
|
|
426
|
+
url: "/experimental/console/switch",
|
|
426
427
|
...options,
|
|
427
428
|
...params,
|
|
428
429
|
headers: {
|
|
@@ -432,35 +433,42 @@ export class Pty extends HeyApiClient {
|
|
|
432
433
|
},
|
|
433
434
|
});
|
|
434
435
|
}
|
|
436
|
+
}
|
|
437
|
+
export class Session extends HeyApiClient {
|
|
435
438
|
/**
|
|
436
|
-
*
|
|
439
|
+
* List sessions
|
|
437
440
|
*
|
|
438
|
-
*
|
|
441
|
+
* Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
|
|
439
442
|
*/
|
|
440
|
-
|
|
443
|
+
list(parameters, options) {
|
|
441
444
|
const params = buildClientParams([parameters], [
|
|
442
445
|
{
|
|
443
446
|
args: [
|
|
444
|
-
{ in: "path", key: "ptyID" },
|
|
445
447
|
{ in: "query", key: "directory" },
|
|
446
448
|
{ in: "query", key: "workspace" },
|
|
449
|
+
{ in: "query", key: "roots" },
|
|
450
|
+
{ in: "query", key: "start" },
|
|
451
|
+
{ in: "query", key: "cursor" },
|
|
452
|
+
{ in: "query", key: "search" },
|
|
453
|
+
{ in: "query", key: "limit" },
|
|
454
|
+
{ in: "query", key: "archived" },
|
|
447
455
|
],
|
|
448
456
|
},
|
|
449
457
|
]);
|
|
450
458
|
return (options?.client ?? this.client).get({
|
|
451
|
-
url: "/
|
|
459
|
+
url: "/experimental/session",
|
|
452
460
|
...options,
|
|
453
461
|
...params,
|
|
454
462
|
});
|
|
455
463
|
}
|
|
456
464
|
}
|
|
457
|
-
export class
|
|
465
|
+
export class Resource extends HeyApiClient {
|
|
458
466
|
/**
|
|
459
|
-
* Get
|
|
467
|
+
* Get MCP resources
|
|
460
468
|
*
|
|
461
|
-
*
|
|
469
|
+
* Get all available MCP resources from connected servers. Optionally filter by name.
|
|
462
470
|
*/
|
|
463
|
-
|
|
471
|
+
list(parameters, options) {
|
|
464
472
|
const params = buildClientParams([parameters], [
|
|
465
473
|
{
|
|
466
474
|
args: [
|
|
@@ -470,43 +478,57 @@ export class Config2 extends HeyApiClient {
|
|
|
470
478
|
},
|
|
471
479
|
]);
|
|
472
480
|
return (options?.client ?? this.client).get({
|
|
473
|
-
url: "/
|
|
481
|
+
url: "/experimental/resource",
|
|
474
482
|
...options,
|
|
475
483
|
...params,
|
|
476
484
|
});
|
|
477
485
|
}
|
|
486
|
+
}
|
|
487
|
+
export class Experimental extends HeyApiClient {
|
|
488
|
+
_workspace;
|
|
489
|
+
get workspace() {
|
|
490
|
+
return (this._workspace ??= new Workspace({ client: this.client }));
|
|
491
|
+
}
|
|
492
|
+
_console;
|
|
493
|
+
get console() {
|
|
494
|
+
return (this._console ??= new Console({ client: this.client }));
|
|
495
|
+
}
|
|
496
|
+
_session;
|
|
497
|
+
get session() {
|
|
498
|
+
return (this._session ??= new Session({ client: this.client }));
|
|
499
|
+
}
|
|
500
|
+
_resource;
|
|
501
|
+
get resource() {
|
|
502
|
+
return (this._resource ??= new Resource({ client: this.client }));
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
export class Project extends HeyApiClient {
|
|
478
506
|
/**
|
|
479
|
-
*
|
|
507
|
+
* List all projects
|
|
480
508
|
*
|
|
481
|
-
*
|
|
509
|
+
* Get a list of projects that have been opened with OpenCode.
|
|
482
510
|
*/
|
|
483
|
-
|
|
511
|
+
list(parameters, options) {
|
|
484
512
|
const params = buildClientParams([parameters], [
|
|
485
513
|
{
|
|
486
514
|
args: [
|
|
487
515
|
{ in: "query", key: "directory" },
|
|
488
516
|
{ in: "query", key: "workspace" },
|
|
489
|
-
{ key: "config", map: "body" },
|
|
490
517
|
],
|
|
491
518
|
},
|
|
492
519
|
]);
|
|
493
|
-
return (options?.client ?? this.client).
|
|
494
|
-
url: "/
|
|
520
|
+
return (options?.client ?? this.client).get({
|
|
521
|
+
url: "/project",
|
|
495
522
|
...options,
|
|
496
523
|
...params,
|
|
497
|
-
headers: {
|
|
498
|
-
"Content-Type": "application/json",
|
|
499
|
-
...options?.headers,
|
|
500
|
-
...params.headers,
|
|
501
|
-
},
|
|
502
524
|
});
|
|
503
525
|
}
|
|
504
526
|
/**
|
|
505
|
-
*
|
|
527
|
+
* Get current project
|
|
506
528
|
*
|
|
507
|
-
*
|
|
529
|
+
* Retrieve the currently active project that OpenCode is working with.
|
|
508
530
|
*/
|
|
509
|
-
|
|
531
|
+
current(parameters, options) {
|
|
510
532
|
const params = buildClientParams([parameters], [
|
|
511
533
|
{
|
|
512
534
|
args: [
|
|
@@ -516,19 +538,17 @@ export class Config2 extends HeyApiClient {
|
|
|
516
538
|
},
|
|
517
539
|
]);
|
|
518
540
|
return (options?.client ?? this.client).get({
|
|
519
|
-
url: "/
|
|
541
|
+
url: "/project/current",
|
|
520
542
|
...options,
|
|
521
543
|
...params,
|
|
522
544
|
});
|
|
523
545
|
}
|
|
524
|
-
}
|
|
525
|
-
export class Console extends HeyApiClient {
|
|
526
546
|
/**
|
|
527
|
-
*
|
|
547
|
+
* Initialize git repository
|
|
528
548
|
*
|
|
529
|
-
*
|
|
549
|
+
* Create a git repository for the current project and return the refreshed project info.
|
|
530
550
|
*/
|
|
531
|
-
|
|
551
|
+
initGit(parameters, options) {
|
|
532
552
|
const params = buildClientParams([parameters], [
|
|
533
553
|
{
|
|
534
554
|
args: [
|
|
@@ -537,18 +557,49 @@ export class Console extends HeyApiClient {
|
|
|
537
557
|
],
|
|
538
558
|
},
|
|
539
559
|
]);
|
|
540
|
-
return (options?.client ?? this.client).
|
|
541
|
-
url: "/
|
|
560
|
+
return (options?.client ?? this.client).post({
|
|
561
|
+
url: "/project/git/init",
|
|
542
562
|
...options,
|
|
543
563
|
...params,
|
|
544
564
|
});
|
|
545
565
|
}
|
|
546
566
|
/**
|
|
547
|
-
*
|
|
567
|
+
* Update project
|
|
548
568
|
*
|
|
549
|
-
*
|
|
569
|
+
* Update project properties such as name, icon, and commands.
|
|
550
570
|
*/
|
|
551
|
-
|
|
571
|
+
update(parameters, options) {
|
|
572
|
+
const params = buildClientParams([parameters], [
|
|
573
|
+
{
|
|
574
|
+
args: [
|
|
575
|
+
{ in: "path", key: "projectID" },
|
|
576
|
+
{ in: "query", key: "directory" },
|
|
577
|
+
{ in: "query", key: "workspace" },
|
|
578
|
+
{ in: "body", key: "name" },
|
|
579
|
+
{ in: "body", key: "icon" },
|
|
580
|
+
{ in: "body", key: "commands" },
|
|
581
|
+
],
|
|
582
|
+
},
|
|
583
|
+
]);
|
|
584
|
+
return (options?.client ?? this.client).patch({
|
|
585
|
+
url: "/project/{projectID}",
|
|
586
|
+
...options,
|
|
587
|
+
...params,
|
|
588
|
+
headers: {
|
|
589
|
+
"Content-Type": "application/json",
|
|
590
|
+
...options?.headers,
|
|
591
|
+
...params.headers,
|
|
592
|
+
},
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
export class Pty extends HeyApiClient {
|
|
597
|
+
/**
|
|
598
|
+
* List PTY sessions
|
|
599
|
+
*
|
|
600
|
+
* Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.
|
|
601
|
+
*/
|
|
602
|
+
list(parameters, options) {
|
|
552
603
|
const params = buildClientParams([parameters], [
|
|
553
604
|
{
|
|
554
605
|
args: [
|
|
@@ -558,29 +609,32 @@ export class Console extends HeyApiClient {
|
|
|
558
609
|
},
|
|
559
610
|
]);
|
|
560
611
|
return (options?.client ?? this.client).get({
|
|
561
|
-
url: "/
|
|
612
|
+
url: "/pty",
|
|
562
613
|
...options,
|
|
563
614
|
...params,
|
|
564
615
|
});
|
|
565
616
|
}
|
|
566
617
|
/**
|
|
567
|
-
*
|
|
618
|
+
* Create PTY session
|
|
568
619
|
*
|
|
569
|
-
*
|
|
620
|
+
* Create a new pseudo-terminal (PTY) session for running shell commands and processes.
|
|
570
621
|
*/
|
|
571
|
-
|
|
622
|
+
create(parameters, options) {
|
|
572
623
|
const params = buildClientParams([parameters], [
|
|
573
624
|
{
|
|
574
625
|
args: [
|
|
575
626
|
{ in: "query", key: "directory" },
|
|
576
627
|
{ in: "query", key: "workspace" },
|
|
577
|
-
{ in: "body", key: "
|
|
578
|
-
{ in: "body", key: "
|
|
628
|
+
{ in: "body", key: "command" },
|
|
629
|
+
{ in: "body", key: "args" },
|
|
630
|
+
{ in: "body", key: "cwd" },
|
|
631
|
+
{ in: "body", key: "title" },
|
|
632
|
+
{ in: "body", key: "env" },
|
|
579
633
|
],
|
|
580
634
|
},
|
|
581
635
|
]);
|
|
582
636
|
return (options?.client ?? this.client).post({
|
|
583
|
-
url: "/
|
|
637
|
+
url: "/pty",
|
|
584
638
|
...options,
|
|
585
639
|
...params,
|
|
586
640
|
headers: {
|
|
@@ -590,70 +644,67 @@ export class Console extends HeyApiClient {
|
|
|
590
644
|
},
|
|
591
645
|
});
|
|
592
646
|
}
|
|
593
|
-
}
|
|
594
|
-
export class Adaptor extends HeyApiClient {
|
|
595
647
|
/**
|
|
596
|
-
*
|
|
648
|
+
* Remove PTY session
|
|
597
649
|
*
|
|
598
|
-
*
|
|
650
|
+
* Remove and terminate a specific pseudo-terminal (PTY) session.
|
|
599
651
|
*/
|
|
600
|
-
|
|
652
|
+
remove(parameters, options) {
|
|
601
653
|
const params = buildClientParams([parameters], [
|
|
602
654
|
{
|
|
603
655
|
args: [
|
|
656
|
+
{ in: "path", key: "ptyID" },
|
|
604
657
|
{ in: "query", key: "directory" },
|
|
605
658
|
{ in: "query", key: "workspace" },
|
|
606
659
|
],
|
|
607
660
|
},
|
|
608
661
|
]);
|
|
609
|
-
return (options?.client ?? this.client).
|
|
610
|
-
url: "/
|
|
662
|
+
return (options?.client ?? this.client).delete({
|
|
663
|
+
url: "/pty/{ptyID}",
|
|
611
664
|
...options,
|
|
612
665
|
...params,
|
|
613
666
|
});
|
|
614
667
|
}
|
|
615
|
-
}
|
|
616
|
-
export class Workspace extends HeyApiClient {
|
|
617
668
|
/**
|
|
618
|
-
*
|
|
669
|
+
* Get PTY session
|
|
619
670
|
*
|
|
620
|
-
*
|
|
671
|
+
* Retrieve detailed information about a specific pseudo-terminal (PTY) session.
|
|
621
672
|
*/
|
|
622
|
-
|
|
673
|
+
get(parameters, options) {
|
|
623
674
|
const params = buildClientParams([parameters], [
|
|
624
675
|
{
|
|
625
676
|
args: [
|
|
677
|
+
{ in: "path", key: "ptyID" },
|
|
626
678
|
{ in: "query", key: "directory" },
|
|
627
679
|
{ in: "query", key: "workspace" },
|
|
628
680
|
],
|
|
629
681
|
},
|
|
630
682
|
]);
|
|
631
683
|
return (options?.client ?? this.client).get({
|
|
632
|
-
url: "/
|
|
684
|
+
url: "/pty/{ptyID}",
|
|
633
685
|
...options,
|
|
634
686
|
...params,
|
|
635
687
|
});
|
|
636
688
|
}
|
|
637
689
|
/**
|
|
638
|
-
*
|
|
690
|
+
* Update PTY session
|
|
639
691
|
*
|
|
640
|
-
*
|
|
692
|
+
* Update properties of an existing pseudo-terminal (PTY) session.
|
|
641
693
|
*/
|
|
642
|
-
|
|
694
|
+
update(parameters, options) {
|
|
643
695
|
const params = buildClientParams([parameters], [
|
|
644
696
|
{
|
|
645
697
|
args: [
|
|
698
|
+
{ in: "path", key: "ptyID" },
|
|
646
699
|
{ in: "query", key: "directory" },
|
|
647
700
|
{ in: "query", key: "workspace" },
|
|
648
|
-
{ in: "body", key: "
|
|
649
|
-
{ in: "body", key: "
|
|
650
|
-
{ in: "body", key: "branch" },
|
|
651
|
-
{ in: "body", key: "extra" },
|
|
701
|
+
{ in: "body", key: "title" },
|
|
702
|
+
{ in: "body", key: "size" },
|
|
652
703
|
],
|
|
653
704
|
},
|
|
654
705
|
]);
|
|
655
|
-
return (options?.client ?? this.client).
|
|
656
|
-
url: "/
|
|
706
|
+
return (options?.client ?? this.client).put({
|
|
707
|
+
url: "/pty/{ptyID}",
|
|
657
708
|
...options,
|
|
658
709
|
...params,
|
|
659
710
|
headers: {
|
|
@@ -664,64 +715,65 @@ export class Workspace extends HeyApiClient {
|
|
|
664
715
|
});
|
|
665
716
|
}
|
|
666
717
|
/**
|
|
667
|
-
*
|
|
718
|
+
* Connect to PTY session
|
|
668
719
|
*
|
|
669
|
-
*
|
|
720
|
+
* Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.
|
|
670
721
|
*/
|
|
671
|
-
|
|
722
|
+
connect(parameters, options) {
|
|
672
723
|
const params = buildClientParams([parameters], [
|
|
673
724
|
{
|
|
674
725
|
args: [
|
|
726
|
+
{ in: "path", key: "ptyID" },
|
|
675
727
|
{ in: "query", key: "directory" },
|
|
676
728
|
{ in: "query", key: "workspace" },
|
|
677
729
|
],
|
|
678
730
|
},
|
|
679
731
|
]);
|
|
680
732
|
return (options?.client ?? this.client).get({
|
|
681
|
-
url: "/
|
|
733
|
+
url: "/pty/{ptyID}/connect",
|
|
682
734
|
...options,
|
|
683
735
|
...params,
|
|
684
736
|
});
|
|
685
737
|
}
|
|
738
|
+
}
|
|
739
|
+
export class Config2 extends HeyApiClient {
|
|
686
740
|
/**
|
|
687
|
-
*
|
|
741
|
+
* Get configuration
|
|
688
742
|
*
|
|
689
|
-
*
|
|
743
|
+
* Retrieve the current OpenCode configuration settings and preferences.
|
|
690
744
|
*/
|
|
691
|
-
|
|
745
|
+
get(parameters, options) {
|
|
692
746
|
const params = buildClientParams([parameters], [
|
|
693
747
|
{
|
|
694
748
|
args: [
|
|
695
|
-
{ in: "path", key: "id" },
|
|
696
749
|
{ in: "query", key: "directory" },
|
|
697
750
|
{ in: "query", key: "workspace" },
|
|
698
751
|
],
|
|
699
752
|
},
|
|
700
753
|
]);
|
|
701
|
-
return (options?.client ?? this.client).
|
|
702
|
-
url: "/
|
|
754
|
+
return (options?.client ?? this.client).get({
|
|
755
|
+
url: "/config",
|
|
703
756
|
...options,
|
|
704
757
|
...params,
|
|
705
758
|
});
|
|
706
759
|
}
|
|
707
760
|
/**
|
|
708
|
-
*
|
|
761
|
+
* Update configuration
|
|
709
762
|
*
|
|
710
|
-
*
|
|
763
|
+
* Update OpenCode configuration settings and preferences.
|
|
711
764
|
*/
|
|
712
|
-
|
|
765
|
+
update(parameters, options) {
|
|
713
766
|
const params = buildClientParams([parameters], [
|
|
714
767
|
{
|
|
715
768
|
args: [
|
|
716
|
-
{ in: "path", key: "id" },
|
|
717
769
|
{ in: "query", key: "directory" },
|
|
718
770
|
{ in: "query", key: "workspace" },
|
|
719
|
-
{
|
|
771
|
+
{ key: "config", map: "body" },
|
|
720
772
|
],
|
|
721
773
|
},
|
|
722
774
|
]);
|
|
723
|
-
return (options?.client ?? this.client).
|
|
724
|
-
url: "/
|
|
775
|
+
return (options?.client ?? this.client).patch({
|
|
776
|
+
url: "/config",
|
|
725
777
|
...options,
|
|
726
778
|
...params,
|
|
727
779
|
headers: {
|
|
@@ -731,46 +783,12 @@ export class Workspace extends HeyApiClient {
|
|
|
731
783
|
},
|
|
732
784
|
});
|
|
733
785
|
}
|
|
734
|
-
_adaptor;
|
|
735
|
-
get adaptor() {
|
|
736
|
-
return (this._adaptor ??= new Adaptor({ client: this.client }));
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
export class Session extends HeyApiClient {
|
|
740
786
|
/**
|
|
741
|
-
* List
|
|
742
|
-
*
|
|
743
|
-
* Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
|
|
744
|
-
*/
|
|
745
|
-
list(parameters, options) {
|
|
746
|
-
const params = buildClientParams([parameters], [
|
|
747
|
-
{
|
|
748
|
-
args: [
|
|
749
|
-
{ in: "query", key: "directory" },
|
|
750
|
-
{ in: "query", key: "workspace" },
|
|
751
|
-
{ in: "query", key: "roots" },
|
|
752
|
-
{ in: "query", key: "start" },
|
|
753
|
-
{ in: "query", key: "cursor" },
|
|
754
|
-
{ in: "query", key: "search" },
|
|
755
|
-
{ in: "query", key: "limit" },
|
|
756
|
-
{ in: "query", key: "archived" },
|
|
757
|
-
],
|
|
758
|
-
},
|
|
759
|
-
]);
|
|
760
|
-
return (options?.client ?? this.client).get({
|
|
761
|
-
url: "/experimental/session",
|
|
762
|
-
...options,
|
|
763
|
-
...params,
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
export class Resource extends HeyApiClient {
|
|
768
|
-
/**
|
|
769
|
-
* Get MCP resources
|
|
787
|
+
* List config providers
|
|
770
788
|
*
|
|
771
|
-
* Get
|
|
789
|
+
* Get a list of all configured AI providers and their default models.
|
|
772
790
|
*/
|
|
773
|
-
|
|
791
|
+
providers(parameters, options) {
|
|
774
792
|
const params = buildClientParams([parameters], [
|
|
775
793
|
{
|
|
776
794
|
args: [
|
|
@@ -780,30 +798,12 @@ export class Resource extends HeyApiClient {
|
|
|
780
798
|
},
|
|
781
799
|
]);
|
|
782
800
|
return (options?.client ?? this.client).get({
|
|
783
|
-
url: "/
|
|
801
|
+
url: "/config/providers",
|
|
784
802
|
...options,
|
|
785
803
|
...params,
|
|
786
804
|
});
|
|
787
805
|
}
|
|
788
806
|
}
|
|
789
|
-
export class Experimental extends HeyApiClient {
|
|
790
|
-
_console;
|
|
791
|
-
get console() {
|
|
792
|
-
return (this._console ??= new Console({ client: this.client }));
|
|
793
|
-
}
|
|
794
|
-
_workspace;
|
|
795
|
-
get workspace() {
|
|
796
|
-
return (this._workspace ??= new Workspace({ client: this.client }));
|
|
797
|
-
}
|
|
798
|
-
_session;
|
|
799
|
-
get session() {
|
|
800
|
-
return (this._session ??= new Session({ client: this.client }));
|
|
801
|
-
}
|
|
802
|
-
_resource;
|
|
803
|
-
get resource() {
|
|
804
|
-
return (this._resource ??= new Resource({ client: this.client }));
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
807
|
export class Tool extends HeyApiClient {
|
|
808
808
|
/**
|
|
809
809
|
* List tool IDs
|
|
@@ -2743,6 +2743,10 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
2743
2743
|
get app() {
|
|
2744
2744
|
return (this._app ??= new App({ client: this.client }));
|
|
2745
2745
|
}
|
|
2746
|
+
_experimental;
|
|
2747
|
+
get experimental() {
|
|
2748
|
+
return (this._experimental ??= new Experimental({ client: this.client }));
|
|
2749
|
+
}
|
|
2746
2750
|
_project;
|
|
2747
2751
|
get project() {
|
|
2748
2752
|
return (this._project ??= new Project({ client: this.client }));
|
|
@@ -2755,10 +2759,6 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
2755
2759
|
get config() {
|
|
2756
2760
|
return (this._config ??= new Config2({ client: this.client }));
|
|
2757
2761
|
}
|
|
2758
|
-
_experimental;
|
|
2759
|
-
get experimental() {
|
|
2760
|
-
return (this._experimental ??= new Experimental({ client: this.client }));
|
|
2761
|
-
}
|
|
2762
2762
|
_tool;
|
|
2763
2763
|
get tool() {
|
|
2764
2764
|
return (this._tool ??= new Tool({ client: this.client }));
|