dsh-plugin-tether 0.1.16 → 0.1.18
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 +22 -0
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/index.js +12 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
本文件记录面向用户的变化。每个版本的这一节会原样作为该版本 Release 的说明。
|
|
4
4
|
|
|
5
|
+
## 0.1.18
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
|
|
9
|
+
- **dsh 0.1.7 装不上这个插件**([#13](https://github.com/zexadev/dsh-tether/issues/13))。dsh 从 0.1.7 起会按插件声明的兼容范围拦安装:范围没覆盖当前 runtime 就直接拒装,而本插件的范围停在 0.1.5 族,于是 0.1.6 和 0.1.7 的用户一律被拒(0.1.6 本身没有这道闸,照装不提示)。范围放宽到 0.1.7 族。放宽之前 0.1.6-alpha.2 与 0.1.7-rc.2 都逐条实测过:插件加载与 sidecar、浏览器认证的 cookie 兑换与逐请求注入、注入进界面的手机版式、三条路由与跨站栅栏(伪 Host / 跨站标记 / 跨源 Origin 全部 403)、目录选择器补丁、以及经 P2P 代理流取到的界面与电脑上直接打开的逐字一致。
|
|
10
|
+
|
|
11
|
+
### English
|
|
12
|
+
|
|
13
|
+
dsh 0.1.7 started refusing to install plugins whose declared compatibility range does not cover the running dsh, and this plugin still declared up to the 0.1.5 family — so everyone on 0.1.6 or 0.1.7 was turned away at install time. The range now covers the 0.1.7 family, after verifying both 0.1.6-alpha.2 and 0.1.7-rc.2 end to end: pairing over P2P, browser-auth cookie exchange and per-request injection, the phone layout injected into the interface, the three plugin routes with their cross-site guard, the directory-picker patch, and the interface fetched through the proxy stream matching the one served locally byte for byte.
|
|
14
|
+
|
|
15
|
+
## 0.1.17
|
|
16
|
+
|
|
17
|
+
### 修复
|
|
18
|
+
|
|
19
|
+
- **sidecar 自己的 `--help` 还是中文**([#8](https://github.com/zexadev/dsh-tether/issues/8))。0.1.16 把界面和终端输出都做了英文,唯独 `tether-host --help` 和每个参数的说明漏了,手跑二进制的人只能对着中文猜参数。现在帮助文本也按语言出中英。
|
|
20
|
+
- **Windows 和 macOS 上手跑 sidecar 恒出中文**。判定语言只认 `LC_ALL`/`LANG`,而这两个系统本来就不设这两个变量,英文用户于是必得中文。现在环境变量没有就问系统语言。
|
|
21
|
+
- **配对失败的原因在手机上显示成中文**。原因是电脑侧直接把中文句子发给了手机——这句该由看到它的那一端来措辞。线上改成只传原因码,手机 App 和 dsh 界面各按自己那侧的语言显示。另有几处写死的中文一并补齐(phone-sim 的代理就绪、本地代理监听失败、前台服务日志、移除设备失败)。
|
|
22
|
+
|
|
23
|
+
### English
|
|
24
|
+
|
|
25
|
+
This release finishes what 0.1.16 started: `tether-host --help` and all option descriptions are now English on an English machine, the language is detected from the system when `LC_ALL`/`LANG` are unset (which is the normal case on Windows and macOS), and a failed pairing is now worded by whichever side displays it, so the phone no longer shows a Chinese reason. Nothing a user can see is Chinese-only any more; if you find something, please open an issue.
|
|
26
|
+
|
|
5
27
|
## 0.1.16
|
|
6
28
|
|
|
7
29
|
### 新增
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<a href="../../releases"><img src="https://img.shields.io/github/downloads/zexadev/dsh-tether/total?style=flat&label=downloads&color=4D6BFE" alt="Downloads"></a>
|
|
18
18
|
<a href="../../stargazers"><img src="https://img.shields.io/github/stars/zexadev/dsh-tether?style=flat&label=%E2%98%85&color=08C" alt="Stars"></a>
|
|
19
19
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat" alt="MIT"></a>
|
|
20
|
-
<img src="https://img.shields.io/badge/dsh-0.1.0--rc.7%20%7C%20rc.8%20%7C%200.1.2%20%7C%200.1.5-4D6BFE?style=flat" alt="dsh 0.1.0-rc.7 | rc.8 | 0.1.2 | 0.1.5">
|
|
20
|
+
<img src="https://img.shields.io/badge/dsh-0.1.0--rc.7%20%7C%20rc.8%20%7C%200.1.2%20%7C%200.1.5%20%7C%200.1.6%20%7C%200.1.7-4D6BFE?style=flat" alt="dsh 0.1.0-rc.7 | rc.8 | 0.1.2 | 0.1.5 | 0.1.6 | 0.1.7">
|
|
21
21
|
<img src="https://img.shields.io/badge/Android-4493F8?style=flat" alt="Android">
|
|
22
22
|
<img src="https://img.shields.io/badge/iOS-beta-8E8E93?style=flat" alt="iOS beta">
|
|
23
23
|
<a href="https://www.dsh.so/artifact/dsh-tether"><img src="https://www.dsh.so/badge/dsh-tether.svg" alt="dsh.so security scan"></a>
|
|
@@ -137,7 +137,7 @@ The Termux route still works if you prefer it: install dsh and this plugin insid
|
|
|
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
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.
|
|
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`** and **`0.1.
|
|
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`** and **`0.1.7-rc.2`**. 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
|
|
143
143
|
|
package/README.zh.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<a href="../../releases"><img src="https://img.shields.io/github/downloads/zexadev/dsh-tether/total?style=flat&label=downloads&color=4D6BFE" alt="下载量"></a>
|
|
18
18
|
<a href="../../stargazers"><img src="https://img.shields.io/github/stars/zexadev/dsh-tether?style=flat&label=%E2%98%85&color=08C" alt="Stars"></a>
|
|
19
19
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat" alt="MIT"></a>
|
|
20
|
-
<img src="https://img.shields.io/badge/dsh-0.1.0--rc.7%20%7C%20rc.8%20%7C%200.1.2%20%7C%200.1.5-4D6BFE?style=flat" alt="dsh 0.1.0-rc.7 | rc.8 | 0.1.2 | 0.1.5">
|
|
20
|
+
<img src="https://img.shields.io/badge/dsh-0.1.0--rc.7%20%7C%20rc.8%20%7C%200.1.2%20%7C%200.1.5%20%7C%200.1.6%20%7C%200.1.7-4D6BFE?style=flat" alt="dsh 0.1.0-rc.7 | rc.8 | 0.1.2 | 0.1.5 | 0.1.6 | 0.1.7">
|
|
21
21
|
<img src="https://img.shields.io/badge/Android-4493F8?style=flat" alt="Android">
|
|
22
22
|
<img src="https://img.shields.io/badge/iOS-%E6%B5%8B%E8%AF%95%E7%89%88-8E8E93?style=flat" alt="iOS 测试版">
|
|
23
23
|
<a href="https://www.dsh.so/artifact/dsh-tether"><img src="https://www.dsh.so/badge/dsh-tether.svg" alt="dsh.so 安全扫描"></a>
|
|
@@ -137,7 +137,7 @@ dsh plugin --profile web add .
|
|
|
137
137
|
- 手机上的界面是 DSH 自己的,窄屏适配靠注入的最小样式完成;dsh 改版式时可能需要跟进。
|
|
138
138
|
- 中英双语:App 界面跟随手机的系统语言;电脑终端上的输出跟随电脑的系统语言;注入 dsh 界面的那部分跟随 dsh 自己的语言设置。没有单独的语言开关。
|
|
139
139
|
- 本地模式只有 `arm64` 包有,iOS 没有;手机上没有 bash 与完整 coreutils,依赖 shell 的工具用不全。arm64 包因内置运行时约 71 MB,其余包约 32 MB。
|
|
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.
|
|
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`** 验证。dsh 处于 developer preview,换更新的 dsh 之前先看这一行。0.1.7 起 dsh 会拒绝安装声明范围没覆盖自己的插件,所以这一行之外的版本是装不上,而不是装上了埋雷。dsh 0.1.2-alpha 引入的浏览器认证完全在电脑侧处理,手机 App 无需更新。
|
|
141
141
|
|
|
142
142
|
## 验证过什么
|
|
143
143
|
|
package/index.js
CHANGED
|
@@ -26,6 +26,16 @@ const terminalZh = /^zh/i.test(
|
|
|
26
26
|
)
|
|
27
27
|
/** 终端文案 */
|
|
28
28
|
const tt = (zh, en) => (terminalZh ? zh : en)
|
|
29
|
+
/**
|
|
30
|
+
* sidecar 发的是配对失败原因码(tether-core 定义),不是人话——同一条消息手机上也要显示,
|
|
31
|
+
* 只能各端各译。认不出的原样带出:0.1.16 及更早的 sidecar 直接发中文句子。
|
|
32
|
+
*/
|
|
33
|
+
const pairFailText = (code) => ({
|
|
34
|
+
'no-window': tt('主机上没有开着的配对窗口', 'no pairing window is open'),
|
|
35
|
+
expired: tt('配对窗口已过期', 'the pairing window expired'),
|
|
36
|
+
'too-many-attempts': tt('配对码试错次数超限', 'too many wrong codes'),
|
|
37
|
+
'bad-code': tt('配对码不正确', 'wrong pairing code'),
|
|
38
|
+
}[code] ?? code)
|
|
29
39
|
/** 路由文案 */
|
|
30
40
|
const tr = (req, zh, en) => {
|
|
31
41
|
const declared = req.headers['x-dsh-tether-lang'] || req.headers['accept-language'] || ''
|
|
@@ -215,7 +225,7 @@ function apply(ctx, config = {}) {
|
|
|
215
225
|
break
|
|
216
226
|
}
|
|
217
227
|
case 'pairing-closed':
|
|
218
|
-
console.log(`[tether] ${tt('配对窗口已关闭: ', 'the pairing window closed: ')}${msg.reason}`)
|
|
228
|
+
console.log(`[tether] ${tt('配对窗口已关闭: ', 'the pairing window closed: ')}${pairFailText(msg.reason)}`)
|
|
219
229
|
break
|
|
220
230
|
case 'pairing-done':
|
|
221
231
|
console.log(`[tether] ${tt('配对成功: ', 'paired: ')}${msg.name}(${msg.peer.slice(0, 16)}…)`)
|
|
@@ -660,7 +670,7 @@ function injectNarrowScreenCss(html) {
|
|
|
660
670
|
.catch(function (e) {
|
|
661
671
|
drop.disabled = false
|
|
662
672
|
drop.textContent = tx('移除失败', 'Removal failed')
|
|
663
|
-
console.error('[dsh-tether] 移除设备失败', e)
|
|
673
|
+
console.error('[dsh-tether] ' + tx('移除设备失败', 'could not remove the device'), e)
|
|
664
674
|
})
|
|
665
675
|
})
|
|
666
676
|
row.append(dot, label, drop)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-tether",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
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",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@deepseek-ai/dsh-host-webserver": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.2-alpha.0 <0.1.3-0 || >=0.1.5-alpha.0 <0.1.
|
|
50
|
-
"@deepseek-ai/dsh-user-approval": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.2-alpha.0 <0.1.3-0 || >=0.1.5-alpha.0 <0.1.
|
|
49
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.2-alpha.0 <0.1.3-0 || >=0.1.5-alpha.0 <0.1.8-0",
|
|
50
|
+
"@deepseek-ai/dsh-user-approval": ">=0.1.0-rc.7 <0.1.1-0 || >=0.1.2-alpha.0 <0.1.3-0 || >=0.1.5-alpha.0 <0.1.8-0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"@deepseek-ai/dsh-host-webserver": { "optional": true },
|
|
54
54
|
"@deepseek-ai/dsh-user-approval": { "optional": true }
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"dsh-tether-host-android-arm64": "0.1.
|
|
58
|
-
"dsh-tether-host-darwin-arm64": "0.1.
|
|
59
|
-
"dsh-tether-host-darwin-x64": "0.1.
|
|
60
|
-
"dsh-tether-host-linux-arm64": "0.1.
|
|
61
|
-
"dsh-tether-host-linux-x64": "0.1.
|
|
62
|
-
"dsh-tether-host-win32-x64": "0.1.
|
|
57
|
+
"dsh-tether-host-android-arm64": "0.1.18",
|
|
58
|
+
"dsh-tether-host-darwin-arm64": "0.1.18",
|
|
59
|
+
"dsh-tether-host-darwin-x64": "0.1.18",
|
|
60
|
+
"dsh-tether-host-linux-arm64": "0.1.18",
|
|
61
|
+
"dsh-tether-host-linux-x64": "0.1.18",
|
|
62
|
+
"dsh-tether-host-win32-x64": "0.1.18"
|
|
63
63
|
}
|
|
64
64
|
}
|