diff --git a/README.md b/README.md index e35a607..15ae21c 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,8 @@ The optimizer is identical everywhere; what differs is reach: | Cursor | ✅ | ✅ deny + follow-up loop (`.cursor/hooks.json`) | hooks + `knitbrain_read` | — | | Gemini CLI | ✅ | ✅ deny + AfterAgent loop (`.gemini/settings.json`) | hooks + `knitbrain_read` | — | | VS Code Copilot | ✅ | ✅ full (reads `.claude/settings.json` natively) | hooks + `knitbrain_read` | — | -| Windsurf · Cline · any MCP client | ✅ | — (advisory; hooks planned where APIs allow) | via `knitbrain_read` | — | +| Windsurf | ✅ | ✅ deny-only (exit-2) (`.windsurf/hooks.json`) | hooks + `knitbrain_read` | — | +| Cline · any other MCP client | ✅ | — (advisory; hooks planned where APIs allow) | via `knitbrain_read` | — | | Any agent, API key | ✅ | — | ✅ proxy (full wire) | — | One hook binary serves every row: it detects the calling platform from the payload and answers in @@ -230,7 +231,7 @@ Gated by tests and CI, not promised: - **Answers survive** — error lines, result summaries, and top-level declarations are never elided (`knitbrain evals`, 100% on real transcripts). - **Machine contracts hold** — JSON tool responses are never skeletonized. - **No false green** — the loop marks a task done only after a real verify passes; hooks block premature stops. -- **Honest receipt** — savings are counted only when a raw output was actually replaced or redirected; estimates are labeled; zero is reported as zero. +- **Honest receipt** — savings are counted only when a raw output was actually replaced or redirected; estimates are labeled; zero is reported as zero. Subagent burn (Claude Code Task subagents, Codex CLI's alias) is attributed to the activity ledger via `SubagentStart`/`SubagentStop`, so nested-agent token spend isn't invisible to the receipt. - **Local-first** — proxy, hub, and dashboard bind `127.0.0.1`; credentials are read locally, sent only to the provider's own endpoint, never logged or stored. - **Reproducible** — every number in this README comes from a command you can run on your own data. - **Self-audited** — `knitbrain_self_check` runs seven invariants (anti-stale ×2, anti-drift ×2, anti-sycophancy, adherence, context-hygiene) in one pass. diff --git a/src/dashboard.ts b/src/dashboard.ts index 80a612b..477b3b8 100644 --- a/src/dashboard.ts +++ b/src/dashboard.ts @@ -36,6 +36,8 @@ export interface DashboardDeps { wiki?: WikiStore; /** Optional: G1 activity-ledger X-ray — SAME math as the stop-hook receipt. */ xray?: () => XrayState | null; + /** Optional: active run_loop state (goal/iter/maxIters) for the X-ray card badge. */ + loop?: () => { goal: string; iter: number; maxIters?: number } | null; } /** Per-source rollup of the current session's activity events, plus the exact @@ -179,6 +181,7 @@ export function dashboardState(deps: DashboardDeps): Record { knowledge: deps.knowledge ? knowledgeSummary(deps.knowledge) : null, wiki: deps.wiki ? wikiState(deps.wiki) : null, xray: deps.xray?.() ?? null, + loop: deps.loop?.() ?? null, skills: deps.skills ? deps.skills.list().map((s) => ({ name: s.name, uses: s.uses, triggers: s.triggers.slice(0, 6), updatedAt: s.updatedAt })) : null, @@ -229,7 +232,7 @@ const PAGE = `
Knowledge graph (top blast radius)
Skills
Recent learnings
-
X-ray — G1 activity ledger (same math as the stop receipt)
+
X-ray — G1 activity ledger (same math as the stop receipt)
no session data