github chandra447/pi-hermes-memory v0.11.0

5 days ago

Session indexing gets quieter and smarter in this release: whole directories can now be excluded from indexing, non-session JSONL artifacts stop polluting the backfill, and the confusing Memory session has shut down warning at session end is gone.

No data-path or schema changes — this is a safe drop-in upgrade from 0.10.0.

✨ Features

  • sessionIndexExclude — skip whole directories when indexing sessions (#223) — thanks @IstPlayer

    ~/.pi/agent/sessions/ is a shared namespace, so extensions such as pi-subagents' subagent-artifacts/ legitimately keep JSONL there that is not a session. Non-session files were already skipped by content sniffing; this new setting (default [], disabled) also skips entire first-level directories regardless of content:

    { "sessionIndexExclude": ["subagent-artifacts"] }

    Accepts exact names or * globs (["artifact-*"]). It applies to the startup backfill preflight, the deferred backfill, live indexing, and /memory-index-sessions. Entries that are blank after trimming, or that contain a path separator or .. segment, are dropped with a warning instead of being accepted as a config value that could never match a directory.

🔧 Enhancements

  • Non-session JSONL artifacts are skipped silently instead of failing the backfill (#223) — thanks @IstPlayer

    Session discovery treated every .jsonl under the sessions root as a session, so JSONL that other extensions drop in that shared root produced a Failed to parse: <path> error per file, an N file errors warning, and consumed the per-startup indexing budget (one reported install logged 41 file errors on every launch). Files whose first line is not a {"type":"session",…} header are now detected with a bounded 4 KB first-line sniff and skipped: they are counted apart from real failures in the indexer result and in /memory-index-sessions output, and they no longer keep the deferred backfill preflight re-scheduling on every startup. Genuinely corrupt session files — and files whose header line runs past the sniff window — still surface as errors.

🐛 Bug Fixes

  • Live indexing no longer warns "Memory session has shut down" at session end (#318, fixes #313) — thanks @joshua-zyy

    A message_end-scheduled live-index timer could fire after session_shutdown had already closed the database — either because the 5 s shutdown wait timed out on a large sessions.db, or because a message_end landed during teardown — and the tick warned as if the store had died mid-session. Live indexing is now closed as the first step of shutdown, so a later message_end queues nothing, and the intentional-close error is no longer reported; genuine live-index failures still warn. The guard is per session, so a reloaded extension starts with a fresh open state. Nothing was ever lost: shutdown.active-index still indexes the session file synchronously before the guard is set.

  • BOM-prefixed session files are indexed instead of reported as parse failures (#223) — thanks @IstPlayer

    Reading a session JSONL as UTF-8 keeps a byte-order mark (U+FEFF) as a leading character, so the raw header line failed JSON.parse, the session id was never read, and the file was reported as Failed to parse: <path> — a real session lost from search with only an error to show for it. A leading BOM is now stripped before parsing (for the full parse and for the 4 KB sniff, which stays a single positional read); files with or without a BOM now index identically.

📦 Install / upgrade

pi install npm:pi-hermes-memory

🙏 Contributors

Full Changelog: v0.10.0...v0.11.0

Don't miss a new pi-hermes-memory release

NewReleases is sending notifications on new releases.