3 Commits

Author SHA1 Message Date
Hermes Agent 5c9bc14008 ump-recall: Hermes migration + get route fix (2026-07-14)
After moving the canonical ump store from /root/.openclaw/.../state/ump-local
to /root/.hermes/state/ump-local, two related fixes:

1. src/ump-recall-mcp.js (the MCP shim):
   - UMP_DIR fallback updated:  /root/.openclaw/... -> /root/.hermes/state/ump-local
     (parent env always provides UMP_DIR explicitly, but the fallback
     was a footgun if anyone unset it.)
   - tools/call ump.get now routes to the sidecar's GET /get/{urn}
     endpoint via HTTP, with fallback to the stdio child for resilience.
     This replaces the silent-drop pattern where the npx child held
     a stale UMP_DIR and returned "not_found: no record" for everything.

2. scripts/ump_verify.py (new):
   File-layer verifier for ump-write verification. Replaces the
   manual SOP with an executable that has deterministic exit codes:
     0 verified, 2 silent drop, 3 malformed, 4 no store, 5 corrupted
   Reads memory.ump.json directly (independent of any HTTP route),
   supports --exists, --wait N, --list-last N.

3. .gitignore: ignore state/ (runtime cache: access_log.json, graph.json)
   and __pycache__ (eval python tools).
2026-07-13 20:51:47 -07:00
Krystie 9d8a90b895 Rename project: ump-recall -> self-directed-learning
- package.json: name + description updated
- README.md: full rewrite framing as Hermes/Krystie self-improvement loop
- scripts/judge.py: triadic review (Claude + Codex via Hermes OAuth) — replaces broken OpenAI API path
- src/ump-recall-mcp.js: MCP initialize handshake fix — pre-init tools/call no longer times out
- New Gitea repo: sami7777/self-directed-learning (old ump-recall retained for reference)
2026-07-12 23:13:55 -07:00
Krystie dc5dc94d79 Initial commit: Adaptive Recall sidecar for UMP (Phase 5)
Multi-channel retrieval sidecar over Universal Memory Protocol:
- 3-channel RRF (UMP FTS5 + Qdrant vector + knowledge graph)
- ACT-R re-ranking (Anderson 1983) with access tracking
- Co-occurrence graph edges (Phase 6) for dense traversal
- Memory lifecycle decay (Phase 4) with per-kind confidence
- MCP shim routes recall through sidecar, falls back to canonical UMP

Architecture:
- src/server.js      HTTP sidecar on port 4380
- src/graph.js       2592-node / 111-edge graph from UMP (or +cooccur: 13k+)
- src/actr.js        A_i = -d*ln(age) + beta*log1p(freq) + epsilon*conf
- src/access_log.js  per-URN counter + last_accessed_at
- src/ump-recall-mcp.js  MCP shim (recall via sidecar, others passthrough)

Eval results (851-record UMP corpus):
- 2ch RRF over baseline: +50pp recall@10
- 3ch RRF (+graph): +60pp, 12 unique wins
- ACT-R re-rank: 4/20 #1 changes, 84% top-5 retention

Tests: 76/76 passing across graph (27), actr (27), access_log (28),
decay (20), mcp-shim (sidecar + fallback). Run with: npm test

Inspired by AIAppsAPI/adaptive-recall but built from scratch against
existing DNS2 infrastructure (UMP at :4317, Qdrant at :6333,
Ollama at :11434). No paid SaaS, MIT-licensed.
2026-07-12 19:24:47 -07:00