@khorsheed/dsh-mobile 0.1.2 → 0.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # 变更记录
2
2
 
3
+ ## 0.1.4(2026-10-22)
4
+
5
+ 移动端面板整编(2026-10-02 自适应面板波)与一波活体反馈修复;适配宿主 0.2.1 线。
6
+
7
+ - **全宽移动面板取代桌面标签栏**:新建会话旁新增统一面板入口,打开后全宽展示宿主右栏面板——独立的 52px 面板导航承载返回键、可横向滚动的具名页签与「添加」,关闭按钮归入活动页签;仅展示活动栏(含浮窗),不改写宿主保存的分栏与浮窗位置。面板内容保持挂载,选择、草稿与滚动状态不丢,返回恢复原控件焦点;宿主把右列收起为零宽时面板仍锚定整个 frame 全宽展开。
8
+ - **页签改扁平下划线样式**:等高纯文字页签,活动页签加粗并以强调色下划线托住文字与关闭按钮(桌面式凸起盒子在手机上读作异物);关闭点击区收紧为 24px 宽、占满导航高度。触屏设备上抬高面板字号 token。
9
+ - **官方侧栏抽屉只在明确请求时打开**(设置 → 工作区):重连后宿主自行展开的桌面抽屉会被收回,其遮罩不再以灰色条带盖住打开中的面板。
10
+ - **触屏/触控笔长按归还原生文字选择**:不再用同一手势弹出竞争的消息弹窗,原有消息动作栏保留可用。
11
+ - **性能**:流式消息增量不再触发整页布局与面板扫描(观察器忽略已验证历史槽位的内部变化);Room 成员列表未变化时保留原快照,不再重复发通知或触发兼容刷新。
12
+ - **适配宿主 0.2.1 线**:`@deepseek-ai/dsh-*` peer 区间追加 `^0.2.1-rc.1`(`^0.2.0-rc.1` 在 npm/pnpm 严格解析下不覆盖 0.2.1 预发布三元组);宿主 0.2.1 移除 invariants 体系,随包 invariant 伴生退役、兼容判定改由 package.json `engines.dsh` 声明。对 0.2.1-rc.1 树全量构建+测试通过;真机/网络验收矩阵完成前仍不声明 verifiedHost。
13
+
14
+ ## 0.1.3(2026-09-30)
15
+
16
+ 无功能变更。加宽 `@deepseek-ai/dsh-*` peer 区间以覆盖宿主 0.2.0(0.2.0 的兼容闸会禁用 peer 区间不覆盖宿主版本的已装插件)。
17
+
3
18
  ## 0.1.2(2026-09-28)
4
19
 
5
20
  - **public tunnel 恢复**,QR 码按隧道可达性门禁——隧道不通时不再展示一张扫不开的二维码
package/README.en.md CHANGED
@@ -17,7 +17,7 @@ The official Web client is desktop-shaped: a sidebar that eats the screen, a den
17
17
  - **Pick a computer directory from your phone** — saved workspaces, one-level folder browsing, parent navigation, a hidden-folder toggle and a validated absolute-path fallback. Workspace adoption and Room member picks share this sheet; desktop clients keep the native chooser.
18
18
  - **Connect a phone by QR** — an authenticated Web settings section mints the official login link for your deployment's HTTPS origin and shows it as a locally encoded QR; the iOS shell scans, confirms the host, and is in.
19
19
  - **Versioned native bridge** — an authenticated `GET /api/mobile/handshake` plus a bridge-version-1 message channel for presentation status and optional native settings/scanning. Foreground recovery rides the official connection service and never replays a send command; brief interruptions and initial connecting states avoid redundant reconnects, while a suspension of 5 s or more still refreshes the stream generation.
20
- - **Plays well with the ecosystem, requires none of it** — no community plugin is a boot dependency. Long-press recognized user messages for message-tools' original copy/edit/withdraw; the plus sheet opens Room's original invite form; TaskPilot and Local Agent surfaces keep their owners.
20
+ - **Plays well with the ecosystem, requires none of it** — no community plugin is a boot dependency. Message action rows retain message-tools' original copy/edit/withdraw, while touch long-press selects text natively; the plus sheet opens Room's original invite form; TaskPilot and Local Agent surfaces keep their owners.
21
21
 
22
22
  This is a development baseline, not a released or real-device-qualified app — see Known Limitations.
23
23
 
@@ -56,13 +56,11 @@ DSH_MOBILE_PUBLIC_ORIGIN=https://YOUR-HOST.trycloudflare.com dsh web --no-open -
56
56
  Different physical networks need an independently configured HTTPS/WSS ingress to the loopback Host port, valid official authentication, an awake/online Mac and a reachable phone — starting the Host alone does not establish remote access, and the App does not configure networking or credentials for you. Debug simulator builds allow HTTP on loopback only; Release requires HTTPS.
57
57
 
58
58
 
59
- ### Desktop Quick Tunnel recovery
59
+ ### Public entry checks and rescanning
60
60
 
61
61
  The connection page anonymously probes the configured public root before offering or generating a QR. An unavailable origin returns an actionable state without issuing a login URL. A displayed QR is checked every 15 seconds and hidden if the endpoint fails or changes. This is a computer-side reachability check, not a guarantee about the phone's network.
62
62
 
63
- For this repository's supervised 3080 deployment, `pnpm mobile:tunnel` runs an opt-in desktop recovery manager; `--repair-now` skips the initial three-check delay. It checks every 30 seconds, waits through a local host outage, and rebuilds only after three consecutive public failures. Recovery attempts have a ten-minute cooldown. It starts an exact-origin loopback ingress and a new Quick Tunnel, then calls `pnpm deploy:3080 --package packages/mobile --mobile-origin https://new-link.trycloudflare.com`. This runs the normal build/test and guarded `reconfigure` path, updating the existing public-origin/trusted-host bindings and preserving other launch settings. It restarts the host; failure retains the guard's restore-previous behavior. Changed mobile/deployment source files block automated deployment.
64
-
65
- Keep the manager running under the computer's service manager (for example, a per-user macOS LaunchAgent). It is separate from the host process and is not installed by the plugin. `DSH_HOME` selects the existing supervised deployment; `CLOUDFLARED_BIN` optionally supplies the installed cloudflared binary. State and diagnostic logs live under `$DSH_HOME/state/mobile-tunnel/`; they contain no login tokens. Only an existing explicit Quick Tunnel binding is supported: no wildcard trusted hosts, account provisioning, or automatic changes to the phone. After rotation, reopen **Connect phone** and scan its new QR.
63
+ Checks only report connection status: they do not rebuild tunnels, deploy plugins or restart the host. The deployment operator restores a failed public entry manually; changes to host origin or trust bindings that require a restart must be explicitly scheduled first. Once the computer-side address is available, reopen **Connect phone** and scan the new QR on the phone. The phone address is not updated automatically.
66
64
 
67
65
  ## Optional: a Quick Tunnel preview
68
66
 
@@ -78,12 +76,12 @@ The bundled `examples/https-ingress.mjs` binds loopback only, preserves the publ
78
76
 
79
77
  ## Optional collaboration surfaces
80
78
 
81
- Install message-tools, TaskPilot, Room and the Local Agent family separately; mobile reads their public capabilities and never requires them to boot. Long-press recognized user messages for the original copy/edit/withdraw actions; unrecognized renderers keep their original controls. The plus sheet opens **Room's original invite form** styled as a mobile bottom sheet — provider discovery, authentication, random names, first-task dispatch and removal confirmation all stay with Room; there is no second mobile invite/edit API. Mobile temporarily adapts the public `uiWorkspace.pickDirectory` method in this browser so Room's original form consumes the sheet's result unchanged, and restores it on unload. Room and Local Agent keep their own composers, so not every ordinary-session TaskPilot pill is promised inside a Room. A known Room revision can leave the composer election stale after its first asynchronous cache fill; a declining mobile chain entry refreshes the public slot election without replacing its winner. See the [collaboration acceptance](../../docs/acceptance/mobile-collaboration-2026-09-12.md).
79
+ Install message-tools, TaskPilot, Room and the Local Agent family separately; mobile reads their public capabilities and never requires them to boot. Copy/edit/withdraw remain on the original message action rows; touch long-press selects text natively without a second message menu. The plus sheet opens **Room's original invite form** styled as a mobile bottom sheet — provider discovery, authentication, random names, first-task dispatch and removal confirmation all stay with Room; there is no second mobile invite/edit API. Mobile temporarily adapts the public `uiWorkspace.pickDirectory` method in this browser so Room's original form consumes the sheet's result unchanged, and restores it on unload. Room and Local Agent keep their own composers, so not every ordinary-session TaskPilot pill is promised inside a Room. A known Room revision can leave the composer election stale after its first asynchronous cache fill; a declining mobile chain entry refreshes the public slot election without replacing its winner. See the [collaboration acceptance](../../docs/acceptance/mobile-collaboration-2026-09-12.md).
82
80
 
83
81
  ## Compatibility
84
82
 
85
83
  - npm release line (`@deepseek-ai/dsh@0.1.5-rc.1`): ⚠️ usable with documented degradations — `dsh.compat.minHost` is `0.1.5-rc.1`. Local browser/Host validation and the iOS simulator build pass on `0.1.5-rc.1` (`183f08e9c6`), but the mobile layout and iOS shell are still under validation; **Safari live-reply resume on 0.1.5-rc.1 requires the opt-in bundled ingress adapter** (`MOBILE_SAFARI_COMPAT=1`, see Internals); **device pairing and push are not provided**. Older hosts: stay below `minHost` at your own risk — none are supported.
86
- - source line (deepseek-harness master): build+test green against the pinned `0.1.7-rc.2` surface (2026-09-27), but per `dsh.compat` no `verifiedHost` is claimed while the real-device/network acceptance matrix is incomplete — audit before adopting other hosts.
84
+ - source line (deepseek-harness master): host-021 wave: full build+test green against the 0.2.1-rc.1 tree, but per `dsh.compat` no `verifiedHost` is claimed while the real-device/network acceptance matrix is incomplete — audit before adopting other hosts.
87
85
 
88
86
  The library uses the optional official sessions/workspaces/uiWorkspace services, filtering archived sessions and subagent rows while retaining ordinary forks; a missing service falls back to the basic official sidebar. The public frame/slot DOM anchors are checked before the layout enables; an unknown frame keeps the official page — a changed structure can reduce mobile usability without breaking Host execution. Native bridge version changes require an App compatibility decision; compatible Web updates do not automatically require a new IPA. See the [navigation/QR acceptance](../../docs/acceptance/mobile-navigation-2026-09-11.md), the [rc1 acceptance evidence](../../docs/acceptance/mobile-rc1-2026-09-11.md) and the [proposal](../../proposals/active/2026-08-19-mobile-access.md). No upstream or sibling source changes are required.
89
87
 
@@ -113,6 +111,12 @@ The library uses the optional official sessions/workspaces/uiWorkspace services,
113
111
 
114
112
  </details>
115
113
 
114
+ ## Mobile panels
115
+
116
+ A panel action sits beside new conversation in the chat header. Mobile panels use full-width content, horizontally scrollable tabs, add and close actions, retaining the host content tree and saved desktop splits. Missing optional sidebar capabilities or checked DOM anchors preserve the official surface. File plugins can share the retained master/detail layout; canvas links and editing remain owned by the original component.
117
+
118
+ Repository component preview: run `pnpm exec tsx examples/panels/serve.ts` from `packages/mobile`, then open `http://127.0.0.1:8875/`. It uses actual navigation, DockLayout, AdaptiveSplit and LinkView with in-memory sample data; it is not a production instance or phone acceptance test. Preview sources are excluded from the npm package. iPhone keyboard, safe-area and background/resume checks remain pending; a terminal key accessory is not implemented.
119
+
116
120
  ## Development
117
121
 
118
122
  Part of the [dsh-plugins](https://github.com/Khorsheed/dsh-plugins) monorepo (`packages/mobile`). Issues and contributions welcome there.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # last confirmed-consistent state. Both languages carry equal authority; after
3
3
  # editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/mobile/README.en.md
5
- packages/mobile/README.en.md: aedcdd10fd6a33f134e2b47764852c251e8571ae
6
- packages/mobile/README.md: 872d2ff32cf881a39fa40404ed7f5edd17d06c41
5
+ packages/mobile/README.en.md: 4e7ce4a45ddc29b64246ea97b7e6b8b24c07be46
6
+ packages/mobile/README.md: 3ba98cfafe44b675eacd77f1e528c8e8d617c685
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  - **在手机上选电脑目录**——已有工作区、逐级浏览、返回上级、显示隐藏目录、校验完整路径。工作区接入和 Room 成员目录选择共用此面板;桌面客户端保留原生选择器。
18
18
  - **扫码连接手机**——已认证的 Web 设置分区为部署的 HTTPS origin 现场生成官方登录链接,并在浏览器本地编码成二维码;iOS 壳扫码、确认主机即连上。
19
19
  - **带版本的原生桥接**——受认证的 `GET /api/mobile/handshake` 加 bridge version 1 消息通道,提供展示状态与可选原生设置/扫码入口。回前台经官方连接服务恢复,绝不重放发送命令;短暂切换且连接正常、初次正在连接时不重复重连,后台停留至少 5 秒仍刷新流式连接代际。
20
- - **与生态共处,但不强依赖**——没有任何社区插件是启动依赖。长按已识别的用户消息调用 message-tools 原有的复制/编辑/撤回;加号面板打开 Room 原有邀请表单;TaskPilot 与 Local Agent 界面各归其主。
20
+ - **与生态共处,但不强依赖**——没有任何社区插件是启动依赖。消息动作栏保留 message-tools 原有的复制/编辑/撤回,触屏长按用于系统文字选择;加号面板打开 Room 原有邀请表单;TaskPilot 与 Local Agent 界面各归其主。
21
21
 
22
22
  当前是开发基线,尚未发布或通过真机资格验收——见已知限制。
23
23
 
@@ -56,13 +56,11 @@ DSH_MOBILE_PUBLIC_ORIGIN=https://YOUR-HOST.trycloudflare.com dsh web --no-open -
56
56
  跨物理网络需要独立配置的 HTTPS/WSS 入口转发到 loopback Host 端口、有效官方认证、保持唤醒联网的 Mac 和网络可达的手机——仅启动 Host 不等于远程可用,App 也不会替你配置网络或凭据。Debug 模拟器构建仅允许 loopback HTTP,Release 要求 HTTPS。
57
57
 
58
58
 
59
- ### 电脑端 Quick Tunnel 自动恢复
59
+ ### 公网入口检查与重新扫码
60
60
 
61
61
  连接手机页面在提供或生成二维码前,会匿名检查已配置的公网入口。不可达时返回明确状态,不签发登录链接。正在展示的二维码每 15 秒复查一次,入口失效或变化时收起。这是电脑侧连通性检查,不能保证手机所处网络同样可达。
62
62
 
63
- 本仓库受监督的 3080 部署可选择运行 `pnpm mobile:tunnel`,`--repair-now` 可跳过初始三次检测的等待。管理进程每 30 秒检测一次,本地宿主不可用时等待;公网连续三次失败才重建,恢复尝试之间至少间隔十分钟。它启动严格绑定新域名的 loopback 转发和新 Quick Tunnel,再调用 `pnpm deploy:3080 --package packages/mobile --mobile-origin https://new-link.trycloudflare.com`,通过正常构建、测试及受控 `reconfigure` 更新原有公网地址和信任域名,其余启动设置不变。此过程会重启宿主,失败保留守护进程的回退机制。移动包或部署代码存在未提交修改时,自动部署会被阻止。
64
-
65
- 通过电脑的服务管理器保持运行,例如 macOS 的用户级 LaunchAgent。它独立于宿主进程,不由插件自动安装。`DSH_HOME` 指向现有受监督部署,`CLOUDFLARED_BIN` 可指定已安装的 cloudflared。状态和诊断日志位于 `$DSH_HOME/state/mobile-tunnel/`,不包含登录 token。仅支持已明确配置的 Quick Tunnel:不增加通配信任、不注册账号、不自动修改手机地址。域名切换后重新打开「连接手机」,扫描新二维码即可。
63
+ 检查只报告连接状态,不重建隧道、不部署插件、不重启宿主。公网入口失效时,由部署者手动恢复入口;需要变更宿主地址或信任域名的操作应先明确安排重启。电脑端地址可用后,重新打开「连接手机」,手机扫描新二维码即可。不会自动更新手机地址。
66
64
 
67
65
  ## 可选:Quick Tunnel 预览
68
66
 
@@ -78,12 +76,12 @@ dsh web --no-open --port 3181 --trusted-host YOUR-HOST.trycloudflare.com # 独
78
76
 
79
77
  ## 可选协作界面
80
78
 
81
- message-tools、TaskPilot、Room 与 Local Agent 家族独立安装;移动端读取它们的公开能力,从不把它们作为启动依赖。长按已识别的用户消息调用原有复制/编辑/撤回;无法识别的渲染器保留原控件。加号面板打开 **Room 原有邀请表单**,仅调整为移动端底部面板样式——代理发现、认证、随机命名、首个任务派发和移除确认都由 Room 负责,不存在第二套移动邀请/编辑 API。移动端在当前浏览器内临时适配公开的 `uiWorkspace.pickDirectory` 方法,让 Room 原表单原样消费面板返回的结果,卸载时恢复。Room 与 Local Agent 保留各自输入框,因此不承诺 Room 内展示全部普通会话的 TaskPilot 胶囊。已知 Room 版本首次异步填充缓存时可能未刷新输入框选举;移动端用一个始终让出的 chain 条目刷新公开槽位选举,不替换胜者。参见[协作验收](../../docs/acceptance/mobile-collaboration-2026-09-12.md)。
79
+ message-tools、TaskPilot、Room 与 Local Agent 家族独立安装;移动端读取它们的公开能力,从不把它们作为启动依赖。复制/编辑/撤回使用原有消息动作栏;触屏长按用于系统文字选择,不再弹出第二套消息菜单。加号面板打开 **Room 原有邀请表单**,仅调整为移动端底部面板样式——代理发现、认证、随机命名、首个任务派发和移除确认都由 Room 负责,不存在第二套移动邀请/编辑 API。移动端在当前浏览器内临时适配公开的 `uiWorkspace.pickDirectory` 方法,让 Room 原表单原样消费面板返回的结果,卸载时恢复。Room 与 Local Agent 保留各自输入框,因此不承诺 Room 内展示全部普通会话的 TaskPilot 胶囊。已知 Room 版本首次异步填充缓存时可能未刷新输入框选举;移动端用一个始终让出的 chain 条目刷新公开槽位选举,不替换胜者。参见[协作验收](../../docs/acceptance/mobile-collaboration-2026-09-12.md)。
82
80
 
83
81
  ## Compatibility
84
82
 
85
83
  - npm 发布线(`@deepseek-ai/dsh@0.1.5-rc.1`):⚠️ 可用,带已声明的降级——`dsh.compat.minHost` 为 `0.1.5-rc.1`。本地浏览器/Host 验证与 iOS 模拟器构建在 `0.1.5-rc.1`(`183f08e9c6`)上通过,但移动布局与 iOS 壳仍在验收中;**Safari 在 0.1.5-rc.1 上恢复进行中回复需要选择启用的随包 ingress 适配层**(`MOBILE_SAFARI_COMPAT=1`,见「实现原理」);**不提供设备配对与推送**。更旧的宿主:低于 `minHost` 自行承担风险——均不受支持。
86
- - 源码线(deepseek-harness master):对固定的 `0.1.7-rc.2` 类型面构建+测试通过(2026-09-27),但按 `dsh.compat` 的声明,真机/网络验收矩阵完成前不声明 `verifiedHost`——在其他宿主上采用前请先审计。
84
+ - 源码线(deepseek-harness master):host-021 波对 0.2.1-rc.1 树全量构建+测试通过,但按 `dsh.compat` 的声明,真机/网络验收矩阵完成前不声明 `verifiedHost`——在其他宿主上采用前请先审计。
87
85
 
88
86
  会话首页使用可选的官方 sessions/workspaces/uiWorkspace 服务,过滤已归档会话和子代理行、保留普通分叉会话;缺少服务时回退基础官方侧栏。启用布局前检查公开 frame/slot DOM 锚点;未知结构保留官方页面——结构变化可能降低移动可用性,但不改变 Host 执行。原生桥接版本变化需要判断 App 兼容性;兼容的 Web 更新不自动要求重发 IPA。参见[导航/扫码验收](../../docs/acceptance/mobile-navigation-2026-09-11.md)、[rc1 验收证据](../../docs/acceptance/mobile-rc1-2026-09-11.md)与[提案](../../proposals/active/2026-08-19-mobile-access.md)。无需修改官方或兄弟插件源码。
89
87
 
@@ -113,6 +111,12 @@ message-tools、TaskPilot、Room 与 Local Agent 家族独立安装;移动端
113
111
 
114
112
  </details>
115
113
 
114
+ ## 移动面板
115
+
116
+ 聊天顶部的新建会话旁提供面板入口。移动面板使用全宽内容、可左右滑动的多标签、添加和关闭操作,保留宿主原有内容与桌面分栏记录;可选 sidebar 能力或 DOM 锚点不匹配时保留官方界面。文件类插件可复用共享主从布局,画布继续由原组件处理连线和编辑。
117
+
118
+ 仓库内组件预览:在 `packages/mobile` 下运行 `pnpm exec tsx examples/panels/serve.ts`,打开 `http://127.0.0.1:8875/`。它使用真实导航、DockLayout、AdaptiveSplit 和 LinkView,但数据为内存样例;不是生产实例或手机验收。预览源码不进入 npm 包。iPhone 键盘、安全区、前后台恢复仍需真机检查;终端快捷键栏未实现。
119
+
116
120
  ## 开发
117
121
 
118
122
  隶属 [dsh-plugins](https://github.com/Khorsheed/dsh-plugins) monorepo(`packages/mobile`)。问题与贡献请移步该仓库。