BMAD-METHOD/tools/cli/installers/lib/ide
Davor Racic 6bfc937bd3
fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764)
* fix(opencode): use mode: all in agent template, remove name frontmatter, fix directory names

- Replace name: '{{name}}' with mode: all in opencode-agent.md
  mode: all enables both Tab-key agent switching in the TUI and @subagent
  invocation via the Task tool (mode: primary blocked subagent use)
- Remove name: '{{name}}' from opencode-task/tool/workflow/workflow-yaml templates
  OpenCode derives command name from filename, not from a name frontmatter field;
  the bare {{name}} value was overriding the bmad- prefixed filename causing
  name collisions with built-in OpenCode commands (fixes #1762)
- Fix deprecated singular directory names in platform-codes.yaml:
  .opencode/agent -> .opencode/agents, .opencode/command -> .opencode/commands
- Add legacy_targets migration: cleanup() now removes stale bmad-* files from
  old singular directories on reinstall so existing users don't get duplicates
- Fix removeEmptyParents to continue walking up to parent when starting dir is
  already absent instead of breaking early

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(opencode): address code review findings for cleanup and schema docs

- Add project boundary guard to removeEmptyParents() using path.resolve
  and startsWith check to prevent traversal outside projectDir (Augment)
- Fix JSDoc: "Recursively remove" -> "Walk up ancestor directories"
- Add user-visible migration log message when processing legacy_targets
- Document legacy_targets field in Installer Config Schema comment block
  in platform-codes.yaml (CodeRabbit + Augment)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(opencode): improve removeEmptyParents error handling and loop clarity

- Distinguish recoverable errors (ENOTEMPTY, ENOENT) from fatal errors in
  removeEmptyParents() catch block — skip level and continue upward on
  TOCTOU races or concurrent removal, break only on fatal errors (EACCES)
- Add comment clarifying loop invariant for missing-path continue branch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-02-25 11:12:05 -06:00
..
shared feat(templates): remove disable-model-invocation to enable workflow skill calls 2026-02-22 16:38:05 -06:00
templates fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764) 2026-02-25 11:12:05 -06:00
_base-ide.js refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
_config-driven.js fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764) 2026-02-25 11:12:05 -06:00
codex.js feat: migrate Codex installer from .codex/prompts to .agents/skills format (#1729) 2026-02-22 10:47:05 -06:00
github-copilot.js feat(templates): remove disable-model-invocation to enable workflow skill calls 2026-02-22 16:38:05 -06:00
kilo.js refactor: Complete @clack/prompts Migration & Installer Output Consolidation (#1586) 2026-02-08 00:40:13 -06:00
manager.js fix(installer): add custom Rovo Dev installer with prompts.yml generation (#1701) 2026-02-20 20:31:45 -06:00
platform-codes.js installer fix 2026-01-26 16:06:00 -06:00
platform-codes.yaml fix(installer): OpenCode integration: replace `name` frontmatter with `mode: all` and update directory names (#1764) 2026-02-25 11:12:05 -06:00
rovodev.js fix(installer): add custom Rovo Dev installer with prompts.yml generation (#1701) 2026-02-20 20:31:45 -06:00