Local-first 🧠memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.
TypeScript
Hook update resilience - implementation plan
Tasks
Task 1: o2b-hook fail-soft + robust resolution
- Files:
scripts/o2b-hook,tests/hooks/o2b-hook.test.ts(new) - Acceptance:
- Given a hook name whose
.tsfile is missing, the wrapper writes a warning to stderr and exits0(never2). - Resolution order:
$CLAUDE_PLUGIN_ROOT/hooks/<name>.tsif present, else own-realpath root, else$OSB_PLUGIN_ROOT, else PATH-derived; first existing wins. - Bun-missing/precheck failure in hook context does not produce a blocking exit.
- Given a hook name whose
- Depends on: none
Task 2: hooks.json version-current command
- Files:
hooks/hooks.json, command-shape test - Acceptance:
- Every hook command resolves
o2b-hookvia$CLAUDE_PLUGIN_ROOT/scripts/o2b-hookwhen the env is set, else PATHo2b-hook, and never blocks if neither resolves. - Codex (env absent) still runs the PATH wrapper.
- Every hook command resolves
- Depends on: Task 1
Task 3: self-heal stale ~/.local/bin OSB symlinks
- Files:
scripts/o2b-hook(or a small lib),src/cli/install-cli.ts, tests - Acceptance:
- When invoked from a valid current root, a dangling or different-OSB-checkout
~/.local/bin/o2b-hook|o2b|vault-logsymlink is re-pointed to the current checkout; best-effort, never fatal. - A symlink owned by an unrelated tool, or a real (non-symlink) file, is never touched.
- When invoked from a valid current root, a dangling or different-OSB-checkout
- Depends on: Task 1
Task 4: install-cli idempotent re-point
- Files:
src/cli/install-cli.ts,tests/cli/install-cli.test.ts - Acceptance:
- Re-running
install-clire-points an OSB-owned or dangling symlink to the current checkout without manualrm. - Still refuses to clobber a non-symlink file or an unrelated tool's symlink (clear error).
- Re-running
- Depends on: none
Task 5: hard update-safety instruction
- Files:
docs/updating.md(new, canonical),hooks/README.md(resolution + invariants),README.mdpointer. (This repo has noCLAUDE.md/AGENTS.md; agent-facing instructions live indocs/+hooks/README.md, linked from README.) - Acceptance:
- A documented invariant set: updates must not require manual symlink surgery; hooks must fail-soft (never exit 2); CLI/hook resolution self-heals after update.
- The invariants are referenced from the code's docs path so future edits see them.
- Depends on: Tasks 1-4 (document the shipped behavior)
Task 6: QA + release
- Full
bun run validate(typecheck, lint, test suite) green. - Smoke: simulate stale symlink + run hook -> agent not blocked; run hook with CLAUDE_PLUGIN_ROOT set -> resolves current version.
- Version bump + CHANGELOG, PR, release per feature-release-playbook (separate bump handled in release phase).