feat(installer): register bmo as built-in module

- Add orchestrator-skills lookup in official-modules listAvailable()
- Add orchestrator-skills resolution in official-modules findModuleSource()
- Add bmo to discoverOfficialModuleYamls built-ins list
- Map bmo code to src/orchestrator-skills in getModulePath()

Allows --set modules.bmo.enable=true during non-interactive installs
and makes bmo appear in interactive module picker.
This commit is contained in:
alexandre.azouri 2026-05-05 15:59:53 +02:00
parent 9e1c10e2a8
commit a446eb21d0
3 changed files with 21 additions and 1 deletions

View File

@ -54,7 +54,7 @@ async function discoverOfficialModuleYamls() {
};
// Built-ins.
for (const code of ['core', 'bmm']) {
for (const code of ['core', 'bmm', 'bmo']) {
const yamlPath = path.join(getModulePath(code), 'module.yaml');
if (await fs.pathExists(yamlPath)) {
// Built-ins use their well-known short codes regardless of what the

View File

@ -128,6 +128,15 @@ class OfficialModules {
}
}
// Add built-in bmo module (directly under src/orchestrator-skills)
const bmoPath = getSourcePath('orchestrator-skills');
if (await fs.pathExists(bmoPath)) {
const bmoInfo = await this.getModuleInfo(bmoPath, 'bmo', 'src/orchestrator-skills');
if (bmoInfo) {
modules.push(bmoInfo);
}
}
return { modules };
}
@ -225,6 +234,14 @@ class OfficialModules {
}
}
// Check for built-in bmo module (directly under src/orchestrator-skills)
if (moduleCode === 'bmo') {
const bmoPath = getSourcePath('orchestrator-skills');
if (await fs.pathExists(bmoPath)) {
return bmoPath;
}
}
// Check external official modules (pass channelOptions so channel plan applies)
const externalSource = await this.externalModuleManager.findExternalModuleSource(moduleCode, options);
if (externalSource) {

View File

@ -68,6 +68,9 @@ function getModulePath(moduleName, ...segments) {
if (moduleName === 'bmm') {
return getSourcePath('bmm-skills', ...segments);
}
if (moduleName === 'bmo') {
return getSourcePath('orchestrator-skills', ...segments);
}
return getSourcePath('modules', moduleName, ...segments);
}