v1.0.56
48 files changed, +908 / −3,121 lines — a cleanup-heavy release that removes dead code, hardens the sandbox, and fixes real bugs reported by the community.
Bug Fixes
-
fix: shell TMPDIR pointed to project root —
os.tmpdir()reads theTMPDIRenv var, which some shells set to the project root. Shell commands wrote temp/cache dirs (node-compile-cache/,nx-native-file-cache-*/,tsx-*/) into the working tree. Now resolves the real OS temp dir viagetconf DARWIN_USER_TEMP_DIR(macOS) /mktemp(Linux) /TEMP(Windows). Based on PR #209 by @vytautas-petrikas. -
fix:
ctx_executeused as file-writing bypass — When users denyBash(python:*), the routing block's guidance pushed the model towardctx_execute(python, "Path(...).write_text(...)"), bypassing the deny rule. Added<file_writing_policy>block to the routing template, strengthened<forbidden_actions>and<artifact_policy>. Based on PR #202 by @shauneccles. Closes #201. -
fix(opencode): remove stale AGENTS.md auto-write — The OpenCode plugin was writing
AGENTS.mdto the project root on every startup, contradicting docs that said "no routing file is written". Routing enforcement happens viatool.execute.before/tool.execute.afterhooks — the file write was redundant and dirtied project trees. Based on PR #196 by @rich-jojo. Closes #195. -
fix(claude-code): skip
settings.jsonhook registration when pluginhooks.jsonexists — Prevents duplicate hook entries when the plugin already provides its own hook configuration. (#211) -
fix: auto-rebuild
better-sqlite3when native binary missing — Detects ABI mismatch at startup and triggers automatic rebuild instead of crashing withMODULE_NOT_FOUND. Closes #206. -
fix: remove
CONTEXT_MODE_NODEenv var — Auto ABI compatibility is now sufficient; the manual override was unnecessary complexity. (#203)
Features
-
feat(opencode): JSONC config support — OpenCode/KiloCode configs can now contain comments (
//,/* */) and trailing commas, parsed without external dependencies. Based on PR #205 by @FloSchl8. -
feat:
CONTEXT_MODE_NODEenv var for custom Node.js path — Allows overriding the Node.js binary used by hook scripts (later removed in favor of auto ABI detection). (#214)
Refactoring
-
refactor: remove
writeRoutingInstructionsfrom all adapters — Removed thewriteRoutingInstructionsmethod,getRoutingInstructionsConfig, andRoutingInstructionsConfigtype from theHookAdapterinterface and all 11 adapter implementations. Removed call sites inopencode-plugin.ts,openclaw-plugin.ts, andserver.ts. Users who want routing awareness can manually copy the template:cp node_modules/context-mode/configs/opencode/AGENTS.md AGENTS.md. Closes #195, #207. -
refactor: auto ABI protection for hooks via
ensure-deps.mjs— Hooks now auto-detect and rebuild native binaries when the Node.js ABI version changes, eliminating manual rebuild steps. (#215) -
refactor: remove
smartTruncateandmaxOutputBytescompletely — Large executor outputs are now auto-indexed into FTS5 instead of being truncated. This simplifies the executor and improves data preservation.
Documentation
- README: Updated OpenCode/KiloCode install sections with optional
AGENTS.mdcopy step and config file links. - Continuity table: OpenCode correctly listed as "High" (not "Full") — SessionStart not yet available.
Tests
- Added ensure-deps native binary detection tests (#206)
- Added routing block content tests for
<file_writing_policy>(3 tests) - Added shell TMPDIR sandbox verification tests (2 tests)
- Added OpenCode JSONC config parsing tests
- Added Claude Code plugin hook detection tests
- Removed obsolete
writeRoutingInstructionstest suites (−220 lines)
Contributors
Thanks to the community contributors who reported issues and submitted PRs:
- @rich-jojo — PR #196 (OpenCode AGENTS.md auto-write)
- @shauneccles — PR #202 (ctx_execute file-writing bypass)
- @FloSchl8 — PR #205 (JSONC config support)
- @vytautas-petrikas — PR #209 (shell TMPDIR fix)
- @mikij — Issue #208 (OpenCode/KiloCode CLI improvements — in progress)
Full changelog: v1.0.54...v1.0.56