feat(v2): streaming-aware benchagi CLI (V1.0-beta)#1
Merged
Conversation
Drops the V2 streaming CLI built across the prior session: - WebSocket transport against local OpenClaw gateway (protocol v3) - Event router with taxonomy unwrap + dedupe (LRU) - Two-clock liveness (run-quiet + gateway-tick) - Multi-line REPL with history - Approval state machine (exec / plugin) - Firebase Direct auth (browser-to-loopback) - Doctor probe with full method validation - Capability probe (model heuristic + override) - Short-name agent resolution - Phase 1 spec, ADR-001..006, ANVIL-2 + ANVIL-3 receipts - 34 unit tests across 5 files (probe, event-router, liveness, agents, state) Includes test-runner fix: dropped dead --import tsx loader from test:v2 (compiled .test.js files import only .js, never .ts). Verified live against brew openclaw 2026.5.2: doctor + agents list + single-turn ask + REPL all working. 34/34 tests green via npm run test:v2. V1.1 follow-ups tracked in docs/v2/ACTION-PLAN.md. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
5 tasks
- **P1 (lint script silently passes failures)**: dropped the `find ... 2>/dev/null || true` tail from the lint script. The `|| true` masked failures from `node --check` on the bin entry points, so a syntax error in `bench.mjs` or `benchagi.mjs` would exit 0. The find was speculative — there are no `.mjs` files in `src/v2` (TypeScript only) and `test/` only contains `smoke.mjs` which doesn't need a separate lint pass. Lint now strictly validates `bin/bench.mjs` + `bin/benchagi.mjs`. - **P2 (ACTION-PLAN.md count drift)**: PR body said 4 deferred P1s but `ACTION-PLAN.md` listed 7 items under "P1 deferred to v1.1". Renamed the section to "Deferred to v1.1" and tagged each item with its actual ANVIL-3 severity (items 1–4 P1, items 5–6 P2/ housekeeping, item 7 separate from A1-A6 sequence). - **P2 (README test count over-claim)**: README said "34 V2 unit tests" but the actual count is 35 once agents.test.ts is added. Dropped the exact number to avoid future drift; described the scope instead. No behavior change. Tests still green. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drops the V2 streaming-aware
benchagiCLI built across the 2026-05-05 session. The legacybenchwrapper stays in place. Includes Phase 1 spec, six ADRs, and the full impl that verified live againstbrew openclaw 2026.5.2.What's in V1.0-beta:
Includes test-runner fix: dropped the dead
--import tsxloader from thetest:v2script. Compiled.test.jsfiles import only.js, never.ts, so thetsxloader was never reachable. With this fix,npm run test:v2runs the suite directly vianode --test.Verified live:
benchagi doctor,benchagi agents list,benchagi --agent <name> "ping", REPL multi-line input — all confirmed end-to-end againstbrew openclaw 2026.5.2on the dev mac.Hammer-Anvil receipts:
docs/v2/ACTION-PLAN.mdV1.1 follow-ups (reconnect, active-run liveness, REPL approval keys, tool error detail, [r] expand, port retry) are queued as separate Hammer-Anvil cycles per the
~/.openclaw/wiki/main/_boards/runbooks/platform/benchagi-v2-cloud-brain-pickup.mdrunbook.Anvil Handoff
This PR queues Codex Anvil smoke testing of the V1.0-beta drop. Anvil should focus on:
--import tsxis correct (no compiled.test.jsimports.tssource)npm install && npm run build && npm run test:v2should produce 34/34 green from a clean cloneCodex automation polls hourly for PRs labeled
anvil. This PR will carry that label.Test plan
npm install && npm run build && npm run test:v2→ 34/34 pass from clean clonenpm run lint→ silent successbenchagi doctoragainstbrew openclaw 2026.5.2→ all method validations greenbenchagi --agent <name> "ping"→ single-turn ask completes, two-clock liveness shows healthybenchagiREPL → multi-line input + history work🤖 Generated with Claude Code