@yawlabs/ctxlint 0.10.2 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +991 -389
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -43,10 +43,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
43
43
  ));
44
44
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
45
45
 
46
+ // <define:__WEB_FIRST_SEGMENTS__>
47
+ var define_WEB_FIRST_SEGMENTS_default;
48
+ var init_define_WEB_FIRST_SEGMENTS = __esm({
49
+ "<define:__WEB_FIRST_SEGMENTS__>"() {
50
+ define_WEB_FIRST_SEGMENTS_default = ["blog", "docs", "api", "admin", "assets", "static", "public", "images", "img", "css", "js", "fonts", "auth", "login", "logout", "signup", "pricing", "about", "contact", "privacy", "terms"];
51
+ }
52
+ });
53
+
46
54
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.js
47
55
  var util, objectUtil, ZodParsedType, getParsedType;
48
56
  var init_util = __esm({
49
57
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.js"() {
58
+ init_define_WEB_FIRST_SEGMENTS();
50
59
  (function(util2) {
51
60
  util2.assertEqual = (_3) => {
52
61
  };
@@ -184,6 +193,7 @@ var init_util = __esm({
184
193
  var ZodIssueCode, ZodError;
185
194
  var init_ZodError = __esm({
186
195
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.js"() {
196
+ init_define_WEB_FIRST_SEGMENTS();
187
197
  init_util();
188
198
  ZodIssueCode = util.arrayToEnum([
189
199
  "invalid_type",
@@ -304,6 +314,7 @@ var init_ZodError = __esm({
304
314
  var errorMap, en_default;
305
315
  var init_en = __esm({
306
316
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/locales/en.js"() {
317
+ init_define_WEB_FIRST_SEGMENTS();
307
318
  init_ZodError();
308
319
  init_util();
309
320
  errorMap = (issue2, _ctx) => {
@@ -417,6 +428,7 @@ function getErrorMap() {
417
428
  var overrideErrorMap;
418
429
  var init_errors = __esm({
419
430
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/errors.js"() {
431
+ init_define_WEB_FIRST_SEGMENTS();
420
432
  init_en();
421
433
  overrideErrorMap = en_default;
422
434
  }
@@ -445,11 +457,12 @@ function addIssueToContext(ctx, issueData) {
445
457
  var makeIssue, ParseStatus, INVALID, DIRTY, OK, isAborted, isDirty, isValid, isAsync;
446
458
  var init_parseUtil = __esm({
447
459
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.js"() {
460
+ init_define_WEB_FIRST_SEGMENTS();
448
461
  init_errors();
449
462
  init_en();
450
463
  makeIssue = (params) => {
451
- const { data, path: path13, errorMaps, issueData } = params;
452
- const fullPath = [...path13, ...issueData.path || []];
464
+ const { data, path: path14, errorMaps, issueData } = params;
465
+ const fullPath = [...path14, ...issueData.path || []];
453
466
  const fullIssue = {
454
467
  ...issueData,
455
468
  path: fullPath
@@ -541,6 +554,7 @@ var init_parseUtil = __esm({
541
554
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.js
542
555
  var init_typeAliases = __esm({
543
556
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.js"() {
557
+ init_define_WEB_FIRST_SEGMENTS();
544
558
  }
545
559
  });
546
560
 
@@ -548,6 +562,7 @@ var init_typeAliases = __esm({
548
562
  var errorUtil;
549
563
  var init_errorUtil = __esm({
550
564
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.js"() {
565
+ init_define_WEB_FIRST_SEGMENTS();
551
566
  (function(errorUtil2) {
552
567
  errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
553
568
  errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
@@ -723,17 +738,18 @@ function createZodEnum(values, params) {
723
738
  var ParseInputLazyPath, handleResult, ZodType, cuidRegex, cuid2Regex, ulidRegex, uuidRegex, nanoidRegex, jwtRegex, durationRegex, emailRegex, _emojiRegex, emojiRegex, ipv4Regex, ipv4CidrRegex, ipv6Regex, ipv6CidrRegex, base64Regex, base64urlRegex, dateRegexSource, dateRegex, ZodString, ZodNumber, ZodBigInt, ZodBoolean, ZodDate, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodArray, ZodObject, ZodUnion, getDiscriminator, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType;
724
739
  var init_types = __esm({
725
740
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.js"() {
741
+ init_define_WEB_FIRST_SEGMENTS();
726
742
  init_ZodError();
727
743
  init_errors();
728
744
  init_errorUtil();
729
745
  init_parseUtil();
730
746
  init_util();
731
747
  ParseInputLazyPath = class {
732
- constructor(parent, value, path13, key) {
748
+ constructor(parent, value, path14, key) {
733
749
  this._cachedPath = [];
734
750
  this.parent = parent;
735
751
  this.data = value;
736
- this._path = path13;
752
+ this._path = path14;
737
753
  this._key = key;
738
754
  }
739
755
  get path() {
@@ -3969,6 +3985,7 @@ var init_types = __esm({
3969
3985
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/external.js
3970
3986
  var init_external = __esm({
3971
3987
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/external.js"() {
3988
+ init_define_WEB_FIRST_SEGMENTS();
3972
3989
  init_errors();
3973
3990
  init_parseUtil();
3974
3991
  init_typeAliases();
@@ -3981,6 +3998,7 @@ var init_external = __esm({
3981
3998
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/index.js
3982
3999
  var init_v3 = __esm({
3983
4000
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/index.js"() {
4001
+ init_define_WEB_FIRST_SEGMENTS();
3984
4002
  init_external();
3985
4003
  init_external();
3986
4004
  }
@@ -4047,6 +4065,7 @@ function config(newConfig) {
4047
4065
  var NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig;
4048
4066
  var init_core = __esm({
4049
4067
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js"() {
4068
+ init_define_WEB_FIRST_SEGMENTS();
4050
4069
  NEVER = Object.freeze({
4051
4070
  status: "aborted"
4052
4071
  });
@@ -4238,15 +4257,15 @@ function mergeDefs(...defs) {
4238
4257
  function cloneDef(schema) {
4239
4258
  return mergeDefs(schema._zod.def);
4240
4259
  }
4241
- function getElementAtPath(obj, path13) {
4242
- if (!path13)
4260
+ function getElementAtPath(obj, path14) {
4261
+ if (!path14)
4243
4262
  return obj;
4244
- return path13.reduce((acc, key) => acc?.[key], obj);
4263
+ return path14.reduce((acc, key) => acc?.[key], obj);
4245
4264
  }
4246
4265
  function promiseAllObject(promisesObj) {
4247
4266
  const keys = Object.keys(promisesObj);
4248
- const promises = keys.map((key) => promisesObj[key]);
4249
- return Promise.all(promises).then((results) => {
4267
+ const promises2 = keys.map((key) => promisesObj[key]);
4268
+ return Promise.all(promises2).then((results) => {
4250
4269
  const resolvedObj = {};
4251
4270
  for (let i2 = 0; i2 < keys.length; i2++) {
4252
4271
  resolvedObj[keys[i2]] = results[i2];
@@ -4553,11 +4572,11 @@ function aborted(x3, startIndex = 0) {
4553
4572
  }
4554
4573
  return false;
4555
4574
  }
4556
- function prefixIssues(path13, issues) {
4575
+ function prefixIssues(path14, issues) {
4557
4576
  return issues.map((iss) => {
4558
4577
  var _a3;
4559
4578
  (_a3 = iss).path ?? (_a3.path = []);
4560
- iss.path.unshift(path13);
4579
+ iss.path.unshift(path14);
4561
4580
  return iss;
4562
4581
  });
4563
4582
  }
@@ -4671,6 +4690,7 @@ function uint8ArrayToHex(bytes) {
4671
4690
  var EVALUATING, captureStackTrace, allowsEval, getParsedType2, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class;
4672
4691
  var init_util2 = __esm({
4673
4692
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js"() {
4693
+ init_define_WEB_FIRST_SEGMENTS();
4674
4694
  EVALUATING = /* @__PURE__ */ Symbol("evaluating");
4675
4695
  captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
4676
4696
  };
@@ -4799,7 +4819,7 @@ function formatError(error49, mapper = (issue2) => issue2.message) {
4799
4819
  }
4800
4820
  function treeifyError(error49, mapper = (issue2) => issue2.message) {
4801
4821
  const result = { errors: [] };
4802
- const processError = (error50, path13 = []) => {
4822
+ const processError = (error50, path14 = []) => {
4803
4823
  var _a3, _b;
4804
4824
  for (const issue2 of error50.issues) {
4805
4825
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -4809,7 +4829,7 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
4809
4829
  } else if (issue2.code === "invalid_element") {
4810
4830
  processError({ issues: issue2.issues }, issue2.path);
4811
4831
  } else {
4812
- const fullpath = [...path13, ...issue2.path];
4832
+ const fullpath = [...path14, ...issue2.path];
4813
4833
  if (fullpath.length === 0) {
4814
4834
  result.errors.push(mapper(issue2));
4815
4835
  continue;
@@ -4841,8 +4861,8 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
4841
4861
  }
4842
4862
  function toDotPath(_path) {
4843
4863
  const segs = [];
4844
- const path13 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
4845
- for (const seg of path13) {
4864
+ const path14 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
4865
+ for (const seg of path14) {
4846
4866
  if (typeof seg === "number")
4847
4867
  segs.push(`[${seg}]`);
4848
4868
  else if (typeof seg === "symbol")
@@ -4870,6 +4890,7 @@ function prettifyError(error49) {
4870
4890
  var initializer, $ZodError, $ZodRealError;
4871
4891
  var init_errors2 = __esm({
4872
4892
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js"() {
4893
+ init_define_WEB_FIRST_SEGMENTS();
4873
4894
  init_core();
4874
4895
  init_util2();
4875
4896
  initializer = (inst, def) => {
@@ -4897,6 +4918,7 @@ var init_errors2 = __esm({
4897
4918
  var _parse, parse, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, encode, _decode, decode, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync;
4898
4919
  var init_parse = __esm({
4899
4920
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js"() {
4921
+ init_define_WEB_FIRST_SEGMENTS();
4900
4922
  init_core();
4901
4923
  init_errors2();
4902
4924
  init_util2();
@@ -5081,6 +5103,7 @@ function fixedBase64url(length) {
5081
5103
  var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
5082
5104
  var init_regexes = __esm({
5083
5105
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js"() {
5106
+ init_define_WEB_FIRST_SEGMENTS();
5084
5107
  init_util2();
5085
5108
  cuid = /^[cC][^\s-]{8,}$/;
5086
5109
  cuid2 = /^[0-9a-z]+$/;
@@ -5161,6 +5184,7 @@ function handleCheckPropertyResult(result, payload, property) {
5161
5184
  var $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite;
5162
5185
  var init_checks = __esm({
5163
5186
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js"() {
5187
+ init_define_WEB_FIRST_SEGMENTS();
5164
5188
  init_core();
5165
5189
  init_regexes();
5166
5190
  init_util2();
@@ -5712,6 +5736,7 @@ var init_checks = __esm({
5712
5736
  var Doc;
5713
5737
  var init_doc = __esm({
5714
5738
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js"() {
5739
+ init_define_WEB_FIRST_SEGMENTS();
5715
5740
  Doc = class {
5716
5741
  constructor(args2 = []) {
5717
5742
  this.content = [];
@@ -5753,6 +5778,7 @@ var init_doc = __esm({
5753
5778
  var version;
5754
5779
  var init_versions = __esm({
5755
5780
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js"() {
5781
+ init_define_WEB_FIRST_SEGMENTS();
5756
5782
  version = {
5757
5783
  major: 4,
5758
5784
  minor: 3,
@@ -6122,6 +6148,7 @@ function handleRefineResult(result, payload, input, inst) {
6122
6148
  var $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom;
6123
6149
  var init_schemas = __esm({
6124
6150
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js"() {
6151
+ init_define_WEB_FIRST_SEGMENTS();
6125
6152
  init_checks();
6126
6153
  init_core();
6127
6154
  init_doc();
@@ -7754,6 +7781,7 @@ function ar_default() {
7754
7781
  var error;
7755
7782
  var init_ar = __esm({
7756
7783
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js"() {
7784
+ init_define_WEB_FIRST_SEGMENTS();
7757
7785
  init_util2();
7758
7786
  error = () => {
7759
7787
  const Sizable = {
@@ -7867,6 +7895,7 @@ function az_default() {
7867
7895
  var error2;
7868
7896
  var init_az = __esm({
7869
7897
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js"() {
7898
+ init_define_WEB_FIRST_SEGMENTS();
7870
7899
  init_util2();
7871
7900
  error2 = () => {
7872
7901
  const Sizable = {
@@ -7994,6 +8023,7 @@ function be_default() {
7994
8023
  var error3;
7995
8024
  var init_be = __esm({
7996
8025
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js"() {
8026
+ init_define_WEB_FIRST_SEGMENTS();
7997
8027
  init_util2();
7998
8028
  error3 = () => {
7999
8029
  const Sizable = {
@@ -8142,6 +8172,7 @@ function bg_default() {
8142
8172
  var error4;
8143
8173
  var init_bg = __esm({
8144
8174
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js"() {
8175
+ init_define_WEB_FIRST_SEGMENTS();
8145
8176
  init_util2();
8146
8177
  error4 = () => {
8147
8178
  const Sizable = {
@@ -8269,6 +8300,7 @@ function ca_default() {
8269
8300
  var error5;
8270
8301
  var init_ca = __esm({
8271
8302
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js"() {
8303
+ init_define_WEB_FIRST_SEGMENTS();
8272
8304
  init_util2();
8273
8305
  error5 = () => {
8274
8306
  const Sizable = {
@@ -8384,6 +8416,7 @@ function cs_default() {
8384
8416
  var error6;
8385
8417
  var init_cs = __esm({
8386
8418
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js"() {
8419
+ init_define_WEB_FIRST_SEGMENTS();
8387
8420
  init_util2();
8388
8421
  error6 = () => {
8389
8422
  const Sizable = {
@@ -8502,6 +8535,7 @@ function da_default() {
8502
8535
  var error7;
8503
8536
  var init_da = __esm({
8504
8537
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js"() {
8538
+ init_define_WEB_FIRST_SEGMENTS();
8505
8539
  init_util2();
8506
8540
  error7 = () => {
8507
8541
  const Sizable = {
@@ -8624,6 +8658,7 @@ function de_default() {
8624
8658
  var error8;
8625
8659
  var init_de = __esm({
8626
8660
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js"() {
8661
+ init_define_WEB_FIRST_SEGMENTS();
8627
8662
  init_util2();
8628
8663
  error8 = () => {
8629
8664
  const Sizable = {
@@ -8739,6 +8774,7 @@ function en_default2() {
8739
8774
  var error9;
8740
8775
  var init_en2 = __esm({
8741
8776
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js"() {
8777
+ init_define_WEB_FIRST_SEGMENTS();
8742
8778
  init_util2();
8743
8779
  error9 = () => {
8744
8780
  const Sizable = {
@@ -8854,6 +8890,7 @@ function eo_default() {
8854
8890
  var error10;
8855
8891
  var init_eo = __esm({
8856
8892
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js"() {
8893
+ init_define_WEB_FIRST_SEGMENTS();
8857
8894
  init_util2();
8858
8895
  error10 = () => {
8859
8896
  const Sizable = {
@@ -8970,6 +9007,7 @@ function es_default() {
8970
9007
  var error11;
8971
9008
  var init_es = __esm({
8972
9009
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js"() {
9010
+ init_define_WEB_FIRST_SEGMENTS();
8973
9011
  init_util2();
8974
9012
  error11 = () => {
8975
9013
  const Sizable = {
@@ -9109,6 +9147,7 @@ function fa_default() {
9109
9147
  var error12;
9110
9148
  var init_fa = __esm({
9111
9149
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js"() {
9150
+ init_define_WEB_FIRST_SEGMENTS();
9112
9151
  init_util2();
9113
9152
  error12 = () => {
9114
9153
  const Sizable = {
@@ -9230,6 +9269,7 @@ function fi_default() {
9230
9269
  var error13;
9231
9270
  var init_fi = __esm({
9232
9271
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js"() {
9272
+ init_define_WEB_FIRST_SEGMENTS();
9233
9273
  init_util2();
9234
9274
  error13 = () => {
9235
9275
  const Sizable = {
@@ -9349,6 +9389,7 @@ function fr_default() {
9349
9389
  var error14;
9350
9390
  var init_fr = __esm({
9351
9391
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js"() {
9392
+ init_define_WEB_FIRST_SEGMENTS();
9352
9393
  init_util2();
9353
9394
  error14 = () => {
9354
9395
  const Sizable = {
@@ -9464,6 +9505,7 @@ function fr_CA_default() {
9464
9505
  var error15;
9465
9506
  var init_fr_CA = __esm({
9466
9507
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js"() {
9508
+ init_define_WEB_FIRST_SEGMENTS();
9467
9509
  init_util2();
9468
9510
  error15 = () => {
9469
9511
  const Sizable = {
@@ -9578,6 +9620,7 @@ function he_default() {
9578
9620
  var error16;
9579
9621
  var init_he = __esm({
9580
9622
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js"() {
9623
+ init_define_WEB_FIRST_SEGMENTS();
9581
9624
  init_util2();
9582
9625
  error16 = () => {
9583
9626
  const TypeNames = {
@@ -9779,6 +9822,7 @@ function hu_default() {
9779
9822
  var error17;
9780
9823
  var init_hu = __esm({
9781
9824
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js"() {
9825
+ init_define_WEB_FIRST_SEGMENTS();
9782
9826
  init_util2();
9783
9827
  error17 = () => {
9784
9828
  const Sizable = {
@@ -9904,6 +9948,7 @@ function hy_default() {
9904
9948
  var error18;
9905
9949
  var init_hy = __esm({
9906
9950
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js"() {
9951
+ init_define_WEB_FIRST_SEGMENTS();
9907
9952
  init_util2();
9908
9953
  error18 = () => {
9909
9954
  const Sizable = {
@@ -10048,6 +10093,7 @@ function id_default() {
10048
10093
  var error19;
10049
10094
  var init_id = __esm({
10050
10095
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js"() {
10096
+ init_define_WEB_FIRST_SEGMENTS();
10051
10097
  init_util2();
10052
10098
  error19 = () => {
10053
10099
  const Sizable = {
@@ -10161,6 +10207,7 @@ function is_default() {
10161
10207
  var error20;
10162
10208
  var init_is = __esm({
10163
10209
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js"() {
10210
+ init_define_WEB_FIRST_SEGMENTS();
10164
10211
  init_util2();
10165
10212
  error20 = () => {
10166
10213
  const Sizable = {
@@ -10277,6 +10324,7 @@ function it_default() {
10277
10324
  var error21;
10278
10325
  var init_it = __esm({
10279
10326
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js"() {
10327
+ init_define_WEB_FIRST_SEGMENTS();
10280
10328
  init_util2();
10281
10329
  error21 = () => {
10282
10330
  const Sizable = {
@@ -10392,6 +10440,7 @@ function ja_default() {
10392
10440
  var error22;
10393
10441
  var init_ja = __esm({
10394
10442
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js"() {
10443
+ init_define_WEB_FIRST_SEGMENTS();
10395
10444
  init_util2();
10396
10445
  error22 = () => {
10397
10446
  const Sizable = {
@@ -10506,6 +10555,7 @@ function ka_default() {
10506
10555
  var error23;
10507
10556
  var init_ka = __esm({
10508
10557
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js"() {
10558
+ init_define_WEB_FIRST_SEGMENTS();
10509
10559
  init_util2();
10510
10560
  error23 = () => {
10511
10561
  const Sizable = {
@@ -10625,6 +10675,7 @@ function km_default() {
10625
10675
  var error24;
10626
10676
  var init_km = __esm({
10627
10677
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js"() {
10678
+ init_define_WEB_FIRST_SEGMENTS();
10628
10679
  init_util2();
10629
10680
  error24 = () => {
10630
10681
  const Sizable = {
@@ -10739,6 +10790,7 @@ function kh_default() {
10739
10790
  }
10740
10791
  var init_kh = __esm({
10741
10792
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js"() {
10793
+ init_define_WEB_FIRST_SEGMENTS();
10742
10794
  init_km();
10743
10795
  }
10744
10796
  });
@@ -10752,6 +10804,7 @@ function ko_default() {
10752
10804
  var error25;
10753
10805
  var init_ko = __esm({
10754
10806
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js"() {
10807
+ init_define_WEB_FIRST_SEGMENTS();
10755
10808
  init_util2();
10756
10809
  error25 = () => {
10757
10810
  const Sizable = {
@@ -10880,6 +10933,7 @@ function lt_default() {
10880
10933
  var capitalizeFirstCharacter, error26;
10881
10934
  var init_lt = __esm({
10882
10935
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js"() {
10936
+ init_define_WEB_FIRST_SEGMENTS();
10883
10937
  init_util2();
10884
10938
  capitalizeFirstCharacter = (text) => {
10885
10939
  return text.charAt(0).toUpperCase() + text.slice(1);
@@ -11080,6 +11134,7 @@ function mk_default() {
11080
11134
  var error27;
11081
11135
  var init_mk = __esm({
11082
11136
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js"() {
11137
+ init_define_WEB_FIRST_SEGMENTS();
11083
11138
  init_util2();
11084
11139
  error27 = () => {
11085
11140
  const Sizable = {
@@ -11196,6 +11251,7 @@ function ms_default() {
11196
11251
  var error28;
11197
11252
  var init_ms = __esm({
11198
11253
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js"() {
11254
+ init_define_WEB_FIRST_SEGMENTS();
11199
11255
  init_util2();
11200
11256
  error28 = () => {
11201
11257
  const Sizable = {
@@ -11310,6 +11366,7 @@ function nl_default() {
11310
11366
  var error29;
11311
11367
  var init_nl = __esm({
11312
11368
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js"() {
11369
+ init_define_WEB_FIRST_SEGMENTS();
11313
11370
  init_util2();
11314
11371
  error29 = () => {
11315
11372
  const Sizable = {
@@ -11427,6 +11484,7 @@ function no_default() {
11427
11484
  var error30;
11428
11485
  var init_no = __esm({
11429
11486
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js"() {
11487
+ init_define_WEB_FIRST_SEGMENTS();
11430
11488
  init_util2();
11431
11489
  error30 = () => {
11432
11490
  const Sizable = {
@@ -11542,6 +11600,7 @@ function ota_default() {
11542
11600
  var error31;
11543
11601
  var init_ota = __esm({
11544
11602
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js"() {
11603
+ init_define_WEB_FIRST_SEGMENTS();
11545
11604
  init_util2();
11546
11605
  error31 = () => {
11547
11606
  const Sizable = {
@@ -11658,6 +11717,7 @@ function ps_default() {
11658
11717
  var error32;
11659
11718
  var init_ps = __esm({
11660
11719
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js"() {
11720
+ init_define_WEB_FIRST_SEGMENTS();
11661
11721
  init_util2();
11662
11722
  error32 = () => {
11663
11723
  const Sizable = {
@@ -11779,6 +11839,7 @@ function pl_default() {
11779
11839
  var error33;
11780
11840
  var init_pl = __esm({
11781
11841
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js"() {
11842
+ init_define_WEB_FIRST_SEGMENTS();
11782
11843
  init_util2();
11783
11844
  error33 = () => {
11784
11845
  const Sizable = {
@@ -11895,6 +11956,7 @@ function pt_default() {
11895
11956
  var error34;
11896
11957
  var init_pt = __esm({
11897
11958
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js"() {
11959
+ init_define_WEB_FIRST_SEGMENTS();
11898
11960
  init_util2();
11899
11961
  error34 = () => {
11900
11962
  const Sizable = {
@@ -12025,6 +12087,7 @@ function ru_default() {
12025
12087
  var error35;
12026
12088
  var init_ru = __esm({
12027
12089
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js"() {
12090
+ init_define_WEB_FIRST_SEGMENTS();
12028
12091
  init_util2();
12029
12092
  error35 = () => {
12030
12093
  const Sizable = {
@@ -12173,6 +12236,7 @@ function sl_default() {
12173
12236
  var error36;
12174
12237
  var init_sl = __esm({
12175
12238
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js"() {
12239
+ init_define_WEB_FIRST_SEGMENTS();
12176
12240
  init_util2();
12177
12241
  error36 = () => {
12178
12242
  const Sizable = {
@@ -12289,6 +12353,7 @@ function sv_default() {
12289
12353
  var error37;
12290
12354
  var init_sv = __esm({
12291
12355
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js"() {
12356
+ init_define_WEB_FIRST_SEGMENTS();
12292
12357
  init_util2();
12293
12358
  error37 = () => {
12294
12359
  const Sizable = {
@@ -12406,6 +12471,7 @@ function ta_default() {
12406
12471
  var error38;
12407
12472
  var init_ta = __esm({
12408
12473
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js"() {
12474
+ init_define_WEB_FIRST_SEGMENTS();
12409
12475
  init_util2();
12410
12476
  error38 = () => {
12411
12477
  const Sizable = {
@@ -12523,6 +12589,7 @@ function th_default() {
12523
12589
  var error39;
12524
12590
  var init_th = __esm({
12525
12591
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js"() {
12592
+ init_define_WEB_FIRST_SEGMENTS();
12526
12593
  init_util2();
12527
12594
  error39 = () => {
12528
12595
  const Sizable = {
@@ -12640,6 +12707,7 @@ function tr_default() {
12640
12707
  var error40;
12641
12708
  var init_tr = __esm({
12642
12709
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js"() {
12710
+ init_define_WEB_FIRST_SEGMENTS();
12643
12711
  init_util2();
12644
12712
  error40 = () => {
12645
12713
  const Sizable = {
@@ -12752,6 +12820,7 @@ function uk_default() {
12752
12820
  var error41;
12753
12821
  var init_uk = __esm({
12754
12822
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js"() {
12823
+ init_define_WEB_FIRST_SEGMENTS();
12755
12824
  init_util2();
12756
12825
  error41 = () => {
12757
12826
  const Sizable = {
@@ -12864,6 +12933,7 @@ function ua_default() {
12864
12933
  }
12865
12934
  var init_ua = __esm({
12866
12935
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js"() {
12936
+ init_define_WEB_FIRST_SEGMENTS();
12867
12937
  init_uk();
12868
12938
  }
12869
12939
  });
@@ -12877,6 +12947,7 @@ function ur_default() {
12877
12947
  var error42;
12878
12948
  var init_ur = __esm({
12879
12949
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js"() {
12950
+ init_define_WEB_FIRST_SEGMENTS();
12880
12951
  init_util2();
12881
12952
  error42 = () => {
12882
12953
  const Sizable = {
@@ -12994,6 +13065,7 @@ function uz_default() {
12994
13065
  var error43;
12995
13066
  var init_uz = __esm({
12996
13067
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js"() {
13068
+ init_define_WEB_FIRST_SEGMENTS();
12997
13069
  init_util2();
12998
13070
  error43 = () => {
12999
13071
  const Sizable = {
@@ -13110,6 +13182,7 @@ function vi_default() {
13110
13182
  var error44;
13111
13183
  var init_vi = __esm({
13112
13184
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js"() {
13185
+ init_define_WEB_FIRST_SEGMENTS();
13113
13186
  init_util2();
13114
13187
  error44 = () => {
13115
13188
  const Sizable = {
@@ -13225,6 +13298,7 @@ function zh_CN_default() {
13225
13298
  var error45;
13226
13299
  var init_zh_CN = __esm({
13227
13300
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js"() {
13301
+ init_define_WEB_FIRST_SEGMENTS();
13228
13302
  init_util2();
13229
13303
  error45 = () => {
13230
13304
  const Sizable = {
@@ -13341,6 +13415,7 @@ function zh_TW_default() {
13341
13415
  var error46;
13342
13416
  var init_zh_TW = __esm({
13343
13417
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js"() {
13418
+ init_define_WEB_FIRST_SEGMENTS();
13344
13419
  init_util2();
13345
13420
  error46 = () => {
13346
13421
  const Sizable = {
@@ -13455,6 +13530,7 @@ function yo_default() {
13455
13530
  var error47;
13456
13531
  var init_yo = __esm({
13457
13532
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js"() {
13533
+ init_define_WEB_FIRST_SEGMENTS();
13458
13534
  init_util2();
13459
13535
  error47 = () => {
13460
13536
  const Sizable = {
@@ -13615,6 +13691,7 @@ __export(locales_exports, {
13615
13691
  });
13616
13692
  var init_locales = __esm({
13617
13693
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js"() {
13694
+ init_define_WEB_FIRST_SEGMENTS();
13618
13695
  init_ar();
13619
13696
  init_az();
13620
13697
  init_be();
@@ -13674,6 +13751,7 @@ function registry() {
13674
13751
  var _a, $output, $input, $ZodRegistry, globalRegistry;
13675
13752
  var init_registries = __esm({
13676
13753
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js"() {
13754
+ init_define_WEB_FIRST_SEGMENTS();
13677
13755
  $output = /* @__PURE__ */ Symbol("ZodOutput");
13678
13756
  $input = /* @__PURE__ */ Symbol("ZodInput");
13679
13757
  $ZodRegistry = class {
@@ -14755,6 +14833,7 @@ function _stringFormat(Class2, format3, fnOrRegex, _params = {}) {
14755
14833
  var TimePrecision;
14756
14834
  var init_api = __esm({
14757
14835
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js"() {
14836
+ init_define_WEB_FIRST_SEGMENTS();
14758
14837
  init_checks();
14759
14838
  init_registries();
14760
14839
  init_schemas();
@@ -15110,6 +15189,7 @@ function isTransforming(_schema, _ctx) {
15110
15189
  var createToJSONSchemaMethod, createStandardJSONSchemaMethod;
15111
15190
  var init_to_json_schema = __esm({
15112
15191
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js"() {
15192
+ init_define_WEB_FIRST_SEGMENTS();
15113
15193
  init_registries();
15114
15194
  createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
15115
15195
  const ctx = initializeContext({ ...params, processors });
@@ -15165,6 +15245,7 @@ function toJSONSchema(input, params) {
15165
15245
  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, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors;
15166
15246
  var init_json_schema_processors = __esm({
15167
15247
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js"() {
15248
+ init_define_WEB_FIRST_SEGMENTS();
15168
15249
  init_to_json_schema();
15169
15250
  init_util2();
15170
15251
  formatMap = {
@@ -15689,6 +15770,7 @@ var init_json_schema_processors = __esm({
15689
15770
  var JSONSchemaGenerator;
15690
15771
  var init_json_schema_generator = __esm({
15691
15772
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js"() {
15773
+ init_define_WEB_FIRST_SEGMENTS();
15692
15774
  init_json_schema_processors();
15693
15775
  init_to_json_schema();
15694
15776
  JSONSchemaGenerator = class {
@@ -15771,6 +15853,7 @@ var init_json_schema_generator = __esm({
15771
15853
  var json_schema_exports = {};
15772
15854
  var init_json_schema = __esm({
15773
15855
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js"() {
15856
+ init_define_WEB_FIRST_SEGMENTS();
15774
15857
  }
15775
15858
  });
15776
15859
 
@@ -16053,6 +16136,7 @@ __export(core_exports2, {
16053
16136
  });
16054
16137
  var init_core2 = __esm({
16055
16138
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js"() {
16139
+ init_define_WEB_FIRST_SEGMENTS();
16056
16140
  init_core();
16057
16141
  init_parse();
16058
16142
  init_errors2();
@@ -16075,6 +16159,7 @@ var init_core2 = __esm({
16075
16159
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/parse.js
16076
16160
  var init_parse2 = __esm({
16077
16161
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/parse.js"() {
16162
+ init_define_WEB_FIRST_SEGMENTS();
16078
16163
  init_core2();
16079
16164
  }
16080
16165
  });
@@ -16092,6 +16177,7 @@ function object(shape, params) {
16092
16177
  var ZodMiniType, ZodMiniObject;
16093
16178
  var init_schemas2 = __esm({
16094
16179
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/schemas.js"() {
16180
+ init_define_WEB_FIRST_SEGMENTS();
16095
16181
  init_core2();
16096
16182
  init_util2();
16097
16183
  init_parse2();
@@ -16134,6 +16220,7 @@ var init_schemas2 = __esm({
16134
16220
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/checks.js
16135
16221
  var init_checks2 = __esm({
16136
16222
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/checks.js"() {
16223
+ init_define_WEB_FIRST_SEGMENTS();
16137
16224
  init_core2();
16138
16225
  }
16139
16226
  });
@@ -16141,6 +16228,7 @@ var init_checks2 = __esm({
16141
16228
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/iso.js
16142
16229
  var init_iso = __esm({
16143
16230
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/iso.js"() {
16231
+ init_define_WEB_FIRST_SEGMENTS();
16144
16232
  init_core2();
16145
16233
  init_schemas2();
16146
16234
  }
@@ -16149,6 +16237,7 @@ var init_iso = __esm({
16149
16237
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/coerce.js
16150
16238
  var init_coerce = __esm({
16151
16239
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/coerce.js"() {
16240
+ init_define_WEB_FIRST_SEGMENTS();
16152
16241
  init_core2();
16153
16242
  init_schemas2();
16154
16243
  }
@@ -16157,6 +16246,7 @@ var init_coerce = __esm({
16157
16246
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/external.js
16158
16247
  var init_external2 = __esm({
16159
16248
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/external.js"() {
16249
+ init_define_WEB_FIRST_SEGMENTS();
16160
16250
  init_core2();
16161
16251
  init_parse2();
16162
16252
  init_schemas2();
@@ -16173,6 +16263,7 @@ var init_external2 = __esm({
16173
16263
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4-mini/index.js
16174
16264
  var init_v4_mini = __esm({
16175
16265
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4-mini/index.js"() {
16266
+ init_define_WEB_FIRST_SEGMENTS();
16176
16267
  init_external2();
16177
16268
  init_external2();
16178
16269
  }
@@ -16323,6 +16414,7 @@ function getLiteralValue(schema) {
16323
16414
  }
16324
16415
  var init_zod_compat = __esm({
16325
16416
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js"() {
16417
+ init_define_WEB_FIRST_SEGMENTS();
16326
16418
  init_v3();
16327
16419
  init_v4_mini();
16328
16420
  }
@@ -16363,6 +16455,7 @@ __export(checks_exports2, {
16363
16455
  });
16364
16456
  var init_checks3 = __esm({
16365
16457
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js"() {
16458
+ init_define_WEB_FIRST_SEGMENTS();
16366
16459
  init_core2();
16367
16460
  }
16368
16461
  });
@@ -16394,6 +16487,7 @@ function duration2(params) {
16394
16487
  var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration;
16395
16488
  var init_iso2 = __esm({
16396
16489
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js"() {
16490
+ init_define_WEB_FIRST_SEGMENTS();
16397
16491
  init_core2();
16398
16492
  init_schemas3();
16399
16493
  ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
@@ -16419,6 +16513,7 @@ var init_iso2 = __esm({
16419
16513
  var initializer2, ZodError2, ZodRealError;
16420
16514
  var init_errors3 = __esm({
16421
16515
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js"() {
16516
+ init_define_WEB_FIRST_SEGMENTS();
16422
16517
  init_core2();
16423
16518
  init_core2();
16424
16519
  init_util2();
@@ -16467,6 +16562,7 @@ var init_errors3 = __esm({
16467
16562
  var parse2, parseAsync2, safeParse3, safeParseAsync3, encode2, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2;
16468
16563
  var init_parse3 = __esm({
16469
16564
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js"() {
16565
+ init_define_WEB_FIRST_SEGMENTS();
16470
16566
  init_core2();
16471
16567
  init_errors3();
16472
16568
  parse2 = /* @__PURE__ */ _parse(ZodRealError);
@@ -17109,6 +17205,7 @@ function preprocess(fn, schema) {
17109
17205
  var ZodType2, _ZodString, ZodString2, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber2, ZodNumberFormat, ZodBoolean2, ZodBigInt2, ZodBigIntFormat, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown2, ZodNever2, ZodVoid2, ZodDate2, ZodArray2, ZodObject2, ZodUnion2, ZodXor, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple2, ZodRecord2, ZodMap2, ZodSet2, ZodEnum2, ZodLiteral2, ZodFile, ZodTransform, ZodOptional2, ZodExactOptional, ZodNullable2, ZodDefault2, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch2, ZodNaN2, ZodPipe, ZodCodec, ZodReadonly2, ZodTemplateLiteral, ZodLazy2, ZodPromise2, ZodFunction2, ZodCustom, describe2, meta2, stringbool;
17110
17206
  var init_schemas3 = __esm({
17111
17207
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js"() {
17208
+ init_define_WEB_FIRST_SEGMENTS();
17112
17209
  init_core2();
17113
17210
  init_core2();
17114
17211
  init_json_schema_processors();
@@ -17754,6 +17851,7 @@ function getErrorMap2() {
17754
17851
  var ZodIssueCode2, ZodFirstPartyTypeKind2;
17755
17852
  var init_compat = __esm({
17756
17853
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js"() {
17854
+ init_define_WEB_FIRST_SEGMENTS();
17757
17855
  init_core2();
17758
17856
  init_core2();
17759
17857
  ZodIssueCode2 = {
@@ -17792,13 +17890,13 @@ function resolveRef(ref, ctx) {
17792
17890
  if (!ref.startsWith("#")) {
17793
17891
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
17794
17892
  }
17795
- const path13 = ref.slice(1).split("/").filter(Boolean);
17796
- if (path13.length === 0) {
17893
+ const path14 = ref.slice(1).split("/").filter(Boolean);
17894
+ if (path14.length === 0) {
17797
17895
  return ctx.rootSchema;
17798
17896
  }
17799
17897
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
17800
- if (path13[0] === defsKey) {
17801
- const key = path13[1];
17898
+ if (path14[0] === defsKey) {
17899
+ const key = path14[1];
17802
17900
  if (!key || !ctx.defs[key]) {
17803
17901
  throw new Error(`Reference not found: ${ref}`);
17804
17902
  }
@@ -18174,6 +18272,7 @@ function fromJSONSchema(schema, params) {
18174
18272
  var z, RECOGNIZED_KEYS;
18175
18273
  var init_from_json_schema = __esm({
18176
18274
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js"() {
18275
+ init_define_WEB_FIRST_SEGMENTS();
18177
18276
  init_registries();
18178
18277
  init_checks3();
18179
18278
  init_iso2();
@@ -18283,6 +18382,7 @@ function date4(params) {
18283
18382
  }
18284
18383
  var init_coerce2 = __esm({
18285
18384
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js"() {
18385
+ init_define_WEB_FIRST_SEGMENTS();
18286
18386
  init_core2();
18287
18387
  init_schemas3();
18288
18388
  }
@@ -18530,6 +18630,7 @@ __export(external_exports3, {
18530
18630
  });
18531
18631
  var init_external3 = __esm({
18532
18632
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js"() {
18633
+ init_define_WEB_FIRST_SEGMENTS();
18533
18634
  init_core2();
18534
18635
  init_schemas3();
18535
18636
  init_checks3();
@@ -18552,6 +18653,7 @@ var init_external3 = __esm({
18552
18653
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/index.js
18553
18654
  var init_classic = __esm({
18554
18655
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/index.js"() {
18656
+ init_define_WEB_FIRST_SEGMENTS();
18555
18657
  init_external3();
18556
18658
  init_external3();
18557
18659
  }
@@ -18560,6 +18662,7 @@ var init_classic = __esm({
18560
18662
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/index.js
18561
18663
  var init_v4 = __esm({
18562
18664
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/index.js"() {
18665
+ init_define_WEB_FIRST_SEGMENTS();
18563
18666
  init_classic();
18564
18667
  init_classic();
18565
18668
  }
@@ -18581,6 +18684,7 @@ function assertCompleteRequestResourceTemplate(request) {
18581
18684
  var LATEST_PROTOCOL_VERSION, SUPPORTED_PROTOCOL_VERSIONS, RELATED_TASK_META_KEY, JSONRPC_VERSION, AssertObjectSchema, ProgressTokenSchema, CursorSchema, TaskCreationParamsSchema, TaskMetadataSchema, RelatedTaskMetadataSchema, RequestMetaSchema, BaseRequestParamsSchema, TaskAugmentedRequestParamsSchema, isTaskAugmentedRequestParams, RequestSchema, NotificationsParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, isJSONRPCRequest, JSONRPCNotificationSchema, isJSONRPCNotification, JSONRPCResultResponseSchema, isJSONRPCResultResponse, ErrorCode, JSONRPCErrorResponseSchema, isJSONRPCErrorResponse, JSONRPCMessageSchema, JSONRPCResponseSchema, EmptyResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, IconSchema, IconsSchema, BaseMetadataSchema, ImplementationSchema, FormElicitationCapabilitySchema, ElicitationCapabilitySchema, ClientTasksCapabilitySchema, ServerTasksCapabilitySchema, ClientCapabilitiesSchema, InitializeRequestParamsSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, TaskStatusSchema, TaskSchema, CreateTaskResultSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, GetTaskRequestSchema, GetTaskResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, ListTasksRequestSchema, ListTasksResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, ResourceContentsSchema, TextResourceContentsSchema, Base64Schema, BlobResourceContentsSchema, RoleSchema, AnnotationsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ResourceRequestParamsSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, ToolUseContentSchema, EmbeddedResourceSchema, ResourceLinkSchema, ContentBlockSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolAnnotationsSchema, ToolExecutionSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestParamsSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, ListChangedOptionsBaseSchema, LoggingLevelSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, ToolChoiceSchema, ToolResultContentSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema, EnumSchemaSchema, PrimitiveSchemaDefinitionSchema, ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, ElicitResultSchema, ResourceTemplateReferenceSchema, PromptReferenceSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError, UrlElicitationRequiredError;
18582
18685
  var init_types2 = __esm({
18583
18686
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"() {
18687
+ init_define_WEB_FIRST_SEGMENTS();
18584
18688
  init_v4();
18585
18689
  LATEST_PROTOCOL_VERSION = "2025-11-25";
18586
18690
  SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
@@ -20107,6 +20211,7 @@ function isTerminal(status) {
20107
20211
  }
20108
20212
  var init_interfaces = __esm({
20109
20213
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js"() {
20214
+ init_define_WEB_FIRST_SEGMENTS();
20110
20215
  }
20111
20216
  });
20112
20217
 
@@ -20114,6 +20219,7 @@ var init_interfaces = __esm({
20114
20219
  var ignoreOverride, defaultOptions, getDefaultOptions;
20115
20220
  var init_Options = __esm({
20116
20221
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/Options.js"() {
20222
+ init_define_WEB_FIRST_SEGMENTS();
20117
20223
  ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use");
20118
20224
  defaultOptions = {
20119
20225
  name: void 0,
@@ -20153,6 +20259,7 @@ var init_Options = __esm({
20153
20259
  var getRefs;
20154
20260
  var init_Refs = __esm({
20155
20261
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/Refs.js"() {
20262
+ init_define_WEB_FIRST_SEGMENTS();
20156
20263
  init_Options();
20157
20264
  getRefs = (options) => {
20158
20265
  const _options = getDefaultOptions(options);
@@ -20193,6 +20300,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
20193
20300
  }
20194
20301
  var init_errorMessages = __esm({
20195
20302
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() {
20303
+ init_define_WEB_FIRST_SEGMENTS();
20196
20304
  }
20197
20305
  });
20198
20306
 
@@ -20200,6 +20308,7 @@ var init_errorMessages = __esm({
20200
20308
  var getRelativePath;
20201
20309
  var init_getRelativePath = __esm({
20202
20310
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() {
20311
+ init_define_WEB_FIRST_SEGMENTS();
20203
20312
  getRelativePath = (pathA, pathB) => {
20204
20313
  let i2 = 0;
20205
20314
  for (; i2 < pathA.length && i2 < pathB.length; i2++) {
@@ -20228,6 +20337,7 @@ function parseAnyDef(refs) {
20228
20337
  }
20229
20338
  var init_any = __esm({
20230
20339
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() {
20340
+ init_define_WEB_FIRST_SEGMENTS();
20231
20341
  init_getRelativePath();
20232
20342
  }
20233
20343
  });
@@ -20257,6 +20367,7 @@ function parseArrayDef(def, refs) {
20257
20367
  }
20258
20368
  var init_array = __esm({
20259
20369
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() {
20370
+ init_define_WEB_FIRST_SEGMENTS();
20260
20371
  init_v3();
20261
20372
  init_errorMessages();
20262
20373
  init_parseDef();
@@ -20310,6 +20421,7 @@ function parseBigintDef(def, refs) {
20310
20421
  }
20311
20422
  var init_bigint = __esm({
20312
20423
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() {
20424
+ init_define_WEB_FIRST_SEGMENTS();
20313
20425
  init_errorMessages();
20314
20426
  }
20315
20427
  });
@@ -20322,6 +20434,7 @@ function parseBooleanDef() {
20322
20434
  }
20323
20435
  var init_boolean = __esm({
20324
20436
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() {
20437
+ init_define_WEB_FIRST_SEGMENTS();
20325
20438
  }
20326
20439
  });
20327
20440
 
@@ -20331,6 +20444,7 @@ function parseBrandedDef(_def, refs) {
20331
20444
  }
20332
20445
  var init_branded = __esm({
20333
20446
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() {
20447
+ init_define_WEB_FIRST_SEGMENTS();
20334
20448
  init_parseDef();
20335
20449
  }
20336
20450
  });
@@ -20339,6 +20453,7 @@ var init_branded = __esm({
20339
20453
  var parseCatchDef;
20340
20454
  var init_catch = __esm({
20341
20455
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() {
20456
+ init_define_WEB_FIRST_SEGMENTS();
20342
20457
  init_parseDef();
20343
20458
  parseCatchDef = (def, refs) => {
20344
20459
  return parseDef(def.innerType._def, refs);
@@ -20373,6 +20488,7 @@ function parseDateDef(def, refs, overrideDateStrategy) {
20373
20488
  var integerDateParser;
20374
20489
  var init_date = __esm({
20375
20490
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() {
20491
+ init_define_WEB_FIRST_SEGMENTS();
20376
20492
  init_errorMessages();
20377
20493
  integerDateParser = (def, refs) => {
20378
20494
  const res = {
@@ -20420,6 +20536,7 @@ function parseDefaultDef(_def, refs) {
20420
20536
  }
20421
20537
  var init_default = __esm({
20422
20538
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() {
20539
+ init_define_WEB_FIRST_SEGMENTS();
20423
20540
  init_parseDef();
20424
20541
  }
20425
20542
  });
@@ -20430,6 +20547,7 @@ function parseEffectsDef(_def, refs) {
20430
20547
  }
20431
20548
  var init_effects = __esm({
20432
20549
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() {
20550
+ init_define_WEB_FIRST_SEGMENTS();
20433
20551
  init_parseDef();
20434
20552
  init_any();
20435
20553
  }
@@ -20444,6 +20562,7 @@ function parseEnumDef(def) {
20444
20562
  }
20445
20563
  var init_enum = __esm({
20446
20564
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() {
20565
+ init_define_WEB_FIRST_SEGMENTS();
20447
20566
  }
20448
20567
  });
20449
20568
 
@@ -20486,6 +20605,7 @@ function parseIntersectionDef(def, refs) {
20486
20605
  var isJsonSchema7AllOfType;
20487
20606
  var init_intersection = __esm({
20488
20607
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() {
20608
+ init_define_WEB_FIRST_SEGMENTS();
20489
20609
  init_parseDef();
20490
20610
  isJsonSchema7AllOfType = (type) => {
20491
20611
  if ("type" in type && type.type === "string")
@@ -20516,6 +20636,7 @@ function parseLiteralDef(def, refs) {
20516
20636
  }
20517
20637
  var init_literal = __esm({
20518
20638
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() {
20639
+ init_define_WEB_FIRST_SEGMENTS();
20519
20640
  }
20520
20641
  });
20521
20642
 
@@ -20797,6 +20918,7 @@ function stringifyRegExpWithFlags(regex2, refs) {
20797
20918
  var emojiRegex2, zodPatterns, ALPHA_NUMERIC;
20798
20919
  var init_string = __esm({
20799
20920
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() {
20921
+ init_define_WEB_FIRST_SEGMENTS();
20800
20922
  init_errorMessages();
20801
20923
  emojiRegex2 = void 0;
20802
20924
  zodPatterns = {
@@ -20903,6 +21025,7 @@ function parseRecordDef(def, refs) {
20903
21025
  }
20904
21026
  var init_record = __esm({
20905
21027
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() {
21028
+ init_define_WEB_FIRST_SEGMENTS();
20906
21029
  init_v3();
20907
21030
  init_parseDef();
20908
21031
  init_string();
@@ -20937,6 +21060,7 @@ function parseMapDef(def, refs) {
20937
21060
  }
20938
21061
  var init_map = __esm({
20939
21062
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() {
21063
+ init_define_WEB_FIRST_SEGMENTS();
20940
21064
  init_parseDef();
20941
21065
  init_record();
20942
21066
  init_any();
@@ -20958,6 +21082,7 @@ function parseNativeEnumDef(def) {
20958
21082
  }
20959
21083
  var init_nativeEnum = __esm({
20960
21084
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() {
21085
+ init_define_WEB_FIRST_SEGMENTS();
20961
21086
  }
20962
21087
  });
20963
21088
 
@@ -20972,6 +21097,7 @@ function parseNeverDef(refs) {
20972
21097
  }
20973
21098
  var init_never = __esm({
20974
21099
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() {
21100
+ init_define_WEB_FIRST_SEGMENTS();
20975
21101
  init_any();
20976
21102
  }
20977
21103
  });
@@ -20987,6 +21113,7 @@ function parseNullDef(refs) {
20987
21113
  }
20988
21114
  var init_null = __esm({
20989
21115
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() {
21116
+ init_define_WEB_FIRST_SEGMENTS();
20990
21117
  }
20991
21118
  });
20992
21119
 
@@ -21046,6 +21173,7 @@ function parseUnionDef(def, refs) {
21046
21173
  var primitiveMappings, asAnyOf;
21047
21174
  var init_union = __esm({
21048
21175
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() {
21176
+ init_define_WEB_FIRST_SEGMENTS();
21049
21177
  init_parseDef();
21050
21178
  primitiveMappings = {
21051
21179
  ZodString: "string",
@@ -21097,6 +21225,7 @@ function parseNullableDef(def, refs) {
21097
21225
  }
21098
21226
  var init_nullable = __esm({
21099
21227
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() {
21228
+ init_define_WEB_FIRST_SEGMENTS();
21100
21229
  init_parseDef();
21101
21230
  init_union();
21102
21231
  }
@@ -21152,6 +21281,7 @@ function parseNumberDef(def, refs) {
21152
21281
  }
21153
21282
  var init_number = __esm({
21154
21283
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() {
21284
+ init_define_WEB_FIRST_SEGMENTS();
21155
21285
  init_errorMessages();
21156
21286
  }
21157
21287
  });
@@ -21227,6 +21357,7 @@ function safeIsOptional(schema) {
21227
21357
  }
21228
21358
  var init_object = __esm({
21229
21359
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() {
21360
+ init_define_WEB_FIRST_SEGMENTS();
21230
21361
  init_parseDef();
21231
21362
  }
21232
21363
  });
@@ -21235,6 +21366,7 @@ var init_object = __esm({
21235
21366
  var parseOptionalDef;
21236
21367
  var init_optional = __esm({
21237
21368
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() {
21369
+ init_define_WEB_FIRST_SEGMENTS();
21238
21370
  init_parseDef();
21239
21371
  init_any();
21240
21372
  parseOptionalDef = (def, refs) => {
@@ -21261,6 +21393,7 @@ var init_optional = __esm({
21261
21393
  var parsePipelineDef;
21262
21394
  var init_pipeline = __esm({
21263
21395
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() {
21396
+ init_define_WEB_FIRST_SEGMENTS();
21264
21397
  init_parseDef();
21265
21398
  parsePipelineDef = (def, refs) => {
21266
21399
  if (refs.pipeStrategy === "input") {
@@ -21289,6 +21422,7 @@ function parsePromiseDef(def, refs) {
21289
21422
  }
21290
21423
  var init_promise = __esm({
21291
21424
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() {
21425
+ init_define_WEB_FIRST_SEGMENTS();
21292
21426
  init_parseDef();
21293
21427
  }
21294
21428
  });
@@ -21314,6 +21448,7 @@ function parseSetDef(def, refs) {
21314
21448
  }
21315
21449
  var init_set = __esm({
21316
21450
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() {
21451
+ init_define_WEB_FIRST_SEGMENTS();
21317
21452
  init_errorMessages();
21318
21453
  init_parseDef();
21319
21454
  }
@@ -21348,6 +21483,7 @@ function parseTupleDef(def, refs) {
21348
21483
  }
21349
21484
  var init_tuple = __esm({
21350
21485
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() {
21486
+ init_define_WEB_FIRST_SEGMENTS();
21351
21487
  init_parseDef();
21352
21488
  }
21353
21489
  });
@@ -21360,6 +21496,7 @@ function parseUndefinedDef(refs) {
21360
21496
  }
21361
21497
  var init_undefined = __esm({
21362
21498
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() {
21499
+ init_define_WEB_FIRST_SEGMENTS();
21363
21500
  init_any();
21364
21501
  }
21365
21502
  });
@@ -21370,6 +21507,7 @@ function parseUnknownDef(refs) {
21370
21507
  }
21371
21508
  var init_unknown = __esm({
21372
21509
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() {
21510
+ init_define_WEB_FIRST_SEGMENTS();
21373
21511
  init_any();
21374
21512
  }
21375
21513
  });
@@ -21378,6 +21516,7 @@ var init_unknown = __esm({
21378
21516
  var parseReadonlyDef;
21379
21517
  var init_readonly = __esm({
21380
21518
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() {
21519
+ init_define_WEB_FIRST_SEGMENTS();
21381
21520
  init_parseDef();
21382
21521
  parseReadonlyDef = (def, refs) => {
21383
21522
  return parseDef(def.innerType._def, refs);
@@ -21389,6 +21528,7 @@ var init_readonly = __esm({
21389
21528
  var selectParser;
21390
21529
  var init_selectParser = __esm({
21391
21530
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() {
21531
+ init_define_WEB_FIRST_SEGMENTS();
21392
21532
  init_v3();
21393
21533
  init_any();
21394
21534
  init_array();
@@ -21530,6 +21670,7 @@ function parseDef(def, refs, forceResolution = false) {
21530
21670
  var get$ref, addMeta;
21531
21671
  var init_parseDef = __esm({
21532
21672
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() {
21673
+ init_define_WEB_FIRST_SEGMENTS();
21533
21674
  init_Options();
21534
21675
  init_selectParser();
21535
21676
  init_getRelativePath();
@@ -21565,6 +21706,7 @@ var init_parseDef = __esm({
21565
21706
  // node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parseTypes.js
21566
21707
  var init_parseTypes = __esm({
21567
21708
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() {
21709
+ init_define_WEB_FIRST_SEGMENTS();
21568
21710
  }
21569
21711
  });
21570
21712
 
@@ -21572,6 +21714,7 @@ var init_parseTypes = __esm({
21572
21714
  var zodToJsonSchema;
21573
21715
  var init_zodToJsonSchema = __esm({
21574
21716
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() {
21717
+ init_define_WEB_FIRST_SEGMENTS();
21575
21718
  init_parseDef();
21576
21719
  init_Refs();
21577
21720
  init_any();
@@ -21641,6 +21784,7 @@ var init_zodToJsonSchema = __esm({
21641
21784
  // node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/index.js
21642
21785
  var init_esm = __esm({
21643
21786
  "node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/index.js"() {
21787
+ init_define_WEB_FIRST_SEGMENTS();
21644
21788
  init_Options();
21645
21789
  init_Refs();
21646
21790
  init_errorMessages();
@@ -21726,6 +21870,7 @@ function parseWithCompat(schema, data) {
21726
21870
  }
21727
21871
  var init_zod_json_schema_compat = __esm({
21728
21872
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js"() {
21873
+ init_define_WEB_FIRST_SEGMENTS();
21729
21874
  init_v4_mini();
21730
21875
  init_zod_compat();
21731
21876
  init_esm();
@@ -21755,6 +21900,7 @@ function mergeCapabilities(base, additional) {
21755
21900
  var DEFAULT_REQUEST_TIMEOUT_MSEC, Protocol;
21756
21901
  var init_protocol = __esm({
21757
21902
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"() {
21903
+ init_define_WEB_FIRST_SEGMENTS();
21758
21904
  init_zod_compat();
21759
21905
  init_types2();
21760
21906
  init_interfaces();
@@ -22258,7 +22404,7 @@ var init_protocol = __esm({
22258
22404
  return;
22259
22405
  }
22260
22406
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
22261
- await new Promise((resolve11) => setTimeout(resolve11, pollInterval));
22407
+ await new Promise((resolve12) => setTimeout(resolve12, pollInterval));
22262
22408
  options?.signal?.throwIfAborted();
22263
22409
  }
22264
22410
  } catch (error49) {
@@ -22275,7 +22421,7 @@ var init_protocol = __esm({
22275
22421
  */
22276
22422
  request(request, resultSchema, options) {
22277
22423
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
22278
- return new Promise((resolve11, reject) => {
22424
+ return new Promise((resolve12, reject) => {
22279
22425
  const earlyReject = (error49) => {
22280
22426
  reject(error49);
22281
22427
  };
@@ -22353,7 +22499,7 @@ var init_protocol = __esm({
22353
22499
  if (!parseResult.success) {
22354
22500
  reject(parseResult.error);
22355
22501
  } else {
22356
- resolve11(parseResult.data);
22502
+ resolve12(parseResult.data);
22357
22503
  }
22358
22504
  } catch (error49) {
22359
22505
  reject(error49);
@@ -22614,12 +22760,12 @@ var init_protocol = __esm({
22614
22760
  }
22615
22761
  } catch {
22616
22762
  }
22617
- return new Promise((resolve11, reject) => {
22763
+ return new Promise((resolve12, reject) => {
22618
22764
  if (signal.aborted) {
22619
22765
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
22620
22766
  return;
22621
22767
  }
22622
- const timeoutId = setTimeout(resolve11, interval);
22768
+ const timeoutId = setTimeout(resolve12, interval);
22623
22769
  signal.addEventListener("abort", () => {
22624
22770
  clearTimeout(timeoutId);
22625
22771
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -22699,6 +22845,7 @@ var init_protocol = __esm({
22699
22845
  var require_code = __commonJS({
22700
22846
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js"(exports) {
22701
22847
  "use strict";
22848
+ init_define_WEB_FIRST_SEGMENTS();
22702
22849
  Object.defineProperty(exports, "__esModule", { value: true });
22703
22850
  exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
22704
22851
  var _CodeOrName = class {
@@ -22853,6 +23000,7 @@ var require_code = __commonJS({
22853
23000
  var require_scope = __commonJS({
22854
23001
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js"(exports) {
22855
23002
  "use strict";
23003
+ init_define_WEB_FIRST_SEGMENTS();
22856
23004
  Object.defineProperty(exports, "__esModule", { value: true });
22857
23005
  exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;
22858
23006
  var code_1 = require_code();
@@ -22998,6 +23146,7 @@ var require_scope = __commonJS({
22998
23146
  var require_codegen = __commonJS({
22999
23147
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js"(exports) {
23000
23148
  "use strict";
23149
+ init_define_WEB_FIRST_SEGMENTS();
23001
23150
  Object.defineProperty(exports, "__esModule", { value: true });
23002
23151
  exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;
23003
23152
  var code_1 = require_code();
@@ -23718,6 +23867,7 @@ var require_codegen = __commonJS({
23718
23867
  var require_util = __commonJS({
23719
23868
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js"(exports) {
23720
23869
  "use strict";
23870
+ init_define_WEB_FIRST_SEGMENTS();
23721
23871
  Object.defineProperty(exports, "__esModule", { value: true });
23722
23872
  exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
23723
23873
  var codegen_1 = require_codegen();
@@ -23885,6 +24035,7 @@ var require_util = __commonJS({
23885
24035
  var require_names = __commonJS({
23886
24036
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js"(exports) {
23887
24037
  "use strict";
24038
+ init_define_WEB_FIRST_SEGMENTS();
23888
24039
  Object.defineProperty(exports, "__esModule", { value: true });
23889
24040
  var codegen_1 = require_codegen();
23890
24041
  var names = {
@@ -23924,6 +24075,7 @@ var require_names = __commonJS({
23924
24075
  var require_errors = __commonJS({
23925
24076
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js"(exports) {
23926
24077
  "use strict";
24078
+ init_define_WEB_FIRST_SEGMENTS();
23927
24079
  Object.defineProperty(exports, "__esModule", { value: true });
23928
24080
  exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
23929
24081
  var codegen_1 = require_codegen();
@@ -24046,6 +24198,7 @@ var require_errors = __commonJS({
24046
24198
  var require_boolSchema = __commonJS({
24047
24199
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports) {
24048
24200
  "use strict";
24201
+ init_define_WEB_FIRST_SEGMENTS();
24049
24202
  Object.defineProperty(exports, "__esModule", { value: true });
24050
24203
  exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
24051
24204
  var errors_1 = require_errors();
@@ -24097,6 +24250,7 @@ var require_boolSchema = __commonJS({
24097
24250
  var require_rules = __commonJS({
24098
24251
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js"(exports) {
24099
24252
  "use strict";
24253
+ init_define_WEB_FIRST_SEGMENTS();
24100
24254
  Object.defineProperty(exports, "__esModule", { value: true });
24101
24255
  exports.getRules = exports.isJSONType = void 0;
24102
24256
  var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
@@ -24128,6 +24282,7 @@ var require_rules = __commonJS({
24128
24282
  var require_applicability = __commonJS({
24129
24283
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js"(exports) {
24130
24284
  "use strict";
24285
+ init_define_WEB_FIRST_SEGMENTS();
24131
24286
  Object.defineProperty(exports, "__esModule", { value: true });
24132
24287
  exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
24133
24288
  function schemaHasRulesForType({ schema, self: self2 }, type) {
@@ -24151,6 +24306,7 @@ var require_applicability = __commonJS({
24151
24306
  var require_dataType = __commonJS({
24152
24307
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js"(exports) {
24153
24308
  "use strict";
24309
+ init_define_WEB_FIRST_SEGMENTS();
24154
24310
  Object.defineProperty(exports, "__esModule", { value: true });
24155
24311
  exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
24156
24312
  var rules_1 = require_rules();
@@ -24335,6 +24491,7 @@ var require_dataType = __commonJS({
24335
24491
  var require_defaults = __commonJS({
24336
24492
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js"(exports) {
24337
24493
  "use strict";
24494
+ init_define_WEB_FIRST_SEGMENTS();
24338
24495
  Object.defineProperty(exports, "__esModule", { value: true });
24339
24496
  exports.assignDefaults = void 0;
24340
24497
  var codegen_1 = require_codegen();
@@ -24372,6 +24529,7 @@ var require_defaults = __commonJS({
24372
24529
  var require_code2 = __commonJS({
24373
24530
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js"(exports) {
24374
24531
  "use strict";
24532
+ init_define_WEB_FIRST_SEGMENTS();
24375
24533
  Object.defineProperty(exports, "__esModule", { value: true });
24376
24534
  exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
24377
24535
  var codegen_1 = require_codegen();
@@ -24505,6 +24663,7 @@ var require_code2 = __commonJS({
24505
24663
  var require_keyword = __commonJS({
24506
24664
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js"(exports) {
24507
24665
  "use strict";
24666
+ init_define_WEB_FIRST_SEGMENTS();
24508
24667
  Object.defineProperty(exports, "__esModule", { value: true });
24509
24668
  exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
24510
24669
  var codegen_1 = require_codegen();
@@ -24623,6 +24782,7 @@ var require_keyword = __commonJS({
24623
24782
  var require_subschema = __commonJS({
24624
24783
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js"(exports) {
24625
24784
  "use strict";
24785
+ init_define_WEB_FIRST_SEGMENTS();
24626
24786
  Object.defineProperty(exports, "__esModule", { value: true });
24627
24787
  exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
24628
24788
  var codegen_1 = require_codegen();
@@ -24706,6 +24866,7 @@ var require_subschema = __commonJS({
24706
24866
  var require_fast_deep_equal = __commonJS({
24707
24867
  "node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
24708
24868
  "use strict";
24869
+ init_define_WEB_FIRST_SEGMENTS();
24709
24870
  module.exports = function equal(a, b2) {
24710
24871
  if (a === b2) return true;
24711
24872
  if (a && b2 && typeof a == "object" && typeof b2 == "object") {
@@ -24741,6 +24902,7 @@ var require_fast_deep_equal = __commonJS({
24741
24902
  var require_json_schema_traverse = __commonJS({
24742
24903
  "node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js"(exports, module) {
24743
24904
  "use strict";
24905
+ init_define_WEB_FIRST_SEGMENTS();
24744
24906
  var traverse = module.exports = function(schema, opts, cb) {
24745
24907
  if (typeof opts == "function") {
24746
24908
  cb = opts;
@@ -24829,6 +24991,7 @@ var require_json_schema_traverse = __commonJS({
24829
24991
  var require_resolve = __commonJS({
24830
24992
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js"(exports) {
24831
24993
  "use strict";
24994
+ init_define_WEB_FIRST_SEGMENTS();
24832
24995
  Object.defineProperty(exports, "__esModule", { value: true });
24833
24996
  exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
24834
24997
  var util_1 = require_util();
@@ -24985,6 +25148,7 @@ var require_resolve = __commonJS({
24985
25148
  var require_validate = __commonJS({
24986
25149
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js"(exports) {
24987
25150
  "use strict";
25151
+ init_define_WEB_FIRST_SEGMENTS();
24988
25152
  Object.defineProperty(exports, "__esModule", { value: true });
24989
25153
  exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;
24990
25154
  var boolSchema_1 = require_boolSchema();
@@ -25493,6 +25657,7 @@ var require_validate = __commonJS({
25493
25657
  var require_validation_error = __commonJS({
25494
25658
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js"(exports) {
25495
25659
  "use strict";
25660
+ init_define_WEB_FIRST_SEGMENTS();
25496
25661
  Object.defineProperty(exports, "__esModule", { value: true });
25497
25662
  var ValidationError = class extends Error {
25498
25663
  constructor(errors) {
@@ -25509,6 +25674,7 @@ var require_validation_error = __commonJS({
25509
25674
  var require_ref_error = __commonJS({
25510
25675
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js"(exports) {
25511
25676
  "use strict";
25677
+ init_define_WEB_FIRST_SEGMENTS();
25512
25678
  Object.defineProperty(exports, "__esModule", { value: true });
25513
25679
  var resolve_1 = require_resolve();
25514
25680
  var MissingRefError = class extends Error {
@@ -25526,6 +25692,7 @@ var require_ref_error = __commonJS({
25526
25692
  var require_compile = __commonJS({
25527
25693
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js"(exports) {
25528
25694
  "use strict";
25695
+ init_define_WEB_FIRST_SEGMENTS();
25529
25696
  Object.defineProperty(exports, "__esModule", { value: true });
25530
25697
  exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
25531
25698
  var codegen_1 = require_codegen();
@@ -25646,7 +25813,7 @@ var require_compile = __commonJS({
25646
25813
  const schOrFunc = root.refs[ref];
25647
25814
  if (schOrFunc)
25648
25815
  return schOrFunc;
25649
- let _sch = resolve11.call(this, root, ref);
25816
+ let _sch = resolve12.call(this, root, ref);
25650
25817
  if (_sch === void 0) {
25651
25818
  const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
25652
25819
  const { schemaId } = this.opts;
@@ -25673,7 +25840,7 @@ var require_compile = __commonJS({
25673
25840
  function sameSchemaEnv(s1, s2) {
25674
25841
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
25675
25842
  }
25676
- function resolve11(root, ref) {
25843
+ function resolve12(root, ref) {
25677
25844
  let sch;
25678
25845
  while (typeof (sch = this.refs[ref]) == "string")
25679
25846
  ref = sch;
@@ -25769,6 +25936,7 @@ var require_data = __commonJS({
25769
25936
  var require_utils = __commonJS({
25770
25937
  "node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js"(exports, module) {
25771
25938
  "use strict";
25939
+ init_define_WEB_FIRST_SEGMENTS();
25772
25940
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
25773
25941
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
25774
25942
  function stringArrayToHexStripped(input) {
@@ -25888,8 +26056,8 @@ var require_utils = __commonJS({
25888
26056
  }
25889
26057
  return ind;
25890
26058
  }
25891
- function removeDotSegments(path13) {
25892
- let input = path13;
26059
+ function removeDotSegments(path14) {
26060
+ let input = path14;
25893
26061
  const output = [];
25894
26062
  let nextSlash = -1;
25895
26063
  let len = 0;
@@ -26026,6 +26194,7 @@ var require_utils = __commonJS({
26026
26194
  var require_schemes = __commonJS({
26027
26195
  "node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js"(exports, module) {
26028
26196
  "use strict";
26197
+ init_define_WEB_FIRST_SEGMENTS();
26029
26198
  var { isUUID } = require_utils();
26030
26199
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
26031
26200
  var supportedSchemeNames = (
@@ -26088,8 +26257,8 @@ var require_schemes = __commonJS({
26088
26257
  wsComponent.secure = void 0;
26089
26258
  }
26090
26259
  if (wsComponent.resourceName) {
26091
- const [path13, query] = wsComponent.resourceName.split("?");
26092
- wsComponent.path = path13 && path13 !== "/" ? path13 : void 0;
26260
+ const [path14, query] = wsComponent.resourceName.split("?");
26261
+ wsComponent.path = path14 && path14 !== "/" ? path14 : void 0;
26093
26262
  wsComponent.query = query;
26094
26263
  wsComponent.resourceName = void 0;
26095
26264
  }
@@ -26236,6 +26405,7 @@ var require_schemes = __commonJS({
26236
26405
  var require_fast_uri = __commonJS({
26237
26406
  "node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js"(exports, module) {
26238
26407
  "use strict";
26408
+ init_define_WEB_FIRST_SEGMENTS();
26239
26409
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
26240
26410
  var { SCHEMES, getSchemeHandler } = require_schemes();
26241
26411
  function normalize3(uri, options) {
@@ -26248,55 +26418,55 @@ var require_fast_uri = __commonJS({
26248
26418
  }
26249
26419
  return uri;
26250
26420
  }
26251
- function resolve11(baseURI, relativeURI, options) {
26421
+ function resolve12(baseURI, relativeURI, options) {
26252
26422
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
26253
26423
  const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
26254
26424
  schemelessOptions.skipEscape = true;
26255
26425
  return serialize(resolved, schemelessOptions);
26256
26426
  }
26257
- function resolveComponent(base, relative5, options, skipNormalization) {
26427
+ function resolveComponent(base, relative6, options, skipNormalization) {
26258
26428
  const target = {};
26259
26429
  if (!skipNormalization) {
26260
26430
  base = parse4(serialize(base, options), options);
26261
- relative5 = parse4(serialize(relative5, options), options);
26431
+ relative6 = parse4(serialize(relative6, options), options);
26262
26432
  }
26263
26433
  options = options || {};
26264
- if (!options.tolerant && relative5.scheme) {
26265
- target.scheme = relative5.scheme;
26266
- target.userinfo = relative5.userinfo;
26267
- target.host = relative5.host;
26268
- target.port = relative5.port;
26269
- target.path = removeDotSegments(relative5.path || "");
26270
- target.query = relative5.query;
26434
+ if (!options.tolerant && relative6.scheme) {
26435
+ target.scheme = relative6.scheme;
26436
+ target.userinfo = relative6.userinfo;
26437
+ target.host = relative6.host;
26438
+ target.port = relative6.port;
26439
+ target.path = removeDotSegments(relative6.path || "");
26440
+ target.query = relative6.query;
26271
26441
  } else {
26272
- if (relative5.userinfo !== void 0 || relative5.host !== void 0 || relative5.port !== void 0) {
26273
- target.userinfo = relative5.userinfo;
26274
- target.host = relative5.host;
26275
- target.port = relative5.port;
26276
- target.path = removeDotSegments(relative5.path || "");
26277
- target.query = relative5.query;
26442
+ if (relative6.userinfo !== void 0 || relative6.host !== void 0 || relative6.port !== void 0) {
26443
+ target.userinfo = relative6.userinfo;
26444
+ target.host = relative6.host;
26445
+ target.port = relative6.port;
26446
+ target.path = removeDotSegments(relative6.path || "");
26447
+ target.query = relative6.query;
26278
26448
  } else {
26279
- if (!relative5.path) {
26449
+ if (!relative6.path) {
26280
26450
  target.path = base.path;
26281
- if (relative5.query !== void 0) {
26282
- target.query = relative5.query;
26451
+ if (relative6.query !== void 0) {
26452
+ target.query = relative6.query;
26283
26453
  } else {
26284
26454
  target.query = base.query;
26285
26455
  }
26286
26456
  } else {
26287
- if (relative5.path[0] === "/") {
26288
- target.path = removeDotSegments(relative5.path);
26457
+ if (relative6.path[0] === "/") {
26458
+ target.path = removeDotSegments(relative6.path);
26289
26459
  } else {
26290
26460
  if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
26291
- target.path = "/" + relative5.path;
26461
+ target.path = "/" + relative6.path;
26292
26462
  } else if (!base.path) {
26293
- target.path = relative5.path;
26463
+ target.path = relative6.path;
26294
26464
  } else {
26295
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative5.path;
26465
+ target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative6.path;
26296
26466
  }
26297
26467
  target.path = removeDotSegments(target.path);
26298
26468
  }
26299
- target.query = relative5.query;
26469
+ target.query = relative6.query;
26300
26470
  }
26301
26471
  target.userinfo = base.userinfo;
26302
26472
  target.host = base.host;
@@ -26304,7 +26474,7 @@ var require_fast_uri = __commonJS({
26304
26474
  }
26305
26475
  target.scheme = base.scheme;
26306
26476
  }
26307
- target.fragment = relative5.fragment;
26477
+ target.fragment = relative6.fragment;
26308
26478
  return target;
26309
26479
  }
26310
26480
  function equal(uriA, uriB, options) {
@@ -26475,7 +26645,7 @@ var require_fast_uri = __commonJS({
26475
26645
  var fastUri = {
26476
26646
  SCHEMES,
26477
26647
  normalize: normalize3,
26478
- resolve: resolve11,
26648
+ resolve: resolve12,
26479
26649
  resolveComponent,
26480
26650
  equal,
26481
26651
  serialize,
@@ -26491,6 +26661,7 @@ var require_fast_uri = __commonJS({
26491
26661
  var require_uri = __commonJS({
26492
26662
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js"(exports) {
26493
26663
  "use strict";
26664
+ init_define_WEB_FIRST_SEGMENTS();
26494
26665
  Object.defineProperty(exports, "__esModule", { value: true });
26495
26666
  var uri = require_fast_uri();
26496
26667
  uri.code = 'require("ajv/dist/runtime/uri").default';
@@ -26502,6 +26673,7 @@ var require_uri = __commonJS({
26502
26673
  var require_core = __commonJS({
26503
26674
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js"(exports) {
26504
26675
  "use strict";
26676
+ init_define_WEB_FIRST_SEGMENTS();
26505
26677
  Object.defineProperty(exports, "__esModule", { value: true });
26506
26678
  exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
26507
26679
  var validate_1 = require_validate();
@@ -27113,6 +27285,7 @@ var require_core = __commonJS({
27113
27285
  var require_id = __commonJS({
27114
27286
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports) {
27115
27287
  "use strict";
27288
+ init_define_WEB_FIRST_SEGMENTS();
27116
27289
  Object.defineProperty(exports, "__esModule", { value: true });
27117
27290
  var def = {
27118
27291
  keyword: "id",
@@ -27128,6 +27301,7 @@ var require_id = __commonJS({
27128
27301
  var require_ref = __commonJS({
27129
27302
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js"(exports) {
27130
27303
  "use strict";
27304
+ init_define_WEB_FIRST_SEGMENTS();
27131
27305
  Object.defineProperty(exports, "__esModule", { value: true });
27132
27306
  exports.callRef = exports.getValidate = void 0;
27133
27307
  var ref_error_1 = require_ref_error();
@@ -27250,6 +27424,7 @@ var require_ref = __commonJS({
27250
27424
  var require_core2 = __commonJS({
27251
27425
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports) {
27252
27426
  "use strict";
27427
+ init_define_WEB_FIRST_SEGMENTS();
27253
27428
  Object.defineProperty(exports, "__esModule", { value: true });
27254
27429
  var id_1 = require_id();
27255
27430
  var ref_1 = require_ref();
@@ -27271,6 +27446,7 @@ var require_core2 = __commonJS({
27271
27446
  var require_limitNumber = __commonJS({
27272
27447
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports) {
27273
27448
  "use strict";
27449
+ init_define_WEB_FIRST_SEGMENTS();
27274
27450
  Object.defineProperty(exports, "__esModule", { value: true });
27275
27451
  var codegen_1 = require_codegen();
27276
27452
  var ops = codegen_1.operators;
@@ -27303,6 +27479,7 @@ var require_limitNumber = __commonJS({
27303
27479
  var require_multipleOf = __commonJS({
27304
27480
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports) {
27305
27481
  "use strict";
27482
+ init_define_WEB_FIRST_SEGMENTS();
27306
27483
  Object.defineProperty(exports, "__esModule", { value: true });
27307
27484
  var codegen_1 = require_codegen();
27308
27485
  var error49 = {
@@ -27331,6 +27508,7 @@ var require_multipleOf = __commonJS({
27331
27508
  var require_ucs2length = __commonJS({
27332
27509
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports) {
27333
27510
  "use strict";
27511
+ init_define_WEB_FIRST_SEGMENTS();
27334
27512
  Object.defineProperty(exports, "__esModule", { value: true });
27335
27513
  function ucs2length(str) {
27336
27514
  const len = str.length;
@@ -27357,6 +27535,7 @@ var require_ucs2length = __commonJS({
27357
27535
  var require_limitLength = __commonJS({
27358
27536
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports) {
27359
27537
  "use strict";
27538
+ init_define_WEB_FIRST_SEGMENTS();
27360
27539
  Object.defineProperty(exports, "__esModule", { value: true });
27361
27540
  var codegen_1 = require_codegen();
27362
27541
  var util_1 = require_util();
@@ -27389,6 +27568,7 @@ var require_limitLength = __commonJS({
27389
27568
  var require_pattern = __commonJS({
27390
27569
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports) {
27391
27570
  "use strict";
27571
+ init_define_WEB_FIRST_SEGMENTS();
27392
27572
  Object.defineProperty(exports, "__esModule", { value: true });
27393
27573
  var code_1 = require_code2();
27394
27574
  var util_1 = require_util();
@@ -27426,6 +27606,7 @@ var require_pattern = __commonJS({
27426
27606
  var require_limitProperties = __commonJS({
27427
27607
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports) {
27428
27608
  "use strict";
27609
+ init_define_WEB_FIRST_SEGMENTS();
27429
27610
  Object.defineProperty(exports, "__esModule", { value: true });
27430
27611
  var codegen_1 = require_codegen();
27431
27612
  var error49 = {
@@ -27455,6 +27636,7 @@ var require_limitProperties = __commonJS({
27455
27636
  var require_required = __commonJS({
27456
27637
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports) {
27457
27638
  "use strict";
27639
+ init_define_WEB_FIRST_SEGMENTS();
27458
27640
  Object.defineProperty(exports, "__esModule", { value: true });
27459
27641
  var code_1 = require_code2();
27460
27642
  var codegen_1 = require_codegen();
@@ -27537,6 +27719,7 @@ var require_required = __commonJS({
27537
27719
  var require_limitItems = __commonJS({
27538
27720
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports) {
27539
27721
  "use strict";
27722
+ init_define_WEB_FIRST_SEGMENTS();
27540
27723
  Object.defineProperty(exports, "__esModule", { value: true });
27541
27724
  var codegen_1 = require_codegen();
27542
27725
  var error49 = {
@@ -27566,6 +27749,7 @@ var require_limitItems = __commonJS({
27566
27749
  var require_equal = __commonJS({
27567
27750
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js"(exports) {
27568
27751
  "use strict";
27752
+ init_define_WEB_FIRST_SEGMENTS();
27569
27753
  Object.defineProperty(exports, "__esModule", { value: true });
27570
27754
  var equal = require_fast_deep_equal();
27571
27755
  equal.code = 'require("ajv/dist/runtime/equal").default';
@@ -27577,6 +27761,7 @@ var require_equal = __commonJS({
27577
27761
  var require_uniqueItems = __commonJS({
27578
27762
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports) {
27579
27763
  "use strict";
27764
+ init_define_WEB_FIRST_SEGMENTS();
27580
27765
  Object.defineProperty(exports, "__esModule", { value: true });
27581
27766
  var dataType_1 = require_dataType();
27582
27767
  var codegen_1 = require_codegen();
@@ -27644,6 +27829,7 @@ var require_uniqueItems = __commonJS({
27644
27829
  var require_const = __commonJS({
27645
27830
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports) {
27646
27831
  "use strict";
27832
+ init_define_WEB_FIRST_SEGMENTS();
27647
27833
  Object.defineProperty(exports, "__esModule", { value: true });
27648
27834
  var codegen_1 = require_codegen();
27649
27835
  var util_1 = require_util();
@@ -27673,6 +27859,7 @@ var require_const = __commonJS({
27673
27859
  var require_enum = __commonJS({
27674
27860
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports) {
27675
27861
  "use strict";
27862
+ init_define_WEB_FIRST_SEGMENTS();
27676
27863
  Object.defineProperty(exports, "__esModule", { value: true });
27677
27864
  var codegen_1 = require_codegen();
27678
27865
  var util_1 = require_util();
@@ -27722,6 +27909,7 @@ var require_enum = __commonJS({
27722
27909
  var require_validation = __commonJS({
27723
27910
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports) {
27724
27911
  "use strict";
27912
+ init_define_WEB_FIRST_SEGMENTS();
27725
27913
  Object.defineProperty(exports, "__esModule", { value: true });
27726
27914
  var limitNumber_1 = require_limitNumber();
27727
27915
  var multipleOf_1 = require_multipleOf();
@@ -27760,6 +27948,7 @@ var require_validation = __commonJS({
27760
27948
  var require_additionalItems = __commonJS({
27761
27949
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports) {
27762
27950
  "use strict";
27951
+ init_define_WEB_FIRST_SEGMENTS();
27763
27952
  Object.defineProperty(exports, "__esModule", { value: true });
27764
27953
  exports.validateAdditionalItems = void 0;
27765
27954
  var codegen_1 = require_codegen();
@@ -27813,6 +28002,7 @@ var require_additionalItems = __commonJS({
27813
28002
  var require_items = __commonJS({
27814
28003
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports) {
27815
28004
  "use strict";
28005
+ init_define_WEB_FIRST_SEGMENTS();
27816
28006
  Object.defineProperty(exports, "__esModule", { value: true });
27817
28007
  exports.validateTuple = void 0;
27818
28008
  var codegen_1 = require_codegen();
@@ -27870,6 +28060,7 @@ var require_items = __commonJS({
27870
28060
  var require_prefixItems = __commonJS({
27871
28061
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports) {
27872
28062
  "use strict";
28063
+ init_define_WEB_FIRST_SEGMENTS();
27873
28064
  Object.defineProperty(exports, "__esModule", { value: true });
27874
28065
  var items_1 = require_items();
27875
28066
  var def = {
@@ -27887,6 +28078,7 @@ var require_prefixItems = __commonJS({
27887
28078
  var require_items2020 = __commonJS({
27888
28079
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports) {
27889
28080
  "use strict";
28081
+ init_define_WEB_FIRST_SEGMENTS();
27890
28082
  Object.defineProperty(exports, "__esModule", { value: true });
27891
28083
  var codegen_1 = require_codegen();
27892
28084
  var util_1 = require_util();
@@ -27922,6 +28114,7 @@ var require_items2020 = __commonJS({
27922
28114
  var require_contains = __commonJS({
27923
28115
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports) {
27924
28116
  "use strict";
28117
+ init_define_WEB_FIRST_SEGMENTS();
27925
28118
  Object.defineProperty(exports, "__esModule", { value: true });
27926
28119
  var codegen_1 = require_codegen();
27927
28120
  var util_1 = require_util();
@@ -28016,6 +28209,7 @@ var require_contains = __commonJS({
28016
28209
  var require_dependencies = __commonJS({
28017
28210
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports) {
28018
28211
  "use strict";
28212
+ init_define_WEB_FIRST_SEGMENTS();
28019
28213
  Object.defineProperty(exports, "__esModule", { value: true });
28020
28214
  exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;
28021
28215
  var codegen_1 = require_codegen();
@@ -28110,6 +28304,7 @@ var require_dependencies = __commonJS({
28110
28304
  var require_propertyNames = __commonJS({
28111
28305
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports) {
28112
28306
  "use strict";
28307
+ init_define_WEB_FIRST_SEGMENTS();
28113
28308
  Object.defineProperty(exports, "__esModule", { value: true });
28114
28309
  var codegen_1 = require_codegen();
28115
28310
  var util_1 = require_util();
@@ -28153,6 +28348,7 @@ var require_propertyNames = __commonJS({
28153
28348
  var require_additionalProperties = __commonJS({
28154
28349
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports) {
28155
28350
  "use strict";
28351
+ init_define_WEB_FIRST_SEGMENTS();
28156
28352
  Object.defineProperty(exports, "__esModule", { value: true });
28157
28353
  var code_1 = require_code2();
28158
28354
  var codegen_1 = require_codegen();
@@ -28259,6 +28455,7 @@ var require_additionalProperties = __commonJS({
28259
28455
  var require_properties = __commonJS({
28260
28456
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports) {
28261
28457
  "use strict";
28458
+ init_define_WEB_FIRST_SEGMENTS();
28262
28459
  Object.defineProperty(exports, "__esModule", { value: true });
28263
28460
  var validate_1 = require_validate();
28264
28461
  var code_1 = require_code2();
@@ -28317,6 +28514,7 @@ var require_properties = __commonJS({
28317
28514
  var require_patternProperties = __commonJS({
28318
28515
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports) {
28319
28516
  "use strict";
28517
+ init_define_WEB_FIRST_SEGMENTS();
28320
28518
  Object.defineProperty(exports, "__esModule", { value: true });
28321
28519
  var code_1 = require_code2();
28322
28520
  var codegen_1 = require_codegen();
@@ -28391,6 +28589,7 @@ var require_patternProperties = __commonJS({
28391
28589
  var require_not = __commonJS({
28392
28590
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports) {
28393
28591
  "use strict";
28592
+ init_define_WEB_FIRST_SEGMENTS();
28394
28593
  Object.defineProperty(exports, "__esModule", { value: true });
28395
28594
  var util_1 = require_util();
28396
28595
  var def = {
@@ -28422,6 +28621,7 @@ var require_not = __commonJS({
28422
28621
  var require_anyOf = __commonJS({
28423
28622
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports) {
28424
28623
  "use strict";
28624
+ init_define_WEB_FIRST_SEGMENTS();
28425
28625
  Object.defineProperty(exports, "__esModule", { value: true });
28426
28626
  var code_1 = require_code2();
28427
28627
  var def = {
@@ -28439,6 +28639,7 @@ var require_anyOf = __commonJS({
28439
28639
  var require_oneOf = __commonJS({
28440
28640
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports) {
28441
28641
  "use strict";
28642
+ init_define_WEB_FIRST_SEGMENTS();
28442
28643
  Object.defineProperty(exports, "__esModule", { value: true });
28443
28644
  var codegen_1 = require_codegen();
28444
28645
  var util_1 = require_util();
@@ -28497,6 +28698,7 @@ var require_oneOf = __commonJS({
28497
28698
  var require_allOf = __commonJS({
28498
28699
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports) {
28499
28700
  "use strict";
28701
+ init_define_WEB_FIRST_SEGMENTS();
28500
28702
  Object.defineProperty(exports, "__esModule", { value: true });
28501
28703
  var util_1 = require_util();
28502
28704
  var def = {
@@ -28524,6 +28726,7 @@ var require_allOf = __commonJS({
28524
28726
  var require_if = __commonJS({
28525
28727
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports) {
28526
28728
  "use strict";
28729
+ init_define_WEB_FIRST_SEGMENTS();
28527
28730
  Object.defineProperty(exports, "__esModule", { value: true });
28528
28731
  var codegen_1 = require_codegen();
28529
28732
  var util_1 = require_util();
@@ -28593,6 +28796,7 @@ var require_if = __commonJS({
28593
28796
  var require_thenElse = __commonJS({
28594
28797
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports) {
28595
28798
  "use strict";
28799
+ init_define_WEB_FIRST_SEGMENTS();
28596
28800
  Object.defineProperty(exports, "__esModule", { value: true });
28597
28801
  var util_1 = require_util();
28598
28802
  var def = {
@@ -28611,6 +28815,7 @@ var require_thenElse = __commonJS({
28611
28815
  var require_applicator = __commonJS({
28612
28816
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports) {
28613
28817
  "use strict";
28818
+ init_define_WEB_FIRST_SEGMENTS();
28614
28819
  Object.defineProperty(exports, "__esModule", { value: true });
28615
28820
  var additionalItems_1 = require_additionalItems();
28616
28821
  var prefixItems_1 = require_prefixItems();
@@ -28659,6 +28864,7 @@ var require_applicator = __commonJS({
28659
28864
  var require_format = __commonJS({
28660
28865
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports) {
28661
28866
  "use strict";
28867
+ init_define_WEB_FIRST_SEGMENTS();
28662
28868
  Object.defineProperty(exports, "__esModule", { value: true });
28663
28869
  var codegen_1 = require_codegen();
28664
28870
  var error49 = {
@@ -28749,6 +28955,7 @@ var require_format = __commonJS({
28749
28955
  var require_format2 = __commonJS({
28750
28956
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports) {
28751
28957
  "use strict";
28958
+ init_define_WEB_FIRST_SEGMENTS();
28752
28959
  Object.defineProperty(exports, "__esModule", { value: true });
28753
28960
  var format_1 = require_format();
28754
28961
  var format3 = [format_1.default];
@@ -28760,6 +28967,7 @@ var require_format2 = __commonJS({
28760
28967
  var require_metadata = __commonJS({
28761
28968
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports) {
28762
28969
  "use strict";
28970
+ init_define_WEB_FIRST_SEGMENTS();
28763
28971
  Object.defineProperty(exports, "__esModule", { value: true });
28764
28972
  exports.contentVocabulary = exports.metadataVocabulary = void 0;
28765
28973
  exports.metadataVocabulary = [
@@ -28783,6 +28991,7 @@ var require_metadata = __commonJS({
28783
28991
  var require_draft7 = __commonJS({
28784
28992
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports) {
28785
28993
  "use strict";
28994
+ init_define_WEB_FIRST_SEGMENTS();
28786
28995
  Object.defineProperty(exports, "__esModule", { value: true });
28787
28996
  var core_1 = require_core2();
28788
28997
  var validation_1 = require_validation();
@@ -28805,6 +29014,7 @@ var require_draft7 = __commonJS({
28805
29014
  var require_types = __commonJS({
28806
29015
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports) {
28807
29016
  "use strict";
29017
+ init_define_WEB_FIRST_SEGMENTS();
28808
29018
  Object.defineProperty(exports, "__esModule", { value: true });
28809
29019
  exports.DiscrError = void 0;
28810
29020
  var DiscrError;
@@ -28819,6 +29029,7 @@ var require_types = __commonJS({
28819
29029
  var require_discriminator = __commonJS({
28820
29030
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports) {
28821
29031
  "use strict";
29032
+ init_define_WEB_FIRST_SEGMENTS();
28822
29033
  Object.defineProperty(exports, "__esModule", { value: true });
28823
29034
  var codegen_1 = require_codegen();
28824
29035
  var types_1 = require_types();
@@ -29081,6 +29292,7 @@ var require_json_schema_draft_07 = __commonJS({
29081
29292
  var require_ajv = __commonJS({
29082
29293
  "node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js"(exports, module) {
29083
29294
  "use strict";
29295
+ init_define_WEB_FIRST_SEGMENTS();
29084
29296
  Object.defineProperty(exports, "__esModule", { value: true });
29085
29297
  exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;
29086
29298
  var core_1 = require_core();
@@ -29151,6 +29363,7 @@ var require_ajv = __commonJS({
29151
29363
  var require_formats = __commonJS({
29152
29364
  "node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js"(exports) {
29153
29365
  "use strict";
29366
+ init_define_WEB_FIRST_SEGMENTS();
29154
29367
  Object.defineProperty(exports, "__esModule", { value: true });
29155
29368
  exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
29156
29369
  function fmtDef(validate2, compare) {
@@ -29354,6 +29567,7 @@ var require_formats = __commonJS({
29354
29567
  var require_limit = __commonJS({
29355
29568
  "node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js"(exports) {
29356
29569
  "use strict";
29570
+ init_define_WEB_FIRST_SEGMENTS();
29357
29571
  Object.defineProperty(exports, "__esModule", { value: true });
29358
29572
  exports.formatLimitDefinition = void 0;
29359
29573
  var ajv_1 = require_ajv();
@@ -29426,6 +29640,7 @@ var require_limit = __commonJS({
29426
29640
  var require_dist = __commonJS({
29427
29641
  "node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js"(exports, module) {
29428
29642
  "use strict";
29643
+ init_define_WEB_FIRST_SEGMENTS();
29429
29644
  Object.defineProperty(exports, "__esModule", { value: true });
29430
29645
  var formats_1 = require_formats();
29431
29646
  var limit_1 = require_limit();
@@ -29479,6 +29694,7 @@ function createDefaultAjvInstance() {
29479
29694
  var import_ajv, import_ajv_formats, AjvJsonSchemaValidator;
29480
29695
  var init_ajv_provider = __esm({
29481
29696
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js"() {
29697
+ init_define_WEB_FIRST_SEGMENTS();
29482
29698
  import_ajv = __toESM(require_ajv(), 1);
29483
29699
  import_ajv_formats = __toESM(require_dist(), 1);
29484
29700
  AjvJsonSchemaValidator = class {
@@ -29541,6 +29757,7 @@ var init_ajv_provider = __esm({
29541
29757
  var ExperimentalServerTasks;
29542
29758
  var init_server = __esm({
29543
29759
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js"() {
29760
+ init_define_WEB_FIRST_SEGMENTS();
29544
29761
  init_types2();
29545
29762
  ExperimentalServerTasks = class {
29546
29763
  constructor(_server) {
@@ -29792,6 +30009,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
29792
30009
  }
29793
30010
  var init_helpers = __esm({
29794
30011
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js"() {
30012
+ init_define_WEB_FIRST_SEGMENTS();
29795
30013
  }
29796
30014
  });
29797
30015
 
@@ -29799,6 +30017,7 @@ var init_helpers = __esm({
29799
30017
  var Server;
29800
30018
  var init_server2 = __esm({
29801
30019
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js"() {
30020
+ init_define_WEB_FIRST_SEGMENTS();
29802
30021
  init_protocol();
29803
30022
  init_types2();
29804
30023
  init_ajv_provider();
@@ -30197,6 +30416,7 @@ function getCompleter(schema) {
30197
30416
  var COMPLETABLE_SYMBOL, McpZodTypeKind;
30198
30417
  var init_completable = __esm({
30199
30418
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js"() {
30419
+ init_define_WEB_FIRST_SEGMENTS();
30200
30420
  COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
30201
30421
  (function(McpZodTypeKind2) {
30202
30422
  McpZodTypeKind2["Completable"] = "McpCompletable";
@@ -30207,6 +30427,7 @@ var init_completable = __esm({
30207
30427
  // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js
30208
30428
  var init_uriTemplate = __esm({
30209
30429
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js"() {
30430
+ init_define_WEB_FIRST_SEGMENTS();
30210
30431
  }
30211
30432
  });
30212
30433
 
@@ -30269,6 +30490,7 @@ function validateAndWarnToolName(name) {
30269
30490
  var TOOL_NAME_REGEX;
30270
30491
  var init_toolNameValidation = __esm({
30271
30492
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js"() {
30493
+ init_define_WEB_FIRST_SEGMENTS();
30272
30494
  TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
30273
30495
  }
30274
30496
  });
@@ -30277,6 +30499,7 @@ var init_toolNameValidation = __esm({
30277
30499
  var ExperimentalMcpServerTasks;
30278
30500
  var init_mcp_server = __esm({
30279
30501
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js"() {
30502
+ init_define_WEB_FIRST_SEGMENTS();
30280
30503
  ExperimentalMcpServerTasks = class {
30281
30504
  constructor(_mcpServer) {
30282
30505
  this._mcpServer = _mcpServer;
@@ -30296,6 +30519,7 @@ var init_mcp_server = __esm({
30296
30519
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
30297
30520
  var init_zod = __esm({
30298
30521
  "node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js"() {
30522
+ init_define_WEB_FIRST_SEGMENTS();
30299
30523
  init_external3();
30300
30524
  init_external3();
30301
30525
  }
@@ -30370,6 +30594,7 @@ function createCompletionResult(suggestions) {
30370
30594
  var McpServer, EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT;
30371
30595
  var init_mcp = __esm({
30372
30596
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js"() {
30597
+ init_define_WEB_FIRST_SEGMENTS();
30373
30598
  init_server2();
30374
30599
  init_zod_compat();
30375
30600
  init_zod_json_schema_compat();
@@ -30602,7 +30827,7 @@ var init_mcp = __esm({
30602
30827
  let task = createTaskResult.task;
30603
30828
  const pollInterval = task.pollInterval ?? 5e3;
30604
30829
  while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
30605
- await new Promise((resolve11) => setTimeout(resolve11, pollInterval));
30830
+ await new Promise((resolve12) => setTimeout(resolve12, pollInterval));
30606
30831
  const updatedTask = await extra.taskStore.getTask(taskId);
30607
30832
  if (!updatedTask) {
30608
30833
  throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
@@ -31117,6 +31342,7 @@ function serializeMessage(message) {
31117
31342
  var ReadBuffer;
31118
31343
  var init_stdio = __esm({
31119
31344
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js"() {
31345
+ init_define_WEB_FIRST_SEGMENTS();
31120
31346
  init_types2();
31121
31347
  ReadBuffer = class {
31122
31348
  append(chunk) {
@@ -31146,6 +31372,7 @@ import process3 from "node:process";
31146
31372
  var StdioServerTransport;
31147
31373
  var init_stdio2 = __esm({
31148
31374
  "node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js"() {
31375
+ init_define_WEB_FIRST_SEGMENTS();
31149
31376
  init_stdio();
31150
31377
  StdioServerTransport = class {
31151
31378
  constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
@@ -31196,12 +31423,12 @@ var init_stdio2 = __esm({
31196
31423
  this.onclose?.();
31197
31424
  }
31198
31425
  send(message) {
31199
- return new Promise((resolve11) => {
31426
+ return new Promise((resolve12) => {
31200
31427
  const json2 = serializeMessage(message);
31201
31428
  if (this._stdout.write(json2)) {
31202
- resolve11();
31429
+ resolve12();
31203
31430
  } else {
31204
- this._stdout.once("drain", resolve11);
31431
+ this._stdout.once("drain", resolve12);
31205
31432
  }
31206
31433
  });
31207
31434
  }
@@ -31318,6 +31545,7 @@ function es(n7, t2 = {}) {
31318
31545
  var Gt, ce, ss, fe, ue, qt, de, pe, is, rs, ns, os, hs, as, ls, cs, fs, us, ds, at, Ss, lt, Es, we, ye, W, xs, be, vs, Ct, Cs, Ts, As, ks, Kt, Se, Ee, Q, tt, O, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce, Te, Ae, xe, qs, A, Ks, Vs, Ys, Xs, Js, N, Zs, ke, Qs, ti, ve, ei, D, si, Oe, Vt, Fe, At, Re, ii, q, De, Tt, ri, ft, Ne, oi, hi, ai, G, H, K, kt, ut, Rt, _e, Ot, Le, P, et, v, dt, st, C, F, T, Yt, Ft, k, x, Xt, Jt, We, Zt, B, Qt, Dt, pt, Y, M, mt, li, ci, fi, ui, Mt, te, di, pi, V, vi, wt, Ue, $e, Ri, Oi, L, Ge, He, U, qe, Ke, X, Ve, _, gt, se, je, yt, j, Nt, Lt, Ie, Fi, ie, ze, bt, Be, _t, Wt, ne, Ye, R, Pt, jt, It, it, rt, St, Cr, Xe, Di, Mi, Ni, nt, _i, ot, oe, he, ae, Et, Li, zt, xt, vt, Pi, I, le, ji, Ii, zi, Bi, Ui, Ze;
31319
31546
  var init_index_min = __esm({
31320
31547
  "node_modules/.pnpm/glob@13.0.6/node_modules/glob/dist/esm/index.min.js"() {
31548
+ init_define_WEB_FIRST_SEGMENTS();
31321
31549
  Gt = (n7, t2, e) => {
31322
31550
  let s = n7 instanceof RegExp ? ce(n7, e) : n7, i2 = t2 instanceof RegExp ? ce(t2, e) : t2, r2 = s !== null && i2 != null && ss(s, i2, e);
31323
31551
  return r2 && { start: r2[0], end: r2[1], pre: e.slice(0, r2[0]), body: e.slice(r2[0] + s.length, r2[1]), post: e.slice(r2[1] + i2.length) };
@@ -34287,6 +34515,7 @@ var pkgJsonCache, IGNORED_DIRS;
34287
34515
  var init_fs = __esm({
34288
34516
  "src/utils/fs.ts"() {
34289
34517
  "use strict";
34518
+ init_define_WEB_FIRST_SEGMENTS();
34290
34519
  pkgJsonCache = null;
34291
34520
  IGNORED_DIRS = /* @__PURE__ */ new Set([
34292
34521
  "node_modules",
@@ -34316,11 +34545,11 @@ async function scanForContextFiles(projectRoot, options = {}) {
34316
34545
  try {
34317
34546
  const entries = fs3.readdirSync(dir, { withFileTypes: true });
34318
34547
  for (const entry of entries) {
34319
- if (entry.isDirectory() && !IGNORED_DIRS2.has(entry.name) && !entry.name.startsWith(".")) {
34320
- const fullPath = path2.join(dir, entry.name);
34321
- dirsToScan.push(fullPath);
34322
- collectDirs(fullPath, currentDepth + 1);
34323
- }
34548
+ if (!entry.isDirectory() || IGNORED_DIRS2.has(entry.name)) continue;
34549
+ if (entry.name.startsWith(".") && !ALLOWED_DOT_DIRS.has(entry.name)) continue;
34550
+ const fullPath = path2.join(dir, entry.name);
34551
+ dirsToScan.push(fullPath);
34552
+ collectDirs(fullPath, currentDepth + 1);
34324
34553
  }
34325
34554
  } catch {
34326
34555
  }
@@ -34453,7 +34682,7 @@ async function scanGlobalMcpConfigs() {
34453
34682
  continue;
34454
34683
  }
34455
34684
  const isGeneralClaudeFile = normalized.endsWith(`${path2.sep}.claude.json`) || normalized.endsWith(`${path2.sep}.claude${path2.sep}settings.json`);
34456
- if (isGeneralClaudeFile && !mcpFileHasMcpKey(normalized)) continue;
34685
+ if (isGeneralClaudeFile && !await mcpFileHasMcpKey(normalized)) continue;
34457
34686
  const symlink = isSymlink(normalized);
34458
34687
  const target = symlink ? readSymlinkTarget(normalized) : void 0;
34459
34688
  found.push({
@@ -34466,18 +34695,26 @@ async function scanGlobalMcpConfigs() {
34466
34695
  }
34467
34696
  return found.sort((a, b2) => a.relativePath.localeCompare(b2.relativePath));
34468
34697
  }
34469
- function mcpFileHasMcpKey(filePath) {
34698
+ async function mcpFileHasMcpKey(filePath) {
34699
+ let fd;
34470
34700
  try {
34471
- const content = fs3.readFileSync(filePath, "utf8");
34472
- return /"(mcpServers|servers)"\s*:/.test(content);
34701
+ fd = await fs3.promises.open(filePath, "r");
34702
+ const buf = Buffer.alloc(PREFIX_BYTES);
34703
+ const { bytesRead } = await fd.read(buf, 0, PREFIX_BYTES, 0);
34704
+ const prefix = buf.subarray(0, bytesRead).toString("utf8");
34705
+ return /"(mcpServers|servers)"\s*:/.test(prefix);
34473
34706
  } catch {
34474
34707
  return false;
34708
+ } finally {
34709
+ await fd?.close().catch(() => {
34710
+ });
34475
34711
  }
34476
34712
  }
34477
- var CONTEXT_FILE_PATTERNS, IGNORED_DIRS2, MCP_CONFIG_PATTERNS, MCPH_CONFIG_PATTERNS;
34713
+ var CONTEXT_FILE_PATTERNS, IGNORED_DIRS2, ALLOWED_DOT_DIRS, MCP_CONFIG_PATTERNS, MCPH_CONFIG_PATTERNS, PREFIX_BYTES;
34478
34714
  var init_scanner = __esm({
34479
34715
  "src/core/scanner.ts"() {
34480
34716
  "use strict";
34717
+ init_define_WEB_FIRST_SEGMENTS();
34481
34718
  init_index_min();
34482
34719
  init_fs();
34483
34720
  CONTEXT_FILE_PATTERNS = [
@@ -34529,6 +34766,20 @@ var init_scanner = __esm({
34529
34766
  "replit.md"
34530
34767
  ];
34531
34768
  IGNORED_DIRS2 = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "build", "vendor"]);
34769
+ ALLOWED_DOT_DIRS = /* @__PURE__ */ new Set([
34770
+ ".claude",
34771
+ ".cursor",
34772
+ ".github",
34773
+ ".windsurf",
34774
+ ".clinerules",
34775
+ ".aide",
34776
+ ".amazonq",
34777
+ ".goose",
34778
+ ".junie",
34779
+ ".aiassistant",
34780
+ ".continue",
34781
+ ".vscode"
34782
+ ]);
34532
34783
  MCP_CONFIG_PATTERNS = [
34533
34784
  ".mcp.json",
34534
34785
  ".cursor/mcp.json",
@@ -34537,6 +34788,7 @@ var init_scanner = __esm({
34537
34788
  ".continue/mcpServers/*.json"
34538
34789
  ];
34539
34790
  MCPH_CONFIG_PATTERNS = [".mcph.json", ".mcph.local.json"];
34791
+ PREFIX_BYTES = 8192;
34540
34792
  }
34541
34793
  });
34542
34794
 
@@ -34585,6 +34837,7 @@ var encodingForModel, loadAttempted, encoder, _keepAlive;
34585
34837
  var init_tokens = __esm({
34586
34838
  "src/utils/tokens.ts"() {
34587
34839
  "use strict";
34840
+ init_define_WEB_FIRST_SEGMENTS();
34588
34841
  encodingForModel = null;
34589
34842
  loadAttempted = false;
34590
34843
  encoder = null;
@@ -34791,6 +35044,7 @@ var PATH_PATTERN, PATH_EXCLUDE, COMMAND_PREFIXES, COMMON_COMMANDS;
34791
35044
  var init_parser = __esm({
34792
35045
  "src/core/parser.ts"() {
34793
35046
  "use strict";
35047
+ init_define_WEB_FIRST_SEGMENTS();
34794
35048
  init_fs();
34795
35049
  init_tokens();
34796
35050
  PATH_PATTERN = /(?:^|[\s`"'(])((\.{0,2}\/)?(?:[\w@.-]+\/)+[\w.*-]*(?:\.\w+)?)(?=[\s`"'),;:]|$)/gm;
@@ -34803,6 +35057,7 @@ var init_parser = __esm({
34803
35057
  // node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
34804
35058
  var require_ms = __commonJS({
34805
35059
  "node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module) {
35060
+ init_define_WEB_FIRST_SEGMENTS();
34806
35061
  var s = 1e3;
34807
35062
  var m = s * 60;
34808
35063
  var h2 = m * 60;
@@ -34919,6 +35174,7 @@ var require_ms = __commonJS({
34919
35174
  // node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
34920
35175
  var require_common = __commonJS({
34921
35176
  "node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
35177
+ init_define_WEB_FIRST_SEGMENTS();
34922
35178
  function setup(env2) {
34923
35179
  createDebug.debug = createDebug;
34924
35180
  createDebug.default = createDebug;
@@ -35096,6 +35352,7 @@ var require_common = __commonJS({
35096
35352
  // node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
35097
35353
  var require_browser = __commonJS({
35098
35354
  "node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
35355
+ init_define_WEB_FIRST_SEGMENTS();
35099
35356
  exports.formatArgs = formatArgs;
35100
35357
  exports.save = save;
35101
35358
  exports.load = load2;
@@ -35267,6 +35524,7 @@ var require_browser = __commonJS({
35267
35524
  var require_has_flag = __commonJS({
35268
35525
  "node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
35269
35526
  "use strict";
35527
+ init_define_WEB_FIRST_SEGMENTS();
35270
35528
  module.exports = (flag, argv = process.argv) => {
35271
35529
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
35272
35530
  const position = argv.indexOf(prefix + flag);
@@ -35280,6 +35538,7 @@ var require_has_flag = __commonJS({
35280
35538
  var require_supports_color = __commonJS({
35281
35539
  "node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
35282
35540
  "use strict";
35541
+ init_define_WEB_FIRST_SEGMENTS();
35283
35542
  var os3 = __require("os");
35284
35543
  var tty3 = __require("tty");
35285
35544
  var hasFlag2 = require_has_flag();
@@ -35381,6 +35640,7 @@ var require_supports_color = __commonJS({
35381
35640
  // node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
35382
35641
  var require_node = __commonJS({
35383
35642
  "node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
35643
+ init_define_WEB_FIRST_SEGMENTS();
35384
35644
  var tty3 = __require("tty");
35385
35645
  var util2 = __require("util");
35386
35646
  exports.init = init;
@@ -35555,6 +35815,7 @@ var require_node = __commonJS({
35555
35815
  // node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
35556
35816
  var require_src = __commonJS({
35557
35817
  "node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
35818
+ init_define_WEB_FIRST_SEGMENTS();
35558
35819
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
35559
35820
  module.exports = require_browser();
35560
35821
  } else {
@@ -35567,6 +35828,7 @@ var require_src = __commonJS({
35567
35828
  var require_src2 = __commonJS({
35568
35829
  "node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.js"(exports) {
35569
35830
  "use strict";
35831
+ init_define_WEB_FIRST_SEGMENTS();
35570
35832
  var __importDefault = exports && exports.__importDefault || function(mod) {
35571
35833
  return mod && mod.__esModule ? mod : { "default": mod };
35572
35834
  };
@@ -35574,10 +35836,10 @@ var require_src2 = __commonJS({
35574
35836
  var fs_1 = __require("fs");
35575
35837
  var debug_1 = __importDefault(require_src());
35576
35838
  var log = debug_1.default("@kwsites/file-exists");
35577
- function check2(path13, isFile, isDirectory2) {
35578
- log(`checking %s`, path13);
35839
+ function check2(path14, isFile, isDirectory2) {
35840
+ log(`checking %s`, path14);
35579
35841
  try {
35580
- const stat3 = fs_1.statSync(path13);
35842
+ const stat3 = fs_1.statSync(path14);
35581
35843
  if (stat3.isFile() && isFile) {
35582
35844
  log(`[OK] path represents a file`);
35583
35845
  return true;
@@ -35597,8 +35859,8 @@ var require_src2 = __commonJS({
35597
35859
  throw e;
35598
35860
  }
35599
35861
  }
35600
- function exists2(path13, type = exports.READABLE) {
35601
- return check2(path13, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
35862
+ function exists2(path14, type = exports.READABLE) {
35863
+ return check2(path14, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
35602
35864
  }
35603
35865
  exports.exists = exists2;
35604
35866
  exports.FILE = 1;
@@ -35611,6 +35873,7 @@ var require_src2 = __commonJS({
35611
35873
  var require_dist2 = __commonJS({
35612
35874
  "node_modules/.pnpm/@kwsites+file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.js"(exports) {
35613
35875
  "use strict";
35876
+ init_define_WEB_FIRST_SEGMENTS();
35614
35877
  function __export3(m) {
35615
35878
  for (var p2 in m) if (!exports.hasOwnProperty(p2)) exports[p2] = m[p2];
35616
35879
  }
@@ -35633,6 +35896,7 @@ function o(n7) {
35633
35896
  var t;
35634
35897
  var init_dist = __esm({
35635
35898
  "node_modules/.pnpm/@simple-git+args-pathspec@1.0.3/node_modules/@simple-git/args-pathspec/dist/index.mjs"() {
35899
+ init_define_WEB_FIRST_SEGMENTS();
35636
35900
  t = /* @__PURE__ */ new WeakMap();
35637
35901
  }
35638
35902
  });
@@ -35641,6 +35905,7 @@ var init_dist = __esm({
35641
35905
  var require_dist3 = __commonJS({
35642
35906
  "node_modules/.pnpm/@kwsites+promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.js"(exports) {
35643
35907
  "use strict";
35908
+ init_define_WEB_FIRST_SEGMENTS();
35644
35909
  Object.defineProperty(exports, "__esModule", { value: true });
35645
35910
  exports.createDeferred = exports.deferred = void 0;
35646
35911
  function deferred2() {
@@ -35958,6 +36223,7 @@ function te2(e, t2) {
35958
36223
  var y, S, P2, E, x2, L2, R2, T2, q2, H2, _2;
35959
36224
  var init_dist2 = __esm({
35960
36225
  "node_modules/.pnpm/@simple-git+argv-parser@1.1.0/node_modules/@simple-git/argv-parser/dist/index.mjs"() {
36226
+ init_define_WEB_FIRST_SEGMENTS();
35961
36227
  init_dist();
35962
36228
  y = /* @__PURE__ */ new Set([
35963
36229
  "--add",
@@ -36187,8 +36453,8 @@ function toLinesWithContent(input = "", trimmed2 = true, separator = "\n") {
36187
36453
  function forEachLineWithContent(input, callback) {
36188
36454
  return toLinesWithContent(input, true).map((line) => callback(line));
36189
36455
  }
36190
- function folderExists(path13) {
36191
- return (0, import_file_exists.exists)(path13, import_file_exists.FOLDER);
36456
+ function folderExists(path14) {
36457
+ return (0, import_file_exists.exists)(path14, import_file_exists.FOLDER);
36192
36458
  }
36193
36459
  function append(target, item) {
36194
36460
  if (Array.isArray(target)) {
@@ -36379,8 +36645,8 @@ function checkIsRepoRootTask() {
36379
36645
  commands,
36380
36646
  format: "utf-8",
36381
36647
  onError,
36382
- parser(path13) {
36383
- return /^\.(git)?$/.test(path13.trim());
36648
+ parser(path14) {
36649
+ return /^\.(git)?$/.test(path14.trim());
36384
36650
  }
36385
36651
  };
36386
36652
  }
@@ -36636,11 +36902,11 @@ function parseGrep(grep) {
36636
36902
  const paths = /* @__PURE__ */ new Set();
36637
36903
  const results = {};
36638
36904
  forEachLineWithContent(grep, (input) => {
36639
- const [path13, line, preview] = input.split(NULL);
36640
- paths.add(path13);
36641
- (results[path13] = results[path13] || []).push({
36905
+ const [path14, line, preview] = input.split(NULL);
36906
+ paths.add(path14);
36907
+ (results[path14] = results[path14] || []).push({
36642
36908
  line: asNumber(line),
36643
- path: path13,
36909
+ path: path14,
36644
36910
  preview
36645
36911
  });
36646
36912
  });
@@ -36937,14 +37203,14 @@ function hashObjectTask(filePath, write) {
36937
37203
  }
36938
37204
  return straightThroughStringTask(commands, true);
36939
37205
  }
36940
- function parseInit(bare, path13, text) {
37206
+ function parseInit(bare, path14, text) {
36941
37207
  const response = String(text).trim();
36942
37208
  let result;
36943
37209
  if (result = initResponseRegex.exec(response)) {
36944
- return new InitSummary(bare, path13, false, result[1]);
37210
+ return new InitSummary(bare, path14, false, result[1]);
36945
37211
  }
36946
37212
  if (result = reInitResponseRegex.exec(response)) {
36947
- return new InitSummary(bare, path13, true, result[1]);
37213
+ return new InitSummary(bare, path14, true, result[1]);
36948
37214
  }
36949
37215
  let gitDir = "";
36950
37216
  const tokens = response.split(" ");
@@ -36955,12 +37221,12 @@ function parseInit(bare, path13, text) {
36955
37221
  break;
36956
37222
  }
36957
37223
  }
36958
- return new InitSummary(bare, path13, /^re/i.test(response), gitDir);
37224
+ return new InitSummary(bare, path14, /^re/i.test(response), gitDir);
36959
37225
  }
36960
37226
  function hasBareCommand(command) {
36961
37227
  return command.includes(bareCommand);
36962
37228
  }
36963
- function initTask(bare = false, path13, customArgs) {
37229
+ function initTask(bare = false, path14, customArgs) {
36964
37230
  const commands = ["init", ...customArgs];
36965
37231
  if (bare && !hasBareCommand(commands)) {
36966
37232
  commands.splice(1, 0, bareCommand);
@@ -36969,7 +37235,7 @@ function initTask(bare = false, path13, customArgs) {
36969
37235
  commands,
36970
37236
  format: "utf-8",
36971
37237
  parser(text) {
36972
- return parseInit(commands.includes("--bare"), path13, text);
37238
+ return parseInit(commands.includes("--bare"), path14, text);
36973
37239
  }
36974
37240
  };
36975
37241
  }
@@ -37248,14 +37514,14 @@ function splitLine(result, lineStr) {
37248
37514
  default:
37249
37515
  return;
37250
37516
  }
37251
- function data(index, workingDir, path13) {
37517
+ function data(index, workingDir, path14) {
37252
37518
  const raw = `${index}${workingDir}`;
37253
37519
  const handler = parsers6.get(raw);
37254
37520
  if (handler) {
37255
- handler(result, path13);
37521
+ handler(result, path14);
37256
37522
  }
37257
37523
  if (raw !== "##" && raw !== "!!") {
37258
- result.files.push(new FileStatusSummary(path13, index, workingDir));
37524
+ result.files.push(new FileStatusSummary(path14, index, workingDir));
37259
37525
  }
37260
37526
  }
37261
37527
  }
@@ -37442,8 +37708,8 @@ function deleteBranchTask(branch, forceDelete = false) {
37442
37708
  return task;
37443
37709
  }
37444
37710
  function toPath(input) {
37445
- const path13 = input.trim().replace(/^["']|["']$/g, "");
37446
- return path13 && normalize2(path13);
37711
+ const path14 = input.trim().replace(/^["']|["']$/g, "");
37712
+ return path14 && normalize2(path14);
37447
37713
  }
37448
37714
  function checkIgnoreTask(paths) {
37449
37715
  return {
@@ -37582,8 +37848,8 @@ function stashListTask(opt = {}, customArgs) {
37582
37848
  parser: parser4
37583
37849
  };
37584
37850
  }
37585
- function addSubModuleTask(repo, path13) {
37586
- return subModuleTask(["add", repo, path13]);
37851
+ function addSubModuleTask(repo, path14) {
37852
+ return subModuleTask(["add", repo, path14]);
37587
37853
  }
37588
37854
  function initSubModuleTask(customArgs) {
37589
37855
  return subModuleTask(["init", ...customArgs]);
@@ -37957,6 +38223,7 @@ function gitInstanceFactory(baseDir, options) {
37957
38223
  var import_file_exists, import_debug, import_promise_deferred, import_promise_deferred2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL, NOOP, objectToString, init_util3, filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions2, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a2, GrepQuery, init_grep, reset_exports, ResetMode, validResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status, NOT_INSTALLED, parsers7, init_version, cloneTask, cloneMirrorTask, init_clone, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, currentBranchParser, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, parsers10, init_parse_fetch, fetch_exports, init_fetch, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, never2, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, simpleGit, esm_default;
37958
38224
  var init_esm2 = __esm({
37959
38225
  "node_modules/.pnpm/simple-git@3.36.0/node_modules/simple-git/dist/esm/index.js"() {
38226
+ init_define_WEB_FIRST_SEGMENTS();
37960
38227
  import_file_exists = __toESM(require_dist2(), 1);
37961
38228
  init_dist();
37962
38229
  init_dist();
@@ -38845,9 +39112,9 @@ var init_esm2 = __esm({
38845
39112
  "src/lib/responses/InitSummary.ts"() {
38846
39113
  "use strict";
38847
39114
  InitSummary = class {
38848
- constructor(bare, path13, existing, gitDir) {
39115
+ constructor(bare, path14, existing, gitDir) {
38849
39116
  this.bare = bare;
38850
- this.path = path13;
39117
+ this.path = path14;
38851
39118
  this.existing = existing;
38852
39119
  this.gitDir = gitDir;
38853
39120
  }
@@ -39380,12 +39647,12 @@ var init_esm2 = __esm({
39380
39647
  "use strict";
39381
39648
  fromPathRegex = /^(.+)\0(.+)$/;
39382
39649
  FileStatusSummary = class {
39383
- constructor(path13, index, working_dir) {
39384
- this.path = path13;
39650
+ constructor(path14, index, working_dir) {
39651
+ this.path = path14;
39385
39652
  this.index = index;
39386
39653
  this.working_dir = working_dir;
39387
39654
  if (index === "R" || working_dir === "R") {
39388
- const detail = fromPathRegex.exec(path13) || [null, path13, path13];
39655
+ const detail = fromPathRegex.exec(path14) || [null, path14, path14];
39389
39656
  this.from = detail[2] || "";
39390
39657
  this.path = detail[1] || "";
39391
39658
  }
@@ -39647,9 +39914,9 @@ var init_esm2 = __esm({
39647
39914
  next
39648
39915
  );
39649
39916
  }
39650
- hashObject(path13, write) {
39917
+ hashObject(path14, write) {
39651
39918
  return this._runTask(
39652
- hashObjectTask(path13, write === true),
39919
+ hashObjectTask(path14, write === true),
39653
39920
  trailingFunctionArgument(arguments)
39654
39921
  );
39655
39922
  }
@@ -40286,8 +40553,8 @@ var init_esm2 = __esm({
40286
40553
  }
40287
40554
  return this._runTask(straightThroughStringTask2(command, this._trimmed), next);
40288
40555
  };
40289
- Git2.prototype.submoduleAdd = function(repo, path13, then) {
40290
- return this._runTask(addSubModuleTask2(repo, path13), trailingFunctionArgument2(arguments));
40556
+ Git2.prototype.submoduleAdd = function(repo, path14, then) {
40557
+ return this._runTask(addSubModuleTask2(repo, path14), trailingFunctionArgument2(arguments));
40291
40558
  };
40292
40559
  Git2.prototype.submoduleUpdate = function(args2, then) {
40293
40560
  return this._runTask(
@@ -40532,6 +40799,19 @@ var init_esm2 = __esm({
40532
40799
  });
40533
40800
 
40534
40801
  // src/utils/git.ts
40802
+ import * as path3 from "node:path";
40803
+ function normalizePath(p2, projectRoot) {
40804
+ let cleaned = p2.replace(/\\/g, "/");
40805
+ if (projectRoot && path3.isAbsolute(p2)) {
40806
+ const rel = path3.relative(projectRoot, p2).replace(/\\/g, "/");
40807
+ if (rel && !rel.startsWith("..")) {
40808
+ cleaned = rel;
40809
+ } else {
40810
+ cleaned = cleaned.replace(/^[A-Za-z]:/, "");
40811
+ }
40812
+ }
40813
+ return path3.posix.normalize(cleaned);
40814
+ }
40535
40815
  function getGit(projectRoot) {
40536
40816
  if (!gitInstance || gitProjectRoot !== projectRoot) {
40537
40817
  gitInstance = esm_default(projectRoot);
@@ -40565,9 +40845,16 @@ async function getFileLastModified(projectRoot, filePath) {
40565
40845
  }
40566
40846
  }
40567
40847
  async function getCommitsSinceBatch(projectRoot, paths, since) {
40848
+ const out = /* @__PURE__ */ new Map();
40849
+ for (const p2 of paths) out.set(p2, 0);
40850
+ if (paths.length === 0) return out;
40568
40851
  const counts = /* @__PURE__ */ new Map();
40569
- for (const p2 of paths) counts.set(p2, 0);
40570
- if (paths.length === 0) return counts;
40852
+ const originalToNormalized = /* @__PURE__ */ new Map();
40853
+ for (const p2 of paths) {
40854
+ const n7 = normalizePath(p2, projectRoot);
40855
+ originalToNormalized.set(p2, n7);
40856
+ if (!counts.has(n7)) counts.set(n7, 0);
40857
+ }
40571
40858
  try {
40572
40859
  const git = getGit(projectRoot);
40573
40860
  const SENTINEL = "___CTXLINT_COMMIT___";
@@ -40580,8 +40867,7 @@ async function getCommitsSinceBatch(projectRoot, paths, since) {
40580
40867
  // format ("fatal: invalid --pretty format: ___CTXLINT_COMMIT___").
40581
40868
  `--format=%n${SENTINEL}`
40582
40869
  ]);
40583
- const normalize3 = (p2) => p2.replace(/\\/g, "/");
40584
- const requested = new Set(paths.map(normalize3));
40870
+ const requested = new Set(counts.keys());
40585
40871
  const lines = raw.split("\n");
40586
40872
  let inCommit = false;
40587
40873
  const seenThisCommit = /* @__PURE__ */ new Set();
@@ -40600,9 +40886,13 @@ async function getCommitsSinceBatch(projectRoot, paths, since) {
40600
40886
  if (!inCommit) continue;
40601
40887
  const trimmed2 = line.trim();
40602
40888
  if (!trimmed2) continue;
40603
- const changed = normalize3(trimmed2);
40889
+ const changed = normalizePath(trimmed2);
40604
40890
  for (const req of requested) {
40605
- if (changed === req || changed.startsWith(req.endsWith("/") ? req : req + "/")) {
40891
+ if (changed === req || req.endsWith("/") && changed.startsWith(req)) {
40892
+ seenThisCommit.add(req);
40893
+ continue;
40894
+ }
40895
+ if (changed.startsWith(req + "/")) {
40606
40896
  seenThisCommit.add(req);
40607
40897
  }
40608
40898
  }
@@ -40610,9 +40900,8 @@ async function getCommitsSinceBatch(projectRoot, paths, since) {
40610
40900
  if (inCommit) flush();
40611
40901
  } catch {
40612
40902
  }
40613
- const out = /* @__PURE__ */ new Map();
40614
- for (const p2 of paths) {
40615
- out.set(p2, counts.get(p2.replace(/\\/g, "/")) ?? 0);
40903
+ for (const [original, normalized] of originalToNormalized) {
40904
+ out.set(original, counts.get(normalized) ?? 0);
40616
40905
  }
40617
40906
  return out;
40618
40907
  }
@@ -40662,6 +40951,7 @@ var gitInstance, gitProjectRoot;
40662
40951
  var init_git = __esm({
40663
40952
  "src/utils/git.ts"() {
40664
40953
  "use strict";
40954
+ init_define_WEB_FIRST_SEGMENTS();
40665
40955
  init_esm2();
40666
40956
  gitInstance = null;
40667
40957
  gitProjectRoot = null;
@@ -40801,6 +41091,7 @@ async function checkGitTracked(filePath, projectRoot) {
40801
41091
  var init_mcp_parser = __esm({
40802
41092
  "src/core/mcp-parser.ts"() {
40803
41093
  "use strict";
41094
+ init_define_WEB_FIRST_SEGMENTS();
40804
41095
  init_fs();
40805
41096
  init_git();
40806
41097
  }
@@ -41147,6 +41438,7 @@ var CharacterCodes;
41147
41438
  var init_scanner2 = __esm({
41148
41439
  "node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js"() {
41149
41440
  "use strict";
41441
+ init_define_WEB_FIRST_SEGMENTS();
41150
41442
  (function(CharacterCodes2) {
41151
41443
  CharacterCodes2[CharacterCodes2["lineFeed"] = 10] = "lineFeed";
41152
41444
  CharacterCodes2[CharacterCodes2["carriageReturn"] = 13] = "carriageReturn";
@@ -41236,6 +41528,7 @@ var init_scanner2 = __esm({
41236
41528
  var cachedSpaces, maxCachedValues, cachedBreakLinesWithSpaces;
41237
41529
  var init_string_intern = __esm({
41238
41530
  "node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js"() {
41531
+ init_define_WEB_FIRST_SEGMENTS();
41239
41532
  cachedSpaces = new Array(20).fill(0).map((_3, index) => {
41240
41533
  return " ".repeat(index);
41241
41534
  });
@@ -41271,6 +41564,7 @@ var init_string_intern = __esm({
41271
41564
  var init_format = __esm({
41272
41565
  "node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js"() {
41273
41566
  "use strict";
41567
+ init_define_WEB_FIRST_SEGMENTS();
41274
41568
  init_scanner2();
41275
41569
  init_string_intern();
41276
41570
  }
@@ -41686,6 +41980,7 @@ var ParseOptions;
41686
41980
  var init_parser2 = __esm({
41687
41981
  "node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js"() {
41688
41982
  "use strict";
41983
+ init_define_WEB_FIRST_SEGMENTS();
41689
41984
  init_scanner2();
41690
41985
  (function(ParseOptions2) {
41691
41986
  ParseOptions2.DEFAULT = {
@@ -41699,6 +41994,7 @@ var init_parser2 = __esm({
41699
41994
  var init_edit = __esm({
41700
41995
  "node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js"() {
41701
41996
  "use strict";
41997
+ init_define_WEB_FIRST_SEGMENTS();
41702
41998
  init_format();
41703
41999
  init_parser2();
41704
42000
  }
@@ -41709,6 +42005,7 @@ var ScanError, SyntaxKind, parseTree2, getNodeValue2, ParseErrorCode;
41709
42005
  var init_main = __esm({
41710
42006
  "node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js"() {
41711
42007
  "use strict";
42008
+ init_define_WEB_FIRST_SEGMENTS();
41712
42009
  init_format();
41713
42010
  init_edit();
41714
42011
  init_scanner2();
@@ -41764,6 +42061,27 @@ var init_main = __esm({
41764
42061
  }
41765
42062
  });
41766
42063
 
42064
+ // src/utils/positions.ts
42065
+ function offsetToPosition(content, offset) {
42066
+ let line = 1;
42067
+ let column = 1;
42068
+ for (let i2 = 0; i2 < offset && i2 < content.length; i2++) {
42069
+ if (content[i2] === "\n") {
42070
+ line++;
42071
+ column = 1;
42072
+ } else {
42073
+ column++;
42074
+ }
42075
+ }
42076
+ return { line, column };
42077
+ }
42078
+ var init_positions = __esm({
42079
+ "src/utils/positions.ts"() {
42080
+ "use strict";
42081
+ init_define_WEB_FIRST_SEGMENTS();
42082
+ }
42083
+ });
42084
+
41767
42085
  // src/core/mcph-parser.ts
41768
42086
  async function parseMcphConfig(file2, projectRoot, scopeOverride) {
41769
42087
  const content = readFileContent(file2.absolutePath);
@@ -41840,19 +42158,6 @@ function nodePosition(content, node) {
41840
42158
  endColumn: end.column
41841
42159
  };
41842
42160
  }
41843
- function offsetToPosition(content, offset) {
41844
- let line = 1;
41845
- let column = 1;
41846
- for (let i2 = 0; i2 < offset && i2 < content.length; i2++) {
41847
- if (content[i2] === "\n") {
41848
- line++;
41849
- column = 1;
41850
- } else {
41851
- column++;
41852
- }
41853
- }
41854
- return { line, column };
41855
- }
41856
42161
  async function checkGitTracked2(filePath, projectRoot) {
41857
42162
  try {
41858
42163
  const git = getGit(projectRoot);
@@ -41875,9 +42180,11 @@ var KNOWN_FIELDS;
41875
42180
  var init_mcph_parser = __esm({
41876
42181
  "src/core/mcph-parser.ts"() {
41877
42182
  "use strict";
42183
+ init_define_WEB_FIRST_SEGMENTS();
41878
42184
  init_main();
41879
42185
  init_fs();
41880
42186
  init_git();
42187
+ init_positions();
41881
42188
  KNOWN_FIELDS = /* @__PURE__ */ new Set(["$schema", "version", "token", "apiBase", "servers", "blocked"]);
41882
42189
  }
41883
42190
  });
@@ -41891,6 +42198,7 @@ __export(mod_exports, {
41891
42198
  var peq, myers_32, myers_x, distance, closest;
41892
42199
  var init_mod = __esm({
41893
42200
  "node_modules/.pnpm/fastest-levenshtein@1.0.16/node_modules/fastest-levenshtein/esm/mod.js"() {
42201
+ init_define_WEB_FIRST_SEGMENTS();
41894
42202
  peq = new Uint32Array(65536);
41895
42203
  myers_32 = (a, b2) => {
41896
42204
  const n7 = a.length;
@@ -42034,6 +42342,7 @@ var init_mod = __esm({
42034
42342
  // node_modules/.pnpm/fast-levenshtein@3.0.0/node_modules/fast-levenshtein/levenshtein.js
42035
42343
  var require_levenshtein = __commonJS({
42036
42344
  "node_modules/.pnpm/fast-levenshtein@3.0.0/node_modules/fast-levenshtein/levenshtein.js"(exports, module) {
42345
+ init_define_WEB_FIRST_SEGMENTS();
42037
42346
  (function() {
42038
42347
  "use strict";
42039
42348
  var collator;
@@ -42106,7 +42415,7 @@ var require_levenshtein = __commonJS({
42106
42415
  });
42107
42416
 
42108
42417
  // src/core/checks/paths.ts
42109
- import * as path3 from "node:path";
42418
+ import * as path4 from "node:path";
42110
42419
  function getProjectFiles(projectRoot) {
42111
42420
  if (cachedProjectFiles?.root === projectRoot) return cachedProjectFiles.files;
42112
42421
  const files = getAllProjectFiles(projectRoot);
@@ -42119,10 +42428,10 @@ function resetPathsCache() {
42119
42428
  async function checkPaths(file2, projectRoot) {
42120
42429
  const issues = [];
42121
42430
  const projectFiles = getProjectFiles(projectRoot);
42122
- const contextDir = path3.dirname(file2.filePath);
42431
+ const contextDir = path4.dirname(file2.filePath);
42123
42432
  for (const ref of file2.references.paths) {
42124
42433
  const baseDir = ref.value.startsWith("./") || ref.value.startsWith("../") ? contextDir : projectRoot;
42125
- const resolvedPath = path3.resolve(baseDir, ref.value);
42434
+ const resolvedPath = path4.resolve(baseDir, ref.value);
42126
42435
  const normalizedRef = ref.value.replace(/\\/g, "/");
42127
42436
  if (normalizedRef.includes("*")) {
42128
42437
  const matches = await Ze(normalizedRef, { cwd: baseDir, nodir: false });
@@ -42140,7 +42449,7 @@ async function checkPaths(file2, projectRoot) {
42140
42449
  }
42141
42450
  const isDir = normalizedRef.endsWith("/");
42142
42451
  if (isDir) {
42143
- const dirPath = path3.resolve(baseDir, normalizedRef);
42452
+ const dirPath = path4.resolve(baseDir, normalizedRef);
42144
42453
  if (!isDirectory(dirPath)) {
42145
42454
  issues.push({
42146
42455
  severity: "error",
@@ -42185,12 +42494,12 @@ async function checkPaths(file2, projectRoot) {
42185
42494
  }
42186
42495
  function findClosestMatch(target, files) {
42187
42496
  const targetNorm = target.replace(/\\/g, "/");
42188
- const targetBase = path3.basename(targetNorm);
42497
+ const targetBase = path4.basename(targetNorm);
42189
42498
  let basenameMatch = null;
42190
42499
  let basenameDistance = Infinity;
42191
42500
  for (const file2 of files) {
42192
42501
  const fileNorm = file2.replace(/\\/g, "/");
42193
- if (path3.basename(fileNorm) === targetBase && fileNorm !== targetNorm) {
42502
+ if (path4.basename(fileNorm) === targetBase && fileNorm !== targetNorm) {
42194
42503
  const dist = levenshtein(targetNorm, fileNorm);
42195
42504
  if (dist < basenameDistance) {
42196
42505
  basenameDistance = dist;
@@ -42218,6 +42527,7 @@ var import_fast_levenshtein, levenshtein, cachedProjectFiles;
42218
42527
  var init_paths = __esm({
42219
42528
  "src/core/checks/paths.ts"() {
42220
42529
  "use strict";
42530
+ init_define_WEB_FIRST_SEGMENTS();
42221
42531
  import_fast_levenshtein = __toESM(require_levenshtein(), 1);
42222
42532
  init_index_min();
42223
42533
  init_fs();
@@ -42229,7 +42539,7 @@ var init_paths = __esm({
42229
42539
 
42230
42540
  // src/core/checks/commands.ts
42231
42541
  import * as fs4 from "node:fs";
42232
- import * as path4 from "node:path";
42542
+ import * as path5 from "node:path";
42233
42543
  function extractNpxPackage(cmd) {
42234
42544
  if (!/^npx\b/.test(cmd)) return null;
42235
42545
  const tokens = cmd.split(/\s+/).slice(1);
@@ -42296,7 +42606,7 @@ async function checkCommands(file2, projectRoot) {
42296
42606
  ...pkgJson.optionalDependencies
42297
42607
  };
42298
42608
  if (!(pkgName in allDeps)) {
42299
- const binPath = path4.join(projectRoot, "node_modules", ".bin", pkgName);
42609
+ const binPath = path5.join(projectRoot, "node_modules", ".bin", pkgName);
42300
42610
  try {
42301
42611
  fs4.accessSync(binPath);
42302
42612
  } catch {
@@ -42344,7 +42654,7 @@ async function checkCommands(file2, projectRoot) {
42344
42654
  ...pkgJson.optionalDependencies
42345
42655
  };
42346
42656
  if (!(tool in allDeps)) {
42347
- const binPath = path4.join(projectRoot, "node_modules", ".bin", tool);
42657
+ const binPath = path5.join(projectRoot, "node_modules", ".bin", tool);
42348
42658
  try {
42349
42659
  fs4.accessSync(binPath);
42350
42660
  } catch {
@@ -42363,7 +42673,7 @@ async function checkCommands(file2, projectRoot) {
42363
42673
  }
42364
42674
  function loadMakefile(projectRoot) {
42365
42675
  try {
42366
- return stripBom(fs4.readFileSync(path4.join(projectRoot, "Makefile"), "utf-8"));
42676
+ return stripBom(fs4.readFileSync(path5.join(projectRoot, "Makefile"), "utf-8"));
42367
42677
  } catch {
42368
42678
  return null;
42369
42679
  }
@@ -42376,6 +42686,7 @@ var NPM_SCRIPT_PATTERN, MAKE_PATTERN;
42376
42686
  var init_commands = __esm({
42377
42687
  "src/core/checks/commands.ts"() {
42378
42688
  "use strict";
42689
+ init_define_WEB_FIRST_SEGMENTS();
42379
42690
  init_fs();
42380
42691
  NPM_SCRIPT_PATTERN = /^(?:npm\s+run|pnpm(?:\s+run)?|yarn(?:\s+run)?|bun(?:\s+run)?)\s+(\S+)/;
42381
42692
  MAKE_PATTERN = /^make\s+(\S+)/;
@@ -42383,13 +42694,13 @@ var init_commands = __esm({
42383
42694
  });
42384
42695
 
42385
42696
  // src/core/checks/staleness.ts
42386
- import * as path5 from "node:path";
42697
+ import * as path6 from "node:path";
42387
42698
  async function checkStaleness(file2, projectRoot) {
42388
42699
  const issues = [];
42389
42700
  if (!await isGitRepo(projectRoot)) {
42390
42701
  return issues;
42391
42702
  }
42392
- const relativePath = path5.relative(projectRoot, file2.filePath).replace(/\\/g, "/");
42703
+ const relativePath = path6.relative(projectRoot, file2.filePath).replace(/\\/g, "/");
42393
42704
  const lastModified = await getFileLastModified(projectRoot, relativePath);
42394
42705
  if (!lastModified || isNaN(lastModified.getTime())) {
42395
42706
  return issues;
@@ -42436,6 +42747,7 @@ var WARNING_DAYS, INFO_DAYS;
42436
42747
  var init_staleness = __esm({
42437
42748
  "src/core/checks/staleness.ts"() {
42438
42749
  "use strict";
42750
+ init_define_WEB_FIRST_SEGMENTS();
42439
42751
  init_git();
42440
42752
  WARNING_DAYS = 30;
42441
42753
  INFO_DAYS = 14;
@@ -42504,6 +42816,7 @@ var DEFAULT_TOKEN_THRESHOLDS;
42504
42816
  var init_tokens2 = __esm({
42505
42817
  "src/core/checks/tokens.ts"() {
42506
42818
  "use strict";
42819
+ init_define_WEB_FIRST_SEGMENTS();
42507
42820
  DEFAULT_TOKEN_THRESHOLDS = {
42508
42821
  info: 1e3,
42509
42822
  warning: 3e3,
@@ -42517,7 +42830,7 @@ var init_tokens2 = __esm({
42517
42830
 
42518
42831
  // src/core/checks/tier-tokens.ts
42519
42832
  import * as fs5 from "node:fs";
42520
- import * as path6 from "node:path";
42833
+ import * as path7 from "node:path";
42521
42834
  function hasPathsFrontmatter(content) {
42522
42835
  const lines = content.split("\n");
42523
42836
  if (lines[0]?.trim() !== "---") return false;
@@ -42569,9 +42882,9 @@ function computeSectionCosts(file2) {
42569
42882
  function loadSettingsSources(projectRoot) {
42570
42883
  const sources = [];
42571
42884
  const candidates = [
42572
- path6.join(projectRoot, ".claude", "settings.json"),
42573
- path6.join(projectRoot, ".claude", "settings.local.json"),
42574
- path6.join(process.env.HOME || process.env.USERPROFILE || "", ".claude", "settings.json")
42885
+ path7.join(projectRoot, ".claude", "settings.json"),
42886
+ path7.join(projectRoot, ".claude", "settings.local.json"),
42887
+ path7.join(process.env.HOME || process.env.USERPROFILE || "", ".claude", "settings.json")
42575
42888
  ];
42576
42889
  for (const p2 of candidates) {
42577
42890
  let content;
@@ -42684,6 +42997,7 @@ var ALWAYS_LOADED_NAMES, TOP_SECTIONS_TO_REPORT, INVIOLABLE_WITH_COMMAND;
42684
42997
  var init_tier_tokens = __esm({
42685
42998
  "src/core/checks/tier-tokens.ts"() {
42686
42999
  "use strict";
43000
+ init_define_WEB_FIRST_SEGMENTS();
42687
43001
  init_tokens();
42688
43002
  init_fs();
42689
43003
  init_tokens2();
@@ -42735,11 +43049,12 @@ function toLineSet(text, minTokenLen) {
42735
43049
  var init_similarity = __esm({
42736
43050
  "src/utils/similarity.ts"() {
42737
43051
  "use strict";
43052
+ init_define_WEB_FIRST_SEGMENTS();
42738
43053
  }
42739
43054
  });
42740
43055
 
42741
43056
  // src/core/checks/redundancy.ts
42742
- import * as path7 from "node:path";
43057
+ import * as path8 from "node:path";
42743
43058
  function compilePatterns(allDeps) {
42744
43059
  const compiled = [];
42745
43060
  for (const [pkg, mentions] of Object.entries(PACKAGE_TECH_MAP)) {
@@ -42818,7 +43133,7 @@ async function checkRedundancy(file2, projectRoot) {
42818
43133
  );
42819
43134
  if (dirMatch) {
42820
43135
  const dir = dirMatch[1].replace(/[`"]/g, "");
42821
- const fullPath = path7.resolve(projectRoot, dir);
43136
+ const fullPath = path8.resolve(projectRoot, dir);
42822
43137
  if (isDirectory(fullPath)) {
42823
43138
  issues.push({
42824
43139
  severity: "info",
@@ -42864,6 +43179,7 @@ var PACKAGE_TECH_MAP, compiledPatternsCache, DUPLICATE_CONTENT_THRESHOLD, DUPLIC
42864
43179
  var init_redundancy = __esm({
42865
43180
  "src/core/checks/redundancy.ts"() {
42866
43181
  "use strict";
43182
+ init_define_WEB_FIRST_SEGMENTS();
42867
43183
  init_fs();
42868
43184
  init_similarity();
42869
43185
  init_tokens();
@@ -43042,6 +43358,7 @@ var DIRECTIVE_CATEGORIES;
43042
43358
  var init_contradictions = __esm({
43043
43359
  "src/core/checks/contradictions.ts"() {
43044
43360
  "use strict";
43361
+ init_define_WEB_FIRST_SEGMENTS();
43045
43362
  DIRECTIVE_CATEGORIES = [
43046
43363
  {
43047
43364
  name: "testing framework",
@@ -43458,6 +43775,7 @@ var VALID_WINDSURF_TRIGGERS;
43458
43775
  var init_frontmatter = __esm({
43459
43776
  "src/core/checks/frontmatter.ts"() {
43460
43777
  "use strict";
43778
+ init_define_WEB_FIRST_SEGMENTS();
43461
43779
  VALID_WINDSURF_TRIGGERS = ["always_on", "glob", "manual", "model", "model_decision"];
43462
43780
  }
43463
43781
  });
@@ -43580,6 +43898,7 @@ function findKeyLine(content, key) {
43580
43898
  var init_schema = __esm({
43581
43899
  "src/core/checks/mcp/schema.ts"() {
43582
43900
  "use strict";
43901
+ init_define_WEB_FIRST_SEGMENTS();
43583
43902
  }
43584
43903
  });
43585
43904
 
@@ -43695,6 +44014,7 @@ var API_KEY_PATTERNS, ENV_VAR_REF, HIGH_ENTROPY_PATTERN, URL_SECRET_PARAMS, SECR
43695
44014
  var init_security = __esm({
43696
44015
  "src/core/checks/mcp/security.ts"() {
43697
44016
  "use strict";
44017
+ init_define_WEB_FIRST_SEGMENTS();
43698
44018
  API_KEY_PATTERNS = [
43699
44019
  /sk-[a-zA-Z0-9]{20,}/,
43700
44020
  // OpenAI / generic
@@ -43741,7 +44061,7 @@ var init_security = __esm({
43741
44061
 
43742
44062
  // src/core/checks/mcp/commands.ts
43743
44063
  import * as fs6 from "node:fs";
43744
- import * as path8 from "node:path";
44064
+ import * as path9 from "node:path";
43745
44065
  async function checkMcpCommands(config2, projectRoot) {
43746
44066
  const issues = [];
43747
44067
  if (config2.parseErrors.length > 0) return issues;
@@ -43758,7 +44078,7 @@ async function checkMcpCommands(config2, projectRoot) {
43758
44078
  });
43759
44079
  }
43760
44080
  if (LOCAL_PATH_PATTERN.test(server2.command)) {
43761
- const resolved = path8.resolve(projectRoot, server2.command);
44081
+ const resolved = path9.resolve(projectRoot, server2.command);
43762
44082
  if (!fileExistsSafe(resolved)) {
43763
44083
  issues.push({
43764
44084
  severity: "warning",
@@ -43773,7 +44093,7 @@ async function checkMcpCommands(config2, projectRoot) {
43773
44093
  for (const arg of server2.args) {
43774
44094
  if (URL_PREFIX.test(arg)) continue;
43775
44095
  if (LOCAL_PATH_PATTERN.test(arg) || FILE_PATH_PATTERN.test(arg)) {
43776
- const resolved = path8.resolve(projectRoot, arg);
44096
+ const resolved = path9.resolve(projectRoot, arg);
43777
44097
  if (!fileExistsSafe(resolved)) {
43778
44098
  issues.push({
43779
44099
  severity: "warning",
@@ -43801,6 +44121,7 @@ var LOCAL_PATH_PATTERN, FILE_PATH_PATTERN, URL_PREFIX;
43801
44121
  var init_commands2 = __esm({
43802
44122
  "src/core/checks/mcp/commands.ts"() {
43803
44123
  "use strict";
44124
+ init_define_WEB_FIRST_SEGMENTS();
43804
44125
  LOCAL_PATH_PATTERN = /^\.\.?\//;
43805
44126
  FILE_PATH_PATTERN = /^[^-].*\/.*\.\w+$/;
43806
44127
  URL_PREFIX = /^(https?|file|s3|gs|ssh|git):\/\//i;
@@ -43855,7 +44176,7 @@ function findTypeLine(content, serverName) {
43855
44176
  if (enteredObject && depth === 0) return null;
43856
44177
  }
43857
44178
  }
43858
- if (enteredObject && lines[i2].includes('"type"') && lines[i2].includes('"sse"')) {
44179
+ if (enteredObject && /"type"\s*:\s*"sse"/.test(lines[i2])) {
43859
44180
  return i2 + 1;
43860
44181
  }
43861
44182
  }
@@ -43864,6 +44185,7 @@ function findTypeLine(content, serverName) {
43864
44185
  var init_deprecated = __esm({
43865
44186
  "src/core/checks/mcp/deprecated.ts"() {
43866
44187
  "use strict";
44188
+ init_define_WEB_FIRST_SEGMENTS();
43867
44189
  }
43868
44190
  });
43869
44191
 
@@ -44000,6 +44322,7 @@ var HAS_CURSOR_SYNTAX, HAS_CLAUDE_SYNTAX, HAS_CONTINUE_SYNTAX, ANY_ENV_REF;
44000
44322
  var init_env = __esm({
44001
44323
  "src/core/checks/mcp/env.ts"() {
44002
44324
  "use strict";
44325
+ init_define_WEB_FIRST_SEGMENTS();
44003
44326
  HAS_CURSOR_SYNTAX = /\$\{env:[^}]+\}/;
44004
44327
  HAS_CLAUDE_SYNTAX = /\$\{[A-Za-z_][A-Za-z0-9_]*(?::-.*)?\}/;
44005
44328
  HAS_CONTINUE_SYNTAX = /\$\{\{\s*secrets\.[^}]+\}\}/;
@@ -44052,6 +44375,7 @@ var ENV_VAR_REF2;
44052
44375
  var init_urls = __esm({
44053
44376
  "src/core/checks/mcp/urls.ts"() {
44054
44377
  "use strict";
44378
+ init_define_WEB_FIRST_SEGMENTS();
44055
44379
  ENV_VAR_REF2 = /\$\{[^}]+\}/;
44056
44380
  }
44057
44381
  });
@@ -44203,6 +44527,7 @@ function checkSingleFileIssues(configs) {
44203
44527
  var init_consistency = __esm({
44204
44528
  "src/core/checks/mcp/consistency.ts"() {
44205
44529
  "use strict";
44530
+ init_define_WEB_FIRST_SEGMENTS();
44206
44531
  }
44207
44532
  });
44208
44533
 
@@ -44258,6 +44583,7 @@ async function checkMcpRedundancy(configs) {
44258
44583
  var init_redundancy2 = __esm({
44259
44584
  "src/core/checks/mcp/redundancy.ts"() {
44260
44585
  "use strict";
44586
+ init_define_WEB_FIRST_SEGMENTS();
44261
44587
  }
44262
44588
  });
44263
44589
 
@@ -44314,6 +44640,7 @@ var TOKEN_PATTERN, EXPORT_EXAMPLES;
44314
44640
  var init_token_security = __esm({
44315
44641
  "src/core/checks/mcph/token-security.ts"() {
44316
44642
  "use strict";
44643
+ init_define_WEB_FIRST_SEGMENTS();
44317
44644
  TOKEN_PATTERN = /^mcp_pat_[A-Za-z0-9_-]+$/;
44318
44645
  EXPORT_EXAMPLES = [
44319
44646
  ' bash/zsh: export MCPH_TOKEN="mcp_pat_***"',
@@ -44365,6 +44692,7 @@ var PRIVATE_HOST_PATTERNS;
44365
44692
  var init_apibase = __esm({
44366
44693
  "src/core/checks/mcph/apibase.ts"() {
44367
44694
  "use strict";
44695
+ init_define_WEB_FIRST_SEGMENTS();
44368
44696
  PRIVATE_HOST_PATTERNS = [
44369
44697
  /^localhost$/i,
44370
44698
  /^127\./,
@@ -44412,6 +44740,7 @@ var CURRENT_SCHEMA_VERSION;
44412
44740
  var init_schema_conformance = __esm({
44413
44741
  "src/core/checks/mcph/schema-conformance.ts"() {
44414
44742
  "use strict";
44743
+ init_define_WEB_FIRST_SEGMENTS();
44415
44744
  CURRENT_SCHEMA_VERSION = 1;
44416
44745
  }
44417
44746
  });
@@ -44459,15 +44788,16 @@ async function checkMcphLists(config2, _projectRoot) {
44459
44788
  var init_lists = __esm({
44460
44789
  "src/core/checks/mcph/lists.ts"() {
44461
44790
  "use strict";
44791
+ init_define_WEB_FIRST_SEGMENTS();
44462
44792
  }
44463
44793
  });
44464
44794
 
44465
44795
  // src/core/checks/mcph/gitignore.ts
44466
- import * as path9 from "node:path";
44796
+ import * as path10 from "node:path";
44467
44797
  async function checkMcphGitignore(config2, _projectRoot) {
44468
44798
  const issues = [];
44469
44799
  if (config2.scope === "project-local" && !config2.isGitignored) {
44470
- const basename4 = path9.basename(config2.filePath);
44800
+ const basename4 = path10.basename(config2.filePath);
44471
44801
  issues.push({
44472
44802
  severity: "error",
44473
44803
  check: "mcph-gitignore",
@@ -44482,11 +44812,25 @@ async function checkMcphGitignore(config2, _projectRoot) {
44482
44812
  var init_gitignore = __esm({
44483
44813
  "src/core/checks/mcph/gitignore.ts"() {
44484
44814
  "use strict";
44815
+ init_define_WEB_FIRST_SEGMENTS();
44485
44816
  }
44486
44817
  });
44487
44818
 
44488
44819
  // src/core/session-parser.ts
44489
44820
  import { readFile } from "node:fs/promises";
44821
+ import { readFileSync as readFileSync4 } from "node:fs";
44822
+ import { dirname as dirname2, resolve as resolve4 } from "node:path";
44823
+ import { fileURLToPath } from "node:url";
44824
+ function loadWebFirstSegments() {
44825
+ if (typeof define_WEB_FIRST_SEGMENTS_default !== "undefined") {
44826
+ return new Set(define_WEB_FIRST_SEGMENTS_default);
44827
+ }
44828
+ const __dir = dirname2(fileURLToPath(import.meta.url));
44829
+ const fixturePath = resolve4(__dir, "../../tests/fixtures/web-first-segments.json");
44830
+ const raw = JSON.parse(readFileSync4(fixturePath, "utf-8"));
44831
+ const list = Array.isArray(raw) ? raw : raw.segments;
44832
+ return new Set(list);
44833
+ }
44490
44834
  function encodeProjectDir(fsPath) {
44491
44835
  return fsPath.replace(/[:\\/\.]/g, "-");
44492
44836
  }
@@ -44494,21 +44838,47 @@ function projectDirMatchesPath(encodedDir, fsPath) {
44494
44838
  const normalized = fsPath.replace(/\\/g, "/");
44495
44839
  return encodedDir === encodeProjectDir(normalized);
44496
44840
  }
44497
- function extractPaths(content) {
44498
- const paths = [];
44841
+ function classifyPath(p2, contextHints) {
44842
+ if (/^~(?:\d|[A-Z](?=[a-z]?(?:x|\b)))/.test(p2)) return "approximation";
44843
+ if (/<[^>]+>|\{\{[^}]+\}\}/.test(p2)) return "template";
44844
+ if (p2.startsWith("/")) {
44845
+ const hasExt = /\.[a-zA-Z0-9]{1,8}$/.test(p2);
44846
+ if (!hasExt) {
44847
+ const firstSeg = p2.slice(1).split("/")[0];
44848
+ if (WEB_FIRST_SEGMENTS.has(firstSeg)) return "url-path";
44849
+ if (contextHints?.baseUrls?.length) return "url-path";
44850
+ }
44851
+ }
44852
+ if (/^\/[a-z][a-z0-9_-]*$/.test(p2)) return "slash-command";
44853
+ return "fs-path";
44854
+ }
44855
+ function extractPathsClassified(content) {
44856
+ const baseUrls = [...content.matchAll(/https?:\/\/[^\s'"`)]+/g)].map((m) => m[0]);
44857
+ const hints = { baseUrls };
44858
+ const candidates = [];
44499
44859
  for (const match of content.matchAll(PATH_PATTERN2)) {
44500
44860
  const p2 = match[1].replace(/[)}\]]+$/, "");
44501
44861
  if (p2.length > 2 && !p2.startsWith("http") && !p2.startsWith("//")) {
44502
- paths.push(p2);
44862
+ candidates.push(p2);
44503
44863
  }
44504
44864
  }
44505
44865
  for (const match of content.matchAll(BARE_FILE_PATH)) {
44506
44866
  const p2 = match[1].replace(/[)}\]]+$/, "");
44507
44867
  if (p2.length > 2 && !p2.startsWith("http")) {
44508
- paths.push(p2);
44868
+ candidates.push(p2);
44509
44869
  }
44510
44870
  }
44511
- return [...new Set(paths)];
44871
+ const seen = /* @__PURE__ */ new Set();
44872
+ const out = [];
44873
+ for (const value of candidates) {
44874
+ if (seen.has(value)) continue;
44875
+ seen.add(value);
44876
+ out.push({ value, class: classifyPath(value, hints) });
44877
+ }
44878
+ return out;
44879
+ }
44880
+ function extractPaths(content) {
44881
+ return extractPathsClassified(content).filter((c3) => c3.class === "fs-path").map((c3) => c3.value);
44512
44882
  }
44513
44883
  function parseFrontmatter2(content) {
44514
44884
  const lines = content.split("\n");
@@ -44550,11 +44920,13 @@ async function parseMemoryFile(filePath, projectDir) {
44550
44920
  referencedPaths
44551
44921
  };
44552
44922
  }
44553
- var PATH_PATTERN2, BARE_FILE_PATH;
44923
+ var WEB_FIRST_SEGMENTS, PATH_PATTERN2, BARE_FILE_PATH;
44554
44924
  var init_session_parser = __esm({
44555
44925
  "src/core/session-parser.ts"() {
44556
44926
  "use strict";
44927
+ init_define_WEB_FIRST_SEGMENTS();
44557
44928
  init_fs();
44929
+ WEB_FIRST_SEGMENTS = loadWebFirstSegments();
44558
44930
  PATH_PATTERN2 = /(?:^|\s|['"`(])([.~/][^\s'"`),;:!?]+)/g;
44559
44931
  BARE_FILE_PATH = /(?:^|[\s`"'(])([\w][\w-]*(?:\/[\w.-]+)+\.[a-zA-Z0-9]{1,8})\b/g;
44560
44932
  }
@@ -44564,7 +44936,7 @@ var init_session_parser = __esm({
44564
44936
  import { readdir, stat } from "node:fs/promises";
44565
44937
  import { createReadStream } from "node:fs";
44566
44938
  import { createInterface } from "node:readline";
44567
- import { dirname as dirname2, join as join5, resolve as resolve4 } from "node:path";
44939
+ import { dirname as dirname3, join as join5, resolve as resolve5 } from "node:path";
44568
44940
  import { existsSync } from "node:fs";
44569
44941
  function detectProviders() {
44570
44942
  if (!home) return [];
@@ -44659,7 +45031,7 @@ function detectAiderInSiblings(siblings) {
44659
45031
  return null;
44660
45032
  }
44661
45033
  async function detectSiblings(projectRoot) {
44662
- const parentDir = dirname2(resolve4(projectRoot));
45034
+ const parentDir = dirname3(resolve5(projectRoot));
44663
45035
  let entries;
44664
45036
  try {
44665
45037
  entries = await readdir(parentDir);
@@ -44670,8 +45042,8 @@ async function detectSiblings(projectRoot) {
44670
45042
  for (const entry of entries) {
44671
45043
  if (entry.startsWith(".") || entry === "node_modules") continue;
44672
45044
  const fullPath = join5(parentDir, entry);
44673
- const entryPath = resolve4(fullPath);
44674
- if (entryPath === resolve4(projectRoot)) continue;
45045
+ const entryPath = resolve5(fullPath);
45046
+ if (entryPath === resolve5(projectRoot)) continue;
44675
45047
  try {
44676
45048
  const s = await stat(fullPath);
44677
45049
  if (!s.isDirectory()) continue;
@@ -44734,7 +45106,7 @@ async function scanSessionData(projectRoot) {
44734
45106
  history: histories,
44735
45107
  memories,
44736
45108
  siblings,
44737
- currentProject: resolve4(projectRoot).replace(/\\/g, "/"),
45109
+ currentProject: resolve5(projectRoot).replace(/\\/g, "/"),
44738
45110
  providers
44739
45111
  };
44740
45112
  }
@@ -44742,6 +45114,7 @@ var home, AGENT_DIRS;
44742
45114
  var init_session_scanner = __esm({
44743
45115
  "src/core/session-scanner.ts"() {
44744
45116
  "use strict";
45117
+ init_define_WEB_FIRST_SEGMENTS();
44745
45118
  init_esm2();
44746
45119
  init_session_parser();
44747
45120
  home = process.env.HOME || process.env.USERPROFILE || "";
@@ -44767,9 +45140,9 @@ var init_session_scanner = __esm({
44767
45140
  });
44768
45141
 
44769
45142
  // src/core/checks/session/missing-secret.ts
44770
- import { resolve as resolve5, basename as basename3 } from "node:path";
44771
- function normalizePath(p2) {
44772
- return resolve5(p2).replace(/\\/g, "/").toLowerCase();
45143
+ import { resolve as resolve6, basename as basename3 } from "node:path";
45144
+ function normalizePath2(p2) {
45145
+ return resolve6(p2).replace(/\\/g, "/").toLowerCase();
44773
45146
  }
44774
45147
  async function checkMissingSecret(ctx) {
44775
45148
  const issues = [];
@@ -44790,10 +45163,10 @@ async function checkMissingSecret(ctx) {
44790
45163
  byName.get(s.name).add(s.project);
44791
45164
  if (s.repo) byName.get(s.name).add(s.repo);
44792
45165
  }
44793
- const currentNorm = normalizePath(ctx.currentProject);
45166
+ const currentNorm = normalizePath2(ctx.currentProject);
44794
45167
  const currentBase = basename3(currentNorm);
44795
45168
  for (const [secretName, projects] of byName) {
44796
- const normalizedProjects = [...projects].map(normalizePath);
45169
+ const normalizedProjects = [...projects].map(normalizePath2);
44797
45170
  const currentHas = normalizedProjects.some((p2) => {
44798
45171
  if (p2 === currentNorm) return true;
44799
45172
  const lastSegment = p2.split("/").pop() || "";
@@ -44801,7 +45174,7 @@ async function checkMissingSecret(ctx) {
44801
45174
  });
44802
45175
  if (currentHas) continue;
44803
45176
  const siblingMatches = ctx.siblings.filter((sib) => {
44804
- const sibNorm = normalizePath(sib.path);
45177
+ const sibNorm = normalizePath2(sib.path);
44805
45178
  const sibBase = basename3(sibNorm);
44806
45179
  return normalizedProjects.some((p2) => {
44807
45180
  if (p2 === sibNorm) return true;
@@ -44828,7 +45201,8 @@ var SECRET_SET_PATTERN, SECRET_SET_SIMPLE;
44828
45201
  var init_missing_secret = __esm({
44829
45202
  "src/core/checks/session/missing-secret.ts"() {
44830
45203
  "use strict";
44831
- SECRET_SET_PATTERN = /gh\s+secret\s+set\s+(\S+)\s+(?:--repo\s+(\S+)|.*-b\s+)/;
45204
+ init_define_WEB_FIRST_SEGMENTS();
45205
+ SECRET_SET_PATTERN = /gh\s+secret\s+set\s+(\S+)\s+--repo\s+(\S+)/;
44832
45206
  SECRET_SET_SIMPLE = /gh\s+secret\s+set\s+(\S+)/;
44833
45207
  }
44834
45208
  });
@@ -44906,6 +45280,7 @@ var CANONICAL_FILES, MIN_TOKEN_LEN, CACHE_MAX_ENTRIES, lineSetCache;
44906
45280
  var init_diverged_file = __esm({
44907
45281
  "src/core/checks/session/diverged-file.ts"() {
44908
45282
  "use strict";
45283
+ init_define_WEB_FIRST_SEGMENTS();
44909
45284
  init_similarity();
44910
45285
  init_fs();
44911
45286
  CANONICAL_FILES = [
@@ -44976,20 +45351,21 @@ async function checkMissingWorkflow(ctx) {
44976
45351
  var init_missing_workflow = __esm({
44977
45352
  "src/core/checks/session/missing-workflow.ts"() {
44978
45353
  "use strict";
45354
+ init_define_WEB_FIRST_SEGMENTS();
44979
45355
  }
44980
45356
  });
44981
45357
 
44982
45358
  // src/core/checks/session/stale-memory.ts
44983
45359
  import { existsSync as existsSync4 } from "node:fs";
44984
- import { resolve as resolve6, isAbsolute } from "node:path";
45360
+ import { resolve as resolve7, isAbsolute as isAbsolute2 } from "node:path";
44985
45361
  function resolveRef2(ref, projectRoot) {
44986
45362
  if (ref.startsWith("~/") || ref === "~") {
44987
45363
  const home2 = process.env.HOME || process.env.USERPROFILE;
44988
45364
  if (!home2) return null;
44989
- return ref === "~" ? home2 : resolve6(home2, ref.slice(2));
45365
+ return ref === "~" ? home2 : resolve7(home2, ref.slice(2));
44990
45366
  }
44991
- if (isAbsolute(ref)) return ref;
44992
- return resolve6(projectRoot, ref);
45367
+ if (isAbsolute2(ref)) return ref;
45368
+ return resolve7(projectRoot, ref);
44993
45369
  }
44994
45370
  async function checkStaleMemory(ctx) {
44995
45371
  const issues = [];
@@ -45023,6 +45399,7 @@ async function checkStaleMemory(ctx) {
45023
45399
  var init_stale_memory = __esm({
45024
45400
  "src/core/checks/session/stale-memory.ts"() {
45025
45401
  "use strict";
45402
+ init_define_WEB_FIRST_SEGMENTS();
45026
45403
  init_session_parser();
45027
45404
  }
45028
45405
  });
@@ -45067,6 +45444,7 @@ var MIN_TOKEN_LEN2;
45067
45444
  var init_duplicate_memory = __esm({
45068
45445
  "src/core/checks/session/duplicate-memory.ts"() {
45069
45446
  "use strict";
45447
+ init_define_WEB_FIRST_SEGMENTS();
45070
45448
  init_session_parser();
45071
45449
  init_similarity();
45072
45450
  MIN_TOKEN_LEN2 = 5;
@@ -45074,9 +45452,9 @@ var init_duplicate_memory = __esm({
45074
45452
  });
45075
45453
 
45076
45454
  // src/core/checks/session/loop-detection.ts
45077
- import { resolve as resolve7 } from "node:path";
45455
+ import { resolve as resolve8 } from "node:path";
45078
45456
  function normalizeProject(p2) {
45079
- return resolve7(p2).replace(/\\/g, "/");
45457
+ return resolve8(p2).replace(/\\/g, "/");
45080
45458
  }
45081
45459
  function findConsecutiveRepeats(displays) {
45082
45460
  const results = [];
@@ -45158,6 +45536,7 @@ var CONSECUTIVE_THRESHOLD, CYCLE_REPEAT_THRESHOLD, MAX_CYCLE_LENGTH, MAX_HISTORY
45158
45536
  var init_loop_detection = __esm({
45159
45537
  "src/core/checks/session/loop-detection.ts"() {
45160
45538
  "use strict";
45539
+ init_define_WEB_FIRST_SEGMENTS();
45161
45540
  CONSECUTIVE_THRESHOLD = 3;
45162
45541
  CYCLE_REPEAT_THRESHOLD = 2;
45163
45542
  MAX_CYCLE_LENGTH = 3;
@@ -45214,6 +45593,7 @@ var MAX_LINES, MAX_BYTES;
45214
45593
  var init_memory_index_overflow = __esm({
45215
45594
  "src/core/checks/session/memory-index-overflow.ts"() {
45216
45595
  "use strict";
45596
+ init_define_WEB_FIRST_SEGMENTS();
45217
45597
  init_session_parser();
45218
45598
  init_fs();
45219
45599
  MAX_LINES = 200;
@@ -45279,6 +45659,7 @@ var RELEASE_FILENAME_PATTERNS, RELEASE_DOC_PATTERNS;
45279
45659
  var init_ci_coverage = __esm({
45280
45660
  "src/core/checks/ci-coverage.ts"() {
45281
45661
  "use strict";
45662
+ init_define_WEB_FIRST_SEGMENTS();
45282
45663
  init_fs();
45283
45664
  RELEASE_FILENAME_PATTERNS = [/release/i, /deploy/i, /publish/i, /\bcd\b/i];
45284
45665
  RELEASE_DOC_PATTERNS = [
@@ -45355,6 +45736,7 @@ var BUILTIN_SECRETS, SECRETS_REGEX;
45355
45736
  var init_ci_secrets = __esm({
45356
45737
  "src/core/checks/ci-secrets.ts"() {
45357
45738
  "use strict";
45739
+ init_define_WEB_FIRST_SEGMENTS();
45358
45740
  init_fs();
45359
45741
  BUILTIN_SECRETS = /* @__PURE__ */ new Set([
45360
45742
  "GITHUB_TOKEN",
@@ -45490,6 +45872,7 @@ var PATTERNS, PRIVATE_KEY_HEADER, PLACEHOLDER_TOKENS, COMMENT_PREFIX, ILLUSTRATI
45490
45872
  var init_content_secrets = __esm({
45491
45873
  "src/core/checks/content-secrets.ts"() {
45492
45874
  "use strict";
45875
+ init_define_WEB_FIRST_SEGMENTS();
45493
45876
  PATTERNS = [
45494
45877
  // AWS access key (long-lived) -- AKIA prefix + 16 uppercase alphanum chars.
45495
45878
  {
@@ -45595,14 +45978,90 @@ var init_content_secrets = __esm({
45595
45978
  }
45596
45979
  });
45597
45980
 
45981
+ // src/core/ignore-rules.ts
45982
+ function compileRules(rules) {
45983
+ return rules.map((r2) => ({
45984
+ check: r2.check,
45985
+ match: r2.match ? new RegExp(r2.match) : void 0,
45986
+ pathPattern: r2.pathPattern ? new RegExp(r2.pathPattern) : void 0,
45987
+ reason: r2.reason,
45988
+ fired: false,
45989
+ matchSource: r2.match,
45990
+ pathPatternSource: r2.pathPattern
45991
+ }));
45992
+ }
45993
+ function extractPathsFromMessage(msg) {
45994
+ const idx = msg.lastIndexOf(": ");
45995
+ if (idx === -1) return [];
45996
+ return msg.slice(idx + 2).split(", ").map((s) => s.trim()).filter(Boolean);
45997
+ }
45998
+ function applyIgnoreRules(issues, rules) {
45999
+ const compiled = compileRules(rules);
46000
+ const kept = [];
46001
+ let dropped = 0;
46002
+ for (const issue2 of issues) {
46003
+ let suppress = false;
46004
+ for (const rule of compiled) {
46005
+ if (rule.check !== issue2.check) continue;
46006
+ if (rule.pathPattern) {
46007
+ if (issue2.check !== "session-stale-memory") continue;
46008
+ const paths = extractPathsFromMessage(issue2.message);
46009
+ if (paths.length === 0) continue;
46010
+ const allMatch = paths.every((p2) => rule.pathPattern.test(p2));
46011
+ if (!allMatch) continue;
46012
+ }
46013
+ if (rule.match && !rule.match.test(issue2.message)) continue;
46014
+ suppress = true;
46015
+ rule.fired = true;
46016
+ break;
46017
+ }
46018
+ if (suppress) {
46019
+ dropped++;
46020
+ } else {
46021
+ kept.push(issue2);
46022
+ }
46023
+ }
46024
+ return {
46025
+ kept,
46026
+ dropped,
46027
+ unusedRules: compiled.filter((r2) => !r2.fired).map(stripCompiled),
46028
+ rulesMissingReason: rules.filter((r2) => !r2.reason)
46029
+ };
46030
+ }
46031
+ function stripCompiled(r2) {
46032
+ return {
46033
+ check: r2.check,
46034
+ match: r2.matchSource,
46035
+ pathPattern: r2.pathPatternSource,
46036
+ reason: r2.reason
46037
+ };
46038
+ }
46039
+ var init_ignore_rules = __esm({
46040
+ "src/core/ignore-rules.ts"() {
46041
+ "use strict";
46042
+ init_define_WEB_FIRST_SEGMENTS();
46043
+ }
46044
+ });
46045
+
46046
+ // src/core/types.ts
46047
+ var SESSION_AUDIT_LABEL, SESSION_AUDIT_PATH_MARKER;
46048
+ var init_types3 = __esm({
46049
+ "src/core/types.ts"() {
46050
+ "use strict";
46051
+ init_define_WEB_FIRST_SEGMENTS();
46052
+ SESSION_AUDIT_LABEL = "~/.claude/ (session audit)";
46053
+ SESSION_AUDIT_PATH_MARKER = "(session audit)";
46054
+ }
46055
+ });
46056
+
45598
46057
  // src/version.ts
45599
46058
  import { readFileSync as readFileSync5 } from "node:fs";
45600
- import { resolve as resolve8, dirname as dirname3 } from "node:path";
45601
- import { fileURLToPath } from "node:url";
46059
+ import { resolve as resolve9, dirname as dirname4 } from "node:path";
46060
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
45602
46061
  function loadVersion() {
45603
- if (true) return "0.10.2";
45604
- const __dir = dirname3(fileURLToPath(import.meta.url));
45605
- const pkgPath = resolve8(__dir, "../package.json");
46062
+ if (true) return "0.12.1";
46063
+ const __dir = dirname4(fileURLToPath2(import.meta.url));
46064
+ const pkgPath = resolve9(__dir, "../package.json");
45606
46065
  const pkg = JSON.parse(readFileSync5(pkgPath, "utf-8"));
45607
46066
  return pkg.version;
45608
46067
  }
@@ -45610,6 +46069,7 @@ var VERSION;
45610
46069
  var init_version2 = __esm({
45611
46070
  "src/version.ts"() {
45612
46071
  "use strict";
46072
+ init_define_WEB_FIRST_SEGMENTS();
45613
46073
  VERSION = loadVersion();
45614
46074
  }
45615
46075
  });
@@ -45854,7 +46314,7 @@ async function runAudit(projectRoot, activeChecks, options = {}) {
45854
46314
  const sessionResults = await Promise.all(sessionPromises);
45855
46315
  const sessionIssues = sessionResults.flat();
45856
46316
  fileResults.push({
45857
- path: "~/.claude/ (session audit)",
46317
+ path: SESSION_AUDIT_LABEL,
45858
46318
  isSymlink: false,
45859
46319
  tokens: 0,
45860
46320
  lines: 0,
@@ -45862,6 +46322,31 @@ async function runAudit(projectRoot, activeChecks, options = {}) {
45862
46322
  });
45863
46323
  }
45864
46324
  }
46325
+ let ignoreReport;
46326
+ if (options.ignoreRules && options.ignoreRules.length > 0) {
46327
+ const flat = [];
46328
+ const owners = [];
46329
+ fileResults.forEach((fr, idx) => {
46330
+ for (const issue2 of fr.issues) {
46331
+ flat.push(issue2);
46332
+ owners.push(idx);
46333
+ }
46334
+ });
46335
+ const applied = applyIgnoreRules(flat, options.ignoreRules);
46336
+ const keptSet = new Set(applied.kept);
46337
+ const rebuilt = fileResults.map(() => []);
46338
+ flat.forEach((issue2, i2) => {
46339
+ if (keptSet.has(issue2)) rebuilt[owners[i2]].push(issue2);
46340
+ });
46341
+ fileResults.forEach((fr, idx) => {
46342
+ fr.issues = rebuilt[idx];
46343
+ });
46344
+ ignoreReport = {
46345
+ dropped: applied.dropped,
46346
+ unusedRules: applied.unusedRules,
46347
+ rulesMissingReason: applied.rulesMissingReason
46348
+ };
46349
+ }
45865
46350
  let estimatedWaste = 0;
45866
46351
  for (const fr of fileResults) {
45867
46352
  for (const issue2 of fr.issues) {
@@ -45871,7 +46356,7 @@ async function runAudit(projectRoot, activeChecks, options = {}) {
45871
46356
  }
45872
46357
  }
45873
46358
  }
45874
- return {
46359
+ const result = {
45875
46360
  version: VERSION,
45876
46361
  scannedAt: (/* @__PURE__ */ new Date()).toISOString(),
45877
46362
  projectRoot,
@@ -45893,11 +46378,16 @@ async function runAudit(projectRoot, activeChecks, options = {}) {
45893
46378
  estimatedWaste
45894
46379
  }
45895
46380
  };
46381
+ if (ignoreReport) {
46382
+ result._meta = { ignoreReport };
46383
+ }
46384
+ return result;
45896
46385
  }
45897
46386
  var ALL_CHECKS, ALL_MCP_CHECKS, ALL_MCPH_CHECKS, ALL_SESSION_CHECKS;
45898
46387
  var init_audit = __esm({
45899
46388
  "src/core/audit.ts"() {
45900
46389
  "use strict";
46390
+ init_define_WEB_FIRST_SEGMENTS();
45901
46391
  init_scanner();
45902
46392
  init_parser();
45903
46393
  init_mcp_parser();
@@ -45935,6 +46425,8 @@ var init_audit = __esm({
45935
46425
  init_ci_coverage();
45936
46426
  init_ci_secrets();
45937
46427
  init_content_secrets();
46428
+ init_ignore_rules();
46429
+ init_types3();
45938
46430
  init_version2();
45939
46431
  ALL_CHECKS = [
45940
46432
  "paths",
@@ -46096,6 +46588,7 @@ function assembleStyles() {
46096
46588
  var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
46097
46589
  var init_ansi_styles = __esm({
46098
46590
  "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
46591
+ init_define_WEB_FIRST_SEGMENTS();
46099
46592
  ANSI_BACKGROUND_OFFSET = 10;
46100
46593
  wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
46101
46594
  wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -46291,6 +46784,7 @@ function createSupportsColor(stream, options = {}) {
46291
46784
  var env, flagForceColor, supportsColor, supports_color_default;
46292
46785
  var init_supports_color = __esm({
46293
46786
  "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js"() {
46787
+ init_define_WEB_FIRST_SEGMENTS();
46294
46788
  ({ env } = process4);
46295
46789
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
46296
46790
  flagForceColor = 0;
@@ -46336,6 +46830,7 @@ function stringEncaseCRLFWithFirstIndex(string4, prefix, postfix, index) {
46336
46830
  }
46337
46831
  var init_utilities = __esm({
46338
46832
  "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js"() {
46833
+ init_define_WEB_FIRST_SEGMENTS();
46339
46834
  }
46340
46835
  });
46341
46836
 
@@ -46362,6 +46857,7 @@ function createChalk(options) {
46362
46857
  var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions, Chalk, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default;
46363
46858
  var init_source = __esm({
46364
46859
  "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js"() {
46860
+ init_define_WEB_FIRST_SEGMENTS();
46365
46861
  init_ansi_styles();
46366
46862
  init_supports_color();
46367
46863
  init_utilities();
@@ -46574,7 +47070,8 @@ function applyFixes(result, options = {}) {
46574
47070
  const lineIdx = lineNum - 1;
46575
47071
  if (lineIdx < 0 || lineIdx >= lines.length) continue;
46576
47072
  let line = lines[lineIdx];
46577
- for (const fix of lineFixes) {
47073
+ const orderedLineFixes = [...lineFixes].sort((a, b2) => b2.oldText.length - a.oldText.length);
47074
+ for (const fix of orderedLineFixes) {
46578
47075
  if (line.includes(fix.oldText)) {
46579
47076
  line = line.replaceAll(fix.oldText, fix.newText);
46580
47077
  perFileFixCount++;
@@ -46612,17 +47109,169 @@ function applyFixes(result, options = {}) {
46612
47109
  var init_fixer = __esm({
46613
47110
  "src/core/fixer.ts"() {
46614
47111
  "use strict";
47112
+ init_define_WEB_FIRST_SEGMENTS();
46615
47113
  init_source();
46616
47114
  }
46617
47115
  });
46618
47116
 
47117
+ // src/core/config.ts
47118
+ import * as fs8 from "node:fs";
47119
+ import * as path11 from "node:path";
47120
+ function formatJsonError(content, err) {
47121
+ const msg = err instanceof Error ? err.message : String(err);
47122
+ const posMatch = msg.match(/position (\d+)/);
47123
+ if (posMatch) {
47124
+ return `${msg} (${posToLineCol(content, Number(posMatch[1]))})`;
47125
+ }
47126
+ if (/line \d+/.test(msg)) return msg;
47127
+ const pos = findFirstErrorPos(content, msg);
47128
+ if (pos !== null) {
47129
+ return `${msg} (${posToLineCol(content, pos)})`;
47130
+ }
47131
+ return msg;
47132
+ }
47133
+ function posToLineCol(content, pos) {
47134
+ const { line, column } = offsetToPosition(content, pos);
47135
+ return `line ${line}, column ${column}`;
47136
+ }
47137
+ function findFirstErrorPos(content, errMsg) {
47138
+ const snippetMatch = errMsg.match(/\.\.\."([^"]+(?:"[^"]*)*?)"\s+is not valid JSON/);
47139
+ if (snippetMatch) {
47140
+ const snippet = snippetMatch[1];
47141
+ const needle = snippet.split(/\s/).find((s) => s.length > 1);
47142
+ if (needle) {
47143
+ const idx = content.indexOf(needle);
47144
+ if (idx !== -1) return idx;
47145
+ }
47146
+ }
47147
+ const tokenMatch = errMsg.match(/Unexpected token\s+['"]?([^'",]+?)['"]?,/);
47148
+ if (tokenMatch) {
47149
+ const tok = tokenMatch[1];
47150
+ const idx = content.indexOf(tok);
47151
+ if (idx !== -1) return idx;
47152
+ }
47153
+ return null;
47154
+ }
47155
+ function suggestKey(unknown2) {
47156
+ let best = null;
47157
+ let bestDist = Infinity;
47158
+ for (const known of KNOWN_CONFIG_KEYS) {
47159
+ const d = levenshtein2(unknown2, known);
47160
+ if (d < bestDist) {
47161
+ bestDist = d;
47162
+ best = known;
47163
+ }
47164
+ }
47165
+ const threshold = Math.min(4, Math.max(2, Math.floor(unknown2.length / 3)));
47166
+ if (best && bestDist <= threshold) {
47167
+ return best;
47168
+ }
47169
+ return null;
47170
+ }
47171
+ function warnUnknownKeys(config2, source) {
47172
+ if (!config2 || typeof config2 !== "object" || Array.isArray(config2)) return;
47173
+ const keys = Object.keys(config2);
47174
+ const known = new Set(KNOWN_CONFIG_KEYS);
47175
+ for (const k3 of keys) {
47176
+ if (known.has(k3)) continue;
47177
+ const hint = suggestKey(k3);
47178
+ const suggestion = hint ? ` \u2014 did you mean "${hint}"?` : "";
47179
+ console.error(`Warning: unknown config key "${k3}" in ${source}${suggestion}`);
47180
+ }
47181
+ }
47182
+ function parseConfigContent(content, source) {
47183
+ let parsed;
47184
+ try {
47185
+ parsed = JSON.parse(content);
47186
+ } catch (err) {
47187
+ throw new Error(`Invalid JSON in ${source}: ${formatJsonError(content, err)}`, {
47188
+ cause: err
47189
+ });
47190
+ }
47191
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
47192
+ throw new Error(
47193
+ `Invalid config in ${source}: expected a JSON object at the root, got ${Array.isArray(parsed) ? "an array" : typeof parsed}`
47194
+ );
47195
+ }
47196
+ warnUnknownKeys(parsed, source);
47197
+ warnIgnoreRulePathPatternMisuse(parsed, source);
47198
+ return parsed;
47199
+ }
47200
+ function warnIgnoreRulePathPatternMisuse(config2, source) {
47201
+ if (!config2 || typeof config2 !== "object" || Array.isArray(config2)) return;
47202
+ const rules = config2.ignoreRules;
47203
+ if (!Array.isArray(rules)) return;
47204
+ for (const r2 of rules) {
47205
+ if (!r2 || typeof r2 !== "object") continue;
47206
+ const rec = r2;
47207
+ if (typeof rec.pathPattern !== "string") continue;
47208
+ if (rec.check === "session-stale-memory") continue;
47209
+ const checkName = typeof rec.check === "string" ? rec.check : "<unknown>";
47210
+ console.error(
47211
+ `Warning: ignoreRule with pathPattern is only honored for "session-stale-memory" (got "${checkName}") in ${source}`
47212
+ );
47213
+ }
47214
+ }
47215
+ function loadConfig(projectRoot) {
47216
+ for (const filename of CONFIG_FILENAMES) {
47217
+ const filePath = path11.join(projectRoot, filename);
47218
+ let content;
47219
+ try {
47220
+ content = stripBom(fs8.readFileSync(filePath, "utf-8"));
47221
+ } catch {
47222
+ continue;
47223
+ }
47224
+ return parseConfigContent(content, filePath);
47225
+ }
47226
+ return null;
47227
+ }
47228
+ function loadConfigFromExplicitPath(configPath) {
47229
+ let content;
47230
+ try {
47231
+ content = stripBom(fs8.readFileSync(configPath, "utf-8"));
47232
+ } catch (err) {
47233
+ const detail = err instanceof Error ? err.message : String(err);
47234
+ throw new Error(`could not load config from ${configPath}: ${detail}`, { cause: err });
47235
+ }
47236
+ return parseConfigContent(content, configPath);
47237
+ }
47238
+ var import_fast_levenshtein2, levenshtein2, KNOWN_CONFIG_KEYS, CONFIG_FILENAMES;
47239
+ var init_config2 = __esm({
47240
+ "src/core/config.ts"() {
47241
+ "use strict";
47242
+ init_define_WEB_FIRST_SEGMENTS();
47243
+ import_fast_levenshtein2 = __toESM(require_levenshtein(), 1);
47244
+ init_fs();
47245
+ init_positions();
47246
+ levenshtein2 = import_fast_levenshtein2.default.get;
47247
+ KNOWN_CONFIG_KEYS = [
47248
+ "checks",
47249
+ "ignore",
47250
+ "ignoreRules",
47251
+ "strict",
47252
+ "tokenThresholds",
47253
+ "contextFiles",
47254
+ "mcp",
47255
+ "mcpOnly",
47256
+ "mcpGlobal",
47257
+ "mcph",
47258
+ "mcphOnly",
47259
+ "mcphGlobal",
47260
+ "mcphStrictEnvToken",
47261
+ "session",
47262
+ "sessionOnly"
47263
+ ];
47264
+ CONFIG_FILENAMES = [".ctxlintrc", ".ctxlintrc.json"];
47265
+ }
47266
+ });
47267
+
46619
47268
  // src/mcp/server.ts
46620
47269
  var server_exports = {};
46621
47270
  __export(server_exports, {
46622
47271
  server: () => server,
46623
47272
  startServer: () => startServer
46624
47273
  });
46625
- import * as path10 from "node:path";
47274
+ import * as path12 from "node:path";
46626
47275
  function describeDisallowed(rawPath) {
46627
47276
  const m = rawPath.match(PATH_DISALLOWED);
46628
47277
  if (!m) return "unknown";
@@ -46635,12 +47284,19 @@ function validateProjectPath(rawPath) {
46635
47284
  `projectPath contains disallowed character ${describeDisallowed(rawPath)} (control chars and shell metacharacters are rejected)`
46636
47285
  );
46637
47286
  }
46638
- const resolved = path10.resolve(rawPath);
47287
+ const resolved = path12.resolve(rawPath);
46639
47288
  if (!isDirectory(resolved)) {
46640
47289
  throw new Error("projectPath is not an existing directory");
46641
47290
  }
46642
47291
  return resolved;
46643
47292
  }
47293
+ function safeLoadConfig(projectRoot) {
47294
+ try {
47295
+ return loadConfig(projectRoot);
47296
+ } catch {
47297
+ return null;
47298
+ }
47299
+ }
46644
47300
  function validateFilePathInput(rawPath) {
46645
47301
  if (PATH_DISALLOWED.test(rawPath)) {
46646
47302
  throw new Error(
@@ -46649,10 +47305,10 @@ function validateFilePathInput(rawPath) {
46649
47305
  }
46650
47306
  }
46651
47307
  function resolveWithinRoot(filePath, root) {
46652
- const resolvedRoot = path10.resolve(root);
46653
- const resolved = path10.resolve(resolvedRoot, filePath);
46654
- const rel = path10.relative(resolvedRoot, resolved);
46655
- if (rel.startsWith("..") || path10.isAbsolute(rel)) {
47308
+ const resolvedRoot = path12.resolve(root);
47309
+ const resolved = path12.resolve(resolvedRoot, filePath);
47310
+ const rel = path12.relative(resolvedRoot, resolved);
47311
+ if (rel.startsWith("..") || path12.isAbsolute(rel)) {
46656
47312
  throw new Error("path escapes the project root");
46657
47313
  }
46658
47314
  return resolved;
@@ -46666,6 +47322,7 @@ var contextCheckEnum, mcpCheckEnum, mcphCheckEnum, sessionCheckEnum, PATH_DISALL
46666
47322
  var init_server3 = __esm({
46667
47323
  "src/mcp/server.ts"() {
46668
47324
  "use strict";
47325
+ init_define_WEB_FIRST_SEGMENTS();
46669
47326
  init_mcp();
46670
47327
  init_stdio2();
46671
47328
  init_zod();
@@ -46673,6 +47330,7 @@ var init_server3 = __esm({
46673
47330
  init_parser();
46674
47331
  init_audit();
46675
47332
  init_fixer();
47333
+ init_config2();
46676
47334
  init_fs();
46677
47335
  init_git();
46678
47336
  init_tokens();
@@ -46705,7 +47363,10 @@ var init_server3 = __esm({
46705
47363
  try {
46706
47364
  const root = validateProjectPath(projectPath);
46707
47365
  const activeChecks = checks?.length ? checks : ALL_CHECKS;
46708
- const result = await runAudit(root, activeChecks);
47366
+ const config2 = safeLoadConfig(root);
47367
+ const result = await runAudit(root, activeChecks, {
47368
+ ignoreRules: config2?.ignoreRules
47369
+ });
46709
47370
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
46710
47371
  } catch (err) {
46711
47372
  const msg = err instanceof Error ? err.message : String(err);
@@ -46833,7 +47494,10 @@ var init_server3 = __esm({
46833
47494
  try {
46834
47495
  const root = validateProjectPath(projectPath);
46835
47496
  const activeChecks = checks?.length ? checks : ALL_CHECKS;
46836
- const result = await runAudit(root, activeChecks);
47497
+ const config2 = safeLoadConfig(root);
47498
+ const result = await runAudit(root, activeChecks, {
47499
+ ignoreRules: config2?.ignoreRules
47500
+ });
46837
47501
  const fixSummary = applyFixes(result, { quiet: true });
46838
47502
  return {
46839
47503
  content: [
@@ -46883,10 +47547,12 @@ var init_server3 = __esm({
46883
47547
  try {
46884
47548
  const root = validateProjectPath(projectPath);
46885
47549
  const activeChecks = checks?.length ? checks : ALL_MCP_CHECKS;
47550
+ const config2 = safeLoadConfig(root);
46886
47551
  const result = await runAudit(root, activeChecks, {
46887
47552
  mcp: true,
46888
47553
  mcpOnly: true,
46889
- mcpGlobal: includeGlobal || false
47554
+ mcpGlobal: includeGlobal || false,
47555
+ ignoreRules: config2?.ignoreRules
46890
47556
  });
46891
47557
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
46892
47558
  } catch (err) {
@@ -46924,11 +47590,13 @@ var init_server3 = __esm({
46924
47590
  try {
46925
47591
  const root = validateProjectPath(projectPath);
46926
47592
  const activeChecks = checks?.length ? checks : ALL_MCPH_CHECKS;
47593
+ const config2 = safeLoadConfig(root);
46927
47594
  const result = await runAudit(root, activeChecks, {
46928
47595
  mcph: true,
46929
47596
  mcphOnly: true,
46930
47597
  mcphGlobal: includeGlobal || false,
46931
- mcphStrictEnvToken: strictEnvToken || false
47598
+ mcphStrictEnvToken: strictEnvToken || false,
47599
+ ignoreRules: config2?.ignoreRules
46932
47600
  });
46933
47601
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
46934
47602
  } catch (err) {
@@ -46962,9 +47630,11 @@ var init_server3 = __esm({
46962
47630
  try {
46963
47631
  const root = validateProjectPath(projectPath);
46964
47632
  const activeChecks = checks?.length ? checks : ALL_SESSION_CHECKS;
47633
+ const config2 = safeLoadConfig(root);
46965
47634
  const result = await runAudit(root, activeChecks, {
46966
47635
  session: true,
46967
- sessionOnly: true
47636
+ sessionOnly: true,
47637
+ ignoreRules: config2?.ignoreRules
46968
47638
  });
46969
47639
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
46970
47640
  } catch (err) {
@@ -46987,6 +47657,7 @@ var init_server3 = __esm({
46987
47657
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js
46988
47658
  var require_error = __commonJS({
46989
47659
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/error.js"(exports) {
47660
+ init_define_WEB_FIRST_SEGMENTS();
46990
47661
  var CommanderError2 = class extends Error {
46991
47662
  /**
46992
47663
  * Constructs the CommanderError class
@@ -47022,6 +47693,7 @@ var require_error = __commonJS({
47022
47693
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js
47023
47694
  var require_argument = __commonJS({
47024
47695
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js"(exports) {
47696
+ init_define_WEB_FIRST_SEGMENTS();
47025
47697
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
47026
47698
  var Argument2 = class {
47027
47699
  /**
@@ -47150,6 +47822,7 @@ var require_argument = __commonJS({
47150
47822
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js
47151
47823
  var require_help = __commonJS({
47152
47824
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js"(exports) {
47825
+ init_define_WEB_FIRST_SEGMENTS();
47153
47826
  var { humanReadableArgName } = require_argument();
47154
47827
  var Help2 = class {
47155
47828
  constructor() {
@@ -47752,6 +48425,7 @@ ${itemIndentStr}`);
47752
48425
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js
47753
48426
  var require_option = __commonJS({
47754
48427
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js"(exports) {
48428
+ init_define_WEB_FIRST_SEGMENTS();
47755
48429
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
47756
48430
  var Option2 = class {
47757
48431
  /**
@@ -48065,6 +48739,7 @@ var require_option = __commonJS({
48065
48739
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js
48066
48740
  var require_suggestSimilar = __commonJS({
48067
48741
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/suggestSimilar.js"(exports) {
48742
+ init_define_WEB_FIRST_SEGMENTS();
48068
48743
  var maxDistance = 3;
48069
48744
  function editDistance(a, b2) {
48070
48745
  if (Math.abs(a.length - b2.length) > maxDistance)
@@ -48145,9 +48820,10 @@ var require_suggestSimilar = __commonJS({
48145
48820
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js
48146
48821
  var require_command = __commonJS({
48147
48822
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/command.js"(exports) {
48823
+ init_define_WEB_FIRST_SEGMENTS();
48148
48824
  var EventEmitter2 = __require("node:events").EventEmitter;
48149
48825
  var childProcess = __require("node:child_process");
48150
- var path13 = __require("node:path");
48826
+ var path14 = __require("node:path");
48151
48827
  var fs10 = __require("node:fs");
48152
48828
  var process11 = __require("node:process");
48153
48829
  var { Argument: Argument2, humanReadableArgName } = require_argument();
@@ -49160,9 +49836,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
49160
49836
  let launchWithNode = false;
49161
49837
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
49162
49838
  function findFile(baseDir, baseName) {
49163
- const localBin = path13.resolve(baseDir, baseName);
49839
+ const localBin = path14.resolve(baseDir, baseName);
49164
49840
  if (fs10.existsSync(localBin)) return localBin;
49165
- if (sourceExt.includes(path13.extname(baseName))) return void 0;
49841
+ if (sourceExt.includes(path14.extname(baseName))) return void 0;
49166
49842
  const foundExt = sourceExt.find(
49167
49843
  (ext) => fs10.existsSync(`${localBin}${ext}`)
49168
49844
  );
@@ -49180,17 +49856,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
49180
49856
  } catch {
49181
49857
  resolvedScriptPath = this._scriptPath;
49182
49858
  }
49183
- executableDir = path13.resolve(
49184
- path13.dirname(resolvedScriptPath),
49859
+ executableDir = path14.resolve(
49860
+ path14.dirname(resolvedScriptPath),
49185
49861
  executableDir
49186
49862
  );
49187
49863
  }
49188
49864
  if (executableDir) {
49189
49865
  let localFile = findFile(executableDir, executableFile);
49190
49866
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
49191
- const legacyName = path13.basename(
49867
+ const legacyName = path14.basename(
49192
49868
  this._scriptPath,
49193
- path13.extname(this._scriptPath)
49869
+ path14.extname(this._scriptPath)
49194
49870
  );
49195
49871
  if (legacyName !== this._name) {
49196
49872
  localFile = findFile(
@@ -49201,7 +49877,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
49201
49877
  }
49202
49878
  executableFile = localFile || executableFile;
49203
49879
  }
49204
- launchWithNode = sourceExt.includes(path13.extname(executableFile));
49880
+ launchWithNode = sourceExt.includes(path14.extname(executableFile));
49205
49881
  let proc;
49206
49882
  if (process11.platform !== "win32") {
49207
49883
  if (launchWithNode) {
@@ -50116,7 +50792,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
50116
50792
  * @return {Command}
50117
50793
  */
50118
50794
  nameFromFilename(filename) {
50119
- this._name = path13.basename(filename, path13.extname(filename));
50795
+ this._name = path14.basename(filename, path14.extname(filename));
50120
50796
  return this;
50121
50797
  }
50122
50798
  /**
@@ -50130,9 +50806,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
50130
50806
  * @param {string} [path]
50131
50807
  * @return {(string|null|Command)}
50132
50808
  */
50133
- executableDir(path14) {
50134
- if (path14 === void 0) return this._executableDir;
50135
- this._executableDir = path14;
50809
+ executableDir(path15) {
50810
+ if (path15 === void 0) return this._executableDir;
50811
+ this._executableDir = path15;
50136
50812
  return this;
50137
50813
  }
50138
50814
  /**
@@ -50391,6 +51067,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
50391
51067
  // node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js
50392
51068
  var require_commander = __commonJS({
50393
51069
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js"(exports) {
51070
+ init_define_WEB_FIRST_SEGMENTS();
50394
51071
  var { Argument: Argument2 } = require_argument();
50395
51072
  var { Command: Command2 } = require_command();
50396
51073
  var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
@@ -50414,6 +51091,7 @@ var require_commander = __commonJS({
50414
51091
  var import_index2, program, createCommand, createArgument, createOption, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Command, Argument, Option, Help;
50415
51092
  var init_esm3 = __esm({
50416
51093
  "node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs"() {
51094
+ init_define_WEB_FIRST_SEGMENTS();
50417
51095
  import_index2 = __toESM(require_commander(), 1);
50418
51096
  ({
50419
51097
  program,
@@ -50447,6 +51125,7 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
50447
51125
  var copyProperty, canCopyProperty, changePrototype, wrappedToString, toStringDescriptor, toStringName, changeToString;
50448
51126
  var init_mimic_function = __esm({
50449
51127
  "node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js"() {
51128
+ init_define_WEB_FIRST_SEGMENTS();
50450
51129
  copyProperty = (to, from, property, ignoreNonConfigurable) => {
50451
51130
  if (property === "length" || property === "prototype") {
50452
51131
  return;
@@ -50489,6 +51168,7 @@ ${fromBody}`;
50489
51168
  var calledFunctions, onetime, onetime_default;
50490
51169
  var init_onetime = __esm({
50491
51170
  "node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js"() {
51171
+ init_define_WEB_FIRST_SEGMENTS();
50492
51172
  init_mimic_function();
50493
51173
  calledFunctions = /* @__PURE__ */ new WeakMap();
50494
51174
  onetime = (function_, options = {}) => {
@@ -50526,6 +51206,7 @@ var init_onetime = __esm({
50526
51206
  var signals;
50527
51207
  var init_signals = __esm({
50528
51208
  "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js"() {
51209
+ init_define_WEB_FIRST_SEGMENTS();
50529
51210
  signals = [];
50530
51211
  signals.push("SIGHUP", "SIGINT", "SIGTERM");
50531
51212
  if (process.platform !== "win32") {
@@ -50555,6 +51236,7 @@ var init_signals = __esm({
50555
51236
  var processOk, kExitEmitter, global, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process5, onExit, load, unload;
50556
51237
  var init_mjs = __esm({
50557
51238
  "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js"() {
51239
+ init_define_WEB_FIRST_SEGMENTS();
50558
51240
  init_signals();
50559
51241
  processOk = (process11) => !!process11 && typeof process11 === "object" && typeof process11.removeListener === "function" && typeof process11.emit === "function" && typeof process11.reallyExit === "function" && typeof process11.listeners === "function" && typeof process11.kill === "function" && typeof process11.pid === "number" && typeof process11.on === "function";
50560
51242
  kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter");
@@ -50795,6 +51477,7 @@ import process6 from "node:process";
50795
51477
  var terminal, restoreCursor, restore_cursor_default;
50796
51478
  var init_restore_cursor = __esm({
50797
51479
  "node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js"() {
51480
+ init_define_WEB_FIRST_SEGMENTS();
50798
51481
  init_onetime();
50799
51482
  init_mjs();
50800
51483
  terminal = process6.stderr.isTTY ? process6.stderr : process6.stdout.isTTY ? process6.stdout : void 0;
@@ -50813,6 +51496,7 @@ import process7 from "node:process";
50813
51496
  var isHidden, cliCursor, cli_cursor_default;
50814
51497
  var init_cli_cursor = __esm({
50815
51498
  "node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js"() {
51499
+ init_define_WEB_FIRST_SEGMENTS();
50816
51500
  init_restore_cursor();
50817
51501
  isHidden = false;
50818
51502
  cliCursor = {};
@@ -52553,6 +53237,7 @@ var init_spinners = __esm({
52553
53237
  var cli_spinners_default, spinnersList;
52554
53238
  var init_cli_spinners = __esm({
52555
53239
  "node_modules/.pnpm/cli-spinners@3.4.0/node_modules/cli-spinners/index.js"() {
53240
+ init_define_WEB_FIRST_SEGMENTS();
52556
53241
  init_spinners();
52557
53242
  cli_spinners_default = spinners_default;
52558
53243
  spinnersList = Object.keys(spinners_default);
@@ -52564,6 +53249,7 @@ import tty2 from "node:tty";
52564
53249
  var hasColors, format2, reset, bold, dim, italic, underline, overline, inverse, hidden, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright;
52565
53250
  var init_base = __esm({
52566
53251
  "node_modules/.pnpm/yoctocolors@2.1.2/node_modules/yoctocolors/base.js"() {
53252
+ init_define_WEB_FIRST_SEGMENTS();
52567
53253
  hasColors = tty2?.WriteStream?.prototype?.hasColors?.() ?? false;
52568
53254
  format2 = (open, close) => {
52569
53255
  if (!hasColors) {
@@ -52637,6 +53323,7 @@ var init_base = __esm({
52637
53323
  // node_modules/.pnpm/yoctocolors@2.1.2/node_modules/yoctocolors/index.js
52638
53324
  var init_yoctocolors = __esm({
52639
53325
  "node_modules/.pnpm/yoctocolors@2.1.2/node_modules/yoctocolors/index.js"() {
53326
+ init_define_WEB_FIRST_SEGMENTS();
52640
53327
  init_base();
52641
53328
  init_base();
52642
53329
  }
@@ -52654,6 +53341,7 @@ function isUnicodeSupported() {
52654
53341
  }
52655
53342
  var init_is_unicode_supported = __esm({
52656
53343
  "node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js"() {
53344
+ init_define_WEB_FIRST_SEGMENTS();
52657
53345
  }
52658
53346
  });
52659
53347
 
@@ -52668,6 +53356,7 @@ __export(symbols_exports, {
52668
53356
  var _isUnicodeSupported, info, success2, warning, error48;
52669
53357
  var init_symbols = __esm({
52670
53358
  "node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/symbols.js"() {
53359
+ init_define_WEB_FIRST_SEGMENTS();
52671
53360
  init_yoctocolors();
52672
53361
  init_is_unicode_supported();
52673
53362
  _isUnicodeSupported = isUnicodeSupported();
@@ -52681,6 +53370,7 @@ var init_symbols = __esm({
52681
53370
  // node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/index.js
52682
53371
  var init_log_symbols = __esm({
52683
53372
  "node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/index.js"() {
53373
+ init_define_WEB_FIRST_SEGMENTS();
52684
53374
  init_symbols();
52685
53375
  }
52686
53376
  });
@@ -52695,6 +53385,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
52695
53385
  }
52696
53386
  var init_ansi_regex = __esm({
52697
53387
  "node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js"() {
53388
+ init_define_WEB_FIRST_SEGMENTS();
52698
53389
  }
52699
53390
  });
52700
53391
 
@@ -52711,6 +53402,7 @@ function stripAnsi(string4) {
52711
53402
  var regex;
52712
53403
  var init_strip_ansi = __esm({
52713
53404
  "node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js"() {
53405
+ init_define_WEB_FIRST_SEGMENTS();
52714
53406
  init_ansi_regex();
52715
53407
  regex = ansiRegex();
52716
53408
  }
@@ -52720,6 +53412,7 @@ var init_strip_ansi = __esm({
52720
53412
  var ambiguousRanges, fullwidthRanges, halfwidthRanges, narrowRanges, wideRanges;
52721
53413
  var init_lookup_data = __esm({
52722
53414
  "node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup-data.js"() {
53415
+ init_define_WEB_FIRST_SEGMENTS();
52723
53416
  ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
52724
53417
  fullwidthRanges = [12288, 12288, 65281, 65376, 65504, 65510];
52725
53418
  halfwidthRanges = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
@@ -52732,6 +53425,7 @@ var init_lookup_data = __esm({
52732
53425
  var isInRange;
52733
53426
  var init_utilities2 = __esm({
52734
53427
  "node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/utilities.js"() {
53428
+ init_define_WEB_FIRST_SEGMENTS();
52735
53429
  isInRange = (ranges, codePoint) => {
52736
53430
  let low = 0;
52737
53431
  let high = Math.floor(ranges.length / 2) - 1;
@@ -52771,6 +53465,7 @@ function findWideFastPathRange(ranges) {
52771
53465
  var minimumAmbiguousCodePoint, maximumAmbiguousCodePoint, minimumFullWidthCodePoint, maximumFullWidthCodePoint, minimumHalfWidthCodePoint, maximumHalfWidthCodePoint, minimumNarrowCodePoint, maximumNarrowCodePoint, minimumWideCodePoint, maximumWideCodePoint, commonCjkCodePoint, wideFastPathStart, wideFastPathEnd, isAmbiguous, isFullWidth, isWide;
52772
53466
  var init_lookup = __esm({
52773
53467
  "node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/lookup.js"() {
53468
+ init_define_WEB_FIRST_SEGMENTS();
52774
53469
  init_lookup_data();
52775
53470
  init_utilities2();
52776
53471
  minimumAmbiguousCodePoint = ambiguousRanges[0];
@@ -52824,6 +53519,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
52824
53519
  }
52825
53520
  var init_get_east_asian_width = __esm({
52826
53521
  "node_modules/.pnpm/get-east-asian-width@1.5.0/node_modules/get-east-asian-width/index.js"() {
53522
+ init_define_WEB_FIRST_SEGMENTS();
52827
53523
  init_lookup();
52828
53524
  }
52829
53525
  });
@@ -52896,6 +53592,7 @@ function stringWidth(input, options = {}) {
52896
53592
  var segmenter, zeroWidthClusterRegex, leadingNonPrintingRegex, rgiEmojiRegex, unqualifiedKeycapRegex, extendedPictographicRegex;
52897
53593
  var init_string_width = __esm({
52898
53594
  "node_modules/.pnpm/string-width@8.2.0/node_modules/string-width/index.js"() {
53595
+ init_define_WEB_FIRST_SEGMENTS();
52899
53596
  init_strip_ansi();
52900
53597
  init_get_east_asian_width();
52901
53598
  segmenter = new Intl.Segmenter();
@@ -52915,6 +53612,7 @@ function isInteractive({ stream = process.stdout } = {}) {
52915
53612
  }
52916
53613
  var init_is_interactive = __esm({
52917
53614
  "node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js"() {
53615
+ init_define_WEB_FIRST_SEGMENTS();
52918
53616
  }
52919
53617
  });
52920
53618
 
@@ -52923,6 +53621,7 @@ import process9 from "node:process";
52923
53621
  var ASCII_ETX_CODE, StdinDiscarder, stdinDiscarder, stdin_discarder_default;
52924
53622
  var init_stdin_discarder = __esm({
52925
53623
  "node_modules/.pnpm/stdin-discarder@0.3.1/node_modules/stdin-discarder/index.js"() {
53624
+ init_define_WEB_FIRST_SEGMENTS();
52926
53625
  ASCII_ETX_CODE = 3;
52927
53626
  StdinDiscarder = class {
52928
53627
  #activeCount = 0;
@@ -53002,6 +53701,7 @@ function ora(options) {
53002
53701
  var RENDER_DEFERRAL_TIMEOUT, SYNCHRONIZED_OUTPUT_ENABLE, SYNCHRONIZED_OUTPUT_DISABLE, activeHooksPerStream, Ora;
53003
53702
  var init_ora = __esm({
53004
53703
  "node_modules/.pnpm/ora@9.3.0/node_modules/ora/index.js"() {
53704
+ init_define_WEB_FIRST_SEGMENTS();
53005
53705
  init_source();
53006
53706
  init_cli_cursor();
53007
53707
  init_cli_spinners();
@@ -53460,7 +54160,7 @@ var init_ora = __esm({
53460
54160
  function classifyFile(f) {
53461
54161
  if (f.path === "(project)") return "context";
53462
54162
  if (f.path === "(mcp)") return "mcp";
53463
- if (f.path.includes("session audit")) return "session";
54163
+ if (f.path.includes(SESSION_AUDIT_PATH_MARKER)) return "session";
53464
54164
  for (const issue2 of f.issues) {
53465
54165
  if (issue2.check.startsWith("session-")) return "session";
53466
54166
  if (issue2.check.startsWith("mcph-")) return "mcph";
@@ -53474,7 +54174,7 @@ function classifyFile(f) {
53474
54174
  return "context";
53475
54175
  }
53476
54176
  function isSyntheticBucket(p2) {
53477
- return p2.startsWith("(") || p2.includes("session audit");
54177
+ return p2.startsWith("(") || p2.includes(SESSION_AUDIT_PATH_MARKER);
53478
54178
  }
53479
54179
  function formatText(result, verbose = false) {
53480
54180
  const lines = [];
@@ -53565,9 +54265,46 @@ function formatText(result, verbose = false) {
53565
54265
  if (result.summary.estimatedWaste > 0) {
53566
54266
  lines.push(` Estimated waste: ~${result.summary.estimatedWaste} tokens (redundant content)`);
53567
54267
  }
54268
+ const ig = result._meta?.ignoreReport;
54269
+ if (ig && (ig.dropped > 0 || ig.unusedRules.length > 0 || ig.rulesMissingReason.length > 0)) {
54270
+ lines.push("");
54271
+ lines.push(source_default.bold("Ignore rules"));
54272
+ if (ig.dropped > 0) {
54273
+ lines.push(
54274
+ source_default.dim(` ${ig.dropped} finding${ig.dropped !== 1 ? "s" : ""} dropped by ignoreRules`)
54275
+ );
54276
+ }
54277
+ if (ig.unusedRules.length > 0) {
54278
+ lines.push(
54279
+ source_default.yellow(
54280
+ ` ${ig.unusedRules.length} ignore rule${ig.unusedRules.length !== 1 ? "s" : ""} never fired (drift -- consider removing):`
54281
+ )
54282
+ );
54283
+ for (const r2 of ig.unusedRules) {
54284
+ lines.push(` - ${formatIgnoreRule(r2)}`);
54285
+ }
54286
+ }
54287
+ if (ig.rulesMissingReason.length > 0) {
54288
+ lines.push(
54289
+ source_default.yellow(
54290
+ ` ${ig.rulesMissingReason.length} ignore rule${ig.rulesMissingReason.length !== 1 ? "s" : ""} missing a "reason" field:`
54291
+ )
54292
+ );
54293
+ for (const r2 of ig.rulesMissingReason) {
54294
+ lines.push(` - ${formatIgnoreRule(r2)}`);
54295
+ }
54296
+ }
54297
+ }
53568
54298
  lines.push("");
53569
54299
  return lines.join("\n");
53570
54300
  }
54301
+ function formatIgnoreRule(r2) {
54302
+ const parts = [r2.check];
54303
+ if (r2.match) parts.push(`match=/${r2.match}/`);
54304
+ if (r2.pathPattern) parts.push(`pathPattern=/${r2.pathPattern}/`);
54305
+ if (r2.reason) parts.push(`reason="${r2.reason}"`);
54306
+ return parts.join(" ");
54307
+ }
53571
54308
  function formatJson(result) {
53572
54309
  return JSON.stringify(result, null, 2);
53573
54310
  }
@@ -53849,7 +54586,9 @@ var GROUP_ORDER, GROUP_LABELS, GROUP_SUMMARY_NOUNS;
53849
54586
  var init_reporter = __esm({
53850
54587
  "src/core/reporter.ts"() {
53851
54588
  "use strict";
54589
+ init_define_WEB_FIRST_SEGMENTS();
53852
54590
  init_source();
54591
+ init_types3();
53853
54592
  GROUP_ORDER = ["context", "mcp", "mcph", "session"];
53854
54593
  GROUP_LABELS = {
53855
54594
  context: "Context Files",
@@ -53866,154 +54605,13 @@ var init_reporter = __esm({
53866
54605
  }
53867
54606
  });
53868
54607
 
53869
- // src/core/config.ts
53870
- import * as fs8 from "node:fs";
53871
- import * as path11 from "node:path";
53872
- function formatJsonError(content, err) {
53873
- const msg = err instanceof Error ? err.message : String(err);
53874
- const posMatch = msg.match(/position (\d+)/);
53875
- if (posMatch) {
53876
- return `${msg} (${posToLineCol(content, Number(posMatch[1]))})`;
53877
- }
53878
- if (/line \d+/.test(msg)) return msg;
53879
- const pos = findFirstErrorPos(content, msg);
53880
- if (pos !== null) {
53881
- return `${msg} (${posToLineCol(content, pos)})`;
53882
- }
53883
- return msg;
53884
- }
53885
- function posToLineCol(content, pos) {
53886
- let line = 1;
53887
- let col = 1;
53888
- for (let i2 = 0; i2 < pos && i2 < content.length; i2++) {
53889
- if (content[i2] === "\n") {
53890
- line++;
53891
- col = 1;
53892
- } else {
53893
- col++;
53894
- }
53895
- }
53896
- return `line ${line}, column ${col}`;
53897
- }
53898
- function findFirstErrorPos(content, errMsg) {
53899
- const snippetMatch = errMsg.match(/\.\.\."([^"]+(?:"[^"]*)*?)"\s+is not valid JSON/);
53900
- if (snippetMatch) {
53901
- const snippet = snippetMatch[1];
53902
- const needle = snippet.split(/\s/).find((s) => s.length > 1);
53903
- if (needle) {
53904
- const idx = content.indexOf(needle);
53905
- if (idx !== -1) return idx;
53906
- }
53907
- }
53908
- const tokenMatch = errMsg.match(/Unexpected token\s+['"]?([^'",]+?)['"]?,/);
53909
- if (tokenMatch) {
53910
- const tok = tokenMatch[1];
53911
- const idx = content.indexOf(tok);
53912
- if (idx !== -1) return idx;
53913
- }
53914
- return null;
53915
- }
53916
- function suggestKey(unknown2) {
53917
- let best = null;
53918
- let bestDist = Infinity;
53919
- for (const known of KNOWN_CONFIG_KEYS) {
53920
- const d = levenshtein2(unknown2, known);
53921
- if (d < bestDist) {
53922
- bestDist = d;
53923
- best = known;
53924
- }
53925
- }
53926
- const threshold = Math.min(4, Math.max(2, Math.floor(unknown2.length / 3)));
53927
- if (best && bestDist <= threshold) {
53928
- return best;
53929
- }
53930
- return null;
53931
- }
53932
- function warnUnknownKeys(config2, source) {
53933
- if (!config2 || typeof config2 !== "object" || Array.isArray(config2)) return;
53934
- const keys = Object.keys(config2);
53935
- const known = new Set(KNOWN_CONFIG_KEYS);
53936
- for (const k3 of keys) {
53937
- if (known.has(k3)) continue;
53938
- const hint = suggestKey(k3);
53939
- const suggestion = hint ? ` \u2014 did you mean "${hint}"?` : "";
53940
- console.error(`Warning: unknown config key "${k3}" in ${source}${suggestion}`);
53941
- }
53942
- }
53943
- function parseConfigContent(content, source) {
53944
- let parsed;
53945
- try {
53946
- parsed = JSON.parse(content);
53947
- } catch (err) {
53948
- throw new Error(`Invalid JSON in ${source}: ${formatJsonError(content, err)}`, {
53949
- cause: err
53950
- });
53951
- }
53952
- if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
53953
- throw new Error(
53954
- `Invalid config in ${source}: expected a JSON object at the root, got ${Array.isArray(parsed) ? "an array" : typeof parsed}`
53955
- );
53956
- }
53957
- warnUnknownKeys(parsed, source);
53958
- return parsed;
53959
- }
53960
- function loadConfig(projectRoot) {
53961
- for (const filename of CONFIG_FILENAMES) {
53962
- const filePath = path11.join(projectRoot, filename);
53963
- let content;
53964
- try {
53965
- content = stripBom(fs8.readFileSync(filePath, "utf-8"));
53966
- } catch {
53967
- continue;
53968
- }
53969
- return parseConfigContent(content, filePath);
53970
- }
53971
- return null;
53972
- }
53973
- function loadConfigFromExplicitPath(configPath) {
53974
- let content;
53975
- try {
53976
- content = stripBom(fs8.readFileSync(configPath, "utf-8"));
53977
- } catch (err) {
53978
- const detail = err instanceof Error ? err.message : String(err);
53979
- throw new Error(`could not load config from ${configPath}: ${detail}`, { cause: err });
53980
- }
53981
- return parseConfigContent(content, configPath);
53982
- }
53983
- var import_fast_levenshtein2, levenshtein2, KNOWN_CONFIG_KEYS, CONFIG_FILENAMES;
53984
- var init_config2 = __esm({
53985
- "src/core/config.ts"() {
53986
- "use strict";
53987
- import_fast_levenshtein2 = __toESM(require_levenshtein(), 1);
53988
- init_fs();
53989
- levenshtein2 = import_fast_levenshtein2.default.get;
53990
- KNOWN_CONFIG_KEYS = [
53991
- "checks",
53992
- "ignore",
53993
- "strict",
53994
- "tokenThresholds",
53995
- "contextFiles",
53996
- "mcp",
53997
- "mcpOnly",
53998
- "mcpGlobal",
53999
- "mcph",
54000
- "mcphOnly",
54001
- "mcphGlobal",
54002
- "mcphStrictEnvToken",
54003
- "session",
54004
- "sessionOnly"
54005
- ];
54006
- CONFIG_FILENAMES = [".ctxlintrc", ".ctxlintrc.json"];
54007
- }
54008
- });
54009
-
54010
54608
  // src/cli.ts
54011
54609
  var cli_exports = {};
54012
54610
  __export(cli_exports, {
54013
54611
  runCli: () => runCli
54014
54612
  });
54015
54613
  import * as fs9 from "node:fs";
54016
- import * as path12 from "node:path";
54614
+ import * as path13 from "node:path";
54017
54615
  function validateCheckNames(names, source) {
54018
54616
  const invalid = names.filter((n7) => n7 && !VALID_CHECKS.has(n7));
54019
54617
  if (invalid.length > 0) {
@@ -54036,7 +54634,7 @@ async function runCli() {
54036
54634
  "Upgrade mcph-config/prefer-env-token from warning to error (strict env-var-only posture)",
54037
54635
  false
54038
54636
  ).option("--session", "Run session audit checks (cross-project consistency)", false).option("--session-only", "Run only session checks, skip context and MCP checks", false).option("--watch", "Re-lint on context file changes", false).action(async (projectPath, opts) => {
54039
- const resolvedPath = path12.resolve(projectPath);
54637
+ const resolvedPath = path13.resolve(projectPath);
54040
54638
  const { config: config2, options, activeChecks } = resolveSession(resolvedPath, opts);
54041
54639
  const spinner = options.format === "text" && !options.quiet ? ora("Scanning for context files...").start() : void 0;
54042
54640
  try {
@@ -54053,7 +54651,8 @@ async function runCli() {
54053
54651
  mcphStrictEnvToken: options.mcphStrictEnvToken,
54054
54652
  session: options.session,
54055
54653
  sessionOnly: options.sessionOnly,
54056
- tokenThresholds: config2?.tokenThresholds
54654
+ tokenThresholds: config2?.tokenThresholds,
54655
+ ignoreRules: config2?.ignoreRules
54057
54656
  });
54058
54657
  spinner?.stop();
54059
54658
  if (result.files.length === 0) {
@@ -54151,43 +54750,43 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
54151
54750
  const chalk2 = (await Promise.resolve().then(() => (init_source(), source_exports))).default;
54152
54751
  console.log(chalk2.dim("\nWatching for changes... (Ctrl+C to stop)\n"));
54153
54752
  const watchPaths = [
54154
- path12.join(resolvedPath, "CLAUDE.md"),
54155
- path12.join(resolvedPath, "CLAUDE.local.md"),
54156
- path12.join(resolvedPath, "AGENTS.md"),
54157
- path12.join(resolvedPath, "AGENT.md"),
54158
- path12.join(resolvedPath, ".cursorrules"),
54159
- path12.join(resolvedPath, ".windsurfrules"),
54160
- path12.join(resolvedPath, ".clinerules"),
54161
- path12.join(resolvedPath, ".aiderules"),
54162
- path12.join(resolvedPath, ".continuerules"),
54163
- path12.join(resolvedPath, ".rules"),
54164
- path12.join(resolvedPath, ".goosehints"),
54165
- path12.join(resolvedPath, "GEMINI.md"),
54166
- path12.join(resolvedPath, "replit.md"),
54167
- path12.join(resolvedPath, "package.json"),
54168
- path12.join(resolvedPath, ".mcp.json"),
54753
+ path13.join(resolvedPath, "CLAUDE.md"),
54754
+ path13.join(resolvedPath, "CLAUDE.local.md"),
54755
+ path13.join(resolvedPath, "AGENTS.md"),
54756
+ path13.join(resolvedPath, "AGENT.md"),
54757
+ path13.join(resolvedPath, ".cursorrules"),
54758
+ path13.join(resolvedPath, ".windsurfrules"),
54759
+ path13.join(resolvedPath, ".clinerules"),
54760
+ path13.join(resolvedPath, ".aiderules"),
54761
+ path13.join(resolvedPath, ".continuerules"),
54762
+ path13.join(resolvedPath, ".rules"),
54763
+ path13.join(resolvedPath, ".goosehints"),
54764
+ path13.join(resolvedPath, "GEMINI.md"),
54765
+ path13.join(resolvedPath, "replit.md"),
54766
+ path13.join(resolvedPath, "package.json"),
54767
+ path13.join(resolvedPath, ".mcp.json"),
54169
54768
  // mcph configs — without these, edits to the .mcph.json the user is
54170
54769
  // actively iterating on don't trigger a re-lint.
54171
- path12.join(resolvedPath, ".mcph.json"),
54172
- path12.join(resolvedPath, ".mcph.local.json"),
54770
+ path13.join(resolvedPath, ".mcph.json"),
54771
+ path13.join(resolvedPath, ".mcph.local.json"),
54173
54772
  // ctxlint config — re-resolve on edit so threshold changes,
54174
54773
  // ignore-list edits, and check-list overrides take effect without
54175
54774
  // restarting the watcher.
54176
- path12.join(resolvedPath, ".ctxlintrc"),
54177
- path12.join(resolvedPath, ".ctxlintrc.json")
54775
+ path13.join(resolvedPath, ".ctxlintrc"),
54776
+ path13.join(resolvedPath, ".ctxlintrc.json")
54178
54777
  ];
54179
54778
  const watchDirs = [
54180
- path12.join(resolvedPath, ".claude"),
54181
- path12.join(resolvedPath, ".cursor"),
54182
- path12.join(resolvedPath, ".github"),
54183
- path12.join(resolvedPath, ".windsurf"),
54184
- path12.join(resolvedPath, ".aide"),
54185
- path12.join(resolvedPath, ".amazonq"),
54186
- path12.join(resolvedPath, ".goose"),
54187
- path12.join(resolvedPath, ".junie"),
54188
- path12.join(resolvedPath, ".aiassistant"),
54189
- path12.join(resolvedPath, ".continue"),
54190
- path12.join(resolvedPath, ".vscode")
54779
+ path13.join(resolvedPath, ".claude"),
54780
+ path13.join(resolvedPath, ".cursor"),
54781
+ path13.join(resolvedPath, ".github"),
54782
+ path13.join(resolvedPath, ".windsurf"),
54783
+ path13.join(resolvedPath, ".aide"),
54784
+ path13.join(resolvedPath, ".amazonq"),
54785
+ path13.join(resolvedPath, ".goose"),
54786
+ path13.join(resolvedPath, ".junie"),
54787
+ path13.join(resolvedPath, ".aiassistant"),
54788
+ path13.join(resolvedPath, ".continue"),
54789
+ path13.join(resolvedPath, ".vscode")
54191
54790
  ];
54192
54791
  const watchers = [];
54193
54792
  let debounceTimer = null;
@@ -54219,7 +54818,8 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
54219
54818
  mcphStrictEnvToken: liveOptions.mcphStrictEnvToken,
54220
54819
  session: liveOptions.session,
54221
54820
  sessionOnly: liveOptions.sessionOnly,
54222
- tokenThresholds: liveConfig?.tokenThresholds
54821
+ tokenThresholds: liveConfig?.tokenThresholds,
54822
+ ignoreRules: liveConfig?.ignoreRules
54223
54823
  });
54224
54824
  if (result.files.length === 0) {
54225
54825
  console.log("\nNo context files found.\n");
@@ -54272,9 +54872,9 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
54272
54872
  }
54273
54873
  });
54274
54874
  program2.command("init").description("Set up a git pre-commit hook that runs ctxlint --strict").argument("[path]", "Project directory", ".").action(async (projectPath) => {
54275
- const resolvedRoot = path12.resolve(projectPath);
54276
- const gitDir = path12.join(resolvedRoot, ".git");
54277
- const hooksDir = path12.join(gitDir, "hooks");
54875
+ const resolvedRoot = path13.resolve(projectPath);
54876
+ const gitDir = path13.join(resolvedRoot, ".git");
54877
+ const hooksDir = path13.join(gitDir, "hooks");
54278
54878
  if (!fs9.existsSync(gitDir)) {
54279
54879
  console.error('Error: not a git repository. Run "git init" first.');
54280
54880
  process.exit(1);
@@ -54282,7 +54882,7 @@ Fixed ${applied.totalFixes} issue${applied.totalFixes !== 1 ? "s" : ""} in ${app
54282
54882
  if (!fs9.existsSync(hooksDir)) {
54283
54883
  fs9.mkdirSync(hooksDir, { recursive: true });
54284
54884
  }
54285
- const hookPath = path12.join(hooksDir, "pre-commit");
54885
+ const hookPath = path13.join(hooksDir, "pre-commit");
54286
54886
  const fullHookContent = `#!/bin/sh
54287
54887
  # ctxlint pre-commit hook
54288
54888
  npx @yawlabs/ctxlint@${VERSION} --strict
@@ -54318,7 +54918,7 @@ async function promptYesNo(question) {
54318
54918
  }
54319
54919
  }
54320
54920
  function resolveSession(resolvedPath, opts) {
54321
- const configPath = opts.config ? path12.resolve(opts.config) : void 0;
54921
+ const configPath = opts.config ? path13.resolve(opts.config) : void 0;
54322
54922
  const config2 = configPath ? loadConfigFromPath(configPath) : loadConfig(resolvedPath);
54323
54923
  const mcpGlobal = opts.mcpGlobal || config2?.mcpGlobal || false;
54324
54924
  const mcpOnly = opts.mcpOnly || config2?.mcpOnly || false;
@@ -54398,6 +54998,7 @@ var VALID_CHECKS;
54398
54998
  var init_cli = __esm({
54399
54999
  "src/cli.ts"() {
54400
55000
  "use strict";
55001
+ init_define_WEB_FIRST_SEGMENTS();
54401
55002
  init_esm3();
54402
55003
  init_ora();
54403
55004
  init_paths();
@@ -54419,6 +55020,7 @@ var init_cli = __esm({
54419
55020
  });
54420
55021
 
54421
55022
  // src/index.ts
55023
+ init_define_WEB_FIRST_SEGMENTS();
54422
55024
  var args = process.argv.slice(2);
54423
55025
  if (args[0] === "serve" || args.includes("--mcp-server")) {
54424
55026
  const { startServer: startServer2 } = await Promise.resolve().then(() => (init_server3(), server_exports));