oh-my-customcode 1.1.105 → 1.1.107

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 (34) hide show
  1. package/README.md +8 -9
  2. package/dist/cli/index.js +323 -273
  3. package/dist/index.js +223 -140
  4. package/package.json +4 -3
  5. package/templates/.claude/hooks/hooks.json +0 -10
  6. package/templates/.claude/hooks/scripts/claude-md-reinject.sh +7 -1
  7. package/templates/.claude/hooks/scripts/cost-cap-advisor.sh +107 -52
  8. package/templates/.claude/hooks/scripts/session-env-check.sh +0 -8
  9. package/templates/.claude/hooks/scripts/session-reflection.sh +60 -15
  10. package/templates/.claude/hooks/scripts/stuck-detector.sh +110 -14
  11. package/templates/.claude/rules/MAY-optimization.md +1 -1
  12. package/templates/.claude/rules/MUST-agent-design.md +1 -1
  13. package/templates/.claude/rules/SHOULD-memory-integration.md +1 -1
  14. package/templates/.claude/rules/SHOULD-verification-ladder.md +9 -0
  15. package/templates/.claude/settings.json +0 -10
  16. package/templates/.claude/skills/claude-native/SKILL.md +36 -2
  17. package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +0 -8
  18. package/templates/.claude/skills/omcustom-feedback/SKILL.md +51 -22
  19. package/templates/.claude/skills/pipeline/workflows/auto-dev.yaml +251 -29
  20. package/templates/.claude/skills/post-release-followup/SKILL.md +108 -14
  21. package/templates/.claude/skills/scout/SKILL.md +41 -6
  22. package/templates/.github/workflows/wiki-sync.yml +26 -93
  23. package/templates/CLAUDE.md +1 -1
  24. package/templates/CLAUDE.md.en +1 -1
  25. package/templates/CLAUDE.md.ko +1 -1
  26. package/templates/README.md +4 -4
  27. package/templates/guides/claude-code/15-version-compatibility.md +6 -0
  28. package/templates/guides/external-tools/ecc-absorption-decisions.md +2 -0
  29. package/templates/guides/multi-provider-exec/README.md +7 -18
  30. package/templates/manifest.json +3 -3
  31. package/templates/workflows/auto-dev.yaml +251 -29
  32. package/templates/.claude/hooks/scripts/rtk-intercept.sh +0 -77
  33. package/templates/.claude/skills/rtk-exec/SKILL.md +0 -199
  34. package/templates/.claude/skills/rtk-exec/scripts/rtk-wrapper.cjs +0 -377
package/dist/cli/index.js CHANGED
@@ -335,7 +335,7 @@ var init_package = __esm(() => {
335
335
  workspaces: [
336
336
  "packages/*"
337
337
  ],
338
- version: "1.1.105",
338
+ version: "1.1.107",
339
339
  description: "Batteries-included agent harness for Claude Code",
340
340
  type: "module",
341
341
  bin: {
@@ -369,7 +369,7 @@ var init_package = __esm(() => {
369
369
  lint: "biome check src/ tests/ scripts/",
370
370
  "lint:fix": "biome check --write src/ tests/ scripts/",
371
371
  format: "biome format --write src/ tests/ scripts/",
372
- typecheck: "tsc --noEmit",
372
+ typecheck: "tsc --noEmit && tsc --noEmit -p tsconfig.wiki-links.json",
373
373
  "docs:dev": "vitepress dev docs",
374
374
  "docs:build": "vitepress build docs",
375
375
  prepare: "sh scripts/setup-hooks.sh || true",
@@ -381,7 +381,7 @@ var init_package = __esm(() => {
381
381
  "@inquirer/prompts": "^8.3.2",
382
382
  commander: "^15.0.0",
383
383
  i18next: "^26.0.2",
384
- yaml: "^2.8.2"
384
+ yaml: "2.8.3"
385
385
  },
386
386
  devDependencies: {
387
387
  "@anthropic-ai/sdk": "^0.127.0",
@@ -390,6 +390,7 @@ var init_package = __esm(() => {
390
390
  "@types/js-yaml": "^4.0.9",
391
391
  "@types/nodemailer": "^8.0.0",
392
392
  "js-yaml": "^5.0.0",
393
+ "mdast-util-from-markdown": "2.1.0",
393
394
  nodemailer: "^10.0.0",
394
395
  typescript: "^7.0.2",
395
396
  vitepress: "^1.6.4"
@@ -428,7 +429,7 @@ var init_package = __esm(() => {
428
429
  };
429
430
  });
430
431
 
431
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/identity.js
432
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.js
432
433
  var require_identity = __commonJS(function(exports) {
433
434
  var ALIAS = Symbol.for("yaml.alias");
434
435
  var DOC = Symbol.for("yaml.document");
@@ -482,7 +483,7 @@ var require_identity = __commonJS(function(exports) {
482
483
  exports.isSeq = isSeq;
483
484
  });
484
485
 
485
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/visit.js
486
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/visit.js
486
487
  var require_visit = __commonJS(function(exports) {
487
488
  var identity = require_identity();
488
489
  var BREAK = Symbol("break visit");
@@ -637,7 +638,7 @@ var require_visit = __commonJS(function(exports) {
637
638
  exports.visitAsync = visitAsync;
638
639
  });
639
640
 
640
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/doc/directives.js
641
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/directives.js
641
642
  var require_directives = __commonJS(function(exports) {
642
643
  var identity = require_identity();
643
644
  var visit = require_visit();
@@ -789,7 +790,7 @@ var require_directives = __commonJS(function(exports) {
789
790
  exports.Directives = Directives;
790
791
  });
791
792
 
792
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/doc/anchors.js
793
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.js
793
794
  var require_anchors = __commonJS(function(exports) {
794
795
  var identity = require_identity();
795
796
  var visit = require_visit();
@@ -851,7 +852,7 @@ var require_anchors = __commonJS(function(exports) {
851
852
  exports.findNewAnchor = findNewAnchor;
852
853
  });
853
854
 
854
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/doc/applyReviver.js
855
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.js
855
856
  var require_applyReviver = __commonJS(function(exports) {
856
857
  function applyReviver(reviver, obj, key, val) {
857
858
  if (val && typeof val === "object") {
@@ -898,7 +899,7 @@ var require_applyReviver = __commonJS(function(exports) {
898
899
  exports.applyReviver = applyReviver;
899
900
  });
900
901
 
901
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/toJS.js
902
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.js
902
903
  var require_toJS = __commonJS(function(exports) {
903
904
  var identity = require_identity();
904
905
  function toJS(value, arg, ctx) {
@@ -925,7 +926,7 @@ var require_toJS = __commonJS(function(exports) {
925
926
  exports.toJS = toJS;
926
927
  });
927
928
 
928
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/Node.js
929
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.js
929
930
  var require_Node = __commonJS(function(exports) {
930
931
  var applyReviver = require_applyReviver();
931
932
  var identity = require_identity();
@@ -962,7 +963,7 @@ var require_Node = __commonJS(function(exports) {
962
963
  exports.NodeBase = NodeBase;
963
964
  });
964
965
 
965
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/Alias.js
966
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.js
966
967
  var require_Alias = __commonJS(function(exports) {
967
968
  var anchors = require_anchors();
968
969
  var visit = require_visit();
@@ -1070,7 +1071,7 @@ var require_Alias = __commonJS(function(exports) {
1070
1071
  exports.Alias = Alias;
1071
1072
  });
1072
1073
 
1073
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/Scalar.js
1074
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.js
1074
1075
  var require_Scalar = __commonJS(function(exports) {
1075
1076
  var identity = require_identity();
1076
1077
  var Node = require_Node();
@@ -1098,7 +1099,7 @@ var require_Scalar = __commonJS(function(exports) {
1098
1099
  exports.isScalarValue = isScalarValue;
1099
1100
  });
1100
1101
 
1101
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/doc/createNode.js
1102
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.js
1102
1103
  var require_createNode = __commonJS(function(exports) {
1103
1104
  var Alias = require_Alias();
1104
1105
  var identity = require_identity();
@@ -1170,7 +1171,7 @@ var require_createNode = __commonJS(function(exports) {
1170
1171
  exports.createNode = createNode;
1171
1172
  });
1172
1173
 
1173
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/Collection.js
1174
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.js
1174
1175
  var require_Collection = __commonJS(function(exports) {
1175
1176
  var createNode = require_createNode();
1176
1177
  var identity = require_identity();
@@ -1285,7 +1286,7 @@ var require_Collection = __commonJS(function(exports) {
1285
1286
  exports.isEmptyPath = isEmptyPath;
1286
1287
  });
1287
1288
 
1288
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyComment.js
1289
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.js
1289
1290
  var require_stringifyComment = __commonJS(function(exports) {
1290
1291
  var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
1291
1292
  function indentComment(comment, indent) {
@@ -1302,7 +1303,7 @@ var require_stringifyComment = __commonJS(function(exports) {
1302
1303
  exports.stringifyComment = stringifyComment;
1303
1304
  });
1304
1305
 
1305
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/foldFlowLines.js
1306
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.js
1306
1307
  var require_foldFlowLines = __commonJS(function(exports) {
1307
1308
  var FOLD_FLOW = "flow";
1308
1309
  var FOLD_BLOCK = "block";
@@ -1439,7 +1440,7 @@ ${indent}${text.slice(fold + 1, end)}`;
1439
1440
  exports.foldFlowLines = foldFlowLines;
1440
1441
  });
1441
1442
 
1442
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyString.js
1443
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.js
1443
1444
  var require_stringifyString = __commonJS(function(exports) {
1444
1445
  var Scalar = require_Scalar();
1445
1446
  var foldFlowLines = require_foldFlowLines();
@@ -1737,7 +1738,7 @@ ${indent}`);
1737
1738
  exports.stringifyString = stringifyString;
1738
1739
  });
1739
1740
 
1740
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringify.js
1741
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.js
1741
1742
  var require_stringify = __commonJS(function(exports) {
1742
1743
  var anchors = require_anchors();
1743
1744
  var identity = require_identity();
@@ -1760,6 +1761,7 @@ var require_stringify = __commonJS(function(exports) {
1760
1761
  nullStr: "null",
1761
1762
  simpleKeys: false,
1762
1763
  singleQuote: null,
1764
+ trailingComma: false,
1763
1765
  trueStr: "true",
1764
1766
  verifyAliasOrder: true
1765
1767
  }, doc.schema.toStringOptions, options);
@@ -1857,7 +1859,7 @@ ${ctx.indent}${str}`;
1857
1859
  exports.stringify = stringify;
1858
1860
  });
1859
1861
 
1860
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyPair.js
1862
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.js
1861
1863
  var require_stringifyPair = __commonJS(function(exports) {
1862
1864
  var identity = require_identity();
1863
1865
  var Scalar = require_Scalar();
@@ -1993,7 +1995,7 @@ ${ctx.indent}`;
1993
1995
  exports.stringifyPair = stringifyPair;
1994
1996
  });
1995
1997
 
1996
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/log.js
1998
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/log.js
1997
1999
  var require_log = __commonJS(function(exports) {
1998
2000
  var node_process = __require("process");
1999
2001
  function debug(logLevel, ...messages) {
@@ -2012,7 +2014,7 @@ var require_log = __commonJS(function(exports) {
2012
2014
  exports.warn = warn;
2013
2015
  });
2014
2016
 
2015
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/merge.js
2017
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.js
2016
2018
  var require_merge = __commonJS(function(exports) {
2017
2019
  var identity = require_identity();
2018
2020
  var Scalar = require_Scalar();
@@ -2066,7 +2068,7 @@ var require_merge = __commonJS(function(exports) {
2066
2068
  exports.merge = merge;
2067
2069
  });
2068
2070
 
2069
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/addPairToJSMap.js
2071
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.js
2070
2072
  var require_addPairToJSMap = __commonJS(function(exports) {
2071
2073
  var log = require_log();
2072
2074
  var merge = require_merge();
@@ -2127,7 +2129,7 @@ var require_addPairToJSMap = __commonJS(function(exports) {
2127
2129
  exports.addPairToJSMap = addPairToJSMap;
2128
2130
  });
2129
2131
 
2130
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/Pair.js
2132
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.js
2131
2133
  var require_Pair = __commonJS(function(exports) {
2132
2134
  var createNode = require_createNode();
2133
2135
  var stringifyPair = require_stringifyPair();
@@ -2165,7 +2167,7 @@ var require_Pair = __commonJS(function(exports) {
2165
2167
  exports.createPair = createPair;
2166
2168
  });
2167
2169
 
2168
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyCollection.js
2170
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.js
2169
2171
  var require_stringifyCollection = __commonJS(function(exports) {
2170
2172
  var identity = require_identity();
2171
2173
  var stringify = require_stringify();
@@ -2268,13 +2270,20 @@ ${indent}${line}` : `
2268
2270
  if (comment)
2269
2271
  reqNewline = true;
2270
2272
  let str = stringify.stringify(item, itemCtx, () => comment = null);
2271
- if (i < items.length - 1)
2273
+ reqNewline || (reqNewline = lines.length > linesAtValue || str.includes(`
2274
+ `));
2275
+ if (i < items.length - 1) {
2272
2276
  str += ",";
2277
+ } else if (ctx.options.trailingComma) {
2278
+ if (ctx.options.lineWidth > 0) {
2279
+ reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
2280
+ }
2281
+ if (reqNewline) {
2282
+ str += ",";
2283
+ }
2284
+ }
2273
2285
  if (comment)
2274
2286
  str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
2275
- if (!reqNewline && (lines.length > linesAtValue || str.includes(`
2276
- `)))
2277
- reqNewline = true;
2278
2287
  lines.push(str);
2279
2288
  linesAtValue = lines.length;
2280
2289
  }
@@ -2310,7 +2319,7 @@ ${indent}${end}`;
2310
2319
  exports.stringifyCollection = stringifyCollection;
2311
2320
  });
2312
2321
 
2313
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLMap.js
2322
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.js
2314
2323
  var require_YAMLMap = __commonJS(function(exports) {
2315
2324
  var stringifyCollection = require_stringifyCollection();
2316
2325
  var addPairToJSMap = require_addPairToJSMap();
@@ -2437,7 +2446,7 @@ var require_YAMLMap = __commonJS(function(exports) {
2437
2446
  exports.findPair = findPair;
2438
2447
  });
2439
2448
 
2440
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/common/map.js
2449
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.js
2441
2450
  var require_map = __commonJS(function(exports) {
2442
2451
  var identity = require_identity();
2443
2452
  var YAMLMap = require_YAMLMap();
@@ -2456,7 +2465,7 @@ var require_map = __commonJS(function(exports) {
2456
2465
  exports.map = map;
2457
2466
  });
2458
2467
 
2459
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/nodes/YAMLSeq.js
2468
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.js
2460
2469
  var require_YAMLSeq = __commonJS(function(exports) {
2461
2470
  var createNode = require_createNode();
2462
2471
  var stringifyCollection = require_stringifyCollection();
@@ -2549,7 +2558,7 @@ var require_YAMLSeq = __commonJS(function(exports) {
2549
2558
  exports.YAMLSeq = YAMLSeq;
2550
2559
  });
2551
2560
 
2552
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/common/seq.js
2561
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.js
2553
2562
  var require_seq = __commonJS(function(exports) {
2554
2563
  var identity = require_identity();
2555
2564
  var YAMLSeq = require_YAMLSeq();
@@ -2568,7 +2577,7 @@ var require_seq = __commonJS(function(exports) {
2568
2577
  exports.seq = seq;
2569
2578
  });
2570
2579
 
2571
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/common/string.js
2580
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.js
2572
2581
  var require_string = __commonJS(function(exports) {
2573
2582
  var stringifyString = require_stringifyString();
2574
2583
  var string = {
@@ -2584,7 +2593,7 @@ var require_string = __commonJS(function(exports) {
2584
2593
  exports.string = string;
2585
2594
  });
2586
2595
 
2587
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/common/null.js
2596
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.js
2588
2597
  var require_null = __commonJS(function(exports) {
2589
2598
  var Scalar = require_Scalar();
2590
2599
  var nullTag = {
@@ -2599,7 +2608,7 @@ var require_null = __commonJS(function(exports) {
2599
2608
  exports.nullTag = nullTag;
2600
2609
  });
2601
2610
 
2602
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/core/bool.js
2611
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.js
2603
2612
  var require_bool = __commonJS(function(exports) {
2604
2613
  var Scalar = require_Scalar();
2605
2614
  var boolTag = {
@@ -2620,7 +2629,7 @@ var require_bool = __commonJS(function(exports) {
2620
2629
  exports.boolTag = boolTag;
2621
2630
  });
2622
2631
 
2623
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyNumber.js
2632
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.js
2624
2633
  var require_stringifyNumber = __commonJS(function(exports) {
2625
2634
  function stringifyNumber({ format, minFractionDigits, tag, value }) {
2626
2635
  if (typeof value === "bigint")
@@ -2644,7 +2653,7 @@ var require_stringifyNumber = __commonJS(function(exports) {
2644
2653
  exports.stringifyNumber = stringifyNumber;
2645
2654
  });
2646
2655
 
2647
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/core/float.js
2656
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.js
2648
2657
  var require_float = __commonJS(function(exports) {
2649
2658
  var Scalar = require_Scalar();
2650
2659
  var stringifyNumber = require_stringifyNumber();
@@ -2687,7 +2696,7 @@ var require_float = __commonJS(function(exports) {
2687
2696
  exports.floatNaN = floatNaN;
2688
2697
  });
2689
2698
 
2690
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/core/int.js
2699
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.js
2691
2700
  var require_int = __commonJS(function(exports) {
2692
2701
  var stringifyNumber = require_stringifyNumber();
2693
2702
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -2729,7 +2738,7 @@ var require_int = __commonJS(function(exports) {
2729
2738
  exports.intOct = intOct;
2730
2739
  });
2731
2740
 
2732
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/core/schema.js
2741
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.js
2733
2742
  var require_schema = __commonJS(function(exports) {
2734
2743
  var map = require_map();
2735
2744
  var _null = require_null();
@@ -2754,7 +2763,7 @@ var require_schema = __commonJS(function(exports) {
2754
2763
  exports.schema = schema;
2755
2764
  });
2756
2765
 
2757
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/json/schema.js
2766
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.js
2758
2767
  var require_schema2 = __commonJS(function(exports) {
2759
2768
  var Scalar = require_Scalar();
2760
2769
  var map = require_map();
@@ -2818,7 +2827,7 @@ var require_schema2 = __commonJS(function(exports) {
2818
2827
  exports.schema = schema;
2819
2828
  });
2820
2829
 
2821
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/binary.js
2830
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.js
2822
2831
  var require_binary = __commonJS(function(exports) {
2823
2832
  var node_buffer = __require("buffer");
2824
2833
  var Scalar = require_Scalar();
@@ -2873,7 +2882,7 @@ var require_binary = __commonJS(function(exports) {
2873
2882
  exports.binary = binary;
2874
2883
  });
2875
2884
 
2876
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
2885
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
2877
2886
  var require_pairs = __commonJS(function(exports) {
2878
2887
  var identity = require_identity();
2879
2888
  var Pair = require_Pair();
@@ -2948,7 +2957,7 @@ ${cn.comment}` : item.comment;
2948
2957
  exports.resolvePairs = resolvePairs;
2949
2958
  });
2950
2959
 
2951
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/omap.js
2960
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.js
2952
2961
  var require_omap = __commonJS(function(exports) {
2953
2962
  var identity = require_identity();
2954
2963
  var toJS = require_toJS();
@@ -3020,7 +3029,7 @@ var require_omap = __commonJS(function(exports) {
3020
3029
  exports.omap = omap;
3021
3030
  });
3022
3031
 
3023
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/bool.js
3032
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.js
3024
3033
  var require_bool2 = __commonJS(function(exports) {
3025
3034
  var Scalar = require_Scalar();
3026
3035
  function boolStringify({ value, source }, ctx) {
@@ -3049,7 +3058,7 @@ var require_bool2 = __commonJS(function(exports) {
3049
3058
  exports.trueTag = trueTag;
3050
3059
  });
3051
3060
 
3052
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/float.js
3061
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.js
3053
3062
  var require_float2 = __commonJS(function(exports) {
3054
3063
  var Scalar = require_Scalar();
3055
3064
  var stringifyNumber = require_stringifyNumber();
@@ -3095,7 +3104,7 @@ var require_float2 = __commonJS(function(exports) {
3095
3104
  exports.floatNaN = floatNaN;
3096
3105
  });
3097
3106
 
3098
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/int.js
3107
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.js
3099
3108
  var require_int2 = __commonJS(function(exports) {
3100
3109
  var stringifyNumber = require_stringifyNumber();
3101
3110
  var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
@@ -3171,7 +3180,7 @@ var require_int2 = __commonJS(function(exports) {
3171
3180
  exports.intOct = intOct;
3172
3181
  });
3173
3182
 
3174
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/set.js
3183
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.js
3175
3184
  var require_set = __commonJS(function(exports) {
3176
3185
  var identity = require_identity();
3177
3186
  var Pair = require_Pair();
@@ -3254,7 +3263,7 @@ var require_set = __commonJS(function(exports) {
3254
3263
  exports.set = set;
3255
3264
  });
3256
3265
 
3257
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
3266
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
3258
3267
  var require_timestamp = __commonJS(function(exports) {
3259
3268
  var stringifyNumber = require_stringifyNumber();
3260
3269
  function parseSexagesimal(str, asBigInt) {
@@ -3336,7 +3345,7 @@ var require_timestamp = __commonJS(function(exports) {
3336
3345
  exports.timestamp = timestamp;
3337
3346
  });
3338
3347
 
3339
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/yaml-1.1/schema.js
3348
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.js
3340
3349
  var require_schema3 = __commonJS(function(exports) {
3341
3350
  var map = require_map();
3342
3351
  var _null = require_null();
@@ -3377,7 +3386,7 @@ var require_schema3 = __commonJS(function(exports) {
3377
3386
  exports.schema = schema;
3378
3387
  });
3379
3388
 
3380
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/tags.js
3389
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/tags.js
3381
3390
  var require_tags = __commonJS(function(exports) {
3382
3391
  var map = require_map();
3383
3392
  var _null = require_null();
@@ -3468,7 +3477,7 @@ var require_tags = __commonJS(function(exports) {
3468
3477
  exports.getTags = getTags;
3469
3478
  });
3470
3479
 
3471
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/schema/Schema.js
3480
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.js
3472
3481
  var require_Schema = __commonJS(function(exports) {
3473
3482
  var identity = require_identity();
3474
3483
  var map = require_map();
@@ -3498,7 +3507,7 @@ var require_Schema = __commonJS(function(exports) {
3498
3507
  exports.Schema = Schema;
3499
3508
  });
3500
3509
 
3501
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/stringify/stringifyDocument.js
3510
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.js
3502
3511
  var require_stringifyDocument = __commonJS(function(exports) {
3503
3512
  var identity = require_identity();
3504
3513
  var stringify = require_stringify();
@@ -3578,7 +3587,7 @@ var require_stringifyDocument = __commonJS(function(exports) {
3578
3587
  exports.stringifyDocument = stringifyDocument;
3579
3588
  });
3580
3589
 
3581
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/doc/Document.js
3590
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/doc/Document.js
3582
3591
  var require_Document = __commonJS(function(exports) {
3583
3592
  var Alias = require_Alias();
3584
3593
  var Collection = require_Collection();
@@ -3813,7 +3822,7 @@ var require_Document = __commonJS(function(exports) {
3813
3822
  exports.Document = Document;
3814
3823
  });
3815
3824
 
3816
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/errors.js
3825
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/errors.js
3817
3826
  var require_errors = __commonJS(function(exports) {
3818
3827
  class YAMLError extends Error {
3819
3828
  constructor(name, pos, code, message) {
@@ -3878,7 +3887,7 @@ ${pointer}
3878
3887
  exports.prettifyError = prettifyError;
3879
3888
  });
3880
3889
 
3881
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-props.js
3890
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.js
3882
3891
  var require_resolve_props = __commonJS(function(exports) {
3883
3892
  function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
3884
3893
  let spaceBefore = false;
@@ -4008,7 +4017,7 @@ var require_resolve_props = __commonJS(function(exports) {
4008
4017
  exports.resolveProps = resolveProps;
4009
4018
  });
4010
4019
 
4011
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/util-contains-newline.js
4020
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.js
4012
4021
  var require_util_contains_newline = __commonJS(function(exports) {
4013
4022
  function containsNewline(key) {
4014
4023
  if (!key)
@@ -4048,7 +4057,7 @@ var require_util_contains_newline = __commonJS(function(exports) {
4048
4057
  exports.containsNewline = containsNewline;
4049
4058
  });
4050
4059
 
4051
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/util-flow-indent-check.js
4060
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.js
4052
4061
  var require_util_flow_indent_check = __commonJS(function(exports) {
4053
4062
  var utilContainsNewline = require_util_contains_newline();
4054
4063
  function flowIndentCheck(indent, fc, onError) {
@@ -4063,7 +4072,7 @@ var require_util_flow_indent_check = __commonJS(function(exports) {
4063
4072
  exports.flowIndentCheck = flowIndentCheck;
4064
4073
  });
4065
4074
 
4066
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/util-map-includes.js
4075
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.js
4067
4076
  var require_util_map_includes = __commonJS(function(exports) {
4068
4077
  var identity = require_identity();
4069
4078
  function mapIncludes(ctx, items, search) {
@@ -4076,7 +4085,7 @@ var require_util_map_includes = __commonJS(function(exports) {
4076
4085
  exports.mapIncludes = mapIncludes;
4077
4086
  });
4078
4087
 
4079
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-map.js
4088
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.js
4080
4089
  var require_resolve_block_map = __commonJS(function(exports) {
4081
4090
  var Pair = require_Pair();
4082
4091
  var YAMLMap = require_YAMLMap();
@@ -4183,7 +4192,7 @@ var require_resolve_block_map = __commonJS(function(exports) {
4183
4192
  exports.resolveBlockMap = resolveBlockMap;
4184
4193
  });
4185
4194
 
4186
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-seq.js
4195
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.js
4187
4196
  var require_resolve_block_seq = __commonJS(function(exports) {
4188
4197
  var YAMLSeq = require_YAMLSeq();
4189
4198
  var resolveProps = require_resolve_props();
@@ -4231,7 +4240,7 @@ var require_resolve_block_seq = __commonJS(function(exports) {
4231
4240
  exports.resolveBlockSeq = resolveBlockSeq;
4232
4241
  });
4233
4242
 
4234
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-end.js
4243
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.js
4235
4244
  var require_resolve_end = __commonJS(function(exports) {
4236
4245
  function resolveEnd(end, offset, reqSpace, onError) {
4237
4246
  let comment = "";
@@ -4271,7 +4280,7 @@ var require_resolve_end = __commonJS(function(exports) {
4271
4280
  exports.resolveEnd = resolveEnd;
4272
4281
  });
4273
4282
 
4274
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-collection.js
4283
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.js
4275
4284
  var require_resolve_flow_collection = __commonJS(function(exports) {
4276
4285
  var identity = require_identity();
4277
4286
  var Pair = require_Pair();
@@ -4462,7 +4471,7 @@ var require_resolve_flow_collection = __commonJS(function(exports) {
4462
4471
  exports.resolveFlowCollection = resolveFlowCollection;
4463
4472
  });
4464
4473
 
4465
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/compose-collection.js
4474
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
4466
4475
  var require_compose_collection = __commonJS(function(exports) {
4467
4476
  var identity = require_identity();
4468
4477
  var Scalar = require_Scalar();
@@ -4524,7 +4533,7 @@ var require_compose_collection = __commonJS(function(exports) {
4524
4533
  exports.composeCollection = composeCollection;
4525
4534
  });
4526
4535
 
4527
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-block-scalar.js
4536
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.js
4528
4537
  var require_resolve_block_scalar = __commonJS(function(exports) {
4529
4538
  var Scalar = require_Scalar();
4530
4539
  function resolveBlockScalar(ctx, scalar, onError) {
@@ -4717,7 +4726,7 @@ var require_resolve_block_scalar = __commonJS(function(exports) {
4717
4726
  exports.resolveBlockScalar = resolveBlockScalar;
4718
4727
  });
4719
4728
 
4720
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/resolve-flow-scalar.js
4729
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.js
4721
4730
  var require_resolve_flow_scalar = __commonJS(function(exports) {
4722
4731
  var Scalar = require_Scalar();
4723
4732
  var resolveEnd = require_resolve_end();
@@ -4933,7 +4942,7 @@ var require_resolve_flow_scalar = __commonJS(function(exports) {
4933
4942
  exports.resolveFlowScalar = resolveFlowScalar;
4934
4943
  });
4935
4944
 
4936
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/compose-scalar.js
4945
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.js
4937
4946
  var require_compose_scalar = __commonJS(function(exports) {
4938
4947
  var identity = require_identity();
4939
4948
  var Scalar = require_Scalar();
@@ -5011,7 +5020,7 @@ var require_compose_scalar = __commonJS(function(exports) {
5011
5020
  exports.composeScalar = composeScalar;
5012
5021
  });
5013
5022
 
5014
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/util-empty-scalar-position.js
5023
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.js
5015
5024
  var require_util_empty_scalar_position = __commonJS(function(exports) {
5016
5025
  function emptyScalarPosition(offset, before, pos) {
5017
5026
  if (before) {
@@ -5038,7 +5047,7 @@ var require_util_empty_scalar_position = __commonJS(function(exports) {
5038
5047
  exports.emptyScalarPosition = emptyScalarPosition;
5039
5048
  });
5040
5049
 
5041
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/compose-node.js
5050
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.js
5042
5051
  var require_compose_node = __commonJS(function(exports) {
5043
5052
  var Alias = require_Alias();
5044
5053
  var identity = require_identity();
@@ -5069,17 +5078,22 @@ var require_compose_node = __commonJS(function(exports) {
5069
5078
  case "block-map":
5070
5079
  case "block-seq":
5071
5080
  case "flow-collection":
5072
- node = composeCollection.composeCollection(CN, ctx, token, props, onError);
5073
- if (anchor)
5074
- node.anchor = anchor.source.substring(1);
5081
+ try {
5082
+ node = composeCollection.composeCollection(CN, ctx, token, props, onError);
5083
+ if (anchor)
5084
+ node.anchor = anchor.source.substring(1);
5085
+ } catch (error) {
5086
+ const message = error instanceof Error ? error.message : String(error);
5087
+ onError(token, "RESOURCE_EXHAUSTION", message);
5088
+ }
5075
5089
  break;
5076
5090
  default: {
5077
5091
  const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
5078
5092
  onError(token, "UNEXPECTED_TOKEN", message);
5079
- node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
5080
5093
  isSrcToken = false;
5081
5094
  }
5082
5095
  }
5096
+ node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
5083
5097
  if (anchor && node.anchor === "")
5084
5098
  onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
5085
5099
  if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
@@ -5136,7 +5150,7 @@ var require_compose_node = __commonJS(function(exports) {
5136
5150
  exports.composeNode = composeNode;
5137
5151
  });
5138
5152
 
5139
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/compose-doc.js
5153
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
5140
5154
  var require_compose_doc = __commonJS(function(exports) {
5141
5155
  var Document = require_Document();
5142
5156
  var composeNode = require_compose_node();
@@ -5176,7 +5190,7 @@ var require_compose_doc = __commonJS(function(exports) {
5176
5190
  exports.composeDoc = composeDoc;
5177
5191
  });
5178
5192
 
5179
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/compose/composer.js
5193
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/compose/composer.js
5180
5194
  var require_composer = __commonJS(function(exports) {
5181
5195
  var node_process = __require("process");
5182
5196
  var directives = require_directives();
@@ -5365,7 +5379,7 @@ ${end.comment}` : end.comment;
5365
5379
  exports.Composer = Composer;
5366
5380
  });
5367
5381
 
5368
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/cst-scalar.js
5382
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.js
5369
5383
  var require_cst_scalar = __commonJS(function(exports) {
5370
5384
  var resolveBlockScalar = require_resolve_block_scalar();
5371
5385
  var resolveFlowScalar = require_resolve_flow_scalar();
@@ -5555,7 +5569,7 @@ var require_cst_scalar = __commonJS(function(exports) {
5555
5569
  exports.setScalarValue = setScalarValue;
5556
5570
  });
5557
5571
 
5558
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/cst-stringify.js
5572
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.js
5559
5573
  var require_cst_stringify = __commonJS(function(exports) {
5560
5574
  var stringify = (cst) => ("type" in cst) ? stringifyToken(cst) : stringifyItem(cst);
5561
5575
  function stringifyToken(token) {
@@ -5613,7 +5627,7 @@ var require_cst_stringify = __commonJS(function(exports) {
5613
5627
  exports.stringify = stringify;
5614
5628
  });
5615
5629
 
5616
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/cst-visit.js
5630
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.js
5617
5631
  var require_cst_visit = __commonJS(function(exports) {
5618
5632
  var BREAK = Symbol("break visit");
5619
5633
  var SKIP = Symbol("skip children");
@@ -5672,7 +5686,7 @@ var require_cst_visit = __commonJS(function(exports) {
5672
5686
  exports.visit = visit;
5673
5687
  });
5674
5688
 
5675
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/cst.js
5689
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/cst.js
5676
5690
  var require_cst = __commonJS(function(exports) {
5677
5691
  var cstScalar = require_cst_scalar();
5678
5692
  var cstStringify = require_cst_stringify();
@@ -5773,7 +5787,7 @@ var require_cst = __commonJS(function(exports) {
5773
5787
  exports.tokenType = tokenType;
5774
5788
  });
5775
5789
 
5776
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/lexer.js
5790
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.js
5777
5791
  var require_lexer = __commonJS(function(exports) {
5778
5792
  var cst = require_cst();
5779
5793
  function isEmpty(ch) {
@@ -6359,7 +6373,7 @@ var require_lexer = __commonJS(function(exports) {
6359
6373
  exports.Lexer = Lexer;
6360
6374
  });
6361
6375
 
6362
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/line-counter.js
6376
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.js
6363
6377
  var require_line_counter = __commonJS(function(exports) {
6364
6378
  class LineCounter {
6365
6379
  constructor() {
@@ -6387,7 +6401,7 @@ var require_line_counter = __commonJS(function(exports) {
6387
6401
  exports.LineCounter = LineCounter;
6388
6402
  });
6389
6403
 
6390
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/parse/parser.js
6404
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/parse/parser.js
6391
6405
  var require_parser = __commonJS(function(exports) {
6392
6406
  var node_process = __require("process");
6393
6407
  var cst = require_cst();
@@ -7236,7 +7250,7 @@ var require_parser = __commonJS(function(exports) {
7236
7250
  exports.Parser = Parser;
7237
7251
  });
7238
7252
 
7239
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/public-api.js
7253
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/public-api.js
7240
7254
  var require_public_api = __commonJS(function(exports) {
7241
7255
  var composer = require_composer();
7242
7256
  var Document = require_Document();
@@ -14542,8 +14556,6 @@ var en_default = {
14542
14556
  selfUpdateReexec: "↻ Re-executing with updated CLI (v{{version}})...",
14543
14557
  reexecArgvMissing: "⚠ Cannot re-exec: process.argv[1] is empty — continuing without re-exec",
14544
14558
  allProjectSkippedSource: " ℹ Skipped: {{name}} (source project cannot self-update)",
14545
- rtkMissing: "[RTK] RTK is not installed. Attempting installation...",
14546
- rtkInstalled: "[RTK] ✓ RTK installed — 60-90% token savings activated",
14547
14559
  codexMissing: "[Codex] Codex CLI is not installed. Attempting installation...",
14548
14560
  codexInstalled: "[Codex] ✓ Codex CLI installed"
14549
14561
  },
@@ -14646,10 +14658,6 @@ var en_default = {
14646
14658
  pass: "Framework is up to date (v{{version}})",
14647
14659
  warn: "Framework is outdated: installed v{{installed}}, latest v{{latest}} ({{behind}} version(s) behind). Run 'omcustom update' to sync."
14648
14660
  },
14649
- rtk: {
14650
- pass: "RTK installed",
14651
- warn: "RTK not installed — token savings unavailable"
14652
- },
14653
14661
  codex: {
14654
14662
  pass: "Codex CLI installed",
14655
14663
  warn: "Codex CLI not installed — AI-assisted development unavailable"
@@ -14722,10 +14730,6 @@ var en_default = {
14722
14730
  }
14723
14731
  },
14724
14732
  install: {
14725
- rtk_installing: "Installing RTK...",
14726
- rtk_success: "RTK installed successfully",
14727
- rtk_already: "RTK already installed",
14728
- rtk_install_failed: "RTK installation failed",
14729
14733
  codex_installing: "Installing Codex CLI...",
14730
14734
  codex_success: "Codex CLI installed successfully",
14731
14735
  codex_already: "Codex CLI already installed",
@@ -14966,8 +14970,6 @@ var ko_default = {
14966
14970
  selfUpdateReexec: "↻ 새 CLI(v{{version}})로 재실행 중...",
14967
14971
  reexecArgvMissing: "⚠ 재실행 불가: process.argv[1]이 비어있습니다 — 재실행 없이 계속합니다",
14968
14972
  allProjectSkippedSource: " ℹ 스킵: {{name}} (소스 프로젝트는 자체 업데이트할 수 없음)",
14969
- rtkMissing: "[RTK] RTK가 설치되지 않았습니다. 설치를 시도합니다...",
14970
- rtkInstalled: "[RTK] ✓ RTK 설치 완료 — 토큰 60-90% 절감 활성화",
14971
14973
  codexMissing: "[Codex] Codex CLI가 설치되지 않았습니다. 설치를 시도합니다...",
14972
14974
  codexInstalled: "[Codex] ✓ Codex CLI 설치 완료"
14973
14975
  },
@@ -15070,10 +15072,6 @@ var ko_default = {
15070
15072
  pass: "프레임워크가 최신 상태입니다 (v{{version}})",
15071
15073
  warn: "프레임워크가 구버전입니다: 설치됨 v{{installed}}, 최신 v{{latest}} ({{behind}}개 버전 뒤처짐). 'omcustom update'를 실행하여 동기화하세요."
15072
15074
  },
15073
- rtk: {
15074
- pass: "RTK 설치됨",
15075
- warn: "RTK 미설치 — 토큰 절감 불가"
15076
- },
15077
15075
  codex: {
15078
15076
  pass: "Codex CLI 설치됨",
15079
15077
  warn: "Codex CLI 미설치 — AI 개발 지원 불가"
@@ -15146,10 +15144,6 @@ var ko_default = {
15146
15144
  }
15147
15145
  },
15148
15146
  install: {
15149
- rtk_installing: "RTK 설치 중...",
15150
- rtk_success: "RTK 설치 완료",
15151
- rtk_already: "RTK 이미 설치됨",
15152
- rtk_install_failed: "RTK 설치 실패",
15153
15147
  codex_installing: "Codex CLI 설치 중...",
15154
15148
  codex_success: "Codex CLI 설치 완료",
15155
15149
  codex_already: "Codex CLI 이미 설치됨",
@@ -15672,7 +15666,7 @@ import { constants, promises as fs2, readFileSync as readFileSync2 } from "node:
15672
15666
  import path2 from "node:path";
15673
15667
  import { fileURLToPath as fileURLToPath2 } from "node:url";
15674
15668
 
15675
- // node_modules/.bun/yaml@2.8.2/node_modules/yaml/dist/index.js
15669
+ // node_modules/.bun/yaml@2.8.3/node_modules/yaml/dist/index.js
15676
15670
  var composer = require_composer();
15677
15671
  var Document = require_Document();
15678
15672
  var Schema = require_Schema();
@@ -15806,7 +15800,7 @@ var MESSAGES = {
15806
15800
  "update.file_applied": "Applied update to {{path}}",
15807
15801
  "update.lockfile_regenerated": "Lockfile regenerated ({{files}} files tracked)",
15808
15802
  "update.lockfile_failed": "Failed to regenerate lockfile: {{error}}",
15809
- "update.protected_file_updated": "⟳ Protected file {{file}} in {{component}} updated: {{hint}}",
15803
+ "update.protected_file_updated": "⟳ Protected file {{file}} in {{component}} selected for update: The protected-file policy allows this template update.",
15810
15804
  "update.namespace_synced": "Namespace synced: {{file}} ({{component}})",
15811
15805
  "update.hook_commands_migrated": "Migrated {{count}} hook/statusLine command(s) to CLAUDE_PROJECT_DIR-anchored paths",
15812
15806
  "update.hook_commands_migration_failed": "Failed to migrate hook commands in {{path}}",
@@ -15820,18 +15814,10 @@ var MESSAGES = {
15820
15814
  "codex.installing_npm": "Installing Codex CLI via npm...",
15821
15815
  "codex.install_failed": "Failed to install Codex CLI: {{error}}",
15822
15816
  "codex.unsupported_os": "Codex CLI auto-install is not supported on {{os}}",
15823
- "rtk.already_installed": "RTK is already installed",
15824
- "rtk.installing_brew": "Installing RTK via Homebrew...",
15825
- "rtk.installing_curl": "Installing RTK via install script...",
15826
- "rtk.install_failed": "Failed to install RTK: {{error}}",
15827
- "rtk.unsupported_os": "RTK auto-install is not supported on {{os}}",
15828
15817
  "mcp.ontology_rag_configured": "ontology-rag MCP server configured successfully",
15829
15818
  "install.codex_installing": "Installing Codex CLI...",
15830
15819
  "install.codex_success": "Codex CLI installed successfully",
15831
15820
  "install.codex_already": "Codex CLI is already installed",
15832
- "install.rtk_installing": "Installing RTK...",
15833
- "install.rtk_success": "RTK installed successfully",
15834
- "install.rtk_already": "RTK is already installed",
15835
15821
  "install.preserved": "Preserved {{files}} file(s) and {{dirs}} directory(ies) from the existing installation",
15836
15822
  "install.restored": "Restored {{files}} file(s) and {{dirs}} directory(ies) after installation",
15837
15823
  "install.backup_failed": "Failed to back up {{path}}: {{error}}",
@@ -15843,7 +15829,6 @@ var MESSAGES = {
15843
15829
  "preserve.restore_failed": "Failed to restore file {{file}}: {{error}}",
15844
15830
  "preserve_files.invalid_path": "Ignored invalid preserve_files entry from {{source}}: {{path}} ({{reason}})",
15845
15831
  "update.codex_missing": "Codex CLI is not installed",
15846
- "update.rtk_missing": "RTK is not installed",
15847
15832
  "update.self_update_skipped": "Skipped update: source project cannot update itself",
15848
15833
  "update.deprecated_file_invalid_path": "Skipped deprecated file with invalid path: {{path}} ({{reason}})",
15849
15834
  "update.deprecated_file_removed": "Removed deprecated file: {{path}} ({{reason}})",
@@ -15851,8 +15836,8 @@ var MESSAGES = {
15851
15836
  "update.entry_doc_force_updated": "Entry document force-updated: {{path}}",
15852
15837
  "update.entry_merge_warning": "Entry document merge warning: {{warning}}",
15853
15838
  "update.entry_template_not_found": "Entry document template not found: {{template}}",
15854
- "update.protected_file_force_overwrite": "Protected file {{file}} in {{component}} overwritten: {{hint}}",
15855
- "update.protected_file_skipped": "Protected file {{file}} in {{component}} skipped: {{hint}}",
15839
+ "update.protected_file_force_overwrite": "Protected file {{file}} in {{component}} selected for overwrite: The --force-overwrite-all option bypasses the protected-file preservation policy.",
15840
+ "update.protected_file_skipped": "Protected file {{file}} in {{component}} skipped: The protected-file preservation policy skips this update. Use --force-overwrite-all to override.",
15856
15841
  "update.settings_local_backfill_failed": "Failed to backfill statusLine refreshInterval in {{path}}",
15857
15842
  "general.done": "Done!",
15858
15843
  "general.failed": "Failed",
@@ -15928,7 +15913,7 @@ var MESSAGES = {
15928
15913
  "update.file_applied": "{{path}} 업데이트 적용",
15929
15914
  "update.lockfile_regenerated": "잠금 파일 재생성 완료 ({{files}}개 파일 추적)",
15930
15915
  "update.lockfile_failed": "잠금 파일 재생성 실패: {{error}}",
15931
- "update.protected_file_updated": "⟳ 보호 파일 {{file}} ({{component}}) 업데이트됨: {{hint}}",
15916
+ "update.protected_file_updated": "⟳ 보호 파일 {{file}} ({{component}}) 업데이트 대상: 보호 파일 정책에 따라 템플릿 업데이트가 허용됩니다.",
15932
15917
  "update.namespace_synced": "네임스페이스 동기화: {{file}} ({{component}})",
15933
15918
  "update.hook_commands_migrated": "CLAUDE_PROJECT_DIR 기준 경로로 훅/상태줄 명령 {{count}}개를 마이그레이션했습니다",
15934
15919
  "update.hook_commands_migration_failed": "{{path}}의 훅 명령 마이그레이션에 실패했습니다",
@@ -15942,18 +15927,10 @@ var MESSAGES = {
15942
15927
  "codex.installing_npm": "npm으로 Codex CLI를 설치합니다...",
15943
15928
  "codex.install_failed": "Codex CLI 설치에 실패했습니다: {{error}}",
15944
15929
  "codex.unsupported_os": "{{os}}에서는 Codex CLI 자동 설치를 지원하지 않습니다",
15945
- "rtk.already_installed": "RTK가 이미 설치되어 있습니다",
15946
- "rtk.installing_brew": "Homebrew로 RTK를 설치합니다...",
15947
- "rtk.installing_curl": "설치 스크립트로 RTK를 설치합니다...",
15948
- "rtk.install_failed": "RTK 설치에 실패했습니다: {{error}}",
15949
- "rtk.unsupported_os": "{{os}}에서는 RTK 자동 설치를 지원하지 않습니다",
15950
15930
  "mcp.ontology_rag_configured": "ontology-rag MCP 서버 구성을 완료했습니다",
15951
15931
  "install.codex_installing": "Codex CLI를 설치합니다...",
15952
15932
  "install.codex_success": "Codex CLI를 설치했습니다",
15953
15933
  "install.codex_already": "Codex CLI가 이미 설치되어 있습니다",
15954
- "install.rtk_installing": "RTK를 설치합니다...",
15955
- "install.rtk_success": "RTK를 설치했습니다",
15956
- "install.rtk_already": "RTK가 이미 설치되어 있습니다",
15957
15934
  "install.preserved": "기존 설치에서 파일 {{files}}개와 디렉토리 {{dirs}}개를 보존했습니다",
15958
15935
  "install.restored": "설치 후 파일 {{files}}개와 디렉토리 {{dirs}}개를 복원했습니다",
15959
15936
  "install.backup_failed": "{{path}} 백업에 실패했습니다: {{error}}",
@@ -15965,7 +15942,6 @@ var MESSAGES = {
15965
15942
  "preserve.restore_failed": "파일 {{file}} 복원에 실패했습니다: {{error}}",
15966
15943
  "preserve_files.invalid_path": "{{source}}의 유효하지 않은 preserve_files 항목을 무시했습니다: {{path}} ({{reason}})",
15967
15944
  "update.codex_missing": "Codex CLI가 설치되어 있지 않습니다",
15968
- "update.rtk_missing": "RTK가 설치되어 있지 않습니다",
15969
15945
  "update.self_update_skipped": "업데이트를 건너뜁니다: 소스 프로젝트는 스스로 업데이트할 수 없습니다",
15970
15946
  "update.deprecated_file_invalid_path": "경로가 유효하지 않아 지원 중단 파일을 건너뜁니다: {{path}} ({{reason}})",
15971
15947
  "update.deprecated_file_removed": "지원 중단 파일을 삭제했습니다: {{path}} ({{reason}})",
@@ -15973,8 +15949,8 @@ var MESSAGES = {
15973
15949
  "update.entry_doc_force_updated": "진입 문서를 강제로 업데이트했습니다: {{path}}",
15974
15950
  "update.entry_merge_warning": "진입 문서 병합 경고: {{warning}}",
15975
15951
  "update.entry_template_not_found": "진입 문서 템플릿을 찾을 수 없습니다: {{template}}",
15976
- "update.protected_file_force_overwrite": "{{component}}의 보호 파일 {{file}}을(를) 덮어썼습니다: {{hint}}",
15977
- "update.protected_file_skipped": "{{component}}의 보호 파일 {{file}}을(를) 건너뜁니다: {{hint}}",
15952
+ "update.protected_file_force_overwrite": "{{component}}의 보호 파일 {{file}} 덮어쓰기 대상: --force-overwrite-all 옵션에 따라 보호 파일 보존 정책을 적용하지 않습니다.",
15953
+ "update.protected_file_skipped": "{{component}}의 보호 파일 {{file}}을(를) 건너뜁니다: 보호 파일 보존 정책에 따라 업데이트를 건너뜁니다. 덮어쓰려면 --force-overwrite-all 옵션을 사용하십시오.",
15978
15954
  "update.settings_local_backfill_failed": "{{path}}의 statusLine refreshInterval 보충에 실패했습니다",
15979
15955
  "general.done": "완료!",
15980
15956
  "general.failed": "실패",
@@ -16556,8 +16532,23 @@ function sortFilesByPath(files) {
16556
16532
  const sorted = Object.keys(files).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
16557
16533
  return Object.fromEntries(sorted.map((key) => [key, files[key]]));
16558
16534
  }
16535
+ var RETIRED_RTK_PATHS = [
16536
+ ".claude/skills/rtk-exec/SKILL.md",
16537
+ ".claude/skills/rtk-exec/scripts/rtk-wrapper.cjs",
16538
+ ".claude/hooks/scripts/rtk-intercept.sh"
16539
+ ];
16540
+ function getRetiredPaths(options) {
16541
+ const retiredPaths = new Set([...RETIRED_RTK_PATHS, ...options.retiredPaths ?? []]);
16542
+ for (const path of retiredPaths) {
16543
+ if (typeof path !== "string" || /[\\:*?[\]{}\0]/.test(path) || path.split("/").some((segment) => segment === "" || segment === "." || segment === "..")) {
16544
+ throw new Error("retiredPaths must contain exact canonical relative file paths");
16545
+ }
16546
+ }
16547
+ return retiredPaths;
16548
+ }
16559
16549
  async function generateLockfile(targetDir, generatorVersion, templateVersion, options = {}) {
16560
16550
  const files = {};
16551
+ const retiredPaths = getRetiredPaths(options);
16561
16552
  const gitVisible = options.excludeGitIgnored ? await listGitVisiblePaths(targetDir) : null;
16562
16553
  const componentRoots = COMPONENT_PATHS.map(([prefix]) => join7(targetDir, prefix));
16563
16554
  for (const componentRoot of componentRoots) {
@@ -16566,7 +16557,7 @@ async function generateLockfile(targetDir, generatorVersion, templateVersion, op
16566
16557
  debug("lockfile.component_dir_missing", { path: componentRoot });
16567
16558
  continue;
16568
16559
  }
16569
- const allFiles = await collectFiles(componentRoot, targetDir, false);
16560
+ const allFiles = (await collectFiles(componentRoot, targetDir, false)).filter((absolutePath) => !retiredPaths.has(relative2(targetDir, absolutePath).replace(/\\/g, "/")));
16570
16561
  for (const absolutePath of allFiles) {
16571
16562
  const relativePath = relative2(targetDir, absolutePath).replace(/\\/g, "/");
16572
16563
  if (gitVisible !== null && !isGitVisible(gitVisible, relativePath)) {
@@ -16672,72 +16663,6 @@ function diffLockfiles(base, current) {
16672
16663
  return { added, removed, modified, unchanged };
16673
16664
  }
16674
16665
 
16675
- // src/core/rtk-installer.ts
16676
- import { execSync as execSync4 } from "node:child_process";
16677
- import { platform as platform2 } from "node:os";
16678
- var defaultDeps2 = {
16679
- exec: execSync4,
16680
- getPlatform: platform2
16681
- };
16682
- function isRtkInstalled(deps = defaultDeps2) {
16683
- try {
16684
- deps.exec("which rtk", { stdio: "pipe", timeout: 3000 });
16685
- return true;
16686
- } catch {
16687
- return false;
16688
- }
16689
- }
16690
- function getRtkVersion(deps = defaultDeps2) {
16691
- try {
16692
- return deps.exec("rtk --version", { encoding: "utf-8", stdio: "pipe", timeout: 3000 }).trim();
16693
- } catch {
16694
- return null;
16695
- }
16696
- }
16697
- function installRtk(deps = defaultDeps2) {
16698
- if (process.env.CI || false || false) {
16699
- return false;
16700
- }
16701
- if (isRtkInstalled(deps)) {
16702
- info("rtk.already_installed");
16703
- return true;
16704
- }
16705
- const os = deps.getPlatform();
16706
- try {
16707
- if (os === "darwin") {
16708
- try {
16709
- info("rtk.installing_brew");
16710
- deps.exec("brew install rtk-ai/tap/rtk", {
16711
- stdio: "inherit",
16712
- timeout: 120000
16713
- });
16714
- return true;
16715
- } catch {
16716
- info("rtk.installing_curl");
16717
- deps.exec("curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh", {
16718
- stdio: "inherit",
16719
- timeout: 120000
16720
- });
16721
- return isRtkInstalled(deps);
16722
- }
16723
- } else if (os === "linux") {
16724
- info("rtk.installing_curl");
16725
- deps.exec("curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh", {
16726
- stdio: "inherit",
16727
- timeout: 120000
16728
- });
16729
- return isRtkInstalled(deps);
16730
- } else {
16731
- warn("rtk.unsupported_os", { os });
16732
- return false;
16733
- }
16734
- } catch (err) {
16735
- const message = err instanceof Error ? err.message : String(err);
16736
- warn("rtk.install_failed", { error: message });
16737
- return false;
16738
- }
16739
- }
16740
-
16741
16666
  // src/cli/doctor.ts
16742
16667
  async function pathExists(targetPath) {
16743
16668
  try {
@@ -17037,23 +16962,6 @@ async function checkHooks(targetDir, rootDir = ".claude") {
17037
16962
  fixable: false
17038
16963
  };
17039
16964
  }
17040
- async function checkRtk() {
17041
- if (!isRtkInstalled()) {
17042
- return {
17043
- name: "RTK",
17044
- status: "warn",
17045
- message: "RTK not installed — token savings unavailable (brew install rtk-ai/tap/rtk)",
17046
- fixable: true
17047
- };
17048
- }
17049
- const version = getRtkVersion();
17050
- return {
17051
- name: "RTK",
17052
- status: "pass",
17053
- message: `RTK OK (${version ?? "unknown version"})`,
17054
- fixable: false
17055
- };
17056
- }
17057
16965
  async function checkCodex() {
17058
16966
  if (!isCodexInstalled()) {
17059
16967
  return {
@@ -17174,7 +17082,6 @@ async function fixSingleIssue(check, targetDir, rootDir = ".claude") {
17174
17082
  const fixedCount = await fixBrokenSymlinks(targetDir, fullPaths);
17175
17083
  return fixedCount > 0;
17176
17084
  },
17177
- RTK: async () => Promise.resolve(installRtk()),
17178
17085
  Codex: async () => Promise.resolve(installCodex())
17179
17086
  };
17180
17087
  const fixer = fixMap[check.name];
@@ -17324,7 +17231,6 @@ async function runAllChecks(targetDir, layout, packageVersion, includeUpdates) {
17324
17231
  checkHooks(targetDir, layout.rootDir),
17325
17232
  checkContexts(targetDir, layout.rootDir),
17326
17233
  checkCustomComponents(targetDir, layout.rootDir),
17327
- checkRtk(),
17328
17234
  checkCodex()
17329
17235
  ]);
17330
17236
  const frameworkCheck = await checkFrameworkDrift(targetDir, packageVersion);
@@ -17413,6 +17319,7 @@ var LEGACY_OMCUSTOM_DESCRIPTIONS = [
17413
17319
  ];
17414
17320
  var STANDALONE_SCRIPT_COMMAND = /^(?:bash )?(?:"(?:\$\{CLAUDE_PROJECT_DIR:-\.\}\/|\.\/)?\.claude\/hooks\/((?:scripts\/)?[A-Za-z0-9._-]+\.sh)"|(?:\.\/)?\.claude\/hooks\/((?:scripts\/)?[A-Za-z0-9._-]+\.sh))$/;
17415
17321
  var SCRIPT_REFERENCE = /\.claude\/hooks\/((?:scripts\/)?[A-Za-z0-9._-]+\.sh)/g;
17322
+ var RETIRED_RTK_DESCRIPTION = "RTK auto-intercept — transparently rewrites CLI commands through RTK proxy when available (R013 advisory)";
17416
17323
  function matcherKey(group) {
17417
17324
  return typeof group.matcher === "string" ? group.matcher : "";
17418
17325
  }
@@ -17474,15 +17381,52 @@ function isOwnedCommand(hook, owned) {
17474
17381
  const script = match?.[1] ?? match?.[2];
17475
17382
  return script !== undefined && owned.scripts.has(script);
17476
17383
  }
17477
- function userResidual(group, owned, ownership) {
17384
+ function isRetiredRtkCommand(hook, event, matcher) {
17385
+ if (event !== "PreToolUse" || matcher !== "Bash" || !isRecord(hook) || hook.type !== "command" || typeof hook.command !== "string") {
17386
+ return false;
17387
+ }
17388
+ const match = STANDALONE_SCRIPT_COMMAND.exec(hook.command);
17389
+ return (match?.[1] ?? match?.[2]) === "scripts/rtk-intercept.sh";
17390
+ }
17391
+ function retireRtkGroup(group, event) {
17478
17392
  if (!isRecord(group) || !Array.isArray(group.hooks)) {
17479
17393
  return [group];
17480
17394
  }
17395
+ const remaining = group.hooks.filter((hook) => !isRetiredRtkCommand(hook, event, matcherKey(group)));
17396
+ if (remaining.length === group.hooks.length) {
17397
+ return [group];
17398
+ }
17399
+ return remaining.length === 0 ? [] : [{ ...group, hooks: remaining }];
17400
+ }
17401
+ function retireRtkHookBlocks(existing) {
17402
+ if (!isRecord(existing)) {
17403
+ return existing;
17404
+ }
17405
+ const updates = {};
17406
+ for (const [event, value] of Object.entries(existing)) {
17407
+ if (!Array.isArray(value)) {
17408
+ continue;
17409
+ }
17410
+ const residual = value.flatMap((group) => retireRtkGroup(group, event));
17411
+ if (residual.length !== value.length || residual.some((group, index) => group !== value[index])) {
17412
+ updates[event] = residual;
17413
+ }
17414
+ }
17415
+ return Object.keys(updates).length === 0 ? existing : { ...existing, ...updates };
17416
+ }
17417
+ function userResidual(group, event, owned, ownership) {
17418
+ if (!isRecord(group) || !Array.isArray(group.hooks)) {
17419
+ return [group];
17420
+ }
17421
+ const matcher = matcherKey(group);
17422
+ if (group.description === RETIRED_RTK_DESCRIPTION) {
17423
+ return retireRtkGroup(group, event);
17424
+ }
17481
17425
  if (typeof group.description === "string" && ownership.descriptions.has(group.description)) {
17482
17426
  return [];
17483
17427
  }
17484
- const ownedForMatcher = owned?.get(matcherKey(group));
17485
- const remaining = group.hooks.filter((hook) => !isOwnedCommand(hook, ownedForMatcher));
17428
+ const ownedForMatcher = owned?.get(matcher);
17429
+ const remaining = group.hooks.filter((hook) => !isRetiredRtkCommand(hook, event, matcher) && !isOwnedCommand(hook, ownedForMatcher));
17486
17430
  if (remaining.length === group.hooks.length) {
17487
17431
  return [group];
17488
17432
  }
@@ -17505,7 +17449,7 @@ function mergeHookBlocks(existing, generated) {
17505
17449
  continue;
17506
17450
  }
17507
17451
  const owned = ownership.events.get(event);
17508
- const residual = value.flatMap((group) => userResidual(group, owned, ownership));
17452
+ const residual = value.flatMap((group) => userResidual(group, event, owned, ownership));
17509
17453
  if (residual.length === 0) {
17510
17454
  continue;
17511
17455
  }
@@ -18776,19 +18720,6 @@ async function updateInstallConfig(targetDir, options, installedComponents) {
18776
18720
  config.installedComponents = installedComponents;
18777
18721
  await saveConfig(targetDir, config);
18778
18722
  }
18779
- function installRtkIfNeeded(result) {
18780
- if (!isRtkInstalled()) {
18781
- info("install.rtk_installing");
18782
- const rtkInstalled = installRtk();
18783
- if (rtkInstalled) {
18784
- info("install.rtk_success");
18785
- } else {
18786
- result.warnings.push("RTK installation failed — install manually: brew install rtk-ai/tap/rtk");
18787
- }
18788
- } else {
18789
- info("install.rtk_already");
18790
- }
18791
- }
18792
18723
  function installCodexIfNeeded(result) {
18793
18724
  if (!isCodexInstalled()) {
18794
18725
  info("install.codex_installing");
@@ -18843,7 +18774,6 @@ async function install(options) {
18843
18774
  } else {
18844
18775
  info("install.lockfile_generated", { files: String(lockfileResult.fileCount) });
18845
18776
  }
18846
- installRtkIfNeeded(result);
18847
18777
  installCodexIfNeeded(result);
18848
18778
  result.success = true;
18849
18779
  success("install.success");
@@ -19075,7 +19005,7 @@ async function generateMCPConfig(targetDir) {
19075
19005
 
19076
19006
  // src/core/ontology-rag-setup.ts
19077
19007
  init_fs();
19078
- import { execSync as execSync5 } from "node:child_process";
19008
+ import { execSync as execSync4 } from "node:child_process";
19079
19009
  import { join as join11 } from "node:path";
19080
19010
  var MIN_PYTHON_MINOR = 10;
19081
19011
  var DETECTION_TIMEOUT_MS = 3000;
@@ -19088,7 +19018,7 @@ function parsePythonVersion(output) {
19088
19018
  }
19089
19019
  function checkPython3() {
19090
19020
  try {
19091
- const output = execSync5("python3 --version 2>&1", {
19021
+ const output = execSync4("python3 --version 2>&1", {
19092
19022
  stdio: "pipe",
19093
19023
  timeout: DETECTION_TIMEOUT_MS
19094
19024
  }).toString().trim();
@@ -19105,21 +19035,21 @@ function checkPython3() {
19105
19035
  }
19106
19036
  function checkUvAvailableForSetup() {
19107
19037
  try {
19108
- execSync5("uv --version", { stdio: "pipe", timeout: DETECTION_TIMEOUT_MS });
19038
+ execSync4("uv --version", { stdio: "pipe", timeout: DETECTION_TIMEOUT_MS });
19109
19039
  return true;
19110
19040
  } catch {
19111
19041
  return false;
19112
19042
  }
19113
19043
  }
19114
19044
  function createVenvWithUv(targetDir) {
19115
- execSync5("uv venv --python 3.12 .venv", {
19045
+ execSync4("uv venv --python 3.12 .venv", {
19116
19046
  cwd: targetDir,
19117
19047
  stdio: "pipe",
19118
19048
  timeout: INSTALL_TIMEOUT_MS
19119
19049
  });
19120
19050
  }
19121
19051
  function createVenvWithPython3(targetDir) {
19122
- execSync5("python3 -m venv .venv", {
19052
+ execSync4("python3 -m venv .venv", {
19123
19053
  cwd: targetDir,
19124
19054
  stdio: "pipe",
19125
19055
  timeout: INSTALL_TIMEOUT_MS
@@ -19129,13 +19059,13 @@ function installOntologyRagEditable(targetDir, useUv) {
19129
19059
  const packageRoot = getPackageRoot();
19130
19060
  const ontologyPkgPath = join11(packageRoot, "packages", "ontology-rag");
19131
19061
  if (useUv) {
19132
- execSync5(`uv pip install --python .venv/bin/python -e "${ontologyPkgPath}"`, {
19062
+ execSync4(`uv pip install --python .venv/bin/python -e "${ontologyPkgPath}"`, {
19133
19063
  cwd: targetDir,
19134
19064
  stdio: "pipe",
19135
19065
  timeout: INSTALL_TIMEOUT_MS
19136
19066
  });
19137
19067
  } else {
19138
- execSync5(`.venv/bin/pip install -e "${ontologyPkgPath}"`, {
19068
+ execSync4(`.venv/bin/pip install -e "${ontologyPkgPath}"`, {
19139
19069
  cwd: targetDir,
19140
19070
  stdio: "pipe",
19141
19071
  timeout: INSTALL_TIMEOUT_MS
@@ -21728,7 +21658,8 @@ import { constants as osConstants } from "node:os";
21728
21658
 
21729
21659
  // src/core/updater.ts
21730
21660
  init_package();
21731
- import { join as join19 } from "node:path";
21661
+ import { lstat, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
21662
+ import { isAbsolute as isAbsolute5, join as join19, relative as relative4, resolve as resolve5, sep as sep4 } from "node:path";
21732
21663
  init_fs();
21733
21664
 
21734
21665
  // src/core/entry-merger.ts
@@ -21855,6 +21786,86 @@ ${MANAGED_END}`;
21855
21786
 
21856
21787
  // src/core/updater.ts
21857
21788
  var CUSTOMIZATION_MANIFEST_FILE = ".omcustom-customizations.json";
21789
+ var RETIRED_RTK_FILES = [
21790
+ { path: ".claude/skills/rtk-exec/SKILL.md", component: "skills" },
21791
+ { path: ".claude/skills/rtk-exec/scripts/rtk-wrapper.cjs", component: "skills" },
21792
+ { path: ".claude/hooks/scripts/rtk-intercept.sh", component: "hooks" }
21793
+ ];
21794
+ function getRtkRetirement(result) {
21795
+ result.rtkRetirement ??= {
21796
+ removed: [],
21797
+ wouldRemove: [],
21798
+ preserved: [],
21799
+ settingsChanged: [],
21800
+ wouldChangeSettings: [],
21801
+ settingsConflicts: []
21802
+ };
21803
+ return result.rtkRetirement;
21804
+ }
21805
+ async function validateRtkTarget(targetDir, path) {
21806
+ const validation = validatePreserveFilePath(path, targetDir);
21807
+ if (!validation.valid)
21808
+ throw new Error("path escapes project");
21809
+ const fullPath = resolve5(targetDir, path);
21810
+ const fileStat = await lstat(fullPath);
21811
+ if (!fileStat.isFile() || fileStat.isSymbolicLink())
21812
+ throw new Error("not a regular owned file");
21813
+ const root = await realpath2(targetDir);
21814
+ const resolvedFile = await realpath2(fullPath);
21815
+ const within = relative4(root, resolvedFile);
21816
+ if (within === "" || within === ".." || within.startsWith(`..${sep4}`) || isAbsolute5(within)) {
21817
+ throw new Error("resolved path escapes project");
21818
+ }
21819
+ }
21820
+ function isRtkPathPreserved(path, config, customizations) {
21821
+ const paths = [
21822
+ ...config.preserveFiles ?? [],
21823
+ ...customizations?.preserveFiles ?? [],
21824
+ ...customizations?.modifiedFiles ?? [],
21825
+ ...(config.customComponents ?? []).map((component) => component.path)
21826
+ ];
21827
+ return paths.some((preserved) => path === preserved || path.startsWith(`${preserved}/`));
21828
+ }
21829
+ async function retireRtkFile(path, options, lockfile, result, preserved) {
21830
+ const retirement = getRtkRetirement(result);
21831
+ try {
21832
+ await validateRtkTarget(options.targetDir, path);
21833
+ if (preserved)
21834
+ throw new Error("explicitly preserved");
21835
+ if (retirement.settingsConflicts.length > 0)
21836
+ throw new Error("settings retirement conflict");
21837
+ const entry = lockfile?.files[path];
21838
+ if (!entry || typeof entry.templateHash !== "string" || !/^[a-f0-9]{64}$/.test(entry.templateHash)) {
21839
+ throw new Error("missing or invalid old ownership");
21840
+ }
21841
+ const fullPath = join19(options.targetDir, path);
21842
+ if (await computeFileHash(fullPath) !== entry.templateHash)
21843
+ throw new Error("user-modified file");
21844
+ if (options.dryRun) {
21845
+ retirement.wouldRemove.push(path);
21846
+ return;
21847
+ }
21848
+ await validateRtkTarget(options.targetDir, path);
21849
+ await unlink2(fullPath);
21850
+ retirement.removed.push(path);
21851
+ result.removedDeprecatedFiles.push(path);
21852
+ } catch (err) {
21853
+ if (err.code === "ENOENT")
21854
+ return;
21855
+ const reason = err instanceof Error ? err.message : "unreadable ownership or file";
21856
+ retirement.preserved.push({ path, reason });
21857
+ result.preservedFiles.push(path);
21858
+ result.warnings.push(`RTK retirement preserved ${path}: ${reason}`);
21859
+ }
21860
+ }
21861
+ async function retireRtkFiles(options, lockfile, result, config, customizations) {
21862
+ const fullUpdate = !options.components || options.components.length === 0;
21863
+ const files = RETIRED_RTK_FILES.filter((file) => fullUpdate || options.components?.includes(file.component));
21864
+ for (const file of files) {
21865
+ await retireRtkFile(file.path, options, lockfile, result, isRtkPathPreserved(file.path, config, customizations));
21866
+ }
21867
+ return RETIRED_RTK_FILES.map((file) => file.path);
21868
+ }
21858
21869
  function createUpdateResult() {
21859
21870
  return {
21860
21871
  success: false,
@@ -22042,32 +22053,52 @@ async function backfillStatusLineRefreshInterval(targetDir, options) {
22042
22053
  });
22043
22054
  }
22044
22055
  }
22045
- async function migrateHookCommandsInSettingsLocal(targetDir, options) {
22046
- if (options.dryRun) {
22047
- return;
22056
+ async function migrateHookCommandsInSettingsLocal(targetDir, options, result) {
22057
+ for (const name of ["settings.json", "settings.local.json"]) {
22058
+ await migrateRtkSettingsFile(targetDir, options, result, name);
22048
22059
  }
22060
+ }
22061
+ async function migrateRtkSettingsFile(targetDir, options, result, name) {
22049
22062
  const layout = getProviderLayout();
22050
- const settingsPath = join19(targetDir, layout.rootDir, "settings.local.json");
22051
- if (!await fileExists(settingsPath)) {
22052
- return;
22053
- }
22063
+ const path = `${layout.rootDir}/${name}`;
22064
+ const settingsPath = join19(targetDir, path);
22065
+ const retirement = getRtkRetirement(result);
22054
22066
  try {
22067
+ await validateRtkTarget(targetDir, path);
22055
22068
  const raw = await readTextFile(settingsPath);
22056
22069
  const bom = raw.startsWith("\uFEFF") ? "\uFEFF" : "";
22057
22070
  const parsed = JSON.parse(bom ? raw.slice(bom.length) : raw);
22058
22071
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
22072
+ throw new Error("unknown settings shape");
22073
+ }
22074
+ const current = parsed;
22075
+ const hooks = retireRtkHookBlocks(current.hooks);
22076
+ const retired = hooks !== current.hooks;
22077
+ const input = retired ? { ...current, hooks } : current;
22078
+ const { settings, rewritten } = name === "settings.local.json" ? migrateHookCommands(input) : { settings: input, rewritten: 0 };
22079
+ if (JSON.stringify(settings.hooks)?.includes("rtk-intercept.sh")) {
22080
+ retirement.settingsConflicts.push(path);
22081
+ result.warnings.push(`RTK retirement retained user or unknown wiring in ${path}`);
22082
+ }
22083
+ if (!retired && rewritten === 0) {
22059
22084
  return;
22060
22085
  }
22061
- const { settings, rewritten } = migrateHookCommands(parsed);
22062
- if (rewritten === 0) {
22086
+ if (options.dryRun) {
22087
+ retirement.wouldChangeSettings.push(path);
22063
22088
  return;
22064
22089
  }
22065
22090
  const trailingNewline = raw.endsWith(`
22066
22091
  `) ? `
22067
22092
  ` : "";
22093
+ await validateRtkTarget(targetDir, path);
22068
22094
  await writeTextFile(settingsPath, `${bom}${JSON.stringify(settings, null, 2)}${trailingNewline}`);
22095
+ retirement.settingsChanged.push(path);
22069
22096
  info("update.hook_commands_migrated", { count: String(rewritten) });
22070
- } catch {
22097
+ } catch (err) {
22098
+ if (err.code === "ENOENT")
22099
+ return;
22100
+ retirement.settingsConflicts.push(path);
22101
+ result.warnings.push(`RTK retirement could not safely migrate ${path}`);
22071
22102
  warn("update.hook_commands_migration_failed", {
22072
22103
  path: settingsPath
22073
22104
  });
@@ -22087,7 +22118,7 @@ async function runFullUpdatePostProcessing(options, result, config, customizatio
22087
22118
  }
22088
22119
  }
22089
22120
  if (isFullUpdate || options.components?.includes("hooks")) {
22090
- await migrateHookCommandsInSettingsLocal(options.targetDir, options);
22121
+ await migrateHookCommandsInSettingsLocal(options.targetDir, options, result);
22091
22122
  }
22092
22123
  if (!options.dryRun) {
22093
22124
  config.version = result.newVersion;
@@ -22104,6 +22135,29 @@ async function runFullUpdatePostProcessing(options, result, config, customizatio
22104
22135
  });
22105
22136
  }
22106
22137
  }
22138
+ async function getUpdateVersionDecision(installedVersion, cliVersion) {
22139
+ if (!(installedVersion !== "0.0.0" && compareSemver2(installedVersion, cliVersion) > 0)) {
22140
+ return "standard";
22141
+ }
22142
+ if (installedVersion !== "2.0.0") {
22143
+ return "blocked";
22144
+ }
22145
+ const match = /^1\.1\.(0|[1-9]\d*)$/.exec(cliVersion);
22146
+ if (!match) {
22147
+ return "blocked";
22148
+ }
22149
+ const patch = Number(match[1]);
22150
+ if (!Number.isSafeInteger(patch) || patch < 107) {
22151
+ return "blocked";
22152
+ }
22153
+ const manifestPath = resolveTemplatePath(getProviderLayout().manifestFile);
22154
+ if (!await fileExists(manifestPath)) {
22155
+ return "blocked";
22156
+ }
22157
+ const manifest = await readJsonFile(manifestPath);
22158
+ const correctionAllowed = typeof manifest === "object" && manifest !== null && !Array.isArray(manifest) && "version" in manifest && manifest.version === cliVersion;
22159
+ return correctionAllowed ? "correction" : "blocked";
22160
+ }
22107
22161
  function compareSemver2(a, b) {
22108
22162
  const pa = a.split(".").map(Number);
22109
22163
  const pb = b.split(".").map(Number);
@@ -22114,24 +22168,16 @@ function compareSemver2(a, b) {
22114
22168
  }
22115
22169
  return 0;
22116
22170
  }
22117
- function checkAndInstallRtkAfterUpdate() {
22118
- if (!isRtkInstalled()) {
22119
- warn("update.rtk_missing");
22120
- console.log(i18n.t("cli.update.rtkMissing"));
22121
- const rtkInstalled = installRtk();
22122
- if (rtkInstalled) {
22123
- console.log(i18n.t("cli.update.rtkInstalled"));
22124
- }
22125
- }
22126
- }
22127
22171
  async function updateProjectRegistry(targetDir, newVersion) {
22128
22172
  try {
22129
22173
  await Promise.resolve().then(() => init_registry());
22130
22174
  await registerProject(targetDir, newVersion);
22131
22175
  } catch {}
22132
22176
  }
22133
- async function regenerateLockfile(targetDir, result) {
22134
- const lockfileResult = await generateAndWriteLockfileForDir(targetDir);
22177
+ async function regenerateLockfile(options, result, retiredPaths) {
22178
+ if (options.dryRun)
22179
+ return;
22180
+ const lockfileResult = await generateAndWriteLockfileForDir(options.targetDir, { retiredPaths });
22135
22181
  if (lockfileResult.warning) {
22136
22182
  result.warnings.push(lockfileResult.warning);
22137
22183
  warn("update.lockfile_failed", { error: lockfileResult.warning });
@@ -22172,7 +22218,8 @@ async function update(options) {
22172
22218
  const config = await loadConfig(options.targetDir);
22173
22219
  result.previousVersion = config.version;
22174
22220
  const cliVersion = package_default.version;
22175
- if (result.previousVersion !== "0.0.0" && compareSemver2(result.previousVersion, cliVersion) > 0) {
22221
+ const versionDecision = await getUpdateVersionDecision(result.previousVersion, cliVersion);
22222
+ if (versionDecision === "blocked") {
22176
22223
  result.success = false;
22177
22224
  result.error = `Downgrade prevented: project has v${result.previousVersion} but CLI is v${cliVersion}. Update the CLI first: npm install -g oh-my-customcode@latest`;
22178
22225
  return result;
@@ -22181,6 +22228,11 @@ async function update(options) {
22181
22228
  return result;
22182
22229
  }
22183
22230
  const updateCheck = await checkForUpdates(options.targetDir);
22231
+ if (versionDecision === "correction" && updateCheck.latestVersion !== cliVersion) {
22232
+ result.success = false;
22233
+ result.error = `Version correction prevented: CLI is v${cliVersion} but templates are v${updateCheck.latestVersion}. Reinstall the CLI: npm install -g oh-my-customcode@latest`;
22234
+ return result;
22235
+ }
22184
22236
  result.newVersion = updateCheck.latestVersion;
22185
22237
  if (!updateCheck.hasUpdates && !options.force) {
22186
22238
  info("update.no_updates");
@@ -22188,7 +22240,7 @@ async function update(options) {
22188
22240
  result.skippedComponents = options.components || getAllUpdateComponents();
22189
22241
  return result;
22190
22242
  }
22191
- await handleBackupIfRequested(options.targetDir, !!options.backup, result);
22243
+ await handleBackupIfRequested(options.targetDir, !!options.backup && !options.dryRun, result);
22192
22244
  const manifestCustomizations = await resolveManifestCustomizations(options, options.targetDir);
22193
22245
  const configPreserveFiles = resolveConfigPreserveFiles(options, config);
22194
22246
  const customizations = resolveCustomizations(manifestCustomizations, configPreserveFiles, options.targetDir);
@@ -22196,9 +22248,10 @@ async function update(options) {
22196
22248
  const components = options.components || getAllUpdateComponents();
22197
22249
  await updateAllComponents(options.targetDir, components, updateCheck, customizations, options, result, config, lockfile);
22198
22250
  await runFullUpdatePostProcessing(options, result, config, customizations);
22199
- await regenerateLockfile(options.targetDir, result);
22200
- checkAndInstallRtkAfterUpdate();
22201
- checkAndInstallCodexAfterUpdate();
22251
+ const retiredPaths = await retireRtkFiles(options, lockfile, result, config, customizations);
22252
+ await regenerateLockfile(options, result, retiredPaths);
22253
+ if (!options.dryRun)
22254
+ checkAndInstallCodexAfterUpdate();
22202
22255
  if (result.success && !options.dryRun) {
22203
22256
  await updateProjectRegistry(options.targetDir, result.newVersion);
22204
22257
  }
@@ -22353,22 +22406,19 @@ async function updateComponent(targetDir, component, customizations, options, co
22353
22406
  if (options.forceOverwriteAll) {
22354
22407
  warn("update.protected_file_force_overwrite", {
22355
22408
  file: protectedPath,
22356
- component,
22357
- hint: "File contains AI behavioral constraints. Overwriting because --force-overwrite-all was set."
22409
+ component
22358
22410
  });
22359
22411
  } else {
22360
22412
  warn("update.protected_file_skipped", {
22361
22413
  file: protectedPath,
22362
- component,
22363
- hint: "File was modified by user and preserved. Use --force-overwrite-all to override."
22414
+ component
22364
22415
  });
22365
22416
  }
22366
22417
  }
22367
22418
  for (const updatedPath of protectedUpdatedPaths) {
22368
22419
  info("update.protected_file_updated", {
22369
22420
  file: updatedPath,
22370
- component,
22371
- hint: "Protected file updated (unmodified by user, matches lockfile hash)."
22421
+ component
22372
22422
  });
22373
22423
  }
22374
22424
  skipPaths.push(...protectedSkipPaths);