Files
ruflo/scripts
ruv 9d026a8947 fix(helpers): ship router as .cjs so it loads in ESM projects (#3555)
`.claude/helpers/router.js` is CommonJS but shipped with a `.js`
extension. In any project whose package.json declares "type":"module",
Node loads it as ESM, `require` is undefined, it throws on load, and
hook-handler.cjs silently falls back to "Router not available, using
default routing" — so ADR-389's word-boundary routing fix never ran in
exactly the projects most new Node code uses.

Rename the shipped helper to router.cjs everywhere it is produced or
consumed: the packaged copy, the repo-root copy's hook-handler require,
helpers-generator (router + generated hook-handler), init executor
(upgrade copy list + generator fallbacks), helper-refresh
CRITICAL_HELPERS + generator fallback, sign/verify-helpers critical
lists, and the helper-signing security smoke. The helpers manifest is
re-signed. A stale router.js left in an existing install is harmless:
nothing requires it any more.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-09-30 18:02:37 -04:00
..
2026-01-04 19:30:59 +00:00