feat: goal badge, subagent attribution, connectors, Windsurf — Build 6 - #60
Merged
Conversation
… Windsurf deny-only - statusline + dashboard show the live goal badge (◎ <goal> iter N/M) from loop-state.json — the loop is visible on every platform, not just hosts with native goal UIs; clears when run_loop clears state. LoopState persists maxIters for the badge. - SubagentStart/SubagentStop hooks (Claude Code + Codex via KNITBRAIN_HOOKS; VS Code rides .claude settings free): Start injects the goal frame into every spawned agent; Stop attributes the subagent's REAL transcript tokens (readTranscriptUsage) into the activity ledger — the largest previously invisible sink now shows up in receipts. Never blocks (attribution only). Cursor/Gemini correctly absent (no such events). - connector inventory: host-scan reads mcpServers from project/global MCP configs — names + command/origin ONLY (env/headers/tokens never read); knitbrain excluded; project wins dedupe. Surfaces in the workflow TOOLKIT line so orchestration can route to the user's other servers. - Windsurf: .windsurf/hooks.json emitter (pre_* -> knitbrain-hook) + adapter dialect (trajectory_id detection, tool_info normalize, deny -> exit code 2 + stderr — Windsurf's documented ceiling, the binary's only non-zero exit path; all other platforms keep the exit-0 contract). Live-verified: badge renders/clears · windsurf payload exits 2 with reason · SubagentStop ledger event carries raw 10000/stored 2000 from a fixture transcript · frame injected on SubagentStart. verify EXIT=0 (610 tests).
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.
What (Build 6 — breadth + visibility)
knitbrain statusline+ dashboard show◎ <goal> iter N/Mfrom live loop state — loop enforcement visible on every platform; clears on met/caps..windsurf/hooks.jsonemitter + adapter dialect. README/ledger updated honestly.Verification
rm -rf dist && npm run verifyEXIT=0 (610 tests). Live: badge render/clear, windsurf exit=2 + stderr, subagent ledger event with real fixture-transcript tokens, frame injection.No new MCP tools, no bump.