dsh-plugin-tether 0.1.9 → 0.1.11

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 (3) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/index.js +23 -0
  3. package/package.json +7 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  本文件记录面向用户的变化。每个版本的这一节会原样作为该版本 Release 的说明。
4
4
 
5
+ ## 0.1.11
6
+
7
+ ### 新增
8
+
9
+ - **`tether-host` 新增 android-arm64 平台子包,支持在 Termux 里跑**([#5](https://github.com/zexadev/dsh-tether/issues/5))。sidecar 本身是与 tauri 无关的纯 CLI,交叉编译到 `aarch64-linux-android`(NDK,API 24)与其余四个平台走的是同一套打包流程。Termux 的 Node 把 `process.platform` 报成 `android`(不是 `linux`),`index.js` 现有的自动选包逻辑按这个字段筛,所以是新增一个平台子包而不是复用 linux-arm64。
10
+
11
+ ### 修复
12
+
13
+ - **iOS:配对必然 `timed out`,主机侧完全收不到配对请求**([#6](https://github.com/zexadev/dsh-tether/issues/6))。iOS 14 起,发往同网段私网 IP 的收发受内核层 Local Network Privacy 管控,且不区分是否经 NWFramework——iroh/quinn 用的原始 UDP socket 同样受限。此前 `Info.ios.plist` 只有 `NSAllowsLocalNetworking`(管 WebView 加载本机代理页面的 ATS 例外),没有 `NSLocalNetworkUsageDescription`,系统既不弹权限询问也不放行局域网收发。
14
+
15
+ 现补上这个键,系统会弹一次性授权询问。**本修复未在 iOS 真机验证**,由用户反馈发现;若升级后仍 timed out,麻烦在 issue 里确认安装后是否弹出过「本地网络」权限询问、以及设置里该权限是否开启。
16
+
17
+ ## 0.1.10
18
+
19
+ ### 修复
20
+
21
+ - **macOS / Linux:sidecar 起不来,配对时报「sidecar 没有在 5 秒内给出配对码」,终端见 Permission denied**。npm 平台子包里的 `tether-host` 二进制自首个版本起就缺可执行位——CI 的 artifact 传输不保留 Unix 权限位,打包时原样带进了 tgz。Windows 不看执行位,故只在 Mac/Linux 上暴露。由 Mac 用户反馈发现。
22
+
23
+ 现打包前补回执行位,并对每个发布产物断言执行位存在,缺位则发布直接失败。**Mac/Linux 用户升级本版即修复**:`dsh plugin --profile web add dsh-plugin-tether@0.1.10`。如暂不升级,也可手动 `chmod 0755` 装好的 `dsh-tether-host-*/bin/tether-host` 应急。
24
+
25
+ - sidecar 启动失败不再只留一句干瘪的错误:插件现在会接住并打印可读原因(EACCES 附排查提示),「连接手机」弹窗里也会立即显示原因,而不是干等 5 秒换一个 504。
26
+
5
27
  ## 0.1.9
6
28
 
7
29
  ### 新增
package/index.js CHANGED
@@ -107,10 +107,22 @@ function apply(ctx, config = {}) {
107
107
  if (config.pair) args.push('--pair')
108
108
  const child = spawn(binary, args, { stdio: ['pipe', 'pipe', 'inherit'] })
109
109
  ctx.effect(() => () => { child.kill() })
110
+ /** sidecar 不在了的原因;undefined = 活着。等它回话的路由用来立即报错 */
111
+ let sidecarGone
110
112
  child.on('exit', (code) => {
111
113
  // sidecar 死了必须可见:手机端会静默失联,而电脑侧一切照常
114
+ sidecarGone = `sidecar 已退出(code=${code})`
112
115
  console.error(`[tether] sidecar 退出 code=${code};手机端已失联`)
113
116
  })
117
+ // spawn 失败只走 error 不走 exit;不接住就是 uncaught。EACCES 曾实发过:
118
+ // 打包丢了二进制执行位,现场只有一句干瘪的 Permission denied,毫无指向
119
+ child.on('error', (error) => {
120
+ const hint = error.code === 'EACCES'
121
+ ? ';EACCES 通常是二进制缺可执行位,试 chmod 0755 该文件并升级插件'
122
+ : ''
123
+ sidecarGone = `sidecar 启动失败: ${error.message}${hint}`
124
+ console.error(`[tether] ${sidecarGone}(${binary})`)
125
+ })
114
126
 
115
127
  const send = (msg) => { child.stdin.write(JSON.stringify(msg) + '\n') }
116
128
  let endpointId = ''
@@ -250,6 +262,12 @@ function apply(ctx, config = {}) {
250
262
  path: PAIRING_PATH,
251
263
  handler: async (req, res) => {
252
264
  if (!isTrustedRequest(req)) return refuse(res)
265
+ // sidecar 不在了就别让人干等 5 秒换一个不明所以的 504
266
+ if (sidecarGone !== undefined) {
267
+ res.writeHead(502, { 'content-type': 'text/plain; charset=utf-8' })
268
+ res.end(sidecarGone)
269
+ return
270
+ }
253
271
  const result = await new Promise((resolve) => {
254
272
  pendingPairing = resolve
255
273
  send({ type: 'pairing-begin' })
@@ -276,6 +294,11 @@ function apply(ctx, config = {}) {
276
294
  path: DEVICES_PATH,
277
295
  handler: async (req, res) => {
278
296
  if (!isTrustedRequest(req)) return refuse(res)
297
+ if (sidecarGone !== undefined) {
298
+ res.writeHead(502, { 'content-type': 'text/plain; charset=utf-8' })
299
+ res.end(sidecarGone)
300
+ return
301
+ }
279
302
  if (req.method === 'POST') {
280
303
  const id = await readForgetId(req)
281
304
  if (id === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-tether",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
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 with no server in between (iroh)",
5
5
  "keywords": [
6
6
  "dsh",
@@ -50,10 +50,11 @@
50
50
  "@deepseek-ai/dsh-user-approval": { "optional": true }
51
51
  },
52
52
  "optionalDependencies": {
53
- "dsh-tether-host-darwin-arm64": "0.1.9",
54
- "dsh-tether-host-darwin-x64": "0.1.9",
55
- "dsh-tether-host-linux-arm64": "0.1.9",
56
- "dsh-tether-host-linux-x64": "0.1.9",
57
- "dsh-tether-host-win32-x64": "0.1.9"
53
+ "dsh-tether-host-android-arm64": "0.1.11",
54
+ "dsh-tether-host-darwin-arm64": "0.1.11",
55
+ "dsh-tether-host-darwin-x64": "0.1.11",
56
+ "dsh-tether-host-linux-arm64": "0.1.11",
57
+ "dsh-tether-host-linux-x64": "0.1.11",
58
+ "dsh-tether-host-win32-x64": "0.1.11"
58
59
  }
59
60
  }