@dsh-mobile/mobile-remote 3.2.6 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/FAQ.md +19 -12
  2. package/README.md +39 -40
  3. package/cordis.patch.yml +8 -4
  4. package/docs/PRIVACY-POLICY.en.md +88 -61
  5. package/docs/PRIVACY-POLICY.md +88 -61
  6. package/docs/SUPPORT.md +5 -5
  7. package/docs/TERMS-OF-SERVICE.en.md +1 -1
  8. package/docs/TERMS-OF-SERVICE.md +1 -1
  9. package/docs/USER-GUIDE.zh-CN.md +562 -0
  10. package/lib/account-usage-query.js +117 -4
  11. package/lib/assistant-prefs.js +147 -0
  12. package/lib/auto-config.js +55 -3
  13. package/lib/backup.js +405 -0
  14. package/lib/break-reminder.js +133 -0
  15. package/lib/client.js +57 -11
  16. package/lib/config.js +94 -5
  17. package/lib/git-read-bundled-provider.js +12 -3
  18. package/lib/git-read-service.js +4 -0
  19. package/lib/host-compat.js +25 -0
  20. package/lib/http-util.js +6 -2
  21. package/lib/index.js +987 -74
  22. package/lib/memory/context.js +76 -0
  23. package/lib/memory/decay.js +144 -0
  24. package/lib/memory/extract.js +146 -0
  25. package/lib/memory/routes.js +198 -0
  26. package/lib/memory/store.js +667 -0
  27. package/lib/notify-copy.js +245 -0
  28. package/lib/permission-guide.js +184 -0
  29. package/lib/persona-cards.js +362 -0
  30. package/lib/proactive-material.js +162 -0
  31. package/lib/proactive.js +369 -0
  32. package/lib/protected-paths.js +130 -0
  33. package/lib/protocol.js +35 -0
  34. package/lib/rate-limit.js +1 -1
  35. package/lib/relay/connector.js +97 -12
  36. package/lib/relay/devices.js +14 -0
  37. package/lib/relay/fingerprint.js +55 -0
  38. package/lib/relay/identity.js +69 -0
  39. package/lib/relay/on-demand.js +84 -0
  40. package/lib/relay/phone.js +87 -12
  41. package/lib/reminders.js +140 -0
  42. package/lib/rpc-adapter.js +21 -2
  43. package/lib/session-rotation.js +198 -0
  44. package/lib/timeline.js +1 -1
  45. package/package.json +31 -14
  46. package/CHANGELOG.md +0 -1336
  47. package/CONTRIBUTING.md +0 -61
  48. package/docs/00-/345/274/200/345/217/221/346/200/273/347/272/262.md +0 -432
  49. package/docs/01-PRD.md +0 -148
  50. package/docs/02-architecture.md +0 -249
  51. package/docs/03-api.md +0 -882
  52. package/docs/04-security.md +0 -110
  53. package/docs/05-test-cases.md +0 -376
  54. package/docs/06-install-run.md +0 -349
  55. package/docs/07-user-manual.md +0 -92
  56. package/docs/08-/346/211/251/345/261/225/345/274/200/345/217/221/346/214/207/345/215/227.md +0 -86
  57. package/docs/09-compatibility.md +0 -201
  58. package/docs/11-remote-relay-guide.md +0 -85
  59. package/docs/APP-ENCRYPTION-DESCRIPTION.md +0 -50
  60. package/docs/APP-ENCRYPTION-DESCRIPTION.pdf +0 -0
  61. package/docs/APP-REVIEW-NOTES.md +0 -135
  62. package/docs/BRAND-ASSETS.md +0 -142
  63. package/docs/STORE-LAUNCH.md +0 -305
  64. package/docs/STORE-LISTING.md +0 -150
@@ -1,201 +0,0 @@
1
- # 09 兼容性说明(Compatibility)
2
-
3
- > 版本:v3.2.0(用量与额度;机制基线 0.1.2-rc.1) · 面向:开源使用者 / 二次开发 / 多设备部署
4
-
5
- 本文回答两个问题:**App 在哪些手机上能跑**,以及**插件在什么样的 Harness 上能跑**。
6
-
7
- ---
8
-
9
- ## 1. 版本要求
10
-
11
- | 组件 | 要求 |
12
- |---|---|
13
- | 桌面端 DSH(Harness) | **v3.1.6 起同时适配两代宿主 API:`0.1.x` 与 `0.2.x`**(见 §2.5);**`0.2.1` 起进程内网关调用强制 Peer,由 §2.6 适配(issue #34)**。机制基线:`0.1.2-rc.1` 服务包 = DSH Desktop v2.0.5(approval/request 瀑布 answerer + `$events` 远程事件双端审批 + RPC 网关,见 §2);更早的 `0.1.1-rc.2` 基线 = v2.0.2 起适配。**不按宿主版本号硬拦截**,按能力探测适配(ADR 0017) |
14
- | dsh-mobile-remote 插件 | **v3.0.0 基线;v3.2.0+ 才提供用量与额度**;`/m/api/diagnostics` 可自检 |
15
- | 手机 App(Android) | v3.0.0 基线(用量与额度需 v3.2.0+;与插件同版本 = 完美配对);不同版本可用但"谁旧谁吃亏",详见 README「版本与兼容」;Android 7.0+、64 位机型 |
16
- | 字段级兼容(v3.1.0 候选) | `reasoning`/`title` 为纯增量字段:新插件+旧 App 无影响(忽略新字段);新 App+旧插件自动回退(不渲染折叠块 / 桌面宠物标题兜底短码)——任意组合均可使用 |
17
- | 字段级兼容(v3.1.1) | `/m/api/directories` 根视图新增 `sep`(服务端路径分隔符);新插件+旧 App 忽略该字段即可(旧 App 在 WSL 上仍按 `\` 拼接,由服务端`normalizeServerPath` 归一化兜底,浏览/建夹/建会话均可用);新 App+旧插件缺少 `sep` 时按根视图推断分隔符——任意组合均可使用 |
18
- | 用量与额度(v3.2) | 新插件+新 App 通过 `/m/api/account-usage` 显示 DeepSeek/Codex/OpenCode Go;旧 App 忽略新端点。新 App+旧插件进入该入口会显示“电脑端插件版本过旧”,不影响其它功能;升级插件后无需重新配置凭据 |
19
- | 桌面宠物面板用量与额度(v3.2) | 新 App+新插件:面板展开时按需展示三来源区块(金额行文字 + 配额行细条/颜色),整块可点进详情页。新 App+旧插件:区块整体降级为原有单行余额(点击打开用量与额度页),其余面板功能不受影响;旧 App 忽略新端点。无新增服务端契约 |
20
- | 外观:皮肤与图标(v3.2.2 build 27) | **纯 App 侧,无服务端契约变化**。皮肤是 `ThemeExtension` 令牌,旧插件照常工作;默认皮肤令牌与旧版逐值一致。App 图标用 8 个 `activity-alias`,只在 Android 生效(其它平台隐藏入口) |
21
- | 图标入口迁移(build 27) | 启动入口从 `com.dsh.remote.MainActivity` 改为 `com.dsh.remote.IconDefault`:**升级后桌面旧快捷方式可能失效一次**(组件名变化,桌面固定的是组件名),首次启动有一次性说明引导重拖。抽屉入口不受影响 |
22
- | 桌面宠物前台联动(build 27) | `MainActivity.onStart/onStop` → 服务根视图 `GONE`:App 在前台时收起宠物与状态气泡/迷你面板;`设置 → 桌面宠物 → App 在前台时收起` 可关。旧系统不涉及(仅原生层行为) |
23
- | 图标主题化与圆形图标 | **已知缺口**:`mipmap-anydpi-v26` 未提供 `<monochrome>` 层,Android 13 主题图标不生效;未声明 `android:roundIcon`,圆形图标机型退化为方形。计划在后续版本补齐,不影响功能 |
24
- | Flutter 构建环境 | Flutter 3.35+(Dart SDK ^3.13) |
25
-
26
- **声明式兼容范围(`peerDependencies`)**:`@deepseek-ai/dsh-{credentials,llm,sandbox-policy,scope}` 声明 `>=0.1.0-rc.6 <0.3.0`。宿主 `@deepseek-ai/dsh-app-boot` 的 `evaluatePluginCompatibility()` 用 `semver.satisfies(runtimeVersion, range, { includePrerelease: true })` 判定(**prerelease 参与比较**),因此该范围同时覆盖 `0.1.x`、`0.2.0-rc.*` 与 `0.2.x` 正式版,而 `0.3.0+` 会被判为不兼容。上界**只用于声明可安装边界**,功能路径仍按能力探测(ADR 0017),不按版本号做功能门禁。
27
-
28
- **快速自检**:手机 App → 设置 → 环境诊断。`services` 一节列出每个内核服务是否存在;**v3.1.3+ 看 `checks.approvalMode`**(生效策略)与 **`checks.remoteEvents`**(`true` = `$events` 双端呈现通道就绪,`false` = both 降级 mobile 或配置即 mobile/desktop);`notes` 说明当前审批策略实际语义与**任何非全绿的宿主能力**。
29
-
30
- **v3.1.6+ 新增两项宿主能力自检**(ADR 0017):
31
-
32
- - `checks.hostCapabilities`:逐项给出三态——`ok` / `drift` / `missing`。`drift` 是**能力语义漂移**(服务在、调用不报错,但成员形状不是插件认识的样子),这正是 0.2.0 四处变更与 0.2.1 peer 收紧的形态,旧的两分法看不见它们。**`gateway.eventsPeer`(issue #34)** 专门覆盖"网关入口都在、但进程内 Peer 来源缺失"这一种漂移,原因码为 `gateway-peer-source-missing`。
33
- - `checks.hostGeneration`:插件**实际走了哪条代际路径**(`jobsCaller` / `settingsRead` / `wireStreamArgs` / `eventsPeer`),排查"为什么同一功能在两台机器上表现不同"时先看这里。`eventsPeer` 取值:`createPeer`(0.2.1+)/ `operatorPeer`(0.2.0 网关兜底)/ `legacy`(旧代 3 参开流不需要 peer)/ `none`(必失败)/ `unknown`(网关服务缺失,无法判定)。
34
-
35
- `services.apiProxy` / `checks.respondBridge` / `checks.frameBridge` **已随 v3.1.6 删除**:该服务自 `0.1.2-rc.1` 起就不存在,保留它们只会让人以为有一条可用的旧代降级通道。同样地,`/m/api/respond` 在待办不在本地清单时返回 `404 respond-not-pending`(此前返回 `503` 并归咎于"内核过旧",属误导——真实原因通常是"另一端已先答"或"已超时")。
36
-
37
- ---
38
-
39
- ## 2. 内核耦合点与降级行为
40
-
41
- 插件与 Harness 的耦合分三档:**硬依赖**(缺失 = 对应功能不可用)、**软依赖**(缺失 = 功能降级)、**可选**(缺失 = 自动禁用该功能)。插件对每个依赖都做了存在性探测,**任何一项缺失都不会让插件崩溃或影响其他功能**。
42
-
43
- ### 2.1 服务(`ctx.get` / `ctx.inject`)
44
-
45
- | 服务 | 用途 | 档位 | 缺失时行为 |
46
- |---|---|---|---|
47
- | `webServer` | 挂载 `/m/api`、`/m/events`、`/m/qr.png` 路由 | 硬依赖(插件存在的意义) | v2.4 起守卫:纯 headless 形态下插件静默无操作,不崩进程 |
48
- | `sessions` | 会话列表/touch/创建/停止 | 硬依赖(内核核心) | 移动端会话功能不可用 |
49
- | `agents` | 会话创建、状态 | 硬依赖(内核核心) | 同上 |
50
- | `workspaceRegistry` | 工作区列表、会话归档(与 PC 端同一份状态) | 软依赖 | 归档/工作区筛选不可用;App 回退为 cwd 前缀分组(旧版兼容路径) |
51
- | `sessionProjections` | `turnOutline` 投影单元注册探测(轮次导航,决定 `capabilities.turnOutline`) | 软依赖 | 缺失或未注册 → 能力位 `supported: false`,App 退回「只用已加载轮次」,不按宿主机版本推断 |
52
- | `messageFeedback` | 消息 👍/👎(与 PC 端同一份) | 软依赖 | 反馈菜单隐藏/报错 |
53
- | `approval` | 权限策略读取(`setPolicy` 仅当存在时调用) | 可选 | 跳过策略写入 |
54
- | `credentials` | DeepSeek 余额查询 | 可选 | 回退环境变量 `DEEPSEEK_API_KEY`;都没有则余额不可用 |
55
- | `userQuestions` | (间接)问询链路 | 可选 | 无弹窗(同上) |
56
- | `approval/request`·`user-questions/request` 瀑布(0.1.2-rc.1+) | Agent 作用域 Cordis 瀑布,插件 answerer 应答(0.1.2 移除了 apiProxy 后的新机制) | 软依赖 | 手机弹窗功能不受影响;该机制是问询/审批的**唯一**现行路径 |
57
- | `typertGateway` `$events` 远程事件(0.1.2-rc.1+,`both` 模式) | 插件进程内 $events 客户端:瀑布经内核转发到网关后与桌面 GUI 同收事件副本、先答生效(issue #9 双端呈现) | 可选(v3.1.3) | `approvalMode: both` 自动降级为 mobile(手机在线独占),日志与诊断 notes 说明;**0.2.1+ 还要求显式进程内 Peer(§2.6)** |
58
-
59
- > ⚠ **approvalMode(v3.1.3,issue #9)语义**:`both`(默认)= 桌面 GUI 与手机同时弹卡、任一端先答即生效、另一端自动收卡(对齐 v3.1.1 帧桥体验;仅 0.1.2-rc.1+ 网关可用,旧宿主自动降级 mobile);`mobile` = 手机在线独占应答(v3.1.2 行为),离线交桌面 GUI;`desktop` = 一律交桌面 GUI(手机不弹卡)。手机在场时待办 120s 无应答 fail-close(`unavailable` / 问询跳过),与 v3.1.2 一致。配置于 `cordis.patch.yml` → mobile-remote 行 `config.approvalMode`,重启生效。
60
- >
61
- > ⚠ **apiProxy 帧桥已于 v3.1.6 整块删除**(issue #19):该服务自 `0.1.2-rc.1` 起已从内核移除,`0.1.5` 与 `0.2.0` 内核树内均 0 命中。保留它的唯一效果是让读者以为存在一条可用的旧代降级通道。目前**两代宿主都不存在**该服务,问询/审批一律走上表的两个瀑布 + `$events` 双端呈现。
62
-
63
- ### 2.2 事件与 RPC
64
-
65
- | 内核接口 | 用途 | 风险与降级 |
66
- |---|---|---|
67
- | `ctx.on("session/event")` | 消息流/通知聚合/上下文窗口/Conversation timeline | 事件形态随版本演进;未知类型进入通用事件卡,能力缺失时 App 回退摘要模式 |
68
- | `sessionQuery.readEvent`(可选) | Tool activity 与未知 Visible event 的按需无损详情 | 不存在时回退快照;旧历史详情明确显示不可用,不猜测重建 |
69
- | `sessionQuery.observeSession`(可选) | 投影感知的会话观察(轮次大纲,轮次导航) | 不存在时 `/m/api/turn-outline` 显式返回 `capability-missing`;不把「宿主不支持」误报成「该会话没有轮次」 |
70
- | `ctx.on("agent/status")` | 状态点(绿/橙) | 同上 |
71
- | `typertGateway`(`invokeRpc` / `stream` / `openWireStream` / `dispatchRpc`) | 全部内核 RPC 与 `$events` 双端审批通道 | **0.2.1 起必须显式传活 Peer(§2.6)**;漏传/传错时返回 `gateway/internal: …reading 'signal'`,由错误映射转成业务错误码(不再静默) |
72
- | `session.models` RPC | 模型目录(App 模型选择器) | 失败 → 目录为空,App 隐藏模型胶囊 |
73
- | `settings.update`(`agent-presets` / `permission` 命名空间) | 默认预设修改 | 与 PC 端同一写入通道;命名空间变更会导致设置失败(App 报错提示) |
74
- | `session.fork` | 消息分支 | 内核接口变化 → fork 失败提示 |
75
- | `agent.followup` / `session.cancel` | 发消息/停止 | 同上 |
76
-
77
- > ⚠ **子代理通知判定需要 `session.header.origin`(DSH ≥ 0.1.1-rc.2)**:通知聚合对子代理会话(`origin === "subagent"`)抑制完成/失败通知(与内核自身通知一致)。旧内核 header 无 `origin` 字段时,子代理完成/失败通知会被放行(不影响功能正确性,仅通知噪音);fork 出的独立会话(无 origin)照常通知。
78
- >
79
- > ⚠ **v3.1.0 候选新增字段(纯增量,无协议破坏)**:`assistant/message` 摘要的 `reasoning`(思维链正文,仅非空时下发,≤20000 字符)与 `/m/api/bootstrap` 的 `agents[*].title` / `sessions[*].title`(会话标题,空则兜底短码)。旧版 App 按 key 取值、忽略未知字段;旧版插件缺少这些字段时新版 App 自动回退(不渲染折叠块 / 桌面宠物显示 id 短码)。两端任意组合均可正常使用。
80
-
81
- > ⚠ **Issue #1 时间线能力协商(纯增量):** `/bootstrap` 与 SSE `hello` 的 `capabilities.eventTimeline` 声明 `detail`、`unknownEvents`、`callCorrelation` 等能力。新版 App 只在 `capabilities.eventTimeline.detail` 且事件摘要带 `detail.available` 时请求 `/event-detail`;能力是端点级声明,单事件仍可能因旧日志/离线而不可用。旧插件没有声明时继续使用已有摘要/历史路径,并把详情显示为不可用,不按插件版本号猜测能力。
82
- >
83
- > ⚠ **当前界面降级与 dormant-session 依赖:** seeded session 若只能读取当前 surface,`/event-detail` 返回 `degraded: true` 与 `detailMode: "current-surface"`,新版 App 展示不完整提示;无法读取时使用稳定错误码和重试,不显示原始异常。休眠会话的完整读取依赖 issue #7 的独立修复,本分支不复制该实现。
84
- >
85
- > ⚠ **`/bootstrap` 的 `agents[*].sessionId`(纯增量)**:`agentId` 与 `sessionId` 不是同一标识(`session:` 前缀、子代理场景),新版 App 按 session 维护运行状态,需要 bootstrap 一并下发映射,否则冷启动/重连后要等 `agent/status` 变化帧才知道会话在跑(发送键会短暂显示为「发送」而非「停止」)。旧插件不发该字段时 App 回退按 `agentId == sessionId` 取值。`agents[*].title` 的兜底短码也改由 sessionId 派生(旧插件缺字段时不影响)。
86
-
87
- ### 2.3 高度自定义化的 Harness
88
-
89
- - **自定义权限预设/模型/Agent 预设**:App 全部从内核动态读取(catalog、session-config),不内置白名单;未知预设名显示为「…」(后续版本可拉取预设清单美化)。
90
- - **第三方插件动作**:`ctx.mobileActions.register(...)` 注册后自动出现在 App 动作区(v0.1 契约:仅 text 字段)。
91
- - **自定义问答 provider / 自动审批策略**:若用户的 Harness 已经接管人类问询(如自动答题插件、审批策略改为自动放行),内核**不会产生** `question/requested` / `approval/requested` 帧——手机不弹窗是**正确行为**,不是 bug。
92
- - **多 profile**:插件按 profile 安装(`<profile>/node_modules/dsh-mobile-remote`),每个 profile 独立配置口令/连接。
93
-
94
- ---
95
-
96
- ### 2.5 两代宿主 API 适配(v3.1.6,issue #19)
97
-
98
- 宿主 `0.2.0` 有**四处**接口与 `0.1.x` 不同。四处**全部表现为静默失败**——服务在、调用不报错、行为却已变("能力语义漂移",见 `CONTEXT.md`)。插件按**结构特征**探测代际并各走一条路径,不查版本号(ADR 0017):
99
-
100
- | 差异 | `0.1.x` | `0.2.x` | 插件如何判别 | 传错的后果 |
101
- |---|---|---|---|---|
102
- | 任务查询/终止的 caller | **Agent 对象**(实现内部取其 `.id`) | **SessionId 字符串** | `jobs.events.subscribe` 是否存在(两处差异同版发生) | 列表恒返回空(像"确实没有任务");终止报"任务属于另一个会话" |
103
- | 任务事件订阅 | `onJobsChanged` + `onJobDone` 两个回调 | 统一的 `events.subscribe(filter, listener)` | 同上 | 实时推送静默退化为轮询 |
104
- | 设置读取 | `get(ns)` 返回配置节 | `describe()` 返回描述符数组(取 `value`) | `typeof settings.get === "function"` | 抛出的类型错误被 `try/catch` 吞掉,提供商配置页字段凭空消失 |
105
- | 事件流打开的参数位次 | `(端点, 载荷, 取消信号)` | `(端点, 载荷, uplink, peer, 取消信号, 控制)`;**0.2.1 末尾又加 `uplinkWindow`(7 参)** | 形参个数(3 vs ≥5 判 control 位次) | 信号落进 `uplink`、真 signal 为 `undefined`,宿主在 `AbortSignal.any` 处抛错并被重试吞掉 → `approvalMode: both` 的双端呈现**永远不就绪**。peer 从 0.2.1 起必填,见 §2.6 |
106
-
107
- **另有一类风险单独处理**:插件依赖的若干宿主成员是 **TS-private**(无契约保证)——权限预设的 `names`/`presets`/`apply`,以及工作区注册表的 `enqueueOperation`/`requireState`/`setState`(后者此前**完全无守卫**)。v3.1.6 起这些成员缺失时**显式报错**(503)或显式降级,不再让 `TypeError` 在深处被吞成"按了没反应"。**不迁移**到公开 API——那是行为改变,与本次兼容修复分开评估。
108
-
109
- **`$events` 流断开改为退避重连**:原实现"就绪后一旦断开即永久放弃",使 `approvalMode: both` 在首次断流后永久退化为手机独占,直到重启宿主——而桌面 GUI 每次开关浏览器都会断流。现语义:**就绪前**失败 = 事件源尚未注册(有界重试 ≈15s);**就绪后**断开 = 瞬时断开(3s 起退避、上限 60s、无限重连,仅插件卸载才停止)。重新就绪后退避复位。
110
-
111
- **验证范围(如实标注)**:只对 **`0.2.x` 做真实宿主端到端验证**(本机宿主即 0.2.x)。`0.1.x` 那条路径的真实宿主验不到,**靠两代假宿主夹具保护**(`test/host-compat-020.test.mjs`:按真实签名复刻两代差异,让两条分支都被实际执行到)。因此 0.1.x 一侧属于"夹具已验证、真实宿主未验证"。
112
-
113
- ---
114
-
115
- ### 2.6 `0.2.1`:进程内网关调用强制 Peer(issue #34)
116
-
117
- 宿主 `0.2.1-rc.2` 把 `0.2.0` 的"peer 可省"收紧为"**每个进程内网关调用都必须显式传一个活着的 Peer**"。与 §2.5 同类:**服务在、成员在、调用不报参数错,但内部先解引用 `peer.signal`**——漏传只会得到 `gateway/internal: Cannot read properties of undefined (reading 'signal')`,或在插件的重试循环里被吞成"通道不可用"。插件按能力探测(不按版本号)选择 peer 来源:
118
-
119
- | 差异 | `0.2.0` | `0.2.1-rc.2` | 插件如何判别 | 传错的后果 |
120
- |---|---|---|---|---|
121
- | 进程内 Peer 来源 | 网关自带 `operatorPeer()` 兜底(`connection.operator` 单例) | **兜底删除**;改由 `ctx.connection.createPeer({ principal, interactions })` 现造 | `typeof connection.createPeer === "function"` → `createPeer`;否则看 `gateway.operatorPeer` → `operatorPeer`;都没有 → `none` | unary RPC 恒返回 `gateway/internal`;`$events` 永不就绪、`approvalMode: both` 静默降级 mobile |
122
- | 网关四入口的 peer 实参 | 可省 | `invokeRpc(e,p,s,**peer**)` / `stream({…,**peer**})` / `openWireStream(e,p,uplink,**peer**,s,…)` / `dispatchRpc(e,p,s,**peer**)` 均要求必填 | 同上一行(`hostPeerSource`) | 同上 |
123
- | `$events/result` 结算身份 | peer 不参与 | `assertPeerLive` + `requireInteractions` + owner + **`client.peer !== peer` 拒绝** | 插件把**开流用的同一个 Peer 实例**用于结算 | 结算被 `gateway/interactions-forbidden` 拒绝,手机答了却"没生效" |
124
-
125
- **插件做法(issue #34 实现)**:
126
-
127
- - 插件级**单例** Peer:首次真正调用网关时惰性创建(`owner` + `interactions: "answer"`),跨 RPC 与 `$events` 开流共用;**开流与结算同一个实例**(宿主按 Peer 身份匹配),插件卸载时 `dispose()`。
128
- - `connection` 服务可能晚于插件挂载(0.2.1 实测首次 `ctx.get("connection")` 为 `undefined`)——首次取不到就不缓存,交给既有 `$events` 有界重试/下次调用再建。
129
- - `0.2.0`/`0.1.x` 不改变行为:没有 `createPeer` 时继续传 `undefined`,由网关兜底 / 旧代 3 参开流不需要 peer。
130
- - 诊断显式化:`checks.hostCapabilities["gateway.eventsPeer"]`(`ok`/`drift`)+ `checks.hostGeneration.eventsPeer`(`createPeer`/`operatorPeer`/`legacy`/`none`/`unknown`),`drift` 时附原因码 `gateway-peer-source-missing`;`approvalMode: both` 的降级文案不再归咎"宿主版本过低"。
131
-
132
- **验证范围(如实标注)**:`0.2.1-rc.2` 路径已在**隔离宿主**(`HOME`/`DSH_HOME` 独立、`--profile compat`、端口 3099)完成端到端验证:`checks.remoteEvents=true`、`POST /m/api/defaults {"permissionPreset":…}` 返回 `200 {"ok":true}`;三代的实参位次与 peer 同源/释放由 `test/host-compat-021.test.mjs` 夹具钉住;`0.2.0`/`0.1.x` 回归由既有 `test/host-compat-020.test.mjs` 保护(其 0.2.0 夹具补了真实网关的 `operatorPeer`)。
133
-
134
- ---
135
-
136
- ## 3. Android 多品牌适配
137
-
138
- App 为 Flutter 原生 Android/iOS 应用;Android applicationId 与 iOS Bundle ID 均为 `com.mrdayone.dshmobile`,Android Kotlin namespace 仍为 `com.dsh.remote`,渲染后端为 **Impeller(Vulkan,自动回退 OpenGLES)**。
139
-
140
- | 维度 | 状态 | 说明 |
141
- |---|---|---|
142
- | 渲染 | ✅ 已验证(小米 17 Pro Max) | Flutter 引擎在无 Vulkan 机型自动回退 GLES;再老机型回退 Skia。历史风险点:部分旧 Mali GPU 的 Impeller 花屏(2024 年问题,现版本基本修复) |
143
- | 系统版本 | Android 7.0+ | minSdk 跟随引擎默认 |
144
- | 明文 HTTP | ✅ | `usesCleartextTraffic=true` 已配置(Android 9+) |
145
- | 扫码 | ✅ | mobile_scanner(CameraX)全品牌通用 |
146
- | 后台存活 | 部分依赖系统 | 国产 ROM 杀后台会断 SSE;App 有指数退避重连 + 回前台自动探测。系统级提醒走推送桥(ntfy/Bark/Server酱),不依赖 App 存活 |
147
- | 深色/字体缩放 | ✅ | Flutter 主题自适应 |
148
-
149
- **建议发布前实测**(借 1~2 台其他品牌即可):① 长时间流式回复渲染;② 上翻深历史(Impeller 表现);③ 熄屏后回前台自动重连。
150
-
151
- **如遇渲染异常**:把 `dsh-mobile-app/android/app/src/main/AndroidManifest.xml` 中 `EnableImpeller` 改为 `false` 出一个 Skia 版验证;App 代码无需改动(列表结构两种后端都验证过)。
152
-
153
- ## 4. iOS 当前交付状态
154
-
155
- Flutter 官方 Runner 工程已生成,Bundle ID 为 `com.mrdayone.dshmobile`,最低 iOS 版本为 15.0。Dart 业务层、Keychain 安全存储、Darwin 本地通知、相机/照片/本地网络权限、文件选择/导出/分享和 Android-only 能力降级均已写入工程。
156
-
157
- - **已观察到**(2026-10-31,macOS 26.5.1 / Xcode 26.6 / Flutter 3.47.8,无需 CocoaPods):`flutter build ios --simulator --debug` 与 `flutter build ios --release --no-codesign` 均构建成功,`Runner.app` 的 Bundle ID、版本、`MinimumOSVersion 15.0` 与 `NSAllowsLocalNetworking` 合并结果正确,7 个插件与 Flutter.framework 各自带 `PrivacyInfo.xcprivacy`。
158
- - **无签名构建(`--no-codesign`)的 `Runner.app` 只能证明能编译,不能安装运行**:它不带任何 entitlements,Keychain 调用返回 `-34018 errSecMissingEntitlement`,连接页点「连接」只会显示「安全存储不可用」(2026-10-31 在模拟器上实测)。在模拟器里运行请**去掉** `--no-codesign`(Xcode 会 ad-hoc 签名并带上权限,同一天实测可以连接并进入首页);真机需要正式签名。
159
- - **仍未观察到**:真机运行、通知点击冷启动、Files/UIDocumentPicker 实际行为、Keychain 迁移与卸载后残留、APNs,需 Apple 设备与账号验证。
160
- - 需要:Mac + Xcode + Apple Developer/App Store Connect 账号,以及签名证书和 provisioning profile。
161
- - 分发:无签名 Runner.app 只用于 CI smoke check;可提交分发必须生成签名 IPA 并走 TestFlight/App Store。
162
- - 网络策略:iOS `Info.plist` 只开启 `NSAllowsLocalNetworking`,公网场景必须使用 HTTPS 或用户管理的私有组网。
163
-
164
- ## 5. 已知问题清单(发布时如实告知)
165
-
166
- | # | 问题 | 影响 | 状态/缓解 |
167
- |---|---|---|---|
168
- | 1 | 宿主 API 存在**静默语义漂移**(服务在、不报错、行为已变) | 升级宿主后功能"没反应",且旧的两分法探测看不见 | 能力三态报告(`checks.hostCapabilities` / `checks.hostGeneration`)+ 两代假宿主夹具;见 §2.5、§2.6 |
169
- | 2 | 自定义权限预设名在 App 显示「…」 | 纯展示 | 后续拉取预设清单 |
170
- | 3 | 国产 ROM 杀后台导致通知延迟(App 内角标) | 通知不及时 | 推送桥不受影响;App 重连后补拉 |
171
- | 4 | Impeller 在极老 GPU 的潜在渲染问题(未实测) | 少数旧机可能花屏 | manifest 一行回退 Skia |
172
- | 5 | 大体积消息(数万字符)首次滚动定位 | 仅首屏定位,无功能损失 | 列表已按段加载(50 条/页) |
173
- | 6 | 明文 HTTP 通信 | 仅限可信内网 | 设计如此(docs/04-security.md);公网必须虚拟组网(蒲公英推荐)/ TLS 反代(docs/06 §5/§6b) |
174
- | 7 | 通知记录删除后,同会话同类事件会再生成新通知 | 符合预期(删除≠静音) | 已文档化 |
175
- | 8 | GIF 发送后显示静态 | 与 PC 端一致(内核附件规范化取首帧重编码)| 动态链路已就绪(Flutter 原生支持),待内核保留动画附件 |
176
- | 9 | 思维链块仅标题行(图标+字数+箭头)可点击切换,正文为可选中文本(点正文不切换,属设计) | 轻微认知成本 | 已文档化;折叠状态 v3.1.0 起按消息持久化(滚动/重进/重启保持) |
177
- | 10 | 旧版 App(≤v3.0.0)在 WSL/类 Unix 服务端浏览目录会拼出 `/\home` 形态的路径 | 旧 App 在 WSL 端目录浏览受限 | **v3.1.1 已修复**(服务端 `normalizeServerPath` 归一化);新版 App 按服务端 `sep` 拼接,任意组合可用 |
178
- | 11 | 与 dsh-web 移动端远程(`@linxin666/dsh-remote-web-ui`)同装冲突 | 两者抢 `/m` 路由前缀(对方写死不可配),可能异常/崩溃 | 本插件 `path` 改 `/mr` 等非 `/m` 单段即可共存(App 自动适配,无需重装);详见 FAQ |
179
- | 12 | 手机在线时桌面端不弹审批/问询框(v3.1.2,issue #9) | 桌面用户无法在 PC 审批/应答(只能手机答或 120s fail-close) | **v3.1.3 修复**:默认 `approvalMode: both` 双端同卡、先答生效(0.1.2-rc.1+);旧宿主/历史版本可用 `approvalMode: mobile \| desktop` 明确策略 |
180
- | 13 | `approvalMode: both` 依赖内核 `$events` 通道 | 旧宿主(0.1.1-rc.2 及更早)无法双端同卡 | 自动降级 mobile 并写日志;诊断 `notes` 可查 |
181
- | 14 | `0.2.1-rc.2` 起进程内网关调用强制显式 Peer(§2.6) | 未适配的插件版本上:RPC 功能报 `gateway/internal`,`$events` 双端审批静默降级 | 已按能力探测适配(`connection.createPeer`);诊断 `gateway.eventsPeer` 可归因;旧代行为不变 |
182
-
183
- ## 6. 内置常量与"写死"数据速查
184
-
185
- **零敏感写死**:口令、密钥、推送凭据全部在用户配置(`cordis.patch.yml`)或手机本地,代码与仓库中无任何密钥硬编码。
186
-
187
- | 类别 | 内容 | 说明 |
188
- |---|---|---|
189
- | 设计令牌(有意) | 品牌色 `#426EFE` / 深色 `#0E1116` 等(App `theme.dart`)、Android namespace `com.dsh.remote`、商店包名 `com.mrdayone.dshmobile`、QR 协议 `DSHREMOTE\|地址\|口令`、`EnableImpeller=true` | 产品设计/通信契约,勿随意改 |
190
- | 内核耦合词(有意) | 系统消息过滤词 `Current runtime context` / `This snapshot supersedes` / `background job `(App `chat_screen.dart`) | 与内核/PC 端保持一致的隐藏规则 |
191
- | 插件可配置项 | `path` / `authToken` / `cookieName` / `sessionTtlMs` / `maxConnections` / `pushUrls` / `pushCooldownMs` / `pushContent` / `rateLimit` / `trustedHosts` / `doneGraceMs`(v2.8.0)/ `lanBridge`(v3.0.0:`{enabled, port, host}`,默认关)/ `approvalMode`(v3.1.3:`both` 默认 \| `mobile` \| `desktop`)/ `turnOutlineTimeoutMs`(轮次导航:轮次大纲端点有界等待,默认 5000ms,契约门禁可调短) | schema 默认值,改配置即可 |
192
- | 插件内置常量 | 通知上限 100、catalog 缓存 15s、SSE 心跳 25s、SSE 超时 15s、登录限流默认 10 次/60s(`rateLimit` 可配)、状态文件 `~/.dsh/mobile-remote/` | 合理默认,无需配置 |
193
- | App 内置常量 | HTTP 超时 15/20s(余额 25s)、连接/探测超时 8s、地址表上限 8、重试退避 1s→15s、看门狗 15s 检查 / 心跳 75s(3 周期)、日志保留 15 天/256KB、聊天初始窗口 50 条、历史分段 30 条、上下文圆环阈值 70%/90%、思维链折叠手动状态键 `dsh_mr_reasoning_overrides`(按会话持久化,每会话软上限 100 条) | 合理默认;修改点集中在各文件顶部常量 |
194
- | 已移除的功能 | 充值入口(App 与插件) | v3.3 起 App 不再提供任何充值链接(Apple 3.1.1),插件也不再下发 `catalog.rechargeUrl`;旧配置里的 `rechargeUrl` 字段会被忽略,不影响启动;新 App 连旧插件时忽略该字段 |
195
-
196
- ## 7. 发布签名
197
-
198
- - Release APK 需正式 keystore:`dsh-mobile-app/android/app/dsh-release.jks` + `android/key.properties`(**均已 gitignore,切勿提交**)。
199
- - 干净克隆无 key.properties 时 **release 构建默认失败**(v3.2.4;此前静默回退 debug 签名)。仅自用/CI 候选包可设 `DSH_ALLOW_DEBUG_SIGNING=1` 显式放行(产物不可上架);商店/公开分发必须自建 keystore。
200
- - 自建方法见 `dsh-mobile-app/README.md`「构建」一节。
201
- - ⚠ 更换签名 = 新应用:用户需卸载重装并重新扫码。
@@ -1,85 +0,0 @@
1
- # 11 — 远程访问(加密中继)使用指南
2
-
3
- > **状态:已实现并测试,公开中继已部署(`wss://dsh.claud.ing`,2026-11-16 上线并通过六步冒烟);插件 3.2.6 起默认开启。**
4
- > 设计、威胁模型与"哪些已验证、哪些没有"见 [`00-开发总纲.md`](00-开发总纲.md) §4。
5
- >
6
- > **默认行为:** 电脑端装好插件后自动出站连接 `wss://dsh.claud.ing`,桌面设置页直接出现「远程访问」;
7
- > **局域网直连的地址与口令完全不变**,两种连接可以并存。不需要远程访问时设 `relay.enabled: false`。
8
- >
9
- > **手机端:** 商店版目前仍按首发决定隐藏配对入口;要在自己手机上试,用
10
- > `flutter build apk --dart-define=DSH_REMOTE_ACCESS=true`(或 `flutter run --dart-define=...`)构建一个打开的版本。
11
- > 以下全文描述的是打开之后的行为。
12
-
13
- ## 它解决什么
14
-
15
- 手机和电脑**不在同一个 Wi-Fi** 时也能连:4G/5G、公司网络、出差都行。**两边都不用装 VPN 软件**,电脑**不开放任何端口**——
16
- 手机和电脑都是主动向外连到同一个中继服务器,中继只负责转发。
17
-
18
- 内容(消息、会话、文件、审批)是**手机和电脑之间端到端加密**的,中继看不到。中继能看到的是元数据:来源 IP、房间标识
19
- (电脑公钥的哈希)、数据量和时间。
20
-
21
- 同一个局域网里,原来的"扫码 + 口令"直连方式照常可用,两种方式可以并存。
22
-
23
- ## 四步用起来
24
-
25
- **1. 部署一个中继**(一次性;二选一)
26
-
27
- - **自己的服务器 / 小 VPS**:`relay/` 目录,`cd relay && npm install && node run.js`,放在 TLS 终结(Caddy / nginx)之后,对外是
28
- `wss://relay.你的域名`。详见 `relay/README.md`。
29
- - **Cloudflare**:`relay/cloudflare/`,`wrangler deploy`,详见 `relay/cloudflare/README.md`(含部署后必须跑的自检
30
- `node relay/smoke.mjs wss://你的域名`)。
31
-
32
- > 中继地址必须是 `wss://`(加密)。App 与插件都会拒绝 `ws://`(仅本机测试用的回环地址除外)。
33
-
34
- **2. 在电脑上确认**——3.2.6 起随包补丁默认已开启并指向公共中继;要改地址、加备份或关闭,在 profile 的 `cordis.patch.yml` 里覆盖同名条目:
35
-
36
- ```yaml
37
- relay:
38
- enabled: true
39
- urls:
40
- - wss://dsh.claud.ing # 本项目已部署;也可配多个做备份,最多 4 个
41
- name: 办公室电脑 # 可选:配对时显示给手机的名字
42
- ```
43
-
44
- 本项目已部署的公开中继是 `wss://dsh.claud.ing`(Cloudflare Worker `dsh-cloud`,2026-11-16 上线,
45
- `node relay/smoke.mjs wss://dsh.claud.ing` 冒烟通过)。电脑侧挂房间免费;手机侧在
46
- `RELAY_REQUIRE_ENTITLEMENT=1` 时才需要订阅票据。
47
-
48
- 装好或改完重启 DSH。桌面设置页的"远程访问"面板会显示中继是否"已连接"。
49
-
50
- **3. 配对手机**——桌面设置页 → "远程访问" → **生成配对二维码**;手机 App → 连接页 → **扫码连接**(对准这个二维码),
51
- 或在电脑上点**复制配对链接**,手机上点**粘贴配对链接**。
52
-
53
- - 配对码**只能用一次、5 分钟内有效**;二维码里没有任何长期口令。
54
- - 配对成功后二维码自动收起,手机直接进入主界面,**不需要输入口令**。
55
-
56
- **4. 日常使用**——什么都不用做。App 会按需连接;断线自动重连。
57
-
58
- ## 管理
59
-
60
- | 想做的事 | 怎么做 |
61
- |---|---|
62
- | 手机丢了 | 电脑端设置页 → 远程访问 → 已配对的手机 → **撤销**。立即踢掉,其它手机不受影响 |
63
- | 不再用这台电脑 | 手机 → 设置 → **解除与这台电脑的配对**(删除本机密钥);最好也在电脑端撤销一次 |
64
- | 换手机 | 新手机重新配对;旧手机撤销 |
65
- | 查看谁连着 | 电脑端设置页的设备列表(名称、最近连接时间) |
66
-
67
- ## 出问题时
68
-
69
- | 手机上的提示 | 通常是 |
70
- |---|---|
71
- | 找不到电脑 | 电脑没开机、DSH 没运行、被显式设置成 `relay.enabled: false`,或电脑到中继的连接断了(看电脑端面板状态) |
72
- | 配对码无效、已过期或已被使用 | 配对码 5 分钟过期或已被用过;重新生成 |
73
- | 电脑不认这台手机 | 这台手机已被撤销;重新配对 |
74
- | 连不上中继服务器 | 手机网络问题,或中继宕机;配了多个中继时会自动换下一个 |
75
- | 安全握手失败 | 二维码被改动过,或电脑端插件版本过旧;升级插件 |
76
-
77
- ## 当前限制(诚实版)
78
-
79
- - **没有"同一 Wi-Fi 时自动走局域网"**:只用中继配对的手机在家里也经中继走。想要局域网直连,仍可同时扫一次"连接移动端设备"的二维码
80
- (需要口令),两者互为备份。局域网直连加密是后续阶段(见 `docs/10` §1.7 phase 3)。
81
- - **没有 APNs / FCM 系统推送**:App 在前台或后台保持连接时才能收到提醒;iOS 被系统挂起后收不到。原有的 Server酱 / Bark / ntfy 等
82
- 推送通道仍然可用。
83
- - 手机端的 X25519 / ChaCha20-Poly1305 是**自己实现的**(环境限制,没有审计过的包可用),上架前建议换成审计过的实现;
84
- Noise 实现没有对照官方测试向量。
85
- - Cloudflare 适配器从未在真实 Cloudflare 上运行;没有做负载测试;没有真机和 TestFlight 验证。
@@ -1,50 +0,0 @@
1
- # DSH Mobile: Description of Encryption Functionality
2
-
3
- Technical description supplied with the App Store Connect "App Encryption Documentation" for DSH Mobile.
4
-
5
- | | |
6
- | --- | --- |
7
- | App | DSH Mobile - DeepSeek Harness (iOS) |
8
- | Bundle ID | com.mrdayone.dshmobile |
9
- | Version / build | 3.2.4 (32) |
10
- | Publisher | Digital Bang Intelligence LLC., 30 N Gould St Ste R, Sheridan, WY 82801, USA |
11
- | Contact | support@claud.ing |
12
- | Date | 2026-11-02 |
13
-
14
- ## 1. What the app does
15
-
16
- DSH Mobile is a mobile companion for DeepSeek Harness, desktop software that users run on their own computer. The app connects to that computer, shows the user's agent chat sessions, lets the user send messages and images, follow task progress, and approve or deny the tool actions the desktop software asks for.
17
-
18
- It is not a messaging service, a VPN, a file-encryption tool or a security product. It has no user accounts and no in-app purchases, and the publisher does not receive or store user content.
19
-
20
- ## 2. Where encryption is used
21
-
22
- | # | Function | What is used | Implemented by | Status in 3.2.4 |
23
- | --- | --- | --- | --- | --- |
24
- | 1 | TLS for connections the app opens (HTTPS, WSS) | Standard TLS with the platform default certificate validation; the app code does not override certificate checks | BoringSSL, statically linked into the Flutter engine and reached through Dart's `dart:io` | Used when the user enters an `https://` address, for example a TLS reverse proxy the user runs. In the default local-network setup the app speaks plain HTTP to the user's own computer and does not encrypt that traffic itself |
25
- | 2 | End-to-end encrypted channel between the phone and the user's computer through an optional relay | Noise_IK_25519_ChaChaPoly_SHA256: X25519 key agreement (RFC 7748), ChaCha20-Poly1305 AEAD (RFC 8439), SHA-256, HMAC-SHA-256 and the HKDF construction of the Noise specification (section 4.3) | Written in Dart by the publisher from the public specifications (`lib/relay/crypto.dart`, `lib/relay/noise.dart`); SHA-256 and HMAC come from the open-source Dart `crypto` package. Checked against published RFC test vectors and against vectors generated with OpenSSL | The code is included in the app, but its user-facing entry point is switched off by default in this version (build flag `DSH_REMOTE_ACCESS`) and is planned for a later release |
26
- | 3 | Storage of the access token and, for relay pairing, the phone's device key pairs | Apple Keychain | Apple Security framework through the `flutter_secure_storage` plugin; the app does not implement its own storage encryption | Used |
27
- | 4 | Random numbers for keys and nonces | The platform's cryptographically secure random source | Dart `Random.secure()` | Used by item 2 |
28
-
29
- ## 3. Parameters
30
-
31
- - X25519: 256-bit keys. Static and ephemeral key pairs, mutual authentication and forward secrecy come from the Noise IK handshake (`-> e, es, s, ss` and `<- e, ee, se`).
32
- - ChaCha20-Poly1305: 256-bit key, 96-bit nonce built from a 64-bit message counter, 128-bit authentication tag. A counter that reaches its limit is refused, so a nonce is never reused.
33
- - SHA-256: 256-bit digest. HMAC-SHA-256 for key derivation.
34
- - Key lengths and algorithms are fixed in the code. There are no settings to change them.
35
- - A relay, if one is used, only forwards ciphertext. It can see connection metadata (source IP address, room identifier, data volume and timing), but not the content.
36
-
37
- ## 4. What the app does not do
38
-
39
- - It has no feature that lets a user encrypt or decrypt data of their choice, choose an algorithm, or change a key length, and it does not expose its cryptographic functions to other apps.
40
- - It does not use proprietary or unpublished algorithms. Every algorithm in section 2 is a published standard (IETF RFC or NIST FIPS). The Noise handshake follows the publicly published Noise Protocol Framework specification (noiseprotocol.org), which is not an IETF, ISO or ITU document.
41
- - It does not encrypt data at rest itself. Stored secrets go to the Apple Keychain.
42
- - It does not provide a VPN, tunnel, firewall, intrusion-detection or digital-rights-management function. Encryption only protects the connection between the phone and the user's own computer.
43
-
44
- ## 5. Data protected
45
-
46
- Messages, images, files and approval decisions that the user exchanges with their own computer. None of it is sent to the publisher.
47
-
48
- ## 6. Scope of this document
49
-
50
- This is a technical description of the app's encryption functionality only. It makes no export classification (ECCN), license-exception or other legal determination. Any classification, French encryption declaration or filing with a government authority is handled separately by the publisher.
Binary file
@@ -1,135 +0,0 @@
1
- # App Review 补充材料(2.1 Information Needed,2026-11-04)
2
-
3
- 苹果要求把下面六项写进 App Store Connect → 版本 → App Review Information → **Notes**(上限 4000 字符),并重新提交。
4
-
5
- - 第 1 项(真机录屏)由发布者录制,脚本见文末「录屏脚本」。
6
- - Notes 里写的 `<VIDEO_URL>` 要换成真实链接;同时把视频文件作为 Attachment 上传(App Review Information 里有附件框,更稳)。
7
- - 先在构建页把 build 选为 **3.2.4 (32)**(或更新的),版本记录从 1.0 改成 3.2.4,否则 Notes 里写的版本对不上。
8
- - Sign-in required 一栏**不要勾**(没有账号,不需要演示账号)。
9
-
10
- ---
11
-
12
- ## 粘贴到 Notes 的英文正文(约 3,900 字符)
13
-
14
- ```text
15
- SCREEN RECORDING
16
- A recording captured on a physical iPhone running the latest iOS is attached and also at <VIDEO_URL>. It starts with launching the app and shows the typical flow: first-run connection guide, the built-in demo (sessions, streaming reply, tool-approval card, notifications, settings), then connecting to a real DeepSeek Harness on a computer by QR code and approving a real tool action.
17
- The app has NO account system (no registration, login or account deletion), NO user-generated content shared between users (nothing is posted or visible to anyone else, so there is nothing to report or block), and NO in-app purchases, subscriptions, paid features or purchase links. Those flows do not exist, so they are not in the recording.
18
-
19
- 1. PURPOSE AND TARGET AUDIENCE
20
- DSH Mobile is a mobile companion for DeepSeek Harness (DSH), AI coding-agent software that developers run on their own computer. Agent tasks run for minutes or hours and often pause to ask approval before running a command or changing files, which keeps the developer tied to the computer. DSH Mobile lets them continue the conversation, answer the agent's questions, allow or deny tool actions with one tap, follow progress and get alerts from their iPhone while the work keeps running on their own computer. Audience: developers and power users who already run DeepSeek Harness. It is not a standalone AI app, so a demo mode is included for review.
21
-
22
- 2. HOW TO ACCESS THE MAIN FEATURES (no login, credentials or sample files)
23
- Demo mode needs no computer, account or network:
24
- a. Launch the app and tap "Got it" on the first-run connection guide.
25
- b. On the connection screen tap "Try the demo first (no computer needed)". A banner reads "Demo mode · sample data"; "Leave demo" returns to the connection screen.
26
- c. Open a sample session and send "run the tests". A scripted reply streams in, then a tool-approval card appears; tap "Allow once" or "Reject".
27
- d. Also in demo: new session, notification center, session list with archive, usage, Settings (language, theme skin, privacy policy).
28
- Real mode (needs desktop software we cannot host): install DeepSeek Harness on a computer, add the plugin @dsh-mobile/mobile-remote, restart, open Settings > Connect mobile device, scan the QR code with the app (same Wi-Fi). The recording shows this. Guide: https://dsh.claud.ing/en/support/
29
-
30
- 3. EXTERNAL SERVICES AND PLATFORMS
31
- - DeepSeek Harness on the user's own computer, reached directly over the local network. It is the only backend; sessions, files and images go only between phone and computer.
32
- - AI models (DeepSeek and others) are configured and called by DeepSeek Harness on the computer. The app never calls an AI API and holds no AI key.
33
- - No developer-operated server, analytics or tracking SDK, payment processor, authentication service or APNs push. Alerts are local notifications created on the device.
34
- - Advertising: the home screen shows one ad from Gravity (trygravity.ai), through Gravity's own SDK, requested directly from the device. It is contextual only: the request carries one fixed sentence describing the app, never any session content, and a Global Privacy Control signal. The app does not show the App Tracking Transparency prompt and does not read the advertising identifier. The ad is also shown in demo mode, so it can be seen without a computer.
35
- - Apple frameworks only: camera (QR scan), photo library (images the user picks to send), Keychain (access token), Local Network.
36
- - Optional, off by default: end-to-end encrypted relay pairing (Noise protocol) for use away from home. No relay connection is opened unless the user pairs one.
37
-
38
- 4. REGIONAL DIFFERENCES
39
- None. The app works identically in all regions, with no region-specific features or content. The interface follows the device language (English or Simplified Chinese).
40
-
41
- 5. REGULATED INDUSTRY / THIRD-PARTY MATERIAL
42
- Not a regulated-industry app and contains no protected third-party content; it only shows what the user's own agent produces on the user's own computer. "DeepSeek" names the product we connect to. DSH Mobile is an independent mobile companion for DeepSeek Harness. It is not affiliated with or endorsed by DeepSeek.
43
-
44
- Developer: Digital Bang Intelligence LLC. support@claud.ing, https://dsh.claud.ing/en/privacy/
45
- ```
46
-
47
- > 发布前请你确认三件事(我无法替你核实):
48
- > 1. 第 3 条「APNs 没有」——工程里 `Runner.entitlements` 没有 `aps-environment`,确认属实;
49
- > 2. 第 3 条「中继默认关闭」——**App 侧**仍默认隐藏配对入口(`Features.remoteAccess=false`),App 不发起中继连接;电脑端插件 3.2.6 起默认连接公共中继。如果回复里的这句话指整个产品,请改成「App 默认不发起中继连接」;
50
- > 3. 录屏里真的演示了「扫码连接真电脑并审批」。如果你不录这一段,请把第一段里 "then connecting to a real … " 那半句删掉,别写录屏里没有的东西。
51
-
52
- ---
53
-
54
- ## 录屏脚本(真机,iPhone,最新 iOS,建议 2–4 分钟)
55
-
56
- 录制:控制中心 → 屏幕录制,**从桌面开始录**,这样「启动 App」会被录进去。可开麦克风旁白(英文),也可不说话但在画面上停留够久。
57
-
58
- **准备**
59
- - 卸载旧版再装 3.2.4 (32),保证首次启动引导会出现。
60
- - 电脑上先装好 DeepSeek Harness 和插件、启动 `npx @deepseek-ai/dsh web --no-open`,手机与电脑同一 Wi-Fi。
61
- - 开勿扰,避免录到私人通知。
62
-
63
- **A. 启动与演示(约 1.5 分钟)**
64
- 1. 桌面点 DSH Mobile 图标启动。
65
- 2. 首次引导弹窗:停 3 秒,点「Got it」。
66
- 3. 连接页点「Try the demo first (no computer needed)」。
67
- 4. 首页 → 打开一个示例会话 → 发送 `run the tests` → 流式回复 → 审批卡点 **Allow once**,再发一次点 **Reject**。
68
- 5. 新建会话(选 Agent 模式和工作目录)。
69
- 6. 通知页:打开、单删一条。
70
- 7. 设置页:切语言(中/英)、主题皮肤,滚到隐私政策点开。
71
- 8. 点「Leave demo」回到连接页。
72
-
73
- **B. 连接真电脑(约 1 分钟,推荐,说明不是空壳)**
74
- 9. 连接页点扫码 → 允许相机 → 扫电脑上「Connect mobile device」页的二维码。
75
- 10. 连上后打开真实会话,发一句需要执行命令的话,手机弹审批卡,点 Allow once,电脑端同步消失。
76
- 11. 电脑上任务完成时,手机收到本地通知(App 在后台时,下拉通知中心给镜头)。
77
-
78
- **C. 苹果点名要看的三类(本 App 都没有,口头/字幕说明即可)**
79
- - 账号注册、登录、删除账号:无账号。
80
- - 用户生成内容与举报/屏蔽:无用户间共享内容。
81
- - 付费内容:无内购。
82
- 可以在录屏最后加一屏字幕或旁白:“No accounts, no user-generated content, no purchases.”
83
-
84
- **D. 上传**
85
- - 视频传到 `site/static/media/`(已 gitignore)后 `cd site && wrangler deploy`,或用任何可公开访问的链接;同时把文件传到 App Review Information 的 Attachment。
86
- - 把 Notes 里的 `<VIDEO_URL>` 换成真实链接,重新提交。
87
-
88
- ---
89
-
90
- ## 回应 Prevent Common Issues
91
-
92
- | 条目 | 状态 |
93
- | --- | --- |
94
- | 2.1 崩溃/真机 | 录屏就是在真机上完成;录前用 TestFlight 装同一个 build 走一遍 |
95
- | 2.1 访问 App | 无账号;演示模式免电脑,Notes 里已写步骤 |
96
- | 2.3.3 截图 | 现有截图是 App 实际界面(`store/screenshots/apple/`),不是标题图/登录页;Header 图 `header_3840x1646` 是宣传图,不属于「截图」栏,若审核提到再核对 |
97
- | 3.1.1 内购 | 无内购,无充值入口 |
98
- | 3.2 其他商业模式 | 面向个人开发者公开发布,不是企业内部 App |
99
-
100
- ---
101
-
102
- ## 真机当天准备清单(2026-11-05)
103
-
104
- 本机现状(已检查):Mac 在 Wi-Fi `172.16.6.197`;`~/.dsh` 里已装好 `@dsh-mobile/mobile-remote` 插件;DSH 目前**没有在运行**;Mac 防火墙关闭;Xcode 有一个 Apple Development 证书,但按 `project-ios-release-status` 的记录团队里**还没有注册任何测试设备**。
105
-
106
- ### 1. 数据线连上后(手机上)
107
- 1. 解锁 iPhone,插线,弹窗点「信任此电脑」并输入锁屏密码。
108
- 2. 确认 Mac 看得到手机:`xcrun devicectl list devices`(现在输出 "No devices found")。
109
- 3. 系统语言切成 English(设置 → 通用 → 语言与地区),审核员看到的是英文界面,录屏要一致。
110
- 4. 关掉勿扰以外的私人通知预览,或先开一个干净的专注模式;录屏里要能看到本地通知,所以通知总开关要开。
111
-
112
- ### 2. 把 App 装到手机:两条路,推荐 A
113
- **A. TestFlight(推荐)**:装的就是已上传的 3.2.4 (32),和审核员拿到的是同一个二进制,不用注册设备、不用签名。
114
- - App Store Connect → TestFlight:把你的 Apple ID 加进内部测试组;build 32 如果还在「缺少合规信息」,先回答出口合规问卷。
115
- - iPhone 上装 TestFlight,用同一 Apple ID 登录,安装 DSH Mobile。
116
- - 这次只补 Notes,不需要新 build,可直接用 build 32 重新提交。
117
-
118
- **B. 数据线直装(备选)**:需要把这台手机的 UDID 注册进开发者账号。API Key 只有 App Manager 权限,做不了;要用 Xcode(已登录管理员 Apple ID)打开 `dsh-mobile-app/ios/Runner.xcworkspace`,选中手机,Signing 勾自动管理,Run 时让 Xcode 自动注册设备。Flutter 的 debug 包拔线后在主屏点开会闪退,要装 release:`flutter run --release`。
119
-
120
- ### 3. 电脑端(录「连接真电脑」那一段才需要)
121
- ```bash
122
- npx @deepseek-ai/dsh web --no-open
123
- ```
124
- - 终端会打印「手机 App 连接信息」(地址 + 口令);DSH 设置 → 连接移动端设备 页面有二维码。
125
- - 手机和 Mac 必须在同一 Wi-Fi(Mac 是 `172.16.6.x` 网段,手机也要是)。
126
- - Mac 开着一个代理/VPN(utun4,198.18.x 假 IP)。如果扫码连不上,在 App 里手动输入「Mac 局域网 IP:端口」和口令,不要用域名。
127
- - 首次连接 iOS 会弹两个权限:本地网络、相机,都点允许;通知权限也点允许。
128
-
129
- ### 4. 录屏方式
130
- - **最省事**:iPhone 控制中心的屏幕录制(设置 → 控制中心 → 添加「屏幕录制」)。**在主屏上先开始录,再点 App 图标**,这样「从启动开始」就被录进去了。录完在相册里看,AirDrop 或数据线拷到 Mac。
131
- - **用线的好处**:QuickTime Player → 文件 → 新建影片录制 → 录制按钮旁的箭头选 iPhone 为摄像头,画面更稳,可同时录 Mac 麦克风旁白。
132
- - 在设置里不要开「显示触摸」之类的辅助功能,也不要出现你的 Apple ID、账单信息。
133
-
134
- ### 5. 录完
135
- 按上面「录屏脚本」A、B、C 段走,传视频、替换 Notes 里的 `<VIDEO_URL>`、版本记录改成 3.2.4、选 build 32、重新提交。