- src/core: shared types + config loading
- src/provider: DeepSeek API adapter
- src/agent: agent orchestration + streaming loop
- src/tool: built-in local tools (Read/Edit/Bash/etc.)
- src/tui: terminal UI (Ink), command picker, status panels
src/index.tsxloads config and starts the Ink app.App.tsxmanages runtime state (model, agent, thinking).- On submit,
agentManager.createAgent()creates anAgent. Agent.run()streams events:- text deltas
- thinking deltas
- tool call start/result
- finish/error
- App consumes events and updates TUI.
ProviderConfigis built from mutable runtime state.createModel(config)creates an AI SDKLanguageModelvia DeepSeek's OpenAI-compatible endpoint.- The adapter handles authentication and request formatting.
This keeps provider-specific code out of the agent and UI.
- Config parser loads
mcpServersfrom.deepseek-code.json. - App tracks MCP server enabled/disabled state.
/mcpcommands expose status and toggling.
Protocol-level MCP tool execution is planned, not fully wired yet.
- Provider is adapter-driven (currently DeepSeek only).
- UI commands are centralized in
App.tsx. - Tooling layer is independent from provider layer.
- MCP can be added as a new integration layer without touching provider adapters.