@lobehub/cli 0.0.51 → 0.0.52

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/index.js CHANGED
@@ -3049,7 +3049,7 @@ var init_heteroCliArgs = __esmMin((() => {
3049
3049
  }));
3050
3050
 
3051
3051
  //#endregion
3052
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/util.js
3052
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/util.js
3053
3053
  function getEnumValues(entries) {
3054
3054
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
3055
3055
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -3543,7 +3543,7 @@ var init_util$3 = __esmMin((() => {
3543
3543
  }));
3544
3544
 
3545
3545
  //#endregion
3546
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/core.js
3546
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/core.js
3547
3547
  function newError(Definition) {
3548
3548
  const E = _E;
3549
3549
  if (E) {
@@ -3655,7 +3655,7 @@ var init_core$3 = __esmMin((() => {
3655
3655
  }));
3656
3656
 
3657
3657
  //#endregion
3658
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/errors.js
3658
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/errors.js
3659
3659
  function _getMessage() {
3660
3660
  const internals = this._zod;
3661
3661
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -3782,7 +3782,7 @@ var init_errors$2 = __esmMin((() => {
3782
3782
  }));
3783
3783
 
3784
3784
  //#endregion
3785
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/parse.js
3785
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/parse.js
3786
3786
  function finalizeParams(callee, params) {
3787
3787
  return {
3788
3788
  callee: params?.callee ?? callee,
@@ -3931,7 +3931,7 @@ var init_parse$1 = __esmMin((() => {
3931
3931
  }));
3932
3932
 
3933
3933
  //#endregion
3934
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/regexes.js
3934
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/regexes.js
3935
3935
  function nanoidOfLength(length) {
3936
3936
  return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);
3937
3937
  }
@@ -4001,7 +4001,7 @@ var init_regexes = __esmMin((() => {
4001
4001
  }));
4002
4002
 
4003
4003
  //#endregion
4004
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/checks.js
4004
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/checks.js
4005
4005
  var $ZodCheck, _whenHasLength, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckOverwrite;
4006
4006
  var init_checks$1 = __esmMin((() => {
4007
4007
  init_core$3();
@@ -4364,7 +4364,7 @@ var init_checks$1 = __esmMin((() => {
4364
4364
  }));
4365
4365
 
4366
4366
  //#endregion
4367
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/doc.js
4367
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/doc.js
4368
4368
  var Doc;
4369
4369
  var init_doc$1 = __esmMin((() => {
4370
4370
  Doc = class {
@@ -4399,18 +4399,18 @@ var init_doc$1 = __esmMin((() => {
4399
4399
  }));
4400
4400
 
4401
4401
  //#endregion
4402
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/versions.js
4402
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/versions.js
4403
4403
  var version$3;
4404
4404
  var init_versions = __esmMin((() => {
4405
4405
  version$3 = {
4406
4406
  major: 4,
4407
4407
  minor: 5,
4408
- patch: 2
4408
+ patch: 4
4409
4409
  };
4410
4410
  }));
4411
4411
 
4412
4412
  //#endregion
4413
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/schemas.js
4413
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/schemas.js
4414
4414
  function standardProps(inst) {
4415
4415
  return {
4416
4416
  validate: (value) => {
@@ -5869,7 +5869,7 @@ var init_schemas$1 = __esmMin((() => {
5869
5869
  }));
5870
5870
 
5871
5871
  //#endregion
5872
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/memoizer.js
5872
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
5873
5873
  function cloneIssues(issues) {
5874
5874
  return issues.map((iss) => iss.path ? {
5875
5875
  ...iss,
@@ -5887,12 +5887,79 @@ function isRecursive(inst, stack) {
5887
5887
  if (!result && child?._zod && isRecursive(child, stack)) result = true;
5888
5888
  };
5889
5889
  const def = inst._zod.def;
5890
- if (def.type === "lazy") check(inst._zod.innerType);
5891
- else {
5892
- const shape = def.shape;
5893
- if (shape) for (const key of Reflect.ownKeys(shape)) check(shape[key]);
5894
- for (const key in def) {
5895
- const value = def[key];
5890
+ switch (def.type) {
5891
+ case "object":
5892
+ for (const key of Reflect.ownKeys(def.shape)) check(def.shape[key]);
5893
+ check(def.catchall);
5894
+ break;
5895
+ case "array":
5896
+ check(def.element);
5897
+ break;
5898
+ case "tuple":
5899
+ for (const el of def.items) check(el);
5900
+ check(def.rest);
5901
+ break;
5902
+ case "record":
5903
+ case "map":
5904
+ check(def.keyType);
5905
+ check(def.valueType);
5906
+ break;
5907
+ case "set":
5908
+ check(def.valueType);
5909
+ break;
5910
+ case "union":
5911
+ for (const el of def.options) check(el);
5912
+ break;
5913
+ case "intersection":
5914
+ check(def.left);
5915
+ check(def.right);
5916
+ break;
5917
+ case "optional":
5918
+ case "nullable":
5919
+ case "default":
5920
+ case "prefault":
5921
+ case "catch":
5922
+ case "readonly":
5923
+ case "nonoptional":
5924
+ case "promise":
5925
+ case "success":
5926
+ check(def.innerType);
5927
+ break;
5928
+ case "pipe":
5929
+ check(def.in);
5930
+ check(def.out);
5931
+ break;
5932
+ case "function":
5933
+ check(def.input);
5934
+ check(def.output);
5935
+ break;
5936
+ case "lazy":
5937
+ check(inst._zod.innerType);
5938
+ break;
5939
+ case "template_literal":
5940
+ case "string":
5941
+ case "number":
5942
+ case "int":
5943
+ case "boolean":
5944
+ case "bigint":
5945
+ case "symbol":
5946
+ case "undefined":
5947
+ case "null":
5948
+ case "void":
5949
+ case "never":
5950
+ case "any":
5951
+ case "unknown":
5952
+ case "date":
5953
+ case "nan":
5954
+ case "enum":
5955
+ case "literal":
5956
+ case "file":
5957
+ case "transform":
5958
+ case "custom": break;
5959
+ default: for (const key in def) {
5960
+ const desc = Object.getOwnPropertyDescriptor(def, key);
5961
+ if (!desc || desc.get) continue;
5962
+ const value = desc.value;
5896
5963
  if (!value || typeof value !== "object") continue;
5897
5964
  if (value._zod) check(value);
5898
5965
  else if (Array.isArray(value)) for (const el of value) check(el);
@@ -6024,7 +6091,7 @@ var init_memoizer = __esmMin((() => {
6024
6091
  }));
6025
6092
 
6026
6093
  //#endregion
6027
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/locales/en.js
6094
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/en.js
6028
6095
  function en_default() {
6029
6096
  return { localeError: error() };
6030
6097
  }
@@ -6135,7 +6202,7 @@ var init_en$1 = __esmMin((() => {
6135
6202
  }));
6136
6203
 
6137
6204
  //#endregion
6138
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/registries.js
6205
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/registries.js
6139
6206
  function registry$1() {
6140
6207
  return new $ZodRegistry();
6141
6208
  }
@@ -6186,11 +6253,11 @@ var init_registries = __esmMin((() => {
6186
6253
  }));
6187
6254
 
6188
6255
  //#endregion
6189
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/compile.js
6256
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/compile.js
6190
6257
  var init_compile = __esmMin((() => {}));
6191
6258
 
6192
6259
  //#endregion
6193
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/api.js
6260
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/api.js
6194
6261
  /* @__NO_SIDE_EFFECTS__ */
6195
6262
  function _string(Class, params) {
6196
6263
  return new Class({
@@ -6737,7 +6804,7 @@ var init_api = __esmMin((() => {
6737
6804
  }));
6738
6805
 
6739
6806
  //#endregion
6740
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/to-json-schema.js
6807
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
6741
6808
  function assignProps(target, ...sources) {
6742
6809
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp$1(target, key, source[key]);
6743
6810
  return target;
@@ -6760,6 +6827,7 @@ function initializeContext(params) {
6760
6827
  cycles: params?.cycles ?? "ref",
6761
6828
  reused: params?.reused ?? "inline",
6762
6829
  intersections: [],
6830
+ deferred: [],
6763
6831
  external: params?.external ?? void 0
6764
6832
  };
6765
6833
  }
@@ -7059,6 +7127,7 @@ function finalize(ctx, schema) {
7059
7127
  if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {
7060
7128
  for (const entry of [...ctx.seen.entries()].reverse()) flattenRef(entry[0]);
7061
7129
  if (ctx.target !== "openapi-3.0") for (const entry of ctx.seen.entries()) compactTypeUnion(entry[1].def ?? entry[1].schema);
7130
+ for (const rewrite of ctx.deferred) rewrite();
7062
7131
  if (ctx.intersections.length) {
7063
7132
  const carriers = /* @__PURE__ */ new Map();
7064
7133
  for (const seen of ctx.seen.values()) for (const json of [seen.schema, seen.def]) {
@@ -7179,13 +7248,69 @@ var init_to_json_schema = __esmMin((() => {
7179
7248
  }));
7180
7249
 
7181
7250
  //#endregion
7182
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/json-schema-processors.js
7251
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema-processors.js
7183
7252
  function inputOptin(schema) {
7184
7253
  const def = schema._zod.def;
7185
7254
  if (def.type === "pipe" && def.in._zod.traits.has("$ZodTransform")) return inputOptin(def.out);
7186
7255
  if (def.type === "catch") return inputOptin(def.innerType);
7187
7256
  return schema._zod.optin;
7188
7257
  }
7258
+ /** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
7259
+ * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
7260
+ * behind a wrapper only carries its own `type` before then, and a union key only has its branches.
7261
+ *
7262
+ * A numeric bound cannot apply to a property name, so `minimum` and its siblings are dropped rather
7263
+ * than carried over: keeping them beside `type: "string"` reproduces the match-nothing schema this
7264
+ * exists to fix. A key that carries one therefore emits wider than the record parses — `z.record(z.number().min(5), V)`
7265
+ * accepts `"3"` — which is the deliberate trade, since throwing on it would reject an ordinary schema
7266
+ * outright. */
7267
+ function stringifyKeyNames(bySchema, json, visited) {
7268
+ if (json.$ref) {
7269
+ if (visited.has(json)) return json;
7270
+ visited.add(json);
7271
+ const def = bySchema.get(json)?.def;
7272
+ if (!def) return json;
7273
+ const inlined = stringifyKeyNames(bySchema, def, visited);
7274
+ return inlined === def ? json : inlined;
7275
+ }
7276
+ for (const keyword of ["anyOf", "oneOf"]) {
7277
+ const branches = json[keyword];
7278
+ if (!Array.isArray(branches)) continue;
7279
+ const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));
7280
+ if (mapped.some((branch, i) => branch !== branches[i])) json = {
7281
+ ...json,
7282
+ [keyword]: mapped
7283
+ };
7284
+ }
7285
+ const types = Array.isArray(json.type) ? json.type : [json.type];
7286
+ const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
7287
+ const values = json.enum ?? (json.const !== void 0 ? [json.const] : void 0);
7288
+ if (!numericType && !values?.some((v) => typeof v === "number")) return json;
7289
+ const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;
7290
+ if (rest.enum) rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
7291
+ else if (typeof rest.const === "number") rest.const = String(rest.const);
7292
+ if (!numericType) return rest;
7293
+ rest.type = "string";
7294
+ if (!values) rest.pattern = (types.includes("number") ? number$1 : integer).source;
7295
+ return rest;
7296
+ }
7297
+ function rewriteKeyNames(ctx) {
7298
+ const bySchema = /* @__PURE__ */ new Map();
7299
+ for (const entry of ctx.seen.values()) if (entry.def && !bySchema.has(entry.schema)) bySchema.set(entry.schema, entry);
7300
+ const rewrites = /* @__PURE__ */ new Map();
7301
+ for (const record of pendingRecords.get(ctx) ?? []) {
7302
+ const seen = ctx.seen.get(record);
7303
+ const names = (seen?.def ?? seen?.schema)?.propertyNames;
7304
+ if (!names || names === true || rewrites.has(names)) continue;
7305
+ const rewritten = stringifyKeyNames(bySchema, names, /* @__PURE__ */ new Set());
7306
+ if (rewritten !== names) rewrites.set(names, rewritten);
7307
+ }
7308
+ if (!rewrites.size) return;
7309
+ for (const entry of ctx.seen.values()) for (const carrier of [entry.schema, entry.def]) {
7310
+ const rewritten = carrier && rewrites.get(carrier.propertyNames);
7311
+ if (rewritten) carrier.propertyNames = rewritten;
7312
+ }
7313
+ }
7189
7314
  function serializeDefaultValue(value, schema, ctx, json, params) {
7190
7315
  let unrepresentable = false;
7191
7316
  const serialized = JSON.stringify(value, (_, val) => {
@@ -7231,8 +7356,9 @@ function toJSONSchema(input, params) {
7231
7356
  extractDefs(ctx, input);
7232
7357
  return finalize(ctx, input);
7233
7358
  }
7234
- var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, UNREPRESENTABLE_DEFAULT, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors;
7359
+ var formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, pendingRecords, recordProcessor, nullableProcessor, nonoptionalProcessor, UNREPRESENTABLE_DEFAULT, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors;
7235
7360
  var init_json_schema_processors = __esmMin((() => {
7361
+ init_regexes();
7236
7362
  init_to_json_schema();
7237
7363
  init_util$3();
7238
7364
  formatMap = {
@@ -7255,9 +7381,9 @@ var init_json_schema_processors = __esmMin((() => {
7255
7381
  }
7256
7382
  if (contentEncoding) json.contentEncoding = contentEncoding;
7257
7383
  if (patterns && patterns.size > 0) {
7258
- const regexes = [...patterns];
7259
- if (regexes.length === 1) json.pattern = regexes[0].source;
7260
- else if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({
7384
+ const patternList = [...patterns];
7385
+ if (patternList.length === 1) json.pattern = patternList[0].source;
7386
+ else if (patternList.length > 1) json.allOf = [...patternList.map((regex) => ({
7261
7387
  ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
7262
7388
  pattern: regex.source
7263
7389
  }))];
@@ -7529,6 +7655,7 @@ var init_json_schema_processors = __esmMin((() => {
7529
7655
  if (typeof minimum === "number") json.minItems = minimum;
7530
7656
  if (typeof maximum === "number") json.maxItems = maximum;
7531
7657
  };
7658
+ pendingRecords = /* @__PURE__ */ new WeakMap();
7532
7659
  recordProcessor = (schema, ctx, _json, params) => {
7533
7660
  const json = _json;
7534
7661
  const def = schema._zod.def;
@@ -7547,10 +7674,19 @@ var init_json_schema_processors = __esmMin((() => {
7547
7674
  json.patternProperties = {};
7548
7675
  for (const pattern of patterns) assignProp$1(json.patternProperties, pattern.source, valueSchema);
7549
7676
  } else {
7550
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process$2(def.keyType, ctx, {
7551
- ...params,
7552
- path: [...params.path, "propertyNames"]
7553
- });
7677
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
7678
+ json.propertyNames = process$2(def.keyType, ctx, {
7679
+ ...params,
7680
+ path: [...params.path, "propertyNames"]
7681
+ });
7682
+ let pending = pendingRecords.get(ctx);
7683
+ if (!pending) {
7684
+ pending = [];
7685
+ pendingRecords.set(ctx, pending);
7686
+ ctx.deferred.push(() => rewriteKeyNames(ctx));
7687
+ }
7688
+ pending.push(schema);
7689
+ }
7554
7690
  json.additionalProperties = process$2(def.valueType, ctx, {
7555
7691
  ...params,
7556
7692
  path: [...params.path, "additionalProperties"]
@@ -7560,7 +7696,7 @@ var init_json_schema_processors = __esmMin((() => {
7560
7696
  const omittableOnInput = ctx.io === "input" && inputOptin(def.valueType) !== void 0;
7561
7697
  if (keyValues && !def.partial && !omittableOnInput) {
7562
7698
  const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
7563
- if (validKeyValues.length > 0) json.required = validKeyValues;
7699
+ if (validKeyValues.length > 0) json.required = validKeyValues.map(String);
7564
7700
  }
7565
7701
  };
7566
7702
  nullableProcessor = (schema, ctx, json, params) => {
@@ -7687,7 +7823,7 @@ var init_json_schema_processors = __esmMin((() => {
7687
7823
  }));
7688
7824
 
7689
7825
  //#endregion
7690
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/core/index.js
7826
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/index.js
7691
7827
  var init_core$2 = __esmMin((() => {
7692
7828
  init_core$3();
7693
7829
  init_parse$1();
@@ -7709,13 +7845,13 @@ var init_core$2 = __esmMin((() => {
7709
7845
  }));
7710
7846
 
7711
7847
  //#endregion
7712
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/checks.js
7848
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/checks.js
7713
7849
  var init_checks = __esmMin((() => {
7714
7850
  init_core$2();
7715
7851
  }));
7716
7852
 
7717
7853
  //#endregion
7718
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/errors.js
7854
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/errors.js
7719
7855
  function _lazyMethod(proto, key, make) {
7720
7856
  Object.defineProperty(proto, key, {
7721
7857
  configurable: true,
@@ -7771,7 +7907,7 @@ var init_errors$1 = __esmMin((() => {
7771
7907
  }));
7772
7908
 
7773
7909
  //#endregion
7774
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/parse.js
7910
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/parse.js
7775
7911
  var parse$1, parseAsync, safeParse$1, safeParseAsync$1, encode$1, decode$1, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync;
7776
7912
  var init_parse = __esmMin((() => {
7777
7913
  init_core$2();
@@ -7791,7 +7927,7 @@ var init_parse = __esmMin((() => {
7791
7927
  }));
7792
7928
 
7793
7929
  //#endregion
7794
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/schemas.js
7930
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
7795
7931
  function _ensureDefaultLocale() {
7796
7932
  if (!globalConfig.localeError) config$1(en_default());
7797
7933
  }
@@ -8760,7 +8896,7 @@ var init_schemas = __esmMin((() => {
8760
8896
  }));
8761
8897
 
8762
8898
  //#endregion
8763
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/compat.js
8899
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/compat.js
8764
8900
  var ZodIssueCode$2, ZodFirstPartyTypeKind$2;
8765
8901
  var init_compat = __esmMin((() => {
8766
8902
  init_core$2();
@@ -8782,7 +8918,7 @@ var init_compat = __esmMin((() => {
8782
8918
  }));
8783
8919
 
8784
8920
  //#endregion
8785
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/iso.js
8921
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/iso.js
8786
8922
  function datetime(params) {
8787
8923
  return _isoDateTime(ZodISODateTime, params);
8788
8924
  }
@@ -8792,7 +8928,7 @@ var init_iso = __esmMin((() => {
8792
8928
  }));
8793
8929
 
8794
8930
  //#endregion
8795
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/coerce.js
8931
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/coerce.js
8796
8932
  function date(params) {
8797
8933
  return _coercedDate(ZodDate$2, params);
8798
8934
  }
@@ -8802,7 +8938,7 @@ var init_coerce = __esmMin((() => {
8802
8938
  }));
8803
8939
 
8804
8940
  //#endregion
8805
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/classic/external.js
8941
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/external.js
8806
8942
  var init_external$1 = __esmMin((() => {
8807
8943
  init_core$2();
8808
8944
  init_schemas();
@@ -8822,7 +8958,7 @@ var init_external$1 = __esmMin((() => {
8822
8958
  }));
8823
8959
 
8824
8960
  //#endregion
8825
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/index.js
8961
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/index.js
8826
8962
  var init_zod$1 = __esmMin((() => {
8827
8963
  init_external$1();
8828
8964
  init_external$1();
@@ -17653,6 +17789,10 @@ var init_document = __esmMin((() => {
17653
17789
  //#region ../../packages/types/src/documentComment.ts
17654
17790
  var init_documentComment = __esmMin((() => {}));
17655
17791
 
17792
+ //#endregion
17793
+ //#region ../../packages/types/src/documentLike.ts
17794
+ var init_documentLike = __esmMin((() => {}));
17795
+
17656
17796
  //#endregion
17657
17797
  //#region ../../packages/types/src/eval/agentEval.ts
17658
17798
  var init_agentEval = __esmMin((() => {}));
@@ -19203,6 +19343,7 @@ var init_src$1 = __esmMin((() => {
19203
19343
  init_discover();
19204
19344
  init_document();
19205
19345
  init_documentComment();
19346
+ init_documentLike();
19206
19347
  init_entityId();
19207
19348
  init_eval();
19208
19349
  init_expertise();
@@ -22030,6 +22171,10 @@ const SYSTEM_FILES_BLACKLIST = [
22030
22171
  ".fseventsd",
22031
22172
  ".Trashes"
22032
22173
  ];
22174
+ const MAX_UPLOAD_FILE_SIZE = 2 * 1024 * 1024 * 1024 - 1;
22175
+ const UPLOAD_FILE_SIZE_LIMIT_ERROR_MESSAGE = `Files larger than ${MAX_UPLOAD_FILE_SIZE} bytes cannot be uploaded`;
22176
+ const MAX_FILE_PARSE_SIZE = 64 * 1024 * 1024;
22177
+ const FILE_PARSE_SIZE_LIMIT_ERROR_MESSAGE = `Files larger than ${MAX_FILE_PARSE_SIZE} bytes cannot be parsed in memory`;
22033
22178
  const WORKSPACE_FILE_TREE_EXCLUDED_NAMES = [
22034
22179
  ...SYSTEM_FILES_BLACKLIST,
22035
22180
  ".git",
@@ -245964,12 +246109,16 @@ const listDroidAcpModels = async (options) => new DroidAcpSession({
245964
246109
  //#region ../../packages/heterogeneous-agents/src/spawn/resolveCliCommand.ts
245965
246110
  var resolveCliCommand_exports = /* @__PURE__ */ __exportAll({
245966
246111
  DEFAULT_HETERO_COMMAND: () => DEFAULT_HETERO_COMMAND,
246112
+ LOGIN_SHELL_TIMEOUT_STATUS_ERROR: () => LOGIN_SHELL_TIMEOUT_STATUS_ERROR,
246113
+ LoginShellPathTimeoutError: () => LoginShellPathTimeoutError,
245967
246114
  detectHeterogeneousCliCommand: () => detectHeterogeneousCliCommand,
245968
246115
  detectValidatedCommand: () => detectValidatedCommand,
245969
246116
  detectValidatedCommandCandidates: () => detectValidatedCommandCandidates,
246117
+ invalidateLoginShellPathCache: () => invalidateLoginShellPathCache,
246118
+ isLoginShellTimeoutStatus: () => isLoginShellTimeoutStatus,
245970
246119
  resolveHeteroSpawnCommand: () => resolveHeteroSpawnCommand
245971
246120
  });
245972
- var execFilePromise$1, VERSION_PATTERN, extractVersion, isWindows, shellPathPromise, registryPathPromise, WINDOWS_SHELL_METAS, WINDOWS_RUNNABLE_EXTS, WINDOWS_SHIM_EXTS, WINDOWS_SHELL_MAX_COMMAND_LINE_LENGTH, isWindowsRunnablePath, isWindowsShimPath, pickWindowsRunnables, isPathLikeCommand, getLoginShellPath, getCurrentLoginShellPath, WINDOWS_REGISTRY_PATH_KEYS, WINDOWS_REGISTRY_PATH_VALUE, expandWindowsEnvRefs$1, readWindowsRegistryPathValue, readMergedWindowsRegistryPath, getWindowsRegistryPath, mergePathValues, recoverProbeEnvironment, getCommandPathLines, resolveCommandCandidates, quoteWindowsShellToken, buildWindowsShellProbe, UNRESOLVED_SHIM, execProbe, detectValidatedCommandInEnvironment, isProbeableCommand, detectValidatedCommandCandidates, detectValidatedCommand, HETEROGENEOUS_CLI_AGENT_OPTIONS, DEFAULT_HETERO_COMMAND, getWellKnownCommandPaths, detectHeterogeneousCliCommand, resolveHeteroSpawnCommand;
246121
+ var execFilePromise$1, VERSION_PATTERN, extractVersion, isWindows, shellPathPromise, registryPathPromise, WINDOWS_SHELL_METAS, WINDOWS_RUNNABLE_EXTS, WINDOWS_SHIM_EXTS, WINDOWS_SHELL_MAX_COMMAND_LINE_LENGTH, isWindowsRunnablePath, isWindowsShimPath, pickWindowsRunnables, isPathLikeCommand, LOGIN_SHELL_PATH_TIMEOUT_MS, LOGIN_SHELL_TIMEOUT_STATUS_ERROR, isLoginShellTimeoutStatus, LoginShellPathTimeoutError, getLoginShellPath, cachedShellPath, shellPathGeneration, getCurrentLoginShellPath, invalidateLoginShellPathCache, WINDOWS_REGISTRY_PATH_KEYS, WINDOWS_REGISTRY_PATH_VALUE, expandWindowsEnvRefs$1, readWindowsRegistryPathValue, readMergedWindowsRegistryPath, getWindowsRegistryPath, mergePathValues, recoverProbeEnvironment, getCommandPathLines, resolveCommandCandidates, quoteWindowsShellToken, buildWindowsShellProbe, UNRESOLVED_SHIM, execProbe, detectValidatedCommandInEnvironment, isProbeableCommand, detectValidatedCommandCandidates, detectValidatedCommand, HETEROGENEOUS_CLI_AGENT_OPTIONS, DEFAULT_HETERO_COMMAND, getWellKnownCommandPaths, detectHeterogeneousCliCommand, resolveHeteroSpawnCommand;
245973
246122
  var init_resolveCliCommand = __esmMin((() => {
245974
246123
  init_config();
245975
246124
  init_cliSpawn();
@@ -245997,26 +246146,50 @@ var init_resolveCliCommand = __esmMin((() => {
245997
246146
  };
245998
246147
  pickWindowsRunnables = (lines) => lines.filter(isWindowsRunnablePath);
245999
246148
  isPathLikeCommand = (command) => isWindows() ? path.win32.isAbsolute(command) || /[\\/]/.test(command) : path.isAbsolute(command) || command.includes(path.sep);
246149
+ LOGIN_SHELL_PATH_TIMEOUT_MS = 1e4;
246150
+ LOGIN_SHELL_TIMEOUT_STATUS_ERROR = "Timed out reading PATH from the login shell while looking for the CLI";
246151
+ isLoginShellTimeoutStatus = (status) => status?.error === LOGIN_SHELL_TIMEOUT_STATUS_ERROR;
246152
+ LoginShellPathTimeoutError = class extends Error {
246153
+ constructor() {
246154
+ super("Timed out reading PATH from the login shell");
246155
+ this.name = "LoginShellPathTimeoutError";
246156
+ }
246157
+ };
246000
246158
  getLoginShellPath = async () => {
246001
246159
  if (isWindows()) return void 0;
246002
246160
  const shell = process.env.SHELL;
246003
246161
  if (!shell || !path.isAbsolute(shell)) return void 0;
246004
246162
  try {
246005
246163
  const { stdout } = await execFilePromise$1(shell, ["-ilc", "printf \"%s\" \"$PATH\""], {
246006
- timeout: 3e3,
246164
+ timeout: LOGIN_SHELL_PATH_TIMEOUT_MS,
246007
246165
  windowsHide: true
246008
246166
  });
246009
246167
  return stdout.split(/\r?\n/).map((line) => line.trim()).reverse().find((line) => line.includes(path.delimiter));
246010
- } catch {
246168
+ } catch (error) {
246169
+ if (error?.killed) throw new LoginShellPathTimeoutError();
246011
246170
  return;
246012
246171
  }
246013
246172
  };
246173
+ ;
246174
+ shellPathGeneration = 0;
246014
246175
  getCurrentLoginShellPath = async () => {
246015
- shellPathPromise ??= getLoginShellPath().finally(() => {
246016
- shellPathPromise = void 0;
246017
- });
246176
+ if (cachedShellPath) return cachedShellPath.value;
246177
+ if (!shellPathPromise) {
246178
+ const generation = shellPathGeneration;
246179
+ shellPathPromise = getLoginShellPath().then((value) => {
246180
+ if (generation === shellPathGeneration) cachedShellPath = { value };
246181
+ return value;
246182
+ }).finally(() => {
246183
+ if (generation === shellPathGeneration) shellPathPromise = void 0;
246184
+ });
246185
+ }
246018
246186
  return shellPathPromise;
246019
246187
  };
246188
+ invalidateLoginShellPathCache = () => {
246189
+ cachedShellPath = void 0;
246190
+ shellPathGeneration += 1;
246191
+ shellPathPromise = void 0;
246192
+ };
246020
246193
  WINDOWS_REGISTRY_PATH_KEYS = [String.raw`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment`, String.raw`HKCU\Environment`];
246021
246194
  WINDOWS_REGISTRY_PATH_VALUE = /^[^\S\n]*Path[^\S\n]+REG_(?:EXPAND_)?SZ[^\S\n]+(\S.*)$/im;
246022
246195
  expandWindowsEnvRefs$1 = (value) => value.replaceAll(/%([^%]+)%/g, (reference, name) => {
@@ -246225,7 +246398,16 @@ var init_resolveCliCommand = __esmMin((() => {
246225
246398
  if (!isProbeableCommand(command)) continue;
246226
246399
  if (!recoveryAttempted) {
246227
246400
  recoveryAttempted = true;
246228
- recovered = await recoverProbeEnvironment(probeEnv);
246401
+ try {
246402
+ recovered = await recoverProbeEnvironment(probeEnv);
246403
+ } catch (error) {
246404
+ if (error instanceof LoginShellPathTimeoutError) return {
246405
+ ...lastStatus,
246406
+ available: false,
246407
+ error: LOGIN_SHELL_TIMEOUT_STATUS_ERROR
246408
+ };
246409
+ throw error;
246410
+ }
246229
246411
  }
246230
246412
  if (!recovered) continue;
246231
246413
  const recoveredStatus = await detectValidatedCommandInEnvironment(command, options, recovered.env);
@@ -498199,9 +498381,11 @@ var RemoteGoalTraceStore = class {
498199
498381
  const body = Buffer.from(await response.arrayBuffer());
498200
498382
  const decoded = isZstdFrame$1(body) ? await decompressZstd$1(body) : body;
498201
498383
  const trajectory = JSON.parse(decoded.toString("utf8"));
498202
- await fs$1.mkdir(this.cacheDir, { recursive: true });
498203
- await fs$1.writeFile(this.cachePath(goalId), JSON.stringify(trajectory, null, 2), "utf8");
498204
- console.error(`✓ Cached to: ${DEFAULT_DIR$2}/${REMOTE_DIR$1}/${goalId}.json`);
498384
+ if (trajectory.completionReason) {
498385
+ await fs$1.mkdir(this.cacheDir, { recursive: true });
498386
+ await fs$1.writeFile(this.cachePath(goalId), JSON.stringify(trajectory, null, 2), "utf8");
498387
+ console.error(`✓ Cached to: ${DEFAULT_DIR$2}/${REMOTE_DIR$1}/${goalId}.json`);
498388
+ }
498205
498389
  return trajectory;
498206
498390
  }
498207
498391
  };
@@ -498230,7 +498414,7 @@ async function loadGoalTrajectory(target, options = {}) {
498230
498414
  if (local) return local;
498231
498415
  const remote = new RemoteGoalTraceStore(rootDir);
498232
498416
  const cached = await remote.getCached(target);
498233
- if (cached) return cached;
498417
+ if (cached?.completionReason) return cached;
498234
498418
  if (!allowDownload) return void 0;
498235
498419
  const signedUrl = await resolveDownloadUrl?.(target);
498236
498420
  return signedUrl ? remote.fetch(signedUrl, target) : void 0;
@@ -498304,12 +498488,15 @@ const renderGoalAdvanceDetail = (trajectory, seq) => {
498304
498488
  for (const tick of advance.ticks) {
498305
498489
  lines.push("", ` tick ${tick.index} ${tick.branch} → ${tick.outcome}`, ` ${tick.message}`, ` graph: ${tick.graphShape.nodesTotal} nodes, tasks ${tick.graphShape.tasksReady} ready / ${tick.graphShape.tasksBlocked} blocked / ${tick.graphShape.tasksCompleted} done, ${tick.graphShape.gatesPending} gate(s) pending`);
498306
498490
  if (tick.budget) {
498491
+ if (tick.concurrency !== void 0) lines.push(` concurrency: ${tick.concurrency}`);
498307
498492
  const limits = [tick.budget.maxRounds == null ? "rounds ∞" : `rounds ${tick.budget.runs}/${tick.budget.maxRounds}`, tick.budget.maxTotalCost == null ? "cost ∞" : `cost $${tick.budget.totalCost.toFixed(4)}/$${tick.budget.maxTotalCost}`].join(" ");
498308
498493
  lines.push(` budget: ${limits}`);
498309
498494
  }
498310
- if (tick.frontierTask) {
498311
- const error = tick.frontierTask.error ? ` — ${tick.frontierTask.error}` : "";
498312
- lines.push(` task: ${tick.frontierTask.identifier ?? tick.frontierTask.id} ${tick.frontierTask.status}${error}`);
498495
+ const candidateTasks = tick.candidateTasks ?? (tick.frontierTask ? [tick.frontierTask] : []);
498496
+ for (const task of candidateTasks) {
498497
+ const error = task.error ? ` — ${task.error}` : "";
498498
+ const mark = task.nodeId && task.nodeId === tick.chosenNodeId ? "▸" : " ";
498499
+ lines.push(` ${mark} task: ${task.identifier ?? task.id} ${task.status}${error}`);
498313
498500
  }
498314
498501
  if (tick.candidates.length > 0) {
498315
498502
  lines.push(" frontier:");
@@ -502680,6 +502867,7 @@ const rasterDimensions = (buffer) => {
502680
502867
  * @returns the created file record (`{ id, url, ... }`)
502681
502868
  */
502682
502869
  const uploadFileBuffer = async (client, { buffer, fileName, fileType }, options = {}) => {
502870
+ if (buffer.length > 2147483647) throw new Error(UPLOAD_FILE_SIZE_LIMIT_ERROR_MESSAGE);
502683
502871
  const hash = crypto$1.createHash("sha256").update(buffer).digest("hex");
502684
502872
  const ext = path.extname(fileName).toLowerCase().slice(1);
502685
502873
  const date = (/* @__PURE__ */ new Date()).toLocaleDateString("en-CA");
@@ -502689,7 +502877,10 @@ const uploadFileBuffer = async (client, { buffer, fileName, fileType }, options
502689
502877
  if (existing?.isExist && existing.url) pathname = existing.url;
502690
502878
  else {
502691
502879
  pathname = ext ? `files/${date}/${hash}.${ext}` : `files/${date}/${hash}`;
502692
- const presigned = await client.upload.createS3PreSignedUrl.mutate({ pathname });
502880
+ const presigned = await client.upload.createS3PreSignedUrl.mutate({
502881
+ pathname,
502882
+ size: buffer.length
502883
+ });
502693
502884
  const presignedUrl = typeof presigned === "string" ? presigned : presigned.url;
502694
502885
  const uploadRes = await fetch(presignedUrl, {
502695
502886
  body: buffer,
@@ -502725,7 +502916,9 @@ const uploadFileBuffer = async (client, { buffer, fileName, fileType }, options
502725
502916
  const uploadLocalFile = async (client, filePath, options = {}) => {
502726
502917
  const resolved = path.resolve(filePath);
502727
502918
  if (!fs.existsSync(resolved)) throw new Error(`File not found: ${resolved}`);
502728
- if (!fs.statSync(resolved).isFile()) throw new Error(`Not a file: ${resolved}`);
502919
+ const stat = fs.statSync(resolved);
502920
+ if (!stat.isFile()) throw new Error(`Not a file: ${resolved}`);
502921
+ if (stat.size > 2147483647) throw new Error(UPLOAD_FILE_SIZE_LIMIT_ERROR_MESSAGE);
502729
502922
  const fileName = path.basename(resolved);
502730
502923
  const fileBuffer = fs.readFileSync(resolved);
502731
502924
  return uploadFileBuffer(client, {
@@ -503457,24 +503650,28 @@ function printTick(result) {
503457
503650
  }
503458
503651
  function registerGoalCommand$1(program) {
503459
503652
  const goal = program.command("goal").description("Run long-horizon Goal Graphs");
503460
- goal.command("create <title>").description("Create a standalone goal and seed its graph").option("-r, --requirement <text>", "Acceptance requirement").option("-w, --work <title...>", "Initial work node titles").option("--agent <id>", "Responsible agent ID").option("--project <id>", "Project ID").option("--max-rounds <n>", "Maximum goal rounds").option("--max-cost <usd>", "Maximum total cost in USD").option("--max-attempts-per-work <n>", "Attempts per Work before opening a decision gate").option("--max-steps-per-run <n>", "Optional agent step cap per Work run (for example 500)").option("--operation-lease-timeout-ms <n>", "Reclaim a Work operation after this idle time (minimum: 60000)").option("--json [fields]", "Output JSON").action(async (title, options) => {
503653
+ goal.command("create <title>").description("Create a standalone goal and seed its graph").option("-r, --requirement <text>", "Acceptance requirement").option("-i, --instruction <text>", "The ask in the user's own words, shown on the problem node").option("-w, --work <title...>", "Initial work node titles (omit to let the planner decompose)").option("--agent <id>", "Responsible agent ID").option("--project <id>", "Project ID").option("--max-rounds <n>", "Maximum goal rounds").option("--max-cost <usd>", "Maximum total cost in USD").option("--max-attempts-per-work <n>", "Attempts per Work before opening a decision gate").option("--max-concurrent-tasks <n>", "How many of this goal's tasks may run at once (default 3)").option("--max-steps-per-run <n>", "Optional agent step cap per Work run (for example 500)").option("--operation-lease-timeout-ms <n>", "Reclaim a Work operation after this idle time (minimum: 60000)").option("--json [fields]", "Output JSON").action(async (title, options) => {
503461
503654
  const client = await getTrpcClient();
503462
503655
  const buildUrl = await resolveAppUrlBuilder(client);
503463
503656
  const result = await client.goal.create.mutate({
503464
503657
  agentId: options.agent,
503465
- config: options.maxAttemptsPerTask || options.maxStepsPerRun || options.operationLeaseTimeoutMs ? { recovery: {
503466
- maxAttemptsPerTask: options.maxAttemptsPerTask ? Number.parseInt(options.maxAttemptsPerTask, 10) : void 0,
503467
- maxStepsPerRun: options.maxStepsPerRun ? Number.parseInt(options.maxStepsPerRun, 10) : void 0,
503468
- operationLeaseTimeoutMs: options.operationLeaseTimeoutMs ? Number.parseInt(options.operationLeaseTimeoutMs, 10) : void 0
503469
- } } : void 0,
503658
+ config: options.maxAttemptsPerTask || options.maxStepsPerRun || options.operationLeaseTimeoutMs || options.maxConcurrentTasks ? {
503659
+ maxConcurrentTasks: options.maxConcurrentTasks ? Number.parseInt(options.maxConcurrentTasks, 10) : void 0,
503660
+ recovery: {
503661
+ maxAttemptsPerTask: options.maxAttemptsPerTask ? Number.parseInt(options.maxAttemptsPerTask, 10) : void 0,
503662
+ maxStepsPerRun: options.maxStepsPerRun ? Number.parseInt(options.maxStepsPerRun, 10) : void 0,
503663
+ operationLeaseTimeoutMs: options.operationLeaseTimeoutMs ? Number.parseInt(options.operationLeaseTimeoutMs, 10) : void 0
503664
+ }
503665
+ } : void 0,
503470
503666
  maxRounds: options.maxRounds ? Number.parseInt(options.maxRounds, 10) : void 0,
503471
503667
  maxTotalCost: options.maxCost ? Number.parseFloat(options.maxCost) : void 0,
503668
+ problemDescription: options.instruction,
503472
503669
  projectId: options.project,
503473
503670
  requirement: options.requirement,
503474
503671
  title,
503475
503672
  work: options.work
503476
503673
  });
503477
- const url = buildUrl(`/goal/${encodeURIComponent(result.data.id)}`);
503674
+ const url = buildUrl(`/goal/${encodeURIComponent(result.data.goal.id)}`);
503478
503675
  if (options.json !== void 0) return outputJson({
503479
503676
  ...result.data,
503480
503677
  url
@@ -503847,7 +504044,7 @@ var AskUserBridge = class {
503847
504044
  };
503848
504045
 
503849
504046
  //#endregion
503850
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/helpers/util.js
504047
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/util.js
503851
504048
  var util;
503852
504049
  (function(util) {
503853
504050
  util.assertEqual = (_) => {};
@@ -503944,7 +504141,7 @@ const getParsedType = (data) => {
503944
504141
  };
503945
504142
 
503946
504143
  //#endregion
503947
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/ZodError.js
504144
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/ZodError.js
503948
504145
  const ZodIssueCode = util.arrayToEnum([
503949
504146
  "invalid_type",
503950
504147
  "invalid_literal",
@@ -504053,7 +504250,7 @@ ZodError.create = (issues) => {
504053
504250
  };
504054
504251
 
504055
504252
  //#endregion
504056
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/locales/en.js
504253
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/locales/en.js
504057
504254
  const errorMap = (issue, _ctx) => {
504058
504255
  let message;
504059
504256
  switch (issue.code) {
@@ -504131,14 +504328,14 @@ const errorMap = (issue, _ctx) => {
504131
504328
  };
504132
504329
 
504133
504330
  //#endregion
504134
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/errors.js
504331
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/errors.js
504135
504332
  let overrideErrorMap = errorMap;
504136
504333
  function getErrorMap() {
504137
504334
  return overrideErrorMap;
504138
504335
  }
504139
504336
 
504140
504337
  //#endregion
504141
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/helpers/parseUtil.js
504338
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/parseUtil.js
504142
504339
  const makeIssue = (params) => {
504143
504340
  const { data, path, errorMaps, issueData } = params;
504144
504341
  const fullPath = [...path, ...issueData.path || []];
@@ -504243,7 +504440,7 @@ const isValid = (x) => x.status === "valid";
504243
504440
  const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
504244
504441
 
504245
504442
  //#endregion
504246
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/helpers/errorUtil.js
504443
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/errorUtil.js
504247
504444
  var errorUtil;
504248
504445
  (function(errorUtil) {
504249
504446
  errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
@@ -504251,7 +504448,7 @@ var errorUtil;
504251
504448
  })(errorUtil || (errorUtil = {}));
504252
504449
 
504253
504450
  //#endregion
504254
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v3/types.js
504451
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/types.js
504255
504452
  var ParseInputLazyPath = class {
504256
504453
  constructor(parent, value, path, key) {
504257
504454
  this._cachedPath = [];
@@ -507406,7 +507603,7 @@ const preprocessType = ZodEffects.createWithPreprocess;
507406
507603
  const pipelineType = ZodPipeline.create;
507407
507604
 
507408
507605
  //#endregion
507409
- //#region node_modules/.pnpm/zod@4.5.2/node_modules/zod/v4/mini/schemas.js
507606
+ //#region node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/mini/schemas.js
507410
507607
  init_core$2();
507411
507608
  init_util$3();
507412
507609
  const ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
@@ -507473,7 +507670,7 @@ function object(shape, params) {
507473
507670
  }
507474
507671
 
507475
507672
  //#endregion
507476
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
507673
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
507477
507674
  function isZ4Schema(s) {
507478
507675
  return !!s._zod;
507479
507676
  }
@@ -507597,7 +507794,7 @@ function getLiteralValue(schema) {
507597
507794
  }
507598
507795
 
507599
507796
  //#endregion
507600
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
507797
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
507601
507798
  const LATEST_PROTOCOL_VERSION = "2025-11-25";
507602
507799
  const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
507603
507800
  const SUPPORTED_PROTOCOL_VERSIONS = [
@@ -509563,7 +509760,7 @@ var UrlElicitationRequiredError = class extends McpError {
509563
509760
  };
509564
509761
 
509565
509762
  //#endregion
509566
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
509763
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
509567
509764
  /**
509568
509765
  * Experimental task interfaces for MCP SDK.
509569
509766
  * WARNING: These APIs are experimental and may change without notice.
@@ -509581,7 +509778,7 @@ function isTerminal(status) {
509581
509778
  }
509582
509779
 
509583
509780
  //#endregion
509584
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/Options.js
509781
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/Options.js
509585
509782
  const ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
509586
509783
  const defaultOptions = {
509587
509784
  name: void 0,
@@ -509616,7 +509813,7 @@ const getDefaultOptions = (options) => typeof options === "string" ? {
509616
509813
  };
509617
509814
 
509618
509815
  //#endregion
509619
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/Refs.js
509816
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/Refs.js
509620
509817
  const getRefs = (options) => {
509621
509818
  const _options = getDefaultOptions(options);
509622
509819
  const currentPath = _options.name !== void 0 ? [
@@ -509642,7 +509839,7 @@ const getRefs = (options) => {
509642
509839
  };
509643
509840
 
509644
509841
  //#endregion
509645
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
509842
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
509646
509843
  function addErrorMessage(res, key, errorMessage, refs) {
509647
509844
  if (!refs?.errorMessages) return;
509648
509845
  if (errorMessage) res.errorMessage = {
@@ -509656,7 +509853,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
509656
509853
  }
509657
509854
 
509658
509855
  //#endregion
509659
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
509856
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
509660
509857
  const getRelativePath = (pathA, pathB) => {
509661
509858
  let i = 0;
509662
509859
  for (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;
@@ -509664,7 +509861,7 @@ const getRelativePath = (pathA, pathB) => {
509664
509861
  };
509665
509862
 
509666
509863
  //#endregion
509667
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
509864
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
509668
509865
  function parseAnyDef(refs) {
509669
509866
  if (refs.target !== "openAi") return {};
509670
509867
  const anyDefinitionPath = [
@@ -509677,7 +509874,7 @@ function parseAnyDef(refs) {
509677
509874
  }
509678
509875
 
509679
509876
  //#endregion
509680
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
509877
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
509681
509878
  function parseArrayDef(def, refs) {
509682
509879
  const res = { type: "array" };
509683
509880
  if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {
@@ -509694,7 +509891,7 @@ function parseArrayDef(def, refs) {
509694
509891
  }
509695
509892
 
509696
509893
  //#endregion
509697
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
509894
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
509698
509895
  function parseBigintDef(def, refs) {
509699
509896
  const res = {
509700
509897
  type: "integer",
@@ -509726,25 +509923,25 @@ function parseBigintDef(def, refs) {
509726
509923
  }
509727
509924
 
509728
509925
  //#endregion
509729
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
509926
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
509730
509927
  function parseBooleanDef() {
509731
509928
  return { type: "boolean" };
509732
509929
  }
509733
509930
 
509734
509931
  //#endregion
509735
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
509932
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
509736
509933
  function parseBrandedDef(_def, refs) {
509737
509934
  return parseDef(_def.type._def, refs);
509738
509935
  }
509739
509936
 
509740
509937
  //#endregion
509741
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
509938
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
509742
509939
  const parseCatchDef = (def, refs) => {
509743
509940
  return parseDef(def.innerType._def, refs);
509744
509941
  };
509745
509942
 
509746
509943
  //#endregion
509747
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
509944
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
509748
509945
  function parseDateDef(def, refs, overrideDateStrategy) {
509749
509946
  const strategy = overrideDateStrategy ?? refs.dateStrategy;
509750
509947
  if (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };
@@ -509779,7 +509976,7 @@ const integerDateParser = (def, refs) => {
509779
509976
  };
509780
509977
 
509781
509978
  //#endregion
509782
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
509979
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
509783
509980
  function parseDefaultDef(_def, refs) {
509784
509981
  return {
509785
509982
  ...parseDef(_def.innerType._def, refs),
@@ -509788,13 +509985,13 @@ function parseDefaultDef(_def, refs) {
509788
509985
  }
509789
509986
 
509790
509987
  //#endregion
509791
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
509988
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
509792
509989
  function parseEffectsDef(_def, refs) {
509793
509990
  return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
509794
509991
  }
509795
509992
 
509796
509993
  //#endregion
509797
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
509994
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
509798
509995
  function parseEnumDef(def) {
509799
509996
  return {
509800
509997
  type: "string",
@@ -509803,7 +510000,7 @@ function parseEnumDef(def) {
509803
510000
  }
509804
510001
 
509805
510002
  //#endregion
509806
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
510003
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
509807
510004
  const isJsonSchema7AllOfType = (type) => {
509808
510005
  if ("type" in type && type.type === "string") return false;
509809
510006
  return "allOf" in type;
@@ -509846,7 +510043,7 @@ function parseIntersectionDef(def, refs) {
509846
510043
  }
509847
510044
 
509848
510045
  //#endregion
509849
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
510046
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
509850
510047
  function parseLiteralDef(def, refs) {
509851
510048
  const parsedType = typeof def.value;
509852
510049
  if (parsedType !== "bigint" && parsedType !== "number" && parsedType !== "boolean" && parsedType !== "string") return { type: Array.isArray(def.value) ? "array" : "object" };
@@ -509861,7 +510058,7 @@ function parseLiteralDef(def, refs) {
509861
510058
  }
509862
510059
 
509863
510060
  //#endregion
509864
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
510061
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
509865
510062
  let emojiRegex = void 0;
509866
510063
  /**
509867
510064
  * Generated from the regular expressions found here as of 2024-05-22:
@@ -510133,7 +510330,7 @@ function stringifyRegExpWithFlags(regex, refs) {
510133
510330
  }
510134
510331
 
510135
510332
  //#endregion
510136
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
510333
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
510137
510334
  function parseRecordDef(def, refs) {
510138
510335
  if (refs.target === "openAi") console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
510139
510336
  if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {
@@ -510181,7 +510378,7 @@ function parseRecordDef(def, refs) {
510181
510378
  }
510182
510379
 
510183
510380
  //#endregion
510184
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
510381
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
510185
510382
  function parseMapDef(def, refs) {
510186
510383
  if (refs.mapStrategy === "record") return parseRecordDef(def, refs);
510187
510384
  return {
@@ -510213,7 +510410,7 @@ function parseMapDef(def, refs) {
510213
510410
  }
510214
510411
 
510215
510412
  //#endregion
510216
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
510413
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
510217
510414
  function parseNativeEnumDef(def) {
510218
510415
  const object = def.values;
510219
510416
  const actualValues = Object.keys(def.values).filter((key) => {
@@ -510227,7 +510424,7 @@ function parseNativeEnumDef(def) {
510227
510424
  }
510228
510425
 
510229
510426
  //#endregion
510230
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
510427
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
510231
510428
  function parseNeverDef(refs) {
510232
510429
  return refs.target === "openAi" ? void 0 : { not: parseAnyDef({
510233
510430
  ...refs,
@@ -510236,7 +510433,7 @@ function parseNeverDef(refs) {
510236
510433
  }
510237
510434
 
510238
510435
  //#endregion
510239
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
510436
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
510240
510437
  function parseNullDef(refs) {
510241
510438
  return refs.target === "openApi3" ? {
510242
510439
  enum: ["null"],
@@ -510245,7 +510442,7 @@ function parseNullDef(refs) {
510245
510442
  }
510246
510443
 
510247
510444
  //#endregion
510248
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
510445
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
510249
510446
  const primitiveMappings = {
510250
510447
  ZodString: "string",
510251
510448
  ZodNumber: "number",
@@ -510302,7 +510499,7 @@ const asAnyOf = (def, refs) => {
510302
510499
  };
510303
510500
 
510304
510501
  //#endregion
510305
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
510502
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
510306
510503
  function parseNullableDef(def, refs) {
510307
510504
  if ([
510308
510505
  "ZodString",
@@ -510343,7 +510540,7 @@ function parseNullableDef(def, refs) {
510343
510540
  }
510344
510541
 
510345
510542
  //#endregion
510346
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
510543
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
510347
510544
  function parseNumberDef(def, refs) {
510348
510545
  const res = { type: "number" };
510349
510546
  if (!def.checks) return res;
@@ -510376,7 +510573,7 @@ function parseNumberDef(def, refs) {
510376
510573
  }
510377
510574
 
510378
510575
  //#endregion
510379
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
510576
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
510380
510577
  function parseObjectDef(def, refs) {
510381
510578
  const forceOptionalIntoNullable = refs.target === "openAi";
510382
510579
  const result = {
@@ -510436,7 +510633,7 @@ function safeIsOptional(schema) {
510436
510633
  }
510437
510634
 
510438
510635
  //#endregion
510439
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
510636
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
510440
510637
  const parseOptionalDef = (def, refs) => {
510441
510638
  if (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);
510442
510639
  const innerSchema = parseDef(def.innerType._def, {
@@ -510451,7 +510648,7 @@ const parseOptionalDef = (def, refs) => {
510451
510648
  };
510452
510649
 
510453
510650
  //#endregion
510454
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
510651
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
510455
510652
  const parsePipelineDef = (def, refs) => {
510456
510653
  if (refs.pipeStrategy === "input") return parseDef(def.in._def, refs);
510457
510654
  else if (refs.pipeStrategy === "output") return parseDef(def.out._def, refs);
@@ -510474,13 +510671,13 @@ const parsePipelineDef = (def, refs) => {
510474
510671
  };
510475
510672
 
510476
510673
  //#endregion
510477
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
510674
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
510478
510675
  function parsePromiseDef(def, refs) {
510479
510676
  return parseDef(def.type._def, refs);
510480
510677
  }
510481
510678
 
510482
510679
  //#endregion
510483
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
510680
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
510484
510681
  function parseSetDef(def, refs) {
510485
510682
  const schema = {
510486
510683
  type: "array",
@@ -510496,7 +510693,7 @@ function parseSetDef(def, refs) {
510496
510693
  }
510497
510694
 
510498
510695
  //#endregion
510499
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
510696
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
510500
510697
  function parseTupleDef(def, refs) {
510501
510698
  if (def.rest) return {
510502
510699
  type: "array",
@@ -510530,25 +510727,25 @@ function parseTupleDef(def, refs) {
510530
510727
  }
510531
510728
 
510532
510729
  //#endregion
510533
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
510730
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
510534
510731
  function parseUndefinedDef(refs) {
510535
510732
  return { not: parseAnyDef(refs) };
510536
510733
  }
510537
510734
 
510538
510735
  //#endregion
510539
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
510736
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
510540
510737
  function parseUnknownDef(refs) {
510541
510738
  return parseAnyDef(refs);
510542
510739
  }
510543
510740
 
510544
510741
  //#endregion
510545
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
510742
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
510546
510743
  const parseReadonlyDef = (def, refs) => {
510547
510744
  return parseDef(def.innerType._def, refs);
510548
510745
  };
510549
510746
 
510550
510747
  //#endregion
510551
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/selectParser.js
510748
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/selectParser.js
510552
510749
  const selectParser = (def, typeName, refs) => {
510553
510750
  switch (typeName) {
510554
510751
  case ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);
@@ -510592,7 +510789,7 @@ const selectParser = (def, typeName, refs) => {
510592
510789
  };
510593
510790
 
510594
510791
  //#endregion
510595
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/parseDef.js
510792
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/parseDef.js
510596
510793
  function parseDef(def, refs, forceResolution = false) {
510597
510794
  const seenItem = refs.seen.get(def);
510598
510795
  if (refs.override) {
@@ -510642,7 +510839,7 @@ const addMeta = (def, refs, jsonSchema) => {
510642
510839
  };
510643
510840
 
510644
510841
  //#endregion
510645
- //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.2/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
510842
+ //#region node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.5.4/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
510646
510843
  const zodToJsonSchema = (schema, options) => {
510647
510844
  const refs = getRefs(options);
510648
510845
  let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({
@@ -510706,7 +510903,7 @@ const zodToJsonSchema = (schema, options) => {
510706
510903
  };
510707
510904
 
510708
510905
  //#endregion
510709
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
510906
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
510710
510907
  function mapMiniTarget(t) {
510711
510908
  if (!t) return "draft-7";
510712
510909
  if (t === "jsonSchema7" || t === "draft-7") return "draft-7";
@@ -510737,7 +510934,7 @@ function parseWithCompat(schema, data) {
510737
510934
  }
510738
510935
 
510739
510936
  //#endregion
510740
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
510937
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
510741
510938
  /**
510742
510939
  * The default request timeout, in miliseconds.
510743
510940
  */
@@ -511894,7 +512091,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
511894
512091
  }));
511895
512092
 
511896
512093
  //#endregion
511897
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
512094
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
511898
512095
  /**
511899
512096
  * AJV-based JSON Schema validator provider
511900
512097
  */
@@ -511973,7 +512170,7 @@ var AjvJsonSchemaValidator = class {
511973
512170
  };
511974
512171
 
511975
512172
  //#endregion
511976
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
512173
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
511977
512174
  /**
511978
512175
  * Experimental server task features for MCP SDK.
511979
512176
  * WARNING: These APIs are experimental and may change without notice.
@@ -512194,7 +512391,7 @@ var ExperimentalServerTasks = class {
512194
512391
  };
512195
512392
 
512196
512393
  //#endregion
512197
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
512394
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
512198
512395
  /**
512199
512396
  * Experimental task capability assertion helpers.
512200
512397
  * WARNING: These APIs are experimental and may change without notice.
@@ -512246,7 +512443,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
512246
512443
  }
512247
512444
 
512248
512445
  //#endregion
512249
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
512446
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
512250
512447
  /**
512251
512448
  * An MCP server on top of a pluggable transport.
512252
512449
  *
@@ -512581,7 +512778,7 @@ var Server = class extends Protocol {
512581
512778
  };
512582
512779
 
512583
512780
  //#endregion
512584
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
512781
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
512585
512782
  const COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
512586
512783
  /**
512587
512784
  * Checks if a schema is completable (has completion metadata).
@@ -512601,7 +512798,7 @@ var McpZodTypeKind;
512601
512798
  })(McpZodTypeKind || (McpZodTypeKind = {}));
512602
512799
 
512603
512800
  //#endregion
512604
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
512801
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
512605
512802
  /**
512606
512803
  * Tool name validation utilities according to SEP: Specify Format for Tool Names
512607
512804
  *
@@ -512673,7 +512870,7 @@ function validateAndWarnToolName(name) {
512673
512870
  }
512674
512871
 
512675
512872
  //#endregion
512676
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
512873
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
512677
512874
  /**
512678
512875
  * Experimental McpServer task features for MCP SDK.
512679
512876
  * WARNING: These APIs are experimental and may change without notice.
@@ -512705,7 +512902,7 @@ var ExperimentalMcpServerTasks = class {
512705
512902
  };
512706
512903
 
512707
512904
  //#endregion
512708
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
512905
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
512709
512906
  init_zod$1();
512710
512907
  /**
512711
512908
  * High-level MCP server that provides a simpler API for working with resources, tools, and prompts.
@@ -514603,7 +514800,7 @@ var require_content_type = /* @__PURE__ */ __commonJSMin(((exports) => {
514603
514800
  }));
514604
514801
 
514605
514802
  //#endregion
514606
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
514803
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
514607
514804
  var import_content_type = /* @__PURE__ */ __toESM$2(require_content_type(), 1);
514608
514805
  /**
514609
514806
  * Extracts the media type (the lowercased `type/subtype` pair, without
@@ -514650,7 +514847,7 @@ function isJsonContentType(header) {
514650
514847
  }
514651
514848
 
514652
514849
  //#endregion
514653
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
514850
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
514654
514851
  /** Default interval between SSE keep-alive comment frames. */
514655
514852
  const DEFAULT_SSE_KEEP_ALIVE_MS = 15e3;
514656
514853
  const MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
@@ -514663,7 +514860,7 @@ function armSseKeepAlive(intervalMs, onTick) {
514663
514860
  }
514664
514861
 
514665
514862
  //#endregion
514666
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
514863
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
514667
514864
  /**
514668
514865
  * Web Standards Streamable HTTP Server Transport
514669
514866
  *
@@ -515320,7 +515517,7 @@ var WebStandardStreamableHTTPServerTransport = class {
515320
515517
  };
515321
515518
 
515322
515519
  //#endregion
515323
- //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.2/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
515520
+ //#region node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@4.5.4/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
515324
515521
  /**
515325
515522
  * Node.js HTTP Streamable HTTP Server Transport
515326
515523
  *
@@ -516335,7 +516532,10 @@ const createFileStoreImageUploader = (resolvePort) => async ({ data, mediaType }
516335
516532
  if (existing?.isExist && existing.url) pathname = existing.url;
516336
516533
  else {
516337
516534
  pathname = `files/${date}/${hash}.${ext}`;
516338
- const presigned = await port.createS3PreSignedUrl({ pathname });
516535
+ const presigned = await port.createS3PreSignedUrl({
516536
+ pathname,
516537
+ size: buffer.length
516538
+ });
516339
516539
  const presignedUrl = typeof presigned === "string" ? presigned : presigned.url;
516340
516540
  const uploadRes = await fetch(presignedUrl, {
516341
516541
  body: buffer,
@@ -518786,31 +518986,23 @@ function buildCategoryInput(category, options) {
518786
518986
  //#region src/commands/message.ts
518787
518987
  function registerMessageCommand(program) {
518788
518988
  const message = program.command("message").description("Manage messages");
518789
- message.command("list").description("List messages").option("--topic-id <id>", "Filter by topic ID").option("--agent-id <id>", "Filter by agent ID").option("-L, --limit <n>", "Page size", "30").option("-P, --page <n>", "Page number", "1").option("--user", "Only show user messages").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (options) => {
518989
+ message.command("list").description("List messages").option("--topic-id <id>", "Filter by topic ID").option("--agent-id <id>", "Filter by agent ID").option("--role <role>", "Filter by role (user, assistant, tool, system)").option("--start <date>", "Only messages created at/after this date (ISO or YYYY-MM-DD)").option("--end <date>", "Only messages created at/before this date (ISO or YYYY-MM-DD)").option("-L, --limit <n>", "Page size", "50").option("-P, --page <n>", "Page number", "1").option("--user", "Shorthand for --role user").option("--json [fields]", "Output JSON, optionally specify fields (comma-separated)").action(async (options) => {
518790
518990
  const client = await getTrpcClient();
518791
- const hasFilter = options.topicId || options.agentId;
518792
518991
  const pageSize = options.limit ? Number.parseInt(options.limit, 10) : void 0;
518793
518992
  const current = options.page ? Math.max(Number.parseInt(options.page, 10) - 1, 0) : void 0;
518794
- let items;
518795
- if (hasFilter) {
518796
- const input = {};
518797
- if (options.topicId) input.topicId = options.topicId;
518798
- if (options.agentId) input.agentId = options.agentId;
518799
- if (pageSize) input.pageSize = pageSize;
518800
- if (current) input.current = current;
518801
- const result = await client.message.getMessages.query(input);
518802
- items = Array.isArray(result) ? result : result.items ?? [];
518803
- } else {
518804
- const input = {};
518805
- if (pageSize) input.pageSize = pageSize;
518806
- if (current) input.current = current;
518807
- const result = await client.message.listAll.query(input);
518808
- items = Array.isArray(result) ? result : [];
518809
- }
518810
- if (options.user) items = items.filter((m) => m.role === "user");
518993
+ const input = {};
518994
+ if (options.topicId) input.topicId = options.topicId;
518995
+ if (options.agentId) input.agentId = options.agentId;
518996
+ if (options.user) input.role = "user";
518997
+ if (options.role) input.role = options.role;
518998
+ if (options.start) input.startDate = options.start;
518999
+ if (options.end) input.endDate = options.end;
519000
+ if (pageSize) input.pageSize = pageSize;
519001
+ if (current) input.current = current;
519002
+ const result = await client.message.listAll.query(input);
519003
+ const items = Array.isArray(result) ? result : [];
518811
519004
  if (options.json !== void 0) {
518812
- const fields = typeof options.json === "string" ? options.json : void 0;
518813
- outputJson(items, fields);
519005
+ outputJson(items, typeof options.json === "string" ? options.json : void 0);
518814
519006
  return;
518815
519007
  }
518816
519008
  if (items.length === 0) {
@@ -518820,12 +519012,16 @@ function registerMessageCommand(program) {
518820
519012
  printTable(items.map((m) => [
518821
519013
  m.id || "",
518822
519014
  m.role || "",
519015
+ m.agentName || m.agentTitle || "",
518823
519016
  truncate$2(m.content || "", 60),
519017
+ m.threadId ? `${m.topicId || ""} › ${m.threadId}` : m.topicId || "",
518824
519018
  m.createdAt ? timeAgo(m.createdAt) : ""
518825
519019
  ]), [
518826
519020
  "ID",
518827
519021
  "ROLE",
519022
+ "AGENT",
518828
519023
  "CONTENT",
519024
+ "TOPIC/THREAD",
518829
519025
  "CREATED"
518830
519026
  ]);
518831
519027
  });
@@ -519039,7 +519235,7 @@ function registerMessageCommand(program) {
519039
519235
  }
519040
519236
 
519041
519237
  //#endregion
519042
- //#region node_modules/.pnpm/ignore@7.0.6/node_modules/ignore/index.js
519238
+ //#region node_modules/.pnpm/ignore@7.0.8/node_modules/ignore/index.js
519043
519239
  var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519044
519240
  function makeArray(subject) {
519045
519241
  return Array.isArray(subject) ? subject : [subject];
@@ -519048,13 +519244,15 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519048
519244
  const EMPTY = "";
519049
519245
  const SPACE = " ";
519050
519246
  const ESCAPE = "\\";
519051
- const REGEX_TEST_BLANK_LINE = /^\s+$/;
519247
+ const REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
519248
+ const REGEX_TEST_BLANK_LINE = /^ +$/;
519052
519249
  const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
519053
519250
  const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
519054
519251
  const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
519055
519252
  const REGEX_SPLITALL_CRLF = /\r?\n/g;
519056
- const REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/;
519057
- const REGEX_TEST_TRAILING_SLASH = /\/$/;
519253
+ const DOUBLE_SLASH = "//";
519254
+ const SLASH_CODE = 47;
519255
+ const DOT_CODE = 46;
519058
519256
  const SLASH = "/";
519059
519257
  let TMP_KEY_IGNORE = "node-ignore";
519060
519258
  /* istanbul ignore else */
@@ -519064,39 +519262,203 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519064
519262
  Object.defineProperty(object, key, { value });
519065
519263
  return value;
519066
519264
  };
519067
- const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
519068
519265
  const RETURN_FALSE = () => false;
519069
- const sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY);
519070
- const negateRange = (range) => range.startsWith("!") || range.startsWith("\\^") ? `^${range.slice(range[0] === "!" ? 1 : 2)}` : range;
519071
519266
  const cleanRangeBackSlash = (slashes) => {
519072
519267
  const { length } = slashes;
519073
519268
  return slashes.slice(0, length - length % 2);
519074
519269
  };
519270
+ const POSIX_CLASSES = {
519271
+ alnum: "0-9A-Za-z",
519272
+ alpha: "A-Za-z",
519273
+ blank: " \\t",
519274
+ cntrl: "\\x00-\\x1f\\x7f",
519275
+ digit: "0-9",
519276
+ graph: "!-.0-~",
519277
+ lower: "a-z",
519278
+ print: " -.0-~",
519279
+ punct: "!-.:-@\\[-`{-~",
519280
+ space: " \\t\\n\\r",
519281
+ upper: "A-Z",
519282
+ xdigit: "0-9A-Fa-f"
519283
+ };
519284
+ const CLASS_MEMBERS_TO_ESCAPE = "\\]^-[";
519285
+ const escapeMember = (char) => CLASS_MEMBERS_TO_ESCAPE.indexOf(char) < 0 ? char : ESCAPE + char;
519286
+ const NON_SLASH = "(?!\\/)";
519287
+ const classSource = (negated, body) => {
519288
+ if (negated) return `[^\\/${body}]`;
519289
+ const source = `[${body}]`;
519290
+ return new RegExp(source).test("/") ? NON_SLASH + source : source;
519291
+ };
519292
+ const scanBracket = (pattern, start) => {
519293
+ const { length } = pattern;
519294
+ let index = start + 1;
519295
+ let negated = EMPTY;
519296
+ const lead = pattern[index];
519297
+ if (lead === "!" || lead === "^") {
519298
+ negated = "^";
519299
+ index++;
519300
+ }
519301
+ let body = EMPTY;
519302
+ let prev = EMPTY;
519303
+ for (;;) {
519304
+ const char = pattern[index];
519305
+ if (char === UNDEFINED) return null;
519306
+ if (char === ESCAPE) {
519307
+ const escaped = pattern[index + 1];
519308
+ if (escaped === UNDEFINED) return null;
519309
+ body += escapeMember(escaped);
519310
+ prev = escaped;
519311
+ index++;
519312
+ } else if (char === "-" && prev && index + 1 < length && pattern[index + 1] !== "]") {
519313
+ index++;
519314
+ let to = pattern[index];
519315
+ if (to === ESCAPE) to = pattern[index += 1];
519316
+ if (prev <= to) body += `-${escapeMember(to)}`;
519317
+ prev = EMPTY;
519318
+ } else if (char === "[" && pattern[index + 1] === ":") {
519319
+ const nameStart = index + 2;
519320
+ let end = nameStart;
519321
+ while (end < length && pattern[end] !== "]") end++;
519322
+ if (end === length) return null;
519323
+ if (end > nameStart && pattern[end - 1] === ":") {
519324
+ const expanded = POSIX_CLASSES[pattern.slice(nameStart, end - 1)];
519325
+ if (expanded === UNDEFINED) return null;
519326
+ body += expanded;
519327
+ prev = EMPTY;
519328
+ index = end;
519329
+ } else {
519330
+ body += escapeMember("[");
519331
+ prev = "[";
519332
+ index = nameStart - 2;
519333
+ }
519334
+ } else {
519335
+ body += escapeMember(char);
519336
+ prev = char;
519337
+ }
519338
+ index++;
519339
+ if (pattern[index] === "]") return {
519340
+ end: index,
519341
+ source: classSource(negated, body)
519342
+ };
519343
+ }
519344
+ };
519345
+ const NEVER_MATCH = "[]";
519346
+ const PLACEHOLDER = "\0";
519347
+ const REGEX_RESTORE_PLACEHOLDER = new RegExp(`${PLACEHOLDER}(\\d+)${PLACEHOLDER}`, "g");
519348
+ const TRAILING_WILDCARD = "";
519349
+ const extractBrackets = (pattern) => {
519350
+ const sources = [];
519351
+ const hold = (source) => `${PLACEHOLDER}${sources.push(source) - 1}${PLACEHOLDER}`;
519352
+ const { length } = pattern;
519353
+ let out = EMPTY;
519354
+ let index = 0;
519355
+ while (index < length) {
519356
+ const char = pattern[index];
519357
+ if (char === ESCAPE) {
519358
+ const escaped = pattern[index + 1];
519359
+ if (escaped === "*" || escaped === "[" || escaped === SPACE || escaped === ESCAPE) out += pattern.slice(index, index + 2);
519360
+ else out += hold(REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : escaped);
519361
+ index += 2;
519362
+ } else if (char === PLACEHOLDER) {
519363
+ out += hold(`[${PLACEHOLDER}]`);
519364
+ index++;
519365
+ } else if (char === "[") {
519366
+ const scanned = scanBracket(pattern, index);
519367
+ if (scanned === null) {
519368
+ out += hold(NEVER_MATCH);
519369
+ index = length;
519370
+ } else {
519371
+ out += hold(scanned.source);
519372
+ index = scanned.end + 1;
519373
+ }
519374
+ } else {
519375
+ out += char;
519376
+ index++;
519377
+ }
519378
+ }
519379
+ return {
519380
+ source: out,
519381
+ sources
519382
+ };
519383
+ };
519384
+ const DIRECT = null;
519385
+ const REGEX_INNER_SLASH = /\/(?!$)/;
519075
519386
  const REPLACERS = [
519076
- [/^\uFEFF/, () => EMPTY],
519077
- [/((?:\\\\)*?)(\\?\s+)$/, (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)],
519078
- [/(\\+?)\s/g, (_, m1) => {
519387
+ [
519388
+ /^\uFEFF/,
519389
+ () => EMPTY,
519390
+ ""
519391
+ ],
519392
+ [/[\r\n]+$/, () => EMPTY],
519393
+ [/((?:\\\\)*?)(\\? +)$/, (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)],
519394
+ [/(\\+?) /g, (_, m1) => {
519079
519395
  const { length } = m1;
519080
519396
  return m1.slice(0, length - length % 2) + SPACE;
519081
519397
  }],
519082
519398
  [/[\\$.|*+(){^]/g, (match) => `\\${match}`],
519083
- [/(?!\\)\?/g, () => "[^/]"],
519084
- [/^\//, () => "^"],
519085
- [/\//g, () => "\\/"],
519086
- [/^\^*(?:\\\*\\\*\\\/)+/, () => "^(?:.*\\/)?"],
519087
- [/^(?=[^^])/, function startingReplacer() {
519088
- return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
519089
- }],
519090
- [/\\\/\\\*\\\*(?=\\\/|$)/g, (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"],
519091
- [/(^|[^\\]+)(\\\*)+(?=.+)/g, (_, p1, p2) => {
519092
- return p1 + p2.replace(/\\\*/g, "[^\\/]*");
519399
+ [
519400
+ /(?!\\)\?/g,
519401
+ () => "[^/]",
519402
+ "?"
519403
+ ],
519404
+ [
519405
+ /^\//,
519406
+ () => "^",
519407
+ SLASH
519408
+ ],
519409
+ [
519410
+ /\//g,
519411
+ () => "\\/",
519412
+ SLASH
519413
+ ],
519414
+ [
519415
+ /^\^*(?:\\\*\\\*\\\/)+/,
519416
+ () => "^(?:.*\\/)?",
519417
+ "*"
519418
+ ],
519419
+ [DIRECT, (source, pattern) => {
519420
+ if (!source || source[0] === "^") return source;
519421
+ return (!REGEX_INNER_SLASH.test(pattern) ? "(?:^|\\/)" : "^") + source;
519093
519422
  }],
519094
- [/\\\\\\(?=[$.|*+(){^])/g, () => ESCAPE],
519095
- [/\\\\/g, () => ESCAPE],
519096
- [/(\\)?\[([^\]/]*?)(\\*)($|\])/g, (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${negateRange(sanitizeRange(range))}${endEscape}]` : "[]" : "[]"],
519097
- [/(?:[^*])$/, (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`]
519423
+ [
519424
+ /\\\/\\\*\\\*(?=\\\/|$)/g,
519425
+ (_, index, str) => index + 6 < str.length ? str.slice(index + 6) === "\\/" ? "(?:\\/[^\\/]+)+" : "(?:\\/[^\\/]+)*" : "\\/.+",
519426
+ "*"
519427
+ ],
519428
+ [
519429
+ /(^|[^\\]+)(\\\*)+(?=.+)/g,
519430
+ (_, p1, p2) => {
519431
+ return p1 + p2.replace(/\\\*/g, "[^\\/]*");
519432
+ },
519433
+ "*"
519434
+ ],
519435
+ [
519436
+ /(^|[^\\])((?:\\\\)*)\\\*$/,
519437
+ (match, p1, p2) => p2.length / 2 % 2 === 0 ? p1 + p2 + TRAILING_WILDCARD : match,
519438
+ "*"
519439
+ ],
519440
+ [
519441
+ /\\\\\\(?=[$.|*+(){^])/g,
519442
+ () => ESCAPE,
519443
+ ESCAPE + ESCAPE
519444
+ ],
519445
+ [
519446
+ /\\\\/g,
519447
+ () => ESCAPE,
519448
+ ESCAPE + ESCAPE
519449
+ ],
519450
+ [
519451
+ /\\\[([^\]/]*?)(\\*)($|\])/g,
519452
+ (match, range, endEscape, close) => `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`,
519453
+ "["
519454
+ ],
519455
+ [DIRECT, (source) => {
519456
+ const last = source[source.length - 1];
519457
+ if (!last || last === TRAILING_WILDCARD) return source;
519458
+ return last === SLASH ? `${source}$` : `${source}(?=$|\\/$)`;
519459
+ }]
519098
519460
  ];
519099
- const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
519461
+ const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\uE000$/;
519100
519462
  const MODE_IGNORE = "regex";
519101
519463
  const MODE_CHECK_IGNORE = "checkRegex";
519102
519464
  const UNDERSCORE = "_";
@@ -519108,7 +519470,103 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519108
519470
  return `${p1 ? `${p1}[^/]*` : "[^/]*"}(?=$|\\/$)`;
519109
519471
  }
519110
519472
  };
519111
- const makeRegexPrefix = (pattern) => REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), pattern);
519473
+ const WILDCARD = "[^\\/]*";
519474
+ const pinWildcards = (source) => {
519475
+ if (source.indexOf(WILDCARD) < 0) return source;
519476
+ const tokens = [];
519477
+ const { length } = source;
519478
+ let index = 0;
519479
+ while (index < length) {
519480
+ const char = source[index];
519481
+ if (source.startsWith(WILDCARD, index)) {
519482
+ tokens.push({ wildcard: true });
519483
+ index += 6;
519484
+ } else if (char === "[") {
519485
+ let end = index + 1;
519486
+ if (source[end] === "^") end++;
519487
+ if (source[end] === "]") end++;
519488
+ while (end < length && source[end] !== "]") end += source[end] === ESCAPE ? 2 : 1;
519489
+ end++;
519490
+ tokens.push({ single: source.slice(index, end) });
519491
+ index = end;
519492
+ } else if (char === ESCAPE) {
519493
+ tokens.push({ single: source.slice(index, index + 2) });
519494
+ index += 2;
519495
+ } else if (char === "(") {
519496
+ let depth = 0;
519497
+ let end = index;
519498
+ do {
519499
+ if (source[end] === ESCAPE) end++;
519500
+ else if (source[end] === "(") depth++;
519501
+ else if (source[end] === ")") depth--;
519502
+ end++;
519503
+ } while (end < length && depth > 0);
519504
+ if ("*+?".indexOf(source[end]) >= 0) end++;
519505
+ tokens.push({ boundary: source.slice(index, end) });
519506
+ index = end;
519507
+ } else if (char === "^" || char === "$") {
519508
+ tokens.push({ boundary: char });
519509
+ index++;
519510
+ } else {
519511
+ tokens.push({ single: char });
519512
+ index++;
519513
+ }
519514
+ }
519515
+ let out = EMPTY;
519516
+ let run = [];
519517
+ const flush = () => {
519518
+ let lastWildcard;
519519
+ run.forEach((token, at) => {
519520
+ if (token.wildcard) lastWildcard = at;
519521
+ });
519522
+ run.forEach((token, at) => {
519523
+ if (!token.wildcard) {
519524
+ out += token.single;
519525
+ return;
519526
+ }
519527
+ out += at === lastWildcard ? WILDCARD : `(?:(?!${run[at + 1].single})[^\\/])*`;
519528
+ });
519529
+ run = [];
519530
+ };
519531
+ tokens.forEach((token) => {
519532
+ if (token.boundary === void 0) {
519533
+ run.push(token);
519534
+ return;
519535
+ }
519536
+ flush();
519537
+ out += token.boundary;
519538
+ });
519539
+ flush();
519540
+ return out;
519541
+ };
519542
+ const makeRegexPrefix = (pattern) => {
519543
+ const { source, sources } = extractBrackets(pattern);
519544
+ const replaced = REPLACERS.reduce((prev, [matcher, replacer, required]) => {
519545
+ if (matcher === DIRECT) return replacer(prev, pattern);
519546
+ if (required !== UNDEFINED && prev.indexOf(required) < 0) return prev;
519547
+ return matcher.test(prev) ? prev.replace(matcher, replacer.bind(pattern)) : prev;
519548
+ }, source);
519549
+ return sources.length ? replaced.replace(REGEX_RESTORE_PLACEHOLDER, (match, index) => sources[index]) : replaced;
519550
+ };
519551
+ const matchesBasename = (body) => {
519552
+ const index = body.indexOf(SLASH);
519553
+ return index < 0 || index === body.length - 1;
519554
+ };
519555
+ const basenameOf = (path) => {
519556
+ const end = path.length - 1;
519557
+ const index = path.lastIndexOf(SLASH, path[end] === SLASH ? end - 1 : end);
519558
+ return index < 0 ? path : path.slice(index + 1);
519559
+ };
519560
+ const parentOf = (path) => {
519561
+ if (path.charCodeAt(0) === SLASH_CODE || path.indexOf(DOUBLE_SLASH) >= 0) {
519562
+ const slices = path.split(SLASH).filter(Boolean);
519563
+ slices.pop();
519564
+ return slices.length ? slices.join(SLASH) + SLASH : EMPTY;
519565
+ }
519566
+ const end = path.length - 1;
519567
+ const cut = path.lastIndexOf(SLASH, path.charCodeAt(end) === SLASH_CODE ? end - 1 : end);
519568
+ return cut < 0 ? EMPTY : path.slice(0, cut + 1);
519569
+ };
519112
519570
  const isString = (subject) => typeof subject === "string";
519113
519571
  const checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
519114
519572
  const splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
@@ -519121,6 +519579,9 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519121
519579
  define(this, "ignoreCase", ignoreCase);
519122
519580
  define(this, "regexPrefix", prefix);
519123
519581
  }
519582
+ get _basenameOnly() {
519583
+ return define(this, "_basenameOnly", matchesBasename(this.body));
519584
+ }
519124
519585
  get regex() {
519125
519586
  const key = UNDERSCORE + MODE_IGNORE;
519126
519587
  if (this[key]) return this[key];
@@ -519132,7 +519593,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519132
519593
  return this._make(MODE_CHECK_IGNORE, key);
519133
519594
  }
519134
519595
  _make(mode, key) {
519135
- const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]);
519596
+ const str = pinWildcards(this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD, TRAILING_WILD_CARD_REPLACERS[mode]));
519136
519597
  const regex = this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
519137
519598
  return define(this, key, regex);
519138
519599
  }
@@ -519152,10 +519613,12 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519152
519613
  constructor(ignoreCase) {
519153
519614
  this._ignoreCase = ignoreCase;
519154
519615
  this._rules = [];
519616
+ this._basenameCount = 0;
519155
519617
  }
519156
519618
  _add(pattern) {
519157
519619
  if (pattern && pattern[KEY_IGNORE]) {
519158
519620
  this._rules = this._rules.concat(pattern._rules._rules);
519621
+ this._basenameCount += pattern._rules._basenameCount;
519159
519622
  this._added = true;
519160
519623
  return;
519161
519624
  }
@@ -519164,6 +519627,7 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519164
519627
  const rule = createRule(pattern, this._ignoreCase);
519165
519628
  this._added = true;
519166
519629
  this._rules.push(rule);
519630
+ if (matchesBasename(rule.body)) this._basenameCount++;
519167
519631
  }
519168
519632
  }
519169
519633
  add(pattern) {
@@ -519175,14 +519639,19 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519175
519639
  let ignored = false;
519176
519640
  let unignored = false;
519177
519641
  let matchedRule;
519178
- this._rules.forEach((rule) => {
519642
+ const rules = this._rules;
519643
+ const { length } = rules;
519644
+ const shortcut = this._basenameCount * 2 >= length;
519645
+ const basename = shortcut ? basenameOf(path) : path;
519646
+ for (let index = 0; index < length; index++) {
519647
+ const rule = rules[index];
519179
519648
  const { negative } = rule;
519180
- if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
519181
- if (!rule[mode].test(path)) return;
519182
- ignored = !negative;
519183
- unignored = negative;
519184
- matchedRule = negative ? UNDEFINED : rule;
519185
- });
519649
+ if (!(unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) && rule[mode].test(shortcut && rule._basenameOnly ? basename : path)) {
519650
+ ignored = !negative;
519651
+ unignored = negative;
519652
+ matchedRule = negative ? UNDEFINED : rule;
519653
+ }
519654
+ }
519186
519655
  const ret = {
519187
519656
  ignored,
519188
519657
  unignored
@@ -519200,7 +519669,16 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519200
519669
  if (checkPath.isNotRelative(path)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
519201
519670
  return true;
519202
519671
  };
519203
- const isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
519672
+ const isNotRelative = (path) => {
519673
+ const first = path.charCodeAt(0);
519674
+ if (first === SLASH_CODE) return true;
519675
+ if (first !== DOT_CODE) return false;
519676
+ if (path.length === 1) return true;
519677
+ const second = path.charCodeAt(1);
519678
+ if (second === SLASH_CODE) return true;
519679
+ if (second !== DOT_CODE) return false;
519680
+ return path.length === 2 || path.charCodeAt(2) === SLASH_CODE;
519681
+ };
519204
519682
  checkPath.isNotRelative = isNotRelative;
519205
519683
  /* istanbul ignore next */
519206
519684
  checkPath.convert = (p) => p;
@@ -519222,28 +519700,25 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
519222
519700
  addPattern(pattern) {
519223
519701
  return this.add(pattern);
519224
519702
  }
519225
- _test(originalPath, cache, checkUnignored, slices) {
519703
+ _test(originalPath, cache, checkUnignored) {
519226
519704
  const path = originalPath && checkPath.convert(originalPath);
519227
519705
  checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
519228
- return this._t(path, cache, checkUnignored, slices);
519706
+ return this._t(path, cache, checkUnignored);
519229
519707
  }
519230
519708
  checkIgnore(path) {
519231
- if (!REGEX_TEST_TRAILING_SLASH.test(path)) return this.test(path);
519232
- const slices = path.split(SLASH).filter(Boolean);
519233
- slices.pop();
519234
- if (slices.length) {
519235
- const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
519709
+ if (path.charCodeAt(path.length - 1) !== SLASH_CODE) return this.test(path);
519710
+ const parentPath = parentOf(path);
519711
+ if (parentPath) {
519712
+ const parent = this._t(parentPath, this._testCache, true);
519236
519713
  if (parent.ignored) return parent;
519237
519714
  }
519238
519715
  return this._rules.test(path, false, MODE_CHECK_IGNORE);
519239
519716
  }
519240
- _t(path, cache, checkUnignored, slices) {
519717
+ _t(path, cache, checkUnignored) {
519241
519718
  if (path in cache) return cache[path];
519242
- if (!slices) slices = path.split(SLASH).filter(Boolean);
519243
- slices.pop();
519244
- if (!slices.length) return cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE);
519245
- const parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices);
519246
- return cache[path] = parent.ignored ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
519719
+ const parentPath = parentOf(path);
519720
+ const parent = parentPath ? this._t(parentPath, cache, checkUnignored) : UNDEFINED;
519721
+ return cache[path] = parent && parent.ignored ? parent : this._rules.test(path, checkUnignored, MODE_IGNORE);
519247
519722
  }
519248
519723
  ignores(path) {
519249
519724
  return this._test(path, this._ignoreCache, false).ignored;