mesh-mem v0.2.5
Highlights
- Shadow retention sweep (#70):
gc --retention-daysnow also prunes long-shadowed index rows (after #67's shadow-delete reconcile). Re-verifies each candidate against live Zenoh state — false-shadows are upserted back to live, genuine expiries are physically deleted. Output readsretention N-day sweep: physically deleted {n} tombstones / {m} shadows (revived {k}).--no-shadow-pruneopts out. - i18n: user-facing CLI / MCP runtime strings are now English (#53).
mesh-memCLI prints and MCP tool returns (save_observation,search_memory,get_memory,delete_memory,get_memory_status,drain_pending_puts) used to mix Japanese and English; they are now uniformly English to match the already-Englishlogger.*output. The"前にやった"hint inside MCPinstructionsis intentionally preserved so the agent still recognizes Japanese user input as a search trigger. - Rebuild reconcile fixes ghost rows (#67):
LocalIndex.rebuild_from_zenohwas add-only and left long-lived ghost rows after Zenoh-side purges on offline peers. Rebuild now marksexisting - zenoh_setrows asshadowed; tombstones remain stronger than shadows; live rows whosepayload_jsonis unchanged are skipped to avoid WAL inflation on populated meshes. - Replication subscriber mirrors Zenoh DELETE into the SQLite index (#64). Previously
gc --by-pc-id --executeon one peer purged Zenoh + that peer's index but left ghost rows on every other peer (~11.7 万件 observed on dogfood). Subscriber now dispatches onsample.kindand callsLocalIndex.physical_deletefor DELETE samples. - Local fallback queue for failed puts (#50, #57). Retryable
put_observation/put_tombstonefailures are persisted tostate_dir()/pending_puts.dband replayed automatically by the MCP daemon background drain, or manually viamesh-mem drain --pending/ the MCPdrain_pending_putstool. search --format {text,markdown,json}(#58) for stable machine-oriented output. Sample Claude CodeSessionStarthook script ships inscripts/hooks/session-start.sh.
Breaking
- Japanese substring grep on CLI / MCP output no longer matches (#53). Scripts relying on
保存完了/削除/件数/該当するメモリ/キャンセルしました/物理削除完了/bulk delete 対象etc. must update their patterns to the new English equivalents (saved/deleted/count (within limit ...)/No matching memories/cancelled./physically deleted/bulk delete target: N entries). TransportStatusschema gainedpending_puts: int. Callers destructuring the dataclass must pick up the new field.- SQLite local index schema migrates v1 → v2 (adds
shadowed_at TEXTcolumn). Migration is forward-only; existing rows are treated as live until the next rebuild revisits them.
Added
gc --retention-daysshadow sweep +--no-shadow-pruneopt-out (#70).LocalIndex.mark_shadowed_missing+VisibilityCounts;get_memory_statusnow reportsindex_rows: live=N / tomb=N / shadow=N.- Local fallback queue for failed puts (#50). Daemon and manual drain (#57).
pending_putsexposed in CLIstatusand MCPget_memory_status. mesh-mem search --format {text,markdown,json}(#58); machine-oriented JSON + single-line markdown for SessionStart hooks; sample hook script.
Changed
- All user-facing CLI / MCP runtime strings translated to English (#53).
_INSTRUCTIONSkeeps"前にやった"intentionally. - Drain progress surfaced in
statusoutput (in-progress flag, last-run timestamp, cumulative drained count).
Fixed
- Rebuild now reconciles SQLite index against Zenoh, not just appends (#67, ADR-0011).
- Replication subscriber dispatches on
sample.kindand physically deletes the index row for DELETE samples (#64). get_memory_statusexposes shadow / tomb / live counts.
Upgrade note
Reinstall the editable venv to refresh __version__ metadata:
~/work/mesh-mem/.venv/bin/pip install -e .Then /mcp reconnect (or restart your MCP host).
If your existing peer index has accumulated ghost rows from before #64 / #67, the next gc --retention-days run will sweep them via the new shadow path (re-verifying each candidate against live Zenoh).
See CHANGELOG.md for full details.