- Remove 7 redundant .env vars: DB_NAME, DB_USER, DB_HOST, DB_PORT,
MEMORY_DB_NAME, MEMORY_DB_USER, MEMORY_DB_URL — all now derived from
AGENT_NAME by config.ts and common.sh
- Fix DB_HOST in common.sh pointing to .2 (controlplane) instead of .3 (db)
- common.sh: normalise AGENT_NAME → Postgres identifier, same algorithm
as db-identifiers.ts; embed config now reads from .env instead of
overriding with stale OpenRouter values
- embed.sh: drop OPENROUTER_API_KEY requirement; use EMBED_BASE_URL +
EMBED_API_KEY (empty = local llama-server, no auth needed)
- memory-hydrate-pg.sh, memory-lifecycle.ts: replace ai_brain/clawdie_brain
literals with live DB_NAME / MEMORY_DB_NAME values
Bump to 0.9.1.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---
Build: pass | Tests: pass — Tests 431 passed (431)
Three scripts in scripts/memory/:
- common.sh: shared config, DB connection, dependency checks
- embed.sh: generate 1536d embeddings via OpenRouter API
- chunk.sh: split text on sentence boundaries (~500 chars)
- memory-pg.sh: full CLI for store/search/recent/important/count
Store pipeline: text → chunk → embed → insert (fully automated).
Search: hybrid RRF combining full-text and vector similarity.
All scripts use #!/usr/bin/env bash for FreeBSD compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>