Commit Graph

5 Commits

Author SHA1 Message Date
pbean ce314ba600 fix(bmad-module): address review — backup safety, legacy update, help exit, TOML unescape
- fs-safe: keep the backup dir on a failed swap+rollback (it's the only
  surviving copy of the previous install) and report its path instead of
  deleting it.
- update: handle legacy marketplace.json modules the same way install does
  (hasBmadPluginJson branch + resolveLegacyModule + synthesized staging) so
  legacy-installed community modules are no longer un-updatable.
- cli: explicit --help/-h exits 0; bare no-args invocation keeps exit 2.
- config-gen: unescape TOML scalars in a single left-to-right pass so a
  literal backslash before n/r/t (e.g. a Windows path \new) round-trips
  intact; export parseTomlScalar and add round-trip regression tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 09:18:29 -07:00
pbean 08c73796a6 fix(bmad-module): prevent atomicSwapDir data loss + harden ide-sync/wds cleanup paths
- atomicSwapDir: back the existing target up to a sibling before swapping the
  staged dir in, and roll back on a failed rename so an interrupted update can
  no longer leave neither the old nor the new install.
- ide-sync cleanup: only remove _bmad/ skill source dirs when EVERY IDE synced
  successfully (so failed targets remain retryable), and containment-check each
  CSV-derived path before fs.remove so a malformed row can't escape _bmad/.
- module-dirs: validate untrusted wds_folders entries for traversal/absolute
  escape before mkdir.
- Regenerate the vendored ide-sync bundle (vendor:check clean).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 15:57:38 -07:00
pbean 6d49cc505b feat(bmad-module): manifest-driven copy plan with canonical path rewriting
Replace the flat copy-list staging with a manifest-driven copy plan:

- buildCopyPlan maps declared skills/agents/commands and string-typed
  Claude-Code surfaces into canonical install slots, copies conventional
  top-level metadata, and drops anything not covered (no more leaking of
  tools/, website/, .github/, etc.).
- rewriteManifestPaths emits a plugin.json whose paths point at the
  canonical post-install locations, keeping the on-disk manifest
  self-consistent inside _bmad/<code>/.
- stageCopyPlan stages the plan plus synthesized files (rewritten
  plugin.json) into the tmp dir for the atomic swap.

install.mjs and update.mjs switch to the new plan/skillDestDirs flow and
drop the now-unused copy-list helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:20:35 -07:00
pbean 1fb1cf5ee6 bug: fixed atomicwrites 2026-05-23 22:13:25 -07:00
pbean e96f16bf31 feat/bmad-module: community module manager skill created 2026-05-22 13:19:05 -07:00