v0.4.6
v0.4.6
Structural refactor — a behavior-preserving modularization of the codebase under the 0.4.5 product surface.
This release reshapes the load-bearing monoliths (the CLI agent, the memory engine, the Ink chat UI, the dashboard page) into small, concern-scoped modules. The public Agent API, the IMemoryStore facade, and the MCP tool surface are identical — there are no user-facing changes. Internal structure only.
Highlights
- Exec concerns under one roof — exec-policy, sandbox, and command/approval logic are grouped into
runtime/exec/behind a barrel re-export, so the exec surface is one place to read. - Engine domain logic extracted — the logic-heavy lesson, blackboard, and tree operations move out of
memory/engine.tsintolessons//blackboard//tree/ops;MemoryEnginestays the delegating facade (engine.ts2011 → 1822 LOC). - CLI agent carved at its seams — apply-patch + filesystem helpers (
agent/applyPatch,workspaceFs), tool specs/names (agent/tools/), and the stateless orchestration tool factories are now their own modules. ChatApp.tsxdecomposed — reasoning/effort helpers, the slash-command palette, the footer, and the scrollback row move into submodules (ChatApp.tsx1612 → ~1050 LOC).- Dashboard modularized — landing animation/data/types and the two interactive demos' state machines move into
components/home/(landingData.ts,useConsolidationDemo,useSnnSimulator);app/page.tsx1752 → 1636 LOC.
Kept whole by design
Two big stateful classes were deliberately not force-split — doing so would expose private internals and hurt maintainability:
memory/store/sqlite.tsis the data-access layer behindIMemoryStore(176 inline prepared statements + 26 cached handles) — already at the right boundary.- The
Agent/runTurncore stays cohesive behind its public API; the standalone helpers around it were the parts worth extracting, and they're out.
Release mechanics
- All workspace packages bumped 0.4.5 → 0.4.6 + cross-package pins (
^0.4.6);package-lock.jsonregenerated. server.json+.claude-plugin/plugin.jsonsynced to 0.4.6 (DIST-1 manifest guard).- Shipped as 14 PRs (#222–#234), each its own branch → green CI → merge.
Status
- 508 brain unit tests
- 150 integration tests
- 1049 CLI tests
Next — 0.4.7
- Codex coding-agent parity — all 12 gaps from the code-backed comparison (tool-registry, command-segment exec policy, sandbox fail-closed, apply-patch hardening, agent lifecycle, child worktree isolation, typed host protocol), landing on these structural-refactor seams. Includes the deferred REVIEW-FIX and WORKTREE-ISOLATE.
Full Changelog: v0.4.5...v0.4.6