What's New
OpenClaw / Pi Agent Integration (PR #122 by @ipedro)
context-mode now runs as a native OpenClaw gateway plugin, targeting Pi Agent sessions (Read/Write/Edit/Bash). Unlike other platforms, there's no separate MCP server — the plugin registers directly into the gateway runtime via OpenClaw's plugin API.
- 8 hooks registered automatically via
api.on()(lifecycle) andapi.registerHook()(commands) - Full session continuity — tool event capture, compaction snapshots, and session restore
- Multi-agent workspace routing — isolates sessions per agent via workspace path resolution
- Graceful degradation — falls back to DB snapshot reconstruction on older gateway versions
- One-shot installer:
scripts/install-openclaw-plugin.sh /path/to/openclaw-state - Minimum version: OpenClaw >2026.1.29 (PR #9761)
Full docs: docs/adapters/openclaw.md
Antigravity Adapter
MCP-only adapter with zero-config detection via MCP protocol handshake (clientInfo.name). Auto-writes GEMINI.md routing instructions on first startup.
Kiro Adapter
MCP-only adapter with clientInfo.name auto-detection. Hook support (PreToolUse/PostToolUse) for routing enforcement. Auto-writes KIRO.md routing instructions.
MCP clientInfo Detection
Platform detection now uses the MCP initialize handshake as the highest-priority signal. No env vars needed — the MCP protocol tells us which client is connecting. Falls back to env var detection for platforms that don't send clientInfo.
Supported: claude-code, gemini-cli-mcp-client, antigravity-client, cursor-vscode, Visual-Studio-Code, Codex, codex-mcp-client, kiro.
Bug Fixes
- Windows
PathvsPATH— Node.jsprocess.envpreserves original casing on Windows. Executor checkedPATHbut Windows usesPath, causingspawn node ENOENT. Now normalizesPath→PATHbefore env construction. - Rust
#[allow]vs#![allow]— Outer attribute only applied to the next item (use std::fs), not the whole crate. Changed to inner attribute#![allow(unused_variables)]. - Rust compilation timeout — 30s was too short for cold-start
rustcon CI Windows. Increased to 60s. pluginRootresolution fromsrc/— When runningnpx tsx src/cli.ts,import.meta.urlresolved tosrc/directory. Addedsrc/suffix handling alongside existingbuild/check.- Doctor stderr logging — Server test failure messages now include stderr for debugging.
Infrastructure
Version Management Consolidation
package.json is now the single source of truth for version. src/server.ts reads it at runtime via createRequire. All 5 JSON manifests auto-sync via npm run version-sync, wired into the npm version lifecycle hook. No more out-of-sync version files.
Test Consolidation
Consolidated 23 scattered test files into 6 domain-grouped files. Total: 1,062 tests, all passing.
| Domain | File | Tests |
|---|---|---|
| Search & FTS5 | tests/core/search.test.ts
| 74 |
| Server & tools | tests/core/server.test.ts
| 54 |
| CLI & bundle | tests/core/cli.test.ts
| 19 |
| Session continuity | tests/session/continuity.test.ts
| 18 |
| Hook integration | tests/hooks/integration.test.ts
| 48 |
| OpenClaw plugin | tests/plugins/openclaw.test.ts
| 76 |
CI Improvements
- Added
workflow_dispatchtrigger andnextbranch support - Added
npm run bundlestep before tests (bundle files required by CLI tests) - Doctor step now uses
continue-on-error: true - Fixed
stats.jsontracking (removed from.gitignore)
Docs
- Rewrote OpenClaw README section with evidence-based DX (step-by-step install, verified API links, minimum version)
- Removed all Beta labels from platform sections
- Updated CONTRIBUTING.md with test file organization policy and domain-to-file mapping
- Added PR template checklist: "Tests added to existing test files"
Contributors
Upgrading
# Claude Code marketplace
/context-mode:ctx-upgrade
# npm global
npm install -g context-mode@latest
# OpenClaw
git pull && scripts/install-openclaw-plugin.sh /path/to/openclaw-state