Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.
Shell agent-teamsai-agentai-automationanthropicautonomous-agentawsbusiness-operationsclaudeclaude-codeclaude-code-plugindevopsecommerceinbox-zeroklaviyomarketingmcpmorning-briefingpr-automationshopifyterminal
fix(registry): resolve registry.json from canonical OPS_DATA_DIR first (#180)
Aurora Capital7e92679268b1
diff --git a/claude-ops/bin/ops-ci b/claude-ops/bin/ops-ciindex 2a9a6e3d..6b1e1b2c 100755--- a/claude-ops/bin/ops-ci+++ b/claude-ops/bin/ops-ci@@ -5,7 +5,7 @@set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"-REGISTRY="${SCRIPT_DIR}/../scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="${SCRIPT_DIR}/.." . "${SCRIPT_DIR}/../lib/registry-path.sh"if [ ! -f "$REGISTRY" ]; thenecho '{"error":"registry.json not found"}' && exit 1diff --git a/claude-ops/bin/ops-dash b/claude-ops/bin/ops-dashindex 9e8403ae..bfdb4e8a 100755--- a/claude-ops/bin/ops-dash+++ b/claude-ops/bin/ops-dash@@ -4,8 +4,8 @@set -euo pipefailPLUGIN_ROOT="$(cd "$(dirname "$0")/.." && pwd)"-REGISTRY="${PLUGIN_ROOT}/scripts/registry.json"-PREFS="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"+. "${PLUGIN_ROOT}/lib/registry-path.sh"+PREFS="${OPS_DATA_DIR}/preferences.json"# --- Color setup ---if [[ -z "${NO_COLOR:-}" && "${TERM:-dumb}" != "dumb" ]]; thendiff --git a/claude-ops/bin/ops-doctor b/claude-ops/bin/ops-doctorindex 8c10a041..e1ba3e4c 100755--- a/claude-ops/bin/ops-doctor+++ b/claude-ops/bin/ops-doctor@@ -9,7 +9,7 @@ has_env() { [ -n "${!1:-}" ] && echo true || echo false; }SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"PLUGIN_JSON="$SCRIPT_DIR/.claude-plugin/plugin.json"-REGISTRY="$SCRIPT_DIR/scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="$SCRIPT_DIR" . "$SCRIPT_DIR/lib/registry-path.sh"MCP_JSON_FILE="$SCRIPT_DIR/.mcp.json"PREFS_DIR="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}"PREFS="$PREFS_DIR/preferences.json"@@ -247,7 +247,7 @@ if [ -f "$REGISTRY" ]; thenfifielse- WARNINGS+=("registry_missing: scripts/registry.json not found — run /ops:setup to create")+ WARNINGS+=("registry_missing: registry.json not found at $OPS_DATA_DIR/registry.json — run /ops:setup to create")fi# --- 7. Preferences ---diff --git a/claude-ops/bin/ops-external b/claude-ops/bin/ops-externalindex 7786c0c6..5156c458 100755--- a/claude-ops/bin/ops-external+++ b/claude-ops/bin/ops-external@@ -6,7 +6,7 @@set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"-REGISTRY="${SCRIPT_DIR}/../scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="${SCRIPT_DIR}/.." . "${SCRIPT_DIR}/../lib/registry-path.sh"if [ ! -f "$REGISTRY" ]; thenecho '[]' && exit 0diff --git a/claude-ops/bin/ops-git b/claude-ops/bin/ops-gitindex d013fb6f..d54c257c 100755--- a/claude-ops/bin/ops-git+++ b/claude-ops/bin/ops-git@@ -5,7 +5,7 @@set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"-REGISTRY="${SCRIPT_DIR}/../scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="${SCRIPT_DIR}/.." . "${SCRIPT_DIR}/../lib/registry-path.sh"if [ ! -f "$REGISTRY" ]; thenecho '{"error":"registry.json not found"}' && exit 1diff --git a/claude-ops/bin/ops-infra b/claude-ops/bin/ops-infraindex c0f8e4f5..0faa57f5 100755--- a/claude-ops/bin/ops-infra+++ b/claude-ops/bin/ops-infra@@ -5,7 +5,7 @@set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"-REGISTRY="${SCRIPT_DIR}/../scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="${SCRIPT_DIR}/.." . "${SCRIPT_DIR}/../lib/registry-path.sh"if [ ! -f "$REGISTRY" ]; thenecho '{"error":"registry.json not found"}' && exit 1diff --git a/claude-ops/bin/ops-merge-scan b/claude-ops/bin/ops-merge-scanindex 3fb9e1ed..98933b40 100755--- a/claude-ops/bin/ops-merge-scan+++ b/claude-ops/bin/ops-merge-scan@@ -7,8 +7,8 @@ set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-${SCRIPT_DIR}/..}"-REGISTRY="${PLUGIN_DIR}/scripts/registry.json"-PREFS="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"+OPS_PLUGIN_ROOT_FALLBACK="$PLUGIN_DIR" . "${PLUGIN_DIR}/lib/registry-path.sh"+PREFS="${OPS_DATA_DIR}/preferences.json"# Optional: scope to a single repoFILTER_REPO="${1:-}"diff --git a/claude-ops/bin/ops-prs b/claude-ops/bin/ops-prsindex 223c0a79..519122d1 100755--- a/claude-ops/bin/ops-prs+++ b/claude-ops/bin/ops-prs@@ -5,7 +5,7 @@set -euo pipefailSCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"-REGISTRY="${SCRIPT_DIR}/../scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="${SCRIPT_DIR}/.." . "${SCRIPT_DIR}/../lib/registry-path.sh"if [ ! -f "$REGISTRY" ]; thenecho '{"error":"registry.json not found"}' && exit 1diff --git a/claude-ops/bin/ops-setup-detect b/claude-ops/bin/ops-setup-detectindex 937fcc57..51aa9058 100755--- a/claude-ops/bin/ops-setup-detect+++ b/claude-ops/bin/ops-setup-detect@@ -14,7 +14,7 @@ if [ -f "$PREFLIGHT/.complete" ]; thenfiSCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"-REGISTRY="$SCRIPT_DIR/scripts/registry.json"+OPS_PLUGIN_ROOT_FALLBACK="$SCRIPT_DIR" . "$SCRIPT_DIR/lib/registry-path.sh"LIB_OS_DETECT="$SCRIPT_DIR/lib/os-detect.sh"[ -r "$LIB_OS_DETECT" ] && . "$LIB_OS_DETECT"diff --git a/claude-ops/lib/registry-path.sh b/claude-ops/lib/registry-path.shnew file mode 100644index 00000000..b812b3d7--- /dev/null+++ b/claude-ops/lib/registry-path.sh@@ -0,0 +1,43 @@+#!/usr/bin/env bash+# lib/registry-path.sh — canonical resolver for registry.json + OPS_DATA_DIR+#+# Resolves OPS_DATA_DIR (canonical, survives plugin updates) and REGISTRY+# (registry.json path). Prefers the per-user data dir; falls back to the+# in-repo cache path for back-compat with installs that pre-date the data-dir+# migration.+#+# Sourcing convention:+# PLUGIN_ROOT="$(cd "$(dirname "$0")/.." && pwd)"+# . "${PLUGIN_ROOT}/lib/registry-path.sh"+# # or, when the caller already exports its own root variable:+# OPS_PLUGIN_ROOT_FALLBACK="$PLUGIN_DIR" . "${PLUGIN_DIR}/lib/registry-path.sh"+#+# Exports:+# OPS_DATA_DIR — ${CLAUDE_PLUGIN_DATA_DIR:-~/.claude/plugins/data/ops-ops-marketplace}+# REGISTRY — first existing of: $OPS_DATA_DIR/registry.json,+# $OPS_PLUGIN_ROOT_FALLBACK/scripts/registry.json,+# $PLUGIN_ROOT/scripts/registry.json. Defaults to the+# canonical data-dir path even if the file is missing, so+# callers can write to it.++OPS_DATA_DIR="${OPS_DATA_DIR:-${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}}"+export OPS_DATA_DIR++_ops_canonical_registry="${OPS_DATA_DIR}/registry.json"+_ops_legacy_registry=""+if [ -n "${OPS_PLUGIN_ROOT_FALLBACK:-}" ] && [ -f "${OPS_PLUGIN_ROOT_FALLBACK}/scripts/registry.json" ]; then+ _ops_legacy_registry="${OPS_PLUGIN_ROOT_FALLBACK}/scripts/registry.json"+elif [ -n "${PLUGIN_ROOT:-}" ] && [ -f "${PLUGIN_ROOT}/scripts/registry.json" ]; then+ _ops_legacy_registry="${PLUGIN_ROOT}/scripts/registry.json"+fi++if [ -f "$_ops_canonical_registry" ]; then+ REGISTRY="$_ops_canonical_registry"+elif [ -n "$_ops_legacy_registry" ]; then+ REGISTRY="$_ops_legacy_registry"+else+ REGISTRY="$_ops_canonical_registry"+fi+export REGISTRY++unset _ops_canonical_registry _ops_legacy_registrydiff --git a/claude-ops/scripts/ops-daemon.sh b/claude-ops/scripts/ops-daemon.shindex 9cb40e3d..d7bfb93d 100755--- a/claude-ops/scripts/ops-daemon.sh+++ b/claude-ops/scripts/ops-daemon.sh@@ -819,7 +819,9 @@ prefetch_calendar() {prefetch_project_health() {local PROJ_CACHE="$DATA_DIR/cache/projects_health.json"local LAST_FETCH="$DATA_DIR/cache/.projects_ts"- local REGISTRY="${CLAUDE_PLUGIN_ROOT:-$(dirname "$0")/../}/scripts/registry.json"+ local PLUGIN_ROOT_LOCAL="${CLAUDE_PLUGIN_ROOT:-$(dirname "$0")/../}"+ local REGISTRY="${OPS_DATA_DIR:-${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}}/registry.json"+ [[ -f "$REGISTRY" ]] || REGISTRY="${PLUGIN_ROOT_LOCAL}/scripts/registry.json"# Every 10 minif [[ -f "$LAST_FETCH" ]]; then