refactor(installer): remove dead .agent.yaml/.xml fallback logic#2084
refactor(installer): remove dead .agent.yaml/.xml fallback logic#2084
Conversation
🤖 Augment PR SummarySummary: Refactors installer module/skill discovery by removing legacy manifest fallbacks that are no longer used. Changes:
Technical Notes: Assumes installed modules are discoverable through 🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| // If it has any of these directories or skill manifests, it's likely a module | ||
| if (hasAgents || hasWorkflows || hasTasks || hasTools || hasSkills) { | ||
| if (hasAgents || hasSkills) { |
There was a problem hiding this comment.
scanInstalledModules() now only treats a directory as a module if it has agents/ or contains a SKILL.md somewhere. If there are still supported/legacy modules that only ship workflows/, tasks/, or tools/ (no agents and no SKILL.md), they’ll now be skipped and won’t have manifests generated—worth confirming this behavior is intentionally unsupported (or covered by a test).
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
📝 WalkthroughWalkthroughRefactored module-detection logic to remove Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tools/cli/installers/lib/core/manifest-generator.js (1)
707-713: Short-circuit the recursive SKILL scan whenagents/already exists.On Line 710,
_hasSkillMdRecursive(modulePath)runs even whenhasAgentsis alreadytrue, which adds avoidable filesystem traversal cost.⚡ Suggested optimization
- const hasAgents = await fs.pathExists(path.join(modulePath, 'agents')); - const hasSkills = await this._hasSkillMdRecursive(modulePath); + const hasAgents = await fs.pathExists(path.join(modulePath, 'agents')); + const hasSkills = hasAgents ? false : await this._hasSkillMdRecursive(modulePath); if (hasAgents || hasSkills) { modules.push(entry.name); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/cli/installers/lib/core/manifest-generator.js` around lines 707 - 713, The code always calls this._hasSkillMdRecursive(modulePath) even when hasAgents is true; avoid the extra I/O by short-circuiting the skill scan: compute hasSkills only when hasAgents is false (e.g., set hasSkills = hasAgents ? false : await this._hasSkillMdRecursive(modulePath) or call _hasSkillMdRecursive only inside the if (!hasAgents) branch) and then push entry.name into modules when hasAgents || hasSkills; update references to modulePath, hasAgents, hasSkills, and _hasSkillMdRecursive accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tools/cli/installers/lib/core/manifest-generator.js`:
- Around line 707-713: The code always calls
this._hasSkillMdRecursive(modulePath) even when hasAgents is true; avoid the
extra I/O by short-circuiting the skill scan: compute hasSkills only when
hasAgents is false (e.g., set hasSkills = hasAgents ? false : await
this._hasSkillMdRecursive(modulePath) or call _hasSkillMdRecursive only inside
the if (!hasAgents) branch) and then push entry.name into modules when hasAgents
|| hasSkills; update references to modulePath, hasAgents, hasSkills, and
_hasSkillMdRecursive accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ac6796ce-7e37-4753-bade-43c4def0b116
📒 Files selected for processing (2)
tools/cli/installers/lib/core/manifest-generator.jstools/cli/installers/lib/ide/shared/skill-manifest.js
Summary
.agent.yaml/.xmlfallback blocks fromgetCanonicalId,getArtifactType,getInstallToBmadinskill-manifest.jsscanInstalledModules()to useagents/dir check + recursive SKILL.md scan, removingworkflows//tasks//tools/directory checksTest plan
npm ci && npm run qualitypasses (227 tests, all lint/format/refs/skills clean)grepconfirms no.agent.yaml/.xmlfallback references remain inskill-manifest.js