Commit graph

3 commits

Author SHA1 Message Date
jeda
1a331eafaa feat(bd-122): Parse conversation events from NEEDLE logs
Add ConversationEvent types and parsing functions to extract conversation
events from NEEDLE log entries:

Types added to types.ts:
- ConversationRole: system, user, assistant, tool
- ConversationEventType: prompt, response, thinking, tool_call, tool_result
- PromptEvent: User input/prompt
- ResponseEvent: Assistant response text
- ThinkingEvent: Internal reasoning/thinking block
- ToolCallEvent: Tool being called with arguments
- ToolResultEvent: Result from a tool call
- ConversationSession: Complete conversation session
- ConversationParseOptions: Options for parsing

Functions added to parser.ts:
- isConversationEvent(): Check if log event contains conversation content
- parseConversationEvent(): Parse single log event to conversation event
- parseConversationEvents(): Parse multiple log events
- parseConversationLine(): Parse single log line
- parseConversationContent(): Parse multi-line log content
- formatConversationEvent(): Format for display

Features:
- Supports explicit conversation fields (conversation_role, conversation_type)
- Supports content fields (prompt, response, thinking, tool_result)
- Supports tool call parsing with arguments normalization
- Content truncation for large responses
- Human-readable tool summaries (e.g., "Read /src/main.ts")
- Filtering options for thinking blocks and tool results

Comprehensive unit tests added for all conversation parsing functions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-04 04:23:09 +00:00
jeda
f8e17ee2ab feat(bd-3jl): FileHeatmap integration complete + build fixes
FileHeatmap component is fully integrated into main TUI app:
- Keyboard shortcut 'H' toggles heatmap view
- Real-time file access aggregation from event store
- Shows most-touched files with multiple sort modes
- All tests passing (943 tests, including 130 FileHeatmap tests)

Additional fixes:
- Fixed ErrorGroupPanel options to support bottom property
- Added vitest globals configuration for proper TypeScript support
- Fixed type assertions in server.test.ts
- Created comprehensive integration documentation

Co-Authored-By: Claude Worker <noreply@anthropic.com>
2026-03-04 04:18:13 +00:00
jeda
a6699db07f feat: implement Phase 1 core infrastructure for FABRIC
Implements working `fabric tail` command with:

- Log tailer module (src/tailer.ts)
  - File watching with fs.watch
  - Follow mode for real-time updates
  - Buffer management for partial lines
  - Graceful shutdown handling

- JSON parser module (src/parser.ts)
  - Validates NEEDLE log format
  - Extracts optional fields (tool, path, bead, duration_ms, error)
  - Human-readable event formatting with color support

- In-memory event store (src/store.ts)
  - Stores events with worker indexing
  - Supports querying with filters
  - Auto-updates worker status based on events

- Working CLI (src/cli.ts)
  - Filters by worker (-w) and level (-l)
  - Supports --json output
  - Shows existing lines with -n flag

Resolves HUMAN bead bd-17q (worker starvation) by providing
working implementation and creating beads for remaining phases.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-03 04:58:42 +00:00