From b939cf7171774cdb8f4ad062c6783668495cc499 Mon Sep 17 00:00:00 2001 From: auroracapital Date: Sat, 30 May 2026 12:21:39 -0400 Subject: [PATCH] fix(setup): accept registry from plugin data dir, not just cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SessionStart setup.sh only checked $SCRIPT_DIR/registry.json (plugin CACHE dir, wiped on every plugin upgrade). A valid registry in the canonical data dir (CLAUDE_PLUGIN_DATA_DIR) was ignored, producing a false 'no project registry — run /ops:setup' warning on every session start. Check both locations; warn only when neither has registry.json. Verified: silent when data-dir registry present; warns when both absent. Co-Authored-By: Claude Opus 4.8 --- claude-ops/scripts/setup.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/claude-ops/scripts/setup.sh b/claude-ops/scripts/setup.sh index 86a0b0a2..5657047f 100755 --- a/claude-ops/scripts/setup.sh +++ b/claude-ops/scripts/setup.sh @@ -54,9 +54,12 @@ for tool in "${MISSING[@]}"; do echo " ✗ ops: $tool not found — run /ops:setup to configure" done -# Check registry -REGISTRY="$SCRIPT_DIR/registry.json" -if [ ! -f "$REGISTRY" ]; then +# Check registry. The canonical registry lives in the plugin DATA dir +# (CLAUDE_PLUGIN_DATA_DIR), which survives plugin upgrades; the cached copy +# under $SCRIPT_DIR is wiped on every upgrade. Accept either location so a +# valid data-dir registry doesn't trigger a false "no registry" warning. +REGISTRY_DATA_DIR="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}" +if [ ! -f "$SCRIPT_DIR/registry.json" ] && [ ! -f "$REGISTRY_DATA_DIR/registry.json" ]; then echo " ✗ ops: no project registry — run /ops:setup to create one" fi