From 1edbfb90070a941a353b3c98778d12c455e80f8c Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Sun, 12 Apr 2026 19:28:59 -0700 Subject: [PATCH] fix: sync cache on install, copy all hook files to live 0.1.0 cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit install.sh now copies hooks-handlers/*.py and hooks.json into the live cache dir after symlinking — ensures edits take effect in the running session without a CC restart for hook scripts, and on next session start for hooks.json changes. Also manually synced 0.1.0 cache to unblock current session: - post-tool-use.py: find_catalog + already-owned spawn guard - user-prompt-submit.py: null buddymon_id fallback - roster-stop.py: reads roster_output.txt (no recursive CLI call) - hooks.json: roster-stop.py Stop hook entry --- install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.sh b/install.sh index 48a4014..0b86b45 100755 --- a/install.sh +++ b/install.sh @@ -290,6 +290,16 @@ PYEOF cp "${REPO_DIR}/lib/catalog.json" "${BUDDYMON_DIR}/catalog.json" ok "Installed catalog.json → ${BUDDYMON_DIR}/catalog.json" + # Sync hooks-handlers and hooks.json into the live cache so edits take effect + # without waiting for a CC plugin-cache refresh. CC re-reads hook scripts on + # every invocation but only reads hooks.json at session start. + if [[ -d "${CACHE_DIR}/hooks-handlers" ]]; then + cp "${REPO_DIR}/hooks-handlers/"*.py "${CACHE_DIR}/hooks-handlers/" + cp "${REPO_DIR}/hooks-handlers/"*.sh "${CACHE_DIR}/hooks-handlers/" 2>/dev/null || true + cp "${REPO_DIR}/hooks/hooks.json" "${CACHE_DIR}/hooks/hooks.json" + ok "Synced hooks-handlers + hooks.json → ${CACHE_DIR}/" + fi + # Install statusline into settings.json if not already configured python3 << PYEOF import json