@enactprotocol/mcp-server 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +341 -267
  2. package/dist/index.js.bak +341 -267
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -7496,7 +7496,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
7496
7496
  if (!(this instanceof SonicBoom)) {
7497
7497
  return new SonicBoom(opts);
7498
7498
  }
7499
- let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {};
7499
+ let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir: mkdir2, retryEAGAIN, fsync, contentMode, mode } = opts || {};
7500
7500
  fd = fd || dest;
7501
7501
  this._len = 0;
7502
7502
  this.fd = -1;
@@ -7521,7 +7521,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
7521
7521
  this.append = append || false;
7522
7522
  this.mode = mode;
7523
7523
  this.retryEAGAIN = retryEAGAIN || (() => true);
7524
- this.mkdir = mkdir || false;
7524
+ this.mkdir = mkdir2 || false;
7525
7525
  let fsWriteSync;
7526
7526
  let fsWrite;
7527
7527
  if (contentMode === kContentModeBuffer) {
@@ -8213,7 +8213,7 @@ var require_thread_stream = __commonJS((exports, module) => {
8213
8213
  var { version } = require_package();
8214
8214
  var { EventEmitter } = __require("events");
8215
8215
  var { Worker } = __require("worker_threads");
8216
- var { join } = __require("path");
8216
+ var { join: join2 } = __require("path");
8217
8217
  var { pathToFileURL } = __require("url");
8218
8218
  var { wait } = require_wait();
8219
8219
  var {
@@ -8249,7 +8249,7 @@ var require_thread_stream = __commonJS((exports, module) => {
8249
8249
  function createWorker(stream, opts) {
8250
8250
  const { filename, workerData } = opts;
8251
8251
  const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
8252
- const toExecute = bundlerOverrides["thread-stream-worker"] || join(__dirname, "lib", "worker.js");
8252
+ const toExecute = bundlerOverrides["thread-stream-worker"] || join2(__dirname, "lib", "worker.js");
8253
8253
  const worker = new Worker(toExecute, {
8254
8254
  ...opts.workerOpts,
8255
8255
  trackUnmanagedFds: false,
@@ -8633,7 +8633,7 @@ var require_transport = __commonJS((exports, module) => {
8633
8633
  var __dirname = "/Users/keithgroves/projects/enact/enact-cli/node_modules/pino/lib";
8634
8634
  var { createRequire: createRequire2 } = __require("module");
8635
8635
  var getCallers = require_caller();
8636
- var { join, isAbsolute, sep } = __require("node:path");
8636
+ var { join: join2, isAbsolute, sep } = __require("node:path");
8637
8637
  var sleep = require_atomic_sleep();
8638
8638
  var onExit = require_on_exit_leak_free();
8639
8639
  var ThreadStream = require_thread_stream();
@@ -8696,7 +8696,7 @@ var require_transport = __commonJS((exports, module) => {
8696
8696
  throw new Error("only one of target or targets can be specified");
8697
8697
  }
8698
8698
  if (targets) {
8699
- target = bundlerOverrides["pino-worker"] || join(__dirname, "worker.js");
8699
+ target = bundlerOverrides["pino-worker"] || join2(__dirname, "worker.js");
8700
8700
  options.targets = targets.filter((dest) => dest.target).map((dest) => {
8701
8701
  return {
8702
8702
  ...dest,
@@ -8713,7 +8713,7 @@ var require_transport = __commonJS((exports, module) => {
8713
8713
  });
8714
8714
  });
8715
8715
  } else if (pipeline2) {
8716
- target = bundlerOverrides["pino-worker"] || join(__dirname, "worker.js");
8716
+ target = bundlerOverrides["pino-worker"] || join2(__dirname, "worker.js");
8717
8717
  options.pipelines = [pipeline2.map((dest) => {
8718
8718
  return {
8719
8719
  ...dest,
@@ -8735,7 +8735,7 @@ var require_transport = __commonJS((exports, module) => {
8735
8735
  return origin;
8736
8736
  }
8737
8737
  if (origin === "pino/file") {
8738
- return join(__dirname, "..", "file.js");
8738
+ return join2(__dirname, "..", "file.js");
8739
8739
  }
8740
8740
  let fixTarget2;
8741
8741
  for (const filePath of callers) {
@@ -9638,7 +9638,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
9638
9638
  return circularValue;
9639
9639
  }
9640
9640
  let res = "";
9641
- let join = ",";
9641
+ let join2 = ",";
9642
9642
  const originalIndentation = indentation;
9643
9643
  if (Array.isArray(value)) {
9644
9644
  if (value.length === 0) {
@@ -9652,7 +9652,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
9652
9652
  indentation += spacer;
9653
9653
  res += `
9654
9654
  ${indentation}`;
9655
- join = `,
9655
+ join2 = `,
9656
9656
  ${indentation}`;
9657
9657
  }
9658
9658
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9660,13 +9660,13 @@ ${indentation}`;
9660
9660
  for (;i < maximumValuesToStringify - 1; i++) {
9661
9661
  const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9662
9662
  res += tmp2 !== undefined ? tmp2 : "null";
9663
- res += join;
9663
+ res += join2;
9664
9664
  }
9665
9665
  const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9666
9666
  res += tmp !== undefined ? tmp : "null";
9667
9667
  if (value.length - 1 > maximumBreadth) {
9668
9668
  const removedKeys = value.length - maximumBreadth - 1;
9669
- res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
9669
+ res += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
9670
9670
  }
9671
9671
  if (spacer !== "") {
9672
9672
  res += `
@@ -9687,7 +9687,7 @@ ${originalIndentation}`;
9687
9687
  let separator = "";
9688
9688
  if (spacer !== "") {
9689
9689
  indentation += spacer;
9690
- join = `,
9690
+ join2 = `,
9691
9691
  ${indentation}`;
9692
9692
  whitespace = " ";
9693
9693
  }
@@ -9701,13 +9701,13 @@ ${indentation}`;
9701
9701
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
9702
9702
  if (tmp !== undefined) {
9703
9703
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9704
- separator = join;
9704
+ separator = join2;
9705
9705
  }
9706
9706
  }
9707
9707
  if (keyLength > maximumBreadth) {
9708
9708
  const removedKeys = keyLength - maximumBreadth;
9709
9709
  res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
9710
- separator = join;
9710
+ separator = join2;
9711
9711
  }
9712
9712
  if (spacer !== "" && separator.length > 1) {
9713
9713
  res = `
@@ -9747,7 +9747,7 @@ ${originalIndentation}`;
9747
9747
  }
9748
9748
  const originalIndentation = indentation;
9749
9749
  let res = "";
9750
- let join = ",";
9750
+ let join2 = ",";
9751
9751
  if (Array.isArray(value)) {
9752
9752
  if (value.length === 0) {
9753
9753
  return "[]";
@@ -9760,7 +9760,7 @@ ${originalIndentation}`;
9760
9760
  indentation += spacer;
9761
9761
  res += `
9762
9762
  ${indentation}`;
9763
- join = `,
9763
+ join2 = `,
9764
9764
  ${indentation}`;
9765
9765
  }
9766
9766
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9768,13 +9768,13 @@ ${indentation}`;
9768
9768
  for (;i < maximumValuesToStringify - 1; i++) {
9769
9769
  const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9770
9770
  res += tmp2 !== undefined ? tmp2 : "null";
9771
- res += join;
9771
+ res += join2;
9772
9772
  }
9773
9773
  const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9774
9774
  res += tmp !== undefined ? tmp : "null";
9775
9775
  if (value.length - 1 > maximumBreadth) {
9776
9776
  const removedKeys = value.length - maximumBreadth - 1;
9777
- res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
9777
+ res += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
9778
9778
  }
9779
9779
  if (spacer !== "") {
9780
9780
  res += `
@@ -9787,7 +9787,7 @@ ${originalIndentation}`;
9787
9787
  let whitespace = "";
9788
9788
  if (spacer !== "") {
9789
9789
  indentation += spacer;
9790
- join = `,
9790
+ join2 = `,
9791
9791
  ${indentation}`;
9792
9792
  whitespace = " ";
9793
9793
  }
@@ -9796,7 +9796,7 @@ ${indentation}`;
9796
9796
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
9797
9797
  if (tmp !== undefined) {
9798
9798
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9799
- separator = join;
9799
+ separator = join2;
9800
9800
  }
9801
9801
  }
9802
9802
  if (spacer !== "" && separator.length > 1) {
@@ -9853,20 +9853,20 @@ ${originalIndentation}`;
9853
9853
  indentation += spacer;
9854
9854
  let res2 = `
9855
9855
  ${indentation}`;
9856
- const join2 = `,
9856
+ const join3 = `,
9857
9857
  ${indentation}`;
9858
9858
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
9859
9859
  let i = 0;
9860
9860
  for (;i < maximumValuesToStringify - 1; i++) {
9861
9861
  const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9862
9862
  res2 += tmp2 !== undefined ? tmp2 : "null";
9863
- res2 += join2;
9863
+ res2 += join3;
9864
9864
  }
9865
9865
  const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9866
9866
  res2 += tmp !== undefined ? tmp : "null";
9867
9867
  if (value.length - 1 > maximumBreadth) {
9868
9868
  const removedKeys = value.length - maximumBreadth - 1;
9869
- res2 += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
9869
+ res2 += `${join3}"... ${getItemCount(removedKeys)} not stringified"`;
9870
9870
  }
9871
9871
  res2 += `
9872
9872
  ${originalIndentation}`;
@@ -9882,16 +9882,16 @@ ${originalIndentation}`;
9882
9882
  return '"[Object]"';
9883
9883
  }
9884
9884
  indentation += spacer;
9885
- const join = `,
9885
+ const join2 = `,
9886
9886
  ${indentation}`;
9887
9887
  let res = "";
9888
9888
  let separator = "";
9889
9889
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
9890
9890
  if (isTypedArrayWithEntries(value)) {
9891
- res += stringifyTypedArray(value, join, maximumBreadth);
9891
+ res += stringifyTypedArray(value, join2, maximumBreadth);
9892
9892
  keys = keys.slice(value.length);
9893
9893
  maximumPropertiesToStringify -= value.length;
9894
- separator = join;
9894
+ separator = join2;
9895
9895
  }
9896
9896
  if (deterministic) {
9897
9897
  keys = sort(keys, comparator);
@@ -9902,13 +9902,13 @@ ${indentation}`;
9902
9902
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
9903
9903
  if (tmp !== undefined) {
9904
9904
  res += `${separator}${strEscape(key2)}: ${tmp}`;
9905
- separator = join;
9905
+ separator = join2;
9906
9906
  }
9907
9907
  }
9908
9908
  if (keyLength > maximumBreadth) {
9909
9909
  const removedKeys = keyLength - maximumBreadth;
9910
9910
  res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
9911
- separator = join;
9911
+ separator = join2;
9912
9912
  }
9913
9913
  if (separator !== "") {
9914
9914
  res = `
@@ -14339,23 +14339,23 @@ var require_printer = __commonJS((exports) => {
14339
14339
  leave: (node) => "$" + node.name
14340
14340
  },
14341
14341
  Document: {
14342
- leave: (node) => join(node.definitions, `
14342
+ leave: (node) => join2(node.definitions, `
14343
14343
 
14344
14344
  `)
14345
14345
  },
14346
14346
  OperationDefinition: {
14347
14347
  leave(node) {
14348
- const varDefs = wrap("(", join(node.variableDefinitions, ", "), ")");
14349
- const prefix = join([
14348
+ const varDefs = wrap("(", join2(node.variableDefinitions, ", "), ")");
14349
+ const prefix = join2([
14350
14350
  node.operation,
14351
- join([node.name, varDefs]),
14352
- join(node.directives, " ")
14351
+ join2([node.name, varDefs]),
14352
+ join2(node.directives, " ")
14353
14353
  ], " ");
14354
14354
  return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
14355
14355
  }
14356
14356
  },
14357
14357
  VariableDefinition: {
14358
- leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join(directives, " "))
14358
+ leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join2(directives, " "))
14359
14359
  },
14360
14360
  SelectionSet: {
14361
14361
  leave: ({ selections }) => block(selections)
@@ -14363,32 +14363,32 @@ var require_printer = __commonJS((exports) => {
14363
14363
  Field: {
14364
14364
  leave({ alias, name, arguments: args, directives, selectionSet }) {
14365
14365
  const prefix = wrap("", alias, ": ") + name;
14366
- let argsLine = prefix + wrap("(", join(args, ", "), ")");
14366
+ let argsLine = prefix + wrap("(", join2(args, ", "), ")");
14367
14367
  if (argsLine.length > MAX_LINE_LENGTH) {
14368
14368
  argsLine = prefix + wrap(`(
14369
- `, indent(join(args, `
14369
+ `, indent(join2(args, `
14370
14370
  `)), `
14371
14371
  )`);
14372
14372
  }
14373
- return join([argsLine, join(directives, " "), selectionSet], " ");
14373
+ return join2([argsLine, join2(directives, " "), selectionSet], " ");
14374
14374
  }
14375
14375
  },
14376
14376
  Argument: {
14377
14377
  leave: ({ name, value }) => name + ": " + value
14378
14378
  },
14379
14379
  FragmentSpread: {
14380
- leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
14380
+ leave: ({ name, directives }) => "..." + name + wrap(" ", join2(directives, " "))
14381
14381
  },
14382
14382
  InlineFragment: {
14383
- leave: ({ typeCondition, directives, selectionSet }) => join([
14383
+ leave: ({ typeCondition, directives, selectionSet }) => join2([
14384
14384
  "...",
14385
14385
  wrap("on ", typeCondition),
14386
- join(directives, " "),
14386
+ join2(directives, " "),
14387
14387
  selectionSet
14388
14388
  ], " ")
14389
14389
  },
14390
14390
  FragmentDefinition: {
14391
- leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} ` + `on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
14391
+ leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(", join2(variableDefinitions, ", "), ")")} ` + `on ${typeCondition} ${wrap("", join2(directives, " "), " ")}` + selectionSet
14392
14392
  },
14393
14393
  IntValue: {
14394
14394
  leave: ({ value }) => value
@@ -14409,16 +14409,16 @@ var require_printer = __commonJS((exports) => {
14409
14409
  leave: ({ value }) => value
14410
14410
  },
14411
14411
  ListValue: {
14412
- leave: ({ values }) => "[" + join(values, ", ") + "]"
14412
+ leave: ({ values }) => "[" + join2(values, ", ") + "]"
14413
14413
  },
14414
14414
  ObjectValue: {
14415
- leave: ({ fields }) => "{" + join(fields, ", ") + "}"
14415
+ leave: ({ fields }) => "{" + join2(fields, ", ") + "}"
14416
14416
  },
14417
14417
  ObjectField: {
14418
14418
  leave: ({ name, value }) => name + ": " + value
14419
14419
  },
14420
14420
  Directive: {
14421
- leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
14421
+ leave: ({ name, arguments: args }) => "@" + name + wrap("(", join2(args, ", "), ")")
14422
14422
  },
14423
14423
  NamedType: {
14424
14424
  leave: ({ name }) => name
@@ -14431,115 +14431,115 @@ var require_printer = __commonJS((exports) => {
14431
14431
  },
14432
14432
  SchemaDefinition: {
14433
14433
  leave: ({ description, directives, operationTypes }) => wrap("", description, `
14434
- `) + join(["schema", join(directives, " "), block(operationTypes)], " ")
14434
+ `) + join2(["schema", join2(directives, " "), block(operationTypes)], " ")
14435
14435
  },
14436
14436
  OperationTypeDefinition: {
14437
14437
  leave: ({ operation, type }) => operation + ": " + type
14438
14438
  },
14439
14439
  ScalarTypeDefinition: {
14440
14440
  leave: ({ description, name, directives }) => wrap("", description, `
14441
- `) + join(["scalar", name, join(directives, " ")], " ")
14441
+ `) + join2(["scalar", name, join2(directives, " ")], " ")
14442
14442
  },
14443
14443
  ObjectTypeDefinition: {
14444
14444
  leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
14445
- `) + join([
14445
+ `) + join2([
14446
14446
  "type",
14447
14447
  name,
14448
- wrap("implements ", join(interfaces, " & ")),
14449
- join(directives, " "),
14448
+ wrap("implements ", join2(interfaces, " & ")),
14449
+ join2(directives, " "),
14450
14450
  block(fields)
14451
14451
  ], " ")
14452
14452
  },
14453
14453
  FieldDefinition: {
14454
14454
  leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, `
14455
14455
  `) + name + (hasMultilineItems(args) ? wrap(`(
14456
- `, indent(join(args, `
14456
+ `, indent(join2(args, `
14457
14457
  `)), `
14458
- )`) : wrap("(", join(args, ", "), ")")) + ": " + type + wrap(" ", join(directives, " "))
14458
+ )`) : wrap("(", join2(args, ", "), ")")) + ": " + type + wrap(" ", join2(directives, " "))
14459
14459
  },
14460
14460
  InputValueDefinition: {
14461
14461
  leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, `
14462
- `) + join([name + ": " + type, wrap("= ", defaultValue), join(directives, " ")], " ")
14462
+ `) + join2([name + ": " + type, wrap("= ", defaultValue), join2(directives, " ")], " ")
14463
14463
  },
14464
14464
  InterfaceTypeDefinition: {
14465
14465
  leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
14466
- `) + join([
14466
+ `) + join2([
14467
14467
  "interface",
14468
14468
  name,
14469
- wrap("implements ", join(interfaces, " & ")),
14470
- join(directives, " "),
14469
+ wrap("implements ", join2(interfaces, " & ")),
14470
+ join2(directives, " "),
14471
14471
  block(fields)
14472
14472
  ], " ")
14473
14473
  },
14474
14474
  UnionTypeDefinition: {
14475
14475
  leave: ({ description, name, directives, types: types2 }) => wrap("", description, `
14476
- `) + join(["union", name, join(directives, " "), wrap("= ", join(types2, " | "))], " ")
14476
+ `) + join2(["union", name, join2(directives, " "), wrap("= ", join2(types2, " | "))], " ")
14477
14477
  },
14478
14478
  EnumTypeDefinition: {
14479
14479
  leave: ({ description, name, directives, values }) => wrap("", description, `
14480
- `) + join(["enum", name, join(directives, " "), block(values)], " ")
14480
+ `) + join2(["enum", name, join2(directives, " "), block(values)], " ")
14481
14481
  },
14482
14482
  EnumValueDefinition: {
14483
14483
  leave: ({ description, name, directives }) => wrap("", description, `
14484
- `) + join([name, join(directives, " ")], " ")
14484
+ `) + join2([name, join2(directives, " ")], " ")
14485
14485
  },
14486
14486
  InputObjectTypeDefinition: {
14487
14487
  leave: ({ description, name, directives, fields }) => wrap("", description, `
14488
- `) + join(["input", name, join(directives, " "), block(fields)], " ")
14488
+ `) + join2(["input", name, join2(directives, " "), block(fields)], " ")
14489
14489
  },
14490
14490
  DirectiveDefinition: {
14491
14491
  leave: ({ description, name, arguments: args, repeatable, locations }) => wrap("", description, `
14492
14492
  `) + "directive @" + name + (hasMultilineItems(args) ? wrap(`(
14493
- `, indent(join(args, `
14493
+ `, indent(join2(args, `
14494
14494
  `)), `
14495
- )`) : wrap("(", join(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
14495
+ )`) : wrap("(", join2(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join2(locations, " | ")
14496
14496
  },
14497
14497
  SchemaExtension: {
14498
- leave: ({ directives, operationTypes }) => join(["extend schema", join(directives, " "), block(operationTypes)], " ")
14498
+ leave: ({ directives, operationTypes }) => join2(["extend schema", join2(directives, " "), block(operationTypes)], " ")
14499
14499
  },
14500
14500
  ScalarTypeExtension: {
14501
- leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
14501
+ leave: ({ name, directives }) => join2(["extend scalar", name, join2(directives, " ")], " ")
14502
14502
  },
14503
14503
  ObjectTypeExtension: {
14504
- leave: ({ name, interfaces, directives, fields }) => join([
14504
+ leave: ({ name, interfaces, directives, fields }) => join2([
14505
14505
  "extend type",
14506
14506
  name,
14507
- wrap("implements ", join(interfaces, " & ")),
14508
- join(directives, " "),
14507
+ wrap("implements ", join2(interfaces, " & ")),
14508
+ join2(directives, " "),
14509
14509
  block(fields)
14510
14510
  ], " ")
14511
14511
  },
14512
14512
  InterfaceTypeExtension: {
14513
- leave: ({ name, interfaces, directives, fields }) => join([
14513
+ leave: ({ name, interfaces, directives, fields }) => join2([
14514
14514
  "extend interface",
14515
14515
  name,
14516
- wrap("implements ", join(interfaces, " & ")),
14517
- join(directives, " "),
14516
+ wrap("implements ", join2(interfaces, " & ")),
14517
+ join2(directives, " "),
14518
14518
  block(fields)
14519
14519
  ], " ")
14520
14520
  },
14521
14521
  UnionTypeExtension: {
14522
- leave: ({ name, directives, types: types2 }) => join([
14522
+ leave: ({ name, directives, types: types2 }) => join2([
14523
14523
  "extend union",
14524
14524
  name,
14525
- join(directives, " "),
14526
- wrap("= ", join(types2, " | "))
14525
+ join2(directives, " "),
14526
+ wrap("= ", join2(types2, " | "))
14527
14527
  ], " ")
14528
14528
  },
14529
14529
  EnumTypeExtension: {
14530
- leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
14530
+ leave: ({ name, directives, values }) => join2(["extend enum", name, join2(directives, " "), block(values)], " ")
14531
14531
  },
14532
14532
  InputObjectTypeExtension: {
14533
- leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
14533
+ leave: ({ name, directives, fields }) => join2(["extend input", name, join2(directives, " "), block(fields)], " ")
14534
14534
  }
14535
14535
  };
14536
- function join(maybeArray, separator = "") {
14536
+ function join2(maybeArray, separator = "") {
14537
14537
  var _maybeArray$filter$jo;
14538
14538
  return (_maybeArray$filter$jo = maybeArray === null || maybeArray === undefined ? undefined : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== undefined ? _maybeArray$filter$jo : "";
14539
14539
  }
14540
14540
  function block(array2) {
14541
14541
  return wrap(`{
14542
- `, indent(join(array2, `
14542
+ `, indent(join2(array2, `
14543
14543
  `)), `
14544
14544
  }`);
14545
14545
  }
@@ -30130,8 +30130,8 @@ var require_adm_zip = __commonJS((exports, module) => {
30130
30130
  return null;
30131
30131
  }
30132
30132
  function fixPath(zipPath) {
30133
- const { join, normalize, sep } = pth.posix;
30134
- return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep));
30133
+ const { join: join2, normalize, sep } = pth.posix;
30134
+ return join2(".", normalize(sep + zipPath.split("\\").join(sep) + sep));
30135
30135
  }
30136
30136
  function filenameFilter(filterfn) {
30137
30137
  if (filterfn instanceof RegExp) {
@@ -35969,7 +35969,7 @@ var require_high_level_opt = __commonJS((exports, module) => {
35969
35969
  ]).reduce((set2, kv) => (set2[kv[0]] = kv[1], set2), Object.create(null)) : {};
35970
35970
  });
35971
35971
 
35972
- // ../../node_modules/tar/node_modules/minipass/index.js
35972
+ // ../../node_modules/minipass/index.js
35973
35973
  var require_minipass = __commonJS((exports) => {
35974
35974
  var proc = typeof process === "object" && process ? process : {
35975
35975
  stdout: null,
@@ -41520,7 +41520,7 @@ var require_path_reservations = __commonJS((exports, module) => {
41520
41520
  var assert = __require("assert");
41521
41521
  var normalize = require_normalize_unicode();
41522
41522
  var stripSlashes = require_strip_trailing_slashes();
41523
- var { join } = __require("path");
41523
+ var { join: join2 } = __require("path");
41524
41524
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
41525
41525
  var isWindows = platform === "win32";
41526
41526
  module.exports = () => {
@@ -41529,7 +41529,7 @@ var require_path_reservations = __commonJS((exports, module) => {
41529
41529
  const getDirs = (path4) => {
41530
41530
  const dirs = path4.split("/").slice(0, -1).reduce((set2, path5) => {
41531
41531
  if (set2.length) {
41532
- path5 = join(set2[set2.length - 1], path5);
41532
+ path5 = join2(set2[set2.length - 1], path5);
41533
41533
  }
41534
41534
  set2.push(path5 || "/");
41535
41535
  return set2;
@@ -41597,7 +41597,7 @@ var require_path_reservations = __commonJS((exports, module) => {
41597
41597
  };
41598
41598
  const reserve = (paths, fn) => {
41599
41599
  paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
41600
- return stripSlashes(join(normalize(p))).toLowerCase();
41600
+ return stripSlashes(join2(normalize(p))).toLowerCase();
41601
41601
  });
41602
41602
  const dirs = new Set(paths.map((path4) => getDirs(path4)).reduce((a, b) => a.concat(b)));
41603
41603
  reservations.set(fn, { dirs, paths });
@@ -41644,7 +41644,7 @@ var require_unpack = __commonJS((exports, module) => {
41644
41644
  var fs2 = __require("fs");
41645
41645
  var fsm = require_fs_minipass();
41646
41646
  var path4 = __require("path");
41647
- var mkdir = require_mkdir();
41647
+ var mkdir2 = require_mkdir();
41648
41648
  var wc = require_winchars();
41649
41649
  var pathReservations = require_path_reservations();
41650
41650
  var stripAbsolutePath = require_strip_absolute_path();
@@ -41890,7 +41890,7 @@ var require_unpack = __commonJS((exports, module) => {
41890
41890
  }
41891
41891
  }
41892
41892
  [MKDIR](dir, mode, cb) {
41893
- mkdir(normPath(dir), {
41893
+ mkdir2(normPath(dir), {
41894
41894
  uid: this.uid,
41895
41895
  gid: this.gid,
41896
41896
  processUid: this.processUid,
@@ -42281,7 +42281,7 @@ var require_unpack = __commonJS((exports, module) => {
42281
42281
  }
42282
42282
  [MKDIR](dir, mode) {
42283
42283
  try {
42284
- return mkdir.sync(normPath(dir), {
42284
+ return mkdir2.sync(normPath(dir), {
42285
42285
  uid: this.uid,
42286
42286
  gid: this.gid,
42287
42287
  processUid: this.processUid,
@@ -45981,7 +45981,7 @@ var require_typescript = __commonJS((exports, module) => {
45981
45981
  walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,
45982
45982
  whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,
45983
45983
  writeCommentRange: () => writeCommentRange,
45984
- writeFile: () => writeFile,
45984
+ writeFile: () => writeFile2,
45985
45985
  writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
45986
45986
  zipWith: () => zipWith
45987
45987
  });
@@ -51771,8 +51771,8 @@ ${lanes.join(`
51771
51771
  writeOutputIsTTY() {
51772
51772
  return process.stdout.isTTY;
51773
51773
  },
51774
- readFile,
51775
- writeFile: writeFile2,
51774
+ readFile: readFile2,
51775
+ writeFile: writeFile22,
51776
51776
  watchFile: watchFile2,
51777
51777
  watchDirectory,
51778
51778
  preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
@@ -51964,7 +51964,7 @@ ${lanes.join(`
51964
51964
  function fsWatchWorker(fileOrDirectory, recursive, callback) {
51965
51965
  return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ? { persistent: true, recursive: !!recursive } : { persistent: true }, callback);
51966
51966
  }
51967
- function readFile(fileName, _encoding) {
51967
+ function readFile2(fileName, _encoding) {
51968
51968
  let buffer;
51969
51969
  try {
51970
51970
  buffer = _fs.readFileSync(fileName);
@@ -51989,7 +51989,7 @@ ${lanes.join(`
51989
51989
  }
51990
51990
  return buffer.toString("utf8");
51991
51991
  }
51992
- function writeFile2(fileName, data, writeByteOrderMark) {
51992
+ function writeFile22(fileName, data, writeByteOrderMark) {
51993
51993
  if (writeByteOrderMark) {
51994
51994
  data = byteOrderMarkIndicator + data;
51995
51995
  }
@@ -63260,7 +63260,7 @@ ${lanes.join(`
63260
63260
  sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath;
63261
63261
  return combinePaths(newDirPath, sourceFilePath);
63262
63262
  }
63263
- function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {
63263
+ function writeFile2(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {
63264
63264
  host.writeFile(fileName, text, writeByteOrderMark, (hostErrorMessage) => {
63265
63265
  diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage));
63266
63266
  }, sourceFiles, data);
@@ -63272,12 +63272,12 @@ ${lanes.join(`
63272
63272
  createDirectory(directoryPath);
63273
63273
  }
63274
63274
  }
63275
- function writeFileEnsuringDirectories(path5, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
63275
+ function writeFileEnsuringDirectories(path5, data, writeByteOrderMark, writeFile22, createDirectory, directoryExists) {
63276
63276
  try {
63277
- writeFile2(path5, data, writeByteOrderMark);
63277
+ writeFile22(path5, data, writeByteOrderMark);
63278
63278
  } catch {
63279
63279
  ensureDirectoriesExist(getDirectoryPath(normalizePath(path5)), createDirectory, directoryExists);
63280
- writeFile2(path5, data, writeByteOrderMark);
63280
+ writeFile22(path5, data, writeByteOrderMark);
63281
63281
  }
63282
63282
  }
63283
63283
  function getLineOfLocalPosition(sourceFile, pos) {
@@ -82765,7 +82765,7 @@ ${lanes.join(`
82765
82765
  const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);
82766
82766
  return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);
82767
82767
  }
82768
- function parseCommandLineWorker(diagnostics, commandLine, readFile) {
82768
+ function parseCommandLineWorker(diagnostics, commandLine, readFile2) {
82769
82769
  const options = {};
82770
82770
  let watchOptions;
82771
82771
  const fileNames = [];
@@ -82803,7 +82803,7 @@ ${lanes.join(`
82803
82803
  }
82804
82804
  }
82805
82805
  function parseResponseFile(fileName) {
82806
- const text = tryReadFile(fileName, readFile || ((fileName2) => sys.readFile(fileName2)));
82806
+ const text = tryReadFile(fileName, readFile2 || ((fileName2) => sys.readFile(fileName2)));
82807
82807
  if (!isString(text)) {
82808
82808
  errors2.push(text);
82809
82809
  return;
@@ -82906,8 +82906,8 @@ ${lanes.join(`
82906
82906
  unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,
82907
82907
  optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument
82908
82908
  };
82909
- function parseCommandLine(commandLine, readFile) {
82910
- return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile);
82909
+ function parseCommandLine(commandLine, readFile2) {
82910
+ return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile2);
82911
82911
  }
82912
82912
  function getOptionFromName(optionName, allowShort) {
82913
82913
  return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort);
@@ -82975,8 +82975,8 @@ ${lanes.join(`
82975
82975
  result.originalFileName = result.fileName;
82976
82976
  return parseJsonSourceFileConfigFileContent(result, host, getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd), optionsToExtend, getNormalizedAbsolutePath(configFileName, cwd), undefined, extraFileExtensions, extendedConfigCache, watchOptionsToExtend);
82977
82977
  }
82978
- function readConfigFile(fileName, readFile) {
82979
- const textOrDiagnostic = tryReadFile(fileName, readFile);
82978
+ function readConfigFile(fileName, readFile2) {
82979
+ const textOrDiagnostic = tryReadFile(fileName, readFile2);
82980
82980
  return isString(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };
82981
82981
  }
82982
82982
  function parseConfigFileTextToJson(fileName, jsonText) {
@@ -82986,14 +82986,14 @@ ${lanes.join(`
82986
82986
  error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : undefined
82987
82987
  };
82988
82988
  }
82989
- function readJsonConfigFile(fileName, readFile) {
82990
- const textOrDiagnostic = tryReadFile(fileName, readFile);
82989
+ function readJsonConfigFile(fileName, readFile2) {
82990
+ const textOrDiagnostic = tryReadFile(fileName, readFile2);
82991
82991
  return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] };
82992
82992
  }
82993
- function tryReadFile(fileName, readFile) {
82993
+ function tryReadFile(fileName, readFile2) {
82994
82994
  let text;
82995
82995
  try {
82996
- text = readFile(fileName);
82996
+ text = readFile2(fileName);
82997
82997
  } catch (e2) {
82998
82998
  return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e2.message);
82999
82999
  }
@@ -145204,7 +145204,7 @@ ${lanes.join(`
145204
145204
  return;
145205
145205
  }
145206
145206
  const buildInfo = host.getBuildInfo() || { version };
145207
- writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo });
145207
+ writeFile2(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo });
145208
145208
  emittedFilesList == null || emittedFilesList.push(buildInfoPath);
145209
145209
  }
145210
145210
  function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath) {
@@ -145363,14 +145363,14 @@ ${lanes.join(`
145363
145363
  }
145364
145364
  if (sourceMapFilePath) {
145365
145365
  const sourceMap = sourceMapGenerator.toString();
145366
- writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
145366
+ writeFile2(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
145367
145367
  }
145368
145368
  } else {
145369
145369
  writer.writeLine();
145370
145370
  }
145371
145371
  const text = writer.getText();
145372
145372
  const data = { sourceMapUrlPos, diagnostics: transform2.diagnostics };
145373
- writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data);
145373
+ writeFile2(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data);
145374
145374
  writer.clear();
145375
145375
  return !data.skippedDtsWrite;
145376
145376
  }
@@ -145537,7 +145537,7 @@ ${lanes.join(`
145537
145537
  printBundle,
145538
145538
  writeNode,
145539
145539
  writeList,
145540
- writeFile: writeFile2,
145540
+ writeFile: writeFile22,
145541
145541
  writeBundle
145542
145542
  };
145543
145543
  function printNode(hint, node, sourceFile) {
@@ -145570,7 +145570,7 @@ ${lanes.join(`
145570
145570
  return endPrint();
145571
145571
  }
145572
145572
  function printFile(sourceFile) {
145573
- writeFile2(sourceFile, beginPrint(), undefined);
145573
+ writeFile22(sourceFile, beginPrint(), undefined);
145574
145574
  return endPrint();
145575
145575
  }
145576
145576
  function writeNode(hint, node, sourceFile, output) {
@@ -145604,7 +145604,7 @@ ${lanes.join(`
145604
145604
  reset2();
145605
145605
  writer = previousWriter;
145606
145606
  }
145607
- function writeFile2(sourceFile, output, sourceMapGenerator2) {
145607
+ function writeFile22(sourceFile, output, sourceMapGenerator2) {
145608
145608
  isOwnFileEmit = true;
145609
145609
  const previousWriter = writer;
145610
145610
  setWriter(output, sourceMapGenerator2);
@@ -149409,7 +149409,7 @@ ${lanes.join(`
149409
149409
  getDirectories,
149410
149410
  readDirectory,
149411
149411
  createDirectory: host.createDirectory && createDirectory,
149412
- writeFile: host.writeFile && writeFile2,
149412
+ writeFile: host.writeFile && writeFile22,
149413
149413
  addOrDeleteFileOrDirectory,
149414
149414
  addOrDeleteFile,
149415
149415
  clearCache,
@@ -149468,7 +149468,7 @@ ${lanes.join(`
149468
149468
  const index = binarySearch(entries, name, identity2, compareStringsCaseSensitive);
149469
149469
  return index >= 0;
149470
149470
  }
149471
- function writeFile2(fileName, data, writeByteOrderMark) {
149471
+ function writeFile22(fileName, data, writeByteOrderMark) {
149472
149472
  const path5 = toPath3(fileName);
149473
149473
  const result = getCachedFileSystemEntriesForBaseDir(path5);
149474
149474
  if (result) {
@@ -149891,12 +149891,12 @@ ${lanes.join(`
149891
149891
  function createCompilerHost(options, setParentNodes) {
149892
149892
  return createCompilerHostWorker(options, setParentNodes);
149893
149893
  }
149894
- function createGetSourceFile(readFile, setParentNodes) {
149894
+ function createGetSourceFile(readFile2, setParentNodes) {
149895
149895
  return (fileName, languageVersionOrOptions, onError) => {
149896
149896
  let text;
149897
149897
  try {
149898
149898
  mark("beforeIORead");
149899
- text = readFile(fileName);
149899
+ text = readFile2(fileName);
149900
149900
  mark("afterIORead");
149901
149901
  measure("I/O Read", "beforeIORead", "afterIORead");
149902
149902
  } catch (e2) {
@@ -150687,7 +150687,7 @@ ${lanes.join(`
150687
150687
  getSourceOfProjectReferenceRedirect,
150688
150688
  forEachResolvedProjectReference: forEachResolvedProjectReference2
150689
150689
  });
150690
- const readFile = host.readFile.bind(host);
150690
+ const readFile2 = host.readFile.bind(host);
150691
150691
  (_e = tracing) == null || _e.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
150692
150692
  const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
150693
150693
  (_f = tracing) == null || _f.pop();
@@ -150864,7 +150864,7 @@ ${lanes.join(`
150864
150864
  shouldTransformImportCall,
150865
150865
  emitBuildInfo,
150866
150866
  fileExists,
150867
- readFile,
150867
+ readFile: readFile2,
150868
150868
  directoryExists,
150869
150869
  getSymlinkCache,
150870
150870
  realpath: (_o = host.realpath) == null ? undefined : _o.bind(host),
@@ -150872,7 +150872,7 @@ ${lanes.join(`
150872
150872
  getCanonicalFileName,
150873
150873
  getFileIncludeReasons: () => programDiagnostics.getFileReasons(),
150874
150874
  structureIsReused,
150875
- writeFile: writeFile2,
150875
+ writeFile: writeFile22,
150876
150876
  getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
150877
150877
  };
150878
150878
  onProgramCreateComplete();
@@ -151322,7 +151322,7 @@ ${lanes.join(`
151322
151322
  getProjectReferenceRedirect,
151323
151323
  isSourceOfProjectReferenceRedirect,
151324
151324
  getSymlinkCache,
151325
- writeFile: writeFileCallback || writeFile2,
151325
+ writeFile: writeFileCallback || writeFile22,
151326
151326
  isEmitBlocked,
151327
151327
  shouldTransformImportCall,
151328
151328
  getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2,
@@ -151352,7 +151352,7 @@ ${lanes.join(`
151352
151352
  getGlobalTypingsCacheLocation: program.getGlobalTypingsCacheLocation
151353
151353
  };
151354
151354
  }
151355
- function writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
151355
+ function writeFile22(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
151356
151356
  host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
151357
151357
  }
151358
151358
  function emitBuildInfo(writeFileCallback) {
@@ -153062,10 +153062,10 @@ ${lanes.join(`
153062
153062
  }
153063
153063
  }
153064
153064
  var emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
153065
- function handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) {
153065
+ function handleNoEmitOptions(program, sourceFile, writeFile22, cancellationToken) {
153066
153066
  const options = program.getCompilerOptions();
153067
153067
  if (options.noEmit) {
153068
- return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken);
153068
+ return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile22, cancellationToken);
153069
153069
  }
153070
153070
  if (!options.noEmitOnError)
153071
153071
  return;
@@ -153082,7 +153082,7 @@ ${lanes.join(`
153082
153082
  return;
153083
153083
  let emittedFiles;
153084
153084
  if (!sourceFile) {
153085
- const emitResult = program.emitBuildInfo(writeFile2, cancellationToken);
153085
+ const emitResult = program.emitBuildInfo(writeFile22, cancellationToken);
153086
153086
  if (emitResult.diagnostics)
153087
153087
  diagnostics = [...diagnostics, ...emitResult.diagnostics];
153088
153088
  emittedFiles = emitResult.emittedFiles;
@@ -153420,9 +153420,9 @@ ${lanes.join(`
153420
153420
  }
153421
153421
  function getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit) {
153422
153422
  const outputFiles = [];
153423
- const { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit);
153423
+ const { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit);
153424
153424
  return { outputFiles, emitSkipped, diagnostics };
153425
- function writeFile2(fileName, text, writeByteOrderMark) {
153425
+ function writeFile22(fileName, text, writeByteOrderMark) {
153426
153426
  outputFiles.push({ name: fileName, writeByteOrderMark, text });
153427
153427
  }
153428
153428
  }
@@ -154618,16 +154618,16 @@ ${lanes.join(`
154618
154618
  notImplemented();
154619
154619
  }
154620
154620
  return builderProgram;
154621
- function emitBuildInfo(writeFile2, cancellationToken) {
154621
+ function emitBuildInfo(writeFile22, cancellationToken) {
154622
154622
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154623
154623
  if (getBuildInfoEmitPending(state)) {
154624
- const result = state.program.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken);
154624
+ const result = state.program.emitBuildInfo(writeFile22 || maybeBind(host, host.writeFile), cancellationToken);
154625
154625
  state.buildInfoEmitPending = false;
154626
154626
  return result;
154627
154627
  }
154628
154628
  return emitSkippedWithNoDiagnostics;
154629
154629
  }
154630
- function emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) {
154630
+ function emitNextAffectedFileOrDtsErrors(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) {
154631
154631
  var _a, _b, _c, _d;
154632
154632
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154633
154633
  let affected = getNextAffectedFile(state, cancellationToken, host);
@@ -154671,7 +154671,7 @@ ${lanes.join(`
154671
154671
  if (isForDtsErrors || !getBuildInfoEmitPending(state))
154672
154672
  return;
154673
154673
  const affected2 = state.program;
154674
- const result2 = affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken);
154674
+ const result2 = affected2.emitBuildInfo(writeFile22 || maybeBind(host, host.writeFile), cancellationToken);
154675
154675
  state.buildInfoEmitPending = false;
154676
154676
  return { result: result2, affected: affected2 };
154677
154677
  }
@@ -154681,7 +154681,7 @@ ${lanes.join(`
154681
154681
  emitOnly = 0;
154682
154682
  if (emitKind & 56)
154683
154683
  emitOnly = emitOnly === undefined ? 1 : undefined;
154684
- const result = !isForDtsErrors ? state.program.emit(affected === state.program ? undefined : affected, getWriteFileCallback(writeFile2, customTransformers), cancellationToken, emitOnly, customTransformers, undefined, true) : {
154684
+ const result = !isForDtsErrors ? state.program.emit(affected === state.program ? undefined : affected, getWriteFileCallback(writeFile22, customTransformers), cancellationToken, emitOnly, customTransformers, undefined, true) : {
154685
154685
  emitSkipped: true,
154686
154686
  diagnostics: state.program.getDeclarationDiagnostics(affected === state.program ? undefined : affected, cancellationToken)
154687
154687
  };
@@ -154723,13 +154723,13 @@ ${lanes.join(`
154723
154723
  if (emitDiagnosticsPerFile)
154724
154724
  state.emitDiagnosticsPerFile = emitDiagnosticsPerFile;
154725
154725
  }
154726
- function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154727
- return emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, false);
154726
+ function emitNextAffectedFile(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154727
+ return emitNextAffectedFileOrDtsErrors(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers, false);
154728
154728
  }
154729
- function getWriteFileCallback(writeFile2, customTransformers) {
154729
+ function getWriteFileCallback(writeFile22, customTransformers) {
154730
154730
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154731
154731
  if (!getEmitDeclarations(state.compilerOptions))
154732
- return writeFile2 || maybeBind(host, host.writeFile);
154732
+ return writeFile22 || maybeBind(host, host.writeFile);
154733
154733
  return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
154734
154734
  var _a, _b, _c;
154735
154735
  if (isDeclarationFileName(fileName)) {
@@ -154771,8 +154771,8 @@ ${lanes.join(`
154771
154771
  state.outSignature = newSignature;
154772
154772
  }
154773
154773
  }
154774
- if (writeFile2)
154775
- writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
154774
+ if (writeFile22)
154775
+ writeFile22(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
154776
154776
  else if (host.writeFile)
154777
154777
  host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
154778
154778
  else
@@ -154795,12 +154795,12 @@ ${lanes.join(`
154795
154795
  }
154796
154796
  };
154797
154797
  }
154798
- function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154798
+ function emit(targetSourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154799
154799
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154800
154800
  if (kind === 1) {
154801
154801
  assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile);
154802
154802
  }
154803
- const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile2, cancellationToken);
154803
+ const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile22, cancellationToken);
154804
154804
  if (result)
154805
154805
  return result;
154806
154806
  if (!targetSourceFile) {
@@ -154810,7 +154810,7 @@ ${lanes.join(`
154810
154810
  let diagnostics;
154811
154811
  let emittedFiles = [];
154812
154812
  let affectedEmitResult;
154813
- while (affectedEmitResult = emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers)) {
154813
+ while (affectedEmitResult = emitNextAffectedFile(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers)) {
154814
154814
  emitSkipped = emitSkipped || affectedEmitResult.result.emitSkipped;
154815
154815
  diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics);
154816
154816
  emittedFiles = addRange(emittedFiles, affectedEmitResult.result.emittedFiles);
@@ -154826,7 +154826,7 @@ ${lanes.join(`
154826
154826
  clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, false);
154827
154827
  }
154828
154828
  }
154829
- const emitResult = state.program.emit(targetSourceFile, getWriteFileCallback(writeFile2, customTransformers), cancellationToken, emitOnlyDtsFiles, customTransformers);
154829
+ const emitResult = state.program.emit(targetSourceFile, getWriteFileCallback(writeFile22, customTransformers), cancellationToken, emitOnlyDtsFiles, customTransformers);
154830
154830
  handleNonEmitBuilderWithEmitOrDtsErrors(targetSourceFile, emitOnlyDtsFiles, false, emitResult.diagnostics);
154831
154831
  return emitResult;
154832
154832
  }
@@ -155105,8 +155105,8 @@ ${lanes.join(`
155105
155105
  getSyntacticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSyntacticDiagnostics(sourceFile, cancellationToken),
155106
155106
  getDeclarationDiagnostics: (sourceFile, cancellationToken) => getProgram().getDeclarationDiagnostics(sourceFile, cancellationToken),
155107
155107
  getSemanticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSemanticDiagnostics(sourceFile, cancellationToken),
155108
- emit: (sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers) => getProgram().emit(sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers),
155109
- emitBuildInfo: (writeFile2, cancellationToken) => getProgram().emitBuildInfo(writeFile2, cancellationToken),
155108
+ emit: (sourceFile, writeFile22, cancellationToken, emitOnlyDts, customTransformers) => getProgram().emit(sourceFile, writeFile22, cancellationToken, emitOnlyDts, customTransformers),
155109
+ emitBuildInfo: (writeFile22, cancellationToken) => getProgram().emitBuildInfo(writeFile22, cancellationToken),
155110
155110
  getAllDependencies: notImplemented,
155111
155111
  getCurrentDirectory: () => getProgram().getCurrentDirectory(),
155112
155112
  close: noop3
@@ -156366,7 +156366,7 @@ ${lanes.join(`
156366
156366
  const fileName = isString(file) ? file : file.fileName;
156367
156367
  return fileNameConvertor ? fileNameConvertor(fileName) : fileName;
156368
156368
  }
156369
- function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156369
+ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156370
156370
  const options = program.getCompilerOptions();
156371
156371
  const allDiagnostics = program.getConfigFileParsingDiagnostics().slice();
156372
156372
  const configFileParsingDiagnosticsLength = allDiagnostics.length;
@@ -156383,7 +156383,7 @@ ${lanes.join(`
156383
156383
  }
156384
156384
  }
156385
156385
  }
156386
- const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(undefined, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers);
156386
+ const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(undefined, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers);
156387
156387
  addRange(allDiagnostics, emitResult.diagnostics);
156388
156388
  const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics);
156389
156389
  diagnostics.forEach(reportDiagnostic);
@@ -156403,8 +156403,8 @@ ${lanes.join(`
156403
156403
  diagnostics
156404
156404
  };
156405
156405
  }
156406
- function emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156407
- const { emitResult, diagnostics } = emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers);
156406
+ function emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, write, reportSummary, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156407
+ const { emitResult, diagnostics } = emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers);
156408
156408
  if (emitResult.emitSkipped && diagnostics.length > 0) {
156409
156409
  return 1;
156410
156410
  } else if (diagnostics.length > 0) {
@@ -157679,20 +157679,20 @@ ${lanes.join(`
157679
157679
  getAllDependencies: (sourceFile) => withProgramOrEmptyArray((program2) => program2.getAllDependencies(sourceFile)),
157680
157680
  getSemanticDiagnostics: (sourceFile, cancellationToken) => withProgramOrEmptyArray((program2) => program2.getSemanticDiagnostics(sourceFile, cancellationToken)),
157681
157681
  getSemanticDiagnosticsOfNextAffectedFile: (cancellationToken, ignoreSourceFile) => withProgramOrUndefined((program2) => program2.getSemanticDiagnosticsOfNextAffectedFile && program2.getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile)),
157682
- emit: (targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) => {
157682
+ emit: (targetSourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) => {
157683
157683
  if (targetSourceFile || emitOnlyDtsFiles) {
157684
157684
  return withProgramOrUndefined((program2) => {
157685
157685
  var _a, _b;
157686
- return program2.emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? undefined : _b.call(_a, project)));
157686
+ return program2.emit(targetSourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? undefined : _b.call(_a, project)));
157687
157687
  });
157688
157688
  }
157689
157689
  executeSteps(0, cancellationToken);
157690
- return emit(writeFile2, cancellationToken, customTransformers);
157690
+ return emit(writeFile22, cancellationToken, customTransformers);
157691
157691
  },
157692
157692
  done
157693
157693
  };
157694
- function done(cancellationToken, writeFile2, customTransformers) {
157695
- executeSteps(3, cancellationToken, writeFile2, customTransformers);
157694
+ function done(cancellationToken, writeFile22, customTransformers) {
157695
+ executeSteps(3, cancellationToken, writeFile22, customTransformers);
157696
157696
  mark("SolutionBuilder::Projects built");
157697
157697
  return doneInvalidatedProject(state, projectPath);
157698
157698
  }
@@ -157792,7 +157792,7 @@ ${lanes.join(`
157792
157792
  step = 2;
157793
157793
  return emitResult;
157794
157794
  }
157795
- function executeSteps(till, cancellationToken, writeFile2, customTransformers) {
157795
+ function executeSteps(till, cancellationToken, writeFile22, customTransformers) {
157796
157796
  while (step <= till && step < 3) {
157797
157797
  const currentStep = step;
157798
157798
  switch (step) {
@@ -157800,7 +157800,7 @@ ${lanes.join(`
157800
157800
  createProgram2();
157801
157801
  break;
157802
157802
  case 1:
157803
- emit(writeFile2, cancellationToken, customTransformers);
157803
+ emit(writeFile22, cancellationToken, customTransformers);
157804
157804
  break;
157805
157805
  case 2:
157806
157806
  queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult));
@@ -158355,14 +158355,14 @@ ${lanes.join(`
158355
158355
  }
158356
158356
  }
158357
158357
  }
158358
- function build(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) {
158358
+ function build(state, project, cancellationToken, writeFile22, getCustomTransformers, onlyReferences) {
158359
158359
  mark("SolutionBuilder::beforeBuild");
158360
- const result = buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences);
158360
+ const result = buildWorker(state, project, cancellationToken, writeFile22, getCustomTransformers, onlyReferences);
158361
158361
  mark("SolutionBuilder::afterBuild");
158362
158362
  measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
158363
158363
  return result;
158364
158364
  }
158365
- function buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) {
158365
+ function buildWorker(state, project, cancellationToken, writeFile22, getCustomTransformers, onlyReferences) {
158366
158366
  const buildOrder = getBuildOrderFor(state, project, onlyReferences);
158367
158367
  if (!buildOrder)
158368
158368
  return 3;
@@ -158374,7 +158374,7 @@ ${lanes.join(`
158374
158374
  if (!invalidatedProject)
158375
158375
  break;
158376
158376
  reportQueue = false;
158377
- invalidatedProject.done(cancellationToken, writeFile2, getCustomTransformers == null ? undefined : getCustomTransformers(invalidatedProject.project));
158377
+ invalidatedProject.done(cancellationToken, writeFile22, getCustomTransformers == null ? undefined : getCustomTransformers(invalidatedProject.project));
158378
158378
  if (!state.diagnostics.has(invalidatedProject.projectPath))
158379
158379
  successfulProjects++;
158380
158380
  }
@@ -158575,9 +158575,9 @@ ${lanes.join(`
158575
158575
  function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) {
158576
158576
  const state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions);
158577
158577
  return {
158578
- build: (project, cancellationToken, writeFile2, getCustomTransformers) => build(state, project, cancellationToken, writeFile2, getCustomTransformers),
158578
+ build: (project, cancellationToken, writeFile22, getCustomTransformers) => build(state, project, cancellationToken, writeFile22, getCustomTransformers),
158579
158579
  clean: (project) => clean(state, project),
158580
- buildReferences: (project, cancellationToken, writeFile2, getCustomTransformers) => build(state, project, cancellationToken, writeFile2, getCustomTransformers, true),
158580
+ buildReferences: (project, cancellationToken, writeFile22, getCustomTransformers) => build(state, project, cancellationToken, writeFile22, getCustomTransformers, true),
158581
158581
  cleanReferences: (project) => clean(state, project, true),
158582
158582
  getNextInvalidatedProject: (cancellationToken) => {
158583
158583
  setupInitialBuild(state, cancellationToken);
@@ -201244,7 +201244,7 @@ ${options.prefix}` : `
201244
201244
  walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,
201245
201245
  whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,
201246
201246
  writeCommentRange: () => writeCommentRange,
201247
- writeFile: () => writeFile,
201247
+ writeFile: () => writeFile2,
201248
201248
  writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
201249
201249
  zipWith: () => zipWith
201250
201250
  });
@@ -203072,7 +203072,7 @@ ${options.prefix}` : `
203072
203072
  this.builderState = BuilderState.create(this.program, this.builderState, true);
203073
203073
  return mapDefined(BuilderState.getFilesAffectedBy(this.builderState, this.program, scriptInfo.path, this.cancellationToken, this.projectService.host), (sourceFile) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(sourceFile.path)) ? sourceFile.fileName : undefined);
203074
203074
  }
203075
- emitFile(scriptInfo, writeFile2) {
203075
+ emitFile(scriptInfo, writeFile22) {
203076
203076
  if (!this.languageServiceEnabled || !this.shouldEmitFile(scriptInfo)) {
203077
203077
  return { emitSkipped: true, diagnostics: emptyArray2 };
203078
203078
  }
@@ -203080,7 +203080,7 @@ ${options.prefix}` : `
203080
203080
  if (!emitSkipped) {
203081
203081
  for (const outputFile of outputFiles) {
203082
203082
  const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, this.currentDirectory);
203083
- writeFile2(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark);
203083
+ writeFile22(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark);
203084
203084
  }
203085
203085
  if (this.builderState && getEmitDeclarations(this.compilerOptions)) {
203086
203086
  const dtsFiles = outputFiles.filter((f3) => isDeclarationFileName(f3.name));
@@ -223121,8 +223121,16 @@ var ResourceContentsSchema = exports_external.object({
223121
223121
  var TextResourceContentsSchema = ResourceContentsSchema.extend({
223122
223122
  text: exports_external.string()
223123
223123
  });
223124
+ var Base64Schema = exports_external.string().refine((val) => {
223125
+ try {
223126
+ atob(val);
223127
+ return true;
223128
+ } catch (_a) {
223129
+ return false;
223130
+ }
223131
+ }, { message: "Invalid Base64 string" });
223124
223132
  var BlobResourceContentsSchema = ResourceContentsSchema.extend({
223125
- blob: exports_external.string().base64()
223133
+ blob: Base64Schema
223126
223134
  });
223127
223135
  var ResourceSchema = BaseMetadataSchema.extend({
223128
223136
  uri: exports_external.string(),
@@ -223208,13 +223216,13 @@ var TextContentSchema = exports_external.object({
223208
223216
  }).passthrough();
223209
223217
  var ImageContentSchema = exports_external.object({
223210
223218
  type: exports_external.literal("image"),
223211
- data: exports_external.string().base64(),
223219
+ data: Base64Schema,
223212
223220
  mimeType: exports_external.string(),
223213
223221
  _meta: exports_external.optional(exports_external.object({}).passthrough())
223214
223222
  }).passthrough();
223215
223223
  var AudioContentSchema = exports_external.object({
223216
223224
  type: exports_external.literal("audio"),
223217
- data: exports_external.string().base64(),
223225
+ data: Base64Schema,
223218
223226
  mimeType: exports_external.string(),
223219
223227
  _meta: exports_external.optional(exports_external.object({}).passthrough())
223220
223228
  }).passthrough();
@@ -225965,12 +225973,91 @@ class StdioServerTransport {
225965
225973
  }
225966
225974
  }
225967
225975
 
225968
- // node_modules/@enactprotocol/shared/dist/api/enact-api.js
225976
+ // ../shared/dist/utils/config.js
225977
+ import { homedir } from "os";
225978
+ import { join } from "path";
225979
+ import { existsSync } from "fs";
225980
+ import { mkdir, readFile, writeFile } from "fs/promises";
225981
+ var CONFIG_DIR = join(homedir(), ".enact");
225982
+ var CONFIG_FILE = join(CONFIG_DIR, "config.json");
225983
+ var TRUSTED_KEYS_DIR = join(CONFIG_DIR, "trusted-keys");
225984
+ async function ensureConfig() {
225985
+ if (!existsSync(CONFIG_DIR)) {
225986
+ await mkdir(CONFIG_DIR, { recursive: true });
225987
+ }
225988
+ if (!existsSync(CONFIG_FILE)) {
225989
+ const defaultConfig = {
225990
+ history: [],
225991
+ urls: {
225992
+ frontend: DEFAULT_FRONTEND_URL,
225993
+ api: DEFAULT_API_URL
225994
+ }
225995
+ };
225996
+ await writeFile(CONFIG_FILE, JSON.stringify(defaultConfig, null, 2));
225997
+ }
225998
+ }
225999
+ async function readConfig() {
226000
+ await ensureConfig();
226001
+ try {
226002
+ const data = await readFile(CONFIG_FILE, "utf8");
226003
+ const config = JSON.parse(data);
226004
+ if (!config.urls) {
226005
+ config.urls = {
226006
+ frontend: DEFAULT_FRONTEND_URL,
226007
+ api: DEFAULT_API_URL
226008
+ };
226009
+ await writeConfig(config);
226010
+ }
226011
+ return config;
226012
+ } catch (error) {
226013
+ console.error("Failed to read config:", error.message);
226014
+ return {
226015
+ history: [],
226016
+ urls: {
226017
+ frontend: DEFAULT_FRONTEND_URL,
226018
+ api: DEFAULT_API_URL
226019
+ }
226020
+ };
226021
+ }
226022
+ }
226023
+ async function writeConfig(config) {
226024
+ await ensureConfig();
226025
+ await writeFile(CONFIG_FILE, JSON.stringify(config, null, 2));
226026
+ }
226027
+ var DEFAULT_FRONTEND_URL = "https://enact.tools";
226028
+ var DEFAULT_API_URL = "https://xjnhhxwxovjifdxdwzih.supabase.co";
226029
+ async function getFrontendUrl() {
226030
+ if (process.env.ENACT_FRONTEND_URL) {
226031
+ return process.env.ENACT_FRONTEND_URL;
226032
+ }
226033
+ const config = await readConfig();
226034
+ if (config.urls?.frontend) {
226035
+ return config.urls.frontend;
226036
+ }
226037
+ return DEFAULT_FRONTEND_URL;
226038
+ }
226039
+ async function getApiUrl() {
226040
+ if (process.env.ENACT_API_URL) {
226041
+ return process.env.ENACT_API_URL;
226042
+ }
226043
+ const config = await readConfig();
226044
+ if (config.urls?.api) {
226045
+ return config.urls.api;
226046
+ }
226047
+ return DEFAULT_API_URL;
226048
+ }
226049
+
226050
+ // ../shared/dist/api/enact-api.js
225969
226051
  class EnactApiClient {
225970
- constructor(baseUrl = "https://enact.tools", supabaseUrl = "https://xjnhhxwxovjifdxdwzih.supabase.co") {
226052
+ constructor(baseUrl, supabaseUrl) {
225971
226053
  this.baseUrl = baseUrl.replace(/\/$/, "");
225972
226054
  this.supabaseUrl = supabaseUrl.replace(/\/$/, "");
225973
226055
  }
226056
+ static async create(baseUrl, supabaseUrl) {
226057
+ const frontendUrl = baseUrl || await getFrontendUrl();
226058
+ const apiUrl = supabaseUrl || await getApiUrl();
226059
+ return new EnactApiClient(frontendUrl, apiUrl);
226060
+ }
225974
226061
  async makeRequest(endpoint, options = {}, token, tokenType = "jwt") {
225975
226062
  const url = endpoint.startsWith("http") ? endpoint : `${this.supabaseUrl}${endpoint}`;
225976
226063
  const headers = {
@@ -226252,7 +226339,7 @@ class EnactApiClient {
226252
226339
  };
226253
226340
  }
226254
226341
  }
226255
- var enactApi = new EnactApiClient;
226342
+ var enactApi = new EnactApiClient("https://enact.tools", "https://xjnhhxwxovjifdxdwzih.supabase.co");
226256
226343
 
226257
226344
  class EnactApiError extends Error {
226258
226345
  constructor(message, statusCode, endpoint) {
@@ -226263,7 +226350,7 @@ class EnactApiError extends Error {
226263
226350
  }
226264
226351
  }
226265
226352
 
226266
- // node_modules/@enactprotocol/shared/dist/exec/validate.js
226353
+ // ../shared/dist/exec/validate.js
226267
226354
  function validateAgainstSchema(value, schema, fieldName) {
226268
226355
  const { type, format, enum: enumValues, minimum, maximum, pattern, required } = schema;
226269
226356
  if (type) {
@@ -226389,14 +226476,14 @@ function validateInputs(tool, inputs) {
226389
226476
  return validatedInputs;
226390
226477
  }
226391
226478
 
226392
- // node_modules/@enactprotocol/shared/dist/core/DirectExecutionProvider.js
226479
+ // ../shared/dist/core/DirectExecutionProvider.js
226393
226480
  import { spawn } from "child_process";
226394
226481
 
226395
- // node_modules/@enactprotocol/shared/dist/types.js
226482
+ // ../shared/dist/types.js
226396
226483
  class ExecutionProvider {
226397
226484
  }
226398
226485
 
226399
- // node_modules/@enactprotocol/shared/dist/exec/logger.js
226486
+ // ../shared/dist/exec/logger.js
226400
226487
  var import_pino = __toESM(require_pino(), 1);
226401
226488
  var isSilentMode = () => process.env.CI === "true" || false || process.env.ENACT_SILENT === "true" || process.env.ENACT_SKIP_INTERACTIVE === "true";
226402
226489
  var logger = import_pino.default({
@@ -226444,7 +226531,7 @@ var wrappedLogger = {
226444
226531
  };
226445
226532
  var logger_default = wrappedLogger;
226446
226533
 
226447
- // node_modules/@enactprotocol/shared/dist/utils/timeout.js
226534
+ // ../shared/dist/utils/timeout.js
226448
226535
  function parseTimeout(timeout) {
226449
226536
  const match = timeout.match(/^(\d+)([smh])$/);
226450
226537
  if (!match) {
@@ -226464,7 +226551,7 @@ function parseTimeout(timeout) {
226464
226551
  }
226465
226552
  }
226466
226553
 
226467
- // node_modules/@enactprotocol/shared/dist/core/DirectExecutionProvider.js
226554
+ // ../shared/dist/core/DirectExecutionProvider.js
226468
226555
  class DirectExecutionProvider extends ExecutionProvider {
226469
226556
  async resolveEnvironmentVariables(envConfig, namespace) {
226470
226557
  const resolved = {};
@@ -227362,11 +227449,11 @@ import * as crypto2 from "crypto";
227362
227449
  import path from "node:path";
227363
227450
  import os from "node:os";
227364
227451
  import process3 from "node:process";
227365
- var homedir = os.homedir();
227452
+ var homedir2 = os.homedir();
227366
227453
  var tmpdir = os.tmpdir();
227367
227454
  var { env } = process3;
227368
227455
  var macos = (name) => {
227369
- const library = path.join(homedir, "Library");
227456
+ const library = path.join(homedir2, "Library");
227370
227457
  return {
227371
227458
  data: path.join(library, "Application Support", name),
227372
227459
  config: path.join(library, "Preferences", name),
@@ -227376,8 +227463,8 @@ var macos = (name) => {
227376
227463
  };
227377
227464
  };
227378
227465
  var windows = (name) => {
227379
- const appData = env.APPDATA || path.join(homedir, "AppData", "Roaming");
227380
- const localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
227466
+ const appData = env.APPDATA || path.join(homedir2, "AppData", "Roaming");
227467
+ const localAppData = env.LOCALAPPDATA || path.join(homedir2, "AppData", "Local");
227381
227468
  return {
227382
227469
  data: path.join(localAppData, name, "Data"),
227383
227470
  config: path.join(appData, name, "Config"),
@@ -227387,12 +227474,12 @@ var windows = (name) => {
227387
227474
  };
227388
227475
  };
227389
227476
  var linux = (name) => {
227390
- const username = path.basename(homedir);
227477
+ const username = path.basename(homedir2);
227391
227478
  return {
227392
- data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
227393
- config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
227394
- cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
227395
- log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
227479
+ data: path.join(env.XDG_DATA_HOME || path.join(homedir2, ".local", "share"), name),
227480
+ config: path.join(env.XDG_CONFIG_HOME || path.join(homedir2, ".config"), name),
227481
+ cache: path.join(env.XDG_CACHE_HOME || path.join(homedir2, ".cache"), name),
227482
+ log: path.join(env.XDG_STATE_HOME || path.join(homedir2, ".local", "state"), name),
227396
227483
  temp: path.join(tmpdir, username, name)
227397
227484
  };
227398
227485
  };
@@ -235037,7 +235124,7 @@ var import_typescript = __toESM(require_typescript(), 1);
235037
235124
  var __filename2 = fileURLToPath3(import.meta.url);
235038
235125
  var __dirname2 = path5.dirname(__filename2);
235039
235126
  var moduleSrcDirectory = `${__dirname2}/../../src/`;
235040
- // node_modules/@enactprotocol/shared/dist/core/DaggerExecutionProvider.js
235127
+ // ../shared/dist/core/DaggerExecutionProvider.js
235041
235128
  import fs3 from "fs/promises";
235042
235129
  import path6 from "path";
235043
235130
  import crypto3 from "crypto";
@@ -235785,37 +235872,6 @@ class DaggerExecutionProvider extends ExecutionProvider {
235785
235872
  process.exit(1);
235786
235873
  }
235787
235874
  }
235788
- forceCleanup() {
235789
- if (this.isShuttingDown)
235790
- return;
235791
- try {
235792
- logger_default.info("\uD83D\uDD04 Force cleaning up Dagger engines...");
235793
- const result = spawnSync("docker", [
235794
- "ps",
235795
- "--all",
235796
- "--filter",
235797
- "name=dagger-engine",
235798
- "--format",
235799
- "{{.Names}}"
235800
- ], {
235801
- encoding: "utf8",
235802
- timeout: 5000
235803
- });
235804
- if (result.stdout) {
235805
- const names = result.stdout.trim().split(`
235806
- `).filter((n) => n.trim());
235807
- if (names.length > 0) {
235808
- logger_default.info(`Found ${names.length} engine containers, force removing...`);
235809
- for (const name of names) {
235810
- spawnSync("docker", ["rm", "-f", name.trim()], { timeout: 3000 });
235811
- }
235812
- logger_default.info("✅ Force cleanup completed");
235813
- }
235814
- }
235815
- } catch (error) {
235816
- logger_default.debug("Force cleanup failed (this is usually fine):", error);
235817
- }
235818
- }
235819
235875
  getEngineStatus() {
235820
235876
  return {
235821
235877
  health: { ...this.engineHealth },
@@ -235832,13 +235888,13 @@ class DaggerExecutionProvider extends ExecutionProvider {
235832
235888
  }
235833
235889
  }
235834
235890
 
235835
- // node_modules/@enactprotocol/shared/dist/utils/env-loader.js
235891
+ // ../shared/dist/utils/env-loader.js
235836
235892
  var import_dotenv = __toESM(require_main(), 1);
235837
- import { join as join2 } from "path";
235838
- import { homedir as homedir2 } from "os";
235839
- import { existsSync as existsSync2 } from "fs";
235840
- import { readFile } from "fs/promises";
235841
- var CONFIG_DIR = join2(homedir2(), ".enact");
235893
+ import { join as join3 } from "path";
235894
+ import { homedir as homedir3 } from "os";
235895
+ import { existsSync as existsSync3 } from "fs";
235896
+ import { readFile as readFile2 } from "fs/promises";
235897
+ var CONFIG_DIR2 = join3(homedir3(), ".enact");
235842
235898
  function extractPackageNamespace(toolName) {
235843
235899
  const parts = toolName.split("/");
235844
235900
  if (parts.length < 2) {
@@ -235850,7 +235906,7 @@ function extractPackageNamespace(toolName) {
235850
235906
  return parts[0];
235851
235907
  }
235852
235908
  function getPackageEnvPath(packageNamespace) {
235853
- return join2(CONFIG_DIR, "env", packageNamespace, ".env");
235909
+ return join3(CONFIG_DIR2, "env", packageNamespace, ".env");
235854
235910
  }
235855
235911
  function decryptValue(encryptedValue) {
235856
235912
  try {
@@ -235861,11 +235917,11 @@ function decryptValue(encryptedValue) {
235861
235917
  }
235862
235918
  async function readPackageEnvConfig(packageNamespace) {
235863
235919
  const envFile = getPackageEnvPath(packageNamespace);
235864
- if (!existsSync2(envFile)) {
235920
+ if (!existsSync3(envFile)) {
235865
235921
  return { variables: {} };
235866
235922
  }
235867
235923
  try {
235868
- const data = await readFile(envFile, "utf8");
235924
+ const data = await readFile2(envFile, "utf8");
235869
235925
  if (data.trim().startsWith("{")) {
235870
235926
  return JSON.parse(data);
235871
235927
  } else {
@@ -235894,7 +235950,7 @@ function loadPackageEnvFile(toolName) {
235894
235950
  try {
235895
235951
  const packageNamespace = extractPackageNamespace(toolName);
235896
235952
  const packageEnvPath = getPackageEnvPath(packageNamespace);
235897
- if (!existsSync2(packageEnvPath)) {
235953
+ if (!existsSync3(packageEnvPath)) {
235898
235954
  return {};
235899
235955
  }
235900
235956
  const result = import_dotenv.config({ path: packageEnvPath });
@@ -235994,7 +236050,7 @@ function generateConfigLink(missingVars, toolName) {
235994
236050
  return `${webUrl}/?vars=${encodedVars}&package=${encodedPackage}`;
235995
236051
  }
235996
236052
 
235997
- // node_modules/@enactprotocol/shared/dist/core/EnactCore.js
236053
+ // ../shared/dist/core/EnactCore.js
235998
236054
  var import_yaml = __toESM(require_dist3(), 1);
235999
236055
 
236000
236056
  // ../../node_modules/@enactprotocol/security/dist/index.js
@@ -238709,7 +238765,7 @@ class SigningService {
238709
238765
  }
238710
238766
  }
238711
238767
 
238712
- // node_modules/@enactprotocol/shared/dist/core/EnactCore.js
238768
+ // ../shared/dist/core/EnactCore.js
238713
238769
  class EnactCore {
238714
238770
  constructor(options = {}) {
238715
238771
  this.options = {
@@ -238722,6 +238778,15 @@ class EnactCore {
238722
238778
  this.apiClient = new EnactApiClient(this.options.apiUrl, this.options.supabaseUrl);
238723
238779
  this.executionProvider = this.createExecutionProvider();
238724
238780
  }
238781
+ static async create(options = {}) {
238782
+ const frontendUrl = options.apiUrl || await getFrontendUrl();
238783
+ const apiUrl = options.supabaseUrl || await getApiUrl();
238784
+ return new EnactCore({
238785
+ ...options,
238786
+ apiUrl: frontendUrl,
238787
+ supabaseUrl: apiUrl
238788
+ });
238789
+ }
238725
238790
  setAuthToken(token) {
238726
238791
  this.options.authToken = token;
238727
238792
  }
@@ -238921,7 +238986,7 @@ class EnactCore {
238921
238986
  };
238922
238987
  const referenceSignature = {
238923
238988
  signature: tool.signatures[0].value,
238924
- publicKey: tool.signatures[0].signer,
238989
+ publicKey: "",
238925
238990
  algorithm: tool.signatures[0].algorithm,
238926
238991
  timestamp: new Date(tool.signatures[0].created).getTime()
238927
238992
  };
@@ -238929,10 +238994,6 @@ class EnactCore {
238929
238994
  const docString = JSON.stringify(canonicalDoc);
238930
238995
  const messageHash = CryptoUtils.hash(docString);
238931
238996
  const directVerify = CryptoUtils.verify(referenceSignature.publicKey, messageHash, referenceSignature.signature);
238932
- console.log("Direct crypto verification result:", directVerify);
238933
- const trustedKeys = KeyManager.getAllTrustedPublicKeys();
238934
- console.log("Trusted keys:", trustedKeys);
238935
- console.log("Is our public key trusted?", trustedKeys.includes(referenceSignature.publicKey));
238936
238997
  const isValid2 = SigningService.verifyDocument(documentForVerification, referenceSignature, { includeFields: ["command"] });
238937
238998
  console.log("Final verification result:", isValid2);
238938
238999
  if (!isValid2) {
@@ -239120,14 +239181,9 @@ class EnactCore {
239120
239181
  return `exec_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
239121
239182
  }
239122
239183
  }
239123
- // node_modules/@enactprotocol/shared/dist/utils/config.js
239124
- import { homedir as homedir3 } from "os";
239125
- import { join as join3 } from "path";
239126
- var CONFIG_DIR2 = join3(homedir3(), ".enact");
239127
- var CONFIG_FILE = join3(CONFIG_DIR2, "config.json");
239128
- // node_modules/@enactprotocol/shared/dist/utils/help.js
239129
- var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/mcp-server/node_modules/@enactprotocol/shared/dist/utils";
239130
- // node_modules/@enactprotocol/shared/dist/utils/logger.js
239184
+ // ../shared/dist/utils/help.js
239185
+ var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils";
239186
+ // ../shared/dist/utils/logger.js
239131
239187
  var LogLevel;
239132
239188
  (function(LogLevel2) {
239133
239189
  LogLevel2[LogLevel2["DEBUG"] = 0] = "DEBUG";
@@ -239137,7 +239193,7 @@ var LogLevel;
239137
239193
  LogLevel2[LogLevel2["ERROR"] = 4] = "ERROR";
239138
239194
  })(LogLevel || (LogLevel = {}));
239139
239195
  var currentLogLevel = LogLevel.INFO;
239140
- // node_modules/@enactprotocol/shared/dist/utils/silent-monitor.js
239196
+ // ../shared/dist/utils/silent-monitor.js
239141
239197
  class McpSilentOperationMonitor {
239142
239198
  getOriginalConsoleError() {
239143
239199
  return this.originalConsoleError;
@@ -239265,13 +239321,13 @@ function validateSilentEnvironment() {
239265
239321
  issues
239266
239322
  };
239267
239323
  }
239268
- // node_modules/@enactprotocol/shared/dist/utils/version.js
239269
- var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/mcp-server/node_modules/@enactprotocol/shared/dist/utils/version.js";
239270
- // node_modules/@enactprotocol/shared/dist/web/env-manager-server.js
239324
+ // ../shared/dist/utils/version.js
239325
+ var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils/version.js";
239326
+ // ../shared/dist/web/env-manager-server.js
239271
239327
  import { createServer } from "http";
239272
239328
  import { parse as parse3 } from "url";
239273
- import { readFile as readFile2, writeFile, mkdir, readdir, stat as stat2 } from "fs/promises";
239274
- import { existsSync as existsSync3 } from "fs";
239329
+ import { readFile as readFile3, writeFile as writeFile2, mkdir as mkdir2, readdir, stat as stat2 } from "fs/promises";
239330
+ import { existsSync as existsSync4 } from "fs";
239275
239331
  import { join as join4, dirname as dirname3 } from "path";
239276
239332
  import { homedir as homedir4 } from "os";
239277
239333
  import { fileURLToPath as fileURLToPath4 } from "url";
@@ -239290,7 +239346,7 @@ function findStaticDir() {
239290
239346
  join4(__dirname3, "..", "..", "src", "web", "static")
239291
239347
  ];
239292
239348
  for (const candidate of candidates) {
239293
- if (existsSync3(join4(candidate, "index.html"))) {
239349
+ if (existsSync4(join4(candidate, "index.html"))) {
239294
239350
  logger_default.debug(`Found static directory: ${candidate}`);
239295
239351
  return candidate;
239296
239352
  }
@@ -239334,7 +239390,7 @@ function generateDotEnv(vars) {
239334
239390
  }
239335
239391
  async function getAllPackageNamespaces() {
239336
239392
  const packages = [];
239337
- if (!existsSync3(ENV_BASE_DIR)) {
239393
+ if (!existsSync4(ENV_BASE_DIR)) {
239338
239394
  return packages;
239339
239395
  }
239340
239396
  try {
@@ -239356,7 +239412,7 @@ async function scanDirectory(dir, relativePath, packages) {
239356
239412
  } else if (entry === ".env") {
239357
239413
  const namespace = relativePath || "root";
239358
239414
  try {
239359
- const content = await readFile2(fullPath, "utf8");
239415
+ const content = await readFile3(fullPath, "utf8");
239360
239416
  const variables = parseDotEnv(content);
239361
239417
  packages.push({
239362
239418
  namespace,
@@ -239374,11 +239430,11 @@ async function scanDirectory(dir, relativePath, packages) {
239374
239430
  }
239375
239431
  async function getPackageEnvVars(namespace) {
239376
239432
  const envFile = join4(ENV_BASE_DIR, namespace, ".env");
239377
- if (!existsSync3(envFile)) {
239433
+ if (!existsSync4(envFile)) {
239378
239434
  return {};
239379
239435
  }
239380
239436
  try {
239381
- const content = await readFile2(envFile, "utf8");
239437
+ const content = await readFile3(envFile, "utf8");
239382
239438
  return parseDotEnv(content);
239383
239439
  } catch (error) {
239384
239440
  logger_default.error(`Failed to read env file for ${namespace}:`, error);
@@ -239388,13 +239444,13 @@ async function getPackageEnvVars(namespace) {
239388
239444
  async function setPackageEnvVar(namespace, key, value) {
239389
239445
  const envFile = join4(ENV_BASE_DIR, namespace, ".env");
239390
239446
  const envDir = dirname3(envFile);
239391
- if (!existsSync3(envDir)) {
239392
- await mkdir(envDir, { recursive: true });
239447
+ if (!existsSync4(envDir)) {
239448
+ await mkdir2(envDir, { recursive: true });
239393
239449
  }
239394
239450
  const existingVars = await getPackageEnvVars(namespace);
239395
239451
  existingVars[key] = value;
239396
239452
  const envContent = generateDotEnv(existingVars);
239397
- await writeFile(envFile, envContent, "utf8");
239453
+ await writeFile2(envFile, envContent, "utf8");
239398
239454
  }
239399
239455
  async function deletePackageEnvVar(namespace, key) {
239400
239456
  const existingVars = await getPackageEnvVars(namespace);
@@ -239404,11 +239460,11 @@ async function deletePackageEnvVar(namespace, key) {
239404
239460
  delete existingVars[key];
239405
239461
  const envFile = join4(ENV_BASE_DIR, namespace, ".env");
239406
239462
  const envContent = generateDotEnv(existingVars);
239407
- await writeFile(envFile, envContent, "utf8");
239463
+ await writeFile2(envFile, envContent, "utf8");
239408
239464
  }
239409
239465
  async function serveStaticFile(filePath, res) {
239410
239466
  try {
239411
- const content = await readFile2(filePath, "utf8");
239467
+ const content = await readFile3(filePath, "utf8");
239412
239468
  const ext = filePath.split(".").pop()?.toLowerCase();
239413
239469
  let contentType = "text/plain";
239414
239470
  switch (ext) {
@@ -239470,11 +239526,11 @@ async function handleRequest(req, res) {
239470
239526
  }
239471
239527
  const envDir = join4(ENV_BASE_DIR, namespace);
239472
239528
  const envFile = join4(envDir, ".env");
239473
- if (!existsSync3(envDir)) {
239474
- await mkdir(envDir, { recursive: true });
239529
+ if (!existsSync4(envDir)) {
239530
+ await mkdir2(envDir, { recursive: true });
239475
239531
  }
239476
- if (!existsSync3(envFile)) {
239477
- await writeFile(envFile, "", "utf8");
239532
+ if (!existsSync4(envFile)) {
239533
+ await writeFile2(envFile, "", "utf8");
239478
239534
  }
239479
239535
  res.writeHead(200, { "Content-Type": "application/json" });
239480
239536
  res.end(JSON.stringify({ success: true }));
@@ -239548,7 +239604,7 @@ function startEnvManagerServer(port = 5555) {
239548
239604
  });
239549
239605
  });
239550
239606
  }
239551
- // node_modules/@enactprotocol/shared/dist/LocalToolResolver.js
239607
+ // ../shared/dist/LocalToolResolver.js
239552
239608
  var yaml2 = __toESM(require_dist3(), 1);
239553
239609
  import { promises as fs5, readFileSync as readFileSync3, writeFileSync } from "fs";
239554
239610
  import { join as join5, resolve, basename as basename2 } from "path";
@@ -239834,7 +239890,7 @@ Use the MCP tools to manage this directory programmatically.
239834
239890
  }
239835
239891
  }
239836
239892
  var LocalToolResolver_default = LocalToolResolver;
239837
- // node_modules/@enactprotocol/shared/dist/services/McpCoreService.js
239893
+ // ../shared/dist/services/McpCoreService.js
239838
239894
  class McpCoreService {
239839
239895
  constructor(options) {
239840
239896
  this.core = new EnactCore({
@@ -239843,6 +239899,15 @@ class McpCoreService {
239843
239899
  authToken: options?.authToken
239844
239900
  });
239845
239901
  }
239902
+ static async create(options) {
239903
+ const frontendUrl = options?.apiUrl || await getFrontendUrl();
239904
+ const apiUrl = options?.supabaseUrl || await getApiUrl();
239905
+ return new McpCoreService({
239906
+ ...options,
239907
+ apiUrl: frontendUrl,
239908
+ supabaseUrl: apiUrl
239909
+ });
239910
+ }
239846
239911
  setAuthToken(token) {
239847
239912
  this.core.setAuthToken(token);
239848
239913
  }
@@ -239904,17 +239969,26 @@ class McpCoreService {
239904
239969
  }
239905
239970
  }
239906
239971
  var mcpCoreService = new McpCoreService;
239907
- // node_modules/@enactprotocol/shared/dist/lib/enact-direct.js
239972
+ // ../shared/dist/lib/enact-direct.js
239908
239973
  class EnactDirect {
239909
239974
  constructor(options = {}) {
239910
239975
  this.core = new EnactCore({
239911
- apiUrl: options.apiUrl || process.env.ENACT_API_URL || "https://enact.tools",
239912
- supabaseUrl: options.supabaseUrl || process.env.ENACT_SUPABASE_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
239976
+ apiUrl: options.apiUrl || process.env.ENACT_FRONTEND_URL || "https://enact.tools",
239977
+ supabaseUrl: options.supabaseUrl || process.env.ENACT_API_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
239913
239978
  executionProvider: "direct",
239914
239979
  authToken: options.authToken || process.env.ENACT_AUTH_TOKEN,
239915
239980
  defaultTimeout: options.defaultTimeout || "30s"
239916
239981
  });
239917
239982
  }
239983
+ static async create(options = {}) {
239984
+ const frontendUrl = options.apiUrl || process.env.ENACT_FRONTEND_URL || await getFrontendUrl();
239985
+ const apiUrl = options.supabaseUrl || process.env.ENACT_API_URL || await getApiUrl();
239986
+ return new EnactDirect({
239987
+ ...options,
239988
+ apiUrl: frontendUrl,
239989
+ supabaseUrl: apiUrl
239990
+ });
239991
+ }
239918
239992
  async executeToolByName(name, inputs = {}, options = {}) {
239919
239993
  return this.core.executeToolByName(name, inputs, options);
239920
239994
  }
@@ -239966,8 +240040,8 @@ if (true) {
239966
240040
  }
239967
240041
  }
239968
240042
  var enactCore = new EnactCore({
239969
- apiUrl: process.env.ENACT_API_URL || "https://enact.tools",
239970
- supabaseUrl: process.env.ENACT_SUPABASE_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
240043
+ apiUrl: process.env.ENACT_FRONTEND_URL || "https://enact.tools",
240044
+ supabaseUrl: process.env.ENACT_API_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
239971
240045
  executionProvider: process.env.ENACT_EXECUTION_PROVIDER || "dagger",
239972
240046
  authToken: process.env.ENACT_AUTH_TOKEN,
239973
240047
  defaultTimeout: "120s"