token-goat 2.9.1 → 2.9.2

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.
@@ -8,7 +8,7 @@ import {
8
8
  import { createRequire } from "node:module";
9
9
  function resolveVersion() {
10
10
  if (true) {
11
- return "2.9.1";
11
+ return "2.9.2";
12
12
  }
13
13
  const require2 = createRequire(import.meta.url);
14
14
  const pkg = require2("../package.json");
@@ -2300,6 +2300,10 @@ var CONFIG_DEFAULTS = {
2300
2300
  gdrive: {
2301
2301
  enabled: true
2302
2302
  },
2303
+ redaction: {
2304
+ custom_patterns: [],
2305
+ strict: false
2306
+ },
2303
2307
  network: {
2304
2308
  offline: false
2305
2309
  },
@@ -2343,6 +2347,7 @@ function defaultConfig() {
2343
2347
  context: getDefaultConfig("context"),
2344
2348
  injection: getDefaultConfig("injection"),
2345
2349
  gdrive: getDefaultConfig("gdrive"),
2350
+ redaction: getDefaultConfig("redaction"),
2346
2351
  network: getDefaultConfig("network"),
2347
2352
  mcp: getDefaultConfig("mcp"),
2348
2353
  hint_stats: getDefaultConfig("hint_stats"),
@@ -2567,6 +2572,7 @@ var PROJECT_LOCKED_SECTIONS = [
2567
2572
  "injection",
2568
2573
  "webfetch",
2569
2574
  "gdrive",
2575
+ "redaction",
2570
2576
  "mcp",
2571
2577
  "network",
2572
2578
  "screenshot"
@@ -3075,6 +3081,12 @@ function _buildConfig(raw, projectRaw = {}) {
3075
3081
  const gd = getDefaultConfig("gdrive");
3076
3082
  gd.enabled = validatedBool(gd_raw["enabled"], gd.enabled);
3077
3083
  gd.enabled = envBool("TOKEN_GOAT_GDRIVE_ENABLED", gd.enabled);
3084
+ const red_raw = section(raw, "redaction");
3085
+ const red = getDefaultConfig("redaction");
3086
+ red.custom_patterns = validatedStrList(red_raw["custom_patterns"], red.custom_patterns);
3087
+ red.custom_patterns = envStrList("TOKEN_GOAT_REDACTION_CUSTOM_PATTERNS", red.custom_patterns, "\n");
3088
+ red.strict = validatedBool(red_raw["strict"], red.strict);
3089
+ red.strict = envBool("TOKEN_GOAT_REDACTION_STRICT", red.strict);
3078
3090
  const net_raw = section(raw, "network");
3079
3091
  const net = getDefaultConfig("network");
3080
3092
  net.offline = validatedBool(net_raw["offline"], net.offline);
@@ -3116,6 +3128,7 @@ function _buildConfig(raw, projectRaw = {}) {
3116
3128
  context: ctx,
3117
3129
  injection: inj,
3118
3130
  gdrive: gd,
3131
+ redaction: red,
3119
3132
  network: net,
3120
3133
  mcp,
3121
3134
  hint_stats: hs,
@@ -3187,6 +3200,8 @@ var CONFIG_KEY_ENV_OVERRIDES = {
3187
3200
  "indexing.cross_project_symbols": ["TOKEN_GOAT_CROSS_PROJECT_SYMBOLS"],
3188
3201
  "injection.enabled": ["TOKEN_GOAT_INJECTION_ENABLED"],
3189
3202
  "gdrive.enabled": ["TOKEN_GOAT_GDRIVE_ENABLED"],
3203
+ "redaction.custom_patterns": ["TOKEN_GOAT_REDACTION_CUSTOM_PATTERNS"],
3204
+ "redaction.strict": ["TOKEN_GOAT_REDACTION_STRICT"],
3190
3205
  "network.offline": ["TOKEN_GOAT_OFFLINE"],
3191
3206
  "mcp.confine_reads_to_project_root": ["TOKEN_GOAT_MCP_CONFINE_READS"],
3192
3207
  "mcp.allowed_roots": ["TOKEN_GOAT_MCP_ALLOWED_ROOTS"],
@@ -3355,6 +3370,10 @@ function saveConfig(config) {
3355
3370
  gdrive: {
3356
3371
  enabled: config.gdrive.enabled
3357
3372
  },
3373
+ redaction: {
3374
+ custom_patterns: config.redaction.custom_patterns,
3375
+ strict: config.redaction.strict
3376
+ },
3358
3377
  network: {
3359
3378
  offline: config.network.offline
3360
3379
  },
@@ -6947,7 +6966,110 @@ var SECRET_PATTERNS = [
6947
6966
  function countRedactionPlaceholders(text) {
6948
6967
  return text.match(/\[REDACTED:[a-z0-9_]+\]/g)?.length ?? 0;
6949
6968
  }
6950
- function redactSecrets(text) {
6969
+ var MAX_CUSTOM_PATTERNS = 64;
6970
+ var MAX_CUSTOM_PATTERN_LENGTH = 512;
6971
+ var customCache = null;
6972
+ var GROUP_PREFIX = String.raw`\((?:\?(?::|<?[=!]|<\w+>|[a-z]*(?:-[a-z]*)?:))?`;
6973
+ var NESTED_QUANTIFIER = new RegExp(
6974
+ // a quantified group whose body itself repeats: (a+)+, (?:a*)*, (?<x>\d{2,})+
6975
+ GROUP_PREFIX + String.raw`[^()*+]*(?:[*+]|\{\d+,\d*\})[^()]*\)\s*(?:[*+]|\{\d+,\d*\})`
6976
+ );
6977
+ var PROBE_ALPHABETS = ["a", "0", "a0"];
6978
+ var PROBE_SHORT = 14;
6979
+ var PROBE_LONG = 20;
6980
+ var PROBE_GROWTH_FACTOR = 12;
6981
+ var PROBE_BUDGET_MS = 25;
6982
+ function timeMatch(re, input) {
6983
+ const probe = new RegExp(re.source, re.flags.replace("g", ""));
6984
+ const started = performance.now();
6985
+ probe.test(input);
6986
+ return performance.now() - started;
6987
+ }
6988
+ function growsExponentially(re) {
6989
+ for (const alphabet of PROBE_ALPHABETS) {
6990
+ const fill = (n) => alphabet.repeat(Math.ceil(n / alphabet.length)).slice(0, n) + "!";
6991
+ const short = timeMatch(re, fill(PROBE_SHORT));
6992
+ const long = timeMatch(re, fill(PROBE_LONG));
6993
+ if (long > PROBE_BUDGET_MS) return true;
6994
+ if (long > 1 && long > short * PROBE_GROWTH_FACTOR) return true;
6995
+ }
6996
+ return false;
6997
+ }
6998
+ function compileCustomPatterns(sources) {
6999
+ const key = JSON.stringify(sources);
7000
+ if (customCache !== null && customCache.key === key) {
7001
+ return { patterns: customCache.patterns, problems: customCache.problems };
7002
+ }
7003
+ const patterns = [];
7004
+ const problems = [];
7005
+ const written = sources.map((raw) => raw.trim()).filter((source) => source.length > 0);
7006
+ for (const source of written.slice(0, MAX_CUSTOM_PATTERNS)) {
7007
+ if (source.length > MAX_CUSTOM_PATTERN_LENGTH) {
7008
+ problems.push({ pattern: source.slice(0, 60), reason: `longer than ${MAX_CUSTOM_PATTERN_LENGTH} characters` });
7009
+ continue;
7010
+ }
7011
+ if (NESTED_QUANTIFIER.test(source)) {
7012
+ problems.push({
7013
+ pattern: source,
7014
+ reason: "repeats a group that already repeats, which can take exponential time to match"
7015
+ });
7016
+ continue;
7017
+ }
7018
+ let compiled;
7019
+ try {
7020
+ compiled = new RegExp(source, "g");
7021
+ } catch (e) {
7022
+ problems.push({ pattern: source, reason: e instanceof Error ? e.message : "is not a valid regular expression" });
7023
+ continue;
7024
+ }
7025
+ if (new RegExp(source).test("")) {
7026
+ problems.push({
7027
+ pattern: source,
7028
+ reason: "matches the empty string, so it would replace every position in the text"
7029
+ });
7030
+ continue;
7031
+ }
7032
+ if (growsExponentially(compiled)) {
7033
+ problems.push({
7034
+ pattern: source,
7035
+ reason: "its running time doubles as the text grows, which can stall the process on a short input"
7036
+ });
7037
+ continue;
7038
+ }
7039
+ patterns.push(compiled);
7040
+ }
7041
+ if (written.length > MAX_CUSTOM_PATTERNS) {
7042
+ problems.push({
7043
+ pattern: `(${written.length} entries)`,
7044
+ reason: `only the first ${MAX_CUSTOM_PATTERNS} custom patterns are used`
7045
+ });
7046
+ }
7047
+ customCache = { key, patterns, problems };
7048
+ return { patterns, problems };
7049
+ }
7050
+ var STRICT_CANDIDATE = /[A-Za-z0-9+/_-]{24,}={0,2}/g;
7051
+ function entropyBitsPerChar(s) {
7052
+ const counts = /* @__PURE__ */ new Map();
7053
+ for (const ch of s) counts.set(ch, (counts.get(ch) ?? 0) + 1);
7054
+ let bits = 0;
7055
+ for (const n of counts.values()) {
7056
+ const p = n / s.length;
7057
+ bits -= p * Math.log2(p);
7058
+ }
7059
+ return bits;
7060
+ }
7061
+ function characterClasses(s) {
7062
+ let n = 0;
7063
+ if (/[a-z]/.test(s)) n++;
7064
+ if (/[A-Z]/.test(s)) n++;
7065
+ if (/[0-9]/.test(s)) n++;
7066
+ if (/[+/=_-]/.test(s)) n++;
7067
+ return n;
7068
+ }
7069
+ function looksLikeCredential(s) {
7070
+ return characterClasses(s) >= 3 && entropyBitsPerChar(s) >= 3.5;
7071
+ }
7072
+ function redactSecrets(text, config = loadConfig()) {
6951
7073
  let count = 0;
6952
7074
  let out = text;
6953
7075
  for (const [kind, pattern] of SECRET_PATTERNS) {
@@ -6956,6 +7078,19 @@ function redactSecrets(text) {
6956
7078
  return `[REDACTED:${kind}]`;
6957
7079
  });
6958
7080
  }
7081
+ for (const pattern of compileCustomPatterns(config.redaction.custom_patterns).patterns) {
7082
+ out = out.replace(pattern, () => {
7083
+ count++;
7084
+ return "[REDACTED:custom]";
7085
+ });
7086
+ }
7087
+ if (config.redaction.strict) {
7088
+ out = out.replace(STRICT_CANDIDATE, (candidate) => {
7089
+ if (!looksLikeCredential(candidate)) return candidate;
7090
+ count++;
7091
+ return "[REDACTED:high_entropy]";
7092
+ });
7093
+ }
6959
7094
  return { text: out, count };
6960
7095
  }
6961
7096
 
@@ -7057,7 +7192,8 @@ function passOutput() {
7057
7192
  return { hookType: "pass" };
7058
7193
  }
7059
7194
  function denyOutput(message) {
7060
- return { hookType: "deny", message };
7195
+ const prefixed = message.startsWith("[tg]") ? message : `[tg] ${message}`;
7196
+ return { hookType: "deny", message: prefixed };
7061
7197
  }
7062
7198
  function contextOutput(context) {
7063
7199
  return { hookType: "context", context };
@@ -8166,7 +8302,7 @@ function materializeShrunkImage(context) {
8166
8302
  try {
8167
8303
  pruneMaterializedShrinks()
8168
8304
  const buf = Buffer.from(match[2], "base64")
8169
- const name = \`token-goat-shrink-\${process.pid}-\${Date.now()}-\${Math.random().toString(36).slice(2)}.\${match[1]}\`
8305
+ const name = \`token-goat-shrink-\${process.pid}-\${Date.now()}-\${globalThis.crypto.randomUUID()}.\${match[1]}\`
8170
8306
  const file = path.join(os.tmpdir(), name)
8171
8307
  fs.writeFileSync(file, buf)
8172
8308
  return file
@@ -11082,10 +11218,10 @@ function makeLanguageFilter(cfg) {
11082
11218
  }
11083
11219
 
11084
11220
  // src/tool_filters/ai_clis.ts
11085
- var _GH_COPILOT_SPINNER_RE = /^\s*(?:Asking GitHub Copilot|Generating|Thinking|Fetching)\s*\.{0,3}\s*$/i;
11221
+ var _GH_COPILOT_SPINNER_RE = /^\s*(?:Asking GitHub Copilot|Generating|Thinking|Fetching)\s*(?:\.{1,3}\s*)?$/i;
11086
11222
  var _GH_COPILOT_BANNER_RE = /^\s*(?:Welcome to GitHub Copilot|Using GitHub Copilot|Authenticated as|GitHub Copilot\s+v\d+)/i;
11087
11223
  var _GH_COPILOT_DISCLAIMER_RE = /^\s*(?:Disclaimer:|This response was|GitHub Copilot|The commands?\s+(?:above|below)|Please review|Always review|Remember to|Note:|Tip:)/i;
11088
- var _AIDER_APPLYING_RE = /^\s*(?:Applying\s+edits?(?:\s+to\s+\S+)?|Applied\s+edit\s+to\s+\S+)\s*(?:\.{1,3})?\s*$/i;
11224
+ var _AIDER_APPLYING_RE = /^\s*(?:Applying\s+edits?(?:\s+to\s+\S+)?|Applied\s+edit\s+to\s+\S+)\s*(?:\.{1,3}\s*)?$/i;
11089
11225
  var _AIDER_TOKENS_RE = /^\s*Tokens:\s+\d[\d,]*\s+sent,\s+\d[\d,]*\s+received/i;
11090
11226
  var _AIDER_COST_RE = /^\s*Cost:\s+\$[\d.]+\s+message,\s+\$[\d.]+\s+session/i;
11091
11227
  var _AIDER_REPOMAP_RE = /^\s*(?:Repo-map:|Added\s+\S+\s+to\s+the\s+chat|Removed\s+\S+\s+from\s+the\s+chat|Loading\s+repo\s+map|Updating\s+repo\s+map|Scanning\s+repo\s+contents|Using\s+\d+\s+tokens\s+of\s+repo\s+map)/i;
@@ -11098,24 +11234,24 @@ var _GEMINI_BANNER_RE = /^\s*Gemini\s+CLI\s+v\d+/i;
11098
11234
  var _GEMINI_TOKEN_METER_RE = /^\s*(?:Token\s+usage|Context|Tokens):\s+[\d,]+\s*\/\s*[\d,]+/i;
11099
11235
  var _GEMINI_TOOL_SPINNER_RE = /^\s*[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏✓✗►✦]\s+(?:Call(?:ing|ed)|Execut(?:ing|ed)|Running)\s+\S+/;
11100
11236
  var _GEMINI_FOOTER_RE = /^\s*(?:Type\s+\/help|Press\s+Ctrl|Use\s+Ctrl|Tip:|Note:)/i;
11101
- var _GEMINI_THINKING_RE = /^\s*(?:Thinking|Generating|Processing)\s*\.{0,3}\s*$/i;
11237
+ var _GEMINI_THINKING_RE = /^\s*(?:Thinking|Generating|Processing)\s*(?:\.{1,3}\s*)?$/i;
11102
11238
  var _CLAUDE_CLI_MODEL_HDR_RE = /^\s*[◆◇►✦]\s+claude-/i;
11103
- var _CLAUDE_CLI_STATS_RE = /^\s*[↑↓⇑⇓]\s*\d[\d,]*\s*[↑↓⇑⇓]?\s*\d[\d,]*\s*tokens/i;
11239
+ var _CLAUDE_CLI_STATS_RE = /^\s*[↑↓⇑⇓]\s*\d[\d,]*(?:(?:\s*[↑↓⇑⇓]\s*|\s+)\d[\d,]*)?\s*tokens/i;
11104
11240
  var _CLAUDE_CLI_CONTEXT_RE = /^\s*(?:Context(?:\s+window)?|Token\s+limit):\s+[\d,]+\s*\/\s*[\d,]+/i;
11105
11241
  var _CLAUDE_CLI_FOOTER_RE = /^\s*(?:Press\s+Ctrl|Enter\s+\/|Type\s+\/|Use\s+Ctrl|Tip:|Note:)/i;
11106
- var _CLAUDE_CLI_SPINNER_RE = /^\s*[◎⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+(?:Thinking|Generating|Processing|Running)\s*\.{0,3}\s*$/;
11242
+ var _CLAUDE_CLI_SPINNER_RE = /^\s*[◎⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]\s+(?:Thinking|Generating|Processing|Running)\s*(?:\.{1,3}\s*)?$/;
11107
11243
  var _CLAUDE_CLI_TOOL_LOG_RE = /^\s*(?:>\s+Using\s+tool:|✓\s+Tool\s+result:|◎\s+Tool:)/i;
11108
11244
  var _CLAUDE_CLI_SKIP_SUBCMDS = /* @__PURE__ */ new Set(["install", "update", "doctor", "config", "login", "logout"]);
11109
- var _CURSOR_STARTUP_RE = /^\s*(?:Extension\s+host\s+(?:started|starting)|Extension\s+'cursor[^']*'\s+activated|Starting\s+debug\s+adapter|Opening\s+folder\s*\.*\s*$|Restoring\s+(?:windows?|session)|Reusing\s+existing\s+extension\s+host|Connection\s+(?:established|to\s+remote)|Tunnel\s+(?:connected|connecting|status))/i;
11245
+ var _CURSOR_STARTUP_RE = /^\s*(?:Extension\s+host\s+(?:started|starting)|Extension\s+'cursor[^']*'\s+activated|Starting\s+debug\s+adapter|Opening\s+folder\s*(?:\.+\s*)?$|Restoring\s+(?:windows?|session)|Reusing\s+existing\s+extension\s+host|Connection\s+(?:established|to\s+remote)|Tunnel\s+(?:connected|connecting|status))/i;
11110
11246
  var _CURSOR_TELEMETRY_RE = /^\s*(?:Telemetry\s+is\s+(?:disabled|enabled)|Crash\s+reporter|Sending\s+telemetry|Analytics:)/i;
11111
11247
  var _CURSOR_BANNER_RE = /^\s*Cursor\s+v?\d+\.\d+/i;
11112
- var _WINDSURF_STARTUP_RE = /^\s*(?:Extension\s+host\s+(?:started|starting)|Extension\s+'\S+'\s+activated|Starting\s+debug\s+adapter|Opening\s+folder\s*\.*\s*$|Restoring\s+(?:windows?|session)|Reusing\s+existing\s+extension\s+host)/i;
11248
+ var _WINDSURF_STARTUP_RE = /^\s*(?:Extension\s+host\s+(?:started|starting)|Extension\s+'\S+'\s+activated|Starting\s+debug\s+adapter|Opening\s+folder\s*(?:\.+\s*)?$|Restoring\s+(?:windows?|session)|Reusing\s+existing\s+extension\s+host)/i;
11113
11249
  var _WINDSURF_CODEIUM_NOISE_RE = /^\s*(?:Codeium\s*(?::\s*)?(?:Activating|Activated|index(?:ing)?:?\s*loading|index\s+(?:loaded|ready)|Extension\s+loaded)|Connecting\s+to\s+Codeium\s+server|Authentication\s+status\s*:|Model\s+status\s*:|Codeium\s+(?:ready|connected|disconnected))/i;
11114
11250
  var _WINDSURF_BANNER_RE = /^\s*Windsurf\s+v?\d+\.\d+/i;
11115
11251
  var _WINDSURF_TELEMETRY_RE = /^\s*(?:Telemetry\s+is\s+(?:disabled|enabled)|Crash\s+reporter)/i;
11116
11252
  var _WINDSURF_CASCADE_STATUS_RE = /^\s*(?:Cascade\s*(?::\s*)?(?:connected|disconnected|ready|connecting|starting|model\s+loaded|indexing\s+workspace|context\s+limit|[a-z]+\.{3})|Cascade\s+v?\d+|AI\s+assistant\s+(?:ready|loaded|connecting))/i;
11117
11253
  var _WINDSURF_CASCADE_TOOL_RE = /^\s*Cascade\s+(?:is\s+)?(?:reading|writing|running|executed|modified|created|deleted)\s+/i;
11118
- var _WINDSURF_CASCADE_SPINNER_RE = /^\s*(?:Thinking|Generating|Cascade\s+is\s+thinking|Processing\s+request)\s*\.{0,3}\s*$/i;
11254
+ var _WINDSURF_CASCADE_SPINNER_RE = /^\s*(?:Thinking|Generating|Cascade\s+is\s+thinking|Processing\s+request)\s*(?:\.{1,3}\s*)?$/i;
11119
11255
  var _WINDSURF_CONTEXT_RE = /^\s*(?:Context(?:\s+window)?|Token\s+(?:usage|count))\s*:\s*[\d,]+\s*\/\s*[\d,]+/i;
11120
11256
  var _WINDSURF_WORKSPACE_RE = /^\s*(?:Loading\s+workspace|Indexing\s+workspace|Workspace\s+(?:indexed|ready|loading)|Scanning\s+files|File\s+watcher)/i;
11121
11257
  var _OPENCODE_BANNER_RE = /^\s*(?:Open[Cc]ode|opencode)\s+v?\d+\.\d+/i;
@@ -11136,10 +11272,10 @@ var _CLINE_BANNER_RE = /^\s*(?:Cline|claude-dev)\s+v\d+\.\d+/i;
11136
11272
  var _CLINE_TOKENS_RE = /^\s*Tokens\s*:\s*[\d,]+\s*\(/i;
11137
11273
  var _CLINE_COST_RE = /^\s*API\s+Cost\s*:\s*\$[\d.]+/i;
11138
11274
  var _CLINE_CONTEXT_RE = /^\s*Context\s+Window\s*:\s*[\d,]+\s*\/\s*[\d,]+\s+tokens/i;
11139
- var _CLINE_SPINNER_RE = /^\s*(?:Thinking|Processing|Streaming\s+response)\s*\.{0,3}\s*$/i;
11140
- var _CLINE_STARTUP_RE = /^\s*(?:Loading\s+workspace|Initializing\s+Cline|Starting\s+Cline)\s*\.{0,3}\s*$/i;
11275
+ var _CLINE_SPINNER_RE = /^\s*(?:Thinking|Processing|Streaming\s+response)\s*(?:\.{1,3}\s*)?$/i;
11276
+ var _CLINE_STARTUP_RE = /^\s*(?:Loading\s+workspace|Initializing\s+Cline|Starting\s+Cline)\s*(?:\.{1,3}\s*)?$/i;
11141
11277
  var _CLINE_MCP_STATUS_RE = /^\s*MCP\s+Server\s+['"]?\w/i;
11142
- var _CLINE_FILE_READ_RE = /^\s*Reading\s+file\s*:\s*\S+\s*\.{0,3}\s*$/i;
11278
+ var _CLINE_FILE_READ_RE = /^\s*Reading\s+file\s*:\s*\S+\s*(?:\.{1,3}\s*)?$/i;
11143
11279
  var _CLINE_WANTS_EXECUTE_RE = /^\s*Cline\s+wants\s+to\s+(?:execute|run|write|read|create|delete|use)\s*:/i;
11144
11280
  var _CODEX_SEPARATOR_RE = /^-{4,}$/;
11145
11281
  var _CODEX_MODEL_RE = /^model\s*:\s*(?<model>\S+)/i;
@@ -17212,7 +17348,7 @@ var erlangFilter = makeLanguageFilter({
17212
17348
  ]
17213
17349
  });
17214
17350
  var CRYSTAL_COMPILING_RE = /^\s*(?:Compiling\s+\S+|Linking\s+crystal\s+spec|crystal\s+spec\s+\S+\.cr\b)/i;
17215
- var CRYSTAL_SPEC_PASS_RE = /^\s*(?:\.\s*)+$|^\s*✓\s+.+\(\d+/i;
17351
+ var CRYSTAL_SPEC_PASS_RE = /^\s*(?:\.\s*)+$|^\s*✓\s+\S.*\(\d+/i;
17216
17352
  var CRYSTAL_DOT_PROGRESS_RE = /^\s*[.]+\s*$/;
17217
17353
  var CRYSTAL_SUMMARY_RE = /^\s*(?:Finished\s+in\s+[\d.]+\s+(?:second|millisecond)|\d+\s+example[s]?[,\s]|Pending:\s+\d+|\d+\s+failure[s]?|(?:All\s+)?\d+\s+spec[s]?\s+(?:passed|failed))/i;
17218
17354
  var CRYSTAL_FAILURE_HEADER_RE = /^\s*(?:Failures:|Errors:|\d+\)\s+\S)/i;
@@ -17255,7 +17391,7 @@ var crystalFilter = makeLanguageFilter({
17255
17391
  ]
17256
17392
  });
17257
17393
  var HASKELL_RESOLVING_RE = /^\s*(?:Resolving\s+dependencies|Downloading\s+\S+\s+from\s+Hackage|Downloading\s+\S+\s+\.\.\.|Fetching\s+package|Configuring\s+\S+\.\.\.|Preprocessing\s+\S+\s+for|Starting\s+to\s+install)/i;
17258
- var HASKELL_COMPILING_RE = /^\s*(?:\[\s*\d+\s+of\s+\d+\]\s+Compiling\s+\S+|Compiling\s+\S+(?:\s+\(\s*\S+,\s*\S+\))?\.\.\.?)/;
17394
+ var HASKELL_COMPILING_RE = /^\s*(?:\[\s*\d+\s+of\s+\d+\]\s+Compiling\s+\S+|Compiling\s+\S+(?:\s+\(\s*[^,\s]+,\s*\S+\))?\.\.\.?)/;
17259
17395
  var HASKELL_LINKING_RE = /^\s*(?:Linking\s+\S+|Building\s+all\s+executables|Building\s+library\s+for\s+|Building\s+executable|Installed\s+\S+(?:\s+\d+\.\d+)?)/i;
17260
17396
  var HASKELL_INSTALLING_RE = /^\s*(?:Installing\s+(?:library|executable)\s+in|Registering\s+library|Updating\s+package\s+list|Reading\s+available\s+packages)/i;
17261
17397
  var HASKELL_SUCCESS_RE = /^\s*(?:Completed\s+\d+\s+action|Build\s+completed|Finished\s+building\s+package|All\s+\d+\s+tests\s+passed|Test\s+suite\s+\S+:\s+PASS|\d+\s+out\s+of\s+\d+\s+test\s+suites\s+\(|Tests\s+complete\b)/i;
@@ -17307,7 +17443,7 @@ var ELM_DOT_PROGRESS_RE = /^\s*[.]+\s*$/;
17307
17443
  var ELM_DEPS_PROGRESS_RE = /^\s*(?:Building dependencies|Verifying\s+(?:dependencies|packages)|Updating\s+package\s+catalog|Solving\s+dependencies)/i;
17308
17444
  var ELM_COMPILING_RE = /^\s*(?:Compiling\s+\S+\.elm|Starting\s+compilation)/i;
17309
17445
  var ELM_SUCCESS_RE = /^\s*(?:Success!|Successfully\s+generated|Compilation\s+complete|Done!\s+Compiled\s+\d+)/i;
17310
- var ELM_ERROR_HEADER_RE = /^\s*--\s+[A-Z][A-Z0-9 _]+[A-Z0-9]\s*(?:-+|in\s+\S+)?\s*$/;
17446
+ var ELM_ERROR_HEADER_RE = /^\s*--\s+[A-Z][A-Z0-9 _]+[A-Z0-9]\s*(?:(?:-+|in\s+\S+)\s*)?$/;
17311
17447
  var ELM_ERROR_SUMMARY_RE = /^\s*(?:Detected\s+\d+\s+error|I\s+ran\s+into\s+\d+\s+problem|\d+\s+error[s]?\s+found)/i;
17312
17448
  var elmFilter = makeLanguageFilter({
17313
17449
  name: "elm",
@@ -17340,24 +17476,24 @@ var elmFilter = makeLanguageFilter({
17340
17476
  });
17341
17477
  var JULIA_PKG_RESOLVING_RE = (
17342
17478
  // eslint-disable-next-line no-control-regex
17343
- /^\s*(?:\x1b\[[0-9;]*m)?\s*(?:Resolving|Updating|Fetching|Precompiling|Downgrading|Upgrading|Cloning|Archiving)\s+/i
17479
+ /^\s*(?:\x1b\[[0-9;]*m\s*)?(?:Resolving|Updating|Fetching|Precompiling|Downgrading|Upgrading|Cloning|Archiving)\s+/i
17344
17480
  );
17345
17481
  var JULIA_PKG_DEP_LINE_RE = (
17346
17482
  // eslint-disable-next-line no-control-regex
17347
- /^\s*(?:\x1b\[[0-9;]*m)?\s*\[[0-9a-f]{8}\]\s+(?:[+\-↑↓~→⇒✓]|\w)/
17483
+ /^\s*(?:\x1b\[[0-9;]*m\s*)?\[[0-9a-f]{8}\]\s+(?:[+\-↑↓~→⇒✓]|\w)/
17348
17484
  );
17349
- var JULIA_PKG_INSTALLED_RE = /^\s*(?:\x1b\[[0-9;]*m)?\s*Installed\s+\S+\s+/i;
17485
+ var JULIA_PKG_INSTALLED_RE = /^\s*(?:\x1b\[[0-9;]*m\s*)?Installed\s+\S+\s+/i;
17350
17486
  var JULIA_PKG_BUILDING_RE = (
17351
17487
  // eslint-disable-next-line no-control-regex
17352
- /^\s*(?:\x1b\[[0-9;]*m)?\s*Building\s+\S+\s*(?:→|->|─+)?\s*/i
17488
+ /^\s*(?:\x1b\[[0-9;]*m\s*)?Building\s+\S+\s*(?:→|->|─+)?\s*/i
17353
17489
  );
17354
- var JULIA_PKG_STATUS_RE = /^\s*(?:\x1b\[[0-9;]*m)?\s*Status\s+`/i;
17490
+ var JULIA_PKG_STATUS_RE = /^\s*(?:\x1b\[[0-9;]*m\s*)?Status\s+`/i;
17355
17491
  var JULIA_TEST_SUMMARY_RE = /^\s*(?:Test\s+Summary:|Tests\s+run:|\d+\s+test[s]?\s+(?:passed|failed)|ALL_TESTS_PASS|Testing\s+\S+\s+done|No\s+tests\s+failed)/i;
17356
17492
  var JULIA_TEST_PASS_RE = /^\s*(?:✓|PASS:|Test\s+Passed)\s+/i;
17357
- var JULIA_TESTING_HEADER_RE = /^\s*(?:\x1b\[[0-9;]*m)?\s*Testing\s+\S+/i;
17493
+ var JULIA_TESTING_HEADER_RE = /^\s*(?:\x1b\[[0-9;]*m\s*)?Testing\s+\S+/i;
17358
17494
  var JULIA_PRECOMPILE_RE = (
17359
17495
  // eslint-disable-next-line no-control-regex
17360
- /^\s*(?:\x1b\[[0-9;]*m)?\s*\d+\s+(?:package[s]?\s+being\s+precompiled|dependency\s+precompil)/i
17496
+ /^\s*(?:\x1b\[[0-9;]*m\s*)?\d+\s+(?:package[s]?\s+being\s+precompiled|dependency\s+precompil)/i
17361
17497
  );
17362
17498
  var juliaFilter = makeLanguageFilter({
17363
17499
  name: "julia",
@@ -23259,7 +23395,7 @@ var vitestFilter = makeNodeTestRunnerFilter({
23259
23395
  name: "vitest",
23260
23396
  binaries: ["vitest"],
23261
23397
  // File-level pass header carries a duration: `✓ src/x.test.ts (12ms)`.
23262
- passFileRe: /^\s*✓\s+\S.*\([\d.]+\s*\w+\)/,
23398
+ passFileRe: /^\s*✓\s+\S.*\([\d.]+\s*[a-zA-Z]\w*\)/,
23263
23399
  failFileRe: /^\s*(?:×|FAIL|✗|✘)\s+\S/,
23264
23400
  summaryRe: /^(Test Files|Tests|Modules|Duration|Start at)[\s:]+\d/,
23265
23401
  // Per-test tick is indented ≥2 spaces: ` ✓ should pass`.
@@ -23471,6 +23607,8 @@ export {
23471
23607
  validateEnumField,
23472
23608
  getLastConfigParseError,
23473
23609
  getLastProjectConfigParseError,
23610
+ PROJECT_LOCKED_SECTIONS,
23611
+ PROJECT_LOCKED_KEYS,
23474
23612
  lastProjectConfigLockedKeys,
23475
23613
  getProjectConfigInfo,
23476
23614
  resolveConfigKeyLayer,
@@ -23529,6 +23667,7 @@ export {
23529
23667
  _useRichStats,
23530
23668
  renderShortStats,
23531
23669
  renderStats2 as renderStats,
23670
+ compileCustomPatterns,
23532
23671
  redactSecrets,
23533
23672
  getToolName,
23534
23673
  getToolInput,
@@ -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-LJ3CHCTT.mjs";
13
13
  import {
14
14
  SYMBOL_BODY_CHAR_CAP,
15
15
  copilotCliMcpToolsDir,
@@ -24,7 +24,7 @@ import {
24
24
  resolveIndexPath,
25
25
  shortFingerprint,
26
26
  toDisplayPath
27
- } from "./token-goat-chunk-4ZDRTNGV.mjs";
27
+ } from "./token-goat-chunk-UZ2NFOOZ.mjs";
28
28
  import {
29
29
  registerReset
30
30
  } from "./token-goat-chunk-AO2QD2AG.mjs";
@@ -4,14 +4,14 @@ import {
4
4
  buildEvent,
5
5
  relay,
6
6
  relayInProcess
7
- } from "./token-goat-chunk-RRNRPCLX.mjs";
7
+ } from "./token-goat-chunk-Q4LOQY44.mjs";
8
8
  import {
9
9
  MAX_STDIN_BYTES,
10
10
  readStdinJson
11
- } from "./token-goat-chunk-MR7MNSDR.mjs";
12
- import "./token-goat-chunk-FDXINYK4.mjs";
13
- import "./token-goat-chunk-LHMC5ENL.mjs";
14
- import "./token-goat-chunk-4ZDRTNGV.mjs";
11
+ } from "./token-goat-chunk-VCNW7BGU.mjs";
12
+ import "./token-goat-chunk-LJ3CHCTT.mjs";
13
+ import "./token-goat-chunk-CGWACYYZ.mjs";
14
+ import "./token-goat-chunk-UZ2NFOOZ.mjs";
15
15
  import "./token-goat-chunk-AO2QD2AG.mjs";
16
16
  import "./token-goat-chunk-AEX54RUZ.mjs";
17
17
  export {
@@ -2,11 +2,11 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  relayInProcess
5
- } from "./token-goat-chunk-RRNRPCLX.mjs";
6
- import "./token-goat-chunk-MR7MNSDR.mjs";
7
- import "./token-goat-chunk-FDXINYK4.mjs";
8
- import "./token-goat-chunk-LHMC5ENL.mjs";
9
- import "./token-goat-chunk-4ZDRTNGV.mjs";
5
+ } from "./token-goat-chunk-Q4LOQY44.mjs";
6
+ import "./token-goat-chunk-VCNW7BGU.mjs";
7
+ import "./token-goat-chunk-LJ3CHCTT.mjs";
8
+ import "./token-goat-chunk-CGWACYYZ.mjs";
9
+ import "./token-goat-chunk-UZ2NFOOZ.mjs";
10
10
  import "./token-goat-chunk-AO2QD2AG.mjs";
11
11
  import "./token-goat-chunk-AEX54RUZ.mjs";
12
12
  export {
@@ -2,13 +2,13 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  run
5
- } from "./token-goat-chunk-SQSB5P5P.mjs";
6
- import "./token-goat-chunk-SXSWQMNP.mjs";
7
- import "./token-goat-chunk-MR7MNSDR.mjs";
8
- import "./token-goat-chunk-FDXINYK4.mjs";
5
+ } from "./token-goat-chunk-KKIB7O3Z.mjs";
6
+ import "./token-goat-chunk-FXAPKVRG.mjs";
7
+ import "./token-goat-chunk-VCNW7BGU.mjs";
8
+ import "./token-goat-chunk-LJ3CHCTT.mjs";
9
9
  import {
10
10
  installEpipeGuard
11
- } from "./token-goat-chunk-4ZDRTNGV.mjs";
11
+ } from "./token-goat-chunk-UZ2NFOOZ.mjs";
12
12
  import "./token-goat-chunk-AO2QD2AG.mjs";
13
13
  import "./token-goat-chunk-AEX54RUZ.mjs";
14
14