Services Overview
The business logic layer — everything that isn't UI, tools, or the query loop.
Analytics & Telemetry
Analytics Service (services/analytics/)
Tracks usage events and feature flags:
Shared from "Claude-Code" on Inkdown
The business logic layer — everything that isn't UI, tools, or the query loop.
services/analytics/)Tracks usage events and feature flags:
services/analytics/growthbook.ts)Feature flag and A/B testing platform:
Full OTel integration:
Attributed counters track:
services/compact/)Summarizes old messages when context approaches the limit:
Process:
Removes redundant tool_use/tool_result pairs:
Triggered reactively when the API returns 413 (prompt too long):
Removes the oldest messages:
services/contextCollapse/)A more aggressive context reduction strategy:
projectView() replays the commit log on every entryservices/SessionMemory/)Extracts and stores memories from conversations:
services/teamMemorySync/)Syncs memory across team members:
services/settingsSync/)Uploads local settings to the cloud:
services/lsp/)Language Server Protocol integration:
services/PromptSuggestion/)Suggests prompts to the user:
services/tips/)Contextual tips shown to users:
services/claudeAiLimits.ts)Tracks and displays rate limit status:
services/rateLimitMessages.ts)User-friendly messages for rate limits:
services/rateLimitMocking.ts)For testing:
services/autoDream/)Background processing feature:
services/preventSleep.ts)Keeps the system awake during long operations:
services/notifier.ts)Notification system:
services/vcr.ts)Records and replays API interactions for testing:
services/voice.ts)Voice input support:
services/voiceKeyterms.ts)Domain-specific keyterms for voice:
services/voiceStreamSTT.ts)Streaming speech-to-text:
services/MagicDocs/)Auto-generates documentation:
services/diagnosticTracking.ts)Collects diagnostic information:
services/internalLogging.ts)Internal logging for debugging:
services/awaySummary.ts)Summarizes what happened while the user was away:
services/extractMemories/)Memory extraction from conversations:
services/remoteManagedSettings/)Enterprise-managed settings:
services/policyLimits/)Enterprise policy enforcement:
services/oauth/)OAuth authentication:
services/plugins/)Plugin management:
| Directory | Purpose |
|---|---|
services/analytics/ | Telemetry, GrowthBook, OTel |
services/api/ | Anthropic API client |
services/compact/ | Context compaction |
services/contextCollapse/ | Context collapse |
services/mcp/ | MCP servers |
services/tools/ | Tool orchestration |
services/SessionMemory/ | Session memory |
services/teamMemorySync/ | Team memory sync |
services/settingsSync/ | Settings sync |
services/lsp/ | LSP integration |
services/plugins/ | Plugin management |
services/policyLimits/ | Enterprise policies |
services/oauth/ | OAuth authentication |
services/remoteManagedSettings/ | Remote settings |
services/autoDream/ | Auto dream |
services/PromptSuggestion/ | Prompt suggestions |
services/tips/ | Tips |
services/voice.ts | Voice input |
services/vcr.ts | VCR recording/playback |
services/notifier.ts | Notifications |
services/rateLimitMessages.ts | Rate limit messages |
services/awaySummary.ts | Away summary |
services/diagnosticTracking.ts | Diagnostics |
services/internalLogging.ts | Internal logging |
services/MagicDocs/ | Auto documentation |
services/extractMemories/ | Memory extraction |
services/toolUseSummary/ | Tool use summaries |
services/tokenEstimation.ts | Token estimation |
services/claudeAiLimits.ts | Claude AI limits |
services/preventSleep.ts | Prevent system sleep |
services/mockRateLimits.ts | Rate limit mocking |
services/voiceKeyterms.ts | Voice keyterms |
services/voiceStreamSTT.ts | Voice STT |