feat: implement WriteMemory gRPC endpoint (#34) #133

Merged
shahondin1624 merged 1 commits from feature/issue-34-write-memory-endpoint into main 2026-03-10 10:55:01 +01:00

1 Commits

Author SHA1 Message Date
Pi Agent
f9bb5adf94 feat: implement WriteMemory gRPC endpoint (issue #34)
Full write pipeline: validate request, assign/generate memory ID,
determine provenance and trust level, sanitize external content,
generate embeddings via Model Gateway, store all data atomically
in DuckDB (memory + tags + correlations + embeddings + provenance +
derivation links), invalidate semantic cache, and audit-log the
write via Audit Service (best-effort).

- New db/write.rs: transactional write helper with rollback
- Audit client integration following Secrets Service pattern
- Remove #[allow(dead_code)] from provenance_config and sanitizer
- 15 new tests (7 db/write, 8 service-level)
- All 226 tests pass, clippy clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 10:54:38 +01:00