@opencode-ai/sdk 1.2.16 → 1.2.17
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 +54 -56
- package/dist/v2/gen/sdk.gen.js +96 -95
- package/dist/v2/gen/types.gen.d.ts +82 -85
- package/package.json +1 -1
package/dist/v2/gen/sdk.gen.d.ts
CHANGED
|
@@ -248,48 +248,29 @@ export declare class Tool extends HeyApiClient {
|
|
|
248
248
|
model: string;
|
|
249
249
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ToolListResponses, ToolListErrors, ThrowOnError, "fields">;
|
|
250
250
|
}
|
|
251
|
-
export declare class
|
|
252
|
-
/**
|
|
253
|
-
* Remove worktree
|
|
254
|
-
*
|
|
255
|
-
* Remove a git worktree and delete its branch.
|
|
256
|
-
*/
|
|
257
|
-
remove<ThrowOnError extends boolean = false>(parameters?: {
|
|
258
|
-
directory?: string;
|
|
259
|
-
workspace?: string;
|
|
260
|
-
worktreeRemoveInput?: WorktreeRemoveInput;
|
|
261
|
-
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeRemoveResponses, WorktreeRemoveErrors, ThrowOnError, "fields">;
|
|
251
|
+
export declare class Workspace extends HeyApiClient {
|
|
262
252
|
/**
|
|
263
|
-
* List
|
|
253
|
+
* List workspaces
|
|
264
254
|
*
|
|
265
|
-
* List all
|
|
255
|
+
* List all workspaces.
|
|
266
256
|
*/
|
|
267
257
|
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
268
258
|
directory?: string;
|
|
269
259
|
workspace?: string;
|
|
270
|
-
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<
|
|
260
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceListResponses, unknown, ThrowOnError, "fields">;
|
|
271
261
|
/**
|
|
272
|
-
* Create
|
|
262
|
+
* Create workspace
|
|
273
263
|
*
|
|
274
|
-
* Create a
|
|
264
|
+
* Create a workspace for the current project.
|
|
275
265
|
*/
|
|
276
266
|
create<ThrowOnError extends boolean = false>(parameters?: {
|
|
277
267
|
directory?: string;
|
|
278
268
|
workspace?: string;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
* Reset a worktree branch to the primary default branch.
|
|
285
|
-
*/
|
|
286
|
-
reset<ThrowOnError extends boolean = false>(parameters?: {
|
|
287
|
-
directory?: string;
|
|
288
|
-
workspace?: string;
|
|
289
|
-
worktreeResetInput?: WorktreeResetInput;
|
|
290
|
-
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeResetResponses, WorktreeResetErrors, ThrowOnError, "fields">;
|
|
291
|
-
}
|
|
292
|
-
export declare class Workspace extends HeyApiClient {
|
|
269
|
+
id?: string;
|
|
270
|
+
type?: string;
|
|
271
|
+
branch?: string | null;
|
|
272
|
+
extra?: unknown | null;
|
|
273
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceCreateErrors, ThrowOnError, "fields">;
|
|
293
274
|
/**
|
|
294
275
|
* Remove workspace
|
|
295
276
|
*
|
|
@@ -300,30 +281,6 @@ export declare class Workspace extends HeyApiClient {
|
|
|
300
281
|
directory?: string;
|
|
301
282
|
workspace?: string;
|
|
302
283
|
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceRemoveResponses, ExperimentalWorkspaceRemoveErrors, ThrowOnError, "fields">;
|
|
303
|
-
/**
|
|
304
|
-
* Create workspace
|
|
305
|
-
*
|
|
306
|
-
* Create a workspace for the current project.
|
|
307
|
-
*/
|
|
308
|
-
create<ThrowOnError extends boolean = false>(parameters: {
|
|
309
|
-
id: string;
|
|
310
|
-
directory?: string;
|
|
311
|
-
workspace?: string;
|
|
312
|
-
branch?: string | null;
|
|
313
|
-
config?: {
|
|
314
|
-
directory: string;
|
|
315
|
-
type: "worktree";
|
|
316
|
-
};
|
|
317
|
-
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceCreateResponses, ExperimentalWorkspaceCreateErrors, ThrowOnError, "fields">;
|
|
318
|
-
/**
|
|
319
|
-
* List workspaces
|
|
320
|
-
*
|
|
321
|
-
* List all workspaces.
|
|
322
|
-
*/
|
|
323
|
-
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
324
|
-
directory?: string;
|
|
325
|
-
workspace?: string;
|
|
326
|
-
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<ExperimentalWorkspaceListResponses, unknown, ThrowOnError, "fields">;
|
|
327
284
|
}
|
|
328
285
|
export declare class Session extends HeyApiClient {
|
|
329
286
|
/**
|
|
@@ -361,6 +318,47 @@ export declare class Experimental extends HeyApiClient {
|
|
|
361
318
|
private _resource?;
|
|
362
319
|
get resource(): Resource;
|
|
363
320
|
}
|
|
321
|
+
export declare class Worktree extends HeyApiClient {
|
|
322
|
+
/**
|
|
323
|
+
* Remove worktree
|
|
324
|
+
*
|
|
325
|
+
* Remove a git worktree and delete its branch.
|
|
326
|
+
*/
|
|
327
|
+
remove<ThrowOnError extends boolean = false>(parameters?: {
|
|
328
|
+
directory?: string;
|
|
329
|
+
workspace?: string;
|
|
330
|
+
worktreeRemoveInput?: WorktreeRemoveInput;
|
|
331
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeRemoveResponses, WorktreeRemoveErrors, ThrowOnError, "fields">;
|
|
332
|
+
/**
|
|
333
|
+
* List worktrees
|
|
334
|
+
*
|
|
335
|
+
* List all sandbox worktrees for the current project.
|
|
336
|
+
*/
|
|
337
|
+
list<ThrowOnError extends boolean = false>(parameters?: {
|
|
338
|
+
directory?: string;
|
|
339
|
+
workspace?: string;
|
|
340
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeListResponses, unknown, ThrowOnError, "fields">;
|
|
341
|
+
/**
|
|
342
|
+
* Create worktree
|
|
343
|
+
*
|
|
344
|
+
* Create a new git worktree for the current project and run any configured startup scripts.
|
|
345
|
+
*/
|
|
346
|
+
create<ThrowOnError extends boolean = false>(parameters?: {
|
|
347
|
+
directory?: string;
|
|
348
|
+
workspace?: string;
|
|
349
|
+
worktreeCreateInput?: WorktreeCreateInput;
|
|
350
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeCreateResponses, WorktreeCreateErrors, ThrowOnError, "fields">;
|
|
351
|
+
/**
|
|
352
|
+
* Reset worktree
|
|
353
|
+
*
|
|
354
|
+
* Reset a worktree branch to the primary default branch.
|
|
355
|
+
*/
|
|
356
|
+
reset<ThrowOnError extends boolean = false>(parameters?: {
|
|
357
|
+
directory?: string;
|
|
358
|
+
workspace?: string;
|
|
359
|
+
worktreeResetInput?: WorktreeResetInput;
|
|
360
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<WorktreeResetResponses, WorktreeResetErrors, ThrowOnError, "fields">;
|
|
361
|
+
}
|
|
364
362
|
export declare class Session2 extends HeyApiClient {
|
|
365
363
|
/**
|
|
366
364
|
* List sessions
|
|
@@ -1222,10 +1220,10 @@ export declare class OpencodeClient extends HeyApiClient {
|
|
|
1222
1220
|
get config(): Config2;
|
|
1223
1221
|
private _tool?;
|
|
1224
1222
|
get tool(): Tool;
|
|
1225
|
-
private _worktree?;
|
|
1226
|
-
get worktree(): Worktree;
|
|
1227
1223
|
private _experimental?;
|
|
1228
1224
|
get experimental(): Experimental;
|
|
1225
|
+
private _worktree?;
|
|
1226
|
+
get worktree(): Worktree;
|
|
1229
1227
|
private _session?;
|
|
1230
1228
|
get session(): Session2;
|
|
1231
1229
|
private _part?;
|
package/dist/v2/gen/sdk.gen.js
CHANGED
|
@@ -457,147 +457,160 @@ export class Tool extends HeyApiClient {
|
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
export class
|
|
460
|
+
export class Workspace extends HeyApiClient {
|
|
461
461
|
/**
|
|
462
|
-
*
|
|
462
|
+
* List workspaces
|
|
463
463
|
*
|
|
464
|
-
*
|
|
464
|
+
* List all workspaces.
|
|
465
465
|
*/
|
|
466
|
-
|
|
466
|
+
list(parameters, options) {
|
|
467
467
|
const params = buildClientParams([parameters], [
|
|
468
468
|
{
|
|
469
469
|
args: [
|
|
470
470
|
{ in: "query", key: "directory" },
|
|
471
471
|
{ in: "query", key: "workspace" },
|
|
472
|
-
{ key: "worktreeRemoveInput", map: "body" },
|
|
473
472
|
],
|
|
474
473
|
},
|
|
475
474
|
]);
|
|
476
|
-
return (options?.client ?? this.client).
|
|
477
|
-
url: "/experimental/
|
|
475
|
+
return (options?.client ?? this.client).get({
|
|
476
|
+
url: "/experimental/workspace",
|
|
478
477
|
...options,
|
|
479
478
|
...params,
|
|
480
|
-
headers: {
|
|
481
|
-
"Content-Type": "application/json",
|
|
482
|
-
...options?.headers,
|
|
483
|
-
...params.headers,
|
|
484
|
-
},
|
|
485
479
|
});
|
|
486
480
|
}
|
|
487
481
|
/**
|
|
488
|
-
*
|
|
482
|
+
* Create workspace
|
|
489
483
|
*
|
|
490
|
-
*
|
|
484
|
+
* Create a workspace for the current project.
|
|
491
485
|
*/
|
|
492
|
-
|
|
486
|
+
create(parameters, options) {
|
|
493
487
|
const params = buildClientParams([parameters], [
|
|
494
488
|
{
|
|
495
489
|
args: [
|
|
496
490
|
{ in: "query", key: "directory" },
|
|
497
491
|
{ in: "query", key: "workspace" },
|
|
492
|
+
{ in: "body", key: "id" },
|
|
493
|
+
{ in: "body", key: "type" },
|
|
494
|
+
{ in: "body", key: "branch" },
|
|
495
|
+
{ in: "body", key: "extra" },
|
|
498
496
|
],
|
|
499
497
|
},
|
|
500
498
|
]);
|
|
501
|
-
return (options?.client ?? this.client).
|
|
502
|
-
url: "/experimental/
|
|
499
|
+
return (options?.client ?? this.client).post({
|
|
500
|
+
url: "/experimental/workspace",
|
|
503
501
|
...options,
|
|
504
502
|
...params,
|
|
503
|
+
headers: {
|
|
504
|
+
"Content-Type": "application/json",
|
|
505
|
+
...options?.headers,
|
|
506
|
+
...params.headers,
|
|
507
|
+
},
|
|
505
508
|
});
|
|
506
509
|
}
|
|
507
510
|
/**
|
|
508
|
-
*
|
|
511
|
+
* Remove workspace
|
|
509
512
|
*
|
|
510
|
-
*
|
|
513
|
+
* Remove an existing workspace.
|
|
511
514
|
*/
|
|
512
|
-
|
|
515
|
+
remove(parameters, options) {
|
|
513
516
|
const params = buildClientParams([parameters], [
|
|
514
517
|
{
|
|
515
518
|
args: [
|
|
519
|
+
{ in: "path", key: "id" },
|
|
516
520
|
{ in: "query", key: "directory" },
|
|
517
521
|
{ in: "query", key: "workspace" },
|
|
518
|
-
{ key: "worktreeCreateInput", map: "body" },
|
|
519
522
|
],
|
|
520
523
|
},
|
|
521
524
|
]);
|
|
522
|
-
return (options?.client ?? this.client).
|
|
523
|
-
url: "/experimental/
|
|
525
|
+
return (options?.client ?? this.client).delete({
|
|
526
|
+
url: "/experimental/workspace/{id}",
|
|
524
527
|
...options,
|
|
525
528
|
...params,
|
|
526
|
-
headers: {
|
|
527
|
-
"Content-Type": "application/json",
|
|
528
|
-
...options?.headers,
|
|
529
|
-
...params.headers,
|
|
530
|
-
},
|
|
531
529
|
});
|
|
532
530
|
}
|
|
531
|
+
}
|
|
532
|
+
export class Session extends HeyApiClient {
|
|
533
533
|
/**
|
|
534
|
-
*
|
|
534
|
+
* List sessions
|
|
535
535
|
*
|
|
536
|
-
*
|
|
536
|
+
* Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
|
|
537
537
|
*/
|
|
538
|
-
|
|
538
|
+
list(parameters, options) {
|
|
539
539
|
const params = buildClientParams([parameters], [
|
|
540
540
|
{
|
|
541
541
|
args: [
|
|
542
542
|
{ in: "query", key: "directory" },
|
|
543
543
|
{ in: "query", key: "workspace" },
|
|
544
|
-
{
|
|
544
|
+
{ in: "query", key: "roots" },
|
|
545
|
+
{ in: "query", key: "start" },
|
|
546
|
+
{ in: "query", key: "cursor" },
|
|
547
|
+
{ in: "query", key: "search" },
|
|
548
|
+
{ in: "query", key: "limit" },
|
|
549
|
+
{ in: "query", key: "archived" },
|
|
545
550
|
],
|
|
546
551
|
},
|
|
547
552
|
]);
|
|
548
|
-
return (options?.client ?? this.client).
|
|
549
|
-
url: "/experimental/
|
|
553
|
+
return (options?.client ?? this.client).get({
|
|
554
|
+
url: "/experimental/session",
|
|
550
555
|
...options,
|
|
551
556
|
...params,
|
|
552
|
-
headers: {
|
|
553
|
-
"Content-Type": "application/json",
|
|
554
|
-
...options?.headers,
|
|
555
|
-
...params.headers,
|
|
556
|
-
},
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
export class
|
|
560
|
+
export class Resource extends HeyApiClient {
|
|
561
561
|
/**
|
|
562
|
-
*
|
|
562
|
+
* Get MCP resources
|
|
563
563
|
*
|
|
564
|
-
*
|
|
564
|
+
* Get all available MCP resources from connected servers. Optionally filter by name.
|
|
565
565
|
*/
|
|
566
|
-
|
|
566
|
+
list(parameters, options) {
|
|
567
567
|
const params = buildClientParams([parameters], [
|
|
568
568
|
{
|
|
569
569
|
args: [
|
|
570
|
-
{ in: "path", key: "id" },
|
|
571
570
|
{ in: "query", key: "directory" },
|
|
572
571
|
{ in: "query", key: "workspace" },
|
|
573
572
|
],
|
|
574
573
|
},
|
|
575
574
|
]);
|
|
576
|
-
return (options?.client ?? this.client).
|
|
577
|
-
url: "/experimental/
|
|
575
|
+
return (options?.client ?? this.client).get({
|
|
576
|
+
url: "/experimental/resource",
|
|
578
577
|
...options,
|
|
579
578
|
...params,
|
|
580
579
|
});
|
|
581
580
|
}
|
|
581
|
+
}
|
|
582
|
+
export class Experimental extends HeyApiClient {
|
|
583
|
+
_workspace;
|
|
584
|
+
get workspace() {
|
|
585
|
+
return (this._workspace ??= new Workspace({ client: this.client }));
|
|
586
|
+
}
|
|
587
|
+
_session;
|
|
588
|
+
get session() {
|
|
589
|
+
return (this._session ??= new Session({ client: this.client }));
|
|
590
|
+
}
|
|
591
|
+
_resource;
|
|
592
|
+
get resource() {
|
|
593
|
+
return (this._resource ??= new Resource({ client: this.client }));
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
export class Worktree extends HeyApiClient {
|
|
582
597
|
/**
|
|
583
|
-
*
|
|
598
|
+
* Remove worktree
|
|
584
599
|
*
|
|
585
|
-
*
|
|
600
|
+
* Remove a git worktree and delete its branch.
|
|
586
601
|
*/
|
|
587
|
-
|
|
602
|
+
remove(parameters, options) {
|
|
588
603
|
const params = buildClientParams([parameters], [
|
|
589
604
|
{
|
|
590
605
|
args: [
|
|
591
|
-
{ in: "path", key: "id" },
|
|
592
606
|
{ in: "query", key: "directory" },
|
|
593
607
|
{ in: "query", key: "workspace" },
|
|
594
|
-
{
|
|
595
|
-
{ in: "body", key: "config" },
|
|
608
|
+
{ key: "worktreeRemoveInput", map: "body" },
|
|
596
609
|
],
|
|
597
610
|
},
|
|
598
611
|
]);
|
|
599
|
-
return (options?.client ?? this.client).
|
|
600
|
-
url: "/experimental/
|
|
612
|
+
return (options?.client ?? this.client).delete({
|
|
613
|
+
url: "/experimental/worktree",
|
|
601
614
|
...options,
|
|
602
615
|
...params,
|
|
603
616
|
headers: {
|
|
@@ -608,9 +621,9 @@ export class Workspace extends HeyApiClient {
|
|
|
608
621
|
});
|
|
609
622
|
}
|
|
610
623
|
/**
|
|
611
|
-
* List
|
|
624
|
+
* List worktrees
|
|
612
625
|
*
|
|
613
|
-
* List all
|
|
626
|
+
* List all sandbox worktrees for the current project.
|
|
614
627
|
*/
|
|
615
628
|
list(parameters, options) {
|
|
616
629
|
const params = buildClientParams([parameters], [
|
|
@@ -622,76 +635,64 @@ export class Workspace extends HeyApiClient {
|
|
|
622
635
|
},
|
|
623
636
|
]);
|
|
624
637
|
return (options?.client ?? this.client).get({
|
|
625
|
-
url: "/experimental/
|
|
638
|
+
url: "/experimental/worktree",
|
|
626
639
|
...options,
|
|
627
640
|
...params,
|
|
628
641
|
});
|
|
629
642
|
}
|
|
630
|
-
}
|
|
631
|
-
export class Session extends HeyApiClient {
|
|
632
643
|
/**
|
|
633
|
-
*
|
|
644
|
+
* Create worktree
|
|
634
645
|
*
|
|
635
|
-
*
|
|
646
|
+
* Create a new git worktree for the current project and run any configured startup scripts.
|
|
636
647
|
*/
|
|
637
|
-
|
|
648
|
+
create(parameters, options) {
|
|
638
649
|
const params = buildClientParams([parameters], [
|
|
639
650
|
{
|
|
640
651
|
args: [
|
|
641
652
|
{ in: "query", key: "directory" },
|
|
642
653
|
{ in: "query", key: "workspace" },
|
|
643
|
-
{
|
|
644
|
-
{ in: "query", key: "start" },
|
|
645
|
-
{ in: "query", key: "cursor" },
|
|
646
|
-
{ in: "query", key: "search" },
|
|
647
|
-
{ in: "query", key: "limit" },
|
|
648
|
-
{ in: "query", key: "archived" },
|
|
654
|
+
{ key: "worktreeCreateInput", map: "body" },
|
|
649
655
|
],
|
|
650
656
|
},
|
|
651
657
|
]);
|
|
652
|
-
return (options?.client ?? this.client).
|
|
653
|
-
url: "/experimental/
|
|
658
|
+
return (options?.client ?? this.client).post({
|
|
659
|
+
url: "/experimental/worktree",
|
|
654
660
|
...options,
|
|
655
661
|
...params,
|
|
662
|
+
headers: {
|
|
663
|
+
"Content-Type": "application/json",
|
|
664
|
+
...options?.headers,
|
|
665
|
+
...params.headers,
|
|
666
|
+
},
|
|
656
667
|
});
|
|
657
668
|
}
|
|
658
|
-
}
|
|
659
|
-
export class Resource extends HeyApiClient {
|
|
660
669
|
/**
|
|
661
|
-
*
|
|
670
|
+
* Reset worktree
|
|
662
671
|
*
|
|
663
|
-
*
|
|
672
|
+
* Reset a worktree branch to the primary default branch.
|
|
664
673
|
*/
|
|
665
|
-
|
|
674
|
+
reset(parameters, options) {
|
|
666
675
|
const params = buildClientParams([parameters], [
|
|
667
676
|
{
|
|
668
677
|
args: [
|
|
669
678
|
{ in: "query", key: "directory" },
|
|
670
679
|
{ in: "query", key: "workspace" },
|
|
680
|
+
{ key: "worktreeResetInput", map: "body" },
|
|
671
681
|
],
|
|
672
682
|
},
|
|
673
683
|
]);
|
|
674
|
-
return (options?.client ?? this.client).
|
|
675
|
-
url: "/experimental/
|
|
684
|
+
return (options?.client ?? this.client).post({
|
|
685
|
+
url: "/experimental/worktree/reset",
|
|
676
686
|
...options,
|
|
677
687
|
...params,
|
|
688
|
+
headers: {
|
|
689
|
+
"Content-Type": "application/json",
|
|
690
|
+
...options?.headers,
|
|
691
|
+
...params.headers,
|
|
692
|
+
},
|
|
678
693
|
});
|
|
679
694
|
}
|
|
680
695
|
}
|
|
681
|
-
export class Experimental extends HeyApiClient {
|
|
682
|
-
_workspace;
|
|
683
|
-
get workspace() {
|
|
684
|
-
return (this._workspace ??= new Workspace({ client: this.client }));
|
|
685
|
-
}
|
|
686
|
-
_session;
|
|
687
|
-
get session() {
|
|
688
|
-
return (this._session ??= new Session({ client: this.client }));
|
|
689
|
-
}
|
|
690
|
-
_resource;
|
|
691
|
-
get resource() {
|
|
692
|
-
return (this._resource ??= new Resource({ client: this.client }));
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
696
|
export class Session2 extends HeyApiClient {
|
|
696
697
|
/**
|
|
697
698
|
* List sessions
|
|
@@ -2475,14 +2476,14 @@ export class OpencodeClient extends HeyApiClient {
|
|
|
2475
2476
|
get tool() {
|
|
2476
2477
|
return (this._tool ??= new Tool({ client: this.client }));
|
|
2477
2478
|
}
|
|
2478
|
-
_worktree;
|
|
2479
|
-
get worktree() {
|
|
2480
|
-
return (this._worktree ??= new Worktree({ client: this.client }));
|
|
2481
|
-
}
|
|
2482
2479
|
_experimental;
|
|
2483
2480
|
get experimental() {
|
|
2484
2481
|
return (this._experimental ??= new Experimental({ client: this.client }));
|
|
2485
2482
|
}
|
|
2483
|
+
_worktree;
|
|
2484
|
+
get worktree() {
|
|
2485
|
+
return (this._worktree ??= new Worktree({ client: this.client }));
|
|
2486
|
+
}
|
|
2486
2487
|
_session;
|
|
2487
2488
|
get session() {
|
|
2488
2489
|
return (this._session ??= new Session2({ client: this.client }));
|
|
@@ -752,19 +752,6 @@ export type EventVcsBranchUpdated = {
|
|
|
752
752
|
branch?: string;
|
|
753
753
|
};
|
|
754
754
|
};
|
|
755
|
-
export type EventWorktreeReady = {
|
|
756
|
-
type: "worktree.ready";
|
|
757
|
-
properties: {
|
|
758
|
-
name: string;
|
|
759
|
-
branch: string;
|
|
760
|
-
};
|
|
761
|
-
};
|
|
762
|
-
export type EventWorktreeFailed = {
|
|
763
|
-
type: "worktree.failed";
|
|
764
|
-
properties: {
|
|
765
|
-
message: string;
|
|
766
|
-
};
|
|
767
|
-
};
|
|
768
755
|
export type EventWorkspaceReady = {
|
|
769
756
|
type: "workspace.ready";
|
|
770
757
|
properties: {
|
|
@@ -811,7 +798,20 @@ export type EventPtyDeleted = {
|
|
|
811
798
|
id: string;
|
|
812
799
|
};
|
|
813
800
|
};
|
|
814
|
-
export type
|
|
801
|
+
export type EventWorktreeReady = {
|
|
802
|
+
type: "worktree.ready";
|
|
803
|
+
properties: {
|
|
804
|
+
name: string;
|
|
805
|
+
branch: string;
|
|
806
|
+
};
|
|
807
|
+
};
|
|
808
|
+
export type EventWorktreeFailed = {
|
|
809
|
+
type: "worktree.failed";
|
|
810
|
+
properties: {
|
|
811
|
+
message: string;
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
export type Event = EventInstallationUpdated | EventInstallationUpdateAvailable | EventProjectUpdated | EventServerInstanceDisposed | EventServerConnected | EventGlobalDisposed | EventLspClientDiagnostics | EventLspUpdated | EventFileEdited | EventMessageUpdated | EventMessageRemoved | EventMessagePartUpdated | EventMessagePartDelta | EventMessagePartRemoved | EventPermissionAsked | EventPermissionReplied | EventSessionStatus | EventSessionIdle | EventQuestionAsked | EventQuestionReplied | EventQuestionRejected | EventSessionCompacted | EventFileWatcherUpdated | EventTodoUpdated | EventTuiPromptAppend | EventTuiCommandExecute | EventTuiToastShow | EventTuiSessionSelect | EventMcpToolsChanged | EventMcpBrowserOpenFailed | EventCommandExecuted | EventSessionCreated | EventSessionUpdated | EventSessionDeleted | EventSessionDiff | EventSessionError | EventVcsBranchUpdated | EventWorkspaceReady | EventWorkspaceFailed | EventPtyCreated | EventPtyUpdated | EventPtyExited | EventPtyDeleted | EventWorktreeReady | EventWorktreeFailed;
|
|
815
815
|
export type GlobalEvent = {
|
|
816
816
|
directory: string;
|
|
817
817
|
payload: Event;
|
|
@@ -1379,6 +1379,15 @@ export type ToolListItem = {
|
|
|
1379
1379
|
parameters: unknown;
|
|
1380
1380
|
};
|
|
1381
1381
|
export type ToolList = Array<ToolListItem>;
|
|
1382
|
+
export type Workspace = {
|
|
1383
|
+
id: string;
|
|
1384
|
+
type: string;
|
|
1385
|
+
branch: string | null;
|
|
1386
|
+
name: string | null;
|
|
1387
|
+
directory: string | null;
|
|
1388
|
+
extra: unknown | null;
|
|
1389
|
+
projectID: string;
|
|
1390
|
+
};
|
|
1382
1391
|
export type Worktree = {
|
|
1383
1392
|
name: string;
|
|
1384
1393
|
branch: string;
|
|
@@ -1391,15 +1400,6 @@ export type WorktreeCreateInput = {
|
|
|
1391
1400
|
*/
|
|
1392
1401
|
startCommand?: string;
|
|
1393
1402
|
};
|
|
1394
|
-
export type Workspace = {
|
|
1395
|
-
id: string;
|
|
1396
|
-
branch: string | null;
|
|
1397
|
-
projectID: string;
|
|
1398
|
-
config: {
|
|
1399
|
-
directory: string;
|
|
1400
|
-
type: "worktree";
|
|
1401
|
-
};
|
|
1402
|
-
};
|
|
1403
1403
|
export type WorktreeRemoveInput = {
|
|
1404
1404
|
directory: string;
|
|
1405
1405
|
};
|
|
@@ -2070,68 +2070,50 @@ export type ToolListResponses = {
|
|
|
2070
2070
|
200: ToolList;
|
|
2071
2071
|
};
|
|
2072
2072
|
export type ToolListResponse = ToolListResponses[keyof ToolListResponses];
|
|
2073
|
-
export type
|
|
2074
|
-
body?: WorktreeRemoveInput;
|
|
2075
|
-
path?: never;
|
|
2076
|
-
query?: {
|
|
2077
|
-
directory?: string;
|
|
2078
|
-
workspace?: string;
|
|
2079
|
-
};
|
|
2080
|
-
url: "/experimental/worktree";
|
|
2081
|
-
};
|
|
2082
|
-
export type WorktreeRemoveErrors = {
|
|
2083
|
-
/**
|
|
2084
|
-
* Bad request
|
|
2085
|
-
*/
|
|
2086
|
-
400: BadRequestError;
|
|
2087
|
-
};
|
|
2088
|
-
export type WorktreeRemoveError = WorktreeRemoveErrors[keyof WorktreeRemoveErrors];
|
|
2089
|
-
export type WorktreeRemoveResponses = {
|
|
2090
|
-
/**
|
|
2091
|
-
* Worktree removed
|
|
2092
|
-
*/
|
|
2093
|
-
200: boolean;
|
|
2094
|
-
};
|
|
2095
|
-
export type WorktreeRemoveResponse = WorktreeRemoveResponses[keyof WorktreeRemoveResponses];
|
|
2096
|
-
export type WorktreeListData = {
|
|
2073
|
+
export type ExperimentalWorkspaceListData = {
|
|
2097
2074
|
body?: never;
|
|
2098
2075
|
path?: never;
|
|
2099
2076
|
query?: {
|
|
2100
2077
|
directory?: string;
|
|
2101
2078
|
workspace?: string;
|
|
2102
2079
|
};
|
|
2103
|
-
url: "/experimental/
|
|
2080
|
+
url: "/experimental/workspace";
|
|
2104
2081
|
};
|
|
2105
|
-
export type
|
|
2082
|
+
export type ExperimentalWorkspaceListResponses = {
|
|
2106
2083
|
/**
|
|
2107
|
-
*
|
|
2084
|
+
* Workspaces
|
|
2108
2085
|
*/
|
|
2109
|
-
200: Array<
|
|
2086
|
+
200: Array<Workspace>;
|
|
2110
2087
|
};
|
|
2111
|
-
export type
|
|
2112
|
-
export type
|
|
2113
|
-
body?:
|
|
2088
|
+
export type ExperimentalWorkspaceListResponse = ExperimentalWorkspaceListResponses[keyof ExperimentalWorkspaceListResponses];
|
|
2089
|
+
export type ExperimentalWorkspaceCreateData = {
|
|
2090
|
+
body?: {
|
|
2091
|
+
id?: string;
|
|
2092
|
+
type: string;
|
|
2093
|
+
branch: string | null;
|
|
2094
|
+
extra: unknown | null;
|
|
2095
|
+
};
|
|
2114
2096
|
path?: never;
|
|
2115
2097
|
query?: {
|
|
2116
2098
|
directory?: string;
|
|
2117
2099
|
workspace?: string;
|
|
2118
2100
|
};
|
|
2119
|
-
url: "/experimental/
|
|
2101
|
+
url: "/experimental/workspace";
|
|
2120
2102
|
};
|
|
2121
|
-
export type
|
|
2103
|
+
export type ExperimentalWorkspaceCreateErrors = {
|
|
2122
2104
|
/**
|
|
2123
2105
|
* Bad request
|
|
2124
2106
|
*/
|
|
2125
2107
|
400: BadRequestError;
|
|
2126
2108
|
};
|
|
2127
|
-
export type
|
|
2128
|
-
export type
|
|
2109
|
+
export type ExperimentalWorkspaceCreateError = ExperimentalWorkspaceCreateErrors[keyof ExperimentalWorkspaceCreateErrors];
|
|
2110
|
+
export type ExperimentalWorkspaceCreateResponses = {
|
|
2129
2111
|
/**
|
|
2130
|
-
*
|
|
2112
|
+
* Workspace created
|
|
2131
2113
|
*/
|
|
2132
|
-
200:
|
|
2114
|
+
200: Workspace;
|
|
2133
2115
|
};
|
|
2134
|
-
export type
|
|
2116
|
+
export type ExperimentalWorkspaceCreateResponse = ExperimentalWorkspaceCreateResponses[keyof ExperimentalWorkspaceCreateResponses];
|
|
2135
2117
|
export type ExperimentalWorkspaceRemoveData = {
|
|
2136
2118
|
body?: never;
|
|
2137
2119
|
path: {
|
|
@@ -2157,53 +2139,68 @@ export type ExperimentalWorkspaceRemoveResponses = {
|
|
|
2157
2139
|
200: Workspace;
|
|
2158
2140
|
};
|
|
2159
2141
|
export type ExperimentalWorkspaceRemoveResponse = ExperimentalWorkspaceRemoveResponses[keyof ExperimentalWorkspaceRemoveResponses];
|
|
2160
|
-
export type
|
|
2161
|
-
body?:
|
|
2162
|
-
|
|
2163
|
-
config: {
|
|
2164
|
-
directory: string;
|
|
2165
|
-
type: "worktree";
|
|
2166
|
-
};
|
|
2167
|
-
};
|
|
2168
|
-
path: {
|
|
2169
|
-
id: string;
|
|
2170
|
-
};
|
|
2142
|
+
export type WorktreeRemoveData = {
|
|
2143
|
+
body?: WorktreeRemoveInput;
|
|
2144
|
+
path?: never;
|
|
2171
2145
|
query?: {
|
|
2172
2146
|
directory?: string;
|
|
2173
2147
|
workspace?: string;
|
|
2174
2148
|
};
|
|
2175
|
-
url: "/experimental/
|
|
2149
|
+
url: "/experimental/worktree";
|
|
2176
2150
|
};
|
|
2177
|
-
export type
|
|
2151
|
+
export type WorktreeRemoveErrors = {
|
|
2178
2152
|
/**
|
|
2179
2153
|
* Bad request
|
|
2180
2154
|
*/
|
|
2181
2155
|
400: BadRequestError;
|
|
2182
2156
|
};
|
|
2183
|
-
export type
|
|
2184
|
-
export type
|
|
2157
|
+
export type WorktreeRemoveError = WorktreeRemoveErrors[keyof WorktreeRemoveErrors];
|
|
2158
|
+
export type WorktreeRemoveResponses = {
|
|
2185
2159
|
/**
|
|
2186
|
-
*
|
|
2160
|
+
* Worktree removed
|
|
2187
2161
|
*/
|
|
2188
|
-
200:
|
|
2162
|
+
200: boolean;
|
|
2189
2163
|
};
|
|
2190
|
-
export type
|
|
2191
|
-
export type
|
|
2164
|
+
export type WorktreeRemoveResponse = WorktreeRemoveResponses[keyof WorktreeRemoveResponses];
|
|
2165
|
+
export type WorktreeListData = {
|
|
2192
2166
|
body?: never;
|
|
2193
2167
|
path?: never;
|
|
2194
2168
|
query?: {
|
|
2195
2169
|
directory?: string;
|
|
2196
2170
|
workspace?: string;
|
|
2197
2171
|
};
|
|
2198
|
-
url: "/experimental/
|
|
2172
|
+
url: "/experimental/worktree";
|
|
2199
2173
|
};
|
|
2200
|
-
export type
|
|
2174
|
+
export type WorktreeListResponses = {
|
|
2201
2175
|
/**
|
|
2202
|
-
*
|
|
2176
|
+
* List of worktree directories
|
|
2203
2177
|
*/
|
|
2204
|
-
200: Array<
|
|
2178
|
+
200: Array<string>;
|
|
2205
2179
|
};
|
|
2206
|
-
export type
|
|
2180
|
+
export type WorktreeListResponse = WorktreeListResponses[keyof WorktreeListResponses];
|
|
2181
|
+
export type WorktreeCreateData = {
|
|
2182
|
+
body?: WorktreeCreateInput;
|
|
2183
|
+
path?: never;
|
|
2184
|
+
query?: {
|
|
2185
|
+
directory?: string;
|
|
2186
|
+
workspace?: string;
|
|
2187
|
+
};
|
|
2188
|
+
url: "/experimental/worktree";
|
|
2189
|
+
};
|
|
2190
|
+
export type WorktreeCreateErrors = {
|
|
2191
|
+
/**
|
|
2192
|
+
* Bad request
|
|
2193
|
+
*/
|
|
2194
|
+
400: BadRequestError;
|
|
2195
|
+
};
|
|
2196
|
+
export type WorktreeCreateError = WorktreeCreateErrors[keyof WorktreeCreateErrors];
|
|
2197
|
+
export type WorktreeCreateResponses = {
|
|
2198
|
+
/**
|
|
2199
|
+
* Worktree created
|
|
2200
|
+
*/
|
|
2201
|
+
200: Worktree;
|
|
2202
|
+
};
|
|
2203
|
+
export type WorktreeCreateResponse = WorktreeCreateResponses[keyof WorktreeCreateResponses];
|
|
2207
2204
|
export type WorktreeResetData = {
|
|
2208
2205
|
body?: WorktreeResetInput;
|
|
2209
2206
|
path?: never;
|