Merge 1f826b7891 into 355ccebca2
This commit is contained in:
commit
af6bfd62c9
|
|
@ -0,0 +1,11 @@
|
||||||
|
agent,voice
|
||||||
|
bmad-master,en_US-lessac-medium
|
||||||
|
analyst,en_US-kristin-medium
|
||||||
|
architect,en_GB-alan-medium
|
||||||
|
dev,en_US-joe-medium
|
||||||
|
pm,en_US-ryan-high
|
||||||
|
sm,en_US-amy-medium
|
||||||
|
tea,en_US-kusal-medium
|
||||||
|
tech-writer,jenny
|
||||||
|
ux-designer,kristin
|
||||||
|
frame-expert,en_GB-alan-medium
|
||||||
|
|
|
@ -90,10 +90,18 @@ module.exports = {
|
||||||
// Run AgentVibes installer
|
// Run AgentVibes installer
|
||||||
const { execSync } = require('node:child_process');
|
const { execSync } = require('node:child_process');
|
||||||
try {
|
try {
|
||||||
|
// Clear ALL npm config env vars to prevent inheritance issues
|
||||||
|
// when BMAD is invoked with --prefix flag
|
||||||
|
// npm sets many npm_config_* and npm_package_* vars that can interfere
|
||||||
|
const cleanEnv = Object.fromEntries(
|
||||||
|
Object.entries(process.env).filter(([key]) => !key.startsWith('npm_config_') && !key.startsWith('npm_package_')),
|
||||||
|
);
|
||||||
|
|
||||||
execSync('npx agentvibes@latest install', {
|
execSync('npx agentvibes@latest install', {
|
||||||
cwd: result.projectDir,
|
cwd: result.projectDir,
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: true,
|
shell: true,
|
||||||
|
env: cleanEnv,
|
||||||
});
|
});
|
||||||
console.log(chalk.green('\n✓ AgentVibes installation complete'));
|
console.log(chalk.green('\n✓ AgentVibes installation complete'));
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
||||||
|
|
@ -808,6 +808,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
|
||||||
const manifestStats = await manifestGen.generateManifests(bmadDir, config.modules || [], this.installedFiles, {
|
const manifestStats = await manifestGen.generateManifests(bmadDir, config.modules || [], this.installedFiles, {
|
||||||
ides: config.ides || [],
|
ides: config.ides || [],
|
||||||
preservedModules: config._preserveModules || [], // Scan these from installed bmad/ dir
|
preservedModules: config._preserveModules || [], // Scan these from installed bmad/ dir
|
||||||
|
agentVibes: { enabled: this.enableAgentVibes || false }, // Track AgentVibes TTS configuration
|
||||||
});
|
});
|
||||||
|
|
||||||
spinner.succeed(
|
spinner.succeed(
|
||||||
|
|
@ -1939,6 +1940,38 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for AgentVibes TTS - prompt if not previously configured
|
||||||
|
// Read existing manifest to check if AgentVibes was previously set
|
||||||
|
const manifestPath = path.join(bmadDir, '_cfg', 'manifest.yaml');
|
||||||
|
let agentVibesEnabled = false;
|
||||||
|
let agentVibesPreviouslyConfigured = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const manifestContent = await fs.readFile(manifestPath, 'utf8');
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const manifest = yaml.load(manifestContent);
|
||||||
|
// Check if AgentVibes was previously configured (exists in manifest)
|
||||||
|
if (manifest.agentVibes !== undefined) {
|
||||||
|
agentVibesPreviouslyConfigured = true;
|
||||||
|
agentVibesEnabled = manifest.agentVibes?.enabled || false;
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// Manifest doesn't exist or can't be read - treat as not configured
|
||||||
|
}
|
||||||
|
|
||||||
|
// If AgentVibes wasn't previously configured, prompt the user
|
||||||
|
// Use configuredIdes from line 1904 for smart default (Y if Claude Code is selected)
|
||||||
|
if (!agentVibesPreviouslyConfigured) {
|
||||||
|
const { UI } = require('../../../lib/ui');
|
||||||
|
const ui = new UI();
|
||||||
|
const agentVibesConfig = await ui.promptAgentVibes(projectDir, configuredIdes);
|
||||||
|
|
||||||
|
if (agentVibesConfig.enableTts) {
|
||||||
|
agentVibesEnabled = true;
|
||||||
|
promptedForNewFields = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!promptedForNewFields) {
|
if (!promptedForNewFields) {
|
||||||
console.log(chalk.green('✓ All configuration is up to date, no new options to configure'));
|
console.log(chalk.green('✓ All configuration is up to date, no new options to configure'));
|
||||||
}
|
}
|
||||||
|
|
@ -1976,6 +2009,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
|
||||||
_quickUpdate: true, // Flag to skip certain prompts
|
_quickUpdate: true, // Flag to skip certain prompts
|
||||||
_preserveModules: skippedModules, // Preserve these in manifest even though we didn't update them
|
_preserveModules: skippedModules, // Preserve these in manifest even though we didn't update them
|
||||||
_savedIdeConfigs: savedIdeConfigs, // Pass saved IDE configs to installer
|
_savedIdeConfigs: savedIdeConfigs, // Pass saved IDE configs to installer
|
||||||
|
enableAgentVibes: agentVibesEnabled, // AgentVibes TTS configuration
|
||||||
};
|
};
|
||||||
|
|
||||||
// Call the standard install method
|
// Call the standard install method
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,9 @@ class ManifestGenerator {
|
||||||
// Filter out any undefined/null values from IDE list
|
// Filter out any undefined/null values from IDE list
|
||||||
this.selectedIdes = resolvedIdes.filter((ide) => ide && typeof ide === 'string');
|
this.selectedIdes = resolvedIdes.filter((ide) => ide && typeof ide === 'string');
|
||||||
|
|
||||||
|
// Store AgentVibes configuration for manifest
|
||||||
|
this.agentVibes = options.agentVibes || null;
|
||||||
|
|
||||||
// Collect workflow data
|
// Collect workflow data
|
||||||
await this.collectWorkflows(selectedModules);
|
await this.collectWorkflows(selectedModules);
|
||||||
|
|
||||||
|
|
@ -437,6 +440,7 @@ class ManifestGenerator {
|
||||||
},
|
},
|
||||||
modules: this.modules,
|
modules: this.modules,
|
||||||
ides: this.selectedIdes,
|
ides: this.selectedIdes,
|
||||||
|
agentVibes: this.agentVibes, // Track AgentVibes TTS configuration
|
||||||
};
|
};
|
||||||
|
|
||||||
const yamlStr = yaml.dump(manifest, {
|
const yamlStr = yaml.dump(manifest, {
|
||||||
|
|
|
||||||
|
|
@ -119,13 +119,14 @@ class UI {
|
||||||
const moduleChoices = await this.getModuleChoices(installedModuleIds);
|
const moduleChoices = await this.getModuleChoices(installedModuleIds);
|
||||||
const selectedModules = await this.selectModules(moduleChoices);
|
const selectedModules = await this.selectModules(moduleChoices);
|
||||||
|
|
||||||
// Prompt for AgentVibes TTS integration
|
|
||||||
const agentVibesConfig = await this.promptAgentVibes(confirmedDirectory);
|
|
||||||
|
|
||||||
// Collect IDE tool selection AFTER configuration prompts (fixes Windows/PowerShell hang)
|
// Collect IDE tool selection AFTER configuration prompts (fixes Windows/PowerShell hang)
|
||||||
// This allows text-based prompts to complete before the checkbox prompt
|
// This allows text-based prompts to complete before the checkbox prompt
|
||||||
const toolSelection = await this.promptToolSelection(confirmedDirectory, selectedModules);
|
const toolSelection = await this.promptToolSelection(confirmedDirectory, selectedModules);
|
||||||
|
|
||||||
|
// Prompt for AgentVibes TTS integration AFTER tool selection
|
||||||
|
// Default to Y if Claude Code is selected (since AgentVibes only works with Claude Code)
|
||||||
|
const agentVibesConfig = await this.promptAgentVibes(confirmedDirectory, toolSelection.ides);
|
||||||
|
|
||||||
// No more screen clearing - keep output flowing
|
// No more screen clearing - keep output flowing
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
@ -704,7 +705,7 @@ class UI {
|
||||||
* - Markers: src/core/workflows/party-mode/instructions.md:101, src/modules/bmm/agents/*.md
|
* - Markers: src/core/workflows/party-mode/instructions.md:101, src/modules/bmm/agents/*.md
|
||||||
* - GitHub Issue: paulpreibisch/AgentVibes#36
|
* - GitHub Issue: paulpreibisch/AgentVibes#36
|
||||||
*/
|
*/
|
||||||
async promptAgentVibes(projectDir) {
|
async promptAgentVibes(projectDir, selectedIdes = []) {
|
||||||
CLIUtils.displaySection('🎤 Voice Features', 'Enable TTS for multi-agent conversations');
|
CLIUtils.displaySection('🎤 Voice Features', 'Enable TTS for multi-agent conversations');
|
||||||
|
|
||||||
// Check if AgentVibes is already installed
|
// Check if AgentVibes is already installed
|
||||||
|
|
@ -716,20 +717,21 @@ class UI {
|
||||||
console.log(chalk.dim(' AgentVibes not detected'));
|
console.log(chalk.dim(' AgentVibes not detected'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Default to Y if Claude Code is selected (AgentVibes only works with Claude Code)
|
||||||
|
const claudeCodeSelected = selectedIdes.includes('claude-code');
|
||||||
|
const defaultValue = claudeCodeSelected;
|
||||||
|
|
||||||
const answers = await inquirer.prompt([
|
const answers = await inquirer.prompt([
|
||||||
{
|
{
|
||||||
type: 'confirm',
|
type: 'confirm',
|
||||||
name: 'enableTts',
|
name: 'enableTts',
|
||||||
message: 'Enable Agents to Speak Out loud (powered by Agent Vibes? Claude Code only currently)',
|
message: 'Enable Agents to Speak Out loud (powered by AgentVibes, Claude Code only)',
|
||||||
default: false, // Default to yes - recommended for best experience
|
default: defaultValue,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (answers.enableTts && !agentVibesInstalled) {
|
// Note: AgentVibes installer runs at end of BMAD install if enabled and not already installed
|
||||||
console.log(chalk.yellow('\n ⚠️ AgentVibes not installed'));
|
// No need to show warning here - the installer will handle it
|
||||||
console.log(chalk.dim(' Install AgentVibes separately to enable TTS:'));
|
|
||||||
console.log(chalk.dim(' https://github.com/paulpreibisch/AgentVibes\n'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
enabled: answers.enableTts,
|
enabled: answers.enableTts,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue