# chlzaoyaowan/deepseek-harness architecture

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

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

## Overview

DeepSeek Harness is a plugin-oriented agent harness with a Web UI and CLI entry point. The user-facing path is launching the web app, assembling its plugin-provided interface, and working with sessions and conversations over the client API. The tree also shows major capabilities for workspaces, model and permission settings, attachments, and session export/search. Sampled excerpts confirm parts of client assembly, session/workspace management, and integrations; links between unsampled subsystems are omitted where their wiring cannot be established.

Main entry points: [`packages/client/web/src/app.tsx`](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/web/src/app.tsx) (Web shell), [`apps/cli/src/bin.ts`](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/apps/cli/src/bin.ts) (CLI), [`apps/web/src/main.ts`](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/apps/web/src/main.ts) (Web bootstrap), [`packages/bundle/web-app/src/startup.ts`](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts) (Web bundle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_cli["CLI<br/>[bin.ts]"]
  node_web_entry["Web bootstrap<br/>[main.ts]"]
  node_web_shell["Web shell<br/>[app.tsx]"]
  node_web_bundle["Web bundle<br/>[startup.ts]"]
end

subgraph group_client["Client runtime"]
  node_plugin_modules["Plugin modules<br/>[system.ts]"]
  node_client_runtime["Client runtime<br/>[index.ts]"]
  node_session_manager["Session manager<br/>[manager.ts]"]
  node_workspace_manager["Workspace manager<br/>[manager.ts]"]
  node_connection["Client connection<br/>[connection.ts]"]
end

subgraph group_features["User capabilities"]
  node_conversation_ui["Conversation UI<br/>[index.ts]"]
  node_model_settings["Model settings<br/>[index.ts]"]
  node_permission_presets["Permission presets<br/>[index.ts]"]
  node_attachments["Attachments<br/>[index.ts]"]
  node_jobs["Jobs UI<br/>[index.ts]"]
  node_session_export["Session export<br/>[controller.ts]"]
  node_session_search["Session search<br/>[query.ts]"]
  node_feedback["Message feedback<br/>[controller.ts]"]
end

subgraph group_integration["API and integrations"]
  node_api_gateway["API gateway<br/>[index.ts]"]
  node_api_remotes["API remotes<br/>[index.ts]"]
  node_sdk_server["SDK JSON-RPC<br/>[server.ts]"]
end

node_user(("User"))

node_user -->|"launches"| node_cli
node_cli -->|"starts web"| node_web_bundle
node_user -->|"opens UI"| node_web_entry
node_web_entry -->|"boots shell"| node_web_shell
node_web_shell -->|"reads sessions"| node_client_runtime
node_web_shell -->|"renders slots"| node_plugin_modules
node_web_bundle -->|"assembles plugins"| node_plugin_modules
node_session_manager -->|"requests session data"| node_api_remotes
node_workspace_manager -->|"requests workspace data"| node_api_remotes
node_connection -->|"transports requests"| node_api_gateway
node_session_export -->|"uses snapshot store"| node_client_runtime
node_sdk_server -.->|"accepts SDK calls"| node_user

click node_cli "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/apps/cli/src/bin.ts"
click node_web_entry "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/apps/web/src/main.ts"
click node_web_shell "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/web/src/app.tsx"
click node_web_bundle "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts"
click node_plugin_modules "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/modules/src/client/system.ts"
click node_client_runtime "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/runtime/src/client/index.ts"
click node_session_manager "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/runtime/src/client/sessions/manager.ts"
click node_workspace_manager "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/runtime/src/client/workspaces/manager.ts"
click node_connection "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/connection/src/client/connection.ts"
click node_conversation_ui "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/index.ts"
click node_model_settings "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-settings-models/src/client/index.ts"
click node_permission_presets "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-permission-presets/src/client/index.ts"
click node_attachments "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-attachment/src/index.ts"
click node_jobs "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-jobs/src/client/index.ts"
click node_session_export "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/session-query/session-log-export/src/client/controller.ts"
click node_session_search "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/session-query/session-query-sqlite/src/query.ts"
click node_api_gateway "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/api/gateway/src/index.ts"
click node_api_remotes "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/api/remotes/src/index.ts"
click node_sdk_server "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/sdk/server/src/server.ts"
click node_feedback "https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-message-feedback/src/client/controller.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_web_bundle,node_user toneBlue
class node_plugin_modules,node_client_runtime,node_session_manager,node_workspace_manager,node_connection toneAmber
class node_conversation_ui,node_model_settings,node_permission_presets,node_attachments,node_jobs,node_session_export,node_session_search,node_feedback toneMint
class node_api_gateway,node_api_remotes,node_sdk_server toneRose
```

## Components

### Application entry

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

### Client runtime

- [Plugin modules](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/modules/src/client/system.ts): `packages/client/modules/src/client/system.ts`
- [Client runtime](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/runtime/src/client/index.ts): `packages/client/runtime/src/client/index.ts`
- [Session manager](https://github.com/chlzaoyaowan/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/chlzaoyaowan/deepseek-harness/blob/master/packages/client/runtime/src/client/workspaces/manager.ts): `packages/client/runtime/src/client/workspaces/manager.ts`
- [Client connection](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/connection/src/client/connection.ts): `packages/client/connection/src/client/connection.ts`

### User capabilities

- [Conversation UI](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/index.ts): `packages/client/ui-conversation/src/client/index.ts`
- [Model settings](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-settings-models/src/client/index.ts): `packages/client/ui-settings-models/src/client/index.ts`
- [Permission presets](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-permission-presets/src/client/index.ts): `packages/client/ui-permission-presets/src/client/index.ts`
- [Attachments](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-attachment/src/index.ts): `packages/client/ui-attachment/src/index.ts`
- [Jobs UI](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-jobs/src/client/index.ts): `packages/client/ui-jobs/src/client/index.ts`
- [Session export](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/session-query/session-log-export/src/client/controller.ts): `packages/session-query/session-log-export/src/client/controller.ts`
- [Session search](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/session-query/session-query-sqlite/src/query.ts): `packages/session-query/session-query-sqlite/src/query.ts`
- [Message feedback](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/client/ui-message-feedback/src/client/controller.ts): `packages/client/ui-message-feedback/src/client/controller.ts`

### API and integrations

- [API gateway](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/api/gateway/src/index.ts): `packages/api/gateway/src/index.ts`
- [API remotes](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/api/remotes/src/index.ts): `packages/api/remotes/src/index.ts`
- [SDK JSON-RPC](https://github.com/chlzaoyaowan/deepseek-harness/blob/master/packages/sdk/server/src/server.ts): `packages/sdk/server/src/server.ts`

### Other components

- **User**

## Connections

- User → CLI: launches
- CLI → Web bundle: starts web
- User → Web bootstrap: opens UI
- Web bootstrap → Web shell: boots shell
- Web shell → Client runtime: reads sessions
- Web shell → Plugin modules: renders slots
- Web bundle → Plugin modules: assembles plugins
- Session manager → API remotes: requests session data
- Workspace manager → API remotes: requests workspace data
- Client connection → API gateway: transports requests
- Session export → Client runtime: uses snapshot store
- SDK JSON-RPC → User: accepts SDK calls
