@@ -32,7 +32,7 @@ class Installer {
3232 this . dependencyResolver = new DependencyResolver ( ) ;
3333 this . configCollector = new ConfigCollector ( ) ;
3434 this . ideConfigManager = new IdeConfigManager ( ) ;
35- this . installedFiles = [ ] ; // Track all installed files
35+ this . installedFiles = new Set ( ) ; // Track all installed files
3636 this . ttsInjectedFiles = [ ] ; // Track files with TTS injection applied
3737 }
3838
@@ -924,7 +924,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
924924 moduleName ,
925925 bmadDir ,
926926 ( filePath ) => {
927- this . installedFiles . push ( filePath ) ;
927+ this . installedFiles . add ( filePath ) ;
928928 } ,
929929 {
930930 isCustom : true ,
@@ -984,12 +984,10 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
984984
985985 // Pre-register manifest files that will be created (except files-manifest.csv to avoid recursion)
986986 const cfgDir = path . join ( bmadDir , '_config' ) ;
987- this . installedFiles . push (
988- path . join ( cfgDir , 'manifest.yaml' ) ,
989- path . join ( cfgDir , 'workflow-manifest.csv' ) ,
990- path . join ( cfgDir , 'agent-manifest.csv' ) ,
991- path . join ( cfgDir , 'task-manifest.csv' ) ,
992- ) ;
987+ this . installedFiles . add ( path . join ( cfgDir , 'manifest.yaml' ) ) ;
988+ this . installedFiles . add ( path . join ( cfgDir , 'workflow-manifest.csv' ) ) ;
989+ this . installedFiles . add ( path . join ( cfgDir , 'agent-manifest.csv' ) ) ;
990+ this . installedFiles . add ( path . join ( cfgDir , 'task-manifest.csv' ) ) ;
993991
994992 // Generate CSV manifests for workflows, agents, tasks AND ALL FILES with hashes BEFORE IDE setup
995993 spinner . start ( 'Generating workflow and agent manifests...' ) ;
@@ -1013,7 +1011,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
10131011 modulesForCsvPreserve = config . _preserveModules ? [ ...allModules , ...config . _preserveModules ] : allModules ;
10141012 }
10151013
1016- const manifestStats = await manifestGen . generateManifests ( bmadDir , allModulesForManifest , this . installedFiles , {
1014+ const manifestStats = await manifestGen . generateManifests ( bmadDir , allModulesForManifest , [ ... this . installedFiles ] , {
10171015 ides : config . ides || [ ] ,
10181016 preservedModules : modulesForCsvPreserve , // Scan these from installed bmad/ dir
10191017 } ) ;
@@ -1483,7 +1481,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
14831481 await fs . writeFile ( configPath , content . endsWith ( '\n' ) ? content : content + '\n' , 'utf8' ) ;
14841482
14851483 // Track the config file in installedFiles
1486- this . installedFiles . push ( configPath ) ;
1484+ this . installedFiles . add ( configPath ) ;
14871485 }
14881486 }
14891487 }
@@ -1522,7 +1520,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
15221520 moduleName ,
15231521 bmadDir ,
15241522 ( filePath ) => {
1525- this . installedFiles . push ( filePath ) ;
1523+ this . installedFiles . add ( filePath ) ;
15261524 } ,
15271525 {
15281526 skipModuleInstaller : true , // We'll run it later after IDE setup
@@ -1559,7 +1557,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
15591557
15601558 if ( await fs . pathExists ( sourcePath ) ) {
15611559 await this . copyFileWithPlaceholderReplacement ( sourcePath , targetPath , this . bmadFolderName || 'bmad' ) ;
1562- this . installedFiles . push ( targetPath ) ;
1560+ this . installedFiles . add ( targetPath ) ;
15631561 }
15641562 }
15651563 }
@@ -1575,7 +1573,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
15751573
15761574 if ( await fs . pathExists ( sourcePath ) ) {
15771575 await this . copyFileWithPlaceholderReplacement ( sourcePath , targetPath , this . bmadFolderName || 'bmad' ) ;
1578- this . installedFiles . push ( targetPath ) ;
1576+ this . installedFiles . add ( targetPath ) ;
15791577 }
15801578 }
15811579 }
@@ -1591,7 +1589,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
15911589
15921590 if ( await fs . pathExists ( sourcePath ) ) {
15931591 await this . copyFileWithPlaceholderReplacement ( sourcePath , targetPath , this . bmadFolderName || 'bmad' ) ;
1594- this . installedFiles . push ( targetPath ) ;
1592+ this . installedFiles . add ( targetPath ) ;
15951593 }
15961594 }
15971595 }
@@ -1607,7 +1605,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
16071605
16081606 if ( await fs . pathExists ( sourcePath ) ) {
16091607 await this . copyFileWithPlaceholderReplacement ( sourcePath , targetPath , this . bmadFolderName || 'bmad' ) ;
1610- this . installedFiles . push ( targetPath ) ;
1608+ this . installedFiles . add ( targetPath ) ;
16111609 }
16121610 }
16131611 }
@@ -1622,7 +1620,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
16221620
16231621 if ( await fs . pathExists ( dataPath ) ) {
16241622 await this . copyFileWithPlaceholderReplacement ( dataPath , targetPath , this . bmadFolderName || 'bmad' ) ;
1625- this . installedFiles . push ( targetPath ) ;
1623+ this . installedFiles . add ( targetPath ) ;
16261624 }
16271625 }
16281626 }
@@ -1721,7 +1719,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
17211719 }
17221720
17231721 // Track the installed file
1724- this . installedFiles . push ( targetFile ) ;
1722+ this . installedFiles . add ( targetFile ) ;
17251723 }
17261724 }
17271725
@@ -2700,14 +2698,10 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
27002698 const installedFilesMap = new Map ( ) ;
27012699 for ( const fileEntry of existingFilesManifest ) {
27022700 if ( fileEntry . path ) {
2703- // Paths are relative to bmadDir. Legacy manifests incorrectly prefixed 'bmad/' -
2704- // strip it if present. This is safe because no real path inside bmadDir would
2705- // start with 'bmad/' (you'd never have _bmad/bmad/... as an actual structure).
2706- const relativePath = fileEntry . path . startsWith ( 'bmad/' ) ? fileEntry . path . slice ( 5 ) : fileEntry . path ;
2707- const absolutePath = path . join ( bmadDir , relativePath ) ;
2701+ const absolutePath = path . join ( bmadDir , fileEntry . path ) ;
27082702 installedFilesMap . set ( path . normalize ( absolutePath ) , {
27092703 hash : fileEntry . hash ,
2710- relativePath : relativePath ,
2704+ relativePath : fileEntry . path ,
27112705 } ) ;
27122706 }
27132707 }
@@ -2759,7 +2753,6 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
27592753 }
27602754
27612755 // Skip config.yaml files - these are regenerated on each install/update
2762- // Users should use _config/agents/ override files instead
27632756 if ( fileName === 'config.yaml' ) {
27642757 continue ;
27652758 }
@@ -2782,8 +2775,6 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
27822775 } ) ;
27832776 }
27842777 }
2785- // If manifest doesn't have hashes, we can't detect modifications
2786- // so we just skip files that are in the manifest
27872778 }
27882779 }
27892780 } catch {
@@ -2913,7 +2904,7 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
29132904 }
29142905
29152906 await fs . writeFile ( configPath , configContent , 'utf8' ) ;
2916- this . installedFiles . push ( configPath ) ; // Track agent config files
2907+ this . installedFiles . add ( configPath ) ; // Track agent config files
29172908 createdCount ++ ;
29182909 }
29192910
0 commit comments