fix(installer): remove hardcoded 'bmad' prefix from files-manifest.csv paths (#1043)

The manifest writer hardcoded 'bmad' as the path prefix regardless of
the actual folder name (.bmad, bmad, etc). The reader had a matching
hardcoded strip, so it worked by accident.

Now paths are stored relative to bmadDir without any prefix. Legacy
fallback strips 'bmad/' on read - safe because no real path inside
bmadDir would start with 'bmad/'.

Co-authored-by: Brian <bmadcode@gmail.com>
This commit is contained in:
Alex Verkhovsky
2025-12-06 10:36:17 -08:00
committed by GitHub
parent 282bc27c7e
commit a6dffb4706
2 changed files with 11 additions and 6 deletions

View File

@@ -2210,8 +2210,9 @@ If AgentVibes party mode is enabled, immediately trigger TTS with agent's voice:
const installedFilesMap = new Map();
for (const fileEntry of existingFilesManifest) {
if (fileEntry.path) {
// Files in manifest are stored as relative paths starting with 'bmad/'
// Convert to absolute path
// Paths are relative to bmadDir. Legacy manifests incorrectly prefixed 'bmad/' -
// strip it if present. This is safe because no real path inside bmadDir would
// start with 'bmad/' (you'd never have .bmad/bmad/... as an actual structure).
const relativePath = fileEntry.path.startsWith('bmad/') ? fileEntry.path.slice(5) : fileEntry.path;
const absolutePath = path.join(bmadDir, relativePath);
installedFilesMap.set(path.normalize(absolutePath), {