dsh-lan-guard 0.7.7 → 0.7.9
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 +38 -0
- package/README.md +15 -11
- package/README.zh.md +15 -11
- package/lib/client.js +30 -13
- package/lib/client.js.map +1 -1
- package/lib/index.js +50 -5
- package/package.json +9 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.7.9] — 2026-11-03(适配 DSH 0.2.2-alpha.3)
|
|
4
|
+
|
|
5
|
+
- 修复 alpha.3 窄屏 transformed sidebar 把远程目录弹层裁成侧栏宽度的问题:使用原生 `dialog.showModal()` 进入浏览器顶层,DOM 仍归原 slot/React 所有,卸载关闭、Escape 交给 owner,busy 时不取消。
|
|
6
|
+
- 真实 alpha.3 页面中通过浏览器请求替换仅加载本插件本地构建:390px 视口,旧版遮罩 280px → 新版 390px;1024px 视口遮罩 1024px / 卡片 560px;侧栏与首页入口、Escape/取消通过。其余插件资源保持宿主原样。未改 profile、未安装;测试域名/本地转发不代表完整 LAN/WebSocket 或手机实机验收,未执行工作区登记或管理解锁。
|
|
7
|
+
- 宿主 webserver/connection/scope 的非 map 构建与类型逐字节等同 alpha.2;Cordis 内部生命周期重构未改变本插件调用的公开接口。类型环境更新到 DSH alpha.3、Cordis 4.0.6-alpha.2、Schemastery 3.18.6-alpha.2。
|
|
8
|
+
- 新增两项弹层结构回归;类型检查、23 个测试文件 / 390 项用例、构建、版本一致性与打包检查通过。
|
|
9
|
+
- README 中英文全部版本位置同步为 0.7.9 / 0.2.2-alpha.3,兼容清单共 13 个历史验证版本;说明 DSH alpha 与 latest/next 渠道不同(后者为 0.2.1-rc.5,本次未验证)。
|
|
10
|
+
- 纠正双语 README 的跨浏览器永久封禁误述、早已移除的自建回到底部按钮、浮轨尺寸及手势说明;不改变认证逻辑。更新适配 SOP 对顶层 engines.dsh 优先、DSH peers 后备的门禁说明。
|
|
11
|
+
- 发布限于当前工作区;现有 profile 仍运行 0.7.8,不修改其他插件或自动重启 DSH。
|
|
12
|
+
|
|
13
|
+
## [0.7.8] — 2026-10-28(适配 DSH 0.2.2-alpha.2)
|
|
14
|
+
|
|
15
|
+
兼容声明 + 一处跟随上游多语言界面的修复。
|
|
16
|
+
|
|
17
|
+
- `dsh.compatibility.dshReleases` 增加 `0.2.2-alpha.2: compatible`;支持范围仍为 `>=0.1.7-rc.1 <0.3.0`(`dsh.engines.dsh`),上界已覆盖 0.2.2-alpha.2,无需放宽。
|
|
18
|
+
- 开发依赖同步到 `0.2.2-alpha.2`(`dsh-host-webserver`、`dsh-client-connection`、`dsh-scope`),并按新宿主包的 peer 要求把 `@deepseek-ai/cordis` → `4.0.6-alpha.1`、`@deepseek-ai/schemastery` → `3.18.6-alpha.1`;peer 范围未变。
|
|
19
|
+
- 逐包比对 rc.4 → 0.2.2-alpha.2 的 npm 产物:这是一次**有真实改动**的升级。`dsh-host-webserver` 新增 per-Peer 的 `webserver/index-inject` 参数、`WebResource` / `WebResourceRoute` / `readResource`,`renderIndex` / `collectIndexInjections` 增加 `peer` 参数;`dsh-client-connection` 客户端契约新增可选 `resolveAsset`;`dsh-client-ui-layout`、`dsh-client-ui-settings-general` 增加 6 种语言字典(另有 `fullscreen-timeout` 更新提示文案);`dsh-client-ui-renderer`、`dsh-client-ui-settings`、`dsh-scope` 仅版本与 locale 资源变化。本插件用到的 `register` / `tapIndex` / `requestRejection` / `authenticatedUrl` 签名均未变。
|
|
20
|
+
- **修复**:官方轮次浮轨的 `aria-label` 在 0.2.2 被本地化成 8 种语言(中、英、日、西、法、德、俄、葡),而插件只匹配中/英,切到其他语言时手机浮轨不再贴边、按住预览失效。现改为匹配全部 8 种标签,并加结构化兜底(找到唯一带 `button[data-index]` 的 `<nav>` 并打 `data-lg-turn-nav` 标记),将来 DSH 再加语言无需再发版。
|
|
21
|
+
- 未采用 0.2.2 的 `resource` 路由与 `readResource`:它们不暴露客户端 socket,而门禁与 `adminPolicy: local_only` 依赖远端地址,采用会削弱安全边界;per-Peer 注入只影响 fallback 渲染,本插件不拥有 fallback。
|
|
22
|
+
- 测试 386 → 388:新增「选择器覆盖 8 种语言标签」「未知语言下靠结构兜底找到并标记浮轨」两项。类型检查、构建、`npm pack --dry-run` 均通过。
|
|
23
|
+
- 真实 Chrome(窄视口)复核:中、日、未知三种标签的浮轨均得到 `display:block` / `width:28px` / `right:4px`,刻度 `touch-action:none`;未知语言被标记 `data-lg-turn-nav=1`;`data-lg-turn-card` 时官方 tooltip 隐藏。
|
|
24
|
+
- 运行态(实例运行 0.2.2-alpha.2,装的是 `0.7.6`,与本版差异只在浮轨定位):`dsh --profile web --dump-config` exit 0 且插件在合成树中;LAN 入口 200、客户端补丁注入、`/plugins/dsh-lan-guard/config` 与 `/devices` 返回真实数据。
|
|
25
|
+
- 两版 README 六处同步到 `0.7.8` / `0.2.2-alpha.2`:徽章、已验证行、当前版本句、兼容表(新增 latest 行、`0.7.7` 转 published)、12 个已验证版本清单、发版 tag 示例;并新增一条「0.2.2 新能力评估」。
|
|
26
|
+
- 未做:手机实机验收(触摸、锁屏、语音);插件设置页的多语言翻译 —— DSH 已支持 8 种语言,但面板仍是中文,留到下一版处理。
|
|
27
|
+
|
|
28
|
+
**0.2.2 核查结果**:
|
|
29
|
+
|
|
30
|
+
| 检查 | 结果 |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| 本插件用到的宿主接口 | `webServer.register` / `tapIndex` / `port`、`connection.requestRejection` / `authenticatedUrl`:签名未变 |
|
|
33
|
+
| 0.2.2 新增能力 | per-Peer 注入、`resource` 路由、`readResource`、客户端 `resolveAsset`、7→8 语言:已评估,仅采用多语言标签 |
|
|
34
|
+
| 多语言浮轨 | 8 种标签全覆盖 + 未知语言结构化兜底,真实 Chrome 验证 |
|
|
35
|
+
| 类型检查(0.2.2-alpha.2 `.d.ts`) | 通过 |
|
|
36
|
+
| 自动回归 | 23 文件 / 388 用例全绿 |
|
|
37
|
+
| 构建与打包 | 通过;`npm pack` 清单与 `files` 一致 |
|
|
38
|
+
| `--dump-config` | exit 0,插件在合成树中,无拒载/豁免 |
|
|
39
|
+
| 运行态 | LAN 入口 200、补丁注入、`/config` 与 `/devices` 200 |
|
|
40
|
+
|
|
3
41
|
## [0.7.7] — 2026-10-27(适配 DSH 0.2.1-rc.4)
|
|
4
42
|
|
|
5
43
|
**代码零改动**,只更新兼容声明、开发依赖与发布文档。
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<a href="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml"><img src="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-lan-guard"><img src="https://img.shields.io/npm/v/dsh-lan-guard?label=npm&color=CB3837" alt="npm version"></a>
|
|
8
8
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F172A" alt="MIT"></a>
|
|
9
|
-
<img src="https://img.shields.io/badge/DSH-0.2.
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.2.2--alpha.3-4B6BFB" alt="DSH 0.2.2-alpha.3">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">English | <a href="README.zh.md">中文</a></p>
|
|
@@ -36,7 +36,7 @@ DSH serves its Web UI on `127.0.0.1` only, and it deliberately refuses to bind `
|
|
|
36
36
|
- **Two passwords** — PBKDF2-SHA256 (600,000 iterations). The **access password** logs visitor devices in; the **admin password** unlocks this settings page's management console (it falls back to the access password). Plus a `dsh_` passwordless link, persistent visitor sessions, per-IP lockout and CSRF checks.
|
|
37
37
|
- **Self-signed HTTPS by default, with a stable CA** — generates a `DSH LAN Guard CA` and signs a leaf certificate for the current NIC addresses. Changing IP only re-signs the leaf, so each device trusts the CA once.
|
|
38
38
|
- **Your own machine is never locked** — direct `127.0.0.1` access is physically unlocked (whoever can use this computer could change these settings anyway). Remote access follows `adminPolicy`: read-only (default), password-unlocked, or open.
|
|
39
|
-
- **Device pairing and
|
|
39
|
+
- **Device pairing and credential blocking** — a phone names itself once when it first passes the gate, receives an HttpOnly device-identity cookie, and appears under **已授权设备** (name / created / last used / source IP) where you can **revoke or block** that identity. The block persists for the recorded identity, not the physical machine: a fresh browser or cleared cookie can pair again with the shared access password. Enable approval for new devices when you need to review re-pairing.
|
|
40
40
|
- **Settings inside the official page** — the "局域网访问" section has four tabs: QR access, authentication, authorised devices, and connection & certificates. All typography and colours use the official design tokens; **no official layout is replaced**.
|
|
41
41
|
- **Adding a workspace from a phone (smart routing)** — DSH resolves its directory picker once at boot, and a loopback bind with a display resolves to `native`: tapping "添加工作区" on a phone actually opens the folder dialog **on the host's screen**. This plugin shadows the official pick flow from the browser half at a lower slot priority, so **the local browser keeps the OS dialog while a remote device gets an in-page directory browser** (breadcrumbs, shortcuts, directory list). The chosen path still goes through DSH's own workspace flow — this plugin only reads directories, never writes anything.
|
|
42
42
|
- **Configurable port and listen scope** — defaults to `3081` (DSH's port + 1) and walks up to ten ports when that one is taken, with an availability check in the settings page. The listen scope toggles between "LAN (default)" and "this machine only"; both need a DSH restart.
|
|
@@ -49,7 +49,8 @@ Requirements:
|
|
|
49
49
|
|
|
50
50
|
- DeepSeek Harness with a Web profile
|
|
51
51
|
- Node.js 20 or newer
|
|
52
|
-
- Verified DeepSeek Harness: `0.2.
|
|
52
|
+
- Verified DeepSeek Harness: `0.2.2-alpha.3` (API review, type checking and automated regression; read-only HTTP checks on the running alpha.3 instance with plugin `0.7.8` confirm the proxy entry, index injection and management endpoints. The remote directory picker is fixed for alpha.3's mobile sidebar. Real Chromium checks on the running UI, with only this plugin's client response replaced by the local build, confirm a 390px modal over the 280px sidebar (old build: 280px), plus Escape cancellation. This is not a deployed-package or full LAN/WebSocket acceptance test; phone testing remains pending).
|
|
53
|
+
- Registry channels checked on 2026-11-03: `alpha` = `0.2.2-alpha.3`, `latest` / `next` = `0.2.1-rc.5`. This release verifies alpha.3; rc.5 is not included in the verified list.
|
|
53
54
|
|
|
54
55
|
Install from npm:
|
|
55
56
|
|
|
@@ -148,11 +149,13 @@ The plugin reads its config from its Cordis entry. **Every key has a usable defa
|
|
|
148
149
|
|
|
149
150
|
## Compatibility
|
|
150
151
|
|
|
151
|
-
Current version: plugin **`0.7.
|
|
152
|
+
Current version: plugin **`0.7.9`**, compatible with DeepSeek Harness **`0.2.2-alpha.3`**. Each row below is one plugin release: the DSH versions it was verified against, and what that release did.
|
|
152
153
|
|
|
153
154
|
| Plugin | Verified DeepSeek Harness | What this version is |
|
|
154
155
|
| --- | --- | --- |
|
|
155
|
-
| **`0.7.
|
|
156
|
+
| **`0.7.9`** (latest) | **`0.2.2-alpha.3`**; earlier verified releases listed below | Fixes the remote directory picker being clipped by alpha.3's mobile sidebar drawer; updates compatibility metadata and development dependencies. Corrects stale security and mobile-rail descriptions in both READMEs. |
|
|
157
|
+
| **`0.7.8`** (published) | **`0.2.2-alpha.2`**, `0.2.1-rc.4`, `0.2.1-rc.3`, `0.2.1-rc.2`, `0.2.1-alpha.5`, `0.2.1-alpha.4`, `0.2.1-alpha.3`, `0.2.1-alpha.1`, `0.2.0-rc.2`, `0.2.0-rc.1`, `0.1.7-rc.2`, `0.1.7-rc.1` | Keeps up with DSH `0.2.2-alpha.2`: the new UI localises the turn navigator's label into eight languages, so the phone rail now finds it without depending on copy (with a structural fallback for languages added later); the rest is compatibility statements and docs. |
|
|
158
|
+
| **`0.7.7`** (published) | **`0.2.1-rc.4`**, `0.2.1-rc.3`, `0.2.1-rc.2`, `0.2.1-alpha.5`, `0.2.1-alpha.4`, `0.2.1-alpha.3`, `0.2.1-alpha.1`, `0.2.0-rc.2`, `0.2.0-rc.1`, `0.1.7-rc.2`, `0.1.7-rc.1` | Keeps up with DSH `0.2.1-rc.4`: this upstream release only bumps version strings, and the host interfaces and types are byte-identical to rc.3; no plugin runtime code changed. |
|
|
156
159
|
| **`0.7.6`** (published) | **`0.2.1-rc.3`**, `0.2.1-rc.2`, `0.2.1-alpha.5`, `0.2.1-alpha.4`, `0.2.1-alpha.3`, `0.2.1-alpha.1`, `0.2.0-rc.2`, `0.2.0-rc.1`, `0.1.7-rc.2`, `0.1.7-rc.1` | Compatibility release for DSH `0.2.1-rc.3`; no runtime code change. API/type/automated checks only; phone/browser acceptance pending. |
|
|
157
160
|
| **`0.7.5`** (published) | **`0.2.1-rc.2`**, `0.2.1-alpha.5`, `0.2.1-alpha.4`, `0.2.1-alpha.3`, `0.2.1-alpha.1`, `0.2.0-rc.2`, `0.2.0-rc.1`, `0.1.7-rc.2` | Keeps up with DSH `0.2.1-rc.2`: compatibility statement only, no code change. |
|
|
158
161
|
| **`0.7.4`** | **`0.2.1-alpha.5`**, `0.2.1-alpha.4`, `0.2.1-alpha.3`, `0.2.1-alpha.1`, `0.2.0-rc.2`, `0.2.0-rc.1`, `0.1.7-rc.2` | Keeps up with DSH `0.2.1-alpha.5`: compatibility statement only, no code change. |
|
|
@@ -180,7 +183,8 @@ Current version: plugin **`0.7.7`**, compatible with DeepSeek Harness **`0.2.1-r
|
|
|
180
183
|
| `0.1.1` | `0.1.7-rc.1` | Documentation release: bilingual user READMEs |
|
|
181
184
|
| `0.1.0` | `0.1.7-rc.1` | First release: gated reverse proxy, self-signed HTTPS, device pairing, settings page, QR access |
|
|
182
185
|
|
|
183
|
-
- Declared range `>=0.1.7-rc.1 <0.3.0` (`dsh.engines.dsh`); verified releases: `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4` (
|
|
186
|
+
- Declared range `>=0.1.7-rc.1 <0.3.0` (`dsh.engines.dsh`); verified releases: `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2`, `0.2.2-alpha.3` (13 releases; the `0.2.2-alpha.3` verification scope is described above). DSH versions not listed are **unverified** — verify them yourself before use. The upper bound was widened from `<0.2.0` in `0.4.3` because profile load refuses a bundle whose range excludes the running release, and a plain `<0.2.0` would exclude the `0.2.0` stable.
|
|
187
|
+
- **New in 0.2.2, evaluated**: the per-Peer `webserver/index-inject` emit, `resource` routes and `readResource` are all new; this plugin does not use them — the first only affects fallback rendering, and the other two expose no client socket, while the gate and the "local only" policy depend on the remote address. What it *did* adopt is the multi-language UI: the phone rail now recognises all eight DSH languages, with a structural fallback for any language added later.
|
|
184
188
|
- Host/client interfaces this plugin uses: `webServer.register` / `webServer.tapIndex` (indexTaps), `connection.requestRejection`, `connection.authenticatedUrl`, the additive `settings.section` seat, `@deepseek-ai/schemastery`, and `profileContext` (for deriving the default data directory).
|
|
185
189
|
- **Breaking default change (from `0.3.2`)**: `listenHost` now defaults to `0.0.0.0` instead of `127.0.0.1`, so one restart after install is enough; `0.3.1` and earlier default to loopback only. The gate and self-signed TLS defaults are unchanged (with no password the gate still refuses every device). See the [CHANGELOG](CHANGELOG.md).
|
|
186
190
|
- **`0.4.0` verification status**: all three changes carry measurements, not just specs.
|
|
@@ -226,7 +230,7 @@ The official UI is reused with zero modifications and adapts on a phone viewport
|
|
|
226
230
|
|
|
227
231
|
**Fix (`mobileScrollFix`, on by default)**: the injected script only acts when narrow screen AND mobile UA AND the page cannot scroll AND it actually finds a layer clipping overflowing content; it then makes exactly those layers touch-scrollable (`overflow-y:auto`, `-webkit-overflow-scrolling:touch`, `touch-action:pan-y`). Healthy pages are never touched.
|
|
228
232
|
|
|
229
|
-
**"Back to bottom" button
|
|
233
|
+
**"Back to bottom" button**: 0.4.2 briefly shipped a plugin-owned button, but 0.4.3 removed it. Current releases reuse DSH's official button and repair the mobile height/scroll chain only when the checks detect clipping; they do not add a second back-to-bottom button.
|
|
230
234
|
|
|
231
235
|
**Self-check**: append `?lgdiag=1` to the page URL for an on-screen report (`narrow / mobile / innerHeight / visualViewport / pageScrolls / clippingLayers / patched`). That report is exactly the data that located this bug.
|
|
232
236
|
|
|
@@ -235,8 +239,8 @@ The official UI is reused with zero modifications and adapts on a phone viewport
|
|
|
235
239
|
**It is already there — it is just hidden.** The rail that floats at the right of a session on the desktop (grey ticks = loaded turns, dim ticks = not loaded yet, black bar = the current turn; hovering previews; tapping an unloaded turn pages the history in first) is **rendered and wired up on a phone too**. `ChatView` mounts it unconditionally; the only thing hiding it is DSH's own container query:
|
|
236
240
|
`@container (max-width: 900px) { .frame { display: none } }` (the container is the chat frame, only about 327px wide on a 390px phone).
|
|
237
241
|
|
|
238
|
-
**What this switch does**: a stylesheet scoped to `≤1023px` un-hides that rail and moves it out of the message column into the chat frame's right gutter (`right:
|
|
239
|
-
**Why not reimplement it**: the turn data (`ui-chat`'s `navigation.items()`) is package-internal, so a plugin cannot rebuild the rail — but it does not need to. Un-hiding **reuses** the official component: its jump-to-turn, its page-history-in, its active-turn follow and its previews.
|
|
242
|
+
**What this switch does**: a stylesheet scoped to `≤1023px` un-hides that rail and moves it out of the message column into the chat frame's right gutter (`right:4px`, 28px wide).
|
|
243
|
+
**Why not reimplement it**: the turn data (`ui-chat`'s `navigation.items()`) is package-internal, so a plugin cannot rebuild the rail — but it does not need to. Un-hiding **reuses** the official component: its jump-to-turn, its page-history-in, its active-turn follow and its previews. The plugin adds no transcript scroll container; it does add the touch-preview card, its controls and gesture listeners described below.
|
|
240
244
|
|
|
241
245
|
**Measured (0.2.1-alpha.1 / 440×956, iPhone 16 Pro Max, injected script run verbatim against the real page)**: `display:none` → `block`, rect `[401,411,28,52]`, 5 marks, 10px pitch, exactly one `aria-current`; the message column ends at x=401 and the rail starts at x=401, so it **never covers the text**; the `Global panels` and `Session hierarchy` navs are untouched; holding a mark for 0.4s opens the card with that turn's prompt and reply, ◀/▶ step to the neighbouring turns, the jump button moved `scrollTop 4295 → 8111` and dismissed the card, a 60px drag opened nothing, and there were zero page errors.
|
|
242
246
|
|
|
@@ -341,8 +345,8 @@ The client half registers into the official additive `settings.section` seat; th
|
|
|
341
345
|
Releases are tag-driven. Update `package.json`, move the matching CHANGELOG section out of `Unreleased`, write `release-notes/v<version>.md` with both language anchors, then push the release commit and tag:
|
|
342
346
|
|
|
343
347
|
```sh
|
|
344
|
-
git tag v0.7.
|
|
345
|
-
git push origin v0.7.
|
|
348
|
+
git tag v0.7.9
|
|
349
|
+
git push origin v0.7.9
|
|
346
350
|
```
|
|
347
351
|
|
|
348
352
|
The release workflow checks that the tag matches the `package.json` version and that the notes carry both anchors, then runs `pnpm run verify`, packs the plugin, publishes through npm trusted publishing (OIDC), and creates a GitHub Release with the tarball attached.
|
package/README.zh.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<a href="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml"><img src="https://github.com/idoall/dsh-lan-guard/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
7
|
<a href="https://www.npmjs.com/package/dsh-lan-guard"><img src="https://img.shields.io/npm/v/dsh-lan-guard?label=npm&color=CB3837" alt="npm 版本"></a>
|
|
8
8
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F172A" alt="MIT"></a>
|
|
9
|
-
<img src="https://img.shields.io/badge/DSH-0.2.
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.2.2--alpha.3-4B6BFB" alt="DSH 0.2.2-alpha.3">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center"><a href="README.md">English</a> | 中文</p>
|
|
@@ -36,7 +36,7 @@ DSH 的 Web 界面只监听 `127.0.0.1`,而官方明确拒绝绑定 `0.0.0.0`
|
|
|
36
36
|
- **双密码门禁**:PBKDF2-SHA256(600,000 次迭代)。**访问密码**给手机等访客设备登录用,**管理密码**用于解锁本设置页的管理台(未设置时退回访问密码);另有 `dsh_` 免密链接、持久访客会话、按 IP 锁定与 CSRF 校验。
|
|
37
37
|
- **默认自签 HTTPS,CA 身份跨重启不变**:自动生成 `DSH LAN Guard CA`,按所选网卡地址签发叶证书。换 IP 只重签叶证书,所以每台设备只需信任一次。
|
|
38
38
|
- **本机永不锁定**:直连 `127.0.0.1` 享有物理免锁特权(能用这台电脑的人本就能改这些设置);远程访问按 `adminPolicy` 处理——只读(默认)、需密码解锁、或不锁。
|
|
39
|
-
-
|
|
39
|
+
- **设备配对与身份拉黑**:手机首次通过门禁时命名,获得 HttpOnly 设备身份 cookie,出现在 **已授权设备** 里(名称 / 创建时间 / 最近使用 / 来源 IP),可逐个吊销或拉黑该身份。拉黑持续作用于已记录身份,不等于封禁物理设备:换浏览器或清除 cookie 后,仍可用共享访问密码重新配对。需要审核重新配对时,请开启新设备批准。
|
|
40
40
|
- **设置挂在官方设置页内**:「局域网访问」分区含四个 tab——扫码访问、安全认证、已授权设备、连接与证书。排版与配色全部使用官方设计 token,**不替换任何官方布局**。
|
|
41
41
|
- **远程也能添加工作区(智能分流)**:DSH 的目录选择器在启动时判定一次,本机回环绑定 + 有显示器会判成「原生」——手机点「添加工作区」实际是在**电脑屏幕上**弹文件夹对话框。本插件在浏览器侧以更低优先级遮蔽官方选择流程:**本机浏览器照旧走系统原生对话框,远程设备改用页面内目录浏览器**(面包屑、快捷入口、目录列表)。选中后仍由 DSH 官方工作区流程登记,插件只读目录、不写任何东西。
|
|
42
42
|
- **端口与监听范围可配**:默认 `3081`(DSH 端口 + 1),被占用时自动往后顺延(最多试 10 个);设置页可改端口并带可用性检查,也可在「局域网(默认)/ 仅本机」之间切换(两者都需重启 dsh 生效)。
|
|
@@ -49,7 +49,8 @@ DSH 的 Web 界面只监听 `127.0.0.1`,而官方明确拒绝绑定 `0.0.0.0`
|
|
|
49
49
|
|
|
50
50
|
- 带 Web profile 的 DeepSeek Harness
|
|
51
51
|
- Node.js 20 或更新
|
|
52
|
-
- 已验证的 DeepSeek Harness:`0.2.
|
|
52
|
+
- 已验证的 DeepSeek Harness:`0.2.2-alpha.3`(接口审查、类型检查与自动回归;另在运行 alpha.3、已安装插件 `0.7.8` 的实例上只读核对代理入口、页面注入与管理接口。本版修复 alpha.3 手机侧栏内的远程目录弹层。在运行中的真实界面上,仅将本插件客户端响应替换为本地构建,用 Chromium 验证了 280px 侧栏内弹层扩展至 390px 视口(旧版仅 280px)及 Escape 取消。这不等于安装后验收或完整 LAN/WebSocket 验收;手机实机测试仍待完成)。
|
|
53
|
+
- 2026-11-03 核对 npm 渠道:`alpha` 为 `0.2.2-alpha.3`,`latest` / `next` 为 `0.2.1-rc.5`。本次验证 alpha.3;rc.5 不在已验证清单内。
|
|
53
54
|
|
|
54
55
|
从 npm 安装:
|
|
55
56
|
|
|
@@ -149,11 +150,13 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
149
150
|
|
|
150
151
|
## 兼容性
|
|
151
152
|
|
|
152
|
-
当前版本:插件 **`0.7.
|
|
153
|
+
当前版本:插件 **`0.7.9`**,兼容 DeepSeek Harness **`0.2.2-alpha.3`**。下表每行是一个插件版本:它验证过哪些 DSH 版本,以及那一版做了什么。
|
|
153
154
|
|
|
154
155
|
| 插件 | 已验证的 DeepSeek Harness | 这个版本是什么 |
|
|
155
156
|
| --- | --- | --- |
|
|
156
|
-
| **`0.7.
|
|
157
|
+
| **`0.7.9`** (latest) | **`0.2.2-alpha.3`**;此前验证版本见下方清单 | 修复 alpha.3 手机侧栏抽屉裁剪远程目录弹层的问题;同步兼容声明与开发依赖;校正两版 README 中过时的安全边界与手机浮轨说明。 |
|
|
158
|
+
| **`0.7.8`** (published) | **`0.2.2-alpha.2`**、`0.2.1-rc.4`、`0.2.1-rc.3`、`0.2.1-rc.2`、`0.2.1-alpha.5`、`0.2.1-alpha.4`、`0.2.1-alpha.3`、`0.2.1-alpha.1`、`0.2.0-rc.2`、`0.2.0-rc.1`、`0.1.7-rc.2`、`0.1.7-rc.1` | 跟上 DSH `0.2.2-alpha.2`:新版界面把轮次导航的标签译成 8 种语言,手机浮轨改成不依赖文案的定位(并为将来新增语言留了结构化兜底);其余是兼容声明与文档。 |
|
|
159
|
+
| **`0.7.7`** (published) | **`0.2.1-rc.4`**、`0.2.1-rc.3`、`0.2.1-rc.2`、`0.2.1-alpha.5`、`0.2.1-alpha.4`、`0.2.1-alpha.3`、`0.2.1-alpha.1`、`0.2.0-rc.2`、`0.2.0-rc.1`、`0.1.7-rc.2`、`0.1.7-rc.1` | 跟上 DSH `0.2.1-rc.4`:上游这次只改版本号,宿主接口与类型与 rc.3 逐字节一致;插件运行时代码不变。 |
|
|
157
160
|
| **`0.7.6`** (published) | **`0.2.1-rc.3`**、`0.2.1-rc.2`、`0.2.1-alpha.5`、`0.2.1-alpha.4`、`0.2.1-alpha.3`、`0.2.1-alpha.1`、`0.2.0-rc.2`、`0.2.0-rc.1`、`0.1.7-rc.2`、`0.1.7-rc.1` | 跟上 DSH `0.2.1-rc.3`,运行时代码不变。仅完成接口、类型与自动检查;手机/浏览器验收待完成。 |
|
|
158
161
|
| **`0.7.5`** (published) | **`0.2.1-rc.2`**、`0.2.1-alpha.5`、`0.2.1-alpha.4`、`0.2.1-alpha.3`、`0.2.1-alpha.1`、`0.2.0-rc.2`、`0.2.0-rc.1`、`0.1.7-rc.2` | 跟上 DSH `0.2.1-rc.2`:只更新兼容声明,代码没动。 |
|
|
159
162
|
| **`0.7.4`** | **`0.2.1-alpha.5`**、`0.2.1-alpha.4`、`0.2.1-alpha.3`、`0.2.1-alpha.1`、`0.2.0-rc.2`、`0.2.0-rc.1`、`0.1.7-rc.2` | 跟上 DSH `0.2.1-alpha.5`:只更新兼容声明,代码没动。 |
|
|
@@ -181,7 +184,8 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
181
184
|
| `0.1.1` | `0.1.7-rc.1` | 文档版:中英双语用户 README |
|
|
182
185
|
| `0.1.0` | `0.1.7-rc.1` | 首个版本:门禁反向代理、自签 HTTPS、设备配对、设置页、扫码访问 |
|
|
183
186
|
|
|
184
|
-
- 声明范围 `>=0.1.7-rc.1 <0.3.0`(`dsh.engines.dsh`);已验证版本:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`(共
|
|
187
|
+
- 声明范围 `>=0.1.7-rc.1 <0.3.0`(`dsh.engines.dsh`);已验证版本:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`、`0.2.2-alpha.2`、`0.2.2-alpha.3`(共 13 个版本,`0.2.2-alpha.3` 验证范围见上文)。未列入的 DSH 版本属**未验证**,请自行验证后再使用。上界在 `0.4.3` 从 `<0.2.0` 放宽:profile 加载会拒绝范围不含运行版本的 bundle,而裸的 `<0.2.0` 恰好排除 `0.2.0` 正式版。
|
|
188
|
+
- **0.2.2 新能力评估**:`webserver/index-inject` 的 per-Peer 注入、`resource` 路由与 `readResource` 都是 0.2.2 新增;本插件没有采用 —— 前者只影响 fallback 渲染,后两者拿不到客户端地址,而门禁和「仅本机」策略依赖远端地址。真正用上的是多语言:手机浮轨现在识别 DSH 全部 8 种界面语言,并对将来新增语言保留结构化兜底。
|
|
185
189
|
- 本插件用到的宿主/客户端接口:`webServer.register` / `webServer.tapIndex`(indexTaps)、`connection.requestRejection`、`connection.authenticatedUrl`、追加型 `settings.section` seat、`@deepseek-ai/schemastery`,以及 `profileContext`(用于推导默认数据目录)。
|
|
186
190
|
- **破坏性默认值变更(`0.3.2` 起)**:`listenHost` 默认由 `127.0.0.1` 改为 `0.0.0.0`,装完重启一次即可用;`0.3.1` 及更早默认仅回环。门禁与自签 TLS 的默认值未变(未设密码仍拒绝所有设备)。详见 [CHANGELOG](CHANGELOG.md)。
|
|
187
191
|
- **`0.4.0` 的验证状态**:三处改动都做了实测,不只跑用例。
|
|
@@ -227,7 +231,7 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
227
231
|
|
|
228
232
|
**修复(`mobileScrollFix`,默认开)**:注入脚本**只在四条同时成立时**才动手——窄屏(≤1023px)、移动端 UA、**整页不可滚**、且**确实找到被裁剪且内容溢出的层**;然后只把那几层改成可触摸滚动(`overflow-y:auto`、`-webkit-overflow-scrolling:touch`、`touch-action:pan-y`)。能正常滚动的页面一律不碰。
|
|
229
233
|
|
|
230
|
-
|
|
234
|
+
**「回到底部」按钮**:0.4.2 曾短暂提供插件自建按钮,但 0.4.3 已移除。当前版本复用 DSH 官方按钮,只在检查发现裁剪时修正移动端高度与滚动链,不再增加第二个回到底部按钮。
|
|
231
235
|
|
|
232
236
|
**自检**:在页面地址后加 `?lgdiag=1`,顶部会出现一屏诊断(`narrow / mobile / innerHeight / visualViewport / pageScrolls / clippingLayers / 是否已修`)。这一屏就是本次定位所用的数据,以后复现同类问题不必连 Mac 调试。
|
|
233
237
|
|
|
@@ -236,8 +240,8 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
236
240
|
**它本来就在,只是被藏了。** PC 上会话右侧那根浮轨(灰刻度=已加载轮次、暗刻度=还没加载、黑长条=当前轮次;悬停出预览;点未加载的会先翻历史再跳)在手机上**照样渲染、照样接线**——`ChatView` 无条件挂载它,隐藏它的只有官方自己的一条容器查询:
|
|
237
241
|
`@container (max-width: 900px) { .frame { display: none } }`(容器是对话区,390px 手机上只有约 327px 宽)。
|
|
238
242
|
|
|
239
|
-
**做法**:开启后用一段只在 `≤1023px` 生效的样式把它放出来,并把它从"压着正文"挪到对话区右侧留白里(`right:
|
|
240
|
-
**为什么不是重写一个**:轮次数据(`ui-chat` 的 `navigation.items()
|
|
243
|
+
**做法**:开启后用一段只在 `≤1023px` 生效的样式把它放出来,并把它从"压着正文"挪到对话区右侧留白里(`right:4px`、宽 28px)。
|
|
244
|
+
**为什么不是重写一个**:轮次数据(`ui-chat` 的 `navigation.items()`)是包内私有的,插件拿不到;而解开隐藏就能**原样复用**官方组件的跳转、翻历史、当前轮次跟随与预览。因此插件不新建正文滚动容器,但会添加下文所述的触摸预览卡片、卡片按钮与手势监听。
|
|
241
245
|
|
|
242
246
|
**实测(0.2.1-alpha.1 / 390×844,把注入脚本原样打进页面)**:`display:none` → `block`、rect `[357,355,24,52]`、5 格、间距 10px、恰好 1 格 `aria-current`;对话列右缘 351、浮轨左缘 357 ⇒ **不压正文**;`Global panels` / `Session hierarchy` 两个 nav 完全不受影响;0 报错。
|
|
243
247
|
|
|
@@ -342,8 +346,8 @@ pnpm run verify # 类型检查 + 测试 + 构建 + pack dry-run
|
|
|
342
346
|
发版由 tag 驱动。更新 `package.json`、把对应 CHANGELOG 段落移出 `Unreleased`、编写带中英双锚点的 `release-notes/v<版本>.md` 后,推送发版提交与 tag:
|
|
343
347
|
|
|
344
348
|
```sh
|
|
345
|
-
git tag v0.7.
|
|
346
|
-
git push origin v0.7.
|
|
349
|
+
git tag v0.7.9
|
|
350
|
+
git push origin v0.7.9
|
|
347
351
|
```
|
|
348
352
|
|
|
349
353
|
发版工作流会校验 tag 与 `package.json` 版本一致、要求发布说明含中英双锚点,然后运行 `pnpm run verify`、打包插件、通过 npm trusted publishing(OIDC)发布,并创建附带 tarball 的 GitHub Release。
|
package/lib/client.js
CHANGED
|
@@ -291,7 +291,8 @@ window.__ModuleLoader__.load({
|
|
|
291
291
|
* from 620px up.
|
|
292
292
|
*/
|
|
293
293
|
const FLOW_CSS = `
|
|
294
|
-
.lgp-scrim{position:fixed;inset:0;
|
|
294
|
+
.lgp-scrim{position:fixed;inset:0;margin:0;border:0;padding:0;box-sizing:border-box;
|
|
295
|
+
width:100%;height:100%;max-width:none;max-height:none;z-index:2147483000;display:flex;align-items:flex-end;justify-content:center;
|
|
295
296
|
background:color-mix(in srgb, var(--dsw-alias-bg-mask,#000) 46%, transparent);backdrop-filter:blur(6px);
|
|
296
297
|
-webkit-backdrop-filter:blur(6px)}
|
|
297
298
|
/*
|
|
@@ -375,6 +376,7 @@ window.__ModuleLoader__.load({
|
|
|
375
376
|
const latest = (0, react.useRef)(props);
|
|
376
377
|
latest.current = props;
|
|
377
378
|
const armed = (0, react.useRef)(false);
|
|
379
|
+
const dialog = (0, react.useRef)(null);
|
|
378
380
|
const alive = (0, react.useRef)(true);
|
|
379
381
|
const [listing, setListing] = (0, react.useState)(null);
|
|
380
382
|
const [notice, setNotice] = (0, react.useState)(null);
|
|
@@ -446,18 +448,30 @@ window.__ModuleLoader__.load({
|
|
|
446
448
|
load
|
|
447
449
|
]);
|
|
448
450
|
(0, react.useEffect)(() => {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
};
|
|
453
|
-
document.addEventListener("keydown", onKey);
|
|
451
|
+
const node = dialog.current;
|
|
452
|
+
if (!open || node === null) return void 0;
|
|
453
|
+
node.showModal();
|
|
454
454
|
return () => {
|
|
455
|
-
|
|
455
|
+
node.close();
|
|
456
456
|
};
|
|
457
457
|
}, [open]);
|
|
458
|
+
const cancelDialog = (event) => {
|
|
459
|
+
event.preventDefault();
|
|
460
|
+
event.stopPropagation();
|
|
461
|
+
if (latest.current.busy !== true) latest.current.onCancel();
|
|
462
|
+
};
|
|
458
463
|
if (!open) return null;
|
|
459
464
|
if (directoryFlowDecision(readClientEnvironment()) !== "browse") return null;
|
|
460
|
-
if (props.busy === true) return (0, react.createElement)("
|
|
465
|
+
if (props.busy === true) return (0, react.createElement)("dialog", {
|
|
466
|
+
className: "lgp-scrim",
|
|
467
|
+
key: "scrim",
|
|
468
|
+
ref: dialog,
|
|
469
|
+
"aria-label": "正在添加工作区",
|
|
470
|
+
onCancel: cancelDialog,
|
|
471
|
+
onKeyDown: (event) => {
|
|
472
|
+
if (event.key === "Escape") event.stopPropagation();
|
|
473
|
+
}
|
|
474
|
+
}, [(0, react.createElement)("style", { key: "css" }, FLOW_CSS), (0, react.createElement)("div", {
|
|
461
475
|
className: "lgp-busy",
|
|
462
476
|
role: "status",
|
|
463
477
|
key: "busy"
|
|
@@ -488,16 +502,19 @@ window.__ModuleLoader__.load({
|
|
|
488
502
|
const rows = listing?.entries ?? [];
|
|
489
503
|
/** The console is locked: offer the unlock right here instead of a dead end. */
|
|
490
504
|
const needsUnlock = failureCode === "admin_required";
|
|
491
|
-
return (0, react.createElement)("
|
|
505
|
+
return (0, react.createElement)("dialog", {
|
|
492
506
|
className: "lgp-scrim",
|
|
493
507
|
key: "scrim",
|
|
494
|
-
|
|
508
|
+
ref: dialog,
|
|
509
|
+
"aria-label": "选择工作区目录",
|
|
510
|
+
onClick: cancel,
|
|
511
|
+
onCancel: cancelDialog,
|
|
512
|
+
onKeyDown: (event) => {
|
|
513
|
+
if (event.key === "Escape") event.stopPropagation();
|
|
514
|
+
}
|
|
495
515
|
}, [(0, react.createElement)("style", { key: "css" }, FLOW_CSS), (0, react.createElement)("div", {
|
|
496
516
|
key: "sheet",
|
|
497
517
|
className: "lgp-sheet",
|
|
498
|
-
role: "dialog",
|
|
499
|
-
"aria-modal": "true",
|
|
500
|
-
"aria-label": "选择工作区目录",
|
|
501
518
|
onClick: stop
|
|
502
519
|
}, [
|
|
503
520
|
(0, react.createElement)("div", {
|