Repository navigation
v0.8.0 — V2 Architecture (opt-in)
A ground-up reimagining of the internal pipeline. Opt in with clawdcursor start --v2. The legacy pipeline is unchanged and remains the default.
Added
--v2flag onclawdcursor start— activates the new 3-layer architecture: Router → VisionAgent → Verifier. No effect on MCP,serve, or legacystart.src/v2/platform/— platform abstraction. SinglePlatformAdapterinterface withmacos.ts,windows.ts,linux.tsimplementations. Replaces 142+ scatteredif (process.platform === 'darwin')branches across 34 files. Business logic no longer seesprocess.platform. Adding a new OS = one file.src/v2/verifier/—GroundTruthVerifier. Six independent signals decide whether a task actually completed: pixel diff, window change, focus change, OCR delta, task-specific assertions (send_email,navigate_url,open_app,type_text,search,compose_message,create_file), and anti-patterns (error dialogs, "cannot send", "draft saved", invalid recipient, auth failed). Weighted voting with hard-fail rules on anti-patterns. Cannot be fooled by LLM self-reported "done".src/v2/agent/—VisionAgent: a single vision-first tool-use loop. 16 tools (screenshot,read_screen,list_windows,click,drag,scroll,type,key,invoke_element,set_field_value,open_app,focus_window,read_clipboard,write_clipboard,wait,done). 6-rule system prompt (down from 36). Model-agnostic via existingcallVisionLLM.src/v2/orchestrator.ts—PipelineV2wires Router → VisionAgent → Verifier with before/after state capture.- Hardened JSON parser — tolerates trailing braces, markdown code fences, and other common LLM malformations. Balanced-brace extraction as fallback.
Fixed
- False positives — legacy pipeline reports
UNVERIFIED_SUCCESSwhen the agent claims "done" but the screen didn't change. V2 verifier catches this class: in a live email-send test the agent said "Email sent" but a "Cannot send" dialog was on screen. V2 correctly rejected the claim. (Legacy still does what it does; this fix only applies when--v2is set.)
Testing
Smoke-tested on macOS with Anthropic Claude Haiku (text) + Sonnet (vision):
| Task | Time | Verdict |
|---|---|---|
| Open TextEdit and type | 30s | ✅ (4/6 signals) |
| Calculator: 47+53=100 | 65s | ✅ (5/6 signals, zero parse errors) |
| Safari → github.com | 45s | ✅ (6/6 signals) |
| Notes: create note | 182s | ✅ (6/6 signals) |
| Email send (failing server) | 86s | ❌ Correctly rejected — legacy would have reported success |
Platform Safety
No legacy code modified. Windows, Linux, and MCP paths untouched. v2 code is entirely under src/v2/.