2.3 KiB
2.3 KiB
Services
Business logic organized by domain.
Domains
analysis/- Chunk building, semantic steps, tool executiondiscovery/- Project/session scanning, subagent resolutionerror/- Error detection, trigger checkinginfrastructure/- Cache, file watching, config, notificationsparsing/- JSONL parsing, message classification
Key Services
Analysis
- ChunkBuilder - Orchestrates chunk building
- ChunkFactory - Creates chunk objects
- ConversationGroupBuilder - Builds conversation groups
- ProcessLinker - Links subagents to chunks
- SemanticStepExtractor - Extracts steps
- SemanticStepGrouper - Groups semantic steps
- SubagentDetailBuilder - Builds subagent detail views
- ToolExecutionBuilder - Builds tool execution tracking
- ToolResultExtractor - Extracts tool results
- ToolSummaryFormatter - Formats tool summaries
Discovery
- ProjectPathResolver - Resolves project paths
- ProjectScanner - Scans ~/.claude/projects/
- SessionContentFilter - Filters session content
- SessionSearcher - Searches session content
- SubagentLocator - Locates subagent files
- SubagentResolver - Parses subagent files, detects parallel execution, enriches team metadata/colors
- SubprojectRegistry - Tracks subproject associations
- WorktreeGrouper - Groups projects by git worktree
Parsing
- SessionParser - Parses JSONL files
- MessageClassifier - Categorizes messages (user, system, AI, noise)
- ClaudeMdReader - Reads CLAUDE.md configuration
- GitIdentityResolver - Resolves git identities
Error
- ErrorDetector - Per-tool-use token counting, returns
DetectedError[] - ErrorMessageBuilder - Builds error notification messages
- ErrorTriggerChecker - Matches against notification triggers
- ErrorTriggerTester - Tests triggers against historical data
- TriggerMatcher - Pattern matching for triggers
Infrastructure
- DataCache - LRU cache (50 entries, 10min TTL)
- FileWatcher - 100ms debounced file watching
- ConfigManager - App configuration
- NotificationManager - Notification handling
- TriggerManager - Notification trigger management
Adding Service
- Create in appropriate domain folder
- Export from domain's index.ts
- Re-export from services/index.ts