# leeyeel/claude-code-sourcemap architecture

> Architecture diagram of the GitHub repository leeyeel/claude-code-sourcemap, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/leeyeel/claude-code-sourcemap
- Repository: https://github.com/leeyeel/claude-code-sourcemap

## Overview

1. **Overall shape**
   Claude Code is a terminal-first agent runtime, not a web app. The repository centers on a CLI that launches an interactive REPL-style experience, routes slash commands, talks to Anthropic’s Claude service, and renders everything in terminal UI components.

2. **Entry points and process boundaries**
   The main runtime starts from `cli.mjs` and `src/entrypoints/cli.tsx`, which boot the interactive terminal app. A separate `src/entrypoints/mcp.ts` exposes the MCP-side entrypoint, indicating this repo can also run as a Model Context Protocol participant for external tool integrations.

3. **Command layer**
   `src/commands.ts` and `src/commands/*` define the user-facing command surface: onboarding, login/logout, config, help, resume, review, bug reporting, logs, doctor, clear/compact, cost, and terminal setup. These commands are the top-level control plane for the user and usually transition into screens or mutate local configuration/session state.

4. **Interactive REPL and screens**
   `src/screens/REPL.tsx` is the core interactive session surface. Other screens such as onboarding, resume conversation, log list, doctor, and npm prefix configuration are separate UI states used for specific workflow transitions. This is a terminal UI application with screen-based navigation rather than browser-style routing.

5. **Conversation and message model**
   `src/messages.ts`, `src/history.ts`, `src/query.ts`, and the many `src/components/messages/*` files indicate a structured conversation log. User prompts, assistant reasoning, tool calls, tool results, and command events are all rendered as distinct message types, which is important for understanding the data flow through the UI and the persistence of session history.

6. **Tool execution subsystem**
   `src/tools/*` is the main agent action layer. It includes filesystem and shell tools (Bash, FileRead, FileWrite, FileEdit, Glob, Grep, ls), notebook tools, memory tools, an MCP tool bridge, and specialized agent/architect/think/sticker-request tools. Each tool has its own prompt and UI wrapper, implying a common tool protocol with tool-specific rendering and result handling.

7. **Permissions and trust boundary**
   Tool use is gated by a dedicated permissions subsystem in `src/permissions.ts`, `src/components/permissions/*`, and `src/utils/permissions/*`. Bash, filesystem, and file-edit/write actions can trigger explicit approval dialogs, with fallback/rejection/error messaging. This is a key architectural boundary: the model proposes actions, but local permission logic controls whether they execute.

8. **Claude API and session orchestration**
   `src/services/claude.ts` is the primary boundary to Anthropic’s model service. The surrounding hooks and utilities (`useCanUseTool`, `useCancelRequest`, `useLogMessages`, `useNotifyAfterTimeout`, `useSlashCommandTypeahead`, etc.) coordinate streaming responses, cancellation, notification, and input behavior while the UI remains reactive to model output and tool events.

9. **Authentication and product services**
   Login and API key verification are handled through OAuth and key-specific flows (`src/services/oauth.ts`, `src/utils/auth.ts`, `src/hooks/useApiKeyVerification.ts`, `src/components/ConsoleOAuthFlow.tsx`). Additional product integrations include Sentry (`src/services/sentry.ts`), Statsig feature/experiment state (`src/services/statsig.ts`, `src/services/statsigStorage.ts`), and desktop notifications (`src/services/notifier.ts`).

10. **MCP and external tool ecosystem**
   The repo has explicit MCP support via `src/services/mcpClient.ts`, `src/services/mcpServerApproval.tsx`, and the MCP tool/UI pieces. This creates a second integration boundary beyond the local shell/filesystem: external MCP servers can be discovered, approved, and used as first-class tools in the conversation loop.

11. **Local state, config, and persistence**
   User state is spread across config and session helpers in `src/utils/config.ts`, `src/utils/state.ts`, `src/utils/user.ts`, `src/utils/log.ts`, and history-related code. The app persists conversation context, trust decisions, and runtime settings so that sessions can be resumed and commands like `/resume`, `/clear`, and `/compact` work predictably.

12. **UX and rendering layer**
   `src/components/*` contains the terminal UI primitives: prompts, selectors, dialogs, diff viewers, structured message renderers, onboarding, cost warnings, updater prompts, and error boundaries. These components are purely presentation and interaction logic; they do not own agent behavior, but they define how tool results, permission requests, and warnings are shown to the user.

13. **Operational concerns**
   The repo includes doctor/diagnostic flows, cost tracking, auto-update support, token warnings, and startup logging. These indicate the app is designed to manage a long-running interactive session in the terminal, with guardrails around API usage, installation health, and upgrade prompts.

14. **Practical architecture diagram takeaway**
   The key diagram should show: terminal CLI entrypoint → command/screen controller → conversation/session state → Claude API stream → tool execution subsystem → permission gate → local filesystem/shell/MCP services → rendered message history back into the REPL. Surround that core with auth, config/persistence, telemetry, and onboarding/diagnostics as supporting subsystems.

Main entry points: [`src/tools.ts`](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools.ts) (Tools), [`src/screens/REPL.tsx`](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/REPL.tsx) (REPL screen), [`src/commands.ts`](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/commands.ts) (Command router), [`src/services/claude.ts`](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/claude.ts) (Claude API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_cli_mjs["CLI bootstrap<br/>entrypoint<br/>[cli.mjs]"]
  node_cli_entry["CLI app<br/>entrypoint<br/>[cli.tsx]"]
  node_mcp_entry["MCP entry<br/>entrypoint<br/>[mcp.ts]"]
  node_commands["Command router<br/>control plane<br/>[commands.ts]"]
  node_repl["REPL screen<br/>session UI<br/>[REPL.tsx]"]
  node_resume_screen["Resume screen<br/>session UI"]
  node_log_screen["Log screen<br/>session UI<br/>[LogList.tsx]"]
  node_doctor_screen["Doctor screen<br/>diagnostic UI<br/>[Doctor.tsx]"]
end

subgraph group_tools["Tools"]
  node_tool_registry["Tools<br/>tool hub<br/>[tools.ts]"]
  node_bash_tool["Bash<br/>shell tool<br/>[BashTool.tsx]"]
  node_file_tools["File tools<br/>filesystem tools<br/>[FileReadTool.tsx]"]
  node_search_tools["Search tools<br/>code search<br/>[GlobTool.tsx]"]
  node_mcp_tool["MCP tool<br/>external tool<br/>[MCPTool.tsx]"]
  node_memory_tools["Memory tools<br/>stateful tools<br/>[MemoryReadTool.tsx]"]
  node_notebook_tools["Notebook tools<br/>document tools"]
  node_special_tools["Agent extras<br/>assistant tools<br/>[ThinkTool.tsx]"]
end

subgraph group_services["Services"]
  node_claude_service[("Claude API<br/>model service<br/>[claude.ts]")]
  node_oauth[("Auth<br/>[oauth.ts]")]
  node_mcp_client[("MCP client<br/>integration<br/>[mcpClient.ts]")]
  node_notifier["Notifier<br/>os integration<br/>[notifier.ts]"]
  node_statsig[("Statsig<br/>feature flags<br/>[statsig.ts]")]
  node_sentry[("Sentry<br/>telemetry<br/>[sentry.ts]")]
  node_auto_updater["Auto-update<br/>maintenance<br/>[autoUpdater.ts]"]
end

subgraph group_state["State"]
  node_message_model["Messages<br/>conversation model<br/>[messages.ts]"]
  node_history["History<br/>session store<br/>[history.ts]"]
  node_query["Query flow<br/>session state<br/>[query.ts]"]
  node_permissions{{"Permissions<br/>trust gate<br/>[permissions.ts]"}}
  node_config["Config<br/>local settings<br/>[config.ts]"]
  node_state_store["State store<br/>persistence<br/>[state.ts]"]
end

subgraph group_ui["UI"]
  node_messages_ui["Messages UI<br/>rendering"]
  node_permissions_ui["Permission UI<br/>dialogs"]
  node_prompt_ui["Prompt input<br/>input UI<br/>[PromptInput.tsx]"]
  node_support_ui["Support UI<br/>presentation<br/>[Onboarding.tsx]"]
end

node_cli_mjs -->|"starts"| node_cli_entry
node_cli_entry -->|"routes"| node_commands
node_cli_entry -->|"opens"| node_repl
node_commands -->|"navigates"| node_resume_screen
node_commands -->|"navigates"| node_log_screen
node_commands -->|"navigates"| node_doctor_screen
node_repl -->|"renders"| node_message_model
node_repl -->|"updates"| node_query
node_repl -->|"streams"| node_claude_service
node_claude_service -->|"requests tools"| node_tool_registry
node_tool_registry -->|"includes"| node_bash_tool
node_tool_registry -->|"includes"| node_file_tools
node_tool_registry -->|"includes"| node_search_tools
node_tool_registry -->|"includes"| node_mcp_tool
node_tool_registry -->|"includes"| node_memory_tools
node_tool_registry -->|"includes"| node_notebook_tools
node_tool_registry -->|"includes"| node_special_tools
node_tool_registry -->|"gated by"| node_permissions
node_permissions -->|"prompts"| node_permissions_ui
node_permissions -->|"guards"| node_bash_tool
node_permissions -->|"guards"| node_file_tools
node_permissions -->|"guards"| node_mcp_client
node_history -->|"stores"| node_message_model
node_state_store -->|"persists"| node_config
node_state_store -->|"persists"| node_history
node_oauth -->|"writes"| node_config
node_repl -->|"renders"| node_messages_ui
node_repl -->|"accepts input"| node_prompt_ui
node_repl -->|"shows"| node_support_ui
node_claude_service -->|"alerts"| node_notifier
node_claude_service -->|"tracks"| node_statsig
node_claude_service -->|"reports"| node_sentry
node_cli_entry -->|"checks"| node_auto_updater
node_mcp_entry -->|"hosts"| node_mcp_client
node_commands -->|"authenticates"| node_oauth
node_commands -->|"modifies"| node_config

click node_cli_mjs "https://github.com/leeyeel/claude-code-sourcemap/blob/main/cli.mjs"
click node_cli_entry "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/entrypoints/cli.tsx"
click node_mcp_entry "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/entrypoints/mcp.ts"
click node_commands "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/commands.ts"
click node_repl "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/REPL.tsx"
click node_resume_screen "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/ResumeConversation.tsx"
click node_log_screen "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/LogList.tsx"
click node_doctor_screen "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/Doctor.tsx"
click node_message_model "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/messages.ts"
click node_history "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/history.ts"
click node_query "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/query.ts"
click node_permissions "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/permissions.ts"
click node_config "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/utils/config.ts"
click node_state_store "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/utils/state.ts"
click node_claude_service "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/claude.ts"
click node_oauth "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/oauth.ts"
click node_mcp_client "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/mcpClient.ts"
click node_notifier "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/notifier.ts"
click node_statsig "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/statsig.ts"
click node_sentry "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/sentry.ts"
click node_auto_updater "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/utils/autoUpdater.ts"
click node_tool_registry "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools.ts"
click node_bash_tool "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/BashTool/BashTool.tsx"
click node_file_tools "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/FileReadTool/FileReadTool.tsx"
click node_search_tools "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/GlobTool/GlobTool.tsx"
click node_mcp_tool "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/MCPTool/MCPTool.tsx"
click node_memory_tools "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/MemoryReadTool/MemoryReadTool.tsx"
click node_notebook_tools "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/NotebookReadTool/NotebookReadTool.tsx"
click node_special_tools "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/ThinkTool/ThinkTool.tsx"
click node_messages_ui "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/messages/AssistantTextMessage.tsx"
click node_permissions_ui "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/permissions/PermissionRequest.tsx"
click node_prompt_ui "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/PromptInput.tsx"
click node_support_ui "https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/Onboarding.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_mjs,node_cli_entry,node_mcp_entry,node_commands,node_repl,node_resume_screen,node_log_screen,node_doctor_screen toneBlue
class node_tool_registry,node_bash_tool,node_file_tools,node_search_tools,node_mcp_tool,node_memory_tools,node_notebook_tools,node_special_tools toneAmber
class node_claude_service,node_oauth,node_mcp_client,node_notifier,node_statsig,node_sentry,node_auto_updater toneMint
class node_message_model,node_history,node_query,node_permissions,node_config,node_state_store toneRose
class node_messages_ui,node_permissions_ui,node_prompt_ui,node_support_ui toneIndigo
```

## Components

### Runtime

Terminal entrypoints, screens, commands, and conversation flow.

- [CLI bootstrap](https://github.com/leeyeel/claude-code-sourcemap/blob/main/cli.mjs): entrypoint · Process start for the terminal app. · `cli.mjs`
- [CLI app](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/entrypoints/cli.tsx): entrypoint · Boots the interactive terminal experience. · `src/entrypoints/cli.tsx`
- [MCP entry](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/entrypoints/mcp.ts): entrypoint · Exposes the MCP-side process boundary. · `src/entrypoints/mcp.ts`
- [Command router](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/commands.ts): control plane · Top-level slash commands and workflow actions. · `src/commands.ts`
- [REPL screen](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/REPL.tsx): session UI · Main interactive terminal session surface. · `src/screens/REPL.tsx`
- [Resume screen](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/ResumeConversation.tsx): session UI · Restores prior conversations and session state. · `src/screens/ResumeConversation.tsx`
- [Log screen](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/LogList.tsx): session UI · Lists and selects saved logs or sessions. · `src/screens/LogList.tsx`
- [Doctor screen](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/screens/Doctor.tsx): diagnostic UI · Runs health checks and setup diagnostics. · `src/screens/Doctor.tsx`

### Tools

Agent actions and external execution surfaces.

- [Tools](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools.ts): tool hub · Shared tool protocol and tool set wiring. · `src/tools.ts`
- [Bash](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/BashTool/BashTool.tsx): shell tool · Runs shell commands in the local terminal environment. · `src/tools/BashTool/BashTool.tsx`
- [File tools](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/FileReadTool/FileReadTool.tsx): filesystem tools · Read, write, and edit files in the workspace. · `src/tools/FileReadTool/FileReadTool.tsx`
- [Search tools](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/GlobTool/GlobTool.tsx): code search · Glob, grep, and directory listing actions. · `src/tools/GlobTool/GlobTool.tsx`
- [MCP tool](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/MCPTool/MCPTool.tsx): external tool · Bridges the agent to MCP-provided capabilities. · `src/tools/MCPTool/MCPTool.tsx`
- [Memory tools](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/MemoryReadTool/MemoryReadTool.tsx): stateful tools · Reads and writes persistent memory context. · `src/tools/MemoryReadTool/MemoryReadTool.tsx`
- [Notebook tools](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/NotebookReadTool/NotebookReadTool.tsx): document tools · Reads and edits notebook-style artifacts. · `src/tools/NotebookReadTool/NotebookReadTool.tsx`
- [Agent extras](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/tools/ThinkTool/ThinkTool.tsx): assistant tools · Thinking, architecting, stickers, and agent helpers. · `src/tools/ThinkTool/ThinkTool.tsx`

### Services

Model, auth, telemetry, updates, and external integrations.

- [Claude API](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/claude.ts): model service · Primary boundary to Anthropic streaming responses. · `src/services/claude.ts`
- [Auth](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/oauth.ts): auth service · OAuth and key verification flows. · `src/services/oauth.ts`
- [MCP client](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/mcpClient.ts): integration · Discovers and talks to external MCP servers. · `src/services/mcpClient.ts`
- [Notifier](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/notifier.ts): os integration · Desktop notifications and alerts. · `src/services/notifier.ts`
- [Statsig](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/statsig.ts): feature flags · Experiment and feature state management. · `src/services/statsig.ts`
- [Sentry](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/services/sentry.ts): telemetry · Error reporting and monitoring. · `src/services/sentry.ts`
- [Auto-update](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/utils/autoUpdater.ts): maintenance · Update checks and upgrade prompts. · `src/utils/autoUpdater.ts`

### State

Conversation history, config, persistence, and permissions.

- [Messages](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/messages.ts): conversation model · Structured user, assistant, tool, and command events. · `src/messages.ts`
- [History](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/history.ts): session store · Conversation history and replayable session records. · `src/history.ts`
- [Query flow](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/query.ts): session state · Tracks current request and interaction state. · `src/query.ts`
- [Permissions](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/permissions.ts): trust gate · Approval and trust logic for tool execution. · `src/permissions.ts`
- [Config](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/utils/config.ts): local settings · User configuration and persisted app settings. · `src/utils/config.ts`
- [State store](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/utils/state.ts): persistence · Persistent runtime and user state helpers. · `src/utils/state.ts`

### UI

Terminal rendering, dialogs, message views, and prompts.

- [Messages UI](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/messages/AssistantTextMessage.tsx): rendering · Renders assistant, user, and tool messages. · `src/components/messages/AssistantTextMessage.tsx`
- [Permission UI](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/permissions/PermissionRequest.tsx): dialogs · Approval prompts and trust dialogs for risky actions. · `src/components/permissions/PermissionRequest.tsx`
- [Prompt input](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/PromptInput.tsx): input UI · Terminal prompt, selectors, and text input components. · `src/components/PromptInput.tsx`
- [Support UI](https://github.com/leeyeel/claude-code-sourcemap/blob/main/src/components/Onboarding.tsx): presentation · Onboarding, config, cost, logs, errors, and updater screens. · `src/components/Onboarding.tsx`

## Connections

- CLI bootstrap → CLI app: starts · Node/launcher hands off to the TypeScript CLI app.
- CLI app → Command router: routes · Interactive commands are dispatched from the terminal app.
- CLI app → REPL screen: opens · Starts the main REPL-style session surface.
- Command router → Resume screen: navigates · Resume-related commands open the resume workflow.
- Command router → Log screen: navigates · Log and session listing commands open the log browser.
- Command router → Doctor screen: navigates · Doctor command opens diagnostics.
- REPL screen → Messages: renders · Session UI is driven by structured messages.
- REPL screen → Query flow: updates · Tracks the current prompt and interaction state.
- REPL screen → Claude API: streams · Sends prompts and receives model output.
- Claude API → Tools: requests tools · Model output can trigger tool execution.
- Tools → Bash: includes · Shell execution is a primary tool.
- Tools → File tools: includes · File read/write/edit capabilities.
- Tools → Search tools: includes · Search and listing helpers.
- Tools → MCP tool: includes · External MCP tool bridge.
- Tools → Memory tools: includes · Persistent memory access.
- Tools → Notebook tools: includes · Notebook-specific editing tools.
- Tools → Agent extras: includes · Thinking and agent helper tools.
- Tools → Permissions: gated by · Sensitive actions require approval.
- Permissions → Permission UI: prompts · Shows approval dialogs and trust requests.
- Permissions → Bash: guards · Shell actions can require explicit consent.
- Permissions → File tools: guards · File edits and writes can require approval.
- Permissions → MCP client: guards · External MCP use is mediated by approval.
- History → Messages: stores · Persists conversation and tool event history.
- State store → Config: persists · Holds runtime and user settings.
- State store → History: persists · Supports resume and session continuity.
- Auth → Config: writes · Auth state and credentials flow into local config.
- REPL screen → Messages UI: renders · Conversation content is shown through message components.
- REPL screen → Prompt input: accepts input · Terminal text entry and command selection happen here.
- REPL screen → Support UI: shows · Onboarding, config, cost, and other support views.
- Claude API → Notifier: alerts · Timeouts and completion states can notify the user.
- Claude API → Statsig: tracks · Feature and experiment state influences runtime behavior.
- Claude API → Sentry: reports · Errors and telemetry flow to monitoring.
- CLI app → Auto-update: checks · Startup can trigger update checks.
- MCP entry → MCP client: hosts · Separate process boundary for MCP participation.
- Command router → Auth: authenticates · Login and key verification commands use auth services.
- Command router → Config: modifies · Config-related commands update local settings.
