From 30459a0736513a67172d4272c1cb710fce259b6b Mon Sep 17 00:00:00 2001 From: default Date: Wed, 11 Mar 2026 04:58:57 +0000 Subject: [PATCH] chore(bd-2bt): close completed bead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit POST /api/events endpoint implemented and tested: - Accepts NEEDLE telemetry events via HTTP POST - Validates required fields (ts, event) - Stores events and broadcasts to WebSocket clients - Comprehensive test coverage (66 tests passing) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .beads/issues.jsonl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index a1e1651..210c9f2 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -23,7 +23,7 @@ {"id":"bd-29t","title":"E2E test: ActivityStream displays scrolling log entries","description":"Create a vitest test that verifies ActivityStream component displays log entries in chronological order with proper timestamps and level colors. Test scrolling behavior and filtering.","status":"open","priority":1,"issue_type":"task","assignee":"coder","created_at":"2026-03-05T00:50:18.922388746Z","created_by":"coder","updated_at":"2026-03-05T03:59:40.341472967Z","source_repo":".","compaction_level":0,"original_size":0,"dependencies":[{"issue_id":"bd-29t","depends_on_id":"bd-2kq","type":"blocks","created_at":"2026-03-05T00:50:53.033928858Z","created_by":"coder","metadata":"{}","thread_id":""}]} {"id":"bd-2au","title":"ALERT: Worker claude-code-sonnet-alpha has no work available","description":"# Worker Starvation Alert\n\nWorker **claude-code-sonnet-alpha** has exhausted all priorities and found zero work.\n\nThis is considered an error state - there should always be more work.\n\n## Worker State\n\n- **Executor:** claude-code-sonnet\n- **Model:** claude-sonnet-4-5-20250929\n- **Workspace:** /home/coder/FABRIC\n- **Root Boundary:** /home/coder/FABRIC\n- **Last completion:** \n- **Beads completed:** 0\n- **Claim success rate:** %\n- **Uptime:** 709s (h)\n- **Consecutive empty iterations:** 5\n\n## Priorities Exhausted\n\n1. ✗ Local workspace (bottoms-up): No beads in /home/coder/FABRIC or subfolders\n2. ✗ Parent exploration: No suitable workspaces found\n3. ✓ Maintenance: Completed (cleaned orphaned claims/locks)\n4. ✗ Gap analysis: false - No gaps found or created\n5. ✗ HUMAN alternatives: true - No HUMAN beads found to unblock\n\n## Discovered Workspaces\n\nTotal: 1\n\n- /home/coder/FABRIC\n\n## Required Actions\n\n1. Review discovery roots: Are all project folders being scanned?\n2. Check if projects need new features/tasks\n3. Review ROADMAP.md files across projects\n4. Enable gap analysis if disabled: `--enable-gap-analysis`\n5. Enable HUMAN alternatives if disabled\n6. Create manual beads to bootstrap work\n\n---\n*This alert was created automatically by Priority 6*","status":"closed","priority":0,"issue_type":"human","assignee":"coder","created_at":"2026-03-05T03:58:55.949768152Z","created_by":"coder","updated_at":"2026-03-05T03:59:58.537586186Z","closed_at":"2026-03-05T03:59:58.537270472Z","close_reason":"RESOLVED: Orphaned claim corruption - 8 beads stuck in_progress without claimer (bd-2b3, bd-1p8, bd-3rf, bd-129, bd-1j9, bd-29t, bd-2x9, bd-o0x). Reset all to open status. Ready beads: 0 → 8.","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-2b3","title":"Verify TUI renders colors correctly in tmux session","description":"Launch FABRIC TUI with 'node dist/cli.js tui' and verify that colors render correctly. Check that blessed tags like {bold}, {yellow-fg}, {blue-fg} are being interpreted as terminal colors rather than showing as literal text. Test in a tmux session.","status":"open","priority":0,"issue_type":"task","assignee":"coder","created_at":"2026-03-05T00:49:50.523038244Z","created_by":"coder","updated_at":"2026-03-05T03:59:36.013596838Z","source_repo":".","compaction_level":0,"original_size":0} -{"id":"bd-2bt","title":"Add POST /api/events endpoint to ingest NEEDLE telemetry","description":"## Problem\n\nNEEDLE's telemetry forwarder (src/telemetry/fabric.sh) sends events via HTTP POST, but FABRIC's Express server only has GET /api/events for querying — no POST endpoint to receive events. This is the critical missing link between NEEDLE and FABRIC.\n\n## What NEEDLE sends\n\nfabric.sh line 104-112:\n```bash\ncurl -X POST \\\n -H \"Content-Type: application/json\" \\\n -d \"$event_json\" \\\n --max-time \"$timeout\" \\\n \"$endpoint\"\n```\n\nEvent format:\n```json\n{\"ts\":\"2026-03-09T12:33:59.517Z\",\"event\":\"bead.claimed\",\"level\":\"info\",\"session\":\"needle-claude-zai-glm-5-alpha\",\"worker\":\"claude-code-glm-5-alpha\",\"data\":{\"bead_id\":\"nd-64e4\",\"workspace\":\"/home/coder/NEEDLE\"}}\n```\n\n## Implementation\n\nAdd to `src/web/server.ts`:\n\n1. `POST /api/events` — Accept single JSON event object\n - Validate it has required fields (ts, event)\n - Normalize to internal NeedleEvent format via parser\n - Call `store.add(event)` to persist\n - Broadcast via WebSocket to all connected clients\n - Return 201 Created\n\n2. Error handling:\n - 400 Bad Request for malformed JSON or missing fields\n - 413 Payload Too Large for oversized events\n - Return JSON error responses\n\n## Files\n- src/web/server.ts — Add POST route\n- src/parser.ts — May need to expose parsing for HTTP-ingested events (currently parses log lines)\n- src/store.ts — Already has add() method\n\n## Acceptance Criteria\n- NEEDLE events sent via curl POST arrive in FABRIC's event store\n- Events are broadcast to WebSocket clients in real-time\n- Events appear in TUI activity stream and web dashboard\n- Invalid payloads return appropriate error codes","status":"open","priority":0,"issue_type":"task","created_at":"2026-03-09T13:16:34.044902400Z","created_by":"coder","updated_at":"2026-03-11T04:00:07.481818919Z","source_repo":".","compaction_level":0,"original_size":0} +{"id":"bd-2bt","title":"Add POST /api/events endpoint to ingest NEEDLE telemetry","description":"## Problem\n\nNEEDLE's telemetry forwarder (src/telemetry/fabric.sh) sends events via HTTP POST, but FABRIC's Express server only has GET /api/events for querying — no POST endpoint to receive events. This is the critical missing link between NEEDLE and FABRIC.\n\n## What NEEDLE sends\n\nfabric.sh line 104-112:\n```bash\ncurl -X POST \\\n -H \"Content-Type: application/json\" \\\n -d \"$event_json\" \\\n --max-time \"$timeout\" \\\n \"$endpoint\"\n```\n\nEvent format:\n```json\n{\"ts\":\"2026-03-09T12:33:59.517Z\",\"event\":\"bead.claimed\",\"level\":\"info\",\"session\":\"needle-claude-zai-glm-5-alpha\",\"worker\":\"claude-code-glm-5-alpha\",\"data\":{\"bead_id\":\"nd-64e4\",\"workspace\":\"/home/coder/NEEDLE\"}}\n```\n\n## Implementation\n\nAdd to `src/web/server.ts`:\n\n1. `POST /api/events` — Accept single JSON event object\n - Validate it has required fields (ts, event)\n - Normalize to internal NeedleEvent format via parser\n - Call `store.add(event)` to persist\n - Broadcast via WebSocket to all connected clients\n - Return 201 Created\n\n2. Error handling:\n - 400 Bad Request for malformed JSON or missing fields\n - 413 Payload Too Large for oversized events\n - Return JSON error responses\n\n## Files\n- src/web/server.ts — Add POST route\n- src/parser.ts — May need to expose parsing for HTTP-ingested events (currently parses log lines)\n- src/store.ts — Already has add() method\n\n## Acceptance Criteria\n- NEEDLE events sent via curl POST arrive in FABRIC's event store\n- Events are broadcast to WebSocket clients in real-time\n- Events appear in TUI activity stream and web dashboard\n- Invalid payloads return appropriate error codes","status":"closed","priority":0,"issue_type":"task","assignee":"claude-code-glm-5-bravo","created_at":"2026-03-09T13:16:34.044902400Z","created_by":"coder","updated_at":"2026-03-11T04:58:28.649572566Z","closed_at":"2026-03-11T04:58:28.647913808Z","close_reason":"done","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-2dr","title":"Create WorkerGrid widget using frankentui","status":"closed","priority":1,"issue_type":"task","created_at":"2026-03-05T00:50:07.895144632Z","created_by":"coder","updated_at":"2026-03-05T00:55:13.926163714Z","closed_at":"2026-03-05T00:55:13.924973676Z","close_reason":"done","closed_by_session":"frankentui-needs-rust-project","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-2fv","title":"Test TUI [/] key opens search functionality","status":"closed","priority":1,"issue_type":"task","created_at":"2026-03-05T00:23:41.509836857Z","created_by":"coder","updated_at":"2026-03-05T00:31:40.968989763Z","closed_at":"2026-03-05T00:31:40.968715659Z","close_reason":"done","source_repo":".","compaction_level":0,"original_size":0,"comments":[{"id":5,"issue_id":"bd-2fv","author":"Jed Arden","text":"Manual TUI testing task - requires human interaction to verify keyboard shortcuts. Closing as not suitable for autonomous worker implementation.","created_at":"2026-03-05T00:31:40Z"}]} {"id":"bd-2ga","title":"Test TUI [Tab] key switches focus between Workers and Activity panels","status":"closed","priority":1,"issue_type":"task","created_at":"2026-03-05T00:23:40.998010107Z","created_by":"coder","updated_at":"2026-03-05T00:31:41.144109197Z","closed_at":"2026-03-05T00:31:41.143836219Z","close_reason":"done","source_repo":".","compaction_level":0,"original_size":0,"comments":[{"id":6,"issue_id":"bd-2ga","author":"Jed Arden","text":"Manual TUI testing task - requires human interaction to verify keyboard shortcuts. Closing as not suitable for autonomous worker implementation.","created_at":"2026-03-05T00:31:41Z"}]} @@ -68,7 +68,7 @@ {"id":"bd-8nz","title":"ALERT: Worker claude-code-sonnet-alpha has no work available","description":"# Worker Starvation Alert\n\nWorker **claude-code-sonnet-alpha** has exhausted all priorities and found zero work.\n\nThis is considered an error state - there should always be more work.\n\n## Worker State\n\n- **Executor:** claude-code-sonnet\n- **Model:** claude-sonnet-4-5-20250929\n- **Workspace:** /home/coder/FABRIC\n- **Root Boundary:** /home/coder/FABRIC\n- **Last completion:** \n- **Beads completed:** 0\n- **Claim success rate:** %\n- **Uptime:** 4161s (h)\n- **Consecutive empty iterations:** 5\n\n## Priorities Exhausted\n\n1. ✗ Local workspace (bottoms-up): No beads in /home/coder/FABRIC or subfolders\n2. ✗ Parent exploration: No suitable workspaces found\n3. ✓ Maintenance: Completed (cleaned orphaned claims/locks)\n4. ✗ Gap analysis: false - No gaps found or created\n5. ✗ HUMAN alternatives: true - No HUMAN beads found to unblock\n\n## Discovered Workspaces\n\nTotal: 1\n\n- /home/coder/FABRIC\n\n## Required Actions\n\n1. Review discovery roots: Are all project folders being scanned?\n2. Check if projects need new features/tasks\n3. Review ROADMAP.md files across projects\n4. Enable gap analysis if disabled: `--enable-gap-analysis`\n5. Enable HUMAN alternatives if disabled\n6. Create manual beads to bootstrap work\n\n---\n*This alert was created automatically by Priority 6*","status":"closed","priority":0,"issue_type":"human","assignee":"coder","created_at":"2026-03-05T04:56:27.120689472Z","created_by":"coder","updated_at":"2026-03-05T04:57:57.696857003Z","closed_at":"2026-03-05T04:57:57.696487954Z","close_reason":"FALSE POSITIVE: 8 beads available (br ready confirms). Worker discovery logic failed.","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-art","title":"SQLite Historical Analytics Storage","description":"## Problem\nPlan specifies SQLite storage for historical session analytics, but current implementation is stateless. Worker comparison analytics and recovery playbook cannot access historical data.\n\n## Context\n- **Workspace:** /home/coder/FABRIC\n- **Original Bead:** bd-muv (Gap analysis)\n- **Plan Reference:** docs/plan.md lines 1016-1124\n\n## Current State\n- All data is in-memory, lost on restart\n- No persistence for worker metrics\n- Recovery playbook cannot reference past resolutions\n- Worker analytics has no historical comparison\n\n## Requirements\n1. SQLite database at ~/.needle/fabric.db\n2. Session summaries table\n3. Per-task metrics table\n4. Error history table for recovery playbook\n5. Automatic write on session close\n6. Query interface for historical analysis\n\n## Schema (from plan)\n```sql\nCREATE TABLE sessions (\n id TEXT PRIMARY KEY,\n started_at INTEGER,\n ended_at INTEGER,\n worker_count INTEGER,\n task_count INTEGER,\n total_cost REAL,\n total_tokens INTEGER\n);\n\nCREATE TABLE task_metrics (\n id TEXT PRIMARY KEY,\n session_id TEXT,\n worker_id TEXT,\n task_type TEXT,\n started_at INTEGER,\n ended_at INTEGER,\n duration_ms INTEGER,\n cost REAL,\n tokens_in INTEGER,\n tokens_out INTEGER,\n success BOOLEAN,\n retry_count INTEGER\n);\n\nCREATE TABLE error_history (\n id INTEGER PRIMARY KEY,\n session_id TEXT,\n worker_id TEXT,\n error_type TEXT,\n error_message TEXT,\n file_path TEXT,\n timestamp INTEGER,\n resolution TEXT,\n resolution_successful BOOLEAN\n);\n```\n\n## Integration Points\n- Session close: Write to database\n- Worker analytics: Query for comparisons\n- Recovery playbook: Search error_history\n\n## Required for\n/home/coder/FABRIC bead bd-muv (Gap analysis: Compare implementation against plan.md and create beads for missing features)","status":"closed","priority":1,"issue_type":"task","assignee":"coder","created_at":"2026-03-07T03:45:51.657866099Z","created_by":"coder","updated_at":"2026-03-07T12:19:27.003992118Z","closed_at":"2026-03-07T04:19:00.908453258Z","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-aup","title":"ALERT: Worker claude-code-sonnet-bravo has no work available","description":"# Worker Starvation Alert\n\nWorker **claude-code-sonnet-bravo** has exhausted all priorities and found zero work.\n\nThis is considered an error state - there should always be more work.\n\n## Worker State\n\n- **Executor:** claude-code-sonnet\n- **Model:** claude-sonnet-4-5-20250929\n- **Workspace:** /home/coder/FABRIC\n- **Root Boundary:** /home/coder/FABRIC\n- **Last completion:** \n- **Beads completed:** 0\n- **Claim success rate:** %\n- **Uptime:** 2177s (h)\n- **Consecutive empty iterations:** 5\n\n## Priorities Exhausted\n\n1. ✗ Local workspace (bottoms-up): No beads in /home/coder/FABRIC or subfolders\n2. ✗ Parent exploration: No suitable workspaces found\n3. ✓ Maintenance: Completed (cleaned orphaned claims/locks)\n4. ✗ Gap analysis: false - No gaps found or created\n5. ✗ HUMAN alternatives: true - No HUMAN beads found to unblock\n\n## Discovered Workspaces\n\nTotal: 1\n\n- /home/coder/FABRIC\n\n## Required Actions\n\n1. Review discovery roots: Are all project folders being scanned?\n2. Check if projects need new features/tasks\n3. Review ROADMAP.md files across projects\n4. Enable gap analysis if disabled: `--enable-gap-analysis`\n5. Enable HUMAN alternatives if disabled\n6. Create manual beads to bootstrap work\n\n---\n*This alert was created automatically by Priority 6*","status":"closed","priority":0,"issue_type":"human","assignee":"coder","created_at":"2026-03-05T04:23:25.157559070Z","created_by":"coder","updated_at":"2026-03-05T04:26:18.968029732Z","closed_at":"2026-03-05T04:26:18.967673187Z","close_reason":"FALSE POSITIVE: 8 beads available (br ready confirms). Worker discovery logic failed.","source_repo":".","compaction_level":0,"original_size":0} -{"id":"bd-czg","title":"Configure NEEDLE to forward telemetry to FABRIC endpoint","description":"## Problem\n\nOnce FABRIC has POST /api/events (bd-2bt), NEEDLE needs to be configured to send events there. Currently fabric.enabled is false and no endpoint is set.\n\n## Implementation\n\n1. Update `~/.needle/config.yaml`:\n```yaml\nfabric:\n enabled: true\n endpoint: http://localhost:3000/api/events\n timeout: 2\n batching: false\n```\n\n2. Update NEEDLE config schema (`src/lib/config_schema.sh`) to include `fabric.endpoint` in the schema validation (currently only has enabled, timeout, batching — missing endpoint).\n\n3. Verify the event flow end-to-end:\n - Start FABRIC web server: `fabric web`\n - Start NEEDLE worker\n - Confirm events appear in FABRIC dashboard\n\n## Files\n- ~/.needle/config.yaml\n- /home/coder/NEEDLE/src/lib/config_schema.sh — Add fabric.endpoint to schema\n\n## Acceptance Criteria\n- fabric.endpoint is in NEEDLE's config schema\n- Config has correct endpoint URL\n- Events flow from NEEDLE worker through to FABRIC dashboard","status":"open","priority":1,"issue_type":"task","created_at":"2026-03-09T13:16:52.744845028Z","created_by":"coder","updated_at":"2026-03-09T15:20:57.012366748Z","source_repo":".","compaction_level":0,"original_size":0} +{"id":"bd-czg","title":"Configure NEEDLE to forward telemetry to FABRIC endpoint","description":"## Problem\n\nOnce FABRIC has POST /api/events (bd-2bt), NEEDLE needs to be configured to send events there. Currently fabric.enabled is false and no endpoint is set.\n\n## Implementation\n\n1. Update `~/.needle/config.yaml`:\n```yaml\nfabric:\n enabled: true\n endpoint: http://localhost:3000/api/events\n timeout: 2\n batching: false\n```\n\n2. Update NEEDLE config schema (`src/lib/config_schema.sh`) to include `fabric.endpoint` in the schema validation (currently only has enabled, timeout, batching — missing endpoint).\n\n3. Verify the event flow end-to-end:\n - Start FABRIC web server: `fabric web`\n - Start NEEDLE worker\n - Confirm events appear in FABRIC dashboard\n\n## Files\n- ~/.needle/config.yaml\n- /home/coder/NEEDLE/src/lib/config_schema.sh — Add fabric.endpoint to schema\n\n## Acceptance Criteria\n- fabric.endpoint is in NEEDLE's config schema\n- Config has correct endpoint URL\n- Events flow from NEEDLE worker through to FABRIC dashboard","status":"in_progress","priority":1,"issue_type":"task","assignee":"claude-code-glm-5-bravo","created_at":"2026-03-09T13:16:52.744845028Z","created_by":"coder","updated_at":"2026-03-11T04:46:02.094297888Z","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-fpj","title":"ALERT: Worker claude-code-sonnet-bravo has no work available","description":"# Worker Starvation Alert\n\nWorker **claude-code-sonnet-bravo** has exhausted all priorities and found zero work.\n\nThis is considered an error state - there should always be more work.\n\n## Worker State\n\n- **Executor:** claude-code-sonnet\n- **Model:** claude-sonnet-4-5-20250929\n- **Workspace:** /home/coder/FABRIC\n- **Root Boundary:** /home/coder/FABRIC\n- **Last completion:** \n- **Beads completed:** 0\n- **Claim success rate:** %\n- **Uptime:** 1331s (h)\n- **Consecutive empty iterations:** 5\n\n## Priorities Exhausted\n\n1. ✗ Local workspace (bottoms-up): No beads in /home/coder/FABRIC or subfolders\n2. ✗ Parent exploration: No suitable workspaces found\n3. ✓ Maintenance: Completed (cleaned orphaned claims/locks)\n4. ✗ Gap analysis: false - No gaps found or created\n5. ✗ HUMAN alternatives: true - No HUMAN beads found to unblock\n\n## Discovered Workspaces\n\nTotal: 1\n\n- /home/coder/FABRIC\n\n## Required Actions\n\n1. Review discovery roots: Are all project folders being scanned?\n2. Check if projects need new features/tasks\n3. Review ROADMAP.md files across projects\n4. Enable gap analysis if disabled: `--enable-gap-analysis`\n5. Enable HUMAN alternatives if disabled\n6. Create manual beads to bootstrap work\n\n---\n*This alert was created automatically by Priority 6*","status":"closed","priority":0,"issue_type":"human","assignee":"coder","created_at":"2026-03-05T04:09:19.606473388Z","created_by":"coder","updated_at":"2026-03-05T04:11:40.529197243Z","closed_at":"2026-03-05T04:11:40.528875699Z","close_reason":"FALSE POSITIVE: 8 beads available (br ready confirms: bd-2b3, bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf, bd-1p8, bd-o0x). Worker discovery logic failed.","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-h8h","title":"ALERT: Worker claude-code-sonnet-alpha has no work available","description":"# Worker Starvation Alert\n\nWorker **claude-code-sonnet-alpha** has exhausted all priorities and found zero work.\n\nThis is considered an error state - there should always be more work.\n\n## Worker State\n\n- **Executor:** claude-code-sonnet\n- **Model:** claude-sonnet-4-5-20250929\n- **Workspace:** /home/coder/FABRIC\n- **Root Boundary:** /home/coder/FABRIC\n- **Last completion:** \n- **Beads completed:** 0\n- **Claim success rate:** %\n- **Uptime:** 5028s (h)\n- **Consecutive empty iterations:** 5\n\n## Priorities Exhausted\n\n1. ✗ Local workspace (bottoms-up): No beads in /home/coder/FABRIC or subfolders\n2. ✗ Parent exploration: No suitable workspaces found\n3. ✓ Maintenance: Completed (cleaned orphaned claims/locks)\n4. ✗ Gap analysis: false - No gaps found or created\n5. ✗ HUMAN alternatives: true - No HUMAN beads found to unblock\n\n## Discovered Workspaces\n\nTotal: 1\n\n- /home/coder/FABRIC\n\n## Required Actions\n\n1. Review discovery roots: Are all project folders being scanned?\n2. Check if projects need new features/tasks\n3. Review ROADMAP.md files across projects\n4. Enable gap analysis if disabled: `--enable-gap-analysis`\n5. Enable HUMAN alternatives if disabled\n6. Create manual beads to bootstrap work\n\n---\n*This alert was created automatically by Priority 6*","status":"closed","priority":0,"issue_type":"human","assignee":"coder","created_at":"2026-03-05T05:10:54.020765517Z","created_by":"coder","updated_at":"2026-03-05T05:12:15.196081289Z","closed_at":"2026-03-05T05:12:15.195674281Z","close_reason":"FALSE POSITIVE: 8 beads available (br ready confirms). Worker discovery logic failed to find: bd-2b3, bd-2x9, bd-29t, bd-1j9, bd-129, bd-3rf, bd-1p8, bd-o0x","source_repo":".","compaction_level":0,"original_size":0} {"id":"bd-hn5","title":"Budget Alerts and Projections","description":"## Problem\nCost tracking (costTracking.ts) exists but lacks budget alerts and projections. The plan.md specifies:\n- Warning at 80% budget consumed\n- Critical at 95% budget consumed \n- Burn rate calculations\n- Time-to-budget-exhausted projections\n\n## Context\n- **Workspace:** /home/coder/FABRIC\n- **Original Bead:** bd-muv (Gap analysis)\n- **Plan Reference:** docs/plan.md lines 553-614\n\n## Current State\n- src/tui/utils/costTracking.ts: Basic cost tracking\n- Session digest includes cost info\n- Missing: Real-time alerts, projections, budget thresholds\n\n## Requirements\n1. Budget threshold configuration (daily, session)\n2. Real-time alert generation at 80%/95% thresholds\n3. Burn rate calculation (cost per minute)\n4. Time-to-exhaustion projection\n5. Top consumer identification\n6. UI badge/notification for budget status\n\n## Required for\n/home/coder/FABRIC bead bd-muv (Gap analysis: Compare implementation against plan.md and create beads for missing features)","status":"closed","priority":1,"issue_type":"task","assignee":"coder","created_at":"2026-03-07T03:44:19.484827373Z","created_by":"coder","updated_at":"2026-03-07T12:19:28.006238978Z","closed_at":"2026-03-07T04:42:04.045817054Z","close_reason":"done","source_repo":".","compaction_level":0,"original_size":0}