@wezzard/mcp-relay 0.17.1 → 0.18.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.
package/dist/server.mjs CHANGED
@@ -27,9 +27,9 @@ var __export = (target, all) => {
27
27
  };
28
28
  var __copyProps = (to, from, except, desc) => {
29
29
  if (from && typeof from === "object" || typeof from === "function") {
30
- for (let key of __getOwnPropNames(from))
31
- if (!__hasOwnProp.call(to, key) && key !== except)
32
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ for (let key2 of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key2) && key2 !== except)
32
+ __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
33
33
  }
34
34
  return to;
35
35
  };
@@ -178,15 +178,15 @@ var require_code = __commonJS({
178
178
  return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
179
179
  }
180
180
  exports.safeStringify = safeStringify;
181
- function getProperty(key) {
182
- return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;
181
+ function getProperty(key2) {
182
+ return typeof key2 == "string" && exports.IDENTIFIER.test(key2) ? new _Code(`.${key2}`) : _`[${key2}]`;
183
183
  }
184
184
  exports.getProperty = getProperty;
185
- function getEsmExportName(key) {
186
- if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
187
- return new _Code(`${key}`);
185
+ function getEsmExportName(key2) {
186
+ if (typeof key2 == "string" && exports.IDENTIFIER.test(key2)) {
187
+ return new _Code(`${key2}`);
188
188
  }
189
- throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
189
+ throw new Error(`CodeGen: invalid export name: ${key2}, use explicit $id name mapping`);
190
190
  }
191
191
  exports.getEsmExportName = getEsmExportName;
192
192
  function regexpCode(rx) {
@@ -813,11 +813,11 @@ var require_codegen = __commonJS({
813
813
  // returns code for object literal for the passed argument list of key-value pairs
814
814
  object(...keyValues) {
815
815
  const code = ["{"];
816
- for (const [key, value] of keyValues) {
816
+ for (const [key2, value] of keyValues) {
817
817
  if (code.length > 1)
818
818
  code.push(",");
819
- code.push(key);
820
- if (key !== value || this.opts.es5) {
819
+ code.push(key2);
820
+ if (key2 !== value || this.opts.es5) {
821
821
  code.push(":");
822
822
  (0, code_1.addCodeArg)(code, value);
823
823
  }
@@ -1092,17 +1092,17 @@ var require_util = __commonJS({
1092
1092
  if (typeof schema === "boolean")
1093
1093
  return;
1094
1094
  const rules = self.RULES.keywords;
1095
- for (const key in schema) {
1096
- if (!rules[key])
1097
- checkStrictMode(it, `unknown keyword: "${key}"`);
1095
+ for (const key2 in schema) {
1096
+ if (!rules[key2])
1097
+ checkStrictMode(it, `unknown keyword: "${key2}"`);
1098
1098
  }
1099
1099
  }
1100
1100
  exports.checkUnknownRules = checkUnknownRules;
1101
1101
  function schemaHasRules(schema, rules) {
1102
1102
  if (typeof schema == "boolean")
1103
1103
  return !schema;
1104
- for (const key in schema)
1105
- if (rules[key])
1104
+ for (const key2 in schema)
1105
+ if (rules[key2])
1106
1106
  return true;
1107
1107
  return false;
1108
1108
  }
@@ -1110,8 +1110,8 @@ var require_util = __commonJS({
1110
1110
  function schemaHasRulesButRef(schema, RULES) {
1111
1111
  if (typeof schema == "boolean")
1112
1112
  return !schema;
1113
- for (const key in schema)
1114
- if (key !== "$ref" && RULES.all[key])
1113
+ for (const key2 in schema)
1114
+ if (key2 !== "$ref" && RULES.all[key2])
1115
1115
  return true;
1116
1116
  return false;
1117
1117
  }
@@ -1689,8 +1689,8 @@ var require_defaults = __commonJS({
1689
1689
  function assignDefaults(it, ty) {
1690
1690
  const { properties, items } = it.schema;
1691
1691
  if (ty === "object" && properties) {
1692
- for (const key in properties) {
1693
- assignDefault(it, key, properties[key].default);
1692
+ for (const key2 in properties) {
1693
+ assignDefault(it, key2, properties[key2].default);
1694
1694
  }
1695
1695
  } else if (ty === "array" && Array.isArray(items)) {
1696
1696
  items.forEach((sch, i) => assignDefault(it, i, sch.default));
@@ -2074,8 +2074,8 @@ var require_fast_deep_equal = __commonJS({
2074
2074
  for (i = length; i-- !== 0; )
2075
2075
  if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
2076
2076
  for (i = length; i-- !== 0; ) {
2077
- var key = keys[i];
2078
- if (!equal(a[key], b[key])) return false;
2077
+ var key2 = keys[i];
2078
+ if (!equal(a[key2], b[key2])) return false;
2079
2079
  }
2080
2080
  return true;
2081
2081
  }
@@ -2147,20 +2147,20 @@ var require_json_schema_traverse = __commonJS({
2147
2147
  function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
2148
2148
  if (schema && typeof schema == "object" && !Array.isArray(schema)) {
2149
2149
  pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
2150
- for (var key in schema) {
2151
- var sch = schema[key];
2150
+ for (var key2 in schema) {
2151
+ var sch = schema[key2];
2152
2152
  if (Array.isArray(sch)) {
2153
- if (key in traverse.arrayKeywords) {
2153
+ if (key2 in traverse.arrayKeywords) {
2154
2154
  for (var i = 0; i < sch.length; i++)
2155
- _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
2155
+ _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key2 + "/" + i, rootSchema, jsonPtr, key2, schema, i);
2156
2156
  }
2157
- } else if (key in traverse.propsKeywords) {
2157
+ } else if (key2 in traverse.propsKeywords) {
2158
2158
  if (sch && typeof sch == "object") {
2159
2159
  for (var prop in sch)
2160
- _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
2160
+ _traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key2 + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key2, schema, prop);
2161
2161
  }
2162
- } else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
2163
- _traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
2162
+ } else if (key2 in traverse.keywords || opts.allKeys && !(key2 in traverse.skipKeywords)) {
2163
+ _traverse(opts, pre, post, sch, jsonPtr + "/" + key2, rootSchema, jsonPtr, key2, schema);
2164
2164
  }
2165
2165
  }
2166
2166
  post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
@@ -2217,10 +2217,10 @@ var require_resolve = __commonJS({
2217
2217
  "$dynamicAnchor"
2218
2218
  ]);
2219
2219
  function hasRef(schema) {
2220
- for (const key in schema) {
2221
- if (REF_KEYWORDS.has(key))
2220
+ for (const key2 in schema) {
2221
+ if (REF_KEYWORDS.has(key2))
2222
2222
  return true;
2223
- const sch = schema[key];
2223
+ const sch = schema[key2];
2224
2224
  if (Array.isArray(sch) && sch.some(hasRef))
2225
2225
  return true;
2226
2226
  if (typeof sch == "object" && hasRef(sch))
@@ -2230,14 +2230,14 @@ var require_resolve = __commonJS({
2230
2230
  }
2231
2231
  function countKeys(schema) {
2232
2232
  let count = 0;
2233
- for (const key in schema) {
2234
- if (key === "$ref")
2233
+ for (const key2 in schema) {
2234
+ if (key2 === "$ref")
2235
2235
  return Infinity;
2236
2236
  count++;
2237
- if (SIMPLE_INLINED.has(key))
2237
+ if (SIMPLE_INLINED.has(key2))
2238
2238
  continue;
2239
- if (typeof schema[key] == "object") {
2240
- (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));
2239
+ if (typeof schema[key2] == "object") {
2240
+ (0, util_1.eachItem)(schema[key2], (sch) => count += countKeys(sch));
2241
2241
  }
2242
2242
  if (count === Infinity)
2243
2243
  return Infinity;
@@ -2426,8 +2426,8 @@ var require_validate = __commonJS({
2426
2426
  function schemaCxtHasRules({ schema, self }) {
2427
2427
  if (typeof schema == "boolean")
2428
2428
  return !schema;
2429
- for (const key in schema)
2430
- if (self.RULES.all[key])
2429
+ for (const key2 in schema)
2430
+ if (self.RULES.all[key2])
2431
2431
  return true;
2432
2432
  return false;
2433
2433
  }
@@ -3496,7 +3496,7 @@ var require_utils = __commonJS({
3496
3496
  function encodeUserinfo(input) {
3497
3497
  return encodeComponent(input, isUserinfoCharacter);
3498
3498
  }
3499
- function encodeQuery(input) {
3499
+ function encodeQuery2(input) {
3500
3500
  return encodeComponent(input, isQueryFragmentCharacter);
3501
3501
  }
3502
3502
  function encodeFragment(input) {
@@ -3602,7 +3602,7 @@ var require_utils = __commonJS({
3602
3602
  serializePathEncoding,
3603
3603
  normalizeQueryFragmentEncoding,
3604
3604
  encodeUserinfo,
3605
- encodeQuery,
3605
+ encodeQuery: encodeQuery2,
3606
3606
  encodeFragment,
3607
3607
  escapePreservingEscapes,
3608
3608
  removeDotSegments,
@@ -3829,7 +3829,7 @@ var require_schemes = __commonJS({
3829
3829
  var require_fast_uri = __commonJS({
3830
3830
  "node_modules/fast-uri/index.js"(exports, module) {
3831
3831
  "use strict";
3832
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3832
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery: encodeQuery2, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3833
3833
  var { SCHEMES, getSchemeHandler } = require_schemes();
3834
3834
  var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
3835
3835
  var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
@@ -4002,7 +4002,7 @@ var require_fast_uri = __commonJS({
4002
4002
  uriTokens.push(s);
4003
4003
  }
4004
4004
  if (component.query !== void 0) {
4005
- uriTokens.push("?", encodeQuery(component.query));
4005
+ uriTokens.push("?", encodeQuery2(component.query));
4006
4006
  }
4007
4007
  if (component.fragment !== void 0) {
4008
4008
  uriTokens.push("#", encodeFragment(component.fragment));
@@ -4465,7 +4465,7 @@ var require_core = __commonJS({
4465
4465
  }
4466
4466
  }
4467
4467
  // Adds schema to the instance
4468
- addSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {
4468
+ addSchema(schema, key2, _meta, _validateSchema = this.opts.validateSchema) {
4469
4469
  if (Array.isArray(schema)) {
4470
4470
  for (const sch of schema)
4471
4471
  this.addSchema(sch, void 0, _meta, _validateSchema);
@@ -4479,15 +4479,15 @@ var require_core = __commonJS({
4479
4479
  throw new Error(`schema ${schemaId} must be string`);
4480
4480
  }
4481
4481
  }
4482
- key = (0, resolve_1.normalizeId)(key || id2);
4483
- this._checkUnique(key);
4484
- this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);
4482
+ key2 = (0, resolve_1.normalizeId)(key2 || id2);
4483
+ this._checkUnique(key2);
4484
+ this.schemas[key2] = this._addSchema(schema, _meta, key2, _validateSchema, true);
4485
4485
  return this;
4486
4486
  }
4487
4487
  // Add schema that will be used to validate other schemas
4488
4488
  // options in META_IGNORE_OPTIONS are alway set to false
4489
- addMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {
4490
- this.addSchema(schema, key, true, _validateSchema);
4489
+ addMetaSchema(schema, key2, _validateSchema = this.opts.validateSchema) {
4490
+ this.addSchema(schema, key2, true, _validateSchema);
4491
4491
  return this;
4492
4492
  }
4493
4493
  // Validate schema against its meta-schema
@@ -4643,14 +4643,14 @@ var require_core = __commonJS({
4643
4643
  let keywords = metaSchema;
4644
4644
  for (const seg of segments)
4645
4645
  keywords = keywords[seg];
4646
- for (const key in rules) {
4647
- const rule = rules[key];
4646
+ for (const key2 in rules) {
4647
+ const rule = rules[key2];
4648
4648
  if (typeof rule != "object")
4649
4649
  continue;
4650
4650
  const { $data } = rule.definition;
4651
- const schema = keywords[key];
4651
+ const schema = keywords[key2];
4652
4652
  if ($data && schema)
4653
- keywords[key] = schemaOrData(schema);
4653
+ keywords[key2] = schemaOrData(schema);
4654
4654
  }
4655
4655
  }
4656
4656
  return metaSchema;
@@ -4723,10 +4723,10 @@ var require_core = __commonJS({
4723
4723
  Ajv2.MissingRefError = ref_error_1.default;
4724
4724
  exports.default = Ajv2;
4725
4725
  function checkOptions(checkOpts, options, msg, log = "error") {
4726
- for (const key in checkOpts) {
4727
- const opt = key;
4726
+ for (const key2 in checkOpts) {
4727
+ const opt = key2;
4728
4728
  if (opt in options)
4729
- this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);
4729
+ this.logger[log](`${msg}: option ${key2}. ${checkOpts[opt]}`);
4730
4730
  }
4731
4731
  }
4732
4732
  function getSchEnv(keyRef) {
@@ -4740,8 +4740,8 @@ var require_core = __commonJS({
4740
4740
  if (Array.isArray(optsSchemas))
4741
4741
  this.addSchema(optsSchemas);
4742
4742
  else
4743
- for (const key in optsSchemas)
4744
- this.addSchema(optsSchemas[key], key);
4743
+ for (const key2 in optsSchemas)
4744
+ this.addSchema(optsSchemas[key2], key2);
4745
4745
  }
4746
4746
  function addInitialFormats() {
4747
4747
  for (const name in this.opts.formats) {
@@ -5789,11 +5789,11 @@ var require_dependencies = __commonJS({
5789
5789
  function splitDependencies({ schema }) {
5790
5790
  const propertyDeps = {};
5791
5791
  const schemaDeps = {};
5792
- for (const key in schema) {
5793
- if (key === "__proto__")
5792
+ for (const key2 in schema) {
5793
+ if (key2 === "__proto__")
5794
5794
  continue;
5795
- const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;
5796
- deps[key] = schema[key];
5795
+ const deps = Array.isArray(schema[key2]) ? propertyDeps : schemaDeps;
5796
+ deps[key2] = schema[key2];
5797
5797
  }
5798
5798
  return [propertyDeps, schemaDeps];
5799
5799
  }
@@ -5870,13 +5870,13 @@ var require_propertyNames = __commonJS({
5870
5870
  if ((0, util_1.alwaysValidSchema)(it, schema))
5871
5871
  return;
5872
5872
  const valid = gen.name("valid");
5873
- gen.forIn("key", data, (key) => {
5874
- cxt.setParams({ propertyName: key });
5873
+ gen.forIn("key", data, (key2) => {
5874
+ cxt.setParams({ propertyName: key2 });
5875
5875
  cxt.subschema({
5876
5876
  keyword: "propertyNames",
5877
- data: key,
5877
+ data: key2,
5878
5878
  dataTypes: ["string"],
5879
- propertyName: key,
5879
+ propertyName: key2,
5880
5880
  compositeRule: true
5881
5881
  }, valid);
5882
5882
  gen.if((0, codegen_1.not)(valid), () => {
@@ -5925,38 +5925,38 @@ var require_additionalProperties = __commonJS({
5925
5925
  checkAdditionalProperties();
5926
5926
  cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
5927
5927
  function checkAdditionalProperties() {
5928
- gen.forIn("key", data, (key) => {
5928
+ gen.forIn("key", data, (key2) => {
5929
5929
  if (!props.length && !patProps.length)
5930
- additionalPropertyCode(key);
5930
+ additionalPropertyCode(key2);
5931
5931
  else
5932
- gen.if(isAdditional(key), () => additionalPropertyCode(key));
5932
+ gen.if(isAdditional(key2), () => additionalPropertyCode(key2));
5933
5933
  });
5934
5934
  }
5935
- function isAdditional(key) {
5935
+ function isAdditional(key2) {
5936
5936
  let definedProp;
5937
5937
  if (props.length > 8) {
5938
5938
  const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
5939
- definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
5939
+ definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key2);
5940
5940
  } else if (props.length) {
5941
- definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
5941
+ definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key2} === ${p}`));
5942
5942
  } else {
5943
5943
  definedProp = codegen_1.nil;
5944
5944
  }
5945
5945
  if (patProps.length) {
5946
- definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
5946
+ definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key2})`));
5947
5947
  }
5948
5948
  return (0, codegen_1.not)(definedProp);
5949
5949
  }
5950
- function deleteAdditional(key) {
5951
- gen.code((0, codegen_1._)`delete ${data}[${key}]`);
5950
+ function deleteAdditional(key2) {
5951
+ gen.code((0, codegen_1._)`delete ${data}[${key2}]`);
5952
5952
  }
5953
- function additionalPropertyCode(key) {
5953
+ function additionalPropertyCode(key2) {
5954
5954
  if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
5955
- deleteAdditional(key);
5955
+ deleteAdditional(key2);
5956
5956
  return;
5957
5957
  }
5958
5958
  if (schema === false) {
5959
- cxt.setParams({ additionalProperty: key });
5959
+ cxt.setParams({ additionalProperty: key2 });
5960
5960
  cxt.error();
5961
5961
  if (!allErrors)
5962
5962
  gen.break();
@@ -5965,22 +5965,22 @@ var require_additionalProperties = __commonJS({
5965
5965
  if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
5966
5966
  const valid = gen.name("valid");
5967
5967
  if (opts.removeAdditional === "failing") {
5968
- applyAdditionalSchema(key, valid, false);
5968
+ applyAdditionalSchema(key2, valid, false);
5969
5969
  gen.if((0, codegen_1.not)(valid), () => {
5970
5970
  cxt.reset();
5971
- deleteAdditional(key);
5971
+ deleteAdditional(key2);
5972
5972
  });
5973
5973
  } else {
5974
- applyAdditionalSchema(key, valid);
5974
+ applyAdditionalSchema(key2, valid);
5975
5975
  if (!allErrors)
5976
5976
  gen.if((0, codegen_1.not)(valid), () => gen.break());
5977
5977
  }
5978
5978
  }
5979
5979
  }
5980
- function applyAdditionalSchema(key, valid, errors) {
5980
+ function applyAdditionalSchema(key2, valid, errors) {
5981
5981
  const subschema = {
5982
5982
  keyword: "additionalProperties",
5983
- dataProp: key,
5983
+ dataProp: key2,
5984
5984
  dataPropType: util_1.Type.Str
5985
5985
  };
5986
5986
  if (errors === false) {
@@ -6105,19 +6105,19 @@ var require_patternProperties = __commonJS({
6105
6105
  }
6106
6106
  }
6107
6107
  function validateProperties(pat) {
6108
- gen.forIn("key", data, (key) => {
6109
- gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {
6108
+ gen.forIn("key", data, (key2) => {
6109
+ gen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key2})`, () => {
6110
6110
  const alwaysValid = alwaysValidPatterns.includes(pat);
6111
6111
  if (!alwaysValid) {
6112
6112
  cxt.subschema({
6113
6113
  keyword: "patternProperties",
6114
6114
  schemaProp: pat,
6115
- dataProp: key,
6115
+ dataProp: key2,
6116
6116
  dataPropType: util_2.Type.Str
6117
6117
  }, valid);
6118
6118
  }
6119
6119
  if (it.opts.unevaluated && props !== true) {
6120
- gen.assign((0, codegen_1._)`${props}[${key}]`, true);
6120
+ gen.assign((0, codegen_1._)`${props}[${key2}]`, true);
6121
6121
  } else if (!alwaysValid && !it.allErrors) {
6122
6122
  gen.if((0, codegen_1.not)(valid), () => gen.break());
6123
6123
  }
@@ -7600,9 +7600,9 @@ function floatSafeRemainder(val, step2) {
7600
7600
  return ratio - roundedRatio;
7601
7601
  }
7602
7602
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
7603
- function defineLazy(object6, key, getter) {
7603
+ function defineLazy(object6, key2, getter) {
7604
7604
  let value = void 0;
7605
- Object.defineProperty(object6, key, {
7605
+ Object.defineProperty(object6, key2, {
7606
7606
  get() {
7607
7607
  if (value === EVALUATING) {
7608
7608
  return void 0;
@@ -7614,7 +7614,7 @@ function defineLazy(object6, key, getter) {
7614
7614
  return value;
7615
7615
  },
7616
7616
  set(v) {
7617
- Object.defineProperty(object6, key, {
7617
+ Object.defineProperty(object6, key2, {
7618
7618
  value: v
7619
7619
  // configurable: true,
7620
7620
  });
@@ -7640,47 +7640,47 @@ function rawShape(def) {
7640
7640
  function sourceShape(schema) {
7641
7641
  return rawShape(schema._zod.def) ?? schema._zod.def.shape;
7642
7642
  }
7643
- function deferProp(target, key, getter) {
7644
- Object.defineProperty(target, key, {
7643
+ function deferProp(target, key2, getter) {
7644
+ Object.defineProperty(target, key2, {
7645
7645
  get() {
7646
7646
  const value = getter();
7647
- assignProp(this, key, value);
7647
+ assignProp(this, key2, value);
7648
7648
  return value;
7649
7649
  },
7650
7650
  enumerable: true,
7651
7651
  configurable: true
7652
7652
  });
7653
7653
  }
7654
- function putProp(target, key, value) {
7655
- if (key in target)
7656
- assignProp(target, key, value);
7654
+ function putProp(target, key2, value) {
7655
+ if (key2 in target)
7656
+ assignProp(target, key2, value);
7657
7657
  else
7658
- target[key] = value;
7658
+ target[key2] = value;
7659
7659
  }
7660
7660
  function mirrorShape(target, source, keys, wrap) {
7661
7661
  const raw = sourceShape(source);
7662
- for (const key of keys) {
7663
- const desc = Object.getOwnPropertyDescriptor(raw, key);
7662
+ for (const key2 of keys) {
7663
+ const desc = Object.getOwnPropertyDescriptor(raw, key2);
7664
7664
  if (!desc.enumerable)
7665
7665
  continue;
7666
7666
  if (desc.get) {
7667
- deferProp(target, key, () => {
7668
- const value = source._zod.def.shape[key];
7669
- return wrap ? wrap(value, key) : value;
7667
+ deferProp(target, key2, () => {
7668
+ const value = source._zod.def.shape[key2];
7669
+ return wrap ? wrap(value, key2) : value;
7670
7670
  });
7671
7671
  } else
7672
- putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
7672
+ putProp(target, key2, wrap ? wrap(desc.value, key2) : desc.value);
7673
7673
  }
7674
7674
  }
7675
7675
  function mirrorProps(target, source) {
7676
- for (const key of Reflect.ownKeys(source)) {
7677
- const desc = Object.getOwnPropertyDescriptor(source, key);
7676
+ for (const key2 of Reflect.ownKeys(source)) {
7677
+ const desc = Object.getOwnPropertyDescriptor(source, key2);
7678
7678
  if (!desc.enumerable)
7679
7679
  continue;
7680
7680
  if (desc.get)
7681
- deferProp(target, key, () => source[key]);
7681
+ deferProp(target, key2, () => source[key2]);
7682
7682
  else
7683
- putProp(target, key, desc.value);
7683
+ putProp(target, key2, desc.value);
7684
7684
  }
7685
7685
  }
7686
7686
  function mergeDefs(...defs) {
@@ -7697,11 +7697,11 @@ function cloneDef(schema) {
7697
7697
  function getElementAtPath(obj, path) {
7698
7698
  if (!path)
7699
7699
  return obj;
7700
- return path.reduce((acc, key) => acc?.[key], obj);
7700
+ return path.reduce((acc, key2) => acc?.[key2], obj);
7701
7701
  }
7702
7702
  function promiseAllObject(promisesObj) {
7703
7703
  const keys = Object.keys(promisesObj);
7704
- const promises = keys.map((key) => promisesObj[key]);
7704
+ const promises = keys.map((key2) => promisesObj[key2]);
7705
7705
  return Promise.all(promises).then((results) => {
7706
7706
  const resolvedObj = {};
7707
7707
  for (let i = 0; i < keys.length; i++) {
@@ -7773,8 +7773,8 @@ function shallowClone(o) {
7773
7773
  }
7774
7774
  function numKeys(data) {
7775
7775
  let keyCount = 0;
7776
- for (const key in data) {
7777
- if (Object.prototype.hasOwnProperty.call(data, key)) {
7776
+ for (const key2 in data) {
7777
+ if (Object.prototype.hasOwnProperty.call(data, key2)) {
7778
7778
  keyCount++;
7779
7779
  }
7780
7780
  }
@@ -7928,12 +7928,12 @@ function pick(schema, mask) {
7928
7928
  function maskedKeys(schema, mask) {
7929
7929
  const raw = sourceShape(schema);
7930
7930
  const keys = [];
7931
- for (const key of Reflect.ownKeys(mask)) {
7932
- if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {
7933
- throw new Error(`Unrecognized key: "${String(key)}"`);
7931
+ for (const key2 of Reflect.ownKeys(mask)) {
7932
+ if (!Object.getOwnPropertyDescriptor(raw, key2)?.enumerable) {
7933
+ throw new Error(`Unrecognized key: "${String(key2)}"`);
7934
7934
  }
7935
- if (mask[key])
7936
- keys.push(key);
7935
+ if (mask[key2])
7936
+ keys.push(key2);
7937
7937
  }
7938
7938
  return keys;
7939
7939
  }
@@ -7946,7 +7946,7 @@ function omit(schema, mask) {
7946
7946
  }
7947
7947
  const omitted = new Set(maskedKeys(schema, mask));
7948
7948
  const newShape = {};
7949
- mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
7949
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key2) => !omitted.has(key2)));
7950
7950
  return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
7951
7951
  }
7952
7952
  function extend(schema, shape) {
@@ -7957,8 +7957,8 @@ function extend(schema, shape) {
7957
7957
  const hasChecks = checks && checks.length > 0;
7958
7958
  if (hasChecks) {
7959
7959
  const existingShape = sourceShape(schema);
7960
- for (const key of Reflect.ownKeys(shape)) {
7961
- if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) {
7960
+ for (const key2 of Reflect.ownKeys(shape)) {
7961
+ if (Object.getOwnPropertyDescriptor(existingShape, key2) !== void 0) {
7962
7962
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
7963
7963
  }
7964
7964
  }
@@ -8005,15 +8005,15 @@ function partial(Class2, schema, mask, name = "partial") {
8005
8005
  }
8006
8006
  const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
8007
8007
  const newShape = {};
8008
- mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class2 && ((value, key) => selected && !selected.has(key) ? value : new Class2({ type: "optional", innerType: value })));
8008
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class2 && ((value, key2) => selected && !selected.has(key2) ? value : new Class2({ type: "optional", innerType: value })));
8009
8009
  return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
8010
8010
  }
8011
8011
  function required(Class2, schema, mask) {
8012
8012
  const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
8013
8013
  const newShape = {};
8014
- mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => (
8014
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key2) => (
8015
8015
  // overwrite with non-optional
8016
- selected && !selected.has(key) ? value : new Class2({ type: "nonoptional", innerType: value })
8016
+ selected && !selected.has(key2) ? value : new Class2({ type: "nonoptional", innerType: value })
8017
8017
  ));
8018
8018
  return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));
8019
8019
  }
@@ -8188,46 +8188,46 @@ var Class = class {
8188
8188
  }
8189
8189
  };
8190
8190
  function members(proto, table2) {
8191
- for (const key in table2) {
8192
- const desc = Object.getOwnPropertyDescriptor(table2, key);
8191
+ for (const key2 in table2) {
8192
+ const desc = Object.getOwnPropertyDescriptor(table2, key2);
8193
8193
  if (desc.get)
8194
- Object.defineProperty(proto, key, { ...desc, enumerable: false });
8194
+ Object.defineProperty(proto, key2, { ...desc, enumerable: false });
8195
8195
  else
8196
- defineBound(proto, key, desc.value);
8196
+ defineBound(proto, key2, desc.value);
8197
8197
  }
8198
8198
  }
8199
- function own(inst, key, value, enumerable = true) {
8200
- Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });
8199
+ function own(inst, key2, value, enumerable = true) {
8200
+ Object.defineProperty(inst, key2, { configurable: true, writable: true, enumerable, value });
8201
8201
  return value;
8202
8202
  }
8203
- function hide(inst, key, value) {
8204
- return own(inst, key, value, false);
8203
+ function hide(inst, key2, value) {
8204
+ return own(inst, key2, value, false);
8205
8205
  }
8206
8206
  // @__NO_SIDE_EFFECTS__
8207
8207
  function derived(computes, table2) {
8208
- for (const key in computes) {
8209
- const compute = computes[key];
8210
- Object.defineProperty(table2, key, {
8208
+ for (const key2 in computes) {
8209
+ const compute = computes[key2];
8210
+ Object.defineProperty(table2, key2, {
8211
8211
  configurable: true,
8212
8212
  enumerable: true,
8213
8213
  get() {
8214
- return own(this, key, compute(this));
8214
+ return own(this, key2, compute(this));
8215
8215
  },
8216
8216
  set(value) {
8217
- own(this, key, value);
8217
+ own(this, key2, value);
8218
8218
  }
8219
8219
  });
8220
8220
  }
8221
8221
  return table2;
8222
8222
  }
8223
- function defineBound(proto, key, fn) {
8224
- Object.defineProperty(proto, key, {
8223
+ function defineBound(proto, key2, fn) {
8224
+ Object.defineProperty(proto, key2, {
8225
8225
  configurable: true,
8226
8226
  get() {
8227
- return this == null ? fn : own(this, key, fn.bind(this));
8227
+ return this == null ? fn : own(this, key2, fn.bind(this));
8228
8228
  },
8229
8229
  set(value) {
8230
- own(this, key, value);
8230
+ own(this, key2, value);
8231
8231
  }
8232
8232
  });
8233
8233
  }
@@ -8244,53 +8244,53 @@ var breaker = {
8244
8244
  return void 0;
8245
8245
  }
8246
8246
  };
8247
- function defineLazyInternal(inst, key, compute) {
8247
+ function defineLazyInternal(inst, key2, compute) {
8248
8248
  const proto = Object.getPrototypeOf(inst._zod);
8249
- if (key in proto && installing !== inst._zod) {
8249
+ if (key2 in proto && installing !== inst._zod) {
8250
8250
  installing = void 0;
8251
8251
  return;
8252
8252
  }
8253
8253
  installing = inst._zod;
8254
- Object.defineProperty(proto, key, {
8254
+ Object.defineProperty(proto, key2, {
8255
8255
  configurable: true,
8256
8256
  get() {
8257
- Object.defineProperty(this, key, breaker);
8257
+ Object.defineProperty(this, key2, breaker);
8258
8258
  const outer = broke;
8259
8259
  broke = false;
8260
8260
  try {
8261
8261
  const value = compute(this);
8262
8262
  if (broke)
8263
- delete this[key];
8263
+ delete this[key2];
8264
8264
  else
8265
- Object.defineProperty(this, key, { configurable: true, writable: true, value });
8265
+ Object.defineProperty(this, key2, { configurable: true, writable: true, value });
8266
8266
  broke = broke || outer;
8267
8267
  return value;
8268
8268
  } catch (err) {
8269
- delete this[key];
8269
+ delete this[key2];
8270
8270
  broke = broke || outer;
8271
8271
  throw err;
8272
8272
  }
8273
8273
  },
8274
8274
  set(value) {
8275
- Object.defineProperty(this, key, { configurable: true, writable: true, value });
8275
+ Object.defineProperty(this, key2, { configurable: true, writable: true, value });
8276
8276
  }
8277
8277
  });
8278
8278
  }
8279
- function installLazyProp(inst, key, make, enumerable) {
8280
- const proto = claim(inst, key);
8279
+ function installLazyProp(inst, key2, make, enumerable) {
8280
+ const proto = claim(inst, key2);
8281
8281
  if (!proto)
8282
8282
  return;
8283
- Object.defineProperty(proto, key, {
8283
+ Object.defineProperty(proto, key2, {
8284
8284
  configurable: true,
8285
8285
  get() {
8286
8286
  const desc = { configurable: true, writable: true, enumerable, value: void 0 };
8287
- Object.defineProperty(this, key, desc);
8287
+ Object.defineProperty(this, key2, desc);
8288
8288
  desc.value = make(this);
8289
- Object.defineProperty(this, key, desc);
8289
+ Object.defineProperty(this, key2, desc);
8290
8290
  return desc.value;
8291
8291
  },
8292
8292
  set(value) {
8293
- Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value });
8293
+ Object.defineProperty(this, key2, { configurable: true, writable: true, enumerable, value });
8294
8294
  }
8295
8295
  });
8296
8296
  }
@@ -8463,15 +8463,15 @@ var $ZodError = $constructor("$ZodError", initializer);
8463
8463
  var $ZodRealError = $constructor("$ZodError", initializer, void 0, {
8464
8464
  Parent: Error
8465
8465
  });
8466
- function node(obj, key, make) {
8467
- if (!Object.prototype.hasOwnProperty.call(obj, key)) {
8468
- if (key === "__proto__") {
8469
- Object.defineProperty(obj, key, { value: make(), writable: true, enumerable: true, configurable: true });
8466
+ function node(obj, key2, make) {
8467
+ if (!Object.prototype.hasOwnProperty.call(obj, key2)) {
8468
+ if (key2 === "__proto__") {
8469
+ Object.defineProperty(obj, key2, { value: make(), writable: true, enumerable: true, configurable: true });
8470
8470
  } else {
8471
- obj[key] = make();
8471
+ obj[key2] = make();
8472
8472
  }
8473
8473
  }
8474
- return obj[key];
8474
+ return obj[key2];
8475
8475
  }
8476
8476
  function flattenError(error2, mapper = (issue2) => issue2.message) {
8477
8477
  const fieldErrors = {};
@@ -9725,8 +9725,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
9725
9725
  return payload;
9726
9726
  };
9727
9727
  });
9728
- function handlePropertyResult(result2, final, key, input, optin, optout) {
9729
- const isPresent = key in input;
9728
+ function handlePropertyResult(result2, final, key2, input, optin, optout) {
9729
+ const isPresent = key2 in input;
9730
9730
  const isOptionalOut = optout === "optional";
9731
9731
  if (!isPresent && isOptionalOut && optin === "optional") {
9732
9732
  return;
@@ -9735,7 +9735,7 @@ function handlePropertyResult(result2, final, key, input, optin, optout) {
9735
9735
  if (optin !== void 0 && isOptionalOut && !isPresent) {
9736
9736
  return;
9737
9737
  }
9738
- final.issues.push(...prefixIssues(key, result2.issues));
9738
+ final.issues.push(...prefixIssues(key2, result2.issues));
9739
9739
  }
9740
9740
  if (!isPresent && optin === void 0) {
9741
9741
  if (!result2.issues.length) {
@@ -9743,17 +9743,17 @@ function handlePropertyResult(result2, final, key, input, optin, optout) {
9743
9743
  code: "invalid_type",
9744
9744
  expected: "nonoptional",
9745
9745
  input: void 0,
9746
- path: [key]
9746
+ path: [key2]
9747
9747
  });
9748
9748
  }
9749
9749
  return;
9750
9750
  }
9751
9751
  if (result2.value === void 0) {
9752
9752
  if (isPresent || optin === "defaulted" && !isOptionalOut) {
9753
- final.value[key] = void 0;
9753
+ final.value[key2] = void 0;
9754
9754
  }
9755
9755
  } else {
9756
- final.value[key] = result2.value;
9756
+ final.value[key2] = result2.value;
9757
9757
  }
9758
9758
  }
9759
9759
  var NO_SYMBOL_KEYS = [];
@@ -9786,28 +9786,28 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
9786
9786
  const optin = _catchall.optin;
9787
9787
  const optout = _catchall.optout;
9788
9788
  let seen = 0;
9789
- for (const key in input) {
9789
+ for (const key2 in input) {
9790
9790
  if (abortEarly && payload.issues.length !== seen) {
9791
9791
  if (aborted(payload, seen))
9792
9792
  break;
9793
9793
  seen = payload.issues.length;
9794
9794
  }
9795
- if (keySet.has(key))
9795
+ if (keySet.has(key2))
9796
9796
  continue;
9797
- if (key === "__proto__") {
9797
+ if (key2 === "__proto__") {
9798
9798
  if (t === "never")
9799
- unrecognized.push(key);
9799
+ unrecognized.push(key2);
9800
9800
  continue;
9801
9801
  }
9802
9802
  if (t === "never") {
9803
- unrecognized.push(key);
9803
+ unrecognized.push(key2);
9804
9804
  continue;
9805
9805
  }
9806
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
9806
+ const r = _catchall.run({ value: input[key2], issues: [] }, ctx);
9807
9807
  if (r instanceof Promise) {
9808
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, optin, optout)));
9808
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key2, input, optin, optout)));
9809
9809
  } else {
9810
- handlePropertyResult(r, payload, key, input, optin, optout);
9810
+ handlePropertyResult(r, payload, key2, input, optin, optout);
9811
9811
  }
9812
9812
  }
9813
9813
  if (unrecognized.length) {
@@ -9844,16 +9844,16 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
9844
9844
  defineLazyInternal(inst, "propValues", (zod) => {
9845
9845
  const shape = zod.def.shape;
9846
9846
  const propValues = {};
9847
- for (const key in shape) {
9848
- const field = shape[key]._zod;
9847
+ for (const key2 in shape) {
9848
+ const field = shape[key2]._zod;
9849
9849
  if (field.values) {
9850
- if (!Object.prototype.hasOwnProperty.call(propValues, key)) {
9851
- assignProp(propValues, key, /* @__PURE__ */ new Set());
9850
+ if (!Object.prototype.hasOwnProperty.call(propValues, key2)) {
9851
+ assignProp(propValues, key2, /* @__PURE__ */ new Set());
9852
9852
  }
9853
9853
  for (const v of field.values)
9854
- propValues[key].add(v);
9854
+ propValues[key2].add(v);
9855
9855
  if (field.optin !== void 0)
9856
- propValues[key].add(void 0);
9856
+ propValues[key2].add(void 0);
9857
9857
  }
9858
9858
  }
9859
9859
  return propValues;
@@ -9880,22 +9880,22 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
9880
9880
  const shape = value.shape;
9881
9881
  const abortEarly = ctx?.abortEarly;
9882
9882
  let seen = payload.issues.length;
9883
- for (const key of value.allKeys) {
9883
+ for (const key2 of value.allKeys) {
9884
9884
  if (abortEarly && payload.issues.length !== seen) {
9885
9885
  if (aborted(payload, seen))
9886
9886
  break;
9887
9887
  seen = payload.issues.length;
9888
9888
  }
9889
- if (key === "__proto__")
9889
+ if (key2 === "__proto__")
9890
9890
  continue;
9891
- const el = shape[key];
9891
+ const el = shape[key2];
9892
9892
  const optin = el._zod.optin;
9893
9893
  const optout = el._zod.optout;
9894
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
9894
+ const r = el._zod.run({ value: input[key2], issues: [] }, ctx);
9895
9895
  if (r instanceof Promise) {
9896
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, optin, optout)));
9896
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key2, input, optin, optout)));
9897
9897
  } else {
9898
- handlePropertyResult(r, payload, key, input, optin, optout);
9898
+ handlePropertyResult(r, payload, key2, input, optin, optout);
9899
9899
  }
9900
9900
  }
9901
9901
  if (!catchall) {
@@ -9929,17 +9929,17 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
9929
9929
  doc.write(`const input = payload.value;`);
9930
9930
  const ids = /* @__PURE__ */ Object.create(null);
9931
9931
  let counter = 0;
9932
- for (const key of normalized.allKeys) {
9933
- ids[key] = `key_${counter++}`;
9932
+ for (const key2 of normalized.allKeys) {
9933
+ ids[key2] = `key_${counter++}`;
9934
9934
  }
9935
9935
  doc.write(memo2 ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
9936
- for (const key of normalized.allKeys) {
9937
- if (key === "__proto__")
9936
+ for (const key2 of normalized.allKeys) {
9937
+ if (key2 === "__proto__")
9938
9938
  continue;
9939
- const id2 = ids[key];
9940
- const k = typeof key === "symbol" ? `syms[${syms.indexOf(key)}]` : esc(key);
9939
+ const id2 = ids[key2];
9940
+ const k = typeof key2 === "symbol" ? `syms[${syms.indexOf(key2)}]` : esc(key2);
9941
9941
  const isPresent = `${k} in input`;
9942
- const schema = shape[key];
9942
+ const schema = shape[key2];
9943
9943
  const optin = schema?._zod?.optin;
9944
9944
  const isOptionalIn = optin !== void 0;
9945
9945
  const isOptionalOut = schema?._zod?.optout === "optional";
@@ -10203,21 +10203,21 @@ function mergeValues(a, b) {
10203
10203
  }
10204
10204
  if (isPlainObject(a) && isPlainObject(b)) {
10205
10205
  const bKeys = Object.keys(b);
10206
- const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
10206
+ const sharedKeys = Object.keys(a).filter((key2) => bKeys.indexOf(key2) !== -1);
10207
10207
  const newObj = { ...a, ...b };
10208
10208
  if (Object.prototype.hasOwnProperty.call(newObj, "__proto__"))
10209
10209
  delete newObj.__proto__;
10210
- for (const key of sharedKeys) {
10211
- if (key === "__proto__")
10210
+ for (const key2 of sharedKeys) {
10211
+ if (key2 === "__proto__")
10212
10212
  continue;
10213
- const sharedValue = mergeValues(a[key], b[key]);
10213
+ const sharedValue = mergeValues(a[key2], b[key2]);
10214
10214
  if (!sharedValue.valid) {
10215
10215
  return {
10216
10216
  valid: false,
10217
- mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
10217
+ mergeErrorPath: [key2, ...sharedValue.mergeErrorPath]
10218
10218
  };
10219
10219
  }
10220
- newObj[key] = sharedValue.data;
10220
+ newObj[key2] = sharedValue.data;
10221
10221
  }
10222
10222
  return { valid: true, data: newObj };
10223
10223
  }
@@ -10313,12 +10313,12 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10313
10313
  if (values && !def.partial) {
10314
10314
  payload.value = memo2 ? memo2.alloc(inst, payload, {}, ctx) : {};
10315
10315
  const recordKeys = /* @__PURE__ */ new Set();
10316
- for (const key of values) {
10317
- if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
10318
- recordKeys.add(typeof key === "number" ? key.toString() : key);
10319
- if (key === "__proto__")
10316
+ for (const key2 of values) {
10317
+ if (typeof key2 === "string" || typeof key2 === "number" || typeof key2 === "symbol") {
10318
+ recordKeys.add(typeof key2 === "number" ? key2.toString() : key2);
10319
+ if (key2 === "__proto__")
10320
10320
  continue;
10321
- const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
10321
+ const keyResult = def.keyType._zod.run({ value: key2, issues: [] }, ctx);
10322
10322
  if (keyResult instanceof Promise) {
10323
10323
  throw new Error("Async schemas not supported in object keys currently");
10324
10324
  }
@@ -10327,8 +10327,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10327
10327
  code: "invalid_key",
10328
10328
  origin: "record",
10329
10329
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
10330
- input: key,
10331
- path: [key],
10330
+ input: key2,
10331
+ path: [key2],
10332
10332
  inst
10333
10333
  });
10334
10334
  continue;
@@ -10336,32 +10336,32 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10336
10336
  const outKey = keyResult.value;
10337
10337
  if (outKey === "__proto__")
10338
10338
  continue;
10339
- const result2 = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
10339
+ const result2 = def.valueType._zod.run({ value: input[key2], issues: [] }, ctx);
10340
10340
  if (result2 instanceof Promise) {
10341
10341
  proms.push(result2.then((result3) => {
10342
10342
  if (result3.issues.length) {
10343
- payload.issues.push(...prefixIssues(key, result3.issues));
10343
+ payload.issues.push(...prefixIssues(key2, result3.issues));
10344
10344
  }
10345
10345
  payload.value[outKey] = result3.value;
10346
10346
  }));
10347
10347
  } else {
10348
10348
  if (result2.issues.length) {
10349
- payload.issues.push(...prefixIssues(key, result2.issues));
10349
+ payload.issues.push(...prefixIssues(key2, result2.issues));
10350
10350
  }
10351
10351
  payload.value[outKey] = result2.value;
10352
10352
  }
10353
10353
  }
10354
10354
  }
10355
10355
  let unrecognized;
10356
- for (const key in input) {
10357
- if (!recordKeys.has(key)) {
10356
+ for (const key2 in input) {
10357
+ if (!recordKeys.has(key2)) {
10358
10358
  if (def.mode === "loose") {
10359
- if (key === "__proto__")
10359
+ if (key2 === "__proto__")
10360
10360
  continue;
10361
- payload.value[key] = input[key];
10361
+ payload.value[key2] = input[key2];
10362
10362
  } else {
10363
10363
  unrecognized = unrecognized ?? [];
10364
- unrecognized.push(key);
10364
+ unrecognized.push(key2);
10365
10365
  }
10366
10366
  }
10367
10367
  }
@@ -10377,18 +10377,18 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10377
10377
  } else {
10378
10378
  payload.value = memo2 ? memo2.alloc(inst, payload, {}, ctx) : {};
10379
10379
  let unrecognized;
10380
- for (const key of Reflect.ownKeys(input)) {
10381
- if (key === "__proto__")
10380
+ for (const key2 of Reflect.ownKeys(input)) {
10381
+ if (key2 === "__proto__")
10382
10382
  continue;
10383
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
10383
+ if (!Object.prototype.propertyIsEnumerable.call(input, key2))
10384
10384
  continue;
10385
- let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
10385
+ let keyResult = def.keyType._zod.run({ value: key2, issues: [] }, ctx);
10386
10386
  if (keyResult instanceof Promise) {
10387
10387
  throw new Error("Async schemas not supported in object keys currently");
10388
10388
  }
10389
- const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length;
10389
+ const checkNumericKey = typeof key2 === "string" && number.test(key2) && keyResult.issues.length;
10390
10390
  if (checkNumericKey) {
10391
- const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
10391
+ const retryResult = def.keyType._zod.run({ value: Number(key2), issues: [] }, ctx);
10392
10392
  if (retryResult instanceof Promise) {
10393
10393
  throw new Error("Async schemas not supported in object keys currently");
10394
10394
  }
@@ -10398,17 +10398,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10398
10398
  }
10399
10399
  if (keyResult.issues.length) {
10400
10400
  if (def.mode === "loose") {
10401
- payload.value[key] = input[key];
10401
+ payload.value[key2] = input[key2];
10402
10402
  } else if (values) {
10403
10403
  unrecognized = unrecognized ?? [];
10404
- unrecognized.push(key);
10404
+ unrecognized.push(key2);
10405
10405
  } else {
10406
10406
  payload.issues.push({
10407
10407
  code: "invalid_key",
10408
10408
  origin: "record",
10409
10409
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
10410
- input: key,
10411
- path: [key],
10410
+ input: key2,
10411
+ path: [key2],
10412
10412
  inst
10413
10413
  });
10414
10414
  }
@@ -10417,17 +10417,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10417
10417
  const outKey = keyResult.value;
10418
10418
  if (outKey === "__proto__")
10419
10419
  continue;
10420
- const result2 = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
10420
+ const result2 = def.valueType._zod.run({ value: input[key2], issues: [] }, ctx);
10421
10421
  if (result2 instanceof Promise) {
10422
10422
  proms.push(result2.then((result3) => {
10423
10423
  if (result3.issues.length) {
10424
- payload.issues.push(...prefixIssues(key, result3.issues));
10424
+ payload.issues.push(...prefixIssues(key2, result3.issues));
10425
10425
  }
10426
10426
  payload.value[outKey] = result3.value;
10427
10427
  }));
10428
10428
  } else {
10429
10429
  if (result2.issues.length) {
10430
- payload.issues.push(...prefixIssues(key, result2.issues));
10430
+ payload.issues.push(...prefixIssues(key2, result2.issues));
10431
10431
  }
10432
10432
  payload.value[outKey] = result2.value;
10433
10433
  }
@@ -10789,8 +10789,8 @@ function isRecursive(inst, stack, resolve11) {
10789
10789
  };
10790
10790
  const shape = (sh, spread) => {
10791
10791
  let answer = NONE;
10792
- for (const key of Reflect.ownKeys(sh)) {
10793
- const desc = Object.getOwnPropertyDescriptor(sh, key);
10792
+ for (const key2 of Reflect.ownKeys(sh)) {
10793
+ const desc = Object.getOwnPropertyDescriptor(sh, key2);
10794
10794
  if (spread && !desc.enumerable)
10795
10795
  continue;
10796
10796
  const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve11) : NONE;
@@ -10886,8 +10886,8 @@ function isRecursive(inst, stack, resolve11) {
10886
10886
  break;
10887
10887
  default: {
10888
10888
  kind;
10889
- for (const key in def) {
10890
- const desc = Object.getOwnPropertyDescriptor(def, key);
10889
+ for (const key2 in def) {
10890
+ const desc = Object.getOwnPropertyDescriptor(def, key2);
10891
10891
  if (!desc || desc.get)
10892
10892
  continue;
10893
10893
  const value = desc.value;
@@ -11730,9 +11730,9 @@ function _check(fn, params) {
11730
11730
  // node_modules/zod/v4/core/to-json-schema.js
11731
11731
  function assignProps(target, ...sources) {
11732
11732
  for (const source of sources) {
11733
- for (const key of Reflect.ownKeys(source)) {
11734
- if (Object.prototype.propertyIsEnumerable.call(source, key)) {
11735
- assignProp(target, key, source[key]);
11733
+ for (const key2 of Reflect.ownKeys(source)) {
11734
+ if (Object.prototype.propertyIsEnumerable.call(source, key2)) {
11735
+ assignProp(target, key2, source[key2]);
11736
11736
  }
11737
11737
  }
11738
11738
  }
@@ -11878,8 +11878,8 @@ function extractDefs(ctx, schema) {
11878
11878
  if (defId)
11879
11879
  seen.defId = defId;
11880
11880
  const schema2 = seen.schema;
11881
- for (const key in schema2) {
11882
- delete schema2[key];
11881
+ for (const key2 in schema2) {
11882
+ delete schema2[key2];
11883
11883
  }
11884
11884
  schema2.$ref = ref;
11885
11885
  };
@@ -11960,8 +11960,8 @@ function foldObjects(members2) {
11960
11960
  for (const member of members2) {
11961
11961
  if (typeof member !== "object" || member.type !== "object")
11962
11962
  return null;
11963
- for (const key in member) {
11964
- if (!FOLDABLE_KEYS.has(key))
11963
+ for (const key2 in member) {
11964
+ if (!FOLDABLE_KEYS.has(key2))
11965
11965
  return null;
11966
11966
  }
11967
11967
  objects.push(member);
@@ -11969,22 +11969,22 @@ function foldObjects(members2) {
11969
11969
  const properties = {};
11970
11970
  const required2 = /* @__PURE__ */ new Set();
11971
11971
  for (const object6 of objects) {
11972
- for (const key in object6.properties) {
11973
- if (Object.prototype.hasOwnProperty.call(properties, key))
11972
+ for (const key2 in object6.properties) {
11973
+ if (Object.prototype.hasOwnProperty.call(properties, key2))
11974
11974
  continue;
11975
11975
  const parts = [];
11976
11976
  for (const other of objects) {
11977
- const part = other.properties?.[key] ?? undeclaredConstraint(other);
11977
+ const part = other.properties?.[key2] ?? undeclaredConstraint(other);
11978
11978
  if (part === null || part === void 0)
11979
11979
  continue;
11980
11980
  if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))
11981
11981
  parts.push(part);
11982
11982
  }
11983
11983
  const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
11984
- assignProp(properties, key, merged);
11984
+ assignProp(properties, key2, merged);
11985
11985
  }
11986
- for (const key of object6.required ?? [])
11987
- required2.add(key);
11986
+ for (const key2 of object6.required ?? [])
11987
+ required2.add(key2);
11988
11988
  }
11989
11989
  const folded = { type: "object", properties };
11990
11990
  if (required2.size)
@@ -12009,8 +12009,8 @@ function foldIntersection(json2) {
12009
12009
  const allOf = json2.allOf;
12010
12010
  if (!Array.isArray(allOf) || allOf.length < 2)
12011
12011
  return;
12012
- for (const key of FOLDABLE_KEYS)
12013
- if (key in json2)
12012
+ for (const key2 of FOLDABLE_KEYS)
12013
+ if (key2 in json2)
12014
12014
  return;
12015
12015
  const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));
12016
12016
  let folded = null;
@@ -12057,20 +12057,20 @@ function finalize(ctx, schema) {
12057
12057
  assignProps(schema2, _cached);
12058
12058
  const isParentRef = zodSchema._zod.parent === ref;
12059
12059
  if (isParentRef) {
12060
- for (const key in schema2) {
12061
- if (key === "$ref" || key === "allOf")
12060
+ for (const key2 in schema2) {
12061
+ if (key2 === "$ref" || key2 === "allOf")
12062
12062
  continue;
12063
- if (!(key in _cached)) {
12064
- delete schema2[key];
12063
+ if (!(key2 in _cached)) {
12064
+ delete schema2[key2];
12065
12065
  }
12066
12066
  }
12067
12067
  }
12068
12068
  if (refSchema.$ref && refSeen.def) {
12069
- for (const key in schema2) {
12070
- if (key === "$ref" || key === "allOf")
12069
+ for (const key2 in schema2) {
12070
+ if (key2 === "$ref" || key2 === "allOf")
12071
12071
  continue;
12072
- if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) {
12073
- delete schema2[key];
12072
+ if (key2 in refSeen.def && JSON.stringify(schema2[key2]) === JSON.stringify(refSeen.def[key2])) {
12073
+ delete schema2[key2];
12074
12074
  }
12075
12075
  }
12076
12076
  }
@@ -12082,11 +12082,11 @@ function finalize(ctx, schema) {
12082
12082
  if (parentSeen?.schema.$ref) {
12083
12083
  schema2.$ref = parentSeen.schema.$ref;
12084
12084
  if (parentSeen.def) {
12085
- for (const key in schema2) {
12086
- if (key === "$ref" || key === "allOf")
12085
+ for (const key2 in schema2) {
12086
+ if (key2 === "$ref" || key2 === "allOf")
12087
12087
  continue;
12088
- if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) {
12089
- delete schema2[key];
12088
+ if (key2 in parentSeen.def && JSON.stringify(schema2[key2]) === JSON.stringify(parentSeen.def[key2])) {
12089
+ delete schema2[key2];
12090
12090
  }
12091
12091
  }
12092
12092
  }
@@ -12219,8 +12219,8 @@ function isTransforming(_schema, _ctx) {
12219
12219
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
12220
12220
  }
12221
12221
  if (def.type === "object") {
12222
- for (const key in def.shape) {
12223
- if (isTransforming(def.shape[key], ctx))
12222
+ for (const key2 in def.shape) {
12223
+ if (isTransforming(def.shape[key2], ctx))
12224
12224
  return true;
12225
12225
  }
12226
12226
  return false;
@@ -12258,13 +12258,13 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
12258
12258
  };
12259
12259
 
12260
12260
  // node_modules/zod/v4/core/json-schema-processors.js
12261
- var narrowMin = (agg, key, value) => {
12262
- if (agg[key] === void 0 || value > agg[key])
12263
- agg[key] = value;
12261
+ var narrowMin = (agg, key2, value) => {
12262
+ if (agg[key2] === void 0 || value > agg[key2])
12263
+ agg[key2] = value;
12264
12264
  };
12265
- var narrowMax = (agg, key, value) => {
12266
- if (agg[key] === void 0 || value < agg[key])
12267
- agg[key] = value;
12265
+ var narrowMax = (agg, key2, value) => {
12266
+ if (agg[key2] === void 0 || value < agg[key2])
12267
+ agg[key2] = value;
12268
12268
  };
12269
12269
  var narrowBoth = (agg, value) => {
12270
12270
  narrowMin(agg, "minimum", value);
@@ -12543,17 +12543,17 @@ var objectProcessor = (schema, ctx, _json, params) => {
12543
12543
  }
12544
12544
  json2.type = "object";
12545
12545
  json2.properties = {};
12546
- for (const key in shape) {
12547
- assignProp(json2.properties, key, processSchema(shape[key], ctx, {
12546
+ for (const key2 in shape) {
12547
+ assignProp(json2.properties, key2, processSchema(shape[key2], ctx, {
12548
12548
  ...params,
12549
- path: [...params.path, "properties", key]
12549
+ path: [...params.path, "properties", key2]
12550
12550
  }));
12551
12551
  }
12552
12552
  const requiredKeys = [];
12553
- for (const key of Object.keys(shape)) {
12554
- const field = def.shape[key];
12553
+ for (const key2 of Object.keys(shape)) {
12554
+ const field = def.shape[key2];
12555
12555
  if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) {
12556
- requiredKeys.push(key);
12556
+ requiredKeys.push(key2);
12557
12557
  }
12558
12558
  }
12559
12559
  if (requiredKeys.length > 0) {
@@ -12860,17 +12860,17 @@ function getLiteralValue(schema) {
12860
12860
 
12861
12861
  // node_modules/zod/v4/classic/errors.js
12862
12862
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
12863
- function _lazyMethod(proto, key, make) {
12864
- Object.defineProperty(proto, key, {
12863
+ function _lazyMethod(proto, key2, make) {
12864
+ Object.defineProperty(proto, key2, {
12865
12865
  configurable: true,
12866
12866
  enumerable: false,
12867
12867
  get() {
12868
12868
  const value = make(this);
12869
- Object.defineProperty(this, key, { value, configurable: true, writable: true });
12869
+ Object.defineProperty(this, key2, { value, configurable: true, writable: true });
12870
12870
  return value;
12871
12871
  },
12872
12872
  set(value) {
12873
- Object.defineProperty(this, key, { value, configurable: true, writable: true });
12873
+ Object.defineProperty(this, key2, { value, configurable: true, writable: true });
12874
12874
  }
12875
12875
  });
12876
12876
  }
@@ -16373,8 +16373,8 @@ function isPlainObject2(value) {
16373
16373
  }
16374
16374
  function mergeCapabilities(base, additional) {
16375
16375
  const result2 = { ...base };
16376
- for (const key in additional) {
16377
- const k = key;
16376
+ for (const key2 in additional) {
16377
+ const k = key2;
16378
16378
  const addValue = additional[k];
16379
16379
  if (addValue === void 0)
16380
16380
  continue;
@@ -17253,9 +17253,9 @@ function loadEnvironment(path, env = process.env, home = env.HOME ?? homedir())
17253
17253
  let next = i + 1;
17254
17254
  while (/\s/.test(text5[next] ?? "") && next < text5.length) next++;
17255
17255
  if (depth === 1 && text5[next] === ":") {
17256
- const key = JSON.parse(text5.slice(start, i + 1));
17257
- if (seen.has(key)) throw new Error(`Duplicate environment profile key: ${key}`);
17258
- seen.add(key);
17256
+ const key2 = JSON.parse(text5.slice(start, i + 1));
17257
+ if (seen.has(key2)) throw new Error(`Duplicate environment profile key: ${key2}`);
17258
+ seen.add(key2);
17259
17259
  }
17260
17260
  } else if (text5[i] === "{" || text5[i] === "[") depth++;
17261
17261
  else if (text5[i] === "}" || text5[i] === "]") depth--;
@@ -17266,24 +17266,24 @@ function loadEnvironment(path, env = process.env, home = env.HOME ?? homedir())
17266
17266
  const p = raw;
17267
17267
  if (p.schemaVersion !== 2 || typeof p.id !== "string" || !/^[a-z0-9][a-z0-9-]{0,47}$/.test(p.id)) throw new Error("Invalid environment schemaVersion or id");
17268
17268
  const profile = { schemaVersion: 2, id: p.id, vmServiceUrl: endpoint(p.vmServiceUrl) };
17269
- for (const key of paths) profile[key] = canonicalPath(p[key]);
17269
+ for (const key2 of paths) profile[key2] = canonicalPath(p[key2]);
17270
17270
  if (!statSync(profile.imageRepository).isDirectory() || !statSync(join(profile.imageRepository, "images")).isDirectory()) throw new Error("Selected imageRepository must contain images/");
17271
- for (const key of ["machctlPath", "tartPath"]) {
17272
- if (!statSync(profile[key]).isFile()) throw new Error(`${key} must be a regular executable file`);
17273
- accessSync(profile[key], constants.X_OK);
17271
+ for (const key2 of ["machctlPath", "tartPath"]) {
17272
+ if (!statSync(profile[key2]).isFile()) throw new Error(`${key2} must be a regular executable file`);
17273
+ accessSync(profile[key2], constants.X_OK);
17274
17274
  }
17275
17275
  const state = env.XDG_STATE_HOME ? canonicalPath(env.XDG_STATE_HOME) : join(canonicalPath(home), ".local/state");
17276
17276
  const names = ["machine-service", "vm-service", "pilot-images", "mcp-relay", "mcp-vm-relay"];
17277
17277
  const defaults = [join(canonicalPath(home), ".tart"), ...names.map((n) => join(state, n)), ...names.map((n) => join(canonicalPath(home), ".local/state", n))].map(canonicalPath);
17278
- for (const key of mutable) {
17279
- const value = profile[key];
17278
+ for (const key2 of mutable) {
17279
+ const value = profile[key2];
17280
17280
  try {
17281
- if (!statSync(value).isDirectory()) throw new Error(`${key} must be a directory`);
17281
+ if (!statSync(value).isDirectory()) throw new Error(`${key2} must be a directory`);
17282
17282
  } catch (error2) {
17283
17283
  if (error2.code !== "ENOENT") throw error2;
17284
17284
  }
17285
- if (overlaps(value, profile.imageRepository) || defaults.some((root) => overlaps(value, root))) throw new Error(`${key} overlaps the repository or a legacy default store/state root`);
17286
- for (const other of mutable) if (key !== other && overlaps(value, profile[other])) throw new Error("Environment mutable roots must be disjoint");
17285
+ if (overlaps(value, profile.imageRepository) || defaults.some((root) => overlaps(value, root))) throw new Error(`${key2} overlaps the repository or a legacy default store/state root`);
17286
+ for (const other of mutable) if (key2 !== other && overlaps(value, profile[other])) throw new Error("Environment mutable roots must be disjoint");
17287
17287
  }
17288
17288
  const ordered = Object.fromEntries(Object.keys(profile).sort().map((k) => [k, profile[k]]));
17289
17289
  const fingerprint = createHash("sha256").update(JSON.stringify(ordered), "utf8").digest("hex");
@@ -17325,7 +17325,7 @@ function environmentVariables(selected) {
17325
17325
  function matchesEnvironment(actual, selected) {
17326
17326
  if (!actual || typeof actual !== "object" || Array.isArray(actual)) return false;
17327
17327
  const identity = actual;
17328
- return Object.keys(identity).length === Object.keys(selected.identity).length && Object.entries(selected.identity).every(([key, value]) => identity[key] === value);
17328
+ return Object.keys(identity).length === Object.keys(selected.identity).length && Object.entries(selected.identity).every(([key2, value]) => identity[key2] === value);
17329
17329
  }
17330
17330
 
17331
17331
  // src/config.ts
@@ -17821,7 +17821,7 @@ var MachineService = class {
17821
17821
  const host = url.hostname.replace(/^\[|\]$/g, "");
17822
17822
  const loopback = host === "localhost" || host === "::1" || isIP2(host) === 4 && host.startsWith("127.");
17823
17823
  if (!loopback && !options.listed || !["http:", "https:"].includes(url.protocol) || url.username || url.password || url.search || url.hash || url.pathname !== "/") {
17824
- throw new TypeError("machine-service baseUrl must be a loopback HTTP(S) origin, or one Consul lists as machine-service, without credentials, path, query or fragment");
17824
+ throw new TypeError("machine-service baseUrl must be a loopback HTTP(S) origin, or one discovery found, without credentials, path, query or fragment");
17825
17825
  }
17826
17826
  this.baseUrl = url.origin;
17827
17827
  this.timeoutMs = positive(options.timeoutMs ?? 66e4, "timeoutMs");
@@ -18053,10 +18053,10 @@ var RegistryError = class extends Error {
18053
18053
  };
18054
18054
  var columns = ["machine", "os", "taskName", "agent", "project", "startDate"];
18055
18055
  function cells(row) {
18056
- return columns.map((key) => {
18057
- const value = row[key];
18056
+ return columns.map((key2) => {
18057
+ const value = row[key2];
18058
18058
  if (typeof value !== "string" || !value.trim() || value !== value.trim() || /[|\r\n\u0000-\u001f\u007f]/.test(value)) {
18059
- throw new RegistryError(`Registry ${key} must be nonempty trimmed text without pipes or control characters`);
18059
+ throw new RegistryError(`Registry ${key2} must be nonempty trimmed text without pipes or control characters`);
18060
18060
  }
18061
18061
  return value;
18062
18062
  });
@@ -18957,9 +18957,9 @@ var Transfer = class {
18957
18957
  await bounded3(async () => {
18958
18958
  await this.options.onRetry?.({ operation: "pull", attempt, diagnostic });
18959
18959
  });
18960
- const wait = options.retryDelaysMs?.[attempt - 1];
18961
- if (wait) await bounded3(() => new Promise((done) => {
18962
- const timer2 = setTimeout(done, wait);
18960
+ const wait2 = options.retryDelaysMs?.[attempt - 1];
18961
+ if (wait2) await bounded3(() => new Promise((done) => {
18962
+ const timer2 = setTimeout(done, wait2);
18963
18963
  controller.signal.addEventListener("abort", () => {
18964
18964
  clearTimeout(timer2);
18965
18965
  done();
@@ -19224,7 +19224,7 @@ var VmTransport = class {
19224
19224
  await assertHostPath(this.hostRoot, local, true);
19225
19225
  await jsonFile(local, payload);
19226
19226
  await this.transfer.pushFile(local, remote, this.hostRoot);
19227
- const wait = request.snapshots?.group?.afterIntervalMs ?? request.snapshots?.afterIntervalMs ?? 0;
19227
+ const wait2 = request.snapshots?.group?.afterIntervalMs ?? request.snapshots?.afterIntervalMs ?? 0;
19228
19228
  let response;
19229
19229
  try {
19230
19230
  const result2 = await this.transfer.vm.exec(this.transfer.name, [
@@ -19236,7 +19236,7 @@ var VmTransport = class {
19236
19236
  INVOKE,
19237
19237
  join8(this.guestRoot, "receiver.mjs"),
19238
19238
  remote
19239
- ], this.timeoutMs + 18e4 + wait, { signal: this.signal });
19239
+ ], this.timeoutMs + 18e4 + wait2, { signal: this.signal });
19240
19240
  if (result2.code !== 0) throw new Error(`Receiver exit ${result2.code}: ${result2.stderr.slice(0, 1e3)}`);
19241
19241
  const guestReceipt = join8(this.guestRoot, "state", "receiver", "receipts", `${request.executionId}.json`);
19242
19242
  const originalReceipt = join8(this.hostRoot, "receiver-receipts", `${request.executionId}.json`);
@@ -19460,9 +19460,9 @@ async function analyze(root, options, files) {
19460
19460
  const receipts = [];
19461
19461
  const retainReceipt = (raw, envelope) => {
19462
19462
  const receipt = object3(raw, "execution receipt");
19463
- for (const key of ["executionId", "actionId", "sessionId"]) {
19464
- if (receipt[key] !== void 0) text(receipt[key], `receipt ${key}`);
19465
- if (envelope?.[key] !== void 0 && receipt[key] !== void 0 && envelope[key] !== receipt[key]) throw new Error(`receipt ${key} identity mismatch`);
19463
+ for (const key2 of ["executionId", "actionId", "sessionId"]) {
19464
+ if (receipt[key2] !== void 0) text(receipt[key2], `receipt ${key2}`);
19465
+ if (envelope?.[key2] !== void 0 && receipt[key2] !== void 0 && envelope[key2] !== receipt[key2]) throw new Error(`receipt ${key2} identity mismatch`);
19466
19466
  }
19467
19467
  if (receipt.sessionId !== void 0 && receipt.sessionId !== options.sessionId) throw new Error("receipt session identity mismatch");
19468
19468
  const executionId = receipt.executionId ?? envelope?.executionId;
@@ -19574,7 +19574,7 @@ Original subprocess/action evidence (not an authoritative input-success verdict)
19574
19574
  }
19575
19575
  }
19576
19576
  const bearing = (finding) => /^action \S+ (has no retained start or refusal|is missing reverse snapshot reference |has no materialized action record|lacks durable reverse snapshot references)/.test(finding) ? "defects" : /^request \S+ has no retained guest execution$/.test(finding) ? "execution" : "snapshots";
19577
- const explained = (key) => findings.filter((f) => bearing(f) === key).map((finding) => explainFinding(finding, steps, stepsByExecution));
19577
+ const explained = (key2) => findings.filter((f) => bearing(f) === key2).map((finding) => explainFinding(finding, steps, stepsByExecution));
19578
19578
  const snapshotReasons = explained("snapshots"), unexecuted = explained("execution"), defectReasons = explained("defects");
19579
19579
  const completeness = snapshotReasons.length ? "incomplete" : "complete";
19580
19580
  const receiptFailed = receipts.some((r) => ["refused", "failed"].includes(receiptOutcome(r)));
@@ -20102,14 +20102,14 @@ function Counted(value, callback) {
20102
20102
  function ShiftLeft(array2, true_, false_) {
20103
20103
  return IsEqual(array2.length, 0) ? false_() : true_(array2[0], array2.slice(1));
20104
20104
  }
20105
- function IsUnsafePropertyKey(key) {
20106
- return IsEqual(key, "__proto__") || IsEqual(key, "constructor") || IsEqual(key, "prototype");
20105
+ function IsUnsafePropertyKey(key2) {
20106
+ return IsEqual(key2, "__proto__") || IsEqual(key2, "constructor") || IsEqual(key2, "prototype");
20107
20107
  }
20108
- function HasPropertyKey(value, key) {
20109
- return IsUnsafePropertyKey(key) ? Object.prototype.hasOwnProperty.call(value, key) : key in value;
20108
+ function HasPropertyKey(value, key2) {
20109
+ return IsUnsafePropertyKey(key2) ? Object.prototype.hasOwnProperty.call(value, key2) : key2 in value;
20110
20110
  }
20111
20111
  function EntriesRegExp(value) {
20112
- return Keys(value).map((key) => [new RegExp(`^${key}$`), value[key]]);
20112
+ return Keys(value).map((key2) => [new RegExp(`^${key2}$`), value[key2]]);
20113
20113
  }
20114
20114
  function Entries(value) {
20115
20115
  return Object.entries(value);
@@ -20127,7 +20127,7 @@ function DeepEqualObject(left, right) {
20127
20127
  if (!IsObject(right))
20128
20128
  return false;
20129
20129
  const keys = Keys(left);
20130
- return IsEqual(keys.length, Keys(right).length) && keys.every((key) => IsDeepEqual(left[key], right[key]));
20130
+ return IsEqual(keys.length, Keys(right).length) && keys.every((key2) => IsDeepEqual(left[key2], right[key2]));
20131
20131
  }
20132
20132
  function DeepEqualArray(left, right) {
20133
20133
  return IsArray(right) && IsEqual(left.length, right.length) && left.every((_, index) => IsDeepEqual(left[index], right[index]));
@@ -20244,10 +20244,10 @@ function Reset() {
20244
20244
  settings.unionPrioritySort = true;
20245
20245
  }
20246
20246
  function Set2(options) {
20247
- for (const key of guard_exports.Keys(options)) {
20248
- const value = options[key];
20247
+ for (const key2 of guard_exports.Keys(options)) {
20248
+ const value = options[key2];
20249
20249
  if (value !== void 0) {
20250
- Object.defineProperty(settings, key, { value });
20250
+ Object.defineProperty(settings, key2, { value });
20251
20251
  }
20252
20252
  }
20253
20253
  }
@@ -20275,28 +20275,28 @@ function IsSchemaObject(value) {
20275
20275
  }
20276
20276
  function FromSchemaObject(value) {
20277
20277
  const result2 = {};
20278
- for (const key of guard_exports.Keys(value)) {
20279
- if (guard_exports.IsUnsafePropertyKey(key))
20278
+ for (const key2 of guard_exports.Keys(value)) {
20279
+ if (guard_exports.IsUnsafePropertyKey(key2))
20280
20280
  continue;
20281
- const descriptor = Object.getOwnPropertyDescriptor(value, key);
20281
+ const descriptor = Object.getOwnPropertyDescriptor(value, key2);
20282
20282
  descriptor.value = FromValue(descriptor.value);
20283
20283
  if (guard_exports.IsEqual(descriptor.enumerable, true)) {
20284
- result2[key] = descriptor.value;
20284
+ result2[key2] = descriptor.value;
20285
20285
  } else {
20286
- Object.defineProperty(result2, key, descriptor);
20286
+ Object.defineProperty(result2, key2, descriptor);
20287
20287
  }
20288
20288
  }
20289
20289
  return result2;
20290
20290
  }
20291
20291
  function FromPlainObject(value) {
20292
20292
  const result2 = {};
20293
- for (const key of guard_exports.Keys(value)) {
20294
- if (guard_exports.IsUnsafePropertyKey(key))
20293
+ for (const key2 of guard_exports.Keys(value)) {
20294
+ if (guard_exports.IsUnsafePropertyKey(key2))
20295
20295
  continue;
20296
- result2[key] = FromValue(value[key]);
20296
+ result2[key2] = FromValue(value[key2]);
20297
20297
  }
20298
- for (const key of guard_exports.Symbols(value)) {
20299
- result2[key] = FromValue(value[key]);
20298
+ for (const key2 of guard_exports.Symbols(value)) {
20299
+ result2[key2] = FromValue(value[key2]);
20300
20300
  }
20301
20301
  return result2;
20302
20302
  }
@@ -20328,12 +20328,12 @@ function Clone(value) {
20328
20328
 
20329
20329
  // node_modules/typebox/build/system/memory/create.mjs
20330
20330
  function MergeHidden(left, right) {
20331
- for (const key of Object.keys(right)) {
20332
- Object.defineProperty(left, key, {
20331
+ for (const key2 of Object.keys(right)) {
20332
+ Object.defineProperty(left, key2, {
20333
20333
  configurable: true,
20334
20334
  writable: true,
20335
20335
  enumerable: false,
20336
- value: right[key]
20336
+ value: right[key2]
20337
20337
  });
20338
20338
  }
20339
20339
  return left;
@@ -20352,12 +20352,12 @@ function Create(hidden, enumerable, options = {}) {
20352
20352
  function Discard(value, propertyKeys) {
20353
20353
  Metrics.discard += 1;
20354
20354
  const result2 = {};
20355
- for (const key of guard_exports.Keys(value)) {
20356
- if (propertyKeys.includes(key))
20355
+ for (const key2 of guard_exports.Keys(value)) {
20356
+ if (propertyKeys.includes(key2))
20357
20357
  continue;
20358
- const descriptor = Object.getOwnPropertyDescriptor(value, key);
20358
+ const descriptor = Object.getOwnPropertyDescriptor(value, key2);
20359
20359
  descriptor.value = Clone(descriptor.value);
20360
- Object.defineProperty(result2, key, descriptor);
20360
+ Object.defineProperty(result2, key2, descriptor);
20361
20361
  }
20362
20362
  return Freeze(result2);
20363
20363
  }
@@ -20367,20 +20367,20 @@ function Update(current, hidden, enumerable) {
20367
20367
  Metrics.update += 1;
20368
20368
  const settings2 = settings_exports.Get();
20369
20369
  const result2 = Clone(current);
20370
- for (const key of Object.keys(hidden)) {
20371
- Object.defineProperty(result2, key, {
20370
+ for (const key2 of Object.keys(hidden)) {
20371
+ Object.defineProperty(result2, key2, {
20372
20372
  configurable: true,
20373
20373
  writable: true,
20374
20374
  enumerable: settings2.enumerableKind,
20375
- value: hidden[key]
20375
+ value: hidden[key2]
20376
20376
  });
20377
20377
  }
20378
- for (const key of Object.keys(enumerable)) {
20379
- Object.defineProperty(result2, key, {
20378
+ for (const key2 of Object.keys(enumerable)) {
20379
+ Object.defineProperty(result2, key2, {
20380
20380
  configurable: true,
20381
20381
  enumerable: true,
20382
20382
  writable: true,
20383
- value: enumerable[key]
20383
+ value: enumerable[key2]
20384
20384
  });
20385
20385
  }
20386
20386
  return Freeze(result2);
@@ -20512,7 +20512,7 @@ function IsOptional(value) {
20512
20512
 
20513
20513
  // node_modules/typebox/build/type/types/properties.mjs
20514
20514
  function RequiredArray(properties) {
20515
- return guard_exports.Keys(properties).filter((key) => !IsOptional(properties[key]));
20515
+ return guard_exports.Keys(properties).filter((key2) => !IsOptional(properties[key2]));
20516
20516
  }
20517
20517
  function PropertyKeys(properties) {
20518
20518
  return guard_exports.Keys(properties);
@@ -20544,8 +20544,8 @@ function IsUnknown(value) {
20544
20544
 
20545
20545
  // node_modules/typebox/build/type/types/cyclic.mjs
20546
20546
  function Cyclic($defs, $ref, options) {
20547
- const defs = guard_exports.Keys($defs).reduce((result2, key) => {
20548
- return { ...result2, [key]: memory_exports.Update($defs[key], {}, { $id: key }) };
20547
+ const defs = guard_exports.Keys($defs).reduce((result2, key2) => {
20548
+ return { ...result2, [key2]: memory_exports.Update($defs[key2], {}, { $id: key2 }) };
20549
20549
  }, {});
20550
20550
  return memory_exports.Create({ ["~kind"]: "Cyclic" }, { $defs: defs, $ref }, options);
20551
20551
  }
@@ -20600,8 +20600,8 @@ function IsTypeScriptEnumLike(value) {
20600
20600
  return guard_exports.IsObjectNotArray(value);
20601
20601
  }
20602
20602
  function TypeScriptEnumToEnumValues(type) {
20603
- const keys = guard_exports.Keys(type).filter((key) => isNaN(key));
20604
- return keys.reduce((result2, key) => [...result2, type[key]], []);
20603
+ const keys = guard_exports.Keys(type).filter((key2) => isNaN(key2));
20604
+ return keys.reduce((result2, key2) => [...result2, type[key2]], []);
20605
20605
  }
20606
20606
 
20607
20607
  // node_modules/typebox/build/type/types/enum.mjs
@@ -20644,9 +20644,9 @@ function InstanceKeys(value) {
20644
20644
  const propertyKeys = /* @__PURE__ */ new Set();
20645
20645
  let current = value;
20646
20646
  while (current && current !== Object.prototype) {
20647
- for (const key of Reflect.ownKeys(current)) {
20648
- if (key !== "constructor" && typeof key !== "symbol")
20649
- propertyKeys.add(key);
20647
+ for (const key2 of Reflect.ownKeys(current)) {
20648
+ if (key2 !== "constructor" && typeof key2 !== "symbol")
20649
+ propertyKeys.add(key2);
20650
20650
  }
20651
20651
  current = Object.getPrototypeOf(current);
20652
20652
  }
@@ -20730,9 +20730,9 @@ function FromNumber(value) {
20730
20730
  }
20731
20731
  function FromObject2(value) {
20732
20732
  FNV1A64_OP(ByteMarker.Object);
20733
- for (const key of InstanceKeys(value).sort()) {
20734
- FromValue2(key);
20735
- FromValue2(value[key]);
20733
+ for (const key2 of InstanceKeys(value).sort()) {
20734
+ FromValue2(key2);
20735
+ FromValue2(value[key2]);
20736
20736
  }
20737
20737
  }
20738
20738
  function FromRegExp2(value) {
@@ -21137,9 +21137,9 @@ function TemplateLiteralDecode(pattern) {
21137
21137
  }
21138
21138
 
21139
21139
  // node_modules/typebox/build/type/engine/record/record_create.mjs
21140
- function CreateRecord(key, value) {
21140
+ function CreateRecord(key2, value) {
21141
21141
  const type = "object";
21142
- const patternProperties = { [key]: value };
21142
+ const patternProperties = { [key2]: value };
21143
21143
  return memory_exports.Create({ ["~kind"]: "Record" }, { type, patternProperties });
21144
21144
  }
21145
21145
 
@@ -21237,13 +21237,13 @@ function CompositeProperty(left, right) {
21237
21237
  const property = RemoveReadonly(RemoveOptional(evaluated));
21238
21238
  return isReadonly && isOptional ? AddReadonly(AddOptional(property)) : isReadonly && !isOptional ? AddReadonly(property) : !isReadonly && isOptional ? AddOptional(property) : property;
21239
21239
  }
21240
- function CompositePropertyKey(left, right, key) {
21241
- return key in left ? key in right ? CompositeProperty(left[key], right[key]) : left[key] : key in right ? right[key] : Never();
21240
+ function CompositePropertyKey(left, right, key2) {
21241
+ return key2 in left ? key2 in right ? CompositeProperty(left[key2], right[key2]) : left[key2] : key2 in right ? right[key2] : Never();
21242
21242
  }
21243
21243
  function CompositeProperties(left, right) {
21244
21244
  const keys = /* @__PURE__ */ new Set([...guard_exports.Keys(left), ...guard_exports.Keys(right)]);
21245
- const result2 = [...keys].reduce((result3, key) => {
21246
- return { ...result3, [key]: CompositePropertyKey(left, right, key) };
21245
+ const result2 = [...keys].reduce((result3, key2) => {
21246
+ return { ...result3, [key2]: CompositePropertyKey(left, right, key2) };
21247
21247
  }, {});
21248
21248
  return result2;
21249
21249
  }
@@ -21368,8 +21368,8 @@ function FromIntersectKey(types, value) {
21368
21368
  }
21369
21369
 
21370
21370
  // node_modules/typebox/build/type/engine/record/from_key_literal.mjs
21371
- function FromLiteralKey(key, value) {
21372
- return guard_exports.IsString(key) || guard_exports.IsNumber(key) ? _Object_({ [key]: value }) : guard_exports.IsEqual(key, false) ? _Object_({ false: value }) : guard_exports.IsEqual(key, true) ? _Object_({ true: value }) : _Object_({});
21371
+ function FromLiteralKey(key2, value) {
21372
+ return guard_exports.IsString(key2) || guard_exports.IsNumber(key2) ? _Object_({ [key2]: value }) : guard_exports.IsEqual(key2, false) ? _Object_({ false: value }) : guard_exports.IsEqual(key2, true) ? _Object_({ true: value }) : _Object_({});
21373
21373
  }
21374
21374
 
21375
21375
  // node_modules/typebox/build/type/engine/record/from_key_number.mjs
@@ -21379,8 +21379,8 @@ function FromNumberKey(_key, value) {
21379
21379
  }
21380
21380
 
21381
21381
  // node_modules/typebox/build/type/engine/record/from_key_string.mjs
21382
- function FromStringKey(key, value) {
21383
- return guard_exports.HasPropertyKey(key, "pattern") && (guard_exports.IsString(key.pattern) || key.pattern instanceof RegExp) ? CreateRecord(key.pattern.toString(), value) : CreateRecord(StringKey, value);
21382
+ function FromStringKey(key2, value) {
21383
+ return guard_exports.HasPropertyKey(key2, "pattern") && (guard_exports.IsString(key2.pattern) || key2.pattern instanceof RegExp) ? CreateRecord(key2.pattern.toString(), value) : CreateRecord(StringKey, value);
21384
21384
  }
21385
21385
 
21386
21386
  // node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs
@@ -21424,18 +21424,18 @@ function FromUnionKey(types, value) {
21424
21424
  }
21425
21425
 
21426
21426
  // node_modules/typebox/build/type/engine/record/from_key.mjs
21427
- function FromKey(key, value) {
21428
- const result2 = IsAny(key) ? FromAnyKey(value) : IsBoolean3(key) ? FromBooleanKey(value) : IsEnum(key) ? FromEnumKey(key.enum, value) : IsInteger2(key) ? FromIntegerKey(key, value) : IsIntersect(key) ? FromIntersectKey(key.allOf, value) : IsLiteral(key) ? FromLiteralKey(key.const, value) : IsNumber3(key) ? FromNumberKey(key, value) : IsUnion(key) ? FromUnionKey(key.anyOf, value) : IsString3(key) ? FromStringKey(key, value) : IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) : _Object_({});
21427
+ function FromKey(key2, value) {
21428
+ const result2 = IsAny(key2) ? FromAnyKey(value) : IsBoolean3(key2) ? FromBooleanKey(value) : IsEnum(key2) ? FromEnumKey(key2.enum, value) : IsInteger2(key2) ? FromIntegerKey(key2, value) : IsIntersect(key2) ? FromIntersectKey(key2.allOf, value) : IsLiteral(key2) ? FromLiteralKey(key2.const, value) : IsNumber3(key2) ? FromNumberKey(key2, value) : IsUnion(key2) ? FromUnionKey(key2.anyOf, value) : IsString3(key2) ? FromStringKey(key2, value) : IsTemplateLiteral(key2) ? FromTemplateKey(key2.pattern, value) : _Object_({});
21429
21429
  return result2;
21430
21430
  }
21431
21431
 
21432
21432
  // node_modules/typebox/build/type/engine/record/instantiate.mjs
21433
- function RecordAction(key, value, options) {
21434
- const result2 = CanInstantiate([key]) ? memory_exports.Update(FromKey(key, value), {}, options) : RecordDeferred(key, value, options);
21433
+ function RecordAction(key2, value, options) {
21434
+ const result2 = CanInstantiate([key2]) ? memory_exports.Update(FromKey(key2, value), {}, options) : RecordDeferred(key2, value, options);
21435
21435
  return result2;
21436
21436
  }
21437
- function RecordInstantiate(context, state, key, value, options) {
21438
- const instantiatedKey = InstantiateType(context, state, key);
21437
+ function RecordInstantiate(context, state, key2, value, options) {
21438
+ const instantiatedKey = InstantiateType(context, state, key2);
21439
21439
  const instantiatedValue = InstantiateType(context, state, value);
21440
21440
  return RecordAction(instantiatedKey, instantiatedValue, options);
21441
21441
  }
@@ -21444,11 +21444,11 @@ function RecordInstantiate(context, state, key, value, options) {
21444
21444
  var IntegerKey = `^${IntegerPattern}$`;
21445
21445
  var NumberKey = `^${NumberPattern}$`;
21446
21446
  var StringKey = `^${StringPattern}$`;
21447
- function RecordDeferred(key, value, options = {}) {
21448
- return Deferred("Record", [key, value], options);
21447
+ function RecordDeferred(key2, value, options = {}) {
21448
+ return Deferred("Record", [key2, value], options);
21449
21449
  }
21450
- function Record(key, value, options = {}) {
21451
- return RecordAction(key, value, options);
21450
+ function Record(key2, value, options = {}) {
21451
+ return RecordAction(key2, value, options);
21452
21452
  }
21453
21453
  function RecordFromPattern(pattern, value) {
21454
21454
  return CreateRecord(pattern, value);
@@ -21719,9 +21719,9 @@ function OptionalMapping(input) {
21719
21719
  return input.length > 0;
21720
21720
  }
21721
21721
  function PropertyMapping(input) {
21722
- const [isReadonly, key, isOptional, _colon, type] = input;
21722
+ const [isReadonly, key2, isOptional, _colon, type] = input;
21723
21723
  return {
21724
- [key]: isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type
21724
+ [key2]: isReadonly && isOptional ? AddReadonlyDeferred(AddOptionalDeferred(type)) : isReadonly && !isOptional ? AddReadonlyDeferred(type) : !isReadonly && isOptional ? AddOptionalDeferred(type) : type
21725
21725
  };
21726
21726
  }
21727
21727
  function PropertyDelimiterMapping(input) {
@@ -22625,8 +22625,8 @@ function ExtendsProperty(inferred, left, right) {
22625
22625
  );
22626
22626
  }
22627
22627
  function ExtractInferredProperties(keys, properties) {
22628
- return keys.reduce((result2, key) => {
22629
- return key in properties ? IsExtendsTrueLike(properties[key]) ? { ...result2, ...properties[key].inferred } : Unreachable() : Unreachable();
22628
+ return keys.reduce((result2, key2) => {
22629
+ return key2 in properties ? IsExtendsTrueLike(properties[key2]) ? { ...result2, ...properties[key2].inferred } : Unreachable() : Unreachable();
22630
22630
  }, {});
22631
22631
  }
22632
22632
  function ExtendsPropertiesComparer(inferred, left, right) {
@@ -22646,10 +22646,10 @@ function ExtendsObjectToObject(inferred, left, right) {
22646
22646
  return ExtendsProperties(inferred, left, right);
22647
22647
  }
22648
22648
  function RecordMergeInferred(left, right) {
22649
- return guard_exports.Keys(right).reduce((result2, key) => {
22649
+ return guard_exports.Keys(right).reduce((result2, key2) => {
22650
22650
  return {
22651
22651
  ...result2,
22652
- [key]: guard_exports.HasPropertyKey(left, key) ? IsUnion(result2[key]) ? Union([...result2[key].anyOf, right[key]]) : Union([left[key], right[key]]) : right[key]
22652
+ [key2]: guard_exports.HasPropertyKey(left, key2) ? IsUnion(result2[key2]) ? Union([...result2[key2].anyOf, right[key2]]) : Union([left[key2], right[key2]]) : right[key2]
22653
22653
  };
22654
22654
  }, left);
22655
22655
  }
@@ -22879,8 +22879,8 @@ function FromTypes3(context, types, result2) {
22879
22879
  function FromType4(context, type, result2) {
22880
22880
  return IsRef(type) ? FromRef2(context, type.$ref, result2) : IsArray2(type) ? FromType4(context, type.items, result2) : IsConstructor2(type) ? FromTypes3(context, [...type.parameters, type.instanceType], result2) : IsFunction2(type) ? FromTypes3(context, [...type.parameters, type.returnType], result2) : IsInterfaceDeferred(type) ? FromProperties2(context, type.parameters[1], result2) : IsIntersect(type) ? FromTypes3(context, type.allOf, result2) : IsObject2(type) ? FromProperties2(context, type.properties, result2) : IsUnion(type) ? FromTypes3(context, type.anyOf, result2) : IsTuple(type) ? FromTypes3(context, type.items, result2) : IsRecord(type) ? FromType4(context, RecordValue(type), result2) : result2;
22881
22881
  }
22882
- function CyclicDependencies(context, key, type) {
22883
- const result2 = FromType4(context, type, [key]);
22882
+ function CyclicDependencies(context, key2, type) {
22883
+ const result2 = FromType4(context, type, [key2]);
22884
22884
  return result2;
22885
22885
  }
22886
22886
 
@@ -22889,8 +22889,8 @@ function FromRef3(_ref) {
22889
22889
  return Any();
22890
22890
  }
22891
22891
  function FromProperties3(properties) {
22892
- return guard_exports.Keys(properties).reduce((result2, key) => {
22893
- return { ...result2, [key]: FromType5(properties[key]) };
22892
+ return guard_exports.Keys(properties).reduce((result2, key2) => {
22893
+ return { ...result2, [key2]: FromType5(properties[key2]) };
22894
22894
  }, {});
22895
22895
  }
22896
22896
  function FromTypes4(types) {
@@ -22916,11 +22916,11 @@ function CyclicInterface(context, heritage, properties) {
22916
22916
  return evaluatedInterface;
22917
22917
  }
22918
22918
  function CyclicDefinitions(context, dependencies) {
22919
- const keys = guard_exports.Keys(context).filter((key) => dependencies.includes(key));
22920
- return keys.reduce((result2, key) => {
22921
- const type = context[key];
22919
+ const keys = guard_exports.Keys(context).filter((key2) => dependencies.includes(key2));
22920
+ return keys.reduce((result2, key2) => {
22921
+ const type = context[key2];
22922
22922
  const instantiatedType = IsInterfaceDeferred(type) ? CyclicInterface(context, type.parameters[0], type.parameters[1]) : type;
22923
- return { ...result2, [key]: instantiatedType };
22923
+ return { ...result2, [key2]: instantiatedType };
22924
22924
  }, {});
22925
22925
  }
22926
22926
  function InstantiateCyclic(context, ref, type) {
@@ -23403,12 +23403,12 @@ function FromDependent(if_, then_, else_) {
23403
23403
 
23404
23404
  // node_modules/typebox/build/type/engine/object/from_intersect.mjs
23405
23405
  function CollapseIntersectProperties(left, right) {
23406
- const leftKeys = guard_exports.Keys(left).filter((key) => !guard_exports.HasPropertyKey(right, key));
23407
- const rightKeys = guard_exports.Keys(right).filter((key) => !guard_exports.HasPropertyKey(left, key));
23408
- const sharedKeys = guard_exports.Keys(left).filter((key) => guard_exports.HasPropertyKey(right, key));
23409
- const leftProperties = leftKeys.reduce((result2, key) => ({ ...result2, [key]: left[key] }), {});
23410
- const rightProperties = rightKeys.reduce((result2, key) => ({ ...result2, [key]: right[key] }), {});
23411
- const sharedProperties = sharedKeys.reduce((result2, key) => ({ ...result2, [key]: EvaluateIntersect([left[key], right[key]]) }), {});
23406
+ const leftKeys = guard_exports.Keys(left).filter((key2) => !guard_exports.HasPropertyKey(right, key2));
23407
+ const rightKeys = guard_exports.Keys(right).filter((key2) => !guard_exports.HasPropertyKey(left, key2));
23408
+ const sharedKeys = guard_exports.Keys(left).filter((key2) => guard_exports.HasPropertyKey(right, key2));
23409
+ const leftProperties = leftKeys.reduce((result2, key2) => ({ ...result2, [key2]: left[key2] }), {});
23410
+ const rightProperties = rightKeys.reduce((result2, key2) => ({ ...result2, [key2]: right[key2] }), {});
23411
+ const sharedProperties = sharedKeys.reduce((result2, key2) => ({ ...result2, [key2]: EvaluateIntersect([left[key2], right[key2]]) }), {});
23412
23412
  const unique = memory_exports.Assign(leftProperties, rightProperties);
23413
23413
  const shared = memory_exports.Assign(unique, sharedProperties);
23414
23414
  return shared;
@@ -23433,9 +23433,9 @@ function FromTuple(types) {
23433
23433
 
23434
23434
  // node_modules/typebox/build/type/engine/object/from_union.mjs
23435
23435
  function CollapseUnionProperties(left, right) {
23436
- const sharedKeys = guard_exports.Keys(left).filter((key) => key in right);
23437
- const result2 = sharedKeys.reduce((result3, key) => {
23438
- return { ...result3, [key]: EvaluateUnion([left[key], right[key]]) };
23436
+ const sharedKeys = guard_exports.Keys(left).filter((key2) => key2 in right);
23437
+ const result2 = sharedKeys.reduce((result3, key2) => {
23438
+ return { ...result3, [key2]: EvaluateUnion([left[key2], right[key2]]) };
23439
23439
  }, {});
23440
23440
  return result2;
23441
23441
  }
@@ -23557,8 +23557,8 @@ function ExpandThis(properties, type) {
23557
23557
  }
23558
23558
 
23559
23559
  // node_modules/typebox/build/type/engine/indexed/from_object.mjs
23560
- function IndexProperty(properties, key) {
23561
- const selectedType = key in properties ? properties[key] : Never();
23560
+ function IndexProperty(properties, key2) {
23561
+ const selectedType = key2 in properties ? properties[key2] : Never();
23562
23562
  const result2 = ExpandThis(properties, selectedType);
23563
23563
  return result2;
23564
23564
  }
@@ -23575,7 +23575,7 @@ function FromIndexer(properties, indexer) {
23575
23575
  }
23576
23576
  var NumericKeyPattern = new RegExp(IntegerKey);
23577
23577
  function NumericKeys(keys) {
23578
- const result2 = keys.filter((key) => NumericKeyPattern.test(key));
23578
+ const result2 = keys.filter((key2) => NumericKeyPattern.test(key2));
23579
23579
  return result2;
23580
23580
  }
23581
23581
  function FromIndexerNumber(properties) {
@@ -23805,16 +23805,16 @@ function MappedInstantiate(context, state, identifier, type, as, property, optio
23805
23805
  // node_modules/typebox/build/type/engine/module/instantiate.mjs
23806
23806
  function InstantiateCyclics(context, declarations, cyclicKeys) {
23807
23807
  const declarationContext = memory_exports.Assign(context, declarations);
23808
- const declarationKeys = guard_exports.Keys(declarations).filter((key) => cyclicKeys.includes(key));
23809
- return declarationKeys.reduce((result2, key) => {
23810
- return { ...result2, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };
23808
+ const declarationKeys = guard_exports.Keys(declarations).filter((key2) => cyclicKeys.includes(key2));
23809
+ return declarationKeys.reduce((result2, key2) => {
23810
+ return { ...result2, [key2]: InstantiateCyclic(declarationContext, key2, declarations[key2]) };
23811
23811
  }, {});
23812
23812
  }
23813
23813
  function InstantiateNonCyclics(context, declarations, cyclicKeys) {
23814
23814
  const declarationContext = memory_exports.Assign(context, declarations);
23815
- const declarationKeys = guard_exports.Keys(declarations).filter((key) => !cyclicKeys.includes(key));
23816
- return declarationKeys.reduce((result2, key) => {
23817
- return { ...result2, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };
23815
+ const declarationKeys = guard_exports.Keys(declarations).filter((key2) => !cyclicKeys.includes(key2));
23816
+ return declarationKeys.reduce((result2, key2) => {
23817
+ return { ...result2, [key2]: InstantiateType(declarationContext, State([], []), declarations[key2]) };
23818
23818
  }, {});
23819
23819
  }
23820
23820
  function InstantiateModule(context, declarations, options) {
@@ -23869,8 +23869,8 @@ function ToIndexable(type) {
23869
23869
 
23870
23870
  // node_modules/typebox/build/type/engine/omit/from_type.mjs
23871
23871
  function FromKeys(properties, keys) {
23872
- const result2 = guard_exports.Keys(properties).reduce((result3, key) => {
23873
- return keys.includes(key) ? result3 : { ...result3, [key]: properties[key] };
23872
+ const result2 = guard_exports.Keys(properties).reduce((result3, key2) => {
23873
+ return keys.includes(key2) ? result3 : { ...result3, [key2]: properties[key2] };
23874
23874
  }, {});
23875
23875
  return result2;
23876
23876
  }
@@ -23988,8 +23988,8 @@ function Pick(type, indexer_or_keys, options = {}) {
23988
23988
 
23989
23989
  // node_modules/typebox/build/type/engine/pick/from_type.mjs
23990
23990
  function FromKeys2(properties, keys) {
23991
- const result2 = guard_exports.Keys(properties).reduce((result3, key) => {
23992
- return keys.includes(key) ? memory_exports.Assign(result3, { [key]: properties[key] }) : result3;
23991
+ const result2 = guard_exports.Keys(properties).reduce((result3, key2) => {
23992
+ return keys.includes(key2) ? memory_exports.Assign(result3, { [key2]: properties[key2] }) : result3;
23993
23993
  }, {});
23994
23994
  return result2;
23995
23995
  }
@@ -24209,8 +24209,8 @@ function CanInstantiate(types) {
24209
24209
  return guard_exports.ShiftLeft(types, (left, right) => IsRef(left) ? false : CanInstantiate(right), () => true);
24210
24210
  }
24211
24211
  function InstantiateProperties(context, state, properties) {
24212
- return guard_exports.Keys(properties).reduce((result2, key) => {
24213
- return { ...result2, [key]: InstantiateType(context, state, properties[key]) };
24212
+ return guard_exports.Keys(properties).reduce((result2, key2) => {
24213
+ return { ...result2, [key2]: InstantiateType(context, state, properties[key2]) };
24214
24214
  }, {});
24215
24215
  }
24216
24216
  function InstantiateElements(context, state, types) {
@@ -24737,8 +24737,8 @@ var CheckContext = class {
24737
24737
  this.GetIndices().add(index);
24738
24738
  return true;
24739
24739
  }
24740
- AddKey(key) {
24741
- this.GetKeys().add(key);
24740
+ AddKey(key2) {
24741
+ this.GetKeys().add(key2);
24742
24742
  return true;
24743
24743
  }
24744
24744
  GetIndices() {
@@ -24831,7 +24831,7 @@ function RegisterResourceAnchors(anchors, schema, isRoot = true) {
24831
24831
  if (!isRoot && IsId(schema))
24832
24832
  return anchors;
24833
24833
  const next = !isRoot && IsDynamicAnchor(schema) ? [...anchors, schema] : anchors;
24834
- return Object.keys(schema).reduce((result2, key) => RegisterResourceAnchors(result2, schema[key], false), next);
24834
+ return Object.keys(schema).reduce((result2, key2) => RegisterResourceAnchors(result2, schema[key2], false), next);
24835
24835
  }
24836
24836
  function ResourceEntry(stack, schema) {
24837
24837
  return stack.resourceEntries.get(schema);
@@ -24934,8 +24934,8 @@ function UnicodeRegExp(pattern) {
24934
24934
  }
24935
24935
 
24936
24936
  // node_modules/typebox/build/schema/engine/additionalProperties.mjs
24937
- function GetPropertyKeyAsPattern(key) {
24938
- const escaped = key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
24937
+ function GetPropertyKeyAsPattern(key2) {
24938
+ const escaped = key2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
24939
24939
  return `^${escaped}$`;
24940
24940
  }
24941
24941
  function GetPropertiesPattern(schema) {
@@ -24948,20 +24948,20 @@ function GetPropertiesPattern(schema) {
24948
24948
  }
24949
24949
  function CheckAdditionalProperties(stack, context, schema, value) {
24950
24950
  const regexp = UnicodeRegExp(GetPropertiesPattern(schema));
24951
- const isAdditionalProperties = guard_exports.Every(guard_exports.Keys(value), 0, (key, _index) => {
24952
- return regexp.test(key) || CheckSchemaPushStack(stack, context, schema.additionalProperties, value[key]) && context.AddKey(key);
24951
+ const isAdditionalProperties = guard_exports.Every(guard_exports.Keys(value), 0, (key2, _index) => {
24952
+ return regexp.test(key2) || CheckSchemaPushStack(stack, context, schema.additionalProperties, value[key2]) && context.AddKey(key2);
24953
24953
  });
24954
24954
  return isAdditionalProperties;
24955
24955
  }
24956
24956
  function ErrorAdditionalProperties(stack, context, schemaPath, instancePath, schema, value) {
24957
24957
  const regexp = UnicodeRegExp(GetPropertiesPattern(schema));
24958
24958
  const additionalProperties = [];
24959
- const isAdditionalProperties = guard_exports.EveryAll(guard_exports.Keys(value), 0, (key, _index) => {
24959
+ const isAdditionalProperties = guard_exports.EveryAll(guard_exports.Keys(value), 0, (key2, _index) => {
24960
24960
  const nextSchemaPath = `${schemaPath}/additionalProperties`;
24961
- const nextInstancePath = `${instancePath}/${EncodeFragment(key)}`;
24962
- const isAdditionalProperty = regexp.test(key) || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.additionalProperties, value[key]) && context.AddKey(key);
24961
+ const nextInstancePath = `${instancePath}/${EncodeFragment(key2)}`;
24962
+ const isAdditionalProperty = regexp.test(key2) || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.additionalProperties, value[key2]) && context.AddKey(key2);
24963
24963
  if (!isAdditionalProperty)
24964
- additionalProperties.push(key);
24964
+ additionalProperties.push(key2);
24965
24965
  return isAdditionalProperty;
24966
24966
  });
24967
24967
  return isAdditionalProperties || context.AddError("additionalProperties", schemaPath, instancePath, { additionalProperties });
@@ -25049,16 +25049,16 @@ function ErrorContains(stack, context, schemaPath, instancePath, schema, value)
25049
25049
  // node_modules/typebox/build/schema/engine/dependencies.mjs
25050
25050
  function CheckDependencies(stack, context, schema, value) {
25051
25051
  const isLength = guard_exports.IsEqual(guard_exports.Keys(value).length, 0);
25052
- const isEvery = guard_exports.Every(guard_exports.Entries(schema.dependencies), 0, ([key, schema2]) => {
25053
- return !guard_exports.HasPropertyKey(value, key) || (guard_exports.IsArray(schema2) ? schema2.every((key2) => guard_exports.HasPropertyKey(value, key2)) : CheckSchema(stack, context, schema2, value));
25052
+ const isEvery = guard_exports.Every(guard_exports.Entries(schema.dependencies), 0, ([key2, schema2]) => {
25053
+ return !guard_exports.HasPropertyKey(value, key2) || (guard_exports.IsArray(schema2) ? schema2.every((key3) => guard_exports.HasPropertyKey(value, key3)) : CheckSchema(stack, context, schema2, value));
25054
25054
  });
25055
25055
  return isLength || isEvery;
25056
25056
  }
25057
25057
  function ErrorDependencies(stack, context, schemaPath, instancePath, schema, value) {
25058
25058
  const isLength = guard_exports.IsEqual(guard_exports.Keys(value).length, 0);
25059
- const isEvery = guard_exports.EveryAll(guard_exports.Entries(schema.dependencies), 0, ([key, schema2]) => {
25060
- const nextSchemaPath = `${schemaPath}/dependencies/${EncodeFragment(key)}`;
25061
- return !guard_exports.HasPropertyKey(value, key) || (guard_exports.IsArray(schema2) ? schema2.every((dependency) => guard_exports.HasPropertyKey(value, dependency) || context.AddError("dependencies", schemaPath, instancePath, { property: key, dependencies: schema2 })) : ErrorSchema(stack, context, nextSchemaPath, instancePath, schema2, value));
25059
+ const isEvery = guard_exports.EveryAll(guard_exports.Entries(schema.dependencies), 0, ([key2, schema2]) => {
25060
+ const nextSchemaPath = `${schemaPath}/dependencies/${EncodeFragment(key2)}`;
25061
+ return !guard_exports.HasPropertyKey(value, key2) || (guard_exports.IsArray(schema2) ? schema2.every((dependency) => guard_exports.HasPropertyKey(value, dependency) || context.AddError("dependencies", schemaPath, instancePath, { property: key2, dependencies: schema2 })) : ErrorSchema(stack, context, nextSchemaPath, instancePath, schema2, value));
25062
25062
  });
25063
25063
  return isLength || isEvery;
25064
25064
  }
@@ -25066,15 +25066,15 @@ function ErrorDependencies(stack, context, schemaPath, instancePath, schema, val
25066
25066
  // node_modules/typebox/build/schema/engine/dependentRequired.mjs
25067
25067
  function CheckDependentRequired(_stack, _context, schema, value) {
25068
25068
  const isLength = guard_exports.IsEqual(guard_exports.Keys(value).length, 0);
25069
- const isEvery = guard_exports.Every(guard_exports.Entries(schema.dependentRequired), 0, ([key, keys]) => {
25070
- return !guard_exports.HasPropertyKey(value, key) || keys.every((key2) => guard_exports.HasPropertyKey(value, key2));
25069
+ const isEvery = guard_exports.Every(guard_exports.Entries(schema.dependentRequired), 0, ([key2, keys]) => {
25070
+ return !guard_exports.HasPropertyKey(value, key2) || keys.every((key3) => guard_exports.HasPropertyKey(value, key3));
25071
25071
  });
25072
25072
  return isLength || isEvery;
25073
25073
  }
25074
25074
  function ErrorDependentRequired(_stack, context, schemaPath, instancePath, schema, value) {
25075
25075
  const isLength = guard_exports.IsEqual(guard_exports.Keys(value).length, 0);
25076
- const isEveryEntry = guard_exports.EveryAll(guard_exports.Entries(schema.dependentRequired), 0, ([key, keys]) => {
25077
- return !guard_exports.HasPropertyKey(value, key) || guard_exports.EveryAll(keys, 0, (dependency) => guard_exports.HasPropertyKey(value, dependency) || context.AddError("dependentRequired", schemaPath, instancePath, { property: key, dependencies: keys }));
25076
+ const isEveryEntry = guard_exports.EveryAll(guard_exports.Entries(schema.dependentRequired), 0, ([key2, keys]) => {
25077
+ return !guard_exports.HasPropertyKey(value, key2) || guard_exports.EveryAll(keys, 0, (dependency) => guard_exports.HasPropertyKey(value, dependency) || context.AddError("dependentRequired", schemaPath, instancePath, { property: key2, dependencies: keys }));
25078
25078
  });
25079
25079
  return isLength || isEveryEntry;
25080
25080
  }
@@ -25082,16 +25082,16 @@ function ErrorDependentRequired(_stack, context, schemaPath, instancePath, schem
25082
25082
  // node_modules/typebox/build/schema/engine/dependentSchemas.mjs
25083
25083
  function CheckDependentSchemas(stack, context, schema, value) {
25084
25084
  const isLength = guard_exports.IsEqual(guard_exports.Keys(value).length, 0);
25085
- const isEvery = guard_exports.Every(guard_exports.Entries(schema.dependentSchemas), 0, ([key, schema2]) => {
25086
- return !guard_exports.HasPropertyKey(value, key) || CheckSchema(stack, context, schema2, value);
25085
+ const isEvery = guard_exports.Every(guard_exports.Entries(schema.dependentSchemas), 0, ([key2, schema2]) => {
25086
+ return !guard_exports.HasPropertyKey(value, key2) || CheckSchema(stack, context, schema2, value);
25087
25087
  });
25088
25088
  return isLength || isEvery;
25089
25089
  }
25090
25090
  function ErrorDependentSchemas(stack, context, schemaPath, instancePath, schema, value) {
25091
25091
  const isLength = guard_exports.IsEqual(guard_exports.Keys(value).length, 0);
25092
- const isEvery = guard_exports.EveryAll(guard_exports.Entries(schema.dependentSchemas), 0, ([key, schema2]) => {
25093
- const nextSchemaPath = `${schemaPath}/dependentSchemas/${EncodeFragment(key)}`;
25094
- return !guard_exports.HasPropertyKey(value, key) || ErrorSchema(stack, context, nextSchemaPath, instancePath, schema2, value);
25092
+ const isEvery = guard_exports.EveryAll(guard_exports.Entries(schema.dependentSchemas), 0, ([key2, schema2]) => {
25093
+ const nextSchemaPath = `${schemaPath}/dependentSchemas/${EncodeFragment(key2)}`;
25094
+ return !guard_exports.HasPropertyKey(value, key2) || ErrorSchema(stack, context, nextSchemaPath, instancePath, schema2, value);
25095
25095
  });
25096
25096
  return isLength || isEvery;
25097
25097
  }
@@ -25203,8 +25203,8 @@ function SearchDynamicAnchor(schema, name) {
25203
25203
  return schema;
25204
25204
  }
25205
25205
  if (guard_exports.IsObject(schema)) {
25206
- for (const key of guard_exports.Keys(schema)) {
25207
- const result2 = SearchDynamicAnchor(schema[key], name);
25206
+ for (const key2 of guard_exports.Keys(schema)) {
25207
+ const result2 = SearchDynamicAnchor(schema[key2], name);
25208
25208
  if (result2)
25209
25209
  return result2;
25210
25210
  }
@@ -25222,8 +25222,8 @@ function SearchBase(schema, base, target) {
25222
25222
  return result2;
25223
25223
  }
25224
25224
  } else if (guard_exports.IsObject(schema)) {
25225
- for (const key of guard_exports.Keys(schema)) {
25226
- const result2 = SearchBase(schema[key], nextBase, target);
25225
+ for (const key2 of guard_exports.Keys(schema)) {
25226
+ const result2 = SearchBase(schema[key2], nextBase, target);
25227
25227
  if (!guard_exports.IsUndefined(result2))
25228
25228
  return result2;
25229
25229
  }
@@ -25281,10 +25281,10 @@ function MatchFromArray(schema, base, ref) {
25281
25281
  function MatchFromObject(schema, base, ref) {
25282
25282
  if (!guard_exports.IsObject(schema))
25283
25283
  return void 0;
25284
- return guard_exports.Keys(schema).reduce((result2, key) => {
25285
- if (guard_exports.IsEqual(key, "const") || guard_exports.IsEqual(key, "enum"))
25284
+ return guard_exports.Keys(schema).reduce((result2, key2) => {
25285
+ if (guard_exports.IsEqual(key2, "const") || guard_exports.IsEqual(key2, "enum"))
25286
25286
  return result2;
25287
- const match = Match4(schema[key], base, ref);
25287
+ const match = Match4(schema[key2], base, ref);
25288
25288
  return !guard_exports.IsUndefined(match) ? match : result2;
25289
25289
  }, void 0);
25290
25290
  }
@@ -26235,8 +26235,8 @@ function ErrorPattern(stack, context, schemaPath, instancePath, schema, value) {
26235
26235
  function CheckPatternProperties(stack, context, schema, value) {
26236
26236
  return guard_exports.Every(guard_exports.Entries(schema.patternProperties), 0, ([pattern, schema2]) => {
26237
26237
  const regexp = UnicodeRegExp(pattern);
26238
- return guard_exports.Every(guard_exports.Entries(value), 0, ([key, prop]) => {
26239
- return !regexp.test(key) || CheckSchemaPushStack(stack, context, schema2, prop) && context.AddKey(key);
26238
+ return guard_exports.Every(guard_exports.Entries(value), 0, ([key2, prop]) => {
26239
+ return !regexp.test(key2) || CheckSchemaPushStack(stack, context, schema2, prop) && context.AddKey(key2);
26240
26240
  });
26241
26241
  });
26242
26242
  }
@@ -26244,10 +26244,10 @@ function ErrorPatternProperties(stack, context, schemaPath, instancePath, schema
26244
26244
  return guard_exports.EveryAll(guard_exports.Entries(schema.patternProperties), 0, ([pattern, schema2]) => {
26245
26245
  const nextSchemaPath = `${schemaPath}/patternProperties/${EncodeFragment(pattern)}`;
26246
26246
  const regexp = UnicodeRegExp(pattern);
26247
- return guard_exports.EveryAll(guard_exports.Entries(value), 0, ([key, value2]) => {
26248
- const nextInstancePath = `${instancePath}/${EncodeFragment(key)}`;
26249
- const notKey = !regexp.test(key);
26250
- return notKey || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema2, value2) && context.AddKey(key);
26247
+ return guard_exports.EveryAll(guard_exports.Entries(value), 0, ([key2, value2]) => {
26248
+ const nextInstancePath = `${instancePath}/${EncodeFragment(key2)}`;
26249
+ const notKey = !regexp.test(key2);
26250
+ return notKey || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema2, value2) && context.AddKey(key2);
26251
26251
  });
26252
26252
  });
26253
26253
  }
@@ -26267,45 +26267,45 @@ function ErrorPrefixItems(stack, context, schemaPath, instancePath, schema, valu
26267
26267
  }
26268
26268
 
26269
26269
  // node_modules/typebox/build/schema/engine/_exact_optional.mjs
26270
- function IsExactOptional(required2, key) {
26271
- return required2.includes(key) || settings_exports.Get().exactOptionalPropertyTypes;
26270
+ function IsExactOptional(required2, key2) {
26271
+ return required2.includes(key2) || settings_exports.Get().exactOptionalPropertyTypes;
26272
26272
  }
26273
- function InexactOptionalCheck(value, key) {
26274
- return guard_exports.IsUndefined(value[key]);
26273
+ function InexactOptionalCheck(value, key2) {
26274
+ return guard_exports.IsUndefined(value[key2]);
26275
26275
  }
26276
26276
 
26277
26277
  // node_modules/typebox/build/schema/engine/properties.mjs
26278
26278
  function CheckProperties(stack, context, schema, value) {
26279
26279
  const required2 = IsRequired(schema) ? schema.required : [];
26280
- const isProperties = guard_exports.Every(guard_exports.Entries(schema.properties), 0, ([key, schema2]) => {
26281
- const isProperty = !guard_exports.HasPropertyKey(value, key) || CheckSchemaPushStack(stack, context, schema2, value[key]) && context.AddKey(key);
26282
- return IsExactOptional(required2, key) ? isProperty : InexactOptionalCheck(value, key) || isProperty;
26280
+ const isProperties = guard_exports.Every(guard_exports.Entries(schema.properties), 0, ([key2, schema2]) => {
26281
+ const isProperty = !guard_exports.HasPropertyKey(value, key2) || CheckSchemaPushStack(stack, context, schema2, value[key2]) && context.AddKey(key2);
26282
+ return IsExactOptional(required2, key2) ? isProperty : InexactOptionalCheck(value, key2) || isProperty;
26283
26283
  });
26284
26284
  return isProperties;
26285
26285
  }
26286
26286
  function ErrorProperties(stack, context, schemaPath, instancePath, schema, value) {
26287
26287
  const required2 = IsRequired(schema) ? schema.required : [];
26288
- const isProperties = guard_exports.EveryAll(guard_exports.Entries(schema.properties), 0, ([key, schema2]) => {
26289
- const nextSchemaPath = `${schemaPath}/properties/${EncodeFragment(key)}`;
26290
- const nextInstancePath = `${instancePath}/${EncodeFragment(key)}`;
26291
- const isProperty = () => !guard_exports.HasPropertyKey(value, key) || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema2, value[key]) && context.AddKey(key);
26292
- return IsExactOptional(required2, key) ? isProperty() : InexactOptionalCheck(value, key) || isProperty();
26288
+ const isProperties = guard_exports.EveryAll(guard_exports.Entries(schema.properties), 0, ([key2, schema2]) => {
26289
+ const nextSchemaPath = `${schemaPath}/properties/${EncodeFragment(key2)}`;
26290
+ const nextInstancePath = `${instancePath}/${EncodeFragment(key2)}`;
26291
+ const isProperty = () => !guard_exports.HasPropertyKey(value, key2) || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema2, value[key2]) && context.AddKey(key2);
26292
+ return IsExactOptional(required2, key2) ? isProperty() : InexactOptionalCheck(value, key2) || isProperty();
26293
26293
  });
26294
26294
  return isProperties;
26295
26295
  }
26296
26296
 
26297
26297
  // node_modules/typebox/build/schema/engine/propertyNames.mjs
26298
26298
  function CheckPropertyNames(stack, context, schema, value) {
26299
- return guard_exports.Every(guard_exports.Keys(value), 0, (key, _index) => CheckSchema(stack, context, schema.propertyNames, key));
26299
+ return guard_exports.Every(guard_exports.Keys(value), 0, (key2, _index) => CheckSchema(stack, context, schema.propertyNames, key2));
26300
26300
  }
26301
26301
  function ErrorPropertyNames(stack, context, schemaPath, instancePath, schema, value) {
26302
26302
  const propertyNames = [];
26303
- const isPropertyNames = guard_exports.EveryAll(guard_exports.Keys(value), 0, (key, _index) => {
26304
- const nextInstancePath = `${instancePath}/${EncodeFragment(key)}`;
26303
+ const isPropertyNames = guard_exports.EveryAll(guard_exports.Keys(value), 0, (key2, _index) => {
26304
+ const nextInstancePath = `${instancePath}/${EncodeFragment(key2)}`;
26305
26305
  const nextSchemaPath = `${schemaPath}/propertyNames`;
26306
- const isPropertyName = ErrorSchema(stack, context, nextSchemaPath, nextInstancePath, schema.propertyNames, key);
26306
+ const isPropertyName = ErrorSchema(stack, context, nextSchemaPath, nextInstancePath, schema.propertyNames, key2);
26307
26307
  if (!isPropertyName)
26308
- propertyNames.push(key);
26308
+ propertyNames.push(key2);
26309
26309
  return isPropertyName;
26310
26310
  });
26311
26311
  return isPropertyNames || context.AddError("propertyNames", schemaPath, instancePath, { propertyNames });
@@ -26347,14 +26347,14 @@ function ErrorRef(stack, context, schemaPath, instancePath, schema, value) {
26347
26347
 
26348
26348
  // node_modules/typebox/build/schema/engine/required.mjs
26349
26349
  function CheckRequired(_stack, _context, schema, value) {
26350
- return guard_exports.Every(schema.required, 0, (key) => guard_exports.HasPropertyKey(value, key));
26350
+ return guard_exports.Every(schema.required, 0, (key2) => guard_exports.HasPropertyKey(value, key2));
26351
26351
  }
26352
26352
  function ErrorRequired(_stack, context, schemaPath, instancePath, schema, value) {
26353
26353
  const requiredProperties = [];
26354
- const isRequired = guard_exports.EveryAll(schema.required, 0, (key) => {
26355
- const hasKey = guard_exports.HasPropertyKey(value, key);
26354
+ const isRequired = guard_exports.EveryAll(schema.required, 0, (key2) => {
26355
+ const hasKey = guard_exports.HasPropertyKey(value, key2);
26356
26356
  if (!hasKey)
26357
- requiredProperties.push(key);
26357
+ requiredProperties.push(key2);
26358
26358
  return hasKey;
26359
26359
  });
26360
26360
  return isRequired || context.AddError("required", schemaPath, instancePath, { requiredProperties });
@@ -26404,18 +26404,18 @@ function ErrorUnevaluatedItems(stack, context, schemaPath, instancePath, schema,
26404
26404
  // node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs
26405
26405
  function CheckUnevaluatedProperties(stack, context, schema, value) {
26406
26406
  const keys = context.GetKeys();
26407
- return guard_exports.Every(guard_exports.Entries(value), 0, ([key, prop]) => {
26408
- return keys.has(key) || CheckSchema(stack, context, schema.unevaluatedProperties, prop) && context.AddKey(key);
26407
+ return guard_exports.Every(guard_exports.Entries(value), 0, ([key2, prop]) => {
26408
+ return keys.has(key2) || CheckSchema(stack, context, schema.unevaluatedProperties, prop) && context.AddKey(key2);
26409
26409
  });
26410
26410
  }
26411
26411
  function ErrorUnevaluatedProperties(stack, context, schemaPath, instancePath, schema, value) {
26412
26412
  const keys = context.GetKeys();
26413
26413
  const unevaluatedProperties = [];
26414
- const isUnevaluatedProperties = guard_exports.EveryAll(guard_exports.Entries(value), 0, ([key, prop]) => {
26414
+ const isUnevaluatedProperties = guard_exports.EveryAll(guard_exports.Entries(value), 0, ([key2, prop]) => {
26415
26415
  const nextContext = new ErrorContext();
26416
- const isEvaluatedProperty = keys.has(key) || ErrorSchema(stack, nextContext, schemaPath, instancePath, schema.unevaluatedProperties, prop) && context.AddKey(key);
26416
+ const isEvaluatedProperty = keys.has(key2) || ErrorSchema(stack, nextContext, schemaPath, instancePath, schema.unevaluatedProperties, prop) && context.AddKey(key2);
26417
26417
  if (!isEvaluatedProperty)
26418
- unevaluatedProperties.push(key);
26418
+ unevaluatedProperties.push(key2);
26419
26419
  return isEvaluatedProperty;
26420
26420
  });
26421
26421
  return isUnevaluatedProperties || context.AddError("unevaluatedProperties", schemaPath, instancePath, { unevaluatedProperties });
@@ -26572,20 +26572,20 @@ function FromObject10(context, type, value) {
26572
26572
  if (!guard_exports.IsObject(value) || guard_exports.IsArray(value))
26573
26573
  return value;
26574
26574
  const additionalProperties = GetAdditionalProperties(type);
26575
- for (const key of guard_exports.Keys(value)) {
26576
- if (guard_exports.HasPropertyKey(type.properties, key) && IsSchema(type.properties[key])) {
26577
- value[key] = FromType19(context, type.properties[key], value[key]);
26575
+ for (const key2 of guard_exports.Keys(value)) {
26576
+ if (guard_exports.HasPropertyKey(type.properties, key2) && IsSchema(type.properties[key2])) {
26577
+ value[key2] = FromType19(context, type.properties[key2], value[key2]);
26578
26578
  continue;
26579
26579
  }
26580
26580
  const unknownCheck = (
26581
26581
  // 1. additionalProperties: true
26582
- guard_exports.IsBoolean(additionalProperties) && guard_exports.IsEqual(additionalProperties, true) || IsSchema(additionalProperties) && Check2(context, additionalProperties, value[key])
26582
+ guard_exports.IsBoolean(additionalProperties) && guard_exports.IsEqual(additionalProperties, true) || IsSchema(additionalProperties) && Check2(context, additionalProperties, value[key2])
26583
26583
  );
26584
26584
  if (unknownCheck) {
26585
- value[key] = FromType19(context, additionalProperties, value[key]);
26585
+ value[key2] = FromType19(context, additionalProperties, value[key2]);
26586
26586
  continue;
26587
26587
  }
26588
- delete value[key];
26588
+ delete value[key2];
26589
26589
  }
26590
26590
  return value;
26591
26591
  }
@@ -26596,20 +26596,20 @@ function FromRecord3(context, type, value) {
26596
26596
  return value;
26597
26597
  const additionalProperties = GetAdditionalProperties(type);
26598
26598
  const [recordPattern, recordValue] = [new RegExp(RecordPattern(type)), RecordValue(type)];
26599
- for (const key of guard_exports.Keys(value)) {
26600
- if (recordPattern.test(key)) {
26601
- value[key] = FromType19(context, recordValue, value[key]);
26599
+ for (const key2 of guard_exports.Keys(value)) {
26600
+ if (recordPattern.test(key2)) {
26601
+ value[key2] = FromType19(context, recordValue, value[key2]);
26602
26602
  continue;
26603
26603
  }
26604
26604
  const unknownCheck = (
26605
26605
  // 1. additionalProperties: true
26606
- guard_exports.IsBoolean(additionalProperties) && guard_exports.IsEqual(additionalProperties, true) || IsSchema(additionalProperties) && Check2(context, additionalProperties, value[key])
26606
+ guard_exports.IsBoolean(additionalProperties) && guard_exports.IsEqual(additionalProperties, true) || IsSchema(additionalProperties) && Check2(context, additionalProperties, value[key2])
26607
26607
  );
26608
26608
  if (unknownCheck) {
26609
- value[key] = FromType19(context, additionalProperties, value[key]);
26609
+ value[key2] = FromType19(context, additionalProperties, value[key2]);
26610
26610
  continue;
26611
26611
  }
26612
- delete value[key];
26612
+ delete value[key2];
26613
26613
  }
26614
26614
  return value;
26615
26615
  }
@@ -26652,17 +26652,17 @@ function FromType19(context, type, value) {
26652
26652
 
26653
26653
  // node_modules/typebox/build/value/shared/union_priority_sort.mjs
26654
26654
  function Modifiers(type, next) {
26655
- for (const key of guard_default.Keys(type)) {
26656
- if (guard_default.HasPropertyKey(next, key))
26655
+ for (const key2 of guard_default.Keys(type)) {
26656
+ if (guard_default.HasPropertyKey(next, key2))
26657
26657
  continue;
26658
- next[key] = type[key];
26658
+ next[key2] = type[key2];
26659
26659
  }
26660
26660
  return next;
26661
26661
  }
26662
26662
  function FromProperties4(properties) {
26663
26663
  const result2 = {};
26664
- for (const key of guard_default.Keys(properties))
26665
- result2[key] = FromType20(properties[key]);
26664
+ for (const key2 of guard_default.Keys(properties))
26665
+ result2[key2] = FromType20(properties[key2]);
26666
26666
  return result2;
26667
26667
  }
26668
26668
  function FromRecordKey(type) {
@@ -26912,9 +26912,9 @@ function FromNumber5(_context, _type, value) {
26912
26912
  function FromAdditionalProperties(context, entries, additionalProperties, value) {
26913
26913
  const keys = guard_exports.Keys(value);
26914
26914
  for (const [regexp, _] of entries) {
26915
- for (const key of keys) {
26916
- if (!regexp.test(key)) {
26917
- value[key] = FromType21(context, additionalProperties, value[key]);
26915
+ for (const key2 of keys) {
26916
+ if (!regexp.test(key2)) {
26917
+ value[key2] = FromType21(context, additionalProperties, value[key2]);
26918
26918
  }
26919
26919
  }
26920
26920
  }
@@ -26922,8 +26922,8 @@ function FromAdditionalProperties(context, entries, additionalProperties, value)
26922
26922
  }
26923
26923
 
26924
26924
  // node_modules/typebox/build/value/shared/optional_undefined.mjs
26925
- function IsOptionalUndefined(property, key, value) {
26926
- return IsOptional(property) && guard_exports.IsUndefined(value[key]);
26925
+ function IsOptionalUndefined(property, key2, value) {
26926
+ return IsOptional(property) && guard_exports.IsUndefined(value[key2]);
26927
26927
  }
26928
26928
 
26929
26929
  // node_modules/typebox/build/value/convert/from_object.mjs
@@ -26931,10 +26931,10 @@ function FromProperties5(context, type, value) {
26931
26931
  const entries = guard_exports.EntriesRegExp(type.properties);
26932
26932
  const keys = guard_exports.Keys(value);
26933
26933
  for (const [regexp, property] of entries) {
26934
- for (const key of keys) {
26935
- if (!regexp.test(key) || IsOptionalUndefined(property, key, value))
26934
+ for (const key2 of keys) {
26935
+ if (!regexp.test(key2) || IsOptionalUndefined(property, key2, value))
26936
26936
  continue;
26937
- value[key] = FromType21(context, property, value[key]);
26937
+ value[key2] = FromType21(context, property, value[key2]);
26938
26938
  }
26939
26939
  }
26940
26940
  return guard_exports.HasPropertyKey(type, "additionalProperties") && guard_exports.IsObject(type.additionalProperties) ? FromAdditionalProperties(context, entries, type.additionalProperties, value) : value;
@@ -26948,9 +26948,9 @@ function FromPatternProperties(context, type, value) {
26948
26948
  const entries = guard_exports.EntriesRegExp(type.patternProperties);
26949
26949
  const keys = guard_exports.Keys(value);
26950
26950
  for (const [regexp, schema] of entries) {
26951
- for (const key of keys) {
26952
- if (regexp.test(key)) {
26953
- value[key] = FromType21(context, schema, value[key]);
26951
+ for (const key2 of keys) {
26952
+ if (regexp.test(key2)) {
26953
+ value[key2] = FromType21(context, schema, value[key2]);
26954
26954
  }
26955
26955
  }
26956
26956
  }
@@ -26997,8 +26997,8 @@ function FromUnion10(context, type, value) {
26997
26997
  const matched = type.anyOf.some((type2) => Check2(context, type2, value));
26998
26998
  if (matched)
26999
26999
  return value;
27000
- const candidates = type.anyOf.map((type2) => FromType21(context, type2, Clone2(value)));
27001
- const selected = candidates.find((value2) => Check2(context, type, value2));
27000
+ const candidates2 = type.anyOf.map((type2) => FromType21(context, type2, Clone2(value)));
27001
+ const selected = candidates2.find((value2) => Check2(context, type, value2));
27002
27002
  return guard_exports.IsUndefined(selected) ? value : selected;
27003
27003
  }
27004
27004
 
@@ -27056,19 +27056,19 @@ function FromObject12(context, type, value) {
27056
27056
  if (!guard_exports.IsObject(value))
27057
27057
  return value;
27058
27058
  const knownPropertyKeys = guard_exports.Keys(type.properties);
27059
- for (const key of knownPropertyKeys) {
27060
- const propertyValue = FromType22(context, type.properties[key], value[key]);
27061
- const isUnassignableUndefined = guard_exports.IsUndefined(propertyValue) && (IsOptional(type.properties[key]) || !guard_exports.HasPropertyKey(type.properties[key], "default"));
27059
+ for (const key2 of knownPropertyKeys) {
27060
+ const propertyValue = FromType22(context, type.properties[key2], value[key2]);
27061
+ const isUnassignableUndefined = guard_exports.IsUndefined(propertyValue) && (IsOptional(type.properties[key2]) || !guard_exports.HasPropertyKey(type.properties[key2], "default"));
27062
27062
  if (isUnassignableUndefined)
27063
27063
  continue;
27064
- value[key] = propertyValue;
27064
+ value[key2] = propertyValue;
27065
27065
  }
27066
27066
  if (!IsAdditionalProperties(type) || guard_exports.IsBoolean(type.additionalProperties))
27067
27067
  return value;
27068
- for (const key of guard_exports.Keys(value)) {
27069
- if (knownPropertyKeys.includes(key))
27068
+ for (const key2 of guard_exports.Keys(value)) {
27069
+ if (knownPropertyKeys.includes(key2))
27070
27070
  continue;
27071
- value[key] = FromType22(context, type.additionalProperties, value[key]);
27071
+ value[key2] = FromType22(context, type.additionalProperties, value[key2]);
27072
27072
  }
27073
27073
  return value;
27074
27074
  }
@@ -27078,17 +27078,17 @@ function FromRecord5(context, type, value) {
27078
27078
  if (!guard_exports.IsObject(value))
27079
27079
  return value;
27080
27080
  const [recordKey, recordValue] = [new RegExp(RecordPattern(type)), RecordValue(type)];
27081
- for (const key of guard_exports.Keys(value)) {
27082
- if (!(recordKey.test(key) && IsDefault(recordValue)))
27081
+ for (const key2 of guard_exports.Keys(value)) {
27082
+ if (!(recordKey.test(key2) && IsDefault(recordValue)))
27083
27083
  continue;
27084
- value[key] = FromType22(context, recordValue, value[key]);
27084
+ value[key2] = FromType22(context, recordValue, value[key2]);
27085
27085
  }
27086
27086
  if (!IsAdditionalProperties(type))
27087
27087
  return value;
27088
- for (const key of guard_exports.Keys(value)) {
27089
- if (recordKey.test(key))
27088
+ for (const key2 of guard_exports.Keys(value)) {
27089
+ if (recordKey.test(key2))
27090
27090
  continue;
27091
- value[key] = FromType22(context, type.additionalProperties, value[key]);
27091
+ value[key2] = FromType22(context, type.additionalProperties, value[key2]);
27092
27092
  }
27093
27093
  return value;
27094
27094
  }
@@ -27224,10 +27224,10 @@ function FromIntersect9(direction, context, type, value) {
27224
27224
  function Decode6(direction, context, type, value) {
27225
27225
  if (!guard_exports.IsObjectNotArray(value))
27226
27226
  return value;
27227
- for (const key of guard_exports.Keys(type.properties)) {
27228
- if (!guard_exports.HasPropertyKey(value, key) || IsOptionalUndefined(type.properties[key], key, value))
27227
+ for (const key2 of guard_exports.Keys(type.properties)) {
27228
+ if (!guard_exports.HasPropertyKey(value, key2) || IsOptionalUndefined(type.properties[key2], key2, value))
27229
27229
  continue;
27230
- value[key] = FromType23(direction, context, type.properties[key], value[key]);
27230
+ value[key2] = FromType23(direction, context, type.properties[key2], value[key2]);
27231
27231
  }
27232
27232
  return Callback(direction, context, type, value);
27233
27233
  }
@@ -27235,10 +27235,10 @@ function Encode6(direction, context, type, value) {
27235
27235
  const exterior = Callback(direction, context, type, value);
27236
27236
  if (!guard_exports.IsObjectNotArray(exterior))
27237
27237
  return exterior;
27238
- for (const key of guard_exports.Keys(type.properties)) {
27239
- if (!guard_exports.HasPropertyKey(exterior, key) || IsOptionalUndefined(type.properties[key], key, exterior))
27238
+ for (const key2 of guard_exports.Keys(type.properties)) {
27239
+ if (!guard_exports.HasPropertyKey(exterior, key2) || IsOptionalUndefined(type.properties[key2], key2, exterior))
27240
27240
  continue;
27241
- exterior[key] = FromType23(direction, context, type.properties[key], exterior[key]);
27241
+ exterior[key2] = FromType23(direction, context, type.properties[key2], exterior[key2]);
27242
27242
  }
27243
27243
  return exterior;
27244
27244
  }
@@ -27251,10 +27251,10 @@ function Decode7(direction, context, type, value) {
27251
27251
  if (!guard_exports.IsObjectNotArray(value))
27252
27252
  return value;
27253
27253
  const regexp = new RegExp(RecordPattern(type));
27254
- for (const key of guard_exports.Keys(value)) {
27255
- if (!regexp.test(key))
27254
+ for (const key2 of guard_exports.Keys(value)) {
27255
+ if (!regexp.test(key2))
27256
27256
  continue;
27257
- value[key] = FromType23(direction, context, RecordValue(type), value[key]);
27257
+ value[key2] = FromType23(direction, context, RecordValue(type), value[key2]);
27258
27258
  }
27259
27259
  return Callback(direction, context, type, value);
27260
27260
  }
@@ -27263,10 +27263,10 @@ function Encode7(direction, context, type, value) {
27263
27263
  if (!guard_exports.IsObjectNotArray(exterior))
27264
27264
  return exterior;
27265
27265
  const regexp = new RegExp(RecordPattern(type));
27266
- for (const key of guard_exports.Keys(exterior)) {
27267
- if (!regexp.test(key))
27266
+ for (const key2 of guard_exports.Keys(exterior)) {
27267
+ if (!regexp.test(key2))
27268
27268
  continue;
27269
- exterior[key] = FromType23(direction, context, RecordValue(type), exterior[key]);
27269
+ exterior[key2] = FromType23(direction, context, RecordValue(type), exterior[key2]);
27270
27270
  }
27271
27271
  return exterior;
27272
27272
  }
@@ -27633,13 +27633,13 @@ function consoleStatus(value) {
27633
27633
  session_binding: token(v.session_binding) ?? "unknown",
27634
27634
  readiness_scope: token(v.readiness_scope) ?? "unknown"
27635
27635
  };
27636
- for (const key of ["vm", "lease_id", "console_id", "backend", "source"]) {
27637
- const s = token(v[key]);
27638
- if (s) result2[key] = s;
27636
+ for (const key2 of ["vm", "lease_id", "console_id", "backend", "source"]) {
27637
+ const s = token(v[key2]);
27638
+ if (s) result2[key2] = s;
27639
27639
  }
27640
27640
  if (v.environment_fingerprint === null) result2.environment_fingerprint = null;
27641
27641
  else if (token(v.environment_fingerprint)) result2.environment_fingerprint = token(v.environment_fingerprint);
27642
- for (const key of ["observed_at", "access_expires_at"]) if (typeof v[key] === "number" && Number.isFinite(v[key])) result2[key] = v[key];
27642
+ for (const key2 of ["observed_at", "access_expires_at"]) if (typeof v[key2] === "number" && Number.isFinite(v[key2])) result2[key2] = v[key2];
27643
27643
  if (v.attempt !== void 0) {
27644
27644
  const a = object4(v.attempt);
27645
27645
  result2.attempt = {
@@ -27907,7 +27907,7 @@ function decodePng(bytes, size) {
27907
27907
  };
27908
27908
  const rawSample = (row, index) => depth === 16 ? scan[row * stride + index * 2] << 8 | scan[row * stride + index * 2 + 1] : sample(row, index);
27909
27909
  const scale = depth < 8 ? 255 / max : 1;
27910
- const key = trns && (colorType === 0 || colorType === 2) ? Array.from({ length: channels }, (_, i) => trns.readUInt16BE(i * 2)) : void 0;
27910
+ const key2 = trns && (colorType === 0 || colorType === 2) ? Array.from({ length: channels }, (_, i) => trns.readUInt16BE(i * 2)) : void 0;
27911
27911
  for (let y = 0; y < height; y++) for (let x = 0; x < width; x++) {
27912
27912
  const o = (y * width + x) * 4, i = x * channels;
27913
27913
  if (colorType === 3) {
@@ -27919,7 +27919,7 @@ function decodePng(bytes, size) {
27919
27919
  rgba[o + 3] = trns && sample(y, x) < trns.length ? trns[sample(y, x)] : 255;
27920
27920
  continue;
27921
27921
  }
27922
- const keyed = key !== void 0 && key.every((value, c) => rawSample(y, i + c) === value);
27922
+ const keyed = key2 !== void 0 && key2.every((value, c) => rawSample(y, i + c) === value);
27923
27923
  if (colorType === 0 || colorType === 4) {
27924
27924
  const g = Math.round(sample(y, i) * scale);
27925
27925
  rgba[o] = g;
@@ -28143,7 +28143,7 @@ function imageFailure(error2) {
28143
28143
  return { status: code && known.has(code) ? code : "transfer-failed", diagnostic: error2 instanceof ImageError ? error2.message : code && known.has(code) ? `Image operation failed: ${code}` : "Image delivery could not complete; execution was not replayed." };
28144
28144
  }
28145
28145
  function canonical(value) {
28146
- return JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.keys(item).sort().map((key) => [key, item[key]])) : item);
28146
+ return JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.keys(item).sort().map((key2) => [key2, item[key2]])) : item);
28147
28147
  }
28148
28148
  function guard(signal) {
28149
28149
  if (signal?.aborted) fail("transfer-failed", "Image delivery cancelled or deadline exceeded.");
@@ -28541,8 +28541,8 @@ var ImageStore = class {
28541
28541
  for (const name of names.filter((n) => n.endsWith(".json"))) {
28542
28542
  const record3 = await this.load(name.slice(0, -5)).catch(() => void 0);
28543
28543
  if (!record3 || record3.recording !== recordingRoot || record3.descriptor.source !== "display") continue;
28544
- const key = `${record3.descriptor.sha256}:${record3.descriptor.bytes}`;
28545
- held.set(key, [...held.get(key) ?? [], record3.local]);
28544
+ const key2 = `${record3.descriptor.sha256}:${record3.descriptor.bytes}`;
28545
+ held.set(key2, [...held.get(key2) ?? [], record3.local]);
28546
28546
  }
28547
28547
  return held;
28548
28548
  }
@@ -28666,7 +28666,7 @@ var DownloadQueue = class {
28666
28666
  }
28667
28667
  }
28668
28668
  /** Shutdown: nothing more starts or is written; the download in flight is aborted. `wait` waits for it to stop. */
28669
- async close(wait) {
28669
+ async close(wait2) {
28670
28670
  this.state = "closed";
28671
28671
  for (const job of this.queued.splice(0)) {
28672
28672
  job.end = "cancelled";
@@ -28674,7 +28674,7 @@ var DownloadQueue = class {
28674
28674
  }
28675
28675
  const current = this.current;
28676
28676
  current?.controller.abort(new Error("The relay is shutting down"));
28677
- if (wait) await current?.done;
28677
+ if (wait2) await current?.done;
28678
28678
  }
28679
28679
  kick() {
28680
28680
  if (this.current || this.state === "closed" || !this.queued.length || this.paused && !this.queued[0].promoted) return;
@@ -28828,7 +28828,130 @@ async function refreshEvidenceState(incoming, destination, archiveRoot, options
28828
28828
  if (archived) await copy(archived, retained);
28829
28829
  }
28830
28830
 
28831
+ // src/mdns.ts
28832
+ import { createSocket } from "node:dgram";
28833
+ var TYPE = { A: 1, PTR: 12, TXT: 16, SRV: 33 };
28834
+ var GROUP = "224.0.0.251";
28835
+ var PORT = 5353;
28836
+ var key = (name) => name.replace(/\.$/, "").toLowerCase();
28837
+ function encodeName(name) {
28838
+ const parts = name.replace(/\.$/, "").split(".").map((label) => Buffer.from(label, "utf8"));
28839
+ if (parts.some((part) => part.length === 0 || part.length > 63)) throw new Error(`Invalid DNS name ${name}`);
28840
+ return Buffer.concat([...parts.flatMap((part) => [Buffer.from([part.length]), part]), Buffer.from([0])]);
28841
+ }
28842
+ function encodeQuery(questions) {
28843
+ const header2 = Buffer.alloc(12);
28844
+ header2.writeUInt16BE(questions.length, 4);
28845
+ return Buffer.concat([header2, ...questions.flatMap((q) => {
28846
+ const tail = Buffer.alloc(4);
28847
+ tail.writeUInt16BE(q.type, 0);
28848
+ tail.writeUInt16BE(1, 2);
28849
+ return [encodeName(q.name), tail];
28850
+ })]);
28851
+ }
28852
+ function readName(message3, offset) {
28853
+ const labels = [];
28854
+ let at = offset, end = -1, jumps = 0;
28855
+ for (; ; ) {
28856
+ if (at >= message3.length) throw new Error("DNS name runs past the message");
28857
+ const length = message3[at];
28858
+ if (length === 0) {
28859
+ at += 1;
28860
+ break;
28861
+ }
28862
+ if ((length & 192) === 192) {
28863
+ if (at + 1 >= message3.length || ++jumps > 32) throw new Error("Invalid DNS name pointer");
28864
+ if (end < 0) end = at + 2;
28865
+ at = (length & 63) << 8 | message3[at + 1];
28866
+ continue;
28867
+ }
28868
+ if (at + 1 + length > message3.length) throw new Error("DNS label runs past the message");
28869
+ labels.push(message3.toString("utf8", at + 1, at + 1 + length));
28870
+ at += 1 + length;
28871
+ }
28872
+ return [labels.join("."), end < 0 ? at : end];
28873
+ }
28874
+ function parseRecords(message3) {
28875
+ const records = [];
28876
+ try {
28877
+ if (message3.length < 12 || !(message3[2] & 128)) return records;
28878
+ const questions = message3.readUInt16BE(4), total = message3.readUInt16BE(6) + message3.readUInt16BE(8) + message3.readUInt16BE(10);
28879
+ let at = 12;
28880
+ for (let i = 0; i < questions; i++) at = readName(message3, at)[1] + 4;
28881
+ for (let i = 0; i < total; i++) {
28882
+ const [name, next] = readName(message3, at);
28883
+ const type = message3.readUInt16BE(next), length = message3.readUInt16BE(next + 8), start = next + 10;
28884
+ if (start + length > message3.length) break;
28885
+ records.push({ name, type, data: message3.subarray(start, start + length), message: message3, offset: start });
28886
+ at = start + length;
28887
+ }
28888
+ } catch {
28889
+ }
28890
+ return records;
28891
+ }
28892
+ function txtOf(data) {
28893
+ const txt = {};
28894
+ for (let at = 0; at < data.length; ) {
28895
+ const length = data[at];
28896
+ if (at + 1 + length > data.length) break;
28897
+ const pair = data.toString("utf8", at + 1, at + 1 + length);
28898
+ at += 1 + length;
28899
+ if (!pair) continue;
28900
+ const split = pair.indexOf("=");
28901
+ txt[(split < 0 ? pair : pair.slice(0, split)).toLowerCase()] = split < 0 ? "" : pair.slice(split + 1);
28902
+ }
28903
+ return txt;
28904
+ }
28905
+ function assemble(service, records) {
28906
+ const by = (type, name) => records.filter((r) => r.type === type && key(r.name) === key(name));
28907
+ const names = new Set(by(TYPE.PTR, service).map((r) => readName(r.message, r.offset)[0]));
28908
+ const found = [];
28909
+ for (const full of names) {
28910
+ const srv = by(TYPE.SRV, full)[0];
28911
+ if (!srv || srv.data.length < 7) continue;
28912
+ const port = srv.data.readUInt16BE(4), host = readName(srv.message, srv.offset + 6)[0];
28913
+ const txt = Object.assign({}, ...by(TYPE.TXT, full).map((r) => txtOf(r.data)));
28914
+ const a = by(TYPE.A, host).find((r) => r.data.length === 4);
28915
+ const name = full.slice(0, full.length - service.length - 1);
28916
+ found.push({ name, instance: txt.instance || name, host: host.replace(/\.$/, ""), ...a ? { address: [...a.data].join(".") } : {}, port, txt });
28917
+ }
28918
+ return found.sort((x, y) => x.name.localeCompare(y.name));
28919
+ }
28920
+ var udpTransport = (receive) => new Promise((resolve11, reject) => {
28921
+ const socket = createSocket({ type: "udp4", reuseAddr: true });
28922
+ socket.on("message", (message3) => receive(message3));
28923
+ socket.once("error", reject);
28924
+ socket.bind(0, () => {
28925
+ socket.setMulticastTTL(255);
28926
+ resolve11({ send: (query) => socket.send(query, PORT, GROUP), close: () => socket.close() });
28927
+ });
28928
+ });
28929
+ var wait = (ms) => new Promise((done) => setTimeout(done, ms));
28930
+ async function browse(service, windowMs = 2e3, followUpMs = 1e3, open9 = udpTransport) {
28931
+ const records = [];
28932
+ const transport = await open9((message3) => records.push(...parseRecords(message3)));
28933
+ try {
28934
+ transport.send(encodeQuery([{ name: service, type: TYPE.PTR }]));
28935
+ await wait(windowMs);
28936
+ const missing = [...new Set(records.filter((r) => r.type === TYPE.PTR && key(r.name) === key(service)).map((r) => readName(r.message, r.offset)[0]))].filter((full) => !assemble(service, records).some((found) => key(`${found.name}.${service}`) === key(full) && found.address));
28937
+ if (missing.length) {
28938
+ const hosts = records.filter((r) => r.type === TYPE.SRV).map((r) => readName(r.message, r.offset + 6)[0]);
28939
+ transport.send(encodeQuery([...missing.flatMap((name) => [{ name, type: TYPE.SRV }, { name, type: TYPE.TXT }]), ...hosts.map((name) => ({ name, type: TYPE.A }))]));
28940
+ await wait(followUpMs);
28941
+ }
28942
+ return assemble(service, records);
28943
+ } finally {
28944
+ transport.close();
28945
+ }
28946
+ }
28947
+
28831
28948
  // src/discovery.ts
28949
+ var SERVICE_TYPE = "_machine-service._tcp.local";
28950
+ function discoveryMode(value = process.env.MACHINE_SERVICE_DISCOVERY) {
28951
+ if (!value || value === "bonjour") return "bonjour";
28952
+ if (value === "consul") return "consul";
28953
+ throw new Error(`MACHINE_SERVICE_DISCOVERY must be one of bonjour, consul; got ${JSON.stringify(value)}`);
28954
+ }
28832
28955
  var TIMEOUT_MS = 5e3;
28833
28956
  function consulAddress(value = process.env.CONSUL_HTTP_ADDR) {
28834
28957
  const address = value?.trim() || "http://127.0.0.1:8500";
@@ -28850,31 +28973,58 @@ function parseRegistrations(answer) {
28850
28973
  return [{ node: text3(node2?.Node), origin: new URL(`http://${host.includes(":") ? `[${host}]` : host}:${port}`).origin, ...text3(meta2.instance) ? { instance: text3(meta2.instance) } : {}, loopbackOnly: meta2.loopback_only === "true" }];
28851
28974
  });
28852
28975
  }
28853
- async function findDurableOwner(machine, options) {
28976
+ async function candidates(options, mode) {
28977
+ if (mode === "bonjour") {
28978
+ try {
28979
+ const advertised = await (options.browse ?? (() => browse(SERVICE_TYPE)))();
28980
+ return { found: advertised.map((a) => ({ origin: new URL(`http://${a.address ?? a.host}:${a.port}`).origin, expected: a.instance })) };
28981
+ } catch (error2) {
28982
+ return { found: [], error: `the Bonjour browse failed (${error2 instanceof Error ? error2.message : String(error2)})` };
28983
+ }
28984
+ }
28854
28985
  const consul = options.consul ?? consulAddress();
28855
- const make = options.backend ?? ((origin) => new MachineService({ baseUrl: origin, listed: true }));
28856
- const candidates = [{ origin: new URL(options.local.baseUrl).origin, backend: options.local }];
28857
- let consulError;
28858
28986
  try {
28859
- for (const registration of parseRegistrations(await (options.fetchJson ?? fetchJson)(`${consul}/v1/health/service/machine-service`))) {
28860
- if (registration.loopbackOnly || candidates.some((candidate) => candidate.origin === registration.origin)) continue;
28861
- candidates.push({ origin: registration.origin, backend: make(registration.origin) });
28862
- }
28987
+ const rows = parseRegistrations(await (options.fetchJson ?? fetchJson)(`${consul}/v1/health/service/machine-service`));
28988
+ return { found: rows.filter((row) => !row.loopbackOnly).map((row) => ({ origin: row.origin, ...row.instance ? { expected: row.instance } : {} })) };
28863
28989
  } catch (error2) {
28864
- consulError = `the Consul agent at ${consul} did not answer (${error2 instanceof Error ? error2.message : String(error2)})`;
28990
+ return { found: [], error: `the Consul agent at ${consul} did not answer (${error2 instanceof Error ? error2.message : String(error2)})` };
28865
28991
  }
28992
+ }
28993
+ async function confirmed(backend, expected) {
28994
+ const health = await backend.health({ timeoutMs: TIMEOUT_MS });
28995
+ if (health.service !== void 0 && health.service !== "machine-service") return `it answers as ${String(health.service)}, not machine-service`;
28996
+ if (health.instance !== expected) return `it was found as ${expected}, but its /health answers ${String(health.instance ?? "no instance")}`;
28997
+ return void 0;
28998
+ }
28999
+ async function findDurableOwner(machine, options) {
29000
+ const mode = options.mode ?? discoveryMode();
29001
+ const make = options.backend ?? ((origin) => new MachineService({ baseUrl: origin, listed: true }));
29002
+ const localOrigin = new URL(options.local.baseUrl).origin;
29003
+ const { found, error: discoveryError } = await candidates(options, mode);
29004
+ const asked = [{ origin: localOrigin, backend: options.local }];
29005
+ for (const candidate of found) if (!asked.some((a) => a.origin === candidate.origin)) asked.push({ ...candidate, backend: make(candidate.origin) });
28866
29006
  const owners = [];
28867
- await Promise.all(candidates.map(async ({ origin, backend }) => {
29007
+ const refused = [];
29008
+ await Promise.all(asked.map(async ({ origin, backend, expected }) => {
28868
29009
  try {
28869
- const list = await backend.list({ timeoutMs: TIMEOUT_MS });
28870
- const record3 = list.machines[machine];
29010
+ if (expected) {
29011
+ const why = await confirmed(backend, expected);
29012
+ if (why) {
29013
+ refused.push(`${origin}: ${why}`);
29014
+ return;
29015
+ }
29016
+ }
29017
+ const record3 = (await backend.list({ timeoutMs: TIMEOUT_MS })).machines[machine];
28871
29018
  if (record3?.kind === "durable") owners.push({ backend, origin, instance: record3.instance ?? machine });
28872
29019
  } catch {
28873
29020
  }
28874
29021
  }));
28875
- if (owners.length === 1) return owners[0];
28876
- if (owners.length > 1) throw new Error(`Durable machine ${machine} is listed by more than one instance (${owners.map((owner) => owner.origin).join(", ")}); nothing was acquired`);
28877
- throw new Error(`No machine-service instance lists a durable machine named ${machine}${consulError ? `, and ${consulError}` : ""}; nothing was acquired. Check the name with \`machctl list\`, and point CONSUL_HTTP_ADDR at a reachable Consul agent.`);
29022
+ owners.sort((a, b) => Number(b.origin === localOrigin) - Number(a.origin === localOrigin));
29023
+ const distinct = owners.filter((owner, index) => owners.findIndex((other) => other.instance === owner.instance) === index);
29024
+ if (distinct.length === 1) return distinct[0];
29025
+ if (distinct.length > 1) throw new Error(`Durable machine ${machine} is listed by more than one instance (${distinct.map((owner) => owner.origin).join(", ")}); nothing was acquired`);
29026
+ const hint = mode === "bonjour" ? "Check the name with `machctl list`; the Mac's machine-service must be bound to all interfaces to advertise itself, or set MACHINE_SERVICE_DISCOVERY=consul to use a Consul agent." : "Check the name with `machctl list`, and point CONSUL_HTTP_ADDR at a reachable Consul agent.";
29027
+ throw new Error(`No machine-service instance lists a durable machine named ${machine}${discoveryError ? `, and ${discoveryError}` : ""}${refused.length ? `; unconfirmed: ${refused.join("; ")}` : ""}; nothing was acquired. ${hint}`);
28878
29028
  }
28879
29029
 
28880
29030
  // src/capture-gate.ts
@@ -28962,7 +29112,7 @@ var RelayManager = class {
28962
29112
  shuttingDown = false;
28963
29113
  /** The instance that owns a durable machine, found as machctl finds it (DC-29). */
28964
29114
  durableOwner(machine) {
28965
- return findDurableOwner(machine, { local: this.vm, ...this.options.consul ? { consul: this.options.consul } : {}, ...this.options.durableBackend ? { backend: this.options.durableBackend } : {}, ...this.options.consulFetch ? { fetchJson: this.options.consulFetch } : {} });
29115
+ return findDurableOwner(machine, { local: this.vm, ...this.options.discovery ? { mode: this.options.discovery } : {}, ...this.options.bonjourBrowse ? { browse: this.options.bonjourBrowse } : {}, ...this.options.consul ? { consul: this.options.consul } : {}, ...this.options.durableBackend ? { backend: this.options.durableBackend } : {}, ...this.options.consulFetch ? { fetchJson: this.options.consulFetch } : {} });
28966
29116
  }
28967
29117
  serialized(fn) {
28968
29118
  const next = this.queue.then(fn, fn);
@@ -29092,7 +29242,7 @@ var RelayManager = class {
29092
29242
  if (e.machine) return !!e.backend?.endpoint && !!e.backend.instance;
29093
29243
  if (e.backend) {
29094
29244
  const expected = this.binding();
29095
- return Object.keys(e.backend).length === Object.keys(expected).length && Object.entries(expected).every(([key, value]) => e.backend[key] === value);
29245
+ return Object.keys(e.backend).length === Object.keys(expected).length && Object.entries(expected).every(([key2, value]) => e.backend[key2] === value);
29096
29246
  }
29097
29247
  return !this.environment && new URL(this.vm.baseUrl).origin === "http://localhost:6240" && this.tartHome === canonicalPath(join13(process.env.HOME ?? homedir4(), ".tart"));
29098
29248
  }
@@ -30205,9 +30355,9 @@ VM state: ${JSON.stringify(this.status())}`, { cause: error2 });
30205
30355
  } catch (error2) {
30206
30356
  const transient2 = !bounded3.aborted && transientTransfer(error2);
30207
30357
  if (attempt >= 3 || !transient2) return { status: transient2 || bounded3.aborted ? "transfer-failed" : "integrity-failed", diagnostic: `Step evidence download failed: ${String(error2)}` };
30208
- const wait = retryDelaysMs[attempt - 1] ?? 0;
30358
+ const wait2 = retryDelaysMs[attempt - 1] ?? 0;
30209
30359
  await new Promise((done) => {
30210
- const timer = setTimeout(done, wait);
30360
+ const timer = setTimeout(done, wait2);
30211
30361
  bounded3.addEventListener("abort", () => {
30212
30362
  clearTimeout(timer);
30213
30363
  done();
@@ -30244,8 +30394,8 @@ VM state: ${JSON.stringify(this.status())}`, { cause: error2 });
30244
30394
  } catch {
30245
30395
  continue;
30246
30396
  }
30247
- const key = `${file.sha256}:${file.bytes}`;
30248
- copies.set(key, [...copies.get(key) ?? [], path]);
30397
+ const key2 = `${file.sha256}:${file.bytes}`;
30398
+ copies.set(key2, [...copies.get(key2) ?? [], path]);
30249
30399
  }
30250
30400
  }
30251
30401
  return copies;
@@ -30254,8 +30404,8 @@ VM state: ${JSON.stringify(this.status())}`, { cause: error2 });
30254
30404
  async localState(recording) {
30255
30405
  const held = await this.imageStore().heldOriginals(recording), steps = await this.stepCopies(recording, "state/");
30256
30406
  return { root: recording, candidates: (file) => {
30257
- const key = `${file.sha256}:${file.bytes}`, receipt = /^receiver\/receipts\/([^/]+\.json)$/.exec(file.path)?.[1];
30258
- return [join13(recording, "state", file.path), ...steps.get(key) ?? [], ...receipt ? [join13(recording, "host", "receiver-receipts", receipt)] : [], ...held.get(key) ?? []];
30407
+ const key2 = `${file.sha256}:${file.bytes}`, receipt = /^receiver\/receipts\/([^/]+\.json)$/.exec(file.path)?.[1];
30408
+ return [join13(recording, "state", file.path), ...steps.get(key2) ?? [], ...receipt ? [join13(recording, "host", "receiver-receipts", receipt)] : [], ...held.get(key2) ?? []];
30259
30409
  } };
30260
30410
  }
30261
30411
  /** AD-7: the step folders are a staging area; once their files are in the recording's state they go. */
@@ -30672,10 +30822,10 @@ var relayContract = typebox_exports.Union([
30672
30822
  ]);
30673
30823
  var projected = {};
30674
30824
  for (const branch of relayContract.anyOf) {
30675
- for (const [key, schema] of Object.entries(branch.properties)) {
30676
- if (key === "action") continue;
30677
- const previous = projected[key];
30678
- projected[key] = previous && JSON.stringify(previous) !== JSON.stringify(schema) ? typebox_exports.Optional(typebox_exports.Union([previous, schema])) : typebox_exports.Optional(schema);
30825
+ for (const [key2, schema] of Object.entries(branch.properties)) {
30826
+ if (key2 === "action") continue;
30827
+ const previous = projected[key2];
30828
+ projected[key2] = previous && JSON.stringify(previous) !== JSON.stringify(schema) ? typebox_exports.Optional(typebox_exports.Union([previous, schema])) : typebox_exports.Optional(schema);
30679
30829
  }
30680
30830
  }
30681
30831
  var parameterObject = typebox_exports.Object({
@@ -30691,7 +30841,7 @@ function branchFor(action) {
30691
30841
  function toolInputSchema(action) {
30692
30842
  const raw = JSON.parse(JSON.stringify(branchFor(action)));
30693
30843
  const { action: _action, ...properties } = raw.properties;
30694
- const required2 = (raw.required ?? []).filter((key) => key !== "action");
30844
+ const required2 = (raw.required ?? []).filter((key2) => key2 !== "action");
30695
30845
  return { type: raw.type, properties, ...required2.length ? { required: required2 } : {}, additionalProperties: raw.additionalProperties ?? false };
30696
30846
  }
30697
30847
  function validateRelayInput(value) {
@@ -30902,7 +31052,7 @@ async function relayCall(host, raw, options = {}) {
30902
31052
 
30903
31053
  // src/server.ts
30904
31054
  var SERVER_NAME = "relay";
30905
- var SERVER_VERSION = true ? "0.17.1" : JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8")).version;
31055
+ var SERVER_VERSION = true ? "0.18.0" : JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8")).version;
30906
31056
  var STATUS_TOOL = "relay_status";
30907
31057
  var PLUGIN_TOOL_PREFIX = "mcp__plugin_mcp-relay_relay__";
30908
31058
  var message2 = (error2) => error2 instanceof Error ? error2.message : String(error2);