# rickingithub/deepseek-harness architecture

> Architecture diagram of the GitHub repository rickingithub/deepseek-harness, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rickingithub/deepseek-harness
- Repository: https://github.com/rickingithub/deepseek-harness

## Overview

DeepSeek Harness is a plugin-oriented agent harness with a local Web UI and CLI launch paths. Its main user workflow is to enter a prompt in the conversation UI, communicate with a host through the client connection/runtime, and view session events and assistant output. The tree also shows distinct workspace, attachment, settings, session search/export, plugin, and SDK/ACP capabilities. The sampled sources establish some client-side ownership and API behavior, but not the host’s complete agent or persistence pipeline; uncertain links are therefore omitted.

Main entry points: [`packages/client/connection/src/client/api.ts`](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/connection/src/client/api.ts) (API client), [`packages/bundle/web-app/src/startup.ts`](https://github.com/rickingithub/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts) (Web shell), [`packages/client/ui-renderer/src/client/app.tsx`](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-renderer/src/client/app.tsx) (UI renderer), [`packages/client/ui-conversation/src/client/service.ts`](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/service.ts) (Conversation UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Launch and shell"]
  node_cli["CLI entry<br/>[bin.ts]"]
  node_web_entry["Web entry<br/>[main.ts]"]
  node_web_shell["Web shell<br/>[startup.ts]"]
  node_renderer["UI renderer<br/>[app.tsx]"]
end

subgraph group_client["Client runtime"]
  node_connection["Client connection<br/>[connection.ts]"]
  node_api_client["API client<br/>[api.ts]"]
  node_session_manager["Session manager<br/>[manager.ts]"]
  node_workspace_manager["Workspace manager<br/>[manager.ts]"]
  node_plugin_system["Plugin modules<br/>[system.ts]"]
end

subgraph group_conversation["Conversation experience"]
  node_conversation_ui["Conversation UI<br/>[service.ts]"]
  node_input_trigger["Input triggers<br/>[controller.ts]"]
  node_attachments["Attachments UI"]
end

subgraph group_capabilities["Session capabilities"]
  node_attachment_service["Attachment handling<br/>[index.ts]"]
  node_settings["Settings UI"]
  node_feedback["Message feedback<br/>[controller.ts]"]
  node_session_search["Session search<br/>[query.ts]"]
  node_session_export["Session export<br/>[controller.ts]"]
end

subgraph group_interfaces["External interfaces"]
  node_sdk_server["SDK JSON-RPC<br/>[server.ts]"]
  node_acp["ACP interface<br/>[index.ts]"]
end

node_user(("User"))
node_host_api["Host API"]

node_user -->|"launches"| node_cli
node_cli -->|"starts web"| node_web_shell
node_user -->|"opens"| node_web_entry
node_web_entry -->|"runs shell"| node_web_shell
node_web_shell -->|"hands off"| node_renderer
node_renderer -->|"uses"| node_connection
node_connection -->|"provides transport"| node_api_client
node_api_client -->|"sends requests"| node_host_api
node_host_api -->|"returns frames"| node_api_client
node_session_manager -->|"calls session API"| node_api_client
node_workspace_manager -->|"calls workspace API"| node_api_client
node_conversation_ui -->|"uses"| node_input_trigger
node_conversation_ui -->|"presents"| node_attachments
node_attachments -->|"uses"| node_attachment_service
node_settings -->|"reads credentials"| node_api_client
node_feedback -->|"mutates feedback"| node_host_api
node_session_export -->|"fetches export"| node_host_api
node_session_search -.->|"queries sessions"| node_host_api
node_plugin_system -->|"loads modules"| node_renderer
node_sdk_server -.->|"exposes RPC"| node_host_api
node_acp -.->|"provides protocol"| node_host_api

click node_cli "https://github.com/rickingithub/deepseek-harness/blob/master/apps/cli/src/bin.ts"
click node_web_entry "https://github.com/rickingithub/deepseek-harness/blob/master/apps/web/src/main.ts"
click node_web_shell "https://github.com/rickingithub/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts"
click node_renderer "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-renderer/src/client/app.tsx"
click node_connection "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/connection/src/client/connection.ts"
click node_api_client "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/connection/src/client/api.ts"
click node_session_manager "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/runtime/src/client/sessions/manager.ts"
click node_workspace_manager "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/runtime/src/client/workspaces/manager.ts"
click node_conversation_ui "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/service.ts"
click node_input_trigger "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-input-trigger/src/client/controller.ts"
click node_attachments "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-attachment/src/client/ComposerAttachments.tsx"
click node_attachment_service "https://github.com/rickingithub/deepseek-harness/blob/master/packages/attachment/attachment-local/src/index.ts"
click node_settings "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-settings-plugins/src/client/web-search-card-controller.ts"
click node_feedback "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-message-feedback/src/client/controller.ts"
click node_session_search "https://github.com/rickingithub/deepseek-harness/blob/master/packages/session-query/session-query-sqlite/src/query.ts"
click node_session_export "https://github.com/rickingithub/deepseek-harness/blob/master/packages/session-query/session-log-export/src/client/controller.ts"
click node_plugin_system "https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/modules/src/client/system.ts"
click node_sdk_server "https://github.com/rickingithub/deepseek-harness/blob/master/packages/sdk/server/src/server.ts"
click node_acp "https://github.com/rickingithub/deepseek-harness/blob/master/packages/acp/acp/src/index.ts"

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,node_web_entry,node_web_shell,node_renderer,node_user toneBlue
class node_connection,node_api_client,node_session_manager,node_workspace_manager,node_plugin_system toneAmber
class node_conversation_ui,node_input_trigger,node_attachments,node_host_api toneMint
class node_attachment_service,node_settings,node_feedback,node_session_search,node_session_export toneRose
class node_sdk_server,node_acp toneIndigo
```

## Components

### Launch and shell

- [CLI entry](https://github.com/rickingithub/deepseek-harness/blob/master/apps/cli/src/bin.ts): `apps/cli/src/bin.ts`
- [Web entry](https://github.com/rickingithub/deepseek-harness/blob/master/apps/web/src/main.ts): `apps/web/src/main.ts`
- [Web shell](https://github.com/rickingithub/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts): `packages/bundle/web-app/src/startup.ts`
- [UI renderer](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-renderer/src/client/app.tsx): `packages/client/ui-renderer/src/client/app.tsx`

### Client runtime

- [Client connection](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/connection/src/client/connection.ts): `packages/client/connection/src/client/connection.ts`
- [API client](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/connection/src/client/api.ts): `packages/client/connection/src/client/api.ts`
- [Session manager](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/runtime/src/client/sessions/manager.ts): `packages/client/runtime/src/client/sessions/manager.ts`
- [Workspace manager](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/runtime/src/client/workspaces/manager.ts): `packages/client/runtime/src/client/workspaces/manager.ts`
- [Plugin modules](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/modules/src/client/system.ts): `packages/client/modules/src/client/system.ts`

### Conversation experience

- [Conversation UI](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/service.ts): `packages/client/ui-conversation/src/client/service.ts`
- [Input triggers](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-input-trigger/src/client/controller.ts): `packages/client/ui-input-trigger/src/client/controller.ts`
- [Attachments UI](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-attachment/src/client/ComposerAttachments.tsx): `packages/client/ui-attachment/src/client/ComposerAttachments.tsx`

### Session capabilities

- [Attachment handling](https://github.com/rickingithub/deepseek-harness/blob/master/packages/attachment/attachment-local/src/index.ts): `packages/attachment/attachment-local/src/index.ts`
- [Settings UI](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-settings-plugins/src/client/web-search-card-controller.ts): `packages/client/ui-settings-plugins/src/client/web-search-card-controller.ts`
- [Message feedback](https://github.com/rickingithub/deepseek-harness/blob/master/packages/client/ui-message-feedback/src/client/controller.ts): `packages/client/ui-message-feedback/src/client/controller.ts`
- [Session search](https://github.com/rickingithub/deepseek-harness/blob/master/packages/session-query/session-query-sqlite/src/query.ts): `packages/session-query/session-query-sqlite/src/query.ts`
- [Session export](https://github.com/rickingithub/deepseek-harness/blob/master/packages/session-query/session-log-export/src/client/controller.ts): `packages/session-query/session-log-export/src/client/controller.ts`

### External interfaces

- [SDK JSON-RPC](https://github.com/rickingithub/deepseek-harness/blob/master/packages/sdk/server/src/server.ts): `packages/sdk/server/src/server.ts`
- [ACP interface](https://github.com/rickingithub/deepseek-harness/blob/master/packages/acp/acp/src/index.ts): `packages/acp/acp/src/index.ts`

### Other components

- **User**
- **Host API**

## Connections

- User → CLI entry: launches
- CLI entry → Web shell: starts web
- User → Web entry: opens
- Web entry → Web shell: runs shell
- Web shell → UI renderer: hands off
- UI renderer → Client connection: uses
- Client connection → API client: provides transport
- API client → Host API: sends requests
- Host API → API client: returns frames
- Session manager → API client: calls session API
- Workspace manager → API client: calls workspace API
- Conversation UI → Input triggers: uses
- Conversation UI → Attachments UI: presents
- Attachments UI → Attachment handling: uses
- Settings UI → API client: reads credentials
- Message feedback → Host API: mutates feedback
- Session export → Host API: fetches export
- Session search → Host API: queries sessions
- Plugin modules → UI renderer: loads modules
- SDK JSON-RPC → Host API: exposes RPC
- ACP interface → Host API: provides protocol
