token-goat 2.9.1 → 2.9.3

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 (29) hide show
  1. package/README.md +38 -765
  2. package/SECURITY.md +1 -1
  3. package/dist/{token-goat-chunk-RRNRPCLX.mjs → token-goat-chunk-2VVXTAGD.mjs} +192 -16
  4. package/dist/{token-goat-chunk-CD6U5OD6.mjs → token-goat-chunk-3UBORD6Z.mjs} +9 -6
  5. package/dist/{token-goat-chunk-FDXINYK4.mjs → token-goat-chunk-3XVGPLDS.mjs} +3592 -63
  6. package/dist/{token-goat-chunk-SQSB5P5P.mjs → token-goat-chunk-6FQMEMWX.mjs} +583 -107
  7. package/dist/{token-goat-chunk-SXSWQMNP.mjs → token-goat-chunk-7A7SBE6R.mjs} +166 -72
  8. package/dist/token-goat-chunk-A37V4PBF.mjs +56 -0
  9. package/dist/{token-goat-chunk-MR7MNSDR.mjs → token-goat-chunk-A4VBNWSL.mjs} +20 -3
  10. package/dist/{token-goat-chunk-G6XLWJWI.mjs → token-goat-chunk-E3K3BTEQ.mjs} +5 -2
  11. package/dist/{token-goat-chunk-AO2QD2AG.mjs → token-goat-chunk-EEIDFMEM.mjs} +4 -0
  12. package/dist/{token-goat-chunk-324QOJYZ.mjs → token-goat-chunk-EVC4TOLE.mjs} +4 -1
  13. package/dist/{token-goat-chunk-WN5T5EW5.mjs → token-goat-chunk-FQD3OB5W.mjs} +98 -2
  14. package/dist/token-goat-chunk-HC5NMGPD.mjs +23 -0
  15. package/dist/{token-goat-chunk-4ZDRTNGV.mjs → token-goat-chunk-KKHKXUVS.mjs} +317 -32
  16. package/dist/{token-goat-chunk-4KD2N46D.mjs → token-goat-chunk-LLNA42NI.mjs} +10 -12
  17. package/dist/{token-goat-chunk-5CVKO3DA.mjs → token-goat-chunk-LYWIRYCF.mjs} +5 -2
  18. package/dist/{token-goat-chunk-LHMC5ENL.mjs → token-goat-chunk-OKJX2JWW.mjs} +6 -1
  19. package/dist/{token-goat-chunk-R4SR7MQY.mjs → token-goat-chunk-PXWBHSFB.mjs} +2 -2
  20. package/dist/{token-goat-chunk-V5T3YNYR.mjs → token-goat-chunk-XSSQFI4C.mjs} +7 -7
  21. package/dist/token-goat-hook.mjs +12 -7
  22. package/dist/token-goat.core.mjs +10 -7
  23. package/docs/C4_RUNTIME_ARCHITECTURE.md +303 -0
  24. package/docs/cli.md +392 -0
  25. package/docs/install.md +331 -0
  26. package/docs/security.md +106 -0
  27. package/package.json +14 -3
  28. package/dist/token-goat-chunk-AEX54RUZ.mjs +0 -11
  29. package/dist/token-goat-chunk-AUM22UQ2.mjs +0 -23
@@ -43,6 +43,7 @@ import {
43
43
  mergeNearbyHits,
44
44
  ocrImage,
45
45
  ocrIntegrityFailed,
46
+ parseIpv6Groups,
46
47
  parseWhereSpecs,
47
48
  pathEqClause,
48
49
  probeImageMeta,
@@ -67,7 +68,7 @@ import {
67
68
  walkProject,
68
69
  yamlLineClosesQuote,
69
70
  yamlOpenQuoteAfter
70
- } from "./token-goat-chunk-FDXINYK4.mjs";
71
+ } from "./token-goat-chunk-3XVGPLDS.mjs";
71
72
  import {
72
73
  Database,
73
74
  PER_FILE_COUNTERFACTUAL_CEILING,
@@ -121,12 +122,16 @@ import {
121
122
  unsupportedLanguageName,
122
123
  windowsCmdQuoteArg,
123
124
  withExtension
124
- } from "./token-goat-chunk-4ZDRTNGV.mjs";
125
+ } from "./token-goat-chunk-KKHKXUVS.mjs";
125
126
  import {
126
127
  registerReset
127
- } from "./token-goat-chunk-AO2QD2AG.mjs";
128
+ } from "./token-goat-chunk-EEIDFMEM.mjs";
129
+ import {
130
+ init_define_import_meta_env
131
+ } from "./token-goat-chunk-A37V4PBF.mjs";
128
132
 
129
133
  // src/section_reader.ts
134
+ init_define_import_meta_env();
130
135
  import { readFileSync } from "node:fs";
131
136
  function parseHeadingSpec(spec, headers) {
132
137
  const m = /^([^#\r\n]+)#(\d+)$/.exec(spec);
@@ -446,6 +451,7 @@ function listSections(filePath, readFn) {
446
451
  }
447
452
 
448
453
  // src/graph_commands.ts
454
+ init_define_import_meta_env();
449
455
  import * as fs6 from "node:fs";
450
456
  import * as os from "node:os";
451
457
  import * as path6 from "node:path";
@@ -453,10 +459,12 @@ import { execFileSync, spawnSync as spawnSync2 } from "node:child_process";
453
459
  import { randomUUID } from "node:crypto";
454
460
 
455
461
  // src/read_commands.ts
462
+ init_define_import_meta_env();
456
463
  import * as fs4 from "node:fs";
457
464
  import * as path4 from "node:path";
458
465
 
459
466
  // src/json_query.ts
467
+ init_define_import_meta_env();
460
468
  function jsonType(value) {
461
469
  if (value === null) return "null";
462
470
  if (Array.isArray(value)) return "array";
@@ -595,6 +603,7 @@ function queryJson(data, spec) {
595
603
  }
596
604
 
597
605
  // src/xml_query.ts
606
+ init_define_import_meta_env();
598
607
  var XML_NAME_START = "A-Za-z_:\xC0-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uD800-\uDFFF\uF900-\uFDCF\uFDF0-\uFFFD";
599
608
  var XML_NAME_REST = "A-Za-z_:\xC0-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uD800-\uDFFF\uF900-\uFDCF\uFDF0-\uFFFD0-9.\xB7\u0300-\u036F\u203F-\u2040-";
600
609
  var XML_NAME = `[${XML_NAME_START}][${XML_NAME_REST}]*`;
@@ -1063,6 +1072,7 @@ function queryXml(xmlText, pathStr) {
1063
1072
  }
1064
1073
 
1065
1074
  // node_modules/js-yaml/dist/js-yaml.mjs
1075
+ init_define_import_meta_env();
1066
1076
  var NOT_RESOLVED = /* @__PURE__ */ Symbol("NOT_RESOLVED");
1067
1077
  function defineScalarTag(tagName, options) {
1068
1078
  return {
@@ -2347,24 +2357,32 @@ function collectionTagName(state, event, defaultTagName) {
2347
2357
  function isMappingTag(tag) {
2348
2358
  return tag.nodeKind === "mapping";
2349
2359
  }
2360
+ function chargeMergeWork(state) {
2361
+ state.totalMergeKeys++;
2362
+ if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`);
2363
+ }
2350
2364
  function mergeKeys(state, frame, source, sourceTag) {
2365
+ chargeMergeWork(state);
2351
2366
  for (const sourceKey of sourceTag.keys(source)) {
2352
- if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`);
2367
+ chargeMergeWork(state);
2353
2368
  if (frame.tag.has(frame.value, sourceKey)) continue;
2354
2369
  const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey));
2355
2370
  if (err) throwError$1(state, err);
2356
- (frame.overridable ??= /* @__PURE__ */ new Set()).add(sourceKey);
2371
+ frame.overridable ??= /* @__PURE__ */ new Set();
2372
+ frame.overridable.add(sourceKey);
2357
2373
  }
2358
2374
  }
2359
2375
  function mergeSource(state, frame, source, sourceTag) {
2360
2376
  state.position = frame.keyPosition;
2361
2377
  if (isMappingTag(sourceTag)) mergeKeys(state, frame, source, sourceTag);
2362
- else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) for (const element of source) {
2363
- const elementTag = state.nodeTags.get(element);
2364
- if (!elementTag) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
2365
- mergeKeys(state, frame, element, elementTag);
2366
- }
2367
- else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
2378
+ else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) {
2379
+ if (source.length > 100) throwError$1(state, "abnormal merge sequence size");
2380
+ for (const element of source) {
2381
+ const elementTag = state.nodeTags.get(element);
2382
+ if (!elementTag) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
2383
+ mergeKeys(state, frame, element, elementTag);
2384
+ }
2385
+ } else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable");
2368
2386
  }
2369
2387
  function addMappingValue(state, frame, key, value, tag) {
2370
2388
  state.position = frame.keyPosition;
@@ -2707,6 +2725,24 @@ function testDocumentSeparator(state, position = state.position) {
2707
2725
  }
2708
2726
  return false;
2709
2727
  }
2728
+ function skipByteOrderMark(state) {
2729
+ if (state.position === state.lineStart && state.input.charCodeAt(state.position) === 65279) {
2730
+ state.position++;
2731
+ state.lineStart = state.position;
2732
+ }
2733
+ }
2734
+ function testDocumentBoundary(state) {
2735
+ if (state.position !== state.lineStart) return false;
2736
+ if (testDocumentSeparator(state)) return true;
2737
+ if (state.input.charCodeAt(state.position) !== 65279) return false;
2738
+ const snapshot = snapshotState(state);
2739
+ skipByteOrderMark(state);
2740
+ skipSeparationSpace(state, true);
2741
+ const ch = state.input.charCodeAt(state.position);
2742
+ const result = state.position === state.lineStart && (ch === 37 || ch === 45 && testDocumentSeparator(state));
2743
+ restoreState(state, snapshot);
2744
+ return result;
2745
+ }
2710
2746
  function skipUntilLineEnd(state) {
2711
2747
  let ch = state.input.charCodeAt(state.position);
2712
2748
  while (ch !== 0 && !isEol(ch)) ch = state.input.charCodeAt(++state.position);
@@ -2890,7 +2926,7 @@ function readBlockScalar(state, parentIndent, props) {
2890
2926
  } else if (column > 0) valueEnd = linePosition + column;
2891
2927
  break;
2892
2928
  }
2893
- if (linePosition === state.lineStart && testDocumentSeparator(state, linePosition)) break;
2929
+ if (testDocumentBoundary(state)) break;
2894
2930
  if (!detectedIndent && contentIndent === -1 && isEol(first)) maxLeadingIndent = Math.max(maxLeadingIndent, column);
2895
2931
  if (!detectedIndent && contentIndent === -1 && !isEol(first)) {
2896
2932
  if (first === 9 && column < parentIndent) {
@@ -2943,7 +2979,7 @@ function readPlainScalar(state, nodeIndent, nodeContext, props) {
2943
2979
  const inFlow = nodeContext === CONTEXT_FLOW_IN;
2944
2980
  let multiline = false;
2945
2981
  while (ch !== 0) {
2946
- if (state.position === state.lineStart && testDocumentSeparator(state)) break;
2982
+ if (testDocumentBoundary(state)) break;
2947
2983
  if (ch === 58) {
2948
2984
  const following = state.input.charCodeAt(state.position + 1);
2949
2985
  if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) break;
@@ -3300,7 +3336,7 @@ function readDocument(state) {
3300
3336
  const documentEvent = state.events[documentEventIndex];
3301
3337
  if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd;
3302
3338
  addPopEvent(state);
3303
- if (!explicitEnd && state.position < state.length && !(state.position === state.lineStart && testDocumentSeparator(state))) throwError(state, "end of the stream or a document separator is expected");
3339
+ if (!explicitEnd && state.position < state.length && !testDocumentBoundary(state)) throwError(state, "end of the stream or a document separator is expected");
3304
3340
  }
3305
3341
  function parseEvents(input, options) {
3306
3342
  const length = input.length;
@@ -3321,8 +3357,8 @@ function parseEvents(input, options) {
3321
3357
  };
3322
3358
  const nullpos = input.indexOf("\0");
3323
3359
  if (nullpos !== -1) YAMLException.throwAt(input, nullpos, "null byte is not allowed in input", state.filename);
3324
- if (state.input.charCodeAt(state.position) === 65279) state.position++;
3325
3360
  while (state.position < state.length) {
3361
+ skipByteOrderMark(state);
3326
3362
  skipSeparationSpace(state, true);
3327
3363
  if (state.position >= state.length) break;
3328
3364
  const documentStart = state.position;
@@ -3363,27 +3399,108 @@ function load(input, options) {
3363
3399
  if (documents.length === 1) return documents[0];
3364
3400
  throw new YAMLException("expected a single document in the stream, but found more");
3365
3401
  }
3366
- var ESCAPE_SEQUENCES = {};
3367
- ESCAPE_SEQUENCES[0] = "\\0";
3368
- ESCAPE_SEQUENCES[7] = "\\a";
3369
- ESCAPE_SEQUENCES[8] = "\\b";
3370
- ESCAPE_SEQUENCES[9] = "\\t";
3371
- ESCAPE_SEQUENCES[10] = "\\n";
3372
- ESCAPE_SEQUENCES[11] = "\\v";
3373
- ESCAPE_SEQUENCES[12] = "\\f";
3374
- ESCAPE_SEQUENCES[13] = "\\r";
3375
- ESCAPE_SEQUENCES[27] = "\\e";
3376
- ESCAPE_SEQUENCES[34] = '\\"';
3377
- ESCAPE_SEQUENCES[92] = "\\\\";
3378
- ESCAPE_SEQUENCES[133] = "\\N";
3379
- ESCAPE_SEQUENCES[160] = "\\_";
3380
- ESCAPE_SEQUENCES[8232] = "\\L";
3381
- ESCAPE_SEQUENCES[8233] = "\\P";
3402
+ function hasBit(mask, bit) {
3403
+ return (mask & 1 << bit) !== 0;
3404
+ }
3405
+ var DEFAULT_SCALAR_STYLE_RULES = {
3406
+ applyQuoteFlowKeysOption,
3407
+ doubleQuoteForInvisibles,
3408
+ doubleQuoteWhitespaceOnly,
3409
+ applyForceQuotesOption,
3410
+ tryLongOrMultilineAsBlock,
3411
+ quoteInvalidPlain,
3412
+ fallbackToDoubleQuoted
3413
+ };
3414
+ function _preferredQuotedStyle(layout) {
3415
+ if (layout.presenterOptions.quoteStyle === "single" && hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) return SCALAR_STYLE.SINGLE_QUOTED;
3416
+ return SCALAR_STYLE.DOUBLE_QUOTED;
3417
+ }
3418
+ function applyQuoteFlowKeysOption(layout) {
3419
+ if (!layout.presenterOptions.quoteFlowKeys) return;
3420
+ if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return;
3421
+ layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
3422
+ }
3423
+ function doubleQuoteForInvisibles(layout) {
3424
+ if (layout.style === SCALAR_STYLE.PLAIN && /[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
3425
+ }
3426
+ function doubleQuoteWhitespaceOnly(layout) {
3427
+ if (layout.style === SCALAR_STYLE.PLAIN && /^\s+$/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
3428
+ }
3429
+ function applyForceQuotesOption(layout) {
3430
+ if (!layout.presenterOptions.forceQuotes) return;
3431
+ if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return;
3432
+ layout.style = layout.node.value.includes("\n") ? SCALAR_STYLE.DOUBLE_QUOTED : _preferredQuotedStyle(layout);
3433
+ }
3434
+ function tryLongOrMultilineAsBlock(layout) {
3435
+ if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return;
3436
+ const value = layout.node.value;
3437
+ const multiline = value.indexOf("\n") !== -1;
3438
+ if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) {
3439
+ if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
3440
+ return;
3441
+ }
3442
+ const w = layout.presenterOptions.lineWidth;
3443
+ if (w === -1) {
3444
+ if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK;
3445
+ return;
3446
+ }
3447
+ const availableWidth = Math.max(Math.min(w, 40), w - layout.shiftOfContent);
3448
+ let position = 0;
3449
+ let shouldFold = false;
3450
+ while (position <= value.length) {
3451
+ let lineEnd = value.length;
3452
+ const nextLineBreak = value.indexOf("\n", position);
3453
+ if (nextLineBreak !== -1) lineEnd = nextLineBreak;
3454
+ const line = value.slice(position, lineEnd);
3455
+ if (line.length > availableWidth && line[0] !== " " && / [^ \t]/.test(line)) shouldFold = true;
3456
+ if (nextLineBreak === -1) break;
3457
+ position = nextLineBreak + 1;
3458
+ }
3459
+ if (shouldFold) layout.style = SCALAR_STYLE.FOLDED_BLOCK;
3460
+ else if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK;
3461
+ }
3462
+ function quoteInvalidPlain(layout) {
3463
+ if (layout.style === SCALAR_STYLE.PLAIN && !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) layout.style = _preferredQuotedStyle(layout);
3464
+ }
3465
+ function fallbackToDoubleQuoted(layout) {
3466
+ if (!hasBit(layout.allowedStylesMask, layout.style)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED;
3467
+ }
3468
+ var SRC_C_PRINTABLE = "[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]";
3469
+ var SRC_B_CHAR = "[\\n\\r]";
3470
+ var SRC_C_BYTE_ORDER_MARK = "\\uFEFF";
3471
+ var SRC_S_WHITE = "[ \\t]";
3472
+ var SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`;
3473
+ var SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`;
3474
+ var SRC_NB_JSON = "[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]";
3475
+ var SRC_C_INDICATOR = "[-?:,\\[\\]{}#&*!|>'\"%@`]";
3476
+ var SRC_C_FLOW_INDICATOR = "[,\\[\\]{}]";
3477
+ var SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR;
3478
+ var SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`;
3479
+ var SRC_NS_PLAIN_FIRST_FLOW_OUT = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`;
3480
+ var SRC_NS_PLAIN_FIRST_FLOW_IN = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`;
3481
+ var SRC_NS_PLAIN_CHAR_FLOW_OUT = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`;
3482
+ var SRC_NS_PLAIN_CHAR_FLOW_IN = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`;
3483
+ var SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`;
3484
+ var SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`;
3485
+ var SRC_NS_PLAIN_ONE_LINE_FLOW_OUT = `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`;
3486
+ var SRC_NS_PLAIN_ONE_LINE_FLOW_IN = `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`;
3487
+ var SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT;
3488
+ var SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN;
3489
+ var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`;
3490
+ var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`;
3491
+ var SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT = `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`;
3492
+ var SRC_NS_PLAIN_MULTI_LINE_FLOW_IN = `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`;
3493
+ var NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, "u");
3494
+ var NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, "u");
3495
+ var NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, "u");
3496
+ var NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, "u");
3497
+ var NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, "u");
3498
+ var NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\n)*$`, "u");
3499
+ var BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\n)*$`, "u");
3382
3500
  var DEFAULT_PRESENTER_OPTIONS = {
3383
3501
  indent: 2,
3384
3502
  seqNoIndent: false,
3385
3503
  seqInlineFirst: true,
3386
- sortKeys: false,
3387
3504
  lineWidth: 80,
3388
3505
  flowBracketPadding: false,
3389
3506
  flowSkipCommaSpace: false,
@@ -3391,6 +3508,7 @@ var DEFAULT_PRESENTER_OPTIONS = {
3391
3508
  quoteFlowKeys: false,
3392
3509
  quoteStyle: "single",
3393
3510
  forceQuotes: false,
3511
+ scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES).map((name) => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)),
3394
3512
  tagBeforeAnchor: false
3395
3513
  };
3396
3514
  var DEFAULT_DUMP_OPTIONS = {
@@ -3399,6 +3517,7 @@ var DEFAULT_DUMP_OPTIONS = {
3399
3517
  skipInvalid: false,
3400
3518
  noRefs: false,
3401
3519
  flowLevel: -1,
3520
+ sortKeys: false,
3402
3521
  transform: () => {
3403
3522
  }
3404
3523
  };
@@ -3420,6 +3539,7 @@ var CHOMPING_STRIP = CHOMPING_MODE.STRIP;
3420
3539
  var CHOMPING_KEEP = CHOMPING_MODE.KEEP;
3421
3540
 
3422
3541
  // src/openapi_query.ts
3542
+ init_define_import_meta_env();
3423
3543
  import * as path from "node:path";
3424
3544
  var HTTP_METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
3425
3545
  function parseOpenApiSpec(text, filePath) {
@@ -3566,6 +3686,7 @@ function formatOperationDetail(op) {
3566
3686
  }
3567
3687
 
3568
3688
  // src/archive_query.ts
3689
+ init_define_import_meta_env();
3569
3690
  var loadFflate = createLazyModuleLoader(
3570
3691
  async () => await import("fflate"),
3571
3692
  "archive reading disabled (fflate unavailable)"
@@ -3609,6 +3730,7 @@ async function extractZipEntry(data, entryPath) {
3609
3730
  }
3610
3731
 
3611
3732
  // src/pr_slice.ts
3733
+ init_define_import_meta_env();
3612
3734
  import { spawnSync } from "node:child_process";
3613
3735
  var _ghAvailable;
3614
3736
  function isGhAvailable() {
@@ -3778,6 +3900,7 @@ ${c.body}`).join("\n\n");
3778
3900
  }
3779
3901
 
3780
3902
  // src/sqlite_query.ts
3903
+ init_define_import_meta_env();
3781
3904
  import * as fs from "node:fs";
3782
3905
  var SQLITE_QUERY_ROW_CAP = 5e3;
3783
3906
  var SQLITE_MAGIC = Buffer.from([83, 81, 76, 105, 116, 101, 32, 102, 111, 114, 109, 97, 116, 32, 51, 0]);
@@ -4040,6 +4163,7 @@ function quoteCsvCellLocal(cell) {
4040
4163
  }
4041
4164
 
4042
4165
  // src/coverage_query.ts
4166
+ init_define_import_meta_env();
4043
4167
  function num(v) {
4044
4168
  return typeof v === "number" && Number.isFinite(v) ? v : 0;
4045
4169
  }
@@ -4341,6 +4465,7 @@ function formatCoverageGaps(report) {
4341
4465
  }
4342
4466
 
4343
4467
  // src/conflict_query.ts
4468
+ init_define_import_meta_env();
4344
4469
  var OURS_RE = /^<{7}(?:\s+(.*))?$/;
4345
4470
  var BASE_RE = /^\|{7}(?:\s+(.*))?$/;
4346
4471
  var SEP_RE = /^={7}\s*$/;
@@ -4505,6 +4630,7 @@ function formatConflictSummaries(summaries) {
4505
4630
  }
4506
4631
 
4507
4632
  // src/screenshot.ts
4633
+ init_define_import_meta_env();
4508
4634
  import dns from "node:dns/promises";
4509
4635
  import fs2 from "node:fs";
4510
4636
  import path2 from "node:path";
@@ -4574,43 +4700,6 @@ function isBlockedIpv4Octets(a, b) {
4574
4700
  if (a === 0) return true;
4575
4701
  return false;
4576
4702
  }
4577
- function parseIpv6Groups(text) {
4578
- let rest = text;
4579
- const zoneAt = rest.indexOf("%");
4580
- if (zoneAt !== -1) rest = rest.slice(0, zoneAt);
4581
- if (!/^[0-9a-f:.]+$/i.test(rest) || !rest.includes(":")) return null;
4582
- const lastColon = rest.lastIndexOf(":");
4583
- const tail = rest.slice(lastColon + 1);
4584
- if (tail.includes(".")) {
4585
- const quad = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.exec(tail);
4586
- if (!quad) return null;
4587
- const octets = [Number(quad[1]), Number(quad[2]), Number(quad[3]), Number(quad[4])];
4588
- if (octets.some((n) => n > 255)) return null;
4589
- const hi = octets[0] << 8 | octets[1];
4590
- const lo = octets[2] << 8 | octets[3];
4591
- rest = `${rest.slice(0, lastColon + 1)}${hi.toString(16)}:${lo.toString(16)}`;
4592
- }
4593
- const parseGroup = (g) => /^[0-9a-f]{1,4}$/i.test(g) ? parseInt(g, 16) : null;
4594
- const halves = rest.split("::");
4595
- if (halves.length > 2) return null;
4596
- let parts;
4597
- if (halves.length === 2) {
4598
- const left = halves[0].length > 0 ? halves[0].split(":") : [];
4599
- const right = halves[1].length > 0 ? halves[1].split(":") : [];
4600
- if (left.length + right.length > 7) return null;
4601
- parts = [...left, ...Array(8 - left.length - right.length).fill("0"), ...right];
4602
- } else {
4603
- parts = rest.split(":");
4604
- if (parts.length !== 8) return null;
4605
- }
4606
- const groups = [];
4607
- for (const part of parts) {
4608
- const value = parseGroup(part);
4609
- if (value === null) return null;
4610
- groups.push(value);
4611
- }
4612
- return groups;
4613
- }
4614
4703
  function isBlockedIpv6(groups) {
4615
4704
  if (groups.every((g) => g === 0)) return true;
4616
4705
  if (groups.slice(0, 7).every((g) => g === 0) && groups[7] === 1) return true;
@@ -4868,6 +4957,7 @@ async function takeScreenshot(url, destPath, opts) {
4868
4957
  }
4869
4958
 
4870
4959
  // src/notes.ts
4960
+ init_define_import_meta_env();
4871
4961
  import * as fs3 from "node:fs";
4872
4962
  var WHOLE_FILE_NOTE_SYMBOL = "";
4873
4963
  function toNoteRow(row) {
@@ -4943,6 +5033,7 @@ function isNoteStale(note, dbPath = globalDbPath()) {
4943
5033
  }
4944
5034
 
4945
5035
  // src/ts_refs.ts
5036
+ init_define_import_meta_env();
4946
5037
  import { createRequire } from "node:module";
4947
5038
  import * as path3 from "node:path";
4948
5039
  var _require = createRequire(import.meta.url);
@@ -7425,7 +7516,7 @@ async function runImageMeta(file) {
7425
7516
  throw e;
7426
7517
  }
7427
7518
  if (probe === null) {
7428
- return { width: 0, height: 0, format: null, bytes, sharpAvailable: false, wouldShrink: false, shrunkBytes: null };
7519
+ return { width: 0, height: 0, format: null, bytes, decodable: false, wouldShrink: false, shrunkBytes: null };
7429
7520
  }
7430
7521
  const shrink = await shrinkImage(data, { sizeThresholdBytes: 0 });
7431
7522
  return {
@@ -7433,7 +7524,7 @@ async function runImageMeta(file) {
7433
7524
  height: probe.height,
7434
7525
  format: probe.format,
7435
7526
  bytes,
7436
- sharpAvailable: true,
7527
+ decodable: true,
7437
7528
  wouldShrink: shrink !== null,
7438
7529
  shrunkBytes: shrink !== null ? shrink.shrunkBytes : null
7439
7530
  };
@@ -9133,6 +9224,7 @@ function runNoteList(opts = {}) {
9133
9224
  }
9134
9225
 
9135
9226
  // src/import_graph.ts
9227
+ init_define_import_meta_env();
9136
9228
  import * as fs5 from "node:fs";
9137
9229
  import * as path5 from "node:path";
9138
9230
  var DIRECT_PROBE_EXTENSIONS = ["", ".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs", ".cjs", ".cts", ".py"];
@@ -9184,6 +9276,7 @@ function buildImportGraph(cwd) {
9184
9276
  }
9185
9277
 
9186
9278
  // src/modules.ts
9279
+ init_define_import_meta_env();
9187
9280
  var WEAK_MODULARITY = 0.3;
9188
9281
  var MAX_PASSES = 32;
9189
9282
  var GAIN_EPSILON = 1e-12;
@@ -10689,6 +10782,7 @@ ANSWER:`;
10689
10782
  }
10690
10783
 
10691
10784
  // src/content_store.ts
10785
+ init_define_import_meta_env();
10692
10786
  import { deflateRawSync } from "node:zlib";
10693
10787
  import * as path7 from "node:path";
10694
10788
  var CONTENT_MAX_INPUT_CHARS = 512 * 1024;
@@ -10906,5 +11000,5 @@ export {
10906
11000
  /*! Bundled license information:
10907
11001
 
10908
11002
  js-yaml/dist/js-yaml.mjs:
10909
- (*! js-yaml 5.3.0 https://github.com/nodeca/js-yaml @license MIT *)
11003
+ (*! js-yaml 5.4.1 https://github.com/nodeca/js-yaml @license MIT *)
10910
11004
  */
@@ -0,0 +1,56 @@
1
+ import { createRequire as __cjsRequire } from 'node:module';
2
+ const require = __cjsRequire(import.meta.url);
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esm = (fn, res, err) => function __init() {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
16
+ };
17
+ var __commonJS = (cb, mod) => function __require() {
18
+ try {
19
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
+ } catch (e) {
21
+ throw mod = 0, e;
22
+ }
23
+ };
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
37
+ // If the importer is in node compatibility mode or this is not an ESM
38
+ // file that has been converted to a CommonJS file using a Babel-
39
+ // compatible transform (i.e. "__esModule" has not been set), then set
40
+ // "default" to the CommonJS "module.exports" for node compatibility.
41
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
42
+ mod
43
+ ));
44
+
45
+ // <define:import.meta.env>
46
+ var init_define_import_meta_env = __esm({
47
+ "<define:import.meta.env>"() {
48
+ }
49
+ });
50
+
51
+ export {
52
+ __commonJS,
53
+ __export,
54
+ __toESM,
55
+ init_define_import_meta_env
56
+ };
@@ -9,7 +9,7 @@ import {
9
9
  isBlobStale,
10
10
  loadBlob,
11
11
  storeBlob
12
- } from "./token-goat-chunk-FDXINYK4.mjs";
12
+ } from "./token-goat-chunk-3XVGPLDS.mjs";
13
13
  import {
14
14
  SYMBOL_BODY_CHAR_CAP,
15
15
  copilotCliMcpToolsDir,
@@ -24,12 +24,22 @@ import {
24
24
  resolveIndexPath,
25
25
  shortFingerprint,
26
26
  toDisplayPath
27
- } from "./token-goat-chunk-4ZDRTNGV.mjs";
27
+ } from "./token-goat-chunk-KKHKXUVS.mjs";
28
28
  import {
29
29
  registerReset
30
- } from "./token-goat-chunk-AO2QD2AG.mjs";
30
+ } from "./token-goat-chunk-EEIDFMEM.mjs";
31
+ import {
32
+ init_define_import_meta_env
33
+ } from "./token-goat-chunk-A37V4PBF.mjs";
34
+
35
+ // src/hooks_cli.ts
36
+ init_define_import_meta_env();
37
+
38
+ // src/copilot_mcp_names.ts
39
+ init_define_import_meta_env();
31
40
 
32
41
  // src/copilot_mcp_tools.ts
42
+ init_define_import_meta_env();
33
43
  import fs from "node:fs";
34
44
  import path from "node:path";
35
45
  function wireShapeLength(tools) {
@@ -314,6 +324,7 @@ function normalizePayload(payload, harness = "claude") {
314
324
  }
315
325
 
316
326
  // src/web_cache.ts
327
+ init_define_import_meta_env();
317
328
  var WEB_OUTPUT_SUBDIR = "web_outputs";
318
329
  var _byId = /* @__PURE__ */ new Map();
319
330
  var _rawById = /* @__PURE__ */ new Map();
@@ -370,6 +381,7 @@ registerReset(() => {
370
381
  });
371
382
 
372
383
  // src/types.ts
384
+ init_define_import_meta_env();
373
385
  var HOOK_EVENTS = [
374
386
  "pre_tool_use",
375
387
  "post_tool_use",
@@ -384,6 +396,7 @@ var HOOK_EVENTS = [
384
396
  ];
385
397
 
386
398
  // src/cli_commands.ts
399
+ init_define_import_meta_env();
387
400
  function toEntry(cmd) {
388
401
  return {
389
402
  name: cmd.name(),
@@ -452,6 +465,7 @@ function formatCommandManifest(manifest) {
452
465
  }
453
466
 
454
467
  // src/reconcile.ts
468
+ init_define_import_meta_env();
455
469
  import * as fs2 from "node:fs";
456
470
  var DEFAULT_RECONCILE_BUDGET_MS = 1500;
457
471
  function runReconcile(opts = {}) {
@@ -575,6 +589,7 @@ function reconcileProject(opts = {}) {
575
589
  }
576
590
 
577
591
  // src/stdin_json.ts
592
+ init_define_import_meta_env();
578
593
  var DEFAULT_STDIN_TIMEOUT_MS = 5e3;
579
594
  var MAX_STDIN_WALL_MS = 6e4;
580
595
  var MAX_STDIN_BYTES = 64 * 1024 * 1024;
@@ -641,6 +656,7 @@ function readStdinJson(timeoutMs = DEFAULT_STDIN_TIMEOUT_MS, maxBytes = MAX_STDI
641
656
  }
642
657
 
643
658
  // src/symbol_body_probe.ts
659
+ init_define_import_meta_env();
644
660
  import * as fs3 from "fs";
645
661
  var OVERSIZED_BODY_PROBE_SQL = `SELECT 1 FROM symbols WHERE LENGTH(body) > ${SYMBOL_BODY_CHAR_CAP} LIMIT 1`;
646
662
  function checkSymbolBodySize(dbPath) {
@@ -668,6 +684,7 @@ function checkSymbolBodySize(dbPath) {
668
684
  }
669
685
 
670
686
  // src/resident_context.ts
687
+ init_define_import_meta_env();
671
688
  import * as fs4 from "node:fs";
672
689
  var LARGE_TASK_LIST_BYTES = 2e4;
673
690
  var LARGE_SKILL_BODY_BYTES = 2e4;
@@ -2,10 +2,13 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  clearModuleCaches
5
- } from "./token-goat-chunk-AO2QD2AG.mjs";
6
- import "./token-goat-chunk-AEX54RUZ.mjs";
5
+ } from "./token-goat-chunk-EEIDFMEM.mjs";
6
+ import {
7
+ init_define_import_meta_env
8
+ } from "./token-goat-chunk-A37V4PBF.mjs";
7
9
 
8
10
  // src/batch_serve.ts
11
+ init_define_import_meta_env();
9
12
  function swapEnv(next) {
10
13
  const before = { ...process.env };
11
14
  for (const key of Object.keys(process.env)) if (!(key in next)) delete process.env[key];
@@ -1,7 +1,11 @@
1
1
  import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
+ import {
4
+ init_define_import_meta_env
5
+ } from "./token-goat-chunk-A37V4PBF.mjs";
3
6
 
4
7
  // src/reset.ts
8
+ init_define_import_meta_env();
5
9
  var _resets = [];
6
10
  function registerReset(fn) {
7
11
  _resets.push(fn);
@@ -1,8 +1,11 @@
1
1
  import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
- import "./token-goat-chunk-AEX54RUZ.mjs";
3
+ import {
4
+ init_define_import_meta_env
5
+ } from "./token-goat-chunk-A37V4PBF.mjs";
4
6
 
5
7
  // src/mcp_stdio.ts
8
+ init_define_import_meta_env();
6
9
  import process from "node:process";
7
10
  var STDIO_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
8
11
  var StdioServerTransport = class {