dsh-plugin-tether 0.1.19 → 0.1.21

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
@@ -2,6 +2,32 @@
2
2
 
3
3
  本文件记录面向用户的变化。每个版本的这一节会原样作为该版本 Release 的说明。
4
4
 
5
+ ## 0.1.21
6
+
7
+ ### 修复
8
+
9
+ - **在 dsh desktop 里启动时会弹出一个控制台窗口**([#15](https://github.com/zexadev/dsh-tether/issues/15))。插件拉起 sidecar 时没让 Windows 隐藏新窗口。dsh desktop 的插件宿主是以 Node 模式运行的 Electron,属 GUI 程序、自己没有控制台,Windows 于是给 sidecar(控制台程序)新分配一个控制台,连窗口一起显示出来。在终端里跑 dsh 不会这样:宿主已有控制台,子进程直接继承,所以这个窗口只在 desktop 下出现。现在新分配的窗口不再显示;终端里跑 dsh 时 sidecar 的日志照旧打在同一个终端。
10
+
11
+ ### English
12
+
13
+ Starting the plugin inside dsh desktop popped up a console window ([#15](https://github.com/zexadev/dsh-tether/issues/15)). The plugin spawned its sidecar without asking Windows to hide the new window. The plugin host of dsh desktop is Electron running in Node mode — a GUI program that owns no console — so Windows allocated a fresh console for the sidecar, which is a console program, and showed its window along with it. Running dsh in a terminal never did this, because the host already owns a console and the child simply inherits it, which is why the window only ever appeared under desktop. The newly allocated window is now hidden, and sidecar logs still go to the same terminal when you run dsh there.
14
+
15
+ ## 0.1.20
16
+
17
+ ### 修复
18
+
19
+ - **手机本地模式下发不出图**(0.1.14 起每一版都有)。附件入库时 dsh 会把目标目录的每一级祖先逐个 fsync,边界却取的是文件系统根,于是这个 walk 一定会走出 App 的沙箱。Android 上 `/data/user/0` 的权限是 `drwxrwx--x`,普通 App 只有 x 没有 r,而 fsync 一个目录必须先只读打开它 —— 于是恒 EACCES,界面报 `prompt rejected`,详情是 `EACCES: permission denied, open '/data/user/0'`。发消息不受影响:会话落盘那条路只 fsync 自己那两三层目录、从不往上 walk,所以只验发消息永远发现不了这个问题。现在打包运行时时把目录 fsync 改成「没权限就跳过这一级」。不损失 durability:App 能创建的目录都在沙箱内、照旧被 fsync,再往上全是本进程从未改动过的系统目录。
20
+
21
+ ### 变更
22
+
23
+ - **手机本地模式内置的 dsh 从 `0.1.5-rc.2` 升到 `0.2.0-rc.2`**。装上这一版后,第一次启动本地模式会重新解压运行时。dsh 0.2 换了会话记录的格式:手机上已有的会话打开后照常显示,再发消息时会迁到新格式,旧文件原样留着。真机上逐条验过——重新解压、旧会话打开与迁移、新建会话、发一条消息、发一张图。arm64 包因内置运行时变大,从约 71 MB 涨到约 78 MB;其余 ABI 不含运行时,体积不变。
24
+
25
+ ### English
26
+
27
+ Sending an image in local mode on the phone has never worked since 0.1.14. Ingesting an attachment fsyncs every ancestor of the target directory up to a boundary, and that boundary is the filesystem root — so the walk always leaves the app sandbox. On Android `/data/user/0` is `drwxrwx--x`, leaving an ordinary app with execute but no read, and fsyncing a directory requires opening it read-only first, so it always fails with `EACCES: permission denied, open '/data/user/0'` and the interface reports `prompt rejected`. Sending text was never affected, because session persistence only fsyncs its own two or three levels and never walks upward — which is exactly why testing only "send a message" could never surface it. Directory fsync now skips any level the app may not open; nothing durable is lost, since every directory the app can create is inside the sandbox and still gets fsynced, and everything above it is a system directory this process never touched.
28
+
29
+ The dsh bundled into Android local mode moves from `0.1.5-rc.2` to `0.2.0-rc.2`. The first local-mode start after this update unpacks the runtime again. dsh 0.2 changes the session record format: sessions already on the phone still open and display as before, and migrate to the new format the next time you send a message, with the old file left in place. Verified on a real device end to end — unpacking, opening and migrating an existing session, creating a new one, sending a message, and sending an image. The `arm64` APK grows from about 71 MB to about 78 MB because of the larger bundled runtime; the other ABIs carry no runtime and are unchanged.
30
+
5
31
  ## 0.1.19
6
32
 
7
33
  ### 修复
package/README.md CHANGED
@@ -87,10 +87,10 @@ From then on the app connects by itself when you open it.
87
87
 
88
88
  Open the app → **Hosts** in the top bar → **Run on this phone**. The first start unpacks the runtime first (about 9 seconds measured); after that the DSH interface appears in about 2 seconds. Enter an API key in Settings and start talking.
89
89
 
90
- - **Install and go**: no Termux, no terminal, no commands, no root. Node 24 and the full dependency tree of dsh `0.1.5-rc.2` ship inside the APK and unpack offline on first start; after that only model API calls need the network.
90
+ - **Install and go**: no Termux, no terminal, no commands, no root. Node 24 and the full dependency tree of dsh `0.2.0-rc.2` ship inside the APK and unpack offline on first start; after that only model API calls need the network.
91
91
  - **No pairing**: dsh is on this phone, there is no remote end. Sessions, settings and workspaces live only on the phone and are entirely separate from what you see when connected to a machine; switching back and forth touches neither.
92
92
  - **Stays up**: while running there is a persistent notification (a foreground service), so backgrounding or locking the screen does not get the process reclaimed. If the process is killed anyway, the next launch restarts it; sessions are already on disk.
93
- - **Versioned with the app**: the bundled dsh upgrades with the app; currently `0.1.5-rc.2`.
93
+ - **Versioned with the app**: the bundled dsh upgrades with the app; currently `0.2.0-rc.2`.
94
94
  - Only the `arm64` APK carries local mode; iOS forbids child processes, so the iOS build has no such entry.
95
95
  - The phone has no bash and no full coreutils, so shell-dependent tools are incomplete; chat and file read/write are unaffected.
96
96
 
@@ -136,7 +136,7 @@ The Termux route still works if you prefer it: install dsh and this plugin insid
136
136
  - The app connects when you open it and holds no background connection — Android's doze would not let it anyway.
137
137
  - The interface on the phone is DSH's own; the narrow-screen fit comes from minimal injected styles, so a dsh layout change may need a follow-up here.
138
138
  - English and Chinese: the app follows your phone's system language, terminal output follows the computer's, and the part injected into the dsh interface follows dsh's own language setting. There is no separate language switch.
139
- - Local mode exists only in the `arm64` build, never on iOS; the phone lacks bash and a full coreutils, so shell-dependent tools are incomplete. The `arm64` APK is about 71 MB because of the bundled runtime; the others are about 32 MB.
139
+ - Local mode exists only in the `arm64` build, never on iOS; the phone lacks bash and a full coreutils, so shell-dependent tools are incomplete. The `arm64` APK is about 78 MB because of the bundled runtime; the others are about 32 MB.
140
140
  - Verified against dsh **`0.1.0-rc.7`**, **`0.1.0-rc.8`**, **`0.1.2`** (alpha and rc.1), **`0.1.5-alpha.1`**, **`0.1.5-rc.2`**, **`0.1.6-alpha.2`**, **`0.1.7-rc.2`**, **`0.2.0-rc.2`** and **`0.2.1-alpha.1`**. dsh is in developer preview — check this line before assuming a newer dsh works. From 0.1.7 dsh refuses to install a plugin whose declared range does not cover it, so a version outside this line is a refusal at install time rather than a silent risk. The browser authentication dsh introduced in 0.1.2-alpha is handled entirely on the machine side; the phone app needs no update for it.
141
141
 
142
142
  ## What has been verified
package/README.zh.md CHANGED
@@ -87,10 +87,10 @@ dsh plugin --profile web add .
87
87
 
88
88
  打开 App → 顶栏「主机」→ **在本机运行**。第一次要先解压运行时(实测约 9 秒),之后每次约 2 秒出现 dsh 的界面;在设置里填上 API Key 就能对话。
89
89
 
90
- - **装完即用**:不装 Termux、不开终端、不敲命令、不要 root。Node 24 与 dsh `0.1.5-rc.2` 的完整依赖树打在 APK 里,首次启动离线解压;之后只有调用模型 API 才需要网络。
90
+ - **装完即用**:不装 Termux、不开终端、不敲命令、不要 root。Node 24 与 dsh `0.2.0-rc.2` 的完整依赖树打在 APK 里,首次启动离线解压;之后只有调用模型 API 才需要网络。
91
91
  - **没有配对**:dsh 就在这台手机上,没有远端。会话、设置、工作区只存在手机里,和连电脑时看到的完全是两套,来回切换互不影响。
92
92
  - **常驻**:运行期间有一条常驻通知(前台服务),退后台、锁屏不会被系统收掉;进程真被杀了,下次打开 App 自动重起,会话已落盘不丢。
93
- - **版本随 App 走**:内置的 dsh 随 App 升级一起升,当前内置 `0.1.5-rc.2`。
93
+ - **版本随 App 走**:内置的 dsh 随 App 升级一起升,当前内置 `0.2.0-rc.2`。
94
94
  - 只有 `arm64` 的 APK 带本地模式;iOS 的沙箱不允许子进程,iOS 版没有这个入口。
95
95
  - 手机上没有 bash 和完整的 coreutils,依赖 shell 的工具用不全;对话、文件读写不受影响。
96
96
 
@@ -136,7 +136,7 @@ dsh plugin --profile web add .
136
136
  - App 打开时才连接,不在后台常驻——Android 的 doze 也留不住它。
137
137
  - 手机上的界面是 DSH 自己的,窄屏适配靠注入的最小样式完成;dsh 改版式时可能需要跟进。
138
138
  - 中英双语:App 界面跟随手机的系统语言;电脑终端上的输出跟随电脑的系统语言;注入 dsh 界面的那部分跟随 dsh 自己的语言设置。没有单独的语言开关。
139
- - 本地模式只有 `arm64` 包有,iOS 没有;手机上没有 bash 与完整 coreutils,依赖 shell 的工具用不全。arm64 包因内置运行时约 71 MB,其余包约 32 MB。
139
+ - 本地模式只有 `arm64` 包有,iOS 没有;手机上没有 bash 与完整 coreutils,依赖 shell 的工具用不全。arm64 包因内置运行时约 78 MB,其余包约 32 MB。
140
140
  - 已针对 dsh **`0.1.0-rc.7`**、**`0.1.0-rc.8`**、**`0.1.2`**(alpha 与 rc.1)、**`0.1.5-alpha.1`**、**`0.1.5-rc.2`**、**`0.1.6-alpha.2`**、**`0.1.7-rc.2`**、**`0.2.0-rc.2`** 与 **`0.2.1-alpha.1`** 验证。dsh 处于 developer preview,换更新的 dsh 之前先看这一行。0.1.7 起 dsh 会拒绝安装声明范围没覆盖自己的插件,所以这一行之外的版本是装不上,而不是装上了埋雷。dsh 0.1.2-alpha 引入的浏览器认证完全在电脑侧处理,手机 App 无需更新。
141
141
 
142
142
  ## 验证过什么
package/index.js CHANGED
@@ -175,7 +175,11 @@ function apply(ctx, config = {}) {
175
175
  // sidecar 的人读日志与这里打在同一个终端上,语言跟着走,免得一半中文一半英文
176
176
  const args = ['host', '--proxy-target', proxyTarget, '--lang', terminalZh ? 'zh' : 'en']
177
177
  if (config.pair) args.push('--pair')
178
- const child = spawn(binary, args, { stdio: ['pipe', 'pipe', 'inherit'] })
178
+ // windowsHide:dsh desktop 的插件宿主是 ELECTRON_RUN_AS_NODE 跑的 Electron,GUI 子系统、自己没有
179
+ // console,于是 Windows 给这个 console 子系统的 sidecar 分配一个新 console 并把窗口显示出来。该
180
+ // 选项让 libuv 传 SW_HIDE,新分配的窗口不显示;stderr 的 inherit 不受影响,在终端里跑 dsh 时
181
+ // sidecar 的日志照旧打在同一个终端
182
+ const child = spawn(binary, args, { stdio: ['pipe', 'pipe', 'inherit'], windowsHide: true })
179
183
  ctx.effect(() => () => { child.kill() })
180
184
  /** sidecar 不在了的原因;undefined = 活着。等它回话的路由用来立即报错 */
181
185
  let sidecarGone
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-tether",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Mobile client for the DeepSeek Harness — use the dsh on your dev machine from your Android or iOS phone, remotely across networks, peer-to-peer over iroh with no server to set up (falls back to a relay that only sees ciphertext)",
5
5
  "keywords": [
6
6
  "dsh",
@@ -42,7 +42,8 @@
42
42
  },
43
43
  "androidRuntime": {
44
44
  "node": "24.18.0",
45
- "dsh": "0.1.5-rc.2"
45
+ "dsh": "0.2.0-rc.2",
46
+ "koffi": "3.3.0"
46
47
  }
47
48
  },
48
49
  "peerDependencies": {
@@ -54,11 +55,11 @@
54
55
  "@deepseek-ai/dsh-user-approval": { "optional": true }
55
56
  },
56
57
  "optionalDependencies": {
57
- "dsh-tether-host-android-arm64": "0.1.19",
58
- "dsh-tether-host-darwin-arm64": "0.1.19",
59
- "dsh-tether-host-darwin-x64": "0.1.19",
60
- "dsh-tether-host-linux-arm64": "0.1.19",
61
- "dsh-tether-host-linux-x64": "0.1.19",
62
- "dsh-tether-host-win32-x64": "0.1.19"
58
+ "dsh-tether-host-android-arm64": "0.1.21",
59
+ "dsh-tether-host-darwin-arm64": "0.1.21",
60
+ "dsh-tether-host-darwin-x64": "0.1.21",
61
+ "dsh-tether-host-linux-arm64": "0.1.21",
62
+ "dsh-tether-host-linux-x64": "0.1.21",
63
+ "dsh-tether-host-win32-x64": "0.1.21"
63
64
  }
64
65
  }