github mksglu/context-mode v1.0.146

6 hours ago

v1.0.146

Single follow-up to v1.0.145's #645 fix — extends the same fix template to the third adapter that was missing it.

Fix

OpenClaw SessionDB now routes through resolveSessionDbPath (#645 follow-up). v1.0.145 fixed Pi + OMP adapters that wrote SessionDB to a hardcoded path while the MCP server read from a different canonical <hash>.db. OpenClaw had the same bug class — src/adapters/openclaw/plugin.ts:199-205 used raw sha256(projectDir).slice(0,16) directly instead of the canonical resolver, missing case-fold + worktree-suffix + legacy migration logic. v1.0.146 routes through resolveSessionDbPath({ projectDir, sessionsDir }) mirroring the Pi/OMP/opencode pattern byte-symmetric, plus singleton re-key on resolved-path change.

Tests

1 new test in existing tests/plugins/openclaw.test.ts (CONTRIBUTING L275 — no new test files): asserts openclaw's resolved path equals MCP server's canonical resolver output. Surfaces two non-obvious gotchas documented inline: (a) macOS realpath (/var/.../private/var/...) requires realpathSync before hashing; (b) calling resolveSessionDbPath in the assertion triggers a one-shot legacy→canonical rename that would silently mask the bug — assertion uses hashProjectDirCanonical + join directly.

96/96 openclaw tests + 38/38 adapters + 3415/3415 full suite pass.

Family A coverage now complete

Adapter Status
opencode ✓ canonical (since d923716)
pi ✓ v1.0.145 (#645)
omp ✓ v1.0.145 (#645)
openclaw ✓ v1.0.146 (this release)

Compatibility

15 adapters, 3 OS. No schema migration. engines.node >= 22.5.0 preserved.

Upgrade

npm install -g context-mode@latest
# Restart OpenClaw

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.