@gitterm/sdk 0.10.0 → 0.12.0

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.
@@ -30,7 +30,7 @@ function normalizeQuestion(question) {
30
30
  }
31
31
  return changed ? { ...question, options, custom } : question;
32
32
  }
33
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-9rqn6x4v.js
33
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-9rqn6x4v.js
34
34
  var __defProp = Object.defineProperty;
35
35
  var __returnValue = (v) => v;
36
36
  function __exportSetter(name, newValue) {
@@ -46,7 +46,7 @@ var __export = (target, all) => {
46
46
  });
47
47
  };
48
48
 
49
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-frbwqjmf.js
49
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-gecjxyvt.js
50
50
  var exports_shared_events = {};
51
51
  __export(exports_shared_events, {
52
52
  SharedEvents: () => exports_shared_events,
@@ -100,6 +100,8 @@ function make7(connect) {
100
100
  let started = false;
101
101
  let completion;
102
102
  let connection;
103
+ const types = options?.types?.length ? new Set(options.types) : undefined;
104
+ const selected = (value) => !types || value.type === "server.connected" || types.has(value.type);
103
105
  function finish(result, discard = true) {
104
106
  completion = result;
105
107
  if (discard)
@@ -125,6 +127,8 @@ function make7(connect) {
125
127
  push(value) {
126
128
  if (completion)
127
129
  return;
130
+ if (!selected(value))
131
+ return;
128
132
  const request = pending.shift();
129
133
  if (request) {
130
134
  request.resolve({ done: false, value });
@@ -186,7 +190,7 @@ function make7(connect) {
186
190
  };
187
191
  }
188
192
 
189
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-js54wxgp.js
193
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-js54wxgp.js
190
194
  class ClientError2 extends Error {
191
195
  reason;
192
196
  name = "ClientError";
@@ -197,7 +201,7 @@ class ClientError2 extends Error {
197
201
  }
198
202
  }
199
203
 
200
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-h9cy5hnk.js
204
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-t2ajednw.js
201
205
  var exports_client2 = {};
202
206
  __export(exports_client2, {
203
207
  make: () => make3
@@ -334,7 +338,7 @@ function make3(options) {
334
338
  }
335
339
  }
336
340
  });
337
- return {
341
+ const client = {
338
342
  server: {
339
343
  info: (requestOptions) => request({ method: "GET", path: `/api/info`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
340
344
  pair: (requestOptions) => request({ method: "POST", path: `/api/pair`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
@@ -352,7 +356,7 @@ function make3(options) {
352
356
  path: `/api/location`,
353
357
  query: { location: input?.["location"] },
354
358
  successStatus: 200,
355
- declaredStatuses: [400, 401],
359
+ declaredStatuses: [400, 401, 404],
356
360
  empty: false
357
361
  }, requestOptions),
358
362
  reload: (requestOptions) => request({
@@ -369,7 +373,7 @@ function make3(options) {
369
373
  path: `/api/agent`,
370
374
  query: { location: input?.["location"] },
371
375
  successStatus: 200,
372
- declaredStatuses: [400, 401],
376
+ declaredStatuses: [400, 401, 404, 503],
373
377
  empty: false
374
378
  }, requestOptions),
375
379
  get: (input, requestOptions) => request({
@@ -387,7 +391,15 @@ function make3(options) {
387
391
  path: `/api/plugin`,
388
392
  query: { location: input?.["location"] },
389
393
  successStatus: 200,
390
- declaredStatuses: [400, 401],
394
+ declaredStatuses: [400, 401, 404],
395
+ empty: false
396
+ }, requestOptions),
397
+ gui: (input, requestOptions) => request({
398
+ method: "GET",
399
+ path: `/api/plugin/gui`,
400
+ query: { location: input["location"], id: input["id"] },
401
+ successStatus: 200,
402
+ declaredStatuses: [400, 401, 404],
391
403
  empty: false
392
404
  }, requestOptions),
393
405
  check: (input, requestOptions) => request({
@@ -396,7 +408,7 @@ function make3(options) {
396
408
  query: { location: input?.["location"] },
397
409
  body: { target: input?.["target"] },
398
410
  successStatus: 200,
399
- declaredStatuses: [400, 401],
411
+ declaredStatuses: [400, 401, 404],
400
412
  empty: false
401
413
  }, requestOptions),
402
414
  update: (input, requestOptions) => request({
@@ -405,7 +417,7 @@ function make3(options) {
405
417
  query: { location: input["location"] },
406
418
  body: { targets: input["targets"] },
407
419
  successStatus: 204,
408
- declaredStatuses: [400, 401, 503],
420
+ declaredStatuses: [400, 401, 404, 503],
409
421
  empty: true
410
422
  }, requestOptions)
411
423
  },
@@ -418,6 +430,7 @@ function make3(options) {
418
430
  order: input?.["order"],
419
431
  search: input?.["search"],
420
432
  parentID: input?.["parentID"],
433
+ archived: input?.["archived"],
421
434
  directory: input?.["directory"],
422
435
  project: input?.["project"],
423
436
  subpath: input?.["subpath"],
@@ -427,25 +440,12 @@ function make3(options) {
427
440
  declaredStatuses: [400, 401],
428
441
  empty: false
429
442
  }, requestOptions),
430
- stats: (input, requestOptions) => request({
431
- method: "GET",
432
- path: `/api/experimental/session/stats`,
433
- query: {
434
- from: input?.["from"],
435
- to: input?.["to"],
436
- project: input?.["project"],
437
- timezone: input?.["timezone"],
438
- tools: input?.["tools"]
439
- },
440
- successStatus: 200,
441
- declaredStatuses: [400, 401],
442
- empty: false
443
- }, requestOptions).then((value) => value.data),
444
443
  create: (input, requestOptions) => request({
445
444
  method: "POST",
446
445
  path: `/api/session`,
447
446
  body: {
448
447
  id: input?.["id"],
448
+ parentID: input?.["parentID"],
449
449
  title: input?.["title"],
450
450
  agent: input?.["agent"],
451
451
  model: input?.["model"],
@@ -454,23 +454,7 @@ function make3(options) {
454
454
  permissions: input?.["permissions"]
455
455
  },
456
456
  successStatus: 200,
457
- declaredStatuses: [400, 401],
458
- empty: false
459
- }, requestOptions).then((value) => value.data),
460
- import: (input, requestOptions) => request({
461
- method: "POST",
462
- path: `/api/experimental/session/import`,
463
- body: { info: input["info"], messages: input["messages"], location: input["location"] },
464
- successStatus: 200,
465
- declaredStatuses: [400, 401, 404, 409],
466
- empty: false
467
- }, requestOptions).then((value) => value.data),
468
- export: (input, requestOptions) => request({
469
- method: "GET",
470
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/export`,
471
- query: { sanitize: input["sanitize"] },
472
- successStatus: 200,
473
- declaredStatuses: [400, 401, 404, 500],
457
+ declaredStatuses: [400, 401, 404],
474
458
  empty: false
475
459
  }, requestOptions).then((value) => value.data),
476
460
  active: (requestOptions) => request({
@@ -521,7 +505,12 @@ function make3(options) {
521
505
  update: (input, requestOptions) => request({
522
506
  method: "PATCH",
523
507
  path: `/api/session/${encodeURIComponent(input.sessionID)}`,
524
- body: { title: input["title"], metadata: input["metadata"], permissions: input["permissions"] },
508
+ body: {
509
+ title: input["title"],
510
+ metadata: input["metadata"],
511
+ permissions: input["permissions"],
512
+ archived: input["archived"]
513
+ },
525
514
  successStatus: 204,
526
515
  declaredStatuses: [400, 401, 404],
527
516
  empty: true
@@ -566,14 +555,6 @@ function make3(options) {
566
555
  declaredStatuses: [400, 401, 404, 500],
567
556
  empty: true
568
557
  }, requestOptions),
569
- skill: (input, requestOptions) => request({
570
- method: "POST",
571
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/skill`,
572
- body: { id: input["id"], resume: input["resume"] },
573
- successStatus: 204,
574
- declaredStatuses: [400, 401, 404],
575
- empty: true
576
- }, requestOptions),
577
558
  synthetic: (input, requestOptions) => request({
578
559
  method: "POST",
579
560
  path: `/api/session/${encodeURIComponent(input.sessionID)}/synthetic`,
@@ -605,13 +586,6 @@ function make3(options) {
605
586
  declaredStatuses: [400, 401, 404, 409],
606
587
  empty: false
607
588
  }, requestOptions).then((value) => value.data),
608
- wait: (input, requestOptions) => request({
609
- method: "POST",
610
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/wait`,
611
- successStatus: 204,
612
- declaredStatuses: [400, 401, 404, 503],
613
- empty: true
614
- }, requestOptions),
615
589
  revert: {
616
590
  stage: (input, requestOptions) => request({
617
591
  method: "POST",
@@ -675,32 +649,6 @@ function make3(options) {
675
649
  empty: true
676
650
  }, requestOptions)
677
651
  },
678
- instructions: {
679
- entry: {
680
- list: (input, requestOptions) => request({
681
- method: "GET",
682
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries`,
683
- successStatus: 200,
684
- declaredStatuses: [400, 401, 404],
685
- empty: false
686
- }, requestOptions).then((value) => value.data),
687
- put: (input, requestOptions) => request({
688
- method: "PUT",
689
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
690
- body: { value: input["value"] },
691
- successStatus: 204,
692
- declaredStatuses: [400, 401, 404, 413],
693
- empty: true
694
- }, requestOptions),
695
- remove: (input, requestOptions) => request({
696
- method: "DELETE",
697
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
698
- successStatus: 204,
699
- declaredStatuses: [400, 401, 404],
700
- empty: true
701
- }, requestOptions)
702
- }
703
- },
704
652
  generate: (input, requestOptions) => request({
705
653
  method: "POST",
706
654
  path: `/api/session/${encodeURIComponent(input.sessionID)}/generate`,
@@ -709,14 +657,6 @@ function make3(options) {
709
657
  declaredStatuses: [400, 401, 404, 503],
710
658
  empty: false
711
659
  }, requestOptions).then((value) => value.data),
712
- log: (input, requestOptions) => sse({
713
- method: "GET",
714
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/log`,
715
- query: { after: input["after"], follow: input["follow"] },
716
- successStatus: 200,
717
- declaredStatuses: [400, 401, 404],
718
- empty: false
719
- }, requestOptions),
720
660
  interrupt: (input, requestOptions) => request({
721
661
  method: "POST",
722
662
  path: `/api/session/${encodeURIComponent(input.sessionID)}/interrupt`,
@@ -775,6 +715,7 @@ function make3(options) {
775
715
  cancel: (input, requestOptions) => request({
776
716
  method: "DELETE",
777
717
  path: `/api/session/${encodeURIComponent(input.sessionID)}/form/${encodeURIComponent(input.formID)}`,
718
+ query: { message: input["message"] },
778
719
  successStatus: 204,
779
720
  declaredStatuses: [400, 401, 404, 409],
780
721
  empty: true
@@ -797,6 +738,478 @@ function make3(options) {
797
738
  empty: true
798
739
  }, requestOptions)
799
740
  },
741
+ experimental: {
742
+ session: {
743
+ stats: (input, requestOptions) => request({
744
+ method: "GET",
745
+ path: `/api/experimental/session/stats`,
746
+ query: {
747
+ from: input?.["from"],
748
+ to: input?.["to"],
749
+ project: input?.["project"],
750
+ timezone: input?.["timezone"],
751
+ tools: input?.["tools"]
752
+ },
753
+ successStatus: 200,
754
+ declaredStatuses: [400, 401],
755
+ empty: false
756
+ }, requestOptions).then((value) => value.data),
757
+ import: (input, requestOptions) => request({
758
+ method: "POST",
759
+ path: `/api/experimental/session/import`,
760
+ body: { info: input["info"], messages: input["messages"], location: input["location"] },
761
+ successStatus: 200,
762
+ declaredStatuses: [400, 401, 404, 409],
763
+ empty: false
764
+ }, requestOptions).then((value) => value.data),
765
+ export: (input, requestOptions) => request({
766
+ method: "GET",
767
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/export`,
768
+ query: { sanitize: input["sanitize"] },
769
+ successStatus: 200,
770
+ declaredStatuses: [400, 401, 404, 500],
771
+ empty: false
772
+ }, requestOptions).then((value) => value.data),
773
+ skill: (input, requestOptions) => request({
774
+ method: "POST",
775
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/skill`,
776
+ body: { id: input["id"], resume: input["resume"] },
777
+ successStatus: 204,
778
+ declaredStatuses: [400, 401, 404],
779
+ empty: true
780
+ }, requestOptions),
781
+ wait: (input, requestOptions) => request({
782
+ method: "POST",
783
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/wait`,
784
+ successStatus: 204,
785
+ declaredStatuses: [400, 401, 404, 503],
786
+ empty: true
787
+ }, requestOptions),
788
+ instructions: {
789
+ entry: {
790
+ list: (input, requestOptions) => request({
791
+ method: "GET",
792
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries`,
793
+ successStatus: 200,
794
+ declaredStatuses: [400, 401, 404],
795
+ empty: false
796
+ }, requestOptions).then((value) => value.data),
797
+ put: (input, requestOptions) => request({
798
+ method: "PUT",
799
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
800
+ body: { value: input["value"] },
801
+ successStatus: 204,
802
+ declaredStatuses: [400, 401, 404, 413],
803
+ empty: true
804
+ }, requestOptions),
805
+ remove: (input, requestOptions) => request({
806
+ method: "DELETE",
807
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/instructions/entries/${encodeURIComponent(input.key)}`,
808
+ successStatus: 204,
809
+ declaredStatuses: [400, 401, 404],
810
+ empty: true
811
+ }, requestOptions)
812
+ }
813
+ },
814
+ log: (input, requestOptions) => sse({
815
+ method: "GET",
816
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/log`,
817
+ query: { after: input["after"], follow: input["follow"] },
818
+ successStatus: 200,
819
+ declaredStatuses: [400, 401, 404],
820
+ empty: false
821
+ }, requestOptions)
822
+ },
823
+ generate: {
824
+ text: (input, requestOptions) => request({
825
+ method: "POST",
826
+ path: `/api/experimental/generate/text`,
827
+ body: { prompt: input["prompt"], model: input["model"] },
828
+ successStatus: 200,
829
+ declaredStatuses: [400, 401, 404, 422, 502, 503],
830
+ empty: false
831
+ }, requestOptions).then((value) => value.data),
832
+ image: (input, requestOptions) => request({
833
+ method: "POST",
834
+ path: `/api/experimental/generate/image`,
835
+ body: {
836
+ model: input["model"],
837
+ prompt: input["prompt"],
838
+ images: input["images"],
839
+ n: input["n"],
840
+ aspect: input["aspect"],
841
+ resolution: input["resolution"]
842
+ },
843
+ successStatus: 200,
844
+ declaredStatuses: [400, 401, 404, 422, 502, 503],
845
+ empty: false
846
+ }, requestOptions).then((value) => value.data),
847
+ decisions: (input, requestOptions) => request({
848
+ method: "POST",
849
+ path: `/api/experimental/generate/decisions`,
850
+ body: { model: input["model"], input: input["input"], questions: input["questions"] },
851
+ successStatus: 200,
852
+ declaredStatuses: [400, 401, 404, 422, 502, 503],
853
+ empty: false
854
+ }, requestOptions).then((value) => value.data)
855
+ },
856
+ voice: {
857
+ models: (requestOptions) => request({
858
+ method: "GET",
859
+ path: `/api/experimental/voice/models`,
860
+ successStatus: 200,
861
+ declaredStatuses: [400, 401, 404, 503],
862
+ empty: false
863
+ }, requestOptions).then((value) => value.data),
864
+ session: (input, requestOptions) => request({
865
+ method: "POST",
866
+ path: `/api/experimental/voice/session`,
867
+ body: { model: input["model"], session: input["session"], transport: input["transport"] },
868
+ successStatus: 200,
869
+ declaredStatuses: [400, 401, 404, 503],
870
+ empty: false
871
+ }, requestOptions).then((value) => value.data)
872
+ },
873
+ integration: {
874
+ wellknown: {
875
+ add: (input, requestOptions) => request({
876
+ method: "POST",
877
+ path: `/api/experimental/integration/wellknown`,
878
+ query: { location: input["location"] },
879
+ body: { url: input["url"] },
880
+ successStatus: 204,
881
+ declaredStatuses: [400, 401, 404],
882
+ empty: true
883
+ }, requestOptions)
884
+ }
885
+ },
886
+ mcp: {
887
+ add: (input, requestOptions) => request({
888
+ method: "PUT",
889
+ path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
890
+ query: { location: input["location"] },
891
+ body: { config: input["config"] },
892
+ successStatus: 204,
893
+ declaredStatuses: [400, 401, 404],
894
+ empty: true
895
+ }, requestOptions),
896
+ remove: (input, requestOptions) => request({
897
+ method: "DELETE",
898
+ path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
899
+ query: { location: input["location"] },
900
+ successStatus: 204,
901
+ declaredStatuses: [400, 401, 404],
902
+ empty: true
903
+ }, requestOptions),
904
+ connect: (input, requestOptions) => request({
905
+ method: "POST",
906
+ path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/connect`,
907
+ query: { location: input["location"] },
908
+ successStatus: 204,
909
+ declaredStatuses: [400, 401, 404],
910
+ empty: true
911
+ }, requestOptions),
912
+ disconnect: (input, requestOptions) => request({
913
+ method: "POST",
914
+ path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/disconnect`,
915
+ query: { location: input["location"] },
916
+ successStatus: 204,
917
+ declaredStatuses: [400, 401, 404],
918
+ empty: true
919
+ }, requestOptions),
920
+ client: {
921
+ token: (input, requestOptions) => request({
922
+ method: "POST",
923
+ path: `/api/experimental/client-mcp/token`,
924
+ query: { location: input["location"], name: input["name"] },
925
+ headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
926
+ successStatus: 200,
927
+ declaredStatuses: [400, 401, 403, 404],
928
+ empty: false
929
+ }, requestOptions)
930
+ }
931
+ },
932
+ file: {
933
+ write: (input, requestOptions) => request({
934
+ method: "POST",
935
+ path: `/api/experimental/fs/write`,
936
+ query: { location: input["location"], path: input["path"] },
937
+ body: input["payload"],
938
+ successStatus: 200,
939
+ declaredStatuses: [400, 401, 404],
940
+ empty: false,
941
+ binaryBody: true
942
+ }, requestOptions),
943
+ watch: (input, requestOptions) => request({
944
+ method: "POST",
945
+ path: `/api/experimental/fs/watch`,
946
+ query: { location: input["location"] },
947
+ body: { path: input["path"] },
948
+ successStatus: 204,
949
+ declaredStatuses: [400, 401, 404, 503],
950
+ empty: true
951
+ }, requestOptions),
952
+ unwatch: (input, requestOptions) => request({
953
+ method: "DELETE",
954
+ path: `/api/experimental/fs/watch`,
955
+ query: { location: input["location"] },
956
+ body: { path: input["path"] },
957
+ successStatus: 204,
958
+ declaredStatuses: [400, 401, 404],
959
+ empty: true
960
+ }, requestOptions)
961
+ },
962
+ persistentPty: {
963
+ read: (input, requestOptions) => request({
964
+ method: "GET",
965
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal/read`,
966
+ query: { lines: input["lines"] },
967
+ successStatus: 200,
968
+ declaredStatuses: [400, 401, 503],
969
+ empty: false
970
+ }, requestOptions).then((value) => value.data),
971
+ list: (input, requestOptions) => request({
972
+ method: "GET",
973
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
974
+ successStatus: 200,
975
+ declaredStatuses: [400, 401, 503],
976
+ empty: false
977
+ }, requestOptions).then((value) => value.data),
978
+ create: (input, requestOptions) => request({
979
+ method: "POST",
980
+ path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
981
+ body: {
982
+ command: input["command"],
983
+ args: input["args"],
984
+ cwd: input["cwd"],
985
+ title: input["title"],
986
+ env: input["env"],
987
+ size: input["size"]
988
+ },
989
+ successStatus: 200,
990
+ declaredStatuses: [400, 401, 503],
991
+ empty: false
992
+ }, requestOptions).then((value) => value.data),
993
+ shutdown: (requestOptions) => request({
994
+ method: "POST",
995
+ path: `/api/experimental/persistent-pty/shutdown`,
996
+ successStatus: 204,
997
+ declaredStatuses: [400, 401, 503],
998
+ empty: true
999
+ }, requestOptions),
1000
+ handoff: (requestOptions) => request({
1001
+ method: "POST",
1002
+ path: `/api/experimental/persistent-pty/handoff`,
1003
+ successStatus: 200,
1004
+ declaredStatuses: [400, 401, 503],
1005
+ empty: false
1006
+ }, requestOptions),
1007
+ get: (input, requestOptions) => request({
1008
+ method: "GET",
1009
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1010
+ successStatus: 200,
1011
+ declaredStatuses: [400, 401, 404, 503],
1012
+ empty: false
1013
+ }, requestOptions).then((value) => value.data),
1014
+ update: (input, requestOptions) => request({
1015
+ method: "PUT",
1016
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1017
+ body: { attachmentID: input["attachmentID"], size: input["size"], title: input["title"] },
1018
+ successStatus: 200,
1019
+ declaredStatuses: [400, 401, 404, 501, 503],
1020
+ empty: false
1021
+ }, requestOptions).then((value) => value.data),
1022
+ snapshot: (input, requestOptions) => request({
1023
+ method: "GET",
1024
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/snapshot`,
1025
+ successStatus: 200,
1026
+ declaredStatuses: [400, 401, 404, 503],
1027
+ empty: false
1028
+ }, requestOptions).then((value) => value.data),
1029
+ remove: (input, requestOptions) => request({
1030
+ method: "DELETE",
1031
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1032
+ successStatus: 204,
1033
+ declaredStatuses: [400, 401, 404, 503],
1034
+ empty: true
1035
+ }, requestOptions),
1036
+ connectToken: (input, requestOptions) => request({
1037
+ method: "POST",
1038
+ path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect-token`,
1039
+ headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
1040
+ successStatus: 200,
1041
+ declaredStatuses: [400, 401, 403, 404, 503],
1042
+ empty: false
1043
+ }, requestOptions).then((value) => value.data)
1044
+ },
1045
+ media: {
1046
+ get: (input, requestOptions) => request({
1047
+ method: "GET",
1048
+ path: `/api/experimental/media/${encodeURIComponent(input.hash)}`,
1049
+ successStatus: 200,
1050
+ declaredStatuses: [400, 401, 404],
1051
+ empty: false,
1052
+ binary: true
1053
+ }, requestOptions)
1054
+ },
1055
+ schedule: {
1056
+ create: (input, requestOptions) => request({
1057
+ method: "POST",
1058
+ path: `/api/experimental/schedule`,
1059
+ body: {
1060
+ sessionID: input["sessionID"],
1061
+ name: input["name"],
1062
+ when: input["when"],
1063
+ if: input["if"],
1064
+ until: input["until"],
1065
+ ends: input["ends"],
1066
+ prompt: input["prompt"]
1067
+ },
1068
+ successStatus: 200,
1069
+ declaredStatuses: [400, 401, 403, 404],
1070
+ empty: false
1071
+ }, requestOptions).then((value) => value.data),
1072
+ list: (input, requestOptions) => request({
1073
+ method: "GET",
1074
+ path: `/api/experimental/schedule`,
1075
+ query: { sessionID: input["sessionID"] },
1076
+ successStatus: 200,
1077
+ declaredStatuses: [400, 401, 403, 404],
1078
+ empty: false
1079
+ }, requestOptions).then((value) => value.data),
1080
+ get: (input, requestOptions) => request({
1081
+ method: "GET",
1082
+ path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}`,
1083
+ successStatus: 200,
1084
+ declaredStatuses: [400, 401, 403, 404],
1085
+ empty: false
1086
+ }, requestOptions).then((value) => value.data),
1087
+ pause: (input, requestOptions) => request({
1088
+ method: "POST",
1089
+ path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}/pause`,
1090
+ successStatus: 200,
1091
+ declaredStatuses: [400, 401, 403, 404],
1092
+ empty: false
1093
+ }, requestOptions).then((value) => value.data),
1094
+ resume: (input, requestOptions) => request({
1095
+ method: "POST",
1096
+ path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}/resume`,
1097
+ successStatus: 200,
1098
+ declaredStatuses: [400, 401, 403, 404],
1099
+ empty: false
1100
+ }, requestOptions).then((value) => value.data),
1101
+ delete: (input, requestOptions) => request({
1102
+ method: "DELETE",
1103
+ path: `/api/experimental/schedule/${encodeURIComponent(input.scheduleID)}`,
1104
+ successStatus: 204,
1105
+ declaredStatuses: [400, 401, 403, 404],
1106
+ empty: true
1107
+ }, requestOptions)
1108
+ },
1109
+ artifacts: {
1110
+ providers: (input, requestOptions) => request({
1111
+ method: "GET",
1112
+ path: `/api/experimental/artifacts/providers`,
1113
+ query: { location: input?.["location"] },
1114
+ successStatus: 200,
1115
+ declaredStatuses: [400, 401, 403, 404, 503],
1116
+ empty: false
1117
+ }, requestOptions),
1118
+ list: (input, requestOptions) => request({
1119
+ method: "GET",
1120
+ path: `/api/experimental/artifacts`,
1121
+ query: { location: input?.["location"], sessionID: input?.["sessionID"], provider: input?.["provider"] },
1122
+ successStatus: 200,
1123
+ declaredStatuses: [400, 401, 403, 404, 503],
1124
+ empty: false
1125
+ }, requestOptions),
1126
+ create: (input, requestOptions) => request({
1127
+ method: "POST",
1128
+ path: `/api/experimental/artifacts`,
1129
+ query: { location: input["location"] },
1130
+ body: {
1131
+ title: input["title"],
1132
+ files: input["files"],
1133
+ entry: input["entry"],
1134
+ provider: input["provider"],
1135
+ sessionID: input["sessionID"]
1136
+ },
1137
+ successStatus: 200,
1138
+ declaredStatuses: [400, 401, 403, 404, 503],
1139
+ empty: false
1140
+ }, requestOptions),
1141
+ get: (input, requestOptions) => request({
1142
+ method: "GET",
1143
+ path: `/api/experimental/artifacts/${encodeURIComponent(input.artifactID)}`,
1144
+ query: { location: input["location"] },
1145
+ successStatus: 200,
1146
+ declaredStatuses: [400, 401, 403, 404, 503],
1147
+ empty: false
1148
+ }, requestOptions),
1149
+ update: (input, requestOptions) => request({
1150
+ method: "PATCH",
1151
+ path: `/api/experimental/artifacts/${encodeURIComponent(input.artifactID)}`,
1152
+ query: { location: input["location"] },
1153
+ body: {
1154
+ title: input["title"],
1155
+ files: input["files"],
1156
+ entry: input["entry"],
1157
+ sessionID: input["sessionID"]
1158
+ },
1159
+ successStatus: 200,
1160
+ declaredStatuses: [400, 401, 403, 404, 503],
1161
+ empty: false
1162
+ }, requestOptions),
1163
+ delete: (input, requestOptions) => request({
1164
+ method: "DELETE",
1165
+ path: `/api/experimental/artifacts/${encodeURIComponent(input.artifactID)}`,
1166
+ query: { location: input["location"] },
1167
+ successStatus: 204,
1168
+ declaredStatuses: [400, 401, 403, 404, 503],
1169
+ empty: true
1170
+ }, requestOptions),
1171
+ view: (input, requestOptions) => request({
1172
+ method: "GET",
1173
+ path: `/api/experimental/artifacts/${encodeURIComponent(input.artifactID)}/view/${encodePath(input.path)}`,
1174
+ query: { location: input["location"] },
1175
+ successStatus: 200,
1176
+ declaredStatuses: [400, 401, 403, 404, 503],
1177
+ empty: false,
1178
+ binary: true
1179
+ }, requestOptions)
1180
+ },
1181
+ migration: {
1182
+ v1: {
1183
+ status: (requestOptions) => request({
1184
+ method: "GET",
1185
+ path: `/api/experimental/migration/v1`,
1186
+ successStatus: 200,
1187
+ declaredStatuses: [400, 401],
1188
+ empty: false
1189
+ }, requestOptions)
1190
+ }
1191
+ },
1192
+ usage: {
1193
+ limits: (input, requestOptions) => request({
1194
+ method: "GET",
1195
+ path: `/api/experimental/usage/limits`,
1196
+ query: { location: input?.["location"] },
1197
+ successStatus: 200,
1198
+ declaredStatuses: [400, 401, 404, 503],
1199
+ empty: false
1200
+ }, requestOptions)
1201
+ },
1202
+ config: {
1203
+ update: (input, requestOptions) => request({
1204
+ method: "PATCH",
1205
+ path: `/api/experimental/config`,
1206
+ body: { shell: input["shell"] },
1207
+ successStatus: 204,
1208
+ declaredStatuses: [400, 401, 404],
1209
+ empty: true
1210
+ }, requestOptions)
1211
+ }
1212
+ },
800
1213
  message: {
801
1214
  list: (input, requestOptions) => request({
802
1215
  method: "GET",
@@ -811,9 +1224,9 @@ function make3(options) {
811
1224
  list: (input, requestOptions) => request({
812
1225
  method: "GET",
813
1226
  path: `/api/model`,
814
- query: { location: input?.["location"] },
1227
+ query: { location: input?.["location"], types: input?.["types"] },
815
1228
  successStatus: 200,
816
- declaredStatuses: [400, 401, 503],
1229
+ declaredStatuses: [400, 401, 404, 503],
817
1230
  empty: false
818
1231
  }, requestOptions),
819
1232
  default: (input, requestOptions) => request({
@@ -821,27 +1234,17 @@ function make3(options) {
821
1234
  path: `/api/model/default`,
822
1235
  query: { location: input?.["location"] },
823
1236
  successStatus: 200,
824
- declaredStatuses: [400, 401, 503],
1237
+ declaredStatuses: [400, 401, 404, 503],
825
1238
  empty: false
826
1239
  }, requestOptions)
827
1240
  },
828
- generate: {
829
- text: (input, requestOptions) => request({
830
- method: "POST",
831
- path: `/api/experimental/generate`,
832
- body: { prompt: input["prompt"], model: input["model"] },
833
- successStatus: 200,
834
- declaredStatuses: [400, 401, 503],
835
- empty: false
836
- }, requestOptions).then((value) => value.data)
837
- },
838
1241
  provider: {
839
1242
  list: (input, requestOptions) => request({
840
1243
  method: "GET",
841
1244
  path: `/api/provider`,
842
1245
  query: { location: input?.["location"] },
843
1246
  successStatus: 200,
844
- declaredStatuses: [400, 401, 503],
1247
+ declaredStatuses: [400, 401, 404, 503],
845
1248
  empty: false
846
1249
  }, requestOptions),
847
1250
  get: (input, requestOptions) => request({
@@ -859,7 +1262,7 @@ function make3(options) {
859
1262
  path: `/api/integration`,
860
1263
  query: { location: input?.["location"] },
861
1264
  successStatus: 200,
862
- declaredStatuses: [400, 401],
1265
+ declaredStatuses: [400, 401, 404],
863
1266
  empty: false
864
1267
  }, requestOptions),
865
1268
  get: (input, requestOptions) => request({
@@ -870,17 +1273,6 @@ function make3(options) {
870
1273
  declaredStatuses: [400, 401, 404],
871
1274
  empty: false
872
1275
  }, requestOptions),
873
- wellknown: {
874
- add: (input, requestOptions) => request({
875
- method: "POST",
876
- path: `/api/experimental/integration/wellknown`,
877
- query: { location: input["location"] },
878
- body: { url: input["url"] },
879
- successStatus: 204,
880
- declaredStatuses: [400, 401],
881
- empty: true
882
- }, requestOptions)
883
- },
884
1276
  connect: {
885
1277
  key: (input, requestOptions) => request({
886
1278
  method: "POST",
@@ -890,6 +1282,15 @@ function make3(options) {
890
1282
  successStatus: 204,
891
1283
  declaredStatuses: [400, 401, 404],
892
1284
  empty: true
1285
+ }, requestOptions),
1286
+ external: (input, requestOptions) => request({
1287
+ method: "POST",
1288
+ path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/external`,
1289
+ query: { location: input["location"] },
1290
+ body: { methodID: input["methodID"], answer: input["answer"], label: input["label"] },
1291
+ successStatus: 204,
1292
+ declaredStatuses: [400, 401, 404],
1293
+ empty: true
893
1294
  }, requestOptions)
894
1295
  },
895
1296
  oauth: {
@@ -899,7 +1300,7 @@ function make3(options) {
899
1300
  query: { location: input["location"] },
900
1301
  body: { methodID: input["methodID"], answer: input["answer"], label: input["label"] },
901
1302
  successStatus: 200,
902
- declaredStatuses: [400, 401],
1303
+ declaredStatuses: [400, 401, 404],
903
1304
  empty: false
904
1305
  }, requestOptions),
905
1306
  status: (input, requestOptions) => request({
@@ -924,7 +1325,7 @@ function make3(options) {
924
1325
  path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/oauth/${encodeURIComponent(input.attemptID)}`,
925
1326
  query: { location: input["location"] },
926
1327
  successStatus: 204,
927
- declaredStatuses: [400, 401],
1328
+ declaredStatuses: [400, 401, 404],
928
1329
  empty: true
929
1330
  }, requestOptions)
930
1331
  },
@@ -946,57 +1347,24 @@ function make3(options) {
946
1347
  declaredStatuses: [400, 401, 404],
947
1348
  empty: false
948
1349
  }, requestOptions),
949
- cancel: (input, requestOptions) => request({
950
- method: "DELETE",
951
- path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/command/${encodeURIComponent(input.attemptID)}`,
952
- query: { location: input["location"] },
953
- successStatus: 204,
954
- declaredStatuses: [400, 401],
955
- empty: true
956
- }, requestOptions)
957
- }
958
- },
959
- mcp: {
960
- list: (input, requestOptions) => request({
961
- method: "GET",
962
- path: `/api/mcp`,
963
- query: { location: input?.["location"] },
964
- successStatus: 200,
965
- declaredStatuses: [400, 401],
966
- empty: false
967
- }, requestOptions),
968
- add: (input, requestOptions) => request({
969
- method: "PUT",
970
- path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
971
- query: { location: input["location"] },
972
- body: { config: input["config"] },
973
- successStatus: 204,
974
- declaredStatuses: [400, 401],
975
- empty: true
976
- }, requestOptions),
977
- remove: (input, requestOptions) => request({
978
- method: "DELETE",
979
- path: `/api/experimental/mcp/${encodeURIComponent(input.server)}`,
980
- query: { location: input["location"] },
981
- successStatus: 204,
982
- declaredStatuses: [400, 401, 404],
983
- empty: true
984
- }, requestOptions),
985
- connect: (input, requestOptions) => request({
986
- method: "POST",
987
- path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/connect`,
988
- query: { location: input["location"] },
989
- successStatus: 204,
990
- declaredStatuses: [400, 401, 404],
991
- empty: true
992
- }, requestOptions),
993
- disconnect: (input, requestOptions) => request({
994
- method: "POST",
995
- path: `/api/experimental/mcp/${encodeURIComponent(input.server)}/disconnect`,
996
- query: { location: input["location"] },
997
- successStatus: 204,
1350
+ cancel: (input, requestOptions) => request({
1351
+ method: "DELETE",
1352
+ path: `/api/integration/${encodeURIComponent(input.integrationID)}/connect/command/${encodeURIComponent(input.attemptID)}`,
1353
+ query: { location: input["location"] },
1354
+ successStatus: 204,
1355
+ declaredStatuses: [400, 401, 404],
1356
+ empty: true
1357
+ }, requestOptions)
1358
+ }
1359
+ },
1360
+ mcp: {
1361
+ list: (input, requestOptions) => request({
1362
+ method: "GET",
1363
+ path: `/api/mcp`,
1364
+ query: { location: input?.["location"] },
1365
+ successStatus: 200,
998
1366
  declaredStatuses: [400, 401, 404],
999
- empty: true
1367
+ empty: false
1000
1368
  }, requestOptions),
1001
1369
  resource: {
1002
1370
  catalog: (input, requestOptions) => request({
@@ -1004,12 +1372,27 @@ function make3(options) {
1004
1372
  path: `/api/mcp/resource`,
1005
1373
  query: { location: input?.["location"] },
1006
1374
  successStatus: 200,
1007
- declaredStatuses: [400, 401],
1375
+ declaredStatuses: [400, 401, 404],
1008
1376
  empty: false
1009
1377
  }, requestOptions)
1010
1378
  }
1011
1379
  },
1012
1380
  credential: {
1381
+ list: (requestOptions) => request({ method: "GET", path: `/api/credential`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions).then((value) => value.data),
1382
+ create: (input, requestOptions) => request({
1383
+ method: "POST",
1384
+ path: `/api/credential`,
1385
+ body: {
1386
+ id: input["id"],
1387
+ integrationID: input["integrationID"],
1388
+ label: input["label"],
1389
+ value: input["value"],
1390
+ activate: input["activate"]
1391
+ },
1392
+ successStatus: 200,
1393
+ declaredStatuses: [400, 401, 409],
1394
+ empty: false
1395
+ }, requestOptions).then((value) => value.data),
1013
1396
  update: (input, requestOptions) => request({
1014
1397
  method: "PATCH",
1015
1398
  path: `/api/credential/${encodeURIComponent(input.credentialID)}`,
@@ -1034,7 +1417,14 @@ function make3(options) {
1034
1417
  }, requestOptions)
1035
1418
  },
1036
1419
  project: {
1037
- list: (requestOptions) => request({ method: "GET", path: `/api/project`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
1420
+ list: (input, requestOptions) => request({
1421
+ method: "GET",
1422
+ path: `/api/project`,
1423
+ query: { archived: input?.["archived"] },
1424
+ successStatus: 200,
1425
+ declaredStatuses: [400, 401],
1426
+ empty: false
1427
+ }, requestOptions),
1038
1428
  update: (input, requestOptions) => request({
1039
1429
  method: "PATCH",
1040
1430
  path: `/api/project/${encodeURIComponent(input.projectID)}`,
@@ -1055,7 +1445,7 @@ function make3(options) {
1055
1445
  path: `/api/form`,
1056
1446
  query: { location: input?.["location"] },
1057
1447
  successStatus: 200,
1058
- declaredStatuses: [400, 401],
1448
+ declaredStatuses: [400, 401, 404],
1059
1449
  empty: false
1060
1450
  }, requestOptions)
1061
1451
  },
@@ -1066,7 +1456,7 @@ function make3(options) {
1066
1456
  path: `/api/permission/request`,
1067
1457
  query: { location: input?.["location"] },
1068
1458
  successStatus: 200,
1069
- declaredStatuses: [400, 401],
1459
+ declaredStatuses: [400, 401, 404],
1070
1460
  empty: false
1071
1461
  }, requestOptions)
1072
1462
  },
@@ -1076,7 +1466,15 @@ function make3(options) {
1076
1466
  path: `/api/permission/saved`,
1077
1467
  query: { projectID: input?.["projectID"] },
1078
1468
  successStatus: 200,
1079
- declaredStatuses: [400, 401],
1469
+ declaredStatuses: [400, 401, 404],
1470
+ empty: false
1471
+ }, requestOptions).then((value) => value.data),
1472
+ update: (input, requestOptions) => request({
1473
+ method: "PATCH",
1474
+ path: `/api/permission/saved/${encodeURIComponent(input.id)}`,
1475
+ body: { action: input["action"], resource: input["resource"] },
1476
+ successStatus: 200,
1477
+ declaredStatuses: [400, 401, 404, 409],
1080
1478
  empty: false
1081
1479
  }, requestOptions).then((value) => value.data),
1082
1480
  remove: (input, requestOptions) => request({
@@ -1141,7 +1539,7 @@ function make3(options) {
1141
1539
  path: `/api/fs/list`,
1142
1540
  query: { location: input?.["location"], path: input?.["path"] },
1143
1541
  successStatus: 200,
1144
- declaredStatuses: [400, 401],
1542
+ declaredStatuses: [400, 401, 404],
1145
1543
  empty: false
1146
1544
  }, requestOptions),
1147
1545
  find: (input, requestOptions) => request({
@@ -1149,18 +1547,8 @@ function make3(options) {
1149
1547
  path: `/api/fs/find`,
1150
1548
  query: { location: input["location"], query: input["query"], type: input["type"], limit: input["limit"] },
1151
1549
  successStatus: 200,
1152
- declaredStatuses: [400, 401],
1550
+ declaredStatuses: [400, 401, 404],
1153
1551
  empty: false
1154
- }, requestOptions),
1155
- write: (input, requestOptions) => request({
1156
- method: "POST",
1157
- path: `/api/experimental/fs/write`,
1158
- query: { location: input["location"], path: input["path"] },
1159
- body: input["payload"],
1160
- successStatus: 200,
1161
- declaredStatuses: [400, 401],
1162
- empty: false,
1163
- binaryBody: true
1164
1552
  }, requestOptions)
1165
1553
  },
1166
1554
  command: {
@@ -1169,7 +1557,7 @@ function make3(options) {
1169
1557
  path: `/api/command`,
1170
1558
  query: { location: input?.["location"] },
1171
1559
  successStatus: 200,
1172
- declaredStatuses: [400, 401],
1560
+ declaredStatuses: [400, 401, 404],
1173
1561
  empty: false
1174
1562
  }, requestOptions)
1175
1563
  },
@@ -1179,7 +1567,7 @@ function make3(options) {
1179
1567
  path: `/api/skill`,
1180
1568
  query: { location: input?.["location"] },
1181
1569
  successStatus: 200,
1182
- declaredStatuses: [400, 401],
1570
+ declaredStatuses: [400, 401, 404],
1183
1571
  empty: false
1184
1572
  }, requestOptions)
1185
1573
  },
@@ -1190,12 +1578,19 @@ function make3(options) {
1190
1578
  query: { location: input["location"] },
1191
1579
  body: { input: input["input"] },
1192
1580
  successStatus: 200,
1193
- declaredStatuses: [400, 401, 500],
1581
+ declaredStatuses: [400, 401, 404, 500],
1194
1582
  empty: false
1195
1583
  }, requestOptions)
1196
1584
  },
1197
1585
  event: {
1198
- subscribe: (requestOptions) => sse({ method: "GET", path: `/api/event`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions)
1586
+ subscribe: (input, requestOptions) => sse({
1587
+ method: "GET",
1588
+ path: `/api/event`,
1589
+ query: { types: input?.["types"] },
1590
+ successStatus: 200,
1591
+ declaredStatuses: [400, 401],
1592
+ empty: false
1593
+ }, requestOptions)
1199
1594
  },
1200
1595
  pty: {
1201
1596
  list: (input, requestOptions) => request({
@@ -1203,7 +1598,7 @@ function make3(options) {
1203
1598
  path: `/api/pty`,
1204
1599
  query: { location: input?.["location"] },
1205
1600
  successStatus: 200,
1206
- declaredStatuses: [400, 401],
1601
+ declaredStatuses: [400, 401, 404],
1207
1602
  empty: false
1208
1603
  }, requestOptions),
1209
1604
  create: (input, requestOptions) => request({
@@ -1218,7 +1613,7 @@ function make3(options) {
1218
1613
  env: input?.["env"]
1219
1614
  },
1220
1615
  successStatus: 200,
1221
- declaredStatuses: [400, 401],
1616
+ declaredStatuses: [400, 401, 404],
1222
1617
  empty: false
1223
1618
  }, requestOptions),
1224
1619
  get: (input, requestOptions) => request({
@@ -1258,98 +1653,13 @@ function make3(options) {
1258
1653
  }, requestOptions)
1259
1654
  }
1260
1655
  },
1261
- experimental: {
1262
- persistentPty: {
1263
- read: (input, requestOptions) => request({
1264
- method: "GET",
1265
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal/read`,
1266
- query: { lines: input["lines"] },
1267
- successStatus: 200,
1268
- declaredStatuses: [400, 401, 503],
1269
- empty: false
1270
- }, requestOptions).then((value) => value.data),
1271
- list: (input, requestOptions) => request({
1272
- method: "GET",
1273
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
1274
- successStatus: 200,
1275
- declaredStatuses: [400, 401, 503],
1276
- empty: false
1277
- }, requestOptions).then((value) => value.data),
1278
- create: (input, requestOptions) => request({
1279
- method: "POST",
1280
- path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/terminal`,
1281
- body: {
1282
- command: input["command"],
1283
- args: input["args"],
1284
- cwd: input["cwd"],
1285
- title: input["title"],
1286
- env: input["env"],
1287
- size: input["size"]
1288
- },
1289
- successStatus: 200,
1290
- declaredStatuses: [400, 401, 503],
1291
- empty: false
1292
- }, requestOptions).then((value) => value.data),
1293
- shutdown: (requestOptions) => request({
1294
- method: "POST",
1295
- path: `/api/experimental/persistent-pty/shutdown`,
1296
- successStatus: 204,
1297
- declaredStatuses: [400, 401, 503],
1298
- empty: true
1299
- }, requestOptions),
1300
- handoff: (requestOptions) => request({
1301
- method: "POST",
1302
- path: `/api/experimental/persistent-pty/handoff`,
1303
- successStatus: 200,
1304
- declaredStatuses: [400, 401, 503],
1305
- empty: false
1306
- }, requestOptions),
1307
- get: (input, requestOptions) => request({
1308
- method: "GET",
1309
- path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1310
- successStatus: 200,
1311
- declaredStatuses: [400, 401, 404, 503],
1312
- empty: false
1313
- }, requestOptions).then((value) => value.data),
1314
- update: (input, requestOptions) => request({
1315
- method: "PUT",
1316
- path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1317
- body: { attachmentID: input["attachmentID"], size: input["size"] },
1318
- successStatus: 200,
1319
- declaredStatuses: [400, 401, 404, 503],
1320
- empty: false
1321
- }, requestOptions).then((value) => value.data),
1322
- snapshot: (input, requestOptions) => request({
1323
- method: "GET",
1324
- path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/snapshot`,
1325
- successStatus: 200,
1326
- declaredStatuses: [400, 401, 404, 503],
1327
- empty: false
1328
- }, requestOptions).then((value) => value.data),
1329
- remove: (input, requestOptions) => request({
1330
- method: "DELETE",
1331
- path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}`,
1332
- successStatus: 204,
1333
- declaredStatuses: [400, 401, 404, 503],
1334
- empty: true
1335
- }, requestOptions),
1336
- connectToken: (input, requestOptions) => request({
1337
- method: "POST",
1338
- path: `/api/experimental/persistent-pty/${encodeURIComponent(input.ptyID)}/connect-token`,
1339
- headers: { "x-opencode-ticket": input["x-opencode-ticket"] },
1340
- successStatus: 200,
1341
- declaredStatuses: [400, 401, 403, 404, 503],
1342
- empty: false
1343
- }, requestOptions).then((value) => value.data)
1344
- }
1345
- },
1346
1656
  shell: {
1347
1657
  list: (input, requestOptions) => request({
1348
1658
  method: "GET",
1349
1659
  path: `/api/shell`,
1350
1660
  query: { location: input?.["location"] },
1351
1661
  successStatus: 200,
1352
- declaredStatuses: [400, 401],
1662
+ declaredStatuses: [400, 401, 404],
1353
1663
  empty: false
1354
1664
  }, requestOptions),
1355
1665
  create: (input, requestOptions) => request({
@@ -1363,7 +1673,7 @@ function make3(options) {
1363
1673
  metadata: input["metadata"]
1364
1674
  },
1365
1675
  successStatus: 200,
1366
- declaredStatuses: [400, 401],
1676
+ declaredStatuses: [400, 401, 404],
1367
1677
  empty: false
1368
1678
  }, requestOptions),
1369
1679
  get: (input, requestOptions) => request({
@@ -1387,7 +1697,7 @@ function make3(options) {
1387
1697
  path: `/api/shell/${encodeURIComponent(input.id)}`,
1388
1698
  query: { location: input["location"] },
1389
1699
  successStatus: 204,
1390
- declaredStatuses: [400, 401],
1700
+ declaredStatuses: [400, 401, 404],
1391
1701
  empty: true
1392
1702
  }, requestOptions)
1393
1703
  },
@@ -1397,7 +1707,7 @@ function make3(options) {
1397
1707
  path: `/api/reference`,
1398
1708
  query: { location: input?.["location"] },
1399
1709
  successStatus: 200,
1400
- declaredStatuses: [400, 401],
1710
+ declaredStatuses: [400, 401, 404],
1401
1711
  empty: false
1402
1712
  }, requestOptions)
1403
1713
  },
@@ -1442,12 +1752,20 @@ function make3(options) {
1442
1752
  }, requestOptions)
1443
1753
  },
1444
1754
  vcs: {
1755
+ init: (input, requestOptions) => request({
1756
+ method: "POST",
1757
+ path: `/api/vcs/init`,
1758
+ query: { location: input?.["location"], provider: input?.["provider"] },
1759
+ successStatus: 204,
1760
+ declaredStatuses: [400, 401, 404, 409, 501, 503],
1761
+ empty: true
1762
+ }, requestOptions),
1445
1763
  get: (input, requestOptions) => request({
1446
1764
  method: "GET",
1447
1765
  path: `/api/vcs`,
1448
1766
  query: { location: input?.["location"] },
1449
1767
  successStatus: 200,
1450
- declaredStatuses: [400, 401],
1768
+ declaredStatuses: [400, 401, 404],
1451
1769
  empty: false
1452
1770
  }, requestOptions),
1453
1771
  base: (input, requestOptions) => request({
@@ -1455,7 +1773,7 @@ function make3(options) {
1455
1773
  path: `/api/vcs/base`,
1456
1774
  query: { location: input?.["location"] },
1457
1775
  successStatus: 200,
1458
- declaredStatuses: [400, 401, 503],
1776
+ declaredStatuses: [400, 401, 404, 503],
1459
1777
  empty: false
1460
1778
  }, requestOptions),
1461
1779
  status: (input, requestOptions) => request({
@@ -1463,7 +1781,7 @@ function make3(options) {
1463
1781
  path: `/api/vcs/status`,
1464
1782
  query: { location: input?.["location"] },
1465
1783
  successStatus: 200,
1466
- declaredStatuses: [400, 401],
1784
+ declaredStatuses: [400, 401, 404],
1467
1785
  empty: false
1468
1786
  }, requestOptions),
1469
1787
  branch: {
@@ -1472,20 +1790,34 @@ function make3(options) {
1472
1790
  path: `/api/vcs/branch`,
1473
1791
  query: { location: input?.["location"], search: input?.["search"], limit: input?.["limit"] },
1474
1792
  successStatus: 200,
1475
- declaredStatuses: [400, 401],
1793
+ declaredStatuses: [400, 401, 404],
1476
1794
  empty: false
1477
1795
  }, requestOptions)
1478
1796
  },
1479
1797
  diff: (input, requestOptions) => request({
1480
1798
  method: "GET",
1481
1799
  path: `/api/vcs/diff`,
1482
- query: { location: input["location"], mode: input["mode"], base: input["base"], context: input["context"] },
1800
+ query: {
1801
+ location: input["location"],
1802
+ mode: input["mode"],
1803
+ base: input["base"],
1804
+ context: input["context"],
1805
+ untracked: input["untracked"]
1806
+ },
1483
1807
  successStatus: 200,
1484
- declaredStatuses: [400, 401, 503],
1808
+ declaredStatuses: [400, 401, 404, 503],
1485
1809
  empty: false
1486
1810
  }, requestOptions)
1487
1811
  },
1488
1812
  debug: {
1813
+ heapDump: (input, requestOptions) => request({
1814
+ method: "POST",
1815
+ path: `/api/debug/heap-dump`,
1816
+ query: { directory: input?.["directory"] },
1817
+ successStatus: 200,
1818
+ declaredStatuses: [400, 401, 500],
1819
+ empty: false
1820
+ }, requestOptions),
1489
1821
  location: {
1490
1822
  list: (requestOptions) => request({
1491
1823
  method: "GET",
@@ -1504,24 +1836,13 @@ function make3(options) {
1504
1836
  }, requestOptions)
1505
1837
  }
1506
1838
  },
1507
- migration: {
1508
- v1: {
1509
- status: (requestOptions) => request({
1510
- method: "GET",
1511
- path: `/api/experimental/migration/v1`,
1512
- successStatus: 200,
1513
- declaredStatuses: [400, 401],
1514
- empty: false
1515
- }, requestOptions)
1516
- }
1517
- },
1518
1839
  websearch: {
1519
1840
  providers: (input, requestOptions) => request({
1520
1841
  method: "GET",
1521
1842
  path: `/api/websearch/provider`,
1522
1843
  query: { location: input?.["location"] },
1523
1844
  successStatus: 200,
1524
- declaredStatuses: [400, 401, 503],
1845
+ declaredStatuses: [400, 401, 404, 503],
1525
1846
  empty: false
1526
1847
  }, requestOptions),
1527
1848
  query: (input, requestOptions) => request({
@@ -1530,7 +1851,7 @@ function make3(options) {
1530
1851
  query: { location: input["location"] },
1531
1852
  body: { query: input["query"], providerID: input["providerID"] },
1532
1853
  successStatus: 200,
1533
- declaredStatuses: [400, 401, 503],
1854
+ declaredStatuses: [400, 401, 404, 503],
1534
1855
  empty: false
1535
1856
  }, requestOptions)
1536
1857
  },
@@ -1540,20 +1861,80 @@ function make3(options) {
1540
1861
  path: `/api/config`,
1541
1862
  query: { location: input?.["location"] },
1542
1863
  successStatus: 200,
1543
- declaredStatuses: [400, 401],
1864
+ declaredStatuses: [400, 401, 404],
1544
1865
  empty: false
1545
1866
  }, requestOptions),
1546
- shells: (requestOptions) => request({ method: "GET", path: `/api/config/shell`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
1547
- update: (input, requestOptions) => request({
1548
- method: "PATCH",
1549
- path: `/api/experimental/config`,
1550
- body: { shell: input["shell"] },
1551
- successStatus: 204,
1552
- declaredStatuses: [400, 401],
1553
- empty: true
1867
+ shells: (requestOptions) => request({
1868
+ method: "GET",
1869
+ path: `/api/config/shell`,
1870
+ successStatus: 200,
1871
+ declaredStatuses: [400, 401, 404],
1872
+ empty: false
1554
1873
  }, requestOptions)
1555
1874
  }
1556
1875
  };
1876
+ return {
1877
+ ...client,
1878
+ session: {
1879
+ ...client.session,
1880
+ stats: client.experimental.session.stats,
1881
+ import: client.experimental.session.import,
1882
+ export: client.experimental.session.export,
1883
+ skill: client.experimental.session.skill,
1884
+ wait: client.experimental.session.wait,
1885
+ instructions: {
1886
+ entry: {
1887
+ list: client.experimental.session.instructions.entry.list,
1888
+ put: client.experimental.session.instructions.entry.put,
1889
+ remove: client.experimental.session.instructions.entry.remove
1890
+ }
1891
+ },
1892
+ log: client.experimental.session.log
1893
+ },
1894
+ generate: {
1895
+ text: client.experimental.generate.text,
1896
+ image: client.experimental.generate.image,
1897
+ decisions: client.experimental.generate.decisions
1898
+ },
1899
+ voice: {
1900
+ models: client.experimental.voice.models,
1901
+ session: client.experimental.voice.session
1902
+ },
1903
+ integration: {
1904
+ ...client.integration,
1905
+ wellknown: {
1906
+ add: client.experimental.integration.wellknown.add
1907
+ }
1908
+ },
1909
+ mcp: {
1910
+ ...client.mcp,
1911
+ add: client.experimental.mcp.add,
1912
+ remove: client.experimental.mcp.remove,
1913
+ connect: client.experimental.mcp.connect,
1914
+ disconnect: client.experimental.mcp.disconnect,
1915
+ client: {
1916
+ token: client.experimental.mcp.client.token
1917
+ }
1918
+ },
1919
+ file: {
1920
+ ...client.file,
1921
+ write: client.experimental.file.write,
1922
+ watch: client.experimental.file.watch,
1923
+ unwatch: client.experimental.file.unwatch
1924
+ },
1925
+ migration: {
1926
+ v1: {
1927
+ status: client.experimental.migration.v1.status
1928
+ }
1929
+ },
1930
+ usage: {
1931
+ limits: client.experimental.usage.limits
1932
+ },
1933
+ config: {
1934
+ ...client.config,
1935
+ update: client.experimental.config.update
1936
+ }
1937
+ };
1557
1938
  }
1558
1939
  function encodePath(value) {
1559
1940
  return value.split("/").map(encodeURIComponent).join("/");
@@ -1608,11 +1989,11 @@ function isContentType(response, expected) {
1608
1989
  return response.headers.get("content-type")?.split(";", 1)[0]?.trim().toLowerCase() === expected;
1609
1990
  }
1610
1991
 
1611
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-4tveyqeh.js
1992
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-sdjh9vmn.js
1612
1993
  var isRpcError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "RpcError";
1613
1994
  var isRpcInternalError2 = (value) => typeof value === "object" && value !== null && ("_tag" in value) && value["_tag"] === "RpcInternalError";
1614
1995
 
1615
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-1tbj6z39.js
1996
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-xqwq6bgr.js
1616
1997
  function makeRpc2(raw, events) {
1617
1998
  return (definition) => {
1618
1999
  const subscribe = (name, options) => {
@@ -1687,7 +2068,7 @@ function eventType(definition, name) {
1687
2068
  return `rpc.${definition.id}.${name}`;
1688
2069
  }
1689
2070
 
1690
- // ../../node_modules/.bun/@opencode+client@2.0.19+43902b222b0d7d3e/node_modules/@opencode/client/dist/chunks/rpc-runtime-gc472t4a.js
2071
+ // ../../node_modules/.bun/@opencode+client@2.2.5+fb36e9c73ec0eaeb/node_modules/@opencode/client/dist/chunks/rpc-runtime-wbnz2gjn.js
1691
2072
  var exports_client = {};
1692
2073
  __export(exports_client, {
1693
2074
  OpenCode: () => exports_client,
@@ -1695,7 +2076,7 @@ __export(exports_client, {
1695
2076
  });
1696
2077
  function make2(options) {
1697
2078
  const raw = make3(options);
1698
- const events = make7((signal, onActivity) => raw.event.subscribe({ signal, onActivity }));
2079
+ const events = make7((signal, onActivity) => raw.event.subscribe(undefined, { signal, onActivity }));
1699
2080
  return {
1700
2081
  ...raw,
1701
2082
  rpc: Object.assign(makeRpc2(raw, events), raw.rpc),
@@ -1773,11 +2154,10 @@ function asStringArray(value) {
1773
2154
  function parseModelRef(model) {
1774
2155
  if (!model)
1775
2156
  return;
1776
- const separator = model.indexOf("/");
1777
- if (separator <= 0 || separator === model.length - 1) {
1778
- throw new Error('model must use the "provider/model" format');
1779
- }
1780
- return { providerID: model.slice(0, separator), modelID: model.slice(separator + 1) };
2157
+ const match = /^([^/#]+)\/([^#]+)(?:#([^#]+))?$/.exec(model);
2158
+ if (!match)
2159
+ throw new Error('model must use the "provider/model" format with an optional #variant');
2160
+ return { providerID: match[1], modelID: match[2], ...match[3] ? { variant: match[3] } : {} };
1781
2161
  }
1782
2162
  function permissionTitle(permission, patterns) {
1783
2163
  return patterns.length > 0 ? `${permission}: ${patterns.join(", ")}` : permission;
@@ -1803,29 +2183,51 @@ function truncateToolOutput(value) {
1803
2183
  }
1804
2184
 
1805
2185
  // ../agent-runtime/src/v2.ts
2186
+ var MODEL_READY_MS = 30000;
1806
2187
  function createV2Runtime(target) {
1807
2188
  const client = createOpencodeClient(target);
1808
2189
  const options = () => requestTimeout(target.signal);
1809
2190
  async function switchSessionOptions(sessionID, agent, model) {
1810
2191
  const modelRef = parseModelRef(model);
1811
2192
  if (modelRef) {
1812
- await call(client.session.switchModel({ sessionID, model: { providerID: modelRef.providerID, id: modelRef.modelID } }, options()));
2193
+ await call(client.session.switchModel({
2194
+ sessionID,
2195
+ model: {
2196
+ providerID: modelRef.providerID,
2197
+ id: modelRef.modelID,
2198
+ variant: modelRef.variant
2199
+ }
2200
+ }, options()));
1813
2201
  }
1814
2202
  if (agent)
1815
2203
  await call(client.session.switchAgent({ sessionID, agent }, options()));
1816
2204
  }
2205
+ async function modelReady(model) {
2206
+ const deadline = Date.now() + MODEL_READY_MS;
2207
+ for (;; ) {
2208
+ const { data } = await call(client.model.list({ location: { directory: target.directory } }, options()));
2209
+ if (data.some((entry) => entry.providerID === model.providerID && entry.id === model.modelID))
2210
+ return;
2211
+ if (Date.now() >= deadline)
2212
+ throw new Error(`OpenCode does not offer ${model.providerID}/${model.modelID}; check the model ID and its credential`);
2213
+ await new Promise((resolve) => setTimeout(resolve, 500));
2214
+ }
2215
+ }
1817
2216
  return {
1818
2217
  async createSession(input) {
1819
2218
  const modelRef = parseModelRef(input.model);
1820
2219
  const created = await call(client.session.create({
1821
2220
  title: input.title,
1822
2221
  agent: input.agent,
1823
- model: modelRef ? { providerID: modelRef.providerID, id: modelRef.modelID } : undefined,
2222
+ model: modelRef ? { providerID: modelRef.providerID, id: modelRef.modelID, variant: modelRef.variant } : undefined,
1824
2223
  location: { directory: target.directory }
1825
2224
  }, options()));
1826
2225
  return { id: created.id, title: created.title ?? input.title ?? "Agent run" };
1827
2226
  },
1828
2227
  async prompt(input) {
2228
+ const modelRef = parseModelRef(input.model);
2229
+ if (modelRef)
2230
+ await modelReady(modelRef);
1829
2231
  await switchSessionOptions(input.sessionId, input.agent, input.model);
1830
2232
  await call(client.session.prompt({
1831
2233
  sessionID: input.sessionId,
@@ -2542,9 +2944,29 @@ function directRunOperations(assertWorkspace, fetchImpl) {
2542
2944
  };
2543
2945
  }
2544
2946
 
2545
- // src/direct/ascii.ts
2947
+ // src/direct/boat.ts
2546
2948
  import { BoxApi, Configuration, waitUntilReady } from "@asciidev/box-sdk";
2547
2949
 
2950
+ // ../agent-runtime/src/opencode-config.ts
2951
+ function buildOpencodeConfig(input, extraPlugins = []) {
2952
+ const config = { ...input };
2953
+ const configured = Array.isArray(config.plugins) ? config.plugins : [];
2954
+ const names = new Set(configured.map((entry) => typeof entry === "string" ? entry : entry?.package));
2955
+ const plugins = [...configured, ...extraPlugins.filter((name) => !names.has(name))];
2956
+ delete config.theme;
2957
+ return {
2958
+ $schema: "https://opencode.ai/config.json",
2959
+ ...config,
2960
+ ...plugins.length ? { plugins } : {}
2961
+ };
2962
+ }
2963
+ function buildOpencodeCliConfig(input) {
2964
+ return {
2965
+ $schema: "https://opencode.ai/v2/cli.json",
2966
+ theme: { name: typeof input?.theme === "string" ? input.theme : "opencode" }
2967
+ };
2968
+ }
2969
+
2548
2970
  // ../agent-runtime/src/github-auth.ts
2549
2971
  var GITHUB_AUTH_PATH = 'export PATH="$HOME/.gitterm/bin:$PATH"';
2550
2972
  var GITHUB_CLI_INSTRUCTIONS = `GitHub CLI authentication:
@@ -3114,22 +3536,13 @@ function buildDirectProvisioningPlan(input) {
3114
3536
  value: directModelAuth(credential)
3115
3537
  });
3116
3538
  }
3117
- const configuredPlugins = Array.isArray(input.opencode?.config?.plugin) ? input.opencode.config.plugin.filter((plugin) => typeof plugin === "string") : [];
3118
- const plugins = [...new Set([...configuredPlugins, ...input.opencode?.plugins ?? []])];
3119
3539
  const environmentVariables = { ...input.environmentVariables };
3120
3540
  delete environmentVariables.OPENCODE_SERVER_USERNAME;
3121
3541
  delete environmentVariables.GITTERM_DIRECT_PROVIDER;
3122
- const userPermission = input.opencode?.config?.permission && typeof input.opencode.config.permission === "object" && !Array.isArray(input.opencode.config.permission) ? input.opencode.config.permission : {};
3123
3542
  const config = {
3124
- $schema: "https://opencode.ai/config.json",
3125
- ...input.opencode?.config,
3543
+ ...buildOpencodeConfig(input.opencode?.config, input.opencode?.plugins),
3126
3544
  ...input.models?.default ? { model: input.models.default } : {},
3127
- username: "Gitterm direct",
3128
- permission: {
3129
- external_directory: "allow",
3130
- ...userPermission
3131
- },
3132
- ...plugins.length ? { plugin: plugins } : {}
3545
+ username: "Gitterm direct"
3133
3546
  };
3134
3547
  const github = githubAuthProvisioning(input.repo ? {
3135
3548
  url: input.repo,
@@ -3144,6 +3557,10 @@ function buildDirectProvisioningPlan(input) {
3144
3557
  path: "~/.config/opencode/opencode.json",
3145
3558
  contentBase64: base64(JSON.stringify(config))
3146
3559
  },
3560
+ {
3561
+ path: "~/.config/opencode/cli.json",
3562
+ contentBase64: base64(JSON.stringify(buildOpencodeCliConfig(input.opencode?.config)))
3563
+ },
3147
3564
  {
3148
3565
  path: "~/.config/opencode/AGENTS.md",
3149
3566
  contentBase64: base64(buildDirectGittermInstructions(input.additionalAgentInstructions))
@@ -3177,7 +3594,7 @@ function buildDirectProvisioningPlan(input) {
3177
3594
  files,
3178
3595
  environmentVariables: {
3179
3596
  ...environmentVariables,
3180
- OPENCODE_SERVER_PASSWORD: input.password
3597
+ OPENCODE_PASSWORD: input.password
3181
3598
  },
3182
3599
  command: github ? githubAuthCommand(DIRECT_OPENCODE_COMMAND) : DIRECT_OPENCODE_COMMAND,
3183
3600
  port: DIRECT_OPENCODE_PORT
@@ -3288,7 +3705,7 @@ async function waitForDirectRuntime(runtime, timeoutMs = 60000) {
3288
3705
  throw new Error("Timed out waiting for the OpenCode runtime");
3289
3706
  }
3290
3707
 
3291
- // src/direct/ascii.ts
3708
+ // src/direct/boat.ts
3292
3709
  var HOME = "/home/user";
3293
3710
  function serializeHandle(handle) {
3294
3711
  return JSON.stringify(handle);
@@ -3301,12 +3718,12 @@ function parseHandle(value) {
3301
3718
  }
3302
3719
  return handle;
3303
3720
  } catch {
3304
- throw new Error("Invalid Ascii Box direct workspace handle");
3721
+ throw new Error("Invalid Boat direct workspace handle");
3305
3722
  }
3306
3723
  }
3307
- function createAsciiDirectProvider(config) {
3724
+ function createBoatDirectProvider(config) {
3308
3725
  if (!config.apiKey.trim())
3309
- throw new Error("Ascii apiKey is required");
3726
+ throw new Error("Boat apiKey is required");
3310
3727
  const client = new BoxApi(new Configuration({
3311
3728
  basePath: "https://ascii.dev/api/box/v1",
3312
3729
  accessToken: config.apiKey
@@ -3317,10 +3734,10 @@ function createAsciiDirectProvider(config) {
3317
3734
  commandRequest: { command, cwd, timeoutSeconds }
3318
3735
  });
3319
3736
  if (result.type !== "command.finished") {
3320
- throw new Error("Ascii Box command did not finish");
3737
+ throw new Error("Boat command did not finish");
3321
3738
  }
3322
3739
  if (!result.success || result.exitCode !== 0) {
3323
- throw new Error(`Ascii Box command failed: ${result.stderr || result.stdout}`);
3740
+ throw new Error(`Boat command failed: ${result.stderr || result.stdout}`);
3324
3741
  }
3325
3742
  return result.stdout;
3326
3743
  }
@@ -3332,7 +3749,7 @@ function createAsciiDirectProvider(config) {
3332
3749
  const output = await runCommand(handle.boxId, `host url ${handle.serve.port}`);
3333
3750
  const value = output.match(/https:\/\/\S+/)?.[0];
3334
3751
  if (!value) {
3335
- throw new Error(`Ascii Box did not return a hosted URL for port ${handle.serve.port}`);
3752
+ throw new Error(`Boat did not return a hosted URL for port ${handle.serve.port}`);
3336
3753
  }
3337
3754
  const hosted = new URL(value);
3338
3755
  hosted.search = "";
@@ -3344,11 +3761,11 @@ function createAsciiDirectProvider(config) {
3344
3761
  headers: { Authorization: `Bearer ${config.apiKey}`, "X-Ascii-Confirm-Delete": boxId }
3345
3762
  });
3346
3763
  if (!response.ok && response.status !== 404) {
3347
- throw new Error(`Ascii Box deletion failed (${response.status})`);
3764
+ throw new Error(`Boat deletion failed (${response.status})`);
3348
3765
  }
3349
3766
  }
3350
3767
  return {
3351
- name: "ascii",
3768
+ name: "boat",
3352
3769
  capabilities: {
3353
3770
  persistence: "supported",
3354
3771
  recommendedLifecycle: "ephemeral",
@@ -4504,8 +4921,8 @@ function resolveProvider(provider) {
4504
4921
  if ("create" in provider)
4505
4922
  return provider;
4506
4923
  switch (provider.type) {
4507
- case "ascii":
4508
- return createAsciiDirectProvider(provider);
4924
+ case "boat":
4925
+ return createBoatDirectProvider(provider);
4509
4926
  case "daytona":
4510
4927
  return createDaytonaDirectProvider(provider);
4511
4928
  case "e2b":
@@ -4543,7 +4960,7 @@ function validateEnvironmentVariables(values) {
4543
4960
  if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) {
4544
4961
  throw new Error(`Invalid environment variable name: ${key}`);
4545
4962
  }
4546
- if (key === "OPENCODE_SERVER_PASSWORD" || key === "OPENCODE_SERVER_USERNAME" || key === "GITTERM_DIRECT_PROVIDER") {
4963
+ if (key === "OPENCODE_PASSWORD" || key === "OPENCODE_SERVER_PASSWORD" || key === "OPENCODE_SERVER_USERNAME" || key === "GITTERM_DIRECT_PROVIDER") {
4547
4964
  throw new Error(`Environment variable ${key} is managed by Gitterm`);
4548
4965
  }
4549
4966
  }
@@ -4922,7 +5339,7 @@ ${status.log}` : ""}`);
4922
5339
  };
4923
5340
  }
4924
5341
  export {
4925
- createAsciiDirectProvider,
5342
+ createBoatDirectProvider,
4926
5343
  createDaytonaDirectProvider,
4927
5344
  createDirectGittermClient,
4928
5345
  createE2BDirectProvider,