dsh-mobile README

The project's README from github.com/Clarklevis1995/dsh-mobile. As one markdown file: README.md.

DeepSeek Harness Mobile iOS 应用展示

DeepSeek Harness Mobile

使用 Kotlin Multiplatform 共享核心逻辑,为 Android 与 iOS 提供原生移动端体验。

通过 Mobile Gateway 在手机上访问 DeepSeek Harness 的工作区、会话、实时对话、Agent 轨迹与文件。

Kotlin Multiplatform Android 7.0+ iOS 17+ Jetpack Compose SwiftUI WebSocket

项目简介

DeepSeek Harness Mobile(DshMobile)是面向 DeepSeek Harness 的社区原生移动客户端。项目已完成 Kotlin Multiplatform(KMP)架构改造,并同时提供可运行的 Android 与 iOS 应用:

两端均通过 dsh-plugin-mobile-gateway 与 Harness 建立 WebSocket 连接。网络、安全存储、文件、图片、生命周期和后台任务由各平台原生实现,业务规则则尽可能收敛到 shared/commonMain。

当前平台状态

平台/模块 当前状态 主要实现
KMP shared 已接入 Android 与 iOS Gateway 协议、Store/Reducer、Conversation/Trajectory 投影、History 同步、Question/Approval、Session Control、工作区文件状态与代码预览支持
Android 已实现原生客户端 Jetpack Compose、OkHttp WebSocket、DataStore(非敏感配置)、Keystore(凭据)、CameraX/ML Kit 扫码、前台服务、附件缓存、文件下载与预览
iOS 已实现原生客户端 SwiftUI/UIKit、URLSession WebSocket、UserDefaults(非敏感配置)、Keychain(凭据)、二维码配对、后台执行、附件与工作区文件

Android 与 iOS 使用各自的原生 UI 和平台能力,并不是共享 UI。功能和交互会持续对齐,但个别系统级行为可能因平台限制而不同。

功能亮点

界面预览

当前仓库中的界面截图来自 iOS 版本;Android 使用 Jetpack Compose 实现相同的信息架构和核心流程。

核心体验

iOS 工作区首页 iOS 浅色模式对话 iOS 浅色模式轨迹
工作区首页
工作区与最近会话
对话
Markdown、代码与工具结果
轨迹
时间概览与事件时间线

默认配置

iOS 应用设置 iOS Agent 预设 iOS 默认模型
设置
部署默认值与 Gateway 状态
Agent 预设
工具、提示词与能力组合
默认模型
Provider、模型与思考等级

工作区操作与轨迹详情

iOS 切换工作区 iOS 选择工作区目录 iOS 轨迹详情面板
切换工作区
快速访问不同项目
目录选择
浏览并创建工作区
轨迹详情
摘要、Token 与内容预览

浅色、深色与设备配对

iOS 浅色模式设备认证 iOS 深色模式设备认证 iOS 深色模式对话
浅色配对
扫码或手动输入
深色配对
完整深色模式适配
深色对话
阅读、代码与输入面板

跨端架构

                         DeepSeek Harness
                                │
                  dsh-plugin-mobile-gateway
                                │
                             WebSocket
                ┌───────────────┴───────────────┐
                │                               │
     Android OkHttp Transport          iOS URLSession GatewayClient
                │                               │
       KMP Gateway Runtime             Swift Router / KMP Adapter
                │                               │
                └───────────────┬───────────────┘
                                │
                    KMP shared / commonMain
            Protocol · Store · Reducer · Projection
       History Sync · Question/Approval · Workspace Files
                ┌───────────────┴───────────────┐
                │                               │
       Jetpack Compose                     SwiftUI / UIKit
          Android UI                          iOS UI

共享层职责

共享层不依赖 Compose、SwiftUI、Android Framework 或 Apple UI Framework。iOS 复用共享 Store、Reducer、Projection 和文件状态机,但当前仍由 Swift GatewayClient 负责 WebSocket、连接与重连,再通过 Adapter 将事件送入共享层;它尚未接入完整的 KMP Gateway Runtime。

Android 和 iOS 均在平台侧负责安全存储、图片处理、临时文件落盘、系统分享/打开以及应用生命周期。共享层负责远端文件协议、状态流转、分块一致性和完整性校验,不直接操作平台文件系统。

项目结构

.
├── shared/                         # Kotlin Multiplatform 共享业务模块
│   └── src/
│       ├── commonMain/             # 协议、状态机、投影、同步与 facade
│       └── commonTest/             # 跨平台单元测试
├── androidApp/                     # Android 原生应用(Jetpack Compose)
│   └── src/
│       ├── main/                   # 产品代码与平台实现
│       ├── test/                   # JVM 测试
│       └── androidTest/            # 设备测试
├── DeepSeekHarnessMobile/          # iOS 原生应用(SwiftUI/UIKit)
├── DeepSeekHarnessMobileTests/     # iOS XCTest
├── DeepSeekHarnessMobile.xcodeproj
├── Docs/                           # 调研、KMP 迁移与验证文档
└── Design/                         # 设计规范与展示素材

环境要求

通用

Android

iOS

运行 Android

  1. 配置 Java 17,并确保 ANDROID_HOME 或 ANDROID_SDK_ROOT 指向 Android SDK。

  2. 在仓库根目录构建 Debug APK:

    ./gradlew :androidApp:assembleDebug
    
  3. 安装到已连接的设备或模拟器:

    ./gradlew :androidApp:installDebug
    
  4. 启动 DshMobile,扫描 WebUI 生成的配对二维码,或手动输入配对信息。

Debug APK 位于:

androidApp/build/outputs/apk/debug/androidApp-debug.apk

当 Android Emulator 需要访问宿主机的 127.0.0.1:3080 时,可以先执行:

adb reverse tcp:3080 tcp:3080

运行 iOS

  1. 配置 Java 17 和 Android SDK。
  2. 使用 Xcode 打开 DeepSeekHarnessMobile.xcodeproj。
  3. 选择 DeepSeekHarnessMobile Scheme 与目标设备。
  4. 构建并运行。Xcode 中的 Build KMP Framework 阶段会自动选择并编译对应的 Kotlin/Native framework。
  5. 在应用中扫描 WebUI 配对二维码,或手动输入配对信息。

无需提前手工构建 framework;如需单独生成 Apple Silicon iOS Simulator framework,可执行:

./gradlew :shared:linkDebugFrameworkIosSimulatorArm64

连接与配对

  1. 在 DeepSeek Harness 中安装并启用 dsh-plugin-mobile-gateway。
  2. 打开 WebUI 的“移动设备”面板,启用移动设备连接与设备鉴权。
  3. 确认 WebSocket 地址能被手机或模拟器访问。
  4. 生成一次性配对二维码/Token,并在 Android 或 iOS 客户端中完成认证。
  5. 返回首页,确认 Gateway 状态已连接,然后选择工作区和会话。

常见地址:

场景 地址
iOS Simulator ws://127.0.0.1:3080/ws/mobile
Android Emulator + adb reverse ws://127.0.0.1:3080/ws/mobile
同一局域网内的真机 ws://<HOST-LAN-IP>:3080/ws/mobile
公网部署 wss://<your-domain>/ws/mobile

[!IMPORTANT] 真机不能使用 127.0.0.1 访问电脑。表中的 ws:// 仅用于受信任的本地开发环境;公网或不可信网络必须使用 wss:// 并正确配置 TLS 与设备鉴权。一次性配对 Token 不应写入日志、Issue 或聊天记录。

构建与测试

执行共享层测试、Android 单元测试、Lint 和 APK 构建:

./gradlew \
  :shared:allTests \
  :androidApp:testDebugUnitTest \
  :androidApp:lintDebug \
  :androidApp:assembleDebug

有可用 Android 设备或模拟器时,可继续执行:

./gradlew :androidApp:connectedDebugAndroidTest

iOS 测试可在 Xcode 中选择 DeepSeekHarnessMobile Scheme 后执行 Product → Test。构建阶段会自动链接对应架构的 DeepSeekHarnessShared.framework。

相关文档

以下文档记录 KMP 迁移和 Android 落地过程,阶段性状态以本文档和当前代码为准:

当前状态

项目处于持续开发阶段。KMP 共享层、Android 原生应用和 iOS 原生应用均已落地,协议、跨端一致性和移动端体验仍会随 DeepSeek Harness 与 Mobile Gateway 持续演进。

本项目是面向 DeepSeek Harness 的社区客户端,不代表 DeepSeek 官方发布。

Listed on dsh-plugin.org

dsh-mobile (Clarklevis1995/dsh-mobile)

Searching Database…

What is this?DeepSeek Harness Mobile (dsh-mobile) is a native mobile client for DeepSeek Harness, bringing your Harness workspaces, sessions, live agent replies and execution trajectories to an Android or iOS phone.
Is this a native app or a mobile web wrapper?It is a true native Android and iOS app built with Kotlin Multiplatform: a shared Kotlin core (protocol, state machine, sync) is used by both, while Android renders with Jetpack Compose and iOS with SwiftUI/UIKit — there is no shared UI layer.
How do I get it running on my phone?Build and install the Android debug APK via Gradle from the repo root, or open DeepSeekHarnessMobile.xcodeproj in Xcode for iOS, then launch the app and scan the pairing QR code shown in the Harness WebUI (or enter the pairing info manually).
What do I need on the Harness side before connecting?You need a running DeepSeek Harness instance with the dsh-plugin-mobile-gateway enabled, plus Java 17 and either Android SDK/Studio for the Android build or macOS + Xcode for the iOS build.
Does the connection stay alive if I background the app?On Android a foreground service keeps the WebSocket open while an agent turn is running, but iOS only gets limited system-granted background execution time, so a continuous WebSocket connection is not guaranteed.
What Android and iOS versions does it support?Android requires 7.0 (API 24) or newer, and iOS requires 17.0 or newer, built with Xcode on macOS.
Is it safe to pair over a public network?Use wss:// with proper TLS and device authentication for any public or untrusted network; plain ws:// is only meant for trusted local development, and the one-time pairing token must never be logged or shared.
What is DeepSeek Harness?DeepSeek Harness is the coding-agent backend this app connects to; dsh-mobile is an unofficial community client that surfaces its workspaces, sessions and agent activity on mobile, and is not an official DeepSeek release.
Can I see what the agent is doing step by step?Yes — the app displays the full agent trajectory, including user/assistant/tool events, call arguments, results, schemas, token counts and timing.
Do I need to approve agent actions manually?Yes, it surfaces Human Question and tool-approval requests so you can submit, cancel, reject or allow-once directly from your phone.
How do I pair my phone with Harness?Enable dsh-plugin-mobile-gateway in Harness, open the WebUI's mobile devices panel, generate a one-time pairing QR code, and scan it (or enter the info manually) in the app.
Size
65.3 MB
Stars
524
Age
2mo
Commits · 90 Days