fix: include bundled skills directory in published package#2521
Conversation
The bundled skills directory (dist/bundled/) was missing from the published npm package because it was not listed in the files array of the generated dist/package.json. copy_bundle_assets.js correctly copies bundled skills to dist/bundled/ during the bundle step, but prepare-package.js omitted 'bundled' from the files whitelist. This caused SkillManager to find an empty bundled skills directory at runtime after installation, since npm excluded it during publish.
📋 Review SummaryThis PR fixes a critical packaging issue where bundled skills (e.g., 🔍 General Feedback
🎯 Specific Feedback🔴 CriticalNo critical issues identified. The fix correctly addresses the packaging problem. 🟡 HighNo high priority issues identified. 🟢 MediumNo medium priority issues identified. 🔵 Low
✅ Highlights
|
TLDR
Bundled skills (e.g.
/review) were missing afternpm publishbecause thebundleddirectory was not included in thefileswhitelist of the generateddist/package.json.Dive Deeper
The build pipeline has two relevant steps:
npm run bundle→copy_bundle_assets.jscorrectly copiespackages/core/src/skills/bundled/todist/bundled/.prepare-package.js→ Generates adist/package.jsonfor npm publishing with afilesfield that controls which files are included in the published tarball.The
filesarray was:Missing
'bundled'meant npm excluded the entiredist/bundled/directory during publish. At runtime,SkillManagerresolvesbundledSkillsDirto<install-path>/bundled/(viaimport.meta.url), finds the directory missing, and logs a warning — silently returning zero bundled skills.The fix adds
'bundled'to thefilesarray so bundled skills are shipped with the published package.Reviewer Test Plan
npm run bundle && node scripts/prepare-package.jsdist/bundled/review/SKILL.mdexistsnpm pack ./distand inspect the tarball — confirmbundled/review/SKILL.mdis includedqwen /skills— thereviewskill should appear in the listTesting Matrix
Linked issues / bugs
"