@dsh-mobile/mobile-remote 3.2.7 → 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.
- package/FAQ.md +19 -12
- package/README.md +38 -39
- package/cordis.patch.yml +8 -4
- package/docs/PRIVACY-POLICY.en.md +87 -46
- package/docs/PRIVACY-POLICY.md +87 -46
- package/docs/SUPPORT.md +5 -5
- package/docs/USER-GUIDE.zh-CN.md +562 -0
- package/lib/assistant-prefs.js +147 -0
- package/lib/auto-config.js +55 -3
- package/lib/backup.js +405 -0
- package/lib/break-reminder.js +133 -0
- package/lib/client.js +56 -10
- package/lib/config.js +94 -5
- package/lib/git-read-bundled-provider.js +12 -3
- package/lib/git-read-service.js +4 -0
- package/lib/host-compat.js +25 -0
- package/lib/http-util.js +6 -2
- package/lib/index.js +949 -70
- package/lib/memory/context.js +76 -0
- package/lib/memory/decay.js +144 -0
- package/lib/memory/extract.js +146 -0
- package/lib/memory/routes.js +198 -0
- package/lib/memory/store.js +667 -0
- package/lib/notify-copy.js +245 -0
- package/lib/permission-guide.js +184 -0
- package/lib/persona-cards.js +362 -0
- package/lib/proactive-material.js +162 -0
- package/lib/proactive.js +369 -0
- package/lib/protected-paths.js +130 -0
- package/lib/protocol.js +35 -0
- package/lib/rate-limit.js +1 -1
- package/lib/relay/connector.js +97 -12
- package/lib/relay/devices.js +14 -0
- package/lib/relay/fingerprint.js +55 -0
- package/lib/relay/identity.js +69 -0
- package/lib/relay/on-demand.js +84 -0
- package/lib/relay/phone.js +87 -12
- package/lib/reminders.js +140 -0
- package/lib/rpc-adapter.js +21 -2
- package/lib/session-rotation.js +198 -0
- package/lib/timeline.js +1 -1
- package/package.json +30 -14
- package/CHANGELOG.md +0 -1383
- package/CONTRIBUTING.md +0 -61
- package/docs/00-/345/274/200/345/217/221/346/200/273/347/272/262.md +0 -432
- package/docs/01-PRD.md +0 -148
- package/docs/02-architecture.md +0 -249
- package/docs/03-api.md +0 -882
- package/docs/04-security.md +0 -110
- package/docs/05-test-cases.md +0 -376
- package/docs/06-install-run.md +0 -335
- package/docs/07-user-manual.md +0 -92
- package/docs/08-/346/211/251/345/261/225/345/274/200/345/217/221/346/214/207/345/215/227.md +0 -86
- package/docs/09-compatibility.md +0 -201
- package/docs/11-remote-relay-guide.md +0 -86
- package/docs/APP-ENCRYPTION-DESCRIPTION.md +0 -50
- package/docs/APP-ENCRYPTION-DESCRIPTION.pdf +0 -0
- package/docs/APP-REVIEW-NOTES.md +0 -105
- package/docs/BRAND-ASSETS.md +0 -142
- package/docs/COMPANION-PLAN.md +0 -199
- package/docs/STORE-LAUNCH.md +0 -341
- package/docs/STORE-LISTING.md +0 -190
package/docs/09-compatibility.md
DELETED
|
@@ -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
|
-
| 充值入口 | 2026-11-02 曾移除,2026-11-17 恢复 | 只在用量页 DeepSeek 余额卡上显示「充值」,地址用插件下发的 `topUpUrl`(来自 DSH 账号服务);App 不硬编码,旧插件不下发时不显示。旧的 `catalog.rechargeUrl` / `rechargeUrl` 配置仍忽略 |
|
|
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,86 +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
|
-
> **手机端:** 3.2.6 起随版本发布:`Features.remoteAccess` 默认开启,发布脚本都带
|
|
10
|
-
> `--dart-define=DSH_REMOTE_ACCESS=true`。需要临时关掉时用 `--dart-define=DSH_REMOTE_ACCESS=false`。
|
|
11
|
-
> 公开网络是**订阅能力**:手机侧连接中继必须带账号签发的短期票据,未订阅会被 402 拒绝;局域网直连不受影响。
|
|
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` 冒烟通过)。电脑侧挂房间免费;手机侧自 2026-11-17 起
|
|
46
|
-
要求有效订阅(`RELAY_REQUIRE_ENTITLEMENT=1`),审核可用 Sandbox 购买。
|
|
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 上运行~~:2026-11-16 起真实运行;2026-11-17 起手机侧订阅门槛线上生效
|
|
86
|
-
(无票据访客 `HTTP 402`,房主侧照常),仍**没有做负载测试**;真机验证只有 iOS 模拟器 + 局域网真机,中继全链路仍缺真机记录。
|
|
@@ -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
|
package/docs/APP-REVIEW-NOTES.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# App Review 补充材料(2.1 Information Needed)
|
|
2
|
-
|
|
3
|
-
> 适用版本:**3.2.7(含可选账号、公开网络订阅、已移除广告)**。
|
|
4
|
-
> 2026-11-17 重写:旧版写的是「无账号、无内购、中继默认关闭」,与当前二进制不符——按旧文提交会构成 2.3.1 元数据不准确。
|
|
5
|
-
> 粘贴到 App Store Connect → 版本 → App Review Information → **Notes**(上限 4000 字符)。
|
|
6
|
-
> Sign-in required 一栏**不要勾**:审核员不需要账号即可使用演示模式;账号只用于可选的公开网络订阅。
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## 粘贴到 Notes 的英文正文(约 3,300 字符)
|
|
11
|
-
|
|
12
|
-
```text
|
|
13
|
-
1. WHAT THE APP DOES
|
|
14
|
-
DSH Mobile is a mobile companion for DeepSeek Harness (DSH), AI coding-agent software that developers run on their own computer. It lets them continue a session, follow progress, answer the agent's questions and approve tool actions while the work keeps running on the computer. It is not a standalone AI app.
|
|
15
|
-
|
|
16
|
-
2. NO COMPUTER? USE THE BUILT-IN DEMO
|
|
17
|
-
a. Launch the app and tap "Got it" on the first-run guide.
|
|
18
|
-
b. Tap "Try the demo first (no computer needed)". A banner reads "Demo mode · sample data".
|
|
19
|
-
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".
|
|
20
|
-
d. Also available in demo: new session, notification center, session list, usage, Settings.
|
|
21
|
-
"Leave demo" returns to the connection screen. The demo needs no account, network or computer.
|
|
22
|
-
|
|
23
|
-
3. OPTIONAL ACCOUNT AND SUBSCRIPTION
|
|
24
|
-
The local-network connection needs no account. An account (Sign in with Google or Sign in with Apple) is needed only for the optional Public network relay and its subscription.
|
|
25
|
-
- Public network relay: when phone and computer are on different networks, both sides dial out to our relay. Traffic is end-to-end encrypted with Noise (X25519 + ChaCha20-Poly1305); the relay forwards ciphertext only and cannot read session content. The computer needs no inbound port.
|
|
26
|
-
- Subscription: auto-renewable, 1 month. The price is shown in the app from StoreKit / Google Play. Product IDs: com.mrdayone.dshmobile.relay.monthly (iOS) and relay_monthly (Android). Under the Subscribe button the paywall shows the auto-renewal terms in full: the 1-month term, that payment is charged to the App Store / Google Play account at confirmation, that the subscription renews automatically unless auto-renew is turned off at least 24 hours before the end of the current period, and how to manage or cancel. "Restore purchases" is on the same screen (signing in first if needed). Privacy Policy, Terms of Use (EULA) and "Manage subscription" links are directly below those terms.
|
|
27
|
-
- Sandbox purchases are accepted for review: a sandbox account can complete the purchase and the entitlement is activated, with no real charge. To test: sign in, open Settings > Account & subscription > Public network subscription, subscribe, then reconnect.
|
|
28
|
-
|
|
29
|
-
4. ACCOUNT DELETION
|
|
30
|
-
Settings > Account & subscription > Delete account calls DELETE /api/account and removes the account, identities, login sessions, subscription records and exports. Deleting the account does not cancel the store subscription; the paywall links to the store's subscription page.
|
|
31
|
-
|
|
32
|
-
5. DATA AND THIRD PARTIES
|
|
33
|
-
- Local network: messages, files and images go only between the phone and the user's own computer. No developer server is involved.
|
|
34
|
-
- Account: the Google/Apple identity token is verified server-side. We store the provider subject, email if provided, display name if provided, login session IDs, subscription status/expiry and short-lived relay tokens. We do not store Google/Apple tokens, passwords, payment details or session content.
|
|
35
|
-
- Relay metadata: source IP, room ID (a hash of the computer's public key), byte counts and time. The relay is not configured to persist request logs.
|
|
36
|
-
- No ads, analytics, crash-reporting or tracking SDK. The app does not read IDFA or GAID.
|
|
37
|
-
- No user-generated content is shared between users, so there is nothing to report or block. The app shows only the user's own agent output from their own computer.
|
|
38
|
-
- iOS frameworks: camera (QR scan), photo library (user-selected images), Keychain (tokens), Local Network, local notifications. Android: camera, notifications, optional overlay/foreground service for the desktop pet.
|
|
39
|
-
|
|
40
|
-
6. LINKS
|
|
41
|
-
Privacy Policy: https://dsh.claud.ing/en/privacy/
|
|
42
|
-
Terms of Use: https://dsh.claud.ing/en/terms/
|
|
43
|
-
Support: https://dsh.claud.ing/en/support/
|
|
44
|
-
Plugin: @dsh-mobile/mobile-remote
|
|
45
|
-
|
|
46
|
-
7. VIDEO
|
|
47
|
-
A screen recording captured on a physical iPhone is attached and also at <VIDEO_URL>. It shows: launch, first-run guide, demo session with streaming reply and tool approval, connection to a real DeepSeek Harness on the same Wi-Fi, Settings, and the account/subscription screen. If a sandbox account is available, the sandbox purchase is shown too.
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## 发布者提交前必须核对(我无法替你核实)
|
|
53
|
-
|
|
54
|
-
1. **构建号与商品**:Notes 里的版本要和构建一致;两个商店的订阅商品都处于「已批准 / 可购买」状态,商品 ID 与上文完全一致。
|
|
55
|
-
2. **Sandbox 可购买**:用 App Store Connect 的 Sandbox 测试账号走一遍「登录 → 订阅 → 恢复购买」,确认权益到账。服务端 3.2.6 起默认接受 `Production` 与 `Sandbox`(`relay/cloudflare/wrangler.toml` 的 `APPLE_ALLOWED_ENVIRONMENTS`)。**2026-11-17 线上核对:Worker 仍是旧部署(无通知路由、付费门槛关闭),必须重新 `npx wrangler deploy` 后再录屏;`node tools/verify-deployment.mjs` 全绿才算数。**
|
|
56
|
-
3. **App Store Server Notifications V2**:在 App Store Connect 填 `https://dsh.claud.ing/api/iap/apple/notifications`,否则自动续费后数据库不会更新(代码已接,URL 必须由你配置)。
|
|
57
|
-
4. **App Privacy**:仓库里的 `PrivacyInfo.xcprivacy` 已登记 Email Address / Name / User ID / Purchase History 四类;App Store Connect 问卷必须与之一致(见 `docs/STORE-LAUNCH.md` §3c)。
|
|
58
|
-
5. **录屏**:第 7 段里写的每一件事都要真的出现在视频里;没录沙盒购买就删掉最后半句。
|
|
59
|
-
6. **年龄分级 / 内容分级**里的广告项改回「无」,Play 的 `Contains ads` 改为 No。
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 录屏脚本(真机,iPhone,建议 3–5 分钟)
|
|
64
|
-
|
|
65
|
-
**准备**
|
|
66
|
-
- 卸载旧版再装待审 build,保证首次启动引导出现。
|
|
67
|
-
- 电脑装好 DeepSeek Harness 与插件 `@dsh-mobile/mobile-remote`,启动 `npx @deepseek-ai/dsh web --no-open`,手机与电脑同一 Wi-Fi。
|
|
68
|
-
- 准备一个 Sandbox 测试账号;开勿扰,避免私人通知入镜。
|
|
69
|
-
|
|
70
|
-
**A. 启动与演示(约 1.5 分钟)**
|
|
71
|
-
1. 桌面点图标启动 → 首次引导点「Got it」。
|
|
72
|
-
2. 连接页点「Try the demo first (no computer needed)」。
|
|
73
|
-
3. 打开示例会话 → 发 `run the tests` → 流式回复 → 审批卡点 **Allow once**,再发一次点 **Reject**。
|
|
74
|
-
4. 新建会话、通知页单删一条、设置页切语言/主题、打开隐私政策。
|
|
75
|
-
5. 「Leave demo」回连接页。
|
|
76
|
-
|
|
77
|
-
**B. 连接真电脑(约 1 分钟)**
|
|
78
|
-
6. 扫码 → 允许相机 → 扫电脑上的二维码。
|
|
79
|
-
7. 打开真实会话,发一句需要执行命令的话,手机弹审批卡,点 Allow once,电脑端同步消失。
|
|
80
|
-
8. 回到桌面,等任务完成,下拉通知中心展示本地通知。
|
|
81
|
-
|
|
82
|
-
**C. 账号与订阅(约 1 分钟,审核重点)**
|
|
83
|
-
9. 设置 → 账号与订阅 → 登录(Google 或 Apple)。
|
|
84
|
-
10. 点「公开网络订阅」,展示标题、订阅方案卡(1 个月 · 商店价格)、**自动续费协议**(期限、24 小时规则、管理与取消)、隐私政策 / 服务条款(EULA)/ 管理订阅三个链接,以及「恢复购买」。
|
|
85
|
-
11. 用 Sandbox 账号完成购买 → 权益变为已订阅 → 返回连接页展示「公开网络」入口。
|
|
86
|
-
12. 点「恢复购买」,展示仍能找回订阅。
|
|
87
|
-
13. 设置 → 账号与订阅 → 删除账号,展示二次确认(不必真的删;要删就用测试账号)。
|
|
88
|
-
|
|
89
|
-
**D. 上传**
|
|
90
|
-
- 视频传到可公开访问的链接(或直接作为 App Review Information 的 Attachment),替换 Notes 里的 `<VIDEO_URL>`。
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
## 回应 Prevent Common Issues
|
|
95
|
-
|
|
96
|
-
| 条目 | 状态 |
|
|
97
|
-
| --- | --- |
|
|
98
|
-
| 2.1 崩溃/真机 | 录屏在真机完成;提交前用 TestFlight 同一 build 走一遍 |
|
|
99
|
-
| 2.1 访问 App | 演示模式免电脑、免账号;账号只用于可选订阅 |
|
|
100
|
-
| 2.3.1 元数据准确 | 描述、截图、App Privacy 与 3.2.6 实际功能一致;不再声称「无账号 / 无内购」 |
|
|
101
|
-
| 3.1.1 内购 | 数字能力只走 IAP,无外链充值;付费墙有价格、期限、隐私政策、服务条款、恢复购买、管理订阅 |
|
|
102
|
-
| 3.1.2 订阅 | 1 个月自动续期;期限、扣款、提前 24 小时关闭自动续期的规则、取消方式与商店管理入口都在付费墙的「自动续费协议」内可见(`paywall-term-*` 有 widget 测试) |
|
|
103
|
-
| 4.8 登录 | 同时提供 Google 与 Apple 登录 |
|
|
104
|
-
| 5.1.1(v) | App 内可删除账号 |
|
|
105
|
-
| 2.3.3 截图 | 用最终构建的真实界面;iPhone 与 iPad 都覆盖 |
|
package/docs/BRAND-ASSETS.md
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Brand assets: provenance, contents, regeneration
|
|
2
|
-
|
|
3
|
-
**Status.** Two kinds of art ship in DSH Mobile:
|
|
4
|
-
|
|
5
|
-
1. **Pictures** (not code): the avatar **logo** and the full-body **illustration**
|
|
6
|
-
(`dsh-mobile-app/tools/brand/source/logo.png`, `illustration.png`). They are used as the default launcher icon, the
|
|
7
|
-
in-app logo (app bar, drawer, connect screen, pet panel) and the home-screen character.
|
|
8
|
-
2. **Drawn by code in this repository** (`dsh-mobile-app/lib/brand/`): a "D" chat-bubble mark, seven alternative launcher
|
|
9
|
-
icons and a fish mascot, which also drives the 16 Android floating-pet clips.
|
|
10
|
-
|
|
11
|
-
No DeepSeek artwork remains: the previous whale logo and the launcher icons derived from it were deleted (see "History"
|
|
12
|
-
at the end).
|
|
13
|
-
|
|
14
|
-
| | |
|
|
15
|
-
|---|---|
|
|
16
|
-
| Licence | Code-drawn art: MIT like the rest of the repository (`LICENSE`) |
|
|
17
|
-
| Source of truth | Code-drawn art: `dsh-mobile-app/lib/brand/*.dart` (Flutter `CustomPainter`s). Pictures: `dsh-mobile-app/tools/brand/source/*.png` |
|
|
18
|
-
| Generated by | `dsh-mobile-app/tools/brand/build.sh` (Flutter test renderer + `supplied_art.py` + `assemble.py`, Pillow) |
|
|
19
|
-
| Inputs | the two source pictures in `tools/brand/source/`; no downloaded images, no font or icon packs |
|
|
20
|
-
|
|
21
|
-
## What the art is
|
|
22
|
-
|
|
23
|
-
**Code-drawn brand mark** (`lib/brand/brand_mark.dart`; the basis of the seven alternative launcher icons). An abstract chat bubble shaped like a "D" (flat spine, round bowl, one
|
|
24
|
-
square corner) that holds a terminal prompt `>_` and an "online" status dot. It describes the product (a phone
|
|
25
|
-
companion for an AI coding agent). It is a flat 2-3 colour geometric shape: brand blue `#426EFE` (light) /
|
|
26
|
-
`#6C8CFF` (dark) with a green dot, prompt cut out of the bubble (transparent). It is deliberately not a whale or any
|
|
27
|
-
animal and shares no silhouette or composition with DeepSeek's logo.
|
|
28
|
-
|
|
29
|
-
**Launcher icons** (ids unchanged: `default, deepsea, shell, moon, sticker, stamp, neon, mono`). `default` is the logo
|
|
30
|
-
(see below). The other seven are code-drawn treatments (`lib/brand/app_icon_art.dart`): glowing deep-sea; scalloped
|
|
31
|
-
shell badge; moonlit night with a moon as the status dot; die-cut sticker of the fish mascot; postage stamp; neon tube;
|
|
32
|
-
monochrome (also the Android 13 themed-icon layer). The code-drawn "blue gradient tile" variant (`BrandVariant.tile`)
|
|
33
|
-
is no longer shipped as an icon.
|
|
34
|
-
|
|
35
|
-
**Code-drawn fish mascot** (`lib/brand/mascot.dart`). A chubby, round, non-humanoid fish built from ellipses,
|
|
36
|
-
leaf paths and arcs: flat fills, one outline colour, a crescent shade, a belly bib and a few highlights; expressive
|
|
37
|
-
eyes, brows, mouth, blush, fins, crest and forked tail. It is the source of the 16 Android floating-pet clips and of
|
|
38
|
-
the "sticker" launcher icon; the home screen no longer uses it. Colours follow the skin (`MascotColors.forSkin`):
|
|
39
|
-
`dsh` blue + teal, `abyss` teal, `soda` coral + blue fins, `whale` violet + gold fins, each for light and dark.
|
|
40
|
-
|
|
41
|
-
## Logo and illustration (`tools/brand/supplied_art.py`)
|
|
42
|
-
|
|
43
|
-
| Source | Used for | Derived files |
|
|
44
|
-
|---|---|---|
|
|
45
|
-
| `tools/brand/source/logo.png` (1254 x 1254, opaque) | default launcher icon, in-app logo | iOS `AppIcon.appiconset/*` (every size, opaque RGB, full-bleed square), `assets/icon-1024.png`, `assets/icons/default.png`, Android `mipmap-*/ic_launcher.png`, `ic_launcher_default{,_foreground,_background}.png`, `assets/brand/logo.png` (512) |
|
|
46
|
-
| `tools/brand/source/illustration.png` (1254 x 1254, transparent) | home-screen character (`HomePet`) | `assets/brand/illustration.webp` (trimmed to the character, 717 x 900, lossy WebP with alpha, ~170 KB) |
|
|
47
|
-
|
|
48
|
-
- The Android adaptive foreground is the logo with its white sticker background keyed out, scaled so the artwork stays
|
|
49
|
-
inside the 72 dp mask circle (about 52 % of the canvas); the background layer is plain white. Your artwork is cropped
|
|
50
|
-
flat at the bottom of the source image, and that edge is visible inside a circular launcher mask.
|
|
51
|
-
- The source pictures are **not** bundled in the app (they live outside `pubspec.yaml`'s asset list); only the derived
|
|
52
|
-
files above ship. The in-app widgets are `BrandAvatar` and `BrandIllustration` in `lib/brand/brand_art.dart`.
|
|
53
|
-
- A still picture cannot drive the Android floating pet's 16 animated clips, so those remain the code-drawn fish.
|
|
54
|
-
The home-screen character is animated procedurally (idle float, pat / poke / tail reactions) in `lib/widgets/home_pet.dart`.
|
|
55
|
-
|
|
56
|
-
## Files
|
|
57
|
-
|
|
58
|
-
| Asset | Path | Notes |
|
|
59
|
-
|---|---|---|
|
|
60
|
-
| Vector art | `dsh-mobile-app/lib/brand/{brand_mark,app_icon_art,mascot,brand_util}.dart` | `BrandMark`, `Mascot`, `MascotAvatar`, painters |
|
|
61
|
-
| Home screen character | `dsh-mobile-app/lib/widgets/home_pet.dart`, `lib/brand/brand_art.dart` | `HomePet` animates the illustration (`BrandIllustration`) |
|
|
62
|
-
| Store / source icon | `dsh-mobile-app/assets/icon-1024.png` | 1024 x 1024, opaque RGB, the logo |
|
|
63
|
-
| In-app logo | `dsh-mobile-app/assets/brand/logo.png` | 512 x 512 opaque, shown by `BrandAvatar` as a rounded tile |
|
|
64
|
-
| Code-drawn mark (transparent) | `dsh-mobile-app/assets/brand/logo-mark.png` | 512 x 512, used by the icon pipeline and previews |
|
|
65
|
-
| Home illustration | `dsh-mobile-app/assets/brand/illustration.webp` | 717 x 900, transparent |
|
|
66
|
-
| Icon previews | `dsh-mobile-app/assets/icons/<id>.png` | 256 x 256 opaque, shown by the settings icon picker |
|
|
67
|
-
| Android launcher | `android/app/src/main/res/mipmap-*/ic_launcher[_<id>][_foreground\|_background].png`, `ic_launcher_mono_monochrome.png` | legacy 48/72/96/144/192, adaptive layers 108/162/216/324/432 (art inside the 66 dp safe zone), verified |
|
|
68
|
-
| Notification icon | `android/app/src/main/res/drawable/ic_stat_dsh.png` | 200 x 200 white silhouette of the "D" mark, used as the status-bar small icon by both `FloatingBubbleService.kt` and the Flutter local notifications (Android draws only the alpha channel, so a coloured launcher icon would show as a white square) |
|
|
69
|
-
| iOS app icon | `ios/Runner/Assets.xcassets/AppIcon.appiconset/*.png` | every size in `Contents.json`, opaque RGB (no alpha), rendered natively per size |
|
|
70
|
-
| Android overlay pet | `android/app/src/main/assets/pet/<clip>.webp` + `pet-manifest.json` | 16 animated WebP clips, 288 x 229, 84 ms/frame, each at most 260 KB (about 2.6 MB in total) |
|
|
71
|
-
| Pet licence note | `android/app/src/main/assets/PET-LICENSE.txt` | states the MIT terms for the code-drawn pet animations |
|
|
72
|
-
|
|
73
|
-
### Android overlay clips
|
|
74
|
-
|
|
75
|
-
Frame count, `frameMs` and loop come from the `MascotPose` enum in `mascot.dart`; the build script writes them into
|
|
76
|
-
`pet-manifest.json` and checks every file against it (frame count, per-frame duration, loop flag, size).
|
|
77
|
-
Clip names, `stateMap`, `workingActivityMap`, micro-idle settings and the canvas size are unchanged, so the Kotlin
|
|
78
|
-
code needs no change.
|
|
79
|
-
|
|
80
|
-
| Clip | Frames | Duration | Loop | What it shows |
|
|
81
|
-
|---|---|---|---|---|
|
|
82
|
-
| `idle` | 40 | 3.4 s | yes | breathing, blinking, rising bubbles |
|
|
83
|
-
| `idle_stretch` / `idle_yawn` | 40 / 44 | 3.4 / 3.7 s | no | stretch with raised fins / yawn with a tear |
|
|
84
|
-
| `head_pat` / `poke` / `tail` | 20 / 18 / 20 | 1.7 / 1.5 / 1.7 s | no | happy squint and hearts / startled with "!" / tail flick |
|
|
85
|
-
| `thinking` | 40 | 3.4 s | yes | looks up, thought cloud |
|
|
86
|
-
| `working` / `working_command` / `working_search` | 40 | 3.4 s | yes | typing on a laptop with gears / terminal card / magnifier |
|
|
87
|
-
| `waiting` | 40 | 3.4 s | yes | raised fin and a "?" bubble |
|
|
88
|
-
| `success` | 48 | 4.0 s | no | three hops, confetti, check badge |
|
|
89
|
-
| `error` | 56 | 4.7 s | no | shock, then sad with tears and a warning badge |
|
|
90
|
-
| `eat_token` | 48 | 4.0 s | no | catches a token coin, chews, happy |
|
|
91
|
-
| `dragging` / `dragging_release` | 40 / 25 | 3.4 s / 2.1 s | yes / no | dangling and swinging / drop, squash, dizzy stars |
|
|
92
|
-
|
|
93
|
-
The previous clips were 121 frames (10.2 s) and about 1 MB each. The new one-shot clips are shorter. `success` now lasts
|
|
94
|
-
4.0 s instead of 10.2 s, and `error` 4.7 s instead of 5.0 s (`FloatingBubbleService.kt` uses the clip duration as the
|
|
95
|
-
pulse time of those two states, so the celebration and error pulses are shorter than before).
|
|
96
|
-
|
|
97
|
-
## Regenerating everything
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
cd dsh-mobile-app
|
|
101
|
-
tools/brand/build.sh # all rasters + verification (about 30 s, headless)
|
|
102
|
-
SHEETS=/tmp/brand-sheets tools/brand/build.sh # additionally render visual QA contact sheets
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Requirements: Flutter SDK on `PATH` (or `FLUTTER=/path/to/flutter`), `python3` with Pillow
|
|
106
|
-
(`pip install pillow`; animated WebP support is needed). No Android SDK, Xcode or network is required.
|
|
107
|
-
|
|
108
|
-
Stages:
|
|
109
|
-
|
|
110
|
-
1. `tools/brand/render_brand_test.dart` (`flutter test`, headless): renders icons, logo and iOS icons straight into the
|
|
111
|
-
asset locations and the overlay frames (2x, PNG) into `build/brand/frames/` (git-ignored) plus `clips.json`.
|
|
112
|
-
2. `tools/brand/assemble.py`: drops the alpha channel where an asset must be opaque, assembles the animated WebP clips
|
|
113
|
-
(2x2 box downsample, lossy quality 50 / alpha quality 30), writes `pet-manifest.json`, then **verifies**: WebP frame
|
|
114
|
-
count, per-frame duration and loop flag read from the RIFF chunks, 300 KB budget per clip, no frame touching the
|
|
115
|
-
canvas edge, iOS icons are RGB at the exact sizes of `Contents.json`, every Android density size, adaptive
|
|
116
|
-
foreground / monochrome art inside the safe zone, and that the old assets are gone. `python3 tools/brand/assemble.py
|
|
117
|
-
--verify-only` runs just the checks.
|
|
118
|
-
3. `tools/brand/contact_sheets_test.dart` (optional, `SHEETS=<dir>`): contact sheets of the mark at 256 / 180 / 120 / 60
|
|
119
|
-
/ 29 px on light and dark, the 8 icons with an iOS mask and at small sizes, adaptive layers on a circular mask,
|
|
120
|
-
all 16 mascot poses on every skin (light / dark), avatars and motion strips.
|
|
121
|
-
|
|
122
|
-
Output is deterministic: the same code produces the same pixels. Unit tests in `test/brand_art_test.dart` keep the
|
|
123
|
-
Dart pose table and `pet-manifest.json` in sync and check that every pose draws on every skin, that loops are
|
|
124
|
-
seamless, that no two consecutive clip frames are identical (the WebP encoder would merge them) and the `HomePet`
|
|
125
|
-
tap zones.
|
|
126
|
-
|
|
127
|
-
To change the artwork, edit the painters in `lib/brand/`, run `tools/brand/build.sh`, review the contact sheets and
|
|
128
|
-
commit the regenerated files together with the code.
|
|
129
|
-
|
|
130
|
-
## What was not verified in this environment
|
|
131
|
-
|
|
132
|
-
* Android native rendering (`AnimatedImageDrawable`, adaptive-icon masks on real launchers, themed icons) and the Kotlin
|
|
133
|
-
build: there is no Android SDK or device here. The files follow the same contract as before (names, sizes,
|
|
134
|
-
manifest keys); the checks above are file-level.
|
|
135
|
-
* iOS: icons are validated as RGB PNGs at the right sizes only; no Xcode / App Store validation was run.
|
|
136
|
-
|
|
137
|
-
## History
|
|
138
|
-
|
|
139
|
-
The git history still contains the removed files (the DeepSeek-derived logo and icons and the imported mascot frames,
|
|
140
|
-
for example `assets/deepseek-logo.png` and `assets/pet/*` at commit `d80c1a4`). They are not part of the current tree
|
|
141
|
-
or of any build. If the history itself must be free of them, rewrite it (for example `git filter-repo`) before
|
|
142
|
-
publishing.
|