Repository navigation
fix: install and verify claude code plugins in devai:install - #651
Merged
Merged
Conversation
devai:install only wrote .claude/settings.json and relied on Claude Code's one-time folder-trust prompt to install marko-skills, marko-lsp and marko-mcp. When that prompt was skipped or failed, the plugins stayed enabled but not installed, and nothing reported an error. For external projects, ClaudeCodeAgent now runs `claude plugin install <name>@marko --scope project` for all three plugins, writes its settings back afterwards (the CLI rewrites the file), and verifies with `claude plugin list --json`. A missing plugin throws DevAiInstallException with the three install commands and a restart hint. If the claude CLI is not on PATH, the install logs a warning instead. The monorepo's local marketplace is still left to the trust prompt. Docs: auto-install wording is now conditional, troubleshooting has an entry for enabled-but-not-installed plugins, and the /mcp server name is plugin:marko-mcp:marko. Closes #648 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KaHtYgss6ELkNd1fkcNyX
claude plugin install does not read extraKnownMarketplaces, so on a machine that has never seen the marko marketplace every install failed with "not found in marketplace". Verified against a fresh CLAUDE_CONFIG_DIR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KaHtYgss6ELkNd1fkcNyX
…ai-install-plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
devai:installonly wrote.claude/settings.jsonand counted on Claude Code's one-time folder-trust prompt to installmarko-skills,marko-lspandmarko-mcp. If that prompt was skipped or failed, the plugins stayed enabled but not installed, and nothing reported an error: no MCP server, no LSP diagnostics, no skills.Code (
marko/devai)ClaudeCodeAgent::install()now runsclaude plugin install <name>@marko --scope projectfor all three plugins throughCommandRunnerInterface. It runs after the settings are written, so the CLI can resolve themarkomarketplace fromextraKnownMarketplaces..claude/settings.jsonon every project-scope install, so devai writes its own settings back afterwards. The file's output stays the same as before.claude plugin list --json. A plugin counts only if it is listed withenabled: true, because the list also includes project-scope installs from other folders withenabled: false. If any plugin is missing, or the list command fails, it throwsDevAiInstallException::claudePluginsNotInstalled(). Thesuggestionlists the three install commands and says to restart Claude Code.claudeCLI isn't on PATH, there's no throw. The agent records a notice, and the orchestrator logs it as[claude-code] WARNING: …in the install summary. This works through a newReportsInstallNoticesInterface, which the orchestrator checks withinstanceof.ClaudeCodeAgentis no longer areadonly classso it can hold the notices; its promoted properties stayreadonly..): no change. Installation is still left to the trust prompt.Docs
agents/claude-code.md,lsp.md, the CLAUDE.md template inbuildClaudeMd(), theclaude-pluginsREADME and themarketplace_refconfig row inpackages/devai.md.claude-code.mdhas a new "Plugin installation" section.claude plugin list/claude mcp list), fix (the three install commands) and restart./mcpserver name is nowplugin:marko-mcp:markoin Manual verification and in the verification checklist.Tests
ClaudeCodeAgentTest: install commands and their order, settings written before install, settings rewritten after the CLI changes them, verification viaplugin list --json, a loud failure that names the missing plugin and gives the full suggestion, listed-but-disabled counts as missing, a failingplugin list, a warning (no throw) whenclaudeis off PATH, and the monorepo skipping the install.ClaudeCodeInstallExternalProjectTest: the fake runners now answerclaude plugin list. New end-to-end cases cover install and verify, the loud failure, and the warning in the summary log.composer test,./vendor/bin/phpcs,composer phpstanandcomposer docs:lintall pass.Closes #648
🤖 Generated with Claude Code
https://claude.ai/code/session_017KaHtYgss6ELkNd1fkcNyX