Skip to content

Caveman 4.2.0

Latest

Choose a tag to compare

@JuliusBrussee JuliusBrussee released this 22 Nov 07:10
v4.2.0
70f4f34

Caveman 4.2.0 adds a QuickJS Code-Mode MCP gateway (caveman codemode / caveman wrap --codemode) with multi-agent overlays, multi-harness tool-envelope unwrapping in the compression engine, cache-safe proxy optimizations (local turn-effort gating, duplicate-read collapsing, canonical tool ordering, and defer_loading), @caveman-ai/middleware/codemode, opt-in Code-Mode support in @caveman-ai/pi 0.4.0, and a native Codex CLI provider for caveman-compress.

New

QuickJS Code-Mode MCP gateway (#1559)

  • caveman-mcp codemode and caveman codemode collapse large upstream stdio and HTTP MCP catalogs into a static, prefix-cache-safe set of Code-Mode tools (codemode_search_tools, codemode_execute, codemode_mutate) backed by an embedded pure-Go QuickJS sandbox (modernc.org/quickjs) plus built-in repo and PR helpers (batch_read, symbol_outline, pr_read, ci_logs).
  • caveman wrap --codemode installs temporary per-session Code-Mode overlays for Claude Code, Codex, OpenCode, Gemini CLI, Qwen Code, Kilo, OpenClaw, Pi, and Hermes (including config.yaml sync-back of in-session Hermes edits; Cursor MCP configs are discovered by caveman codemode).
  • Workspace MCP discovery is explicit: workspace-local MCP definitions are loaded only when --trust-workspace-mcp or CAVEMAN_TRUST_WORKSPACE_MCP=1 is set.
  • Exact recovery and non-text fidelity: Code-Mode execution outputs and built-in tools store originals in CCR before elision; upstream HTTP and stdio MCP decoding preserves integers above 2^53 and non-text attachment blocks (images, audio, resources), streams HTTP SSE replies incrementally, and strips auth/custom headers across cross-origin redirects.

Cache-safe proxy optimizations (#1559)

  • --turn-effort applies cache-safe per-turn effort gating across Anthropic (including Opus 4.7 / adaptive reasoning models), OpenAI/Codex, and Gemini without breaking prefix caches, replaying Codex/ChatGPT effort marks across substantive turns.
  • Duplicate-read collapsing, canonical tools[] ordering (--canonical-tools), MCP tool deferral (--defer-mcp-tools), and tool catalog shrinking (--shrink-tools) keep provider prompt prefixes byte-stable while trimming redundant input context. MCP-disabled streaming OpenAI Responses requests remain byte-identical.

Multi-harness engine envelopes (#1559)

  • The compression engine unwraps tool-result envelopes emitted by Claude Code, Codex, OpenCode, and Hermes so code, search results, and test reports compress cleanly across harnesses while preserving Go build and setup failure diagnostics in verbose go test output.

Framework middleware and Pi (#1559)

  • @caveman-ai/middleware 1.2.0 adds @caveman-ai/middleware/codemode (createCodeModeToolset), a zero-dependency in-process Code-Mode toolset with BM25 discovery, structured pipelines, and read/write separation.
  • @caveman-ai/pi 0.4.0 adds opt-in Code-Mode tools (CAVEMAN_PI_CODEMODE=1) backed by a lazy CodemodeClient, honors CAVEMAN_MCP_PREFIX_ARGS, and extends RPC timeouts past caller script deadlines.

caveman-compress

  • Native Codex CLI provider for caveman-compress, isolated from local tools (#1427 by @danez).

Fixed

  • Engine and proxy: guard unwrapFileWrapper against whitespace-only input; recover per segment so an engine panic fails open while still re-raising http.ErrAbortHandler (#1518).
  • OpenCode: preserve whitespace in configured OPENCODE_CONFIG_DIR (#1518).
  • CLI: remove stale dev and deploy aws commands that referenced removed targets.
  • Python SDK: restore the TLS byte budget after HTTP CONNECT reads (#1502).

Maintenance

  • Go toolchain bumped to Go 1.26.11 (#1532).
  • Documentation consolidated around AGENTS.md and docs/WHY.md, with public benchmark sample sizes stated alongside published figures.
  • Binaries: bin-v4.2.0. CLI: @caveman-ai/cli 4.2.0. Middleware: @caveman-ai/middleware 1.2.0. Pi: @caveman-ai/pi 0.4.0.