github mksglu/context-mode v1.0.30

latest releases: v1.0.33, v1.0.32, v1.0.31...
5 hours ago

Persistent ContentStore for --continue Sessions

Previously, indexed content (FTS5 knowledge base) was stored in a per-PID temporary database that died with each process restart. Even with --continue, all indexed docs were re-fetched from scratch.

Now, ContentStore uses a per-project persistent path (~/.context-mode/content/{projectHash}.db). Combined with the 24h TTL cache from v1.0.29, this means:

  • --continue: Indexed docs persist across sessions. No re-fetching needed.
  • Fresh start: Store DB is wiped for a clean slate (detected via cleanup flag).
  • 14-day auto-cleanup: Stale content DBs older than 14 days are deleted on startup.

What changed

  • getStorePath() — SHA256 of project dir (Windows-normalized) → persistent DB path
  • isFreshStart() — scans all platform config dirs for cleanup flag written by SessionStart hook
  • Shutdown: close() with WAL checkpoint instead of cleanup() (preserves DB files)
  • cleanupStaleSources(maxAgeDays) — delete old indexed content from within DB
  • cleanupStaleContentDBs(dir, maxAgeDays) — scan directory, mtime-based file cleanup
  • getDBSizeBytes() — file size tracking for monitoring

Verification

  • 4-agent architecture review: store.ts, server.ts, CI/tests, cross-OS+DX
  • Critical bug found and fixed: isFreshStart() was checking wrong cleanup flag path
  • 1175 tests, 39 files, TSC + bundle clean

Full diff: v1.0.29...v1.0.30

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.