# lacania/deepseek-harness architecture

> Architecture diagram of the GitHub repository lacania/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/lacania/deepseek-harness
- Repository: https://github.com/lacania/deepseek-harness

## Overview

DeepSeek Harness is a plugin-oriented agent harness whose documented user entry point is a local Web UI. The visible browser bootstrap starts the app shell, which assembles a slot-based interface; client runtime modules manage sessions and workspaces, while conversation UI provides chat, submission, and related controls. API remotes and the connection client represent the wire boundary. The tree also shows search/export and settings capabilities. Several runtime connections are inferred from module responsibilities, so edges are limited to relationships supported by the sampled code or README.

Main entry points: [`packages/client/ui-conversation/src/client/service.ts`](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/service.ts) (Conversation UI), [`packages/client/web/src/app.tsx`](https://github.com/lacania/deepseek-harness/blob/master/packages/client/web/src/app.tsx) (Web assembly), [`packages/client/runtime/src/client/sessions/manager.ts`](https://github.com/lacania/deepseek-harness/blob/master/packages/client/runtime/src/client/sessions/manager.ts) (Session manager), [`apps/web/src/main.ts`](https://github.com/lacania/deepseek-harness/blob/master/apps/web/src/main.ts) (Web bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_webmain["Web bootstrap<br/>[main.ts]"]
  node_webapp["Web assembly<br/>[app.tsx]"]
  node_webbundle["Web startup<br/>[startup.ts]"]
  node_layout["App layout<br/>[AppFrame.tsx]"]
end

subgraph group_runtime["Client runtime"]
  node_sessions["Session manager<br/>[manager.ts]"]
  node_workspaces["Workspace manager<br/>[manager.ts]"]
  node_runtimeapi["Client runtime API<br/>[index.ts]"]
end

subgraph group_conversation["Conversation UI"]
  node_conversation["Conversation UI<br/>[service.ts]"]
  node_chatview["Chat rendering<br/>[ChatView.tsx]"]
  node_input["Input triggers<br/>[controller.ts]"]
  node_attachments["Attachment UI<br/>[AttachmentRail.tsx]"]
end

subgraph group_services["Client services"]
  node_gateway["API gateway<br/>[index.ts]"]
  node_remotes["API remotes<br/>[index.ts]"]
  node_connection["Client connection<br/>[connection.ts]"]
  node_settings["Model settings<br/>[store.ts]"]
  node_pluginmodules["Client modules<br/>[system.ts]"]
  node_search["Session search<br/>[query.ts]"]
  node_export["Session export<br/>[controller.ts]"]
  node_feedback["Message feedback<br/>[controller.ts]"]
  node_sdk["SDK server<br/>[server.ts]"]
end

node_user(("Web user"))
node_host(("Harness host"))

node_user -->|"opens UI"| node_webmain
node_webmain -->|"starts app"| node_webbundle
node_webbundle -->|"assembles UI"| node_webapp
node_webapp -->|"renders root slot"| node_layout
node_webapp -->|"reads session list"| node_sessions
node_sessions -->|"uses remote API"| node_remotes
node_workspaces -->|"uses wire client"| node_remotes
node_connection -->|"connects API"| node_gateway
node_conversation -->|"session views"| node_sessions
node_conversation -->|"renders chat"| node_chatview
node_conversation -->|"handles triggers"| node_input
node_conversation -->|"shows attachments"| node_attachments
node_settings -->|"settings requests"| node_connection
node_export -->|"fetches export"| node_host
node_feedback -->|"mutates feedback"| node_host
node_sdk -->|"uses agent context"| node_host
node_pluginmodules -.->|"extends client"| node_webapp

click node_webmain "https://github.com/lacania/deepseek-harness/blob/master/apps/web/src/main.ts"
click node_webapp "https://github.com/lacania/deepseek-harness/blob/master/packages/client/web/src/app.tsx"
click node_webbundle "https://github.com/lacania/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts"
click node_layout "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-layout/src/client/AppFrame.tsx"
click node_sessions "https://github.com/lacania/deepseek-harness/blob/master/packages/client/runtime/src/client/sessions/manager.ts"
click node_workspaces "https://github.com/lacania/deepseek-harness/blob/master/packages/client/runtime/src/client/workspaces/manager.ts"
click node_runtimeapi "https://github.com/lacania/deepseek-harness/blob/master/packages/client/runtime/src/client/index.ts"
click node_conversation "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/service.ts"
click node_chatview "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/chat/ChatView.tsx"
click node_input "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-input-trigger/src/client/controller.ts"
click node_attachments "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-attachment/src/AttachmentRail.tsx"
click node_gateway "https://github.com/lacania/deepseek-harness/blob/master/packages/api/gateway/src/index.ts"
click node_remotes "https://github.com/lacania/deepseek-harness/blob/master/packages/api/remotes/src/index.ts"
click node_connection "https://github.com/lacania/deepseek-harness/blob/master/packages/client/connection/src/client/connection.ts"
click node_settings "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-settings-models/src/client/store.ts"
click node_pluginmodules "https://github.com/lacania/deepseek-harness/blob/master/packages/client/modules/src/client/system.ts"
click node_search "https://github.com/lacania/deepseek-harness/blob/master/packages/session-query/session-query-sqlite/src/query.ts"
click node_export "https://github.com/lacania/deepseek-harness/blob/master/packages/session-query/session-log-export/src/client/controller.ts"
click node_feedback "https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-message-feedback/src/client/controller.ts"
click node_sdk "https://github.com/lacania/deepseek-harness/blob/master/packages/sdk/server/src/server.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_webmain,node_webapp,node_webbundle,node_layout,node_user toneBlue
class node_sessions,node_workspaces,node_runtimeapi toneAmber
class node_conversation,node_chatview,node_input,node_attachments toneMint
class node_gateway,node_remotes,node_connection,node_settings,node_pluginmodules,node_search,node_export,node_feedback,node_sdk toneRose
class node_host toneIndigo
```

## Components

### App entry

- [Web bootstrap](https://github.com/lacania/deepseek-harness/blob/master/apps/web/src/main.ts): `apps/web/src/main.ts`
- [Web assembly](https://github.com/lacania/deepseek-harness/blob/master/packages/client/web/src/app.tsx): `packages/client/web/src/app.tsx`
- [Web startup](https://github.com/lacania/deepseek-harness/blob/master/packages/bundle/web-app/src/startup.ts): `packages/bundle/web-app/src/startup.ts`
- [App layout](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-layout/src/client/AppFrame.tsx): `packages/client/ui-layout/src/client/AppFrame.tsx`

### Client runtime

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

### Conversation UI

- [Conversation UI](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/service.ts): `packages/client/ui-conversation/src/client/service.ts`
- [Chat rendering](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-conversation/src/client/chat/ChatView.tsx): `packages/client/ui-conversation/src/client/chat/ChatView.tsx`
- [Input triggers](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-input-trigger/src/client/controller.ts): `packages/client/ui-input-trigger/src/client/controller.ts`
- [Attachment UI](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-attachment/src/AttachmentRail.tsx): `packages/client/ui-attachment/src/AttachmentRail.tsx`

### Client services

- [API gateway](https://github.com/lacania/deepseek-harness/blob/master/packages/api/gateway/src/index.ts): `packages/api/gateway/src/index.ts`
- [API remotes](https://github.com/lacania/deepseek-harness/blob/master/packages/api/remotes/src/index.ts): `packages/api/remotes/src/index.ts`
- [Client connection](https://github.com/lacania/deepseek-harness/blob/master/packages/client/connection/src/client/connection.ts): `packages/client/connection/src/client/connection.ts`
- [Model settings](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-settings-models/src/client/store.ts): `packages/client/ui-settings-models/src/client/store.ts`
- [Client modules](https://github.com/lacania/deepseek-harness/blob/master/packages/client/modules/src/client/system.ts): `packages/client/modules/src/client/system.ts`
- [Session search](https://github.com/lacania/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/lacania/deepseek-harness/blob/master/packages/session-query/session-log-export/src/client/controller.ts): `packages/session-query/session-log-export/src/client/controller.ts`
- [Message feedback](https://github.com/lacania/deepseek-harness/blob/master/packages/client/ui-message-feedback/src/client/controller.ts): `packages/client/ui-message-feedback/src/client/controller.ts`
- [SDK server](https://github.com/lacania/deepseek-harness/blob/master/packages/sdk/server/src/server.ts): `packages/sdk/server/src/server.ts`

### Other components

- **Web user**
- **Harness host**

## Connections

- Web user → Web bootstrap: opens UI
- Web bootstrap → Web startup: starts app
- Web startup → Web assembly: assembles UI
- Web assembly → App layout: renders root slot
- Web assembly → Session manager: reads session list
- Session manager → API remotes: uses remote API
- Workspace manager → API remotes: uses wire client
- Client connection → API gateway: connects API
- Conversation UI → Session manager: session views
- Conversation UI → Chat rendering: renders chat
- Conversation UI → Input triggers: handles triggers
- Conversation UI → Attachment UI: shows attachments
- Model settings → Client connection: settings requests
- Session export → Harness host: fetches export
- Message feedback → Harness host: mutates feedback
- SDK server → Harness host: uses agent context
- Client modules → Web assembly: extends client
