Compare commits

...

5 Commits

Author SHA1 Message Date
Brian b4c2d15ba3
Merge 97cf71a0d3 into 724867d48d 2026-05-13 00:08:10 -05:00
Brian 724867d48d
fix(installer): descriptive error when module definition missing after clone (#2377)
* fix(installer): throw descriptive error when module definition missing after clone

When a stable tag predates a module restructure (e.g. baut v1.14.0 had
payload/source dirs, but the registry pointed to skills/module.yaml which
only exists on main), findExternalModuleSource silently returned the
configured but non-existent path. This caused a confusing ENOENT inside
getFileList/copyModuleWithFiltering rather than a clear error.

Now throws with the version that was cloned and a --next hint when the
install channel was stable, so users know exactly how to recover.

Closes #2372

* style: fix prettier formatting in external-manager.js

* style: apply prettier formatting
2026-05-12 23:44:11 -05:00
Brian c48b6f3069
Merge pull request #2345 from bma-d/bma-d/add-automator
feat(installer): add BMad Automator module
2026-05-12 20:04:29 -05:00
Brian fd0018900e
Merge branch 'main' into bma-d/add-automator 2026-05-12 20:04:16 -05:00
bmad a3e0545847
feat(installer): register automator module 2026-05-08 18:10:22 -03:00
2 changed files with 25 additions and 2 deletions

View File

@ -524,8 +524,20 @@ class ExternalModuleManager {
return path.dirname(rootCandidate); return path.dirname(rootCandidate);
} }
// Nothing found: return configured path (preserves old behavior for error messaging) // Nothing found: the cloned ref does not contain a recognizable module structure.
return path.dirname(configuredPath); // This happens when a stable tag predates a module restructure (e.g. the repo
// moved files from payload/ to skills/ after the tag was cut). Returning a
// non-existent path silently causes a confusing ENOENT deep inside copyModuleWithFiltering;
// throw a descriptive error here instead so the user knows what happened and how to recover.
const resolution = ExternalModuleManager._resolutions.get(moduleCode);
const versionHint = resolution?.version ? `version ${resolution.version}` : 'the cloned version';
const channelHint =
resolution?.channel === 'stable' ? ` Try reinstalling with \`--next=${moduleCode}\` to use the latest main branch instead.` : '';
throw new Error(
`Module '${moduleCode}' was downloaded but its module definition was not found. ` +
`Expected '${moduleDefinitionPath}' to exist in ${versionHint}, but it is missing. ` +
`The repository may have been restructured after this release was tagged.${channelHint}`,
);
} }
cachedModules = null; cachedModules = null;
} }

View File

@ -18,6 +18,17 @@ modules:
npmPackage: bmad-builder npmPackage: bmad-builder
default_channel: stable default_channel: stable
bmad-automator:
url: https://github.com/bmad-code-org/bmad-automator
module-definition: skills/module.yaml
code: baut
name: "BMad Automator"
description: "Story automation skills"
defaultSelected: false
type: experimental
npmPackage: bmad-story-automator
default_channel: next
bmad-creative-intelligence-suite: bmad-creative-intelligence-suite:
url: https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite url: https://github.com/bmad-code-org/bmad-module-creative-intelligence-suite
module-definition: src/module.yaml module-definition: src/module.yaml