Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

fix(wrapper): skip shared lib dir in upgrade hook-refresh loop (#38)

AkitaOnRails284023e8c662
diff --git a/bin/ai-memory b/bin/ai-memory
index 1116c030..84a89eb3 100755
--- a/bin/ai-memory
+++ b/bin/ai-memory
@@ -114,7 +114,14 @@ cmd_upgrade() {
if [ -d "${HOOKS_STAGE_DIR}" ]; then
for d in "${HOOKS_STAGE_DIR}"/*/; do
[ -d "${d}" ] || continue
- found_agents+=("$(basename "${d}")")
+ name="$(basename "${d}")"
+ # `lib` (and any `_`-prefixed dir) holds shared hook helpers sourced
+ # by the per-agent scripts — it is NOT an agent. Skip it so we don't
+ # run `install-hooks --agent lib`, which clap rejects. (issue #38)
+ case "${name}" in
+ lib | _*) continue ;;
+ esac
+ found_agents+=("${name}")
done
fi