# ccch1mneyyy/dsh-go architecture

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

- Interactive diagram: https://gitdiagram.com/ccch1mneyyy/dsh-go
- Repository: https://github.com/ccch1mneyyy/dsh-go

## Overview

DSH Go is an Android client for DeepSeek Harness: users either run an engine on the phone or connect to a remote host, then chat through the app. The main workflow also includes optional phone-control tasks, which can inspect and act on the device under granted permissions. Sharing, plugin interfaces, and the desktop pet are distinct supporting capabilities. The graph uses README-documented flows and the shown Android registration/service references; several feature implementations were not sampled, so their internal links are omitted.

Main entry points: [`app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/MainActivity.kt`](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/MainActivity.kt) (App Interface), [`app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt) (Phone Task Control), [`app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt`](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt) (Runtime Service), [`app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/PhoneA11yService.kt`](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/PhoneA11yService.kt) (Accessibility Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Android App"]
  node_app_ui["App Interface<br/>[MainActivity.kt]"]
end

subgraph group_engine["Engine Hosts"]
  node_runtime_service["Runtime Service<br/>[DshService.kt]"]
  node_runtime_control["Runtime Control"]
  node_remote_host["Remote Host"]
  node_model_provider["Model Provider"]
end

subgraph group_phone["Phone Control"]
  node_phone_control["Phone Task Control<br/>[PhoneControl.kt]"]
  node_phone_tasks["Task Sessions"]
  node_phone_tools["Phone Tools"]
  node_a11y_service["Accessibility Service"]
  node_screen_driver["Screen Driver"]
  node_background_control["Background Control"]
  node_skills["Task Skills"]
end

subgraph group_extensions["App Features"]
  node_sharing["Share and Replay"]
  node_plugin_ui["Plugin Interfaces"]
  node_pet["Desktop Pet"]
  node_localization["Localization<br/>[AppStrings.kt]"]
end

node_user(("User"))

node_user -->|"uses"| node_app_ui
node_app_ui -->|"starts local engine"| node_runtime_service
node_app_ui -->|"connects remotely"| node_remote_host
node_runtime_service -->|"uses"| node_runtime_control
node_runtime_service -->|"calls"| node_phone_control
node_runtime_service -->|"sends model requests"| node_model_provider
node_remote_host -->|"sends model requests"| node_model_provider
node_app_ui -->|"requests phone tasks"| node_phone_control
node_phone_control -->|"manages sessions"| node_phone_tasks
node_phone_control -.->|"offers tools"| node_phone_tools
node_phone_control -.->|"uses screen access"| node_a11y_service
node_a11y_service -->|"owns driver"| node_screen_driver
node_phone_control -->|"uses background control"| node_background_control
node_phone_control -.->|"supports skills"| node_skills
node_app_ui -->|"shares conversations"| node_sharing
node_app_ui -->|"shows plugin tools"| node_plugin_ui
node_app_ui -->|"shows desktop pet"| node_pet
node_pet -->|"opens app"| node_app_ui
node_app_ui -->|"selects language"| node_localization

click node_app_ui "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/MainActivity.kt"
click node_runtime_service "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt"
click node_runtime_control "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/RuntimeController.kt"
click node_phone_control "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt"
click node_phone_tasks "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneTaskSessions.kt"
click node_phone_tools "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneToolCatalog.kt"
click node_a11y_service "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/PhoneA11yService.kt"
click node_screen_driver "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/MainScreenDriver.kt"
click node_background_control "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/background/BackgroundControl.kt"
click node_skills "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/skills/PhoneSkillOutcomes.kt"
click node_sharing "https://github.com/ccch1mneyyy/dsh-go/tree/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app"
click node_plugin_ui "https://github.com/ccch1mneyyy/dsh-go/tree/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app"
click node_pet "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/pet/PetOverlayService.kt"
click node_localization "https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/i18n/AppStrings.kt"

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_app_ui,node_user toneBlue
class node_runtime_service,node_runtime_control,node_remote_host,node_model_provider toneAmber
class node_phone_control,node_phone_tasks,node_phone_tools,node_a11y_service,node_screen_driver,node_background_control,node_skills toneMint
class node_sharing,node_plugin_ui,node_pet,node_localization toneRose
```

## Components

### Android App

- [App Interface](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/MainActivity.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/MainActivity.kt`

### Engine Hosts

- [Runtime Service](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt`
- [Runtime Control](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/RuntimeController.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/RuntimeController.kt`
- **Remote Host**
- **Model Provider**

### Phone Control

- [Phone Task Control](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`
- [Task Sessions](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneTaskSessions.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneTaskSessions.kt`
- [Phone Tools](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneToolCatalog.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneToolCatalog.kt`
- [Accessibility Service](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/PhoneA11yService.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/PhoneA11yService.kt`
- [Screen Driver](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/MainScreenDriver.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/MainScreenDriver.kt`
- [Background Control](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/background/BackgroundControl.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/background/BackgroundControl.kt`
- [Task Skills](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/skills/PhoneSkillOutcomes.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/skills/PhoneSkillOutcomes.kt`

### App Features

- [Share and Replay](https://github.com/ccch1mneyyy/dsh-go/tree/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app`
- [Plugin Interfaces](https://github.com/ccch1mneyyy/dsh-go/tree/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app`
- [Desktop Pet](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/pet/PetOverlayService.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/pet/PetOverlayService.kt`
- [Localization](https://github.com/ccch1mneyyy/dsh-go/blob/main/app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/i18n/AppStrings.kt): `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/i18n/AppStrings.kt`

### Other components

- **User**

## Connections

- User → App Interface: uses (evidence: `README.md`)
- App Interface → Runtime Service: starts local engine (evidence: `README.md`)
- App Interface → Remote Host: connects remotely (evidence: `README.md`)
- Runtime Service → Runtime Control: uses (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt`)
- Runtime Service → Phone Task Control: calls (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/runtime/DshService.kt`)
- Runtime Service → Model Provider: sends model requests (evidence: `README.md`)
- Remote Host → Model Provider: sends model requests (evidence: `README.md`)
- App Interface → Phone Task Control: requests phone tasks (evidence: `README.md`)
- Phone Task Control → Task Sessions: manages sessions (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`)
- Phone Task Control → Phone Tools: offers tools (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`)
- Phone Task Control → Accessibility Service: uses screen access (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`)
- Accessibility Service → Screen Driver: owns driver (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/a11y/PhoneA11yService.kt`)
- Phone Task Control → Background Control: uses background control (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`)
- Phone Task Control → Task Skills: supports skills (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/phone/PhoneControl.kt`)
- App Interface → Share and Replay: shares conversations (evidence: `README.md`)
- App Interface → Plugin Interfaces: shows plugin tools (evidence: `README.md`)
- App Interface → Desktop Pet: shows desktop pet (evidence: `README.md`)
- Desktop Pet → App Interface: opens app (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/pet/PetOverlayService.kt`)
- App Interface → Localization: selects language (evidence: `app/android/app/src/main/kotlin/io/github/ccch1mneyyy/dsh_app/i18n/AppStrings.kt`)
