feat(update): make /ccam-update pull the latest ccam plugin version, not just rebuild the current one
Docs and the command's own instructions previously implied /ccam-update fetches new code; it only reinstalled deps and restarted the server against whatever version was already resolved. It now also runs `claude plugin marketplace update` + `claude plugin update ccam@<mp> -y` first, and says plainly that /reload-plugins is still a manual step (no CLI/script equivalent exists to apply it automatically).
This commit is contained in:
@@ -1,13 +1,38 @@
|
||||
---
|
||||
description: Refresh CCAM's runtime dependencies and restart the dashboard server
|
||||
description: Pull the latest ccam plugin version and refresh the dashboard runtime
|
||||
---
|
||||
|
||||
Reinstall the runtime dependencies and restart the dashboard server against the
|
||||
currently installed plugin version. Use this after a plugin update, or when
|
||||
`/ccam-doctor` reports missing dependencies or a dead server.
|
||||
Pull the newest `ccam` release from its marketplace, then reinstall the runtime
|
||||
dependencies and restart the dashboard server against it. Use this to get a new
|
||||
dashboard build, or when `/ccam-doctor` reports missing dependencies or a dead
|
||||
server.
|
||||
|
||||
This stops the running dashboard server before starting the new one. Say so, then
|
||||
run:
|
||||
First, find which marketplace this install's `ccam` came from and pull the
|
||||
latest version into the plugin cache:
|
||||
|
||||
```bash
|
||||
INSTALLED=$(claude plugin list 2>/dev/null | grep -o 'ccam@[^ ]*' | head -1)
|
||||
MARKETPLACE="${INSTALLED#ccam@}"
|
||||
if [ -z "$MARKETPLACE" ]; then
|
||||
echo "ccam is not installed as a plugin (checkout install?) - nothing to update this way."
|
||||
else
|
||||
claude plugin marketplace update "$MARKETPLACE"
|
||||
claude plugin update "ccam@$MARKETPLACE" -y
|
||||
fi
|
||||
```
|
||||
|
||||
That downloads the new version into `~/.claude/plugins/cache/` but does not
|
||||
take effect in *this* session — Claude Code only re-resolves `${CLAUDE_PLUGIN_ROOT}`
|
||||
on `/reload-plugins` (a REPL-only action, not scriptable from a command). Say
|
||||
so plainly: **tell the user to run `/reload-plugins` now**, then either
|
||||
re-run `/ccam-update` (this time the bootstrap step below runs against the new
|
||||
version) or just start a new session — `plugin-bootstrap.js` compares the
|
||||
recorded state against the current plugin version on every `SessionStart` and
|
||||
rebuilds automatically if they differ.
|
||||
|
||||
Then, whether or not a plugin update was just pulled, refresh the runtime
|
||||
against whatever `${CLAUDE_PLUGIN_ROOT}` currently resolves to. This stops the
|
||||
running dashboard server before starting the new one. Say so, then run:
|
||||
|
||||
```bash
|
||||
node "${CLAUDE_PLUGIN_ROOT}/scripts/plugin-bootstrap.js" --force
|
||||
|
||||
Reference in New Issue
Block a user