dsh-local-link 1.2.3 → 1.2.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +9 -7
  3. package/README.ru.md +9 -7
  4. package/README.zh.md +9 -7
  5. package/cordis.patch.yml +2 -2
  6. package/docs/ARCHITECTURE.md +3 -3
  7. package/docs/images/local-access-devices.jpg +0 -0
  8. package/docs/images/local-access-devices.zh.jpg +0 -0
  9. package/docs/images/local-access-diagnostics.jpg +0 -0
  10. package/docs/images/local-access-diagnostics.zh.jpg +0 -0
  11. package/docs/images/local-access-qr.jpg +0 -0
  12. package/docs/images/local-access-qr.zh.jpg +0 -0
  13. package/docs/images/mobile-chat.jpg +0 -0
  14. package/docs/images/mobile-chat.zh.jpg +0 -0
  15. package/docs/images/mobile-navigation.jpg +0 -0
  16. package/docs/images/mobile-navigation.zh.jpg +0 -0
  17. package/docs/images/mobile-session-info.jpg +0 -0
  18. package/docs/images/mobile-session-info.zh.jpg +0 -0
  19. package/docs/images/mobile-subagents.jpg +0 -0
  20. package/docs/images/mobile-subagents.zh.jpg +0 -0
  21. package/lib/client.js +116 -28
  22. package/lib/client.js.map +1 -1
  23. package/package.json +43 -44
  24. package/docs/images/local-access-devices.png +0 -0
  25. package/docs/images/local-access-devices.zh.png +0 -0
  26. package/docs/images/local-access-diagnostics.png +0 -0
  27. package/docs/images/local-access-diagnostics.zh.png +0 -0
  28. package/docs/images/local-access-qr.png +0 -0
  29. package/docs/images/local-access-qr.zh.png +0 -0
  30. package/docs/images/mobile-chat.png +0 -0
  31. package/docs/images/mobile-chat.zh.png +0 -0
  32. package/docs/images/mobile-navigation.png +0 -0
  33. package/docs/images/mobile-navigation.zh.png +0 -0
  34. package/docs/images/mobile-session-info.png +0 -0
  35. package/docs/images/mobile-session-info.zh.png +0 -0
  36. package/docs/images/mobile-subagents.png +0 -0
  37. package/docs/images/mobile-subagents.zh.png +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to this project are documented here.
4
4
 
5
+ ## 1.2.4 — 2026-10-19
6
+
7
+ ### Changed
8
+
9
+ - Updated the exact development contracts and Host compatibility metadata to DeepSeek Harness `0.2.1-rc.2`, verified as npm `latest` on 2026-10-19. Aligned Cordis/Schemastery and regenerated the dependency graph without stale auto-installed peers; no new runtime dependency was added.
10
+ - Replaced all 14 README images with approved, real-browser dark-theme captures on `0.2.1-rc.2`: separate English and Simplified Chinese demo profiles, `430 × 932` mobile frames and `1440 × 1000` desktop frames. Russian documentation shares the English captures. Images use JPEG without re-encoding or relabelling PNG data.
11
+ - Adjusted the connection trust-boundary test for WebServer's optional TCP port (the Host also supports non-TCP listeners); the test still requires a real TCP listener and does not skip authentication checks.
12
+ - Retained the previously checked `0.2.1-alpha.2` and historical RC declarations; the older RC matrix was not rerun in full.
13
+ - Preserved invocation trusted hosts across the `webRuntime` to `webStartup` transition without requiring the removed service. The gateway's existing `webServer` dependency orders startup before the connection trust expression is evaluated.
14
+ - Adapted the legacy subagent address type to the new external catalog-entry mode; current Harness continues to own native subagent navigation.
15
+
16
+ ### Fixed
17
+
18
+ - Restored the QR popover's Paired devices shortcut on current Hosts through the localized native account-menu Settings action, retaining a scoped direct-trigger fallback for older Hosts. The bridge no longer selects an unrelated session-statistics dialog trigger, does not toggle an already open menu, and stops waiting after a bounded user-initiated attempt.
19
+ - Restored mobile autofocus suppression after Session navigation using the rendered Session scope rather than the removed catalog `current` field. Explicit taps on the composer still focus the editor normally.
20
+ - Read the desktop QR invitation's Session identity from the same public Session scope, without reaching into the Workspace service's private selection store.
21
+ - Kept the new native `activity` and `usage` composer pills inside mobile Current session details, alongside the older `stats` contribution; desktop statistics are unchanged.
22
+
23
+ ### Validation
24
+
25
+ - On `0.2.1-rc.2`: typecheck, 117 tests across 18 files, build and package dry-run passed with no peer-dependency issues. Live LAN pairing returned `204`, browser handoff `303` / `303`, authenticated root `200`, and `/api/remote.mux` upgraded with `101`. Revocation immediately closed the established WebSocket and subsequent access returned `401`. All three directory-picker RPCs remained blocked with `403`. Headless Chromium covered an existing chat at widths 320, 360, 390, 430 and 768 px: no horizontal overflow, visible session-info action, single-row composer controls, no Host-app opener, and no unsolicited composer focus. The session-details drawer fit at 320 px. Physical-phone, Russian voice and the full historical RC matrix were not rerun.
26
+ - Typecheck, 106 tests across 16 files, build and package dry-run passed against `0.2.1-alpha.2`; startup passed without a version exemption. Browser checks covered LAN pairing/handoff, existing-chat loading, navigation and session details at widths 320, 360, 390, 430 and 768 px. Browser acceptance is separate from physical-phone acceptance. That earlier alpha validation was local and was not published as a separate npm release.
27
+ - The `0.2.1-rc.2` browser pass also verified explicit composer taps, hidden duplicate mobile dock metrics, and a desktop-generated QR opening the same selected chat in a fresh mobile browser context. Browser JavaScript errors: none. Test devices were revoked after the checks; screenshots from the private working profile are local evidence, not README assets.
28
+ - The Settings shortcut passed live browser checks in both EN and ZH with expanded and collapsed sidebars. Seven regression tests cover current menu navigation, historical direct triggers, already-open surfaces, absent launchers, bounded waits, and rejection of unrelated statistics triggers. Screenshot QA covered both locales at `320 × 568`, `360 × 800`, `390 × 844`, `430 × 932` and `768 × 1024`.
29
+
5
30
  ## 1.2.3 — 2026-10-02
6
31
 
7
32
  ### Changed
package/README.md CHANGED
@@ -13,12 +13,12 @@ Use the same [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
13
13
 
14
14
  Open `Local access`, scan the QR code, and the paired browser arrives at the desktop's currently selected Harness session with the same live conversation, permissions, workspaces, and plugin surfaces.
15
15
 
16
- The `1.2.x` line supports DeepSeek Harness `0.1.5-rc.2`, `0.1.7-rc.2`, and `0.2.0-rc.2` and keeps the stock Web client usable on narrow touch screens. It reorganizes the existing Harness interface into responsive drawers, compact session controls, and touch-friendly actions while keeping the same client, session, plugin slots, permissions, and live agent stream.
16
+ The `1.2.x` line supports DeepSeek Harness `0.1.5-rc.2`, `0.1.7-rc.2`, `0.2.0-rc.2`, and `0.2.1-rc.2` and keeps the stock Web client usable on narrow touch screens. It reorganizes the existing Harness interface into responsive drawers, compact session controls, and touch-friendly actions while keeping the same client, session, plugin slots, permissions, and live agent stream.
17
17
 
18
18
  > **Security boundary:** the gateway uses plain HTTP and is intended only for a trusted private network. Do not expose its port to the internet or use it on public Wi-Fi.
19
19
 
20
20
  <p align="center">
21
- <img src="docs/images/local-access-qr.png" width="960" alt="DeepSeek Harness with dsh-local-link open: one-time QR pairing to the current stock Harness session">
21
+ <img src="docs/images/local-access-qr.jpg" width="960" alt="DeepSeek Harness with dsh-local-link open: one-time QR pairing to the current stock Harness session">
22
22
  </p>
23
23
 
24
24
  <p align="center"><sub>One Harness session, paired directly across the trusted LAN.</sub></p>
@@ -73,9 +73,11 @@ The profile points at the checkout, so rebuild after changing client code and re
73
73
 
74
74
  ## Compatibility
75
75
 
76
+ Local Link `1.2.4` is built and checked against DeepSeek Harness `0.2.1-rc.2`. It supports `webStartup` trusted-host configuration with the older `webRuntime` fallback. QR Session identity and mobile autofocus use public Session scopes; the Paired devices shortcut follows the current native Settings launcher.
77
+
76
78
  The installable DeepSeek Harness range is declared in `package.json` through `engines.dsh`. Compatibility is checked against exact releases—not inferred from a successful installation or a moving dist-tag.
77
79
 
78
- Local Link `1.2.3` is built against `0.2.0-rc.2`. On that release, LAN pairing, one-time browser handoff, authenticated page and WebSocket access, and immediate WebSocket closure on revoke were exercised. Native directory selection, browsing, and creation remain loopback-only under the new `directoryPicker` API. The mobile icon adapter accepts both the new weight-named exports and the older size-named exports. Earlier RCs remain in `engines.dsh` based on the historical checks recorded in the changelog; they were not all rerun for this patch. Physical-phone acceptance is separate from browser emulation.
80
+ Acceptance on `0.2.1-rc.2` covers LAN pairing, selected-chat QR handoff, authenticated HTTP/WebSocket access, immediate socket closure on revoke, loopback-only directory RPC restrictions, and mobile layouts at 320–768 CSS pixels in EN and ZH. Earlier Host declarations retain the historical acceptance recorded in the [changelog](CHANGELOG.md); the full old-version matrix and physical-phone checks were not rerun. Mobile microphone capture over plain LAN HTTP remains unsupported; this release adds neither HTTPS nor voice input.
79
81
 
80
82
  ## Use
81
83
 
@@ -117,11 +119,11 @@ The implementation changes presentation, not Harness ownership or behavior:
117
119
  - plugin-owned modal drawers contain keyboard focus and return it to the invoking control when closed;
118
120
  - existing workspaces remain available, while the misleading remote `Add workspace` directory picker is omitted.
119
121
 
120
- These dark-theme previews were captured from real Harness `0.2.0-rc.2` browser sessions at a `430 × 932` emulated viewport. The isolated screenshot profiles contain fictional workspaces, conversations, models, devices, and usage only; no real project data appears. The Chinese README has its own Simplified Chinese captures. Subagents use the native Harness header catalog.
122
+ These dark-theme previews were captured from real Harness `0.2.1-rc.2` browser sessions: mobile frames are `430 × 932`, desktop frames are `1440 × 1000`. The isolated profiles contain fictional workspaces, conversations, models, devices, and usage only. The Chinese README has its own Simplified Chinese captures; Russian documentation shares the English images. Subagents use the native Harness header catalog.
121
123
 
122
124
  | Navigation | Current session | Subagents | Conversation |
123
125
  | :---: | :---: | :---: | :---: |
124
- | <img src="docs/images/mobile-navigation.png" width="210" alt="Dark Mobile View navigation drawer with a synthetic workspace and session"> | <img src="docs/images/mobile-session-info.png" width="210" alt="Dark Mobile View Current session drawer with synthetic model, workspace access, statistics, and session log data"> | <img src="docs/images/mobile-subagents.png" width="210" alt="Native dark Harness header catalog with two synthetic child agents"> | <img src="docs/images/mobile-chat.png" width="210" alt="Dark Mobile View Harness conversation with native message actions and one-line composer controls"> |
126
+ | <img src="docs/images/mobile-navigation.jpg" width="210" alt="Dark Mobile View navigation drawer with a synthetic workspace and session"> | <img src="docs/images/mobile-session-info.jpg" width="210" alt="Dark Mobile View Current session drawer with synthetic model, workspace access, statistics, and session log data"> | <img src="docs/images/mobile-subagents.jpg" width="210" alt="Native dark Harness header catalog with two synthetic child agents"> | <img src="docs/images/mobile-chat.jpg" width="210" alt="Dark Mobile View Harness conversation with native message actions and one-line composer controls"> |
125
127
 
126
128
  ### Permissions
127
129
 
@@ -140,13 +142,13 @@ On the Harness computer, use `Paired devices` in the QR panel or open `Settings
140
142
  Browsers do not reliably distinguish laptops from desktop computers, so both are shown as `Computer`.
141
143
 
142
144
  <p align="center">
143
- <img src="docs/images/local-access-devices.png" width="960" alt="DeepSeek Harness Settings opened directly on the compact Local access paired-device list">
145
+ <img src="docs/images/local-access-devices.jpg" width="960" alt="DeepSeek Harness Settings opened directly on the compact Local access paired-device list">
144
146
  </p>
145
147
 
146
148
  Expand `Diagnostics` on the same Settings page to inspect the most recent local gateway events. `Copy report` produces issue-ready JSON and `Clear` removes the local history. The report contains event codes, timestamps, severity, and a small allowlisted context only; it never includes pairing tokens, cookies, IP addresses, device or session IDs, device names, request paths, prompts, conversations, or project files.
147
149
 
148
150
  <p align="center">
149
- <img src="docs/images/local-access-diagnostics.png" width="960" alt="DeepSeek Harness Local access settings with the native-style Diagnostics panel expanded">
151
+ <img src="docs/images/local-access-diagnostics.jpg" width="960" alt="DeepSeek Harness Local access settings with the native-style Diagnostics panel expanded">
150
152
  </p>
151
153
 
152
154
  ## Why it stays small
package/README.ru.md CHANGED
@@ -13,12 +13,12 @@
13
13
 
14
14
  Откройте `Local access`, отсканируйте QR-код — и подключённый браузер попадёт в текущую сессию Harness, выбранную на компьютере. Диалог, права доступа, рабочие пространства и интерфейсы плагинов останутся теми же.
15
15
 
16
- Ветка `1.2.x` поддерживает DeepSeek Harness `0.1.5-rc.2`, `0.1.7-rc.2` и `0.2.0-rc.2` и делает стандартный веб-клиент удобным на узких сенсорных экранах. Существующий интерфейс Harness преобразуется в адаптивные панели, компактные элементы управления сессией и удобные для касаний действия, но сам клиент, сессия, слоты плагинов, разрешения и поток событий агента остаются прежними.
16
+ Ветка `1.2.x` поддерживает DeepSeek Harness `0.1.5-rc.2`, `0.1.7-rc.2`, `0.2.0-rc.2` и `0.2.1-rc.2` и делает стандартный веб-клиент удобным на узких сенсорных экранах. Существующий интерфейс Harness преобразуется в адаптивные панели, компактные элементы управления сессией и удобные для касаний действия, но сам клиент, сессия, слоты плагинов, разрешения и поток событий агента остаются прежними.
17
17
 
18
18
  > **Граница безопасности:** шлюз работает по незашифрованному HTTP и предназначен только для доверенной частной сети. Не выставляйте его порт в интернет и не используйте плагин в публичных сетях Wi-Fi.
19
19
 
20
20
  <p align="center">
21
- <img src="docs/images/local-access-qr.png" width="960" alt="DeepSeek Harness с открытым dsh-local-link: одноразовое подключение по QR-коду к текущей стандартной сессии Harness">
21
+ <img src="docs/images/local-access-qr.jpg" width="960" alt="DeepSeek Harness с открытым dsh-local-link: одноразовое подключение по QR-коду к текущей стандартной сессии Harness">
22
22
  </p>
23
23
 
24
24
  <p align="center"><sub>Одна сессия Harness, прямое подключение внутри доверенной локальной сети.</sub></p>
@@ -73,9 +73,11 @@ dsh web
73
73
 
74
74
  ## Совместимость
75
75
 
76
+ Local Link `1.2.4` собирается и проверяется на DeepSeek Harness `0.2.1-rc.2`. Поддержаны доверенные адреса из `webStartup` с резервным путём через `webRuntime` для старых Host. Выбор чата для QR и защита от мобильного автофокуса используют публичные Session-scoped слоты; кнопка парных устройств открывает штатные настройки через актуальный launcher.
77
+
76
78
  Диапазон устанавливаемых версий DeepSeek Harness объявлен в `package.json` через `engines.dsh`. Совместимость проверяется на конкретных релизах и не выводится только из успешной установки или плавающего dist-tag.
77
79
 
78
- Local Link `1.2.3` собирается на контрактах Harness `0.2.0-rc.2`. На нём проверены сопряжение по LAN, одноразовый вход в браузер, авторизованные страница и WebSocket, а также немедленное закрытие WebSocket после отзыва устройства. Выбор, просмотр и создание папок через новый API `directoryPicker` остаются доступны только на самом хосте, не через LAN. Адаптер мобильных значков понимает новые имена экспорта по толщине линии и прежние имена по размеру. Предыдущие RC оставлены в `engines.dsh` на основании исторических проверок в changelog; все они повторно для этого патча не прогонялись. Проверка на физическом телефоне проводится отдельно от эмуляции браузера.
80
+ На `0.2.1-rc.2` проверены LAN-сопряжение, переход по QR в выбранный чат, авторизованные HTTP/WebSocket, немедленное закрытие соединения после отзыва устройства, запрет RPC выбора папок через LAN и мобильная вёрстка на ширинах 320–768 CSS-пикселей в EN и ZH. Предыдущие Host оставлены в диапазоне на основании исторических проверок из [changelog](CHANGELOG.md); вся старая матрица и физический телефон заново не проверялись. Запись с микрофона телефона через обычный LAN HTTP по-прежнему не поддерживается: релиз не добавляет HTTPS или голосовой ввод.
79
81
 
80
82
  ## Использование
81
83
 
@@ -117,11 +119,11 @@ Local Link `1.2.3` собирается на контрактах Harness `0.2.0
117
119
  - модальные панели плагина удерживают клавиатурный фокус и после закрытия возвращают его вызвавшему элементу;
118
120
  - существующие рабочие пространства остаются доступны, а вводящая в заблуждение удалённая кнопка `Add workspace`, открывающая системный выбор каталога, скрыта.
119
121
 
120
- Изображения в тёмной теме сняты из настоящих браузерных сессий Harness `0.2.0-rc.2` при эмулируемом viewport `430 × 932`. В отдельных демонстрационных профилях используются только вымышленные рабочие пространства, диалоги, модели, устройства и статистика — без данных реальных проектов. Русский README использует английские кадры; у китайского README отдельные скриншоты на упрощённом китайском. Субагенты показаны в штатном каталоге Harness в заголовке.
122
+ Скриншоты в тёмной теме сняты из настоящих браузерных сессий Harness `0.2.1-rc.2`: мобильные кадры — `430 × 932`, desktop — `1440 × 1000`. В отдельных демонстрационных профилях используются только вымышленные рабочие пространства, диалоги, модели, устройства и статистика. Русский README использует английские кадры; у китайского README отдельные скриншоты на упрощённом китайском. Субагенты показаны в штатном каталоге Harness в заголовке.
121
123
 
122
124
  | Навигация | Текущая сессия | Субагенты | Диалог |
123
125
  | :---: | :---: | :---: | :---: |
124
- | <img src="docs/images/mobile-navigation.png" width="210" alt="Навигационная панель Mobile View в тёмной теме с вымышленными рабочим пространством и сессией"> | <img src="docs/images/mobile-session-info.png" width="210" alt="Панель Current session в тёмной теме с вымышленными моделью, доступом к рабочему пространству, статистикой и журналом сессии"> | <img src="docs/images/mobile-subagents.png" width="210" alt="Штатный каталог субагентов Harness в заголовке с двумя вымышленными дочерними агентами"> | <img src="docs/images/mobile-chat.png" width="210" alt="Диалог Harness в Mobile View с исходными действиями сообщения и элементами поля ввода в одну строку"> |
126
+ | <img src="docs/images/mobile-navigation.jpg" width="210" alt="Навигационная панель Mobile View в тёмной теме с вымышленными рабочим пространством и сессией"> | <img src="docs/images/mobile-session-info.jpg" width="210" alt="Панель Current session в тёмной теме с вымышленными моделью, доступом к рабочему пространству, статистикой и журналом сессии"> | <img src="docs/images/mobile-subagents.jpg" width="210" alt="Штатный каталог субагентов Harness в заголовке с двумя вымышленными дочерними агентами"> | <img src="docs/images/mobile-chat.jpg" width="210" alt="Диалог Harness в Mobile View с исходными действиями сообщения и элементами поля ввода в одну строку"> |
125
127
 
126
128
  ### Разрешения
127
129
 
@@ -140,13 +142,13 @@ Local Link `1.2.3` собирается на контрактах Harness `0.2.0
140
142
  Браузеры не умеют надёжно отличать ноутбук от настольного компьютера, поэтому оба варианта отображаются как `Computer`.
141
143
 
142
144
  <p align="center">
143
- <img src="docs/images/local-access-devices.png" width="960" alt="Настройки DeepSeek Harness, открытые на компактном списке подключённых устройств Local access">
145
+ <img src="docs/images/local-access-devices.jpg" width="960" alt="Настройки DeepSeek Harness, открытые на компактном списке подключённых устройств Local access">
144
146
  </p>
145
147
 
146
148
  Разверните `Diagnostics` на той же странице Settings, чтобы просмотреть последние события локального шлюза. `Copy report` формирует готовый для issue JSON, а `Clear` удаляет локальную историю. Отчёт содержит только коды событий, время, серьёзность и небольшой разрешённый контекст; в него никогда не попадают токены подключения, cookie, IP-адреса, идентификаторы устройств и сессий, имена устройств, пути запросов, промпты, диалоги или файлы проекта.
147
149
 
148
150
  <p align="center">
149
- <img src="docs/images/local-access-diagnostics.png" width="960" alt="Настройки Local access в DeepSeek Harness с раскрытой нативной панелью Diagnostics">
151
+ <img src="docs/images/local-access-diagnostics.jpg" width="960" alt="Настройки Local access в DeepSeek Harness с раскрытой нативной панелью Diagnostics">
150
152
  </p>
151
153
 
152
154
  ## Почему плагин остаётся небольшим
package/README.zh.md CHANGED
@@ -13,12 +13,12 @@
13
13
 
14
14
  打开 `Local access` 并扫描二维码后,已配对的浏览器会进入桌面端当前选中的 Harness 会话,并继续使用相同的实时对话、权限、工作区和插件界面。
15
15
 
16
- `1.2.x` 系列支持 DeepSeek Harness `0.1.5-rc.2`、`0.1.7-rc.2` 和 `0.2.0-rc.2`,并让原生 Web 客户端可以在窄屏触控设备上使用。移动视图只调整界面布局,不接管 Harness 的会话、权限或业务逻辑。
16
+ `1.2.x` 系列支持 DeepSeek Harness `0.1.5-rc.2`、`0.1.7-rc.2`、`0.2.0-rc.2` 和 `0.2.1-rc.2`,并让原生 Web 客户端可以在窄屏触控设备上使用。移动视图只调整界面布局,不接管 Harness 的会话、权限或业务逻辑。
17
17
 
18
18
  > **安全边界:** 网关使用明文 HTTP,仅适用于可信私有网络。不要将端口暴露到互联网,也不要在公共 Wi-Fi 上使用。
19
19
 
20
20
  <p align="center">
21
- <img src="docs/images/local-access-qr.zh.png" width="960" alt="DeepSeek Harness 中的 dsh-local-link 一次性二维码配对界面">
21
+ <img src="docs/images/local-access-qr.zh.jpg" width="960" alt="DeepSeek Harness 中的 dsh-local-link 一次性二维码配对界面">
22
22
  </p>
23
23
 
24
24
  <p align="center"><sub>通过可信局域网直接打开同一个 Harness 会话。</sub></p>
@@ -71,9 +71,11 @@ profile 会指向当前 checkout。修改客户端代码后需要重新构建;
71
71
 
72
72
  ## 兼容性
73
73
 
74
+ Local Link `1.2.4` 使用 DeepSeek Harness `0.2.1-rc.2` 的契约构建并完成验证。支持 `webStartup` 可信地址配置,同时保留旧版 `webRuntime` 回退。二维码中的会话选择和移动端自动聚焦保护使用公开的会话作用域;已配对设备快捷入口通过当前原生 Settings 启动器打开设置。
75
+
74
76
  可安装的 DeepSeek Harness 版本范围通过 `package.json` 中的 `engines.dsh` 声明。兼容性按精确发布版本验证,不会因为安装成功或可变的 dist-tag 就推断为兼容。
75
77
 
76
- Local Link `1.2.3` 使用 Harness `0.2.0-rc.2` 的开发契约构建,并在该版本上验证了局域网配对、一次性浏览器登录、经过认证的页面与 WebSocket 访问,以及撤销设备后立即关闭 WebSocket。新版 `directoryPicker` API 的目录选择、浏览和创建仍仅允许在主机本地使用,不能通过局域网调用。移动图标适配器兼容新版按线条粗细命名的导出和旧版按尺寸命名的导出。`engines.dsh` 中保留的早期 RC 基于更新日志中的历史验证;本次补丁未重新运行所有旧版本。实体手机验收仍需单独进行。
78
+ 在 `0.2.1-rc.2` 上已验证局域网配对、二维码打开所选会话、认证 HTTP/WebSocket、撤销设备后立即关闭连接、目录选择 RPC 的局域网限制,以及 EN/ZH 在 320–768 CSS px 的移动布局。较早 Host 的声明依据[更新日志](CHANGELOG.md)中的历史验收;本次未重新运行全部旧版本矩阵或实体手机验收。普通局域网 HTTP 仍不支持手机麦克风录音;本次发布不提供 HTTPS 或语音输入。
77
79
 
78
80
  ## 使用方法
79
81
 
@@ -100,11 +102,11 @@ Local Link `1.2.3` 使用 Harness `0.2.0-rc.2` 的开发契约构建,并在该
100
102
  - 手机端隐藏聊天底部重复的上下文用量指示器和在电脑上打开文件的按钮(资源管理器/VS Code/Rider);桌面端仍保留,手机端可在 `Current session` 查看上下文详情;
101
103
  - 顶栏、消息操作、输入工具、安全区域和虚拟键盘行为适配窄屏。
102
104
 
103
- 以下深色主题截图来自 Harness `0.2.0-rc.2` 的真实浏览器会话,使用 `430 × 932` 模拟视口。独立截图配置只包含虚构的工作区、对话、模型、设备和用量数据,不包含真实项目数据。中文 README 使用独立的简体中文截图;子智能体通过 Harness 原生的标题栏目录展示。
105
+ 以下深色主题截图来自 Harness `0.2.1-rc.2` 的真实浏览器会话:移动截图为 `430 × 932`,桌面截图为 `1440 × 1000`。独立演示配置只包含虚构的工作区、对话、模型、设备和用量,不包含真实项目数据。中文 README 使用独立的简体中文截图,俄文文档复用英文截图;子智能体通过 Harness 原生标题栏目录展示。
104
106
 
105
107
  | 导航 | 当前会话 | 子智能体 | 对话 |
106
108
  | :---: | :---: | :---: | :---: |
107
- | <img src="docs/images/mobile-navigation.zh.png" width="210" alt="包含虚构工作区与会话的深色移动导航抽屉"> | <img src="docs/images/mobile-session-info.zh.png" width="210" alt="包含虚构模型、工作区权限、统计和会话日志数据的深色当前会话抽屉"> | <img src="docs/images/mobile-subagents.zh.png" width="210" alt="包含两个虚构子智能体的原生深色标题栏目录"> | <img src="docs/images/mobile-chat.zh.png" width="210" alt="包含原生消息操作和单行输入工具的深色 Harness 移动对话"> |
109
+ | <img src="docs/images/mobile-navigation.zh.jpg" width="210" alt="包含虚构工作区与会话的深色移动导航抽屉"> | <img src="docs/images/mobile-session-info.zh.jpg" width="210" alt="包含虚构模型、工作区权限、统计和会话日志数据的深色当前会话抽屉"> | <img src="docs/images/mobile-subagents.zh.jpg" width="210" alt="包含两个虚构子智能体的原生深色标题栏目录"> | <img src="docs/images/mobile-chat.zh.jpg" width="210" alt="包含原生消息操作和单行输入工具的深色 Harness 移动对话"> |
108
110
 
109
111
  ### 权限
110
112
 
@@ -123,13 +125,13 @@ Local Link `1.2.3` 使用 Harness `0.2.0-rc.2` 的开发契约构建,并在该
123
125
  浏览器无法可靠区分笔记本与台式机,因此两者统一显示为 `Computer`。
124
126
 
125
127
  <p align="center">
126
- <img src="docs/images/local-access-devices.zh.png" width="960" alt="DeepSeek Harness Local access 已配对设备列表">
128
+ <img src="docs/images/local-access-devices.zh.jpg" width="960" alt="DeepSeek Harness Local access 已配对设备列表">
127
129
  </p>
128
130
 
129
131
  展开同一设置页的 `诊断` 面板,可查看本地网关事件,并复制经过隐私过滤的报告。报告不包含配对令牌、Cookie、地址、设备名称、请求路径或对话内容。
130
132
 
131
133
  <p align="center">
132
- <img src="docs/images/local-access-diagnostics.zh.png" width="960" alt="DeepSeek Harness 本地访问设置中展开的诊断面板">
134
+ <img src="docs/images/local-access-diagnostics.zh.jpg" width="960" alt="DeepSeek Harness 本地访问设置中展开的诊断面板">
133
135
  </p>
134
136
 
135
137
  ## 工作原理
package/cordis.patch.yml CHANGED
@@ -3,9 +3,9 @@
3
3
  # LAN authorities through its public trustedHosts contract. Harness still keeps
4
4
  # settings, credentials, native Host actions, and preset authoring loopback-only.
5
5
  - id: connection
6
- inject: [webRuntime, localLinkGateway]
6
+ inject: [localLinkGateway]
7
7
  config:
8
- trustedHosts: !!js "[...ctx.webRuntime.trustedHosts, ...ctx.localLinkGateway.trustedHosts]"
8
+ trustedHosts: !!js "[...(ctx.root.webStartup?.trustedHosts ?? ctx.root.webRuntime?.trustedHosts ?? []), ...ctx.localLinkGateway.trustedHosts]"
9
9
 
10
10
  - insert:
11
11
  - id: dsh-local-link
@@ -72,9 +72,9 @@ The Harness `sidebar.footer.action` contract is a list, but the supported Web cl
72
72
 
73
73
  The connection card is fixed to the viewport and positioned from the rendered Local access action. On desktop it opens just beyond the sidebar edge and remains vertically centered. Its final QR-state height is reserved before the pairing request resolves, so loading the QR cannot move the card after its first visible frame. On narrow or short viewports it is clamped to a 12 px viewport gutter and scrolls internally instead of moving footer actions or covering them.
74
74
 
75
- Harness keeps settings open state and section selection private inside its shell; the public `openSection` callback is not a general navigation service. The popover's `Paired devices` shortcut therefore uses one bounded compatibility bridge: it clicks the semantic settings dialog trigger and then the nav row matching this plugin's own localized section label. The bridge uses no generated class names, mutates no DOM, and can be removed when Harness exposes a general settings-navigation service.
75
+ Harness keeps settings open state and section selection private inside its shell; the public `openSection` callback is not a general navigation service. The popover's `Paired devices` shortcut therefore uses one bounded, user-initiated compatibility bridge. It first selects an already-open Settings section. Otherwise, older Hosts use the explicitly labelled Settings dialog trigger scoped to the sidebar; current Hosts use the `settings.launcher` account menu and its localized Settings item, followed by this plugin's own localized section label. The Host locale service supplies the Settings label, including any installed language pack. It never clicks an unscoped dialog trigger, so session-statistics popovers cannot be selected accidentally. Waiting stops after at most two seconds or 120 frames. The bridge uses no generated class names, mutates no DOM, and can be removed when Harness exposes a general settings-navigation service.
76
76
 
77
- The Host plugin exposes the running gateway authorities as a Cordis service. `cordis.patch.yml` merges that service with `webRuntime.trustedHosts` before the stock connection module starts. Trust is therefore declared once on the Host; client code neither mutates `connection.isLoopback` nor carries an authentication marker.
77
+ The Host plugin exposes the running gateway authorities as a Cordis service. `cordis.patch.yml` merges that service with `webStartup.trustedHosts` on newer Harness versions, falling back to `webRuntime.trustedHosts` on older versions, before the stock connection module starts. The gateway depends on `webServer`, so invocation startup is available before this expression is evaluated; connection does not require the removed `webRuntime` service. Trust is therefore declared once on the Host; client code neither mutates `connection.isLoopback` nor carries an authentication marker.
78
78
 
79
79
  Plain HTTP on a private IP is not a browser secure context, while the stock Harness RPC client calls `crypto.randomUUID()` during connection startup. The rewritten index therefore installs a small RFC 4122 v4 fallback backed by `crypto.getRandomValues()` before the stock boot manifest executes. This avoids certificate installation while keeping the LAN-only setup functional.
80
80
 
@@ -175,7 +175,7 @@ No service discovery, certificate generator, tunnel client, native application,
175
175
 
176
176
  ## Compatibility strategy
177
177
 
178
- The plugin develops against the exact DeepSeek Harness `0.2.0-rc.2` contracts. The installable Host range is declared by `engines.dsh`; most integration uses declared package contracts, but several adapters are intentionally version-sensitive. The 0.1.7+ icon exports are weight-named rather than size-named; the client resolves either form at runtime. The 0.1.7+ Session list no longer owns current selection or the older subagent catalog methods. Current-session details therefore use the session-scoped trigger identity, while the plugin's legacy subagent sheet is registered only when its required catalog actions are present. On these releases, `@deepseek-ai/dsh-client-ui-subagent` owns the native header catalog and navigation. The 0.2 directory-picker RPCs (`directoryPicker.pick`, `directoryPicker.list`, and `directoryPicker.createDirectory`) join the legacy Host methods in the gateway's loopback-only filter; ordinary session and workspace methods remain available.
178
+ Local Link `1.2.4` develops against the exact DeepSeek Harness `0.2.1-rc.2` contracts; published Local Link `1.2.3` used `0.2.0-rc.2`. The installable Host range is declared by `engines.dsh`; most integration uses declared package contracts, but several adapters are intentionally version-sensitive. The 0.1.7+ icon exports are weight-named rather than size-named; the client resolves either form at runtime. The 0.1.7+ Session list no longer owns current selection or the older subagent catalog methods. Current-session details, QR invitation identity and mobile autofocus suppression therefore use public Session-scoped slots, not a catalog `current` field or the Workspace service's private selection store. The invisible invitation observer mounts on desktop as well as mobile; scope cleanup cannot erase a newer scope's identity. The plugin's legacy subagent sheet is registered only when its required catalog actions are present. On these releases, `@deepseek-ai/dsh-client-ui-subagent` owns the native header catalog and navigation. Mobile Current session details replace both the older `stats` composer contribution and the new `activity` / `usage` pills; desktop contributions are untouched. The 0.2 directory-picker RPCs (`directoryPicker.pick`, `directoryPicker.list`, and `directoryPicker.createDirectory`) join the legacy Host methods in the gateway's loopback-only filter; ordinary session and workspace methods remain available.
179
179
 
180
180
  | Adapter | Why it exists | Failure behavior | Removal condition |
181
181
  | --- | --- | --- | --- |
Binary file
Binary file
Binary file
Binary file
package/lib/client.js CHANGED
@@ -282,7 +282,7 @@ window.__ModuleLoader__.load({
282
282
  const address = {
283
283
  parentSessionId,
284
284
  childSessionId: entry.id,
285
- mode: entry.mode
285
+ mode: entry.mode === "external" ? "unknown" : entry.mode
286
286
  };
287
287
  return /* @__PURE__ */ react.default.createElement(react.default.Fragment, { key: entry.id }, /* @__PURE__ */ react.default.createElement("div", {
288
288
  className: "dllm-subagent-row",
@@ -888,9 +888,13 @@ window.__ModuleLoader__.load({
888
888
  id: "session-log-download",
889
889
  priority: MOBILE_SESSION_LOG_PRIORITY
890
890
  }, () => null)), "dsh-local-link: move mobile session log out of header");
891
- ctx.effect(() => ctx.slots.inject("conversation.composer.dock", () => ctx.slots.register({
891
+ for (const id of [
892
+ "stats",
893
+ "activity",
894
+ "usage"
895
+ ]) ctx.effect(() => ctx.slots.inject("conversation.composer.dock", () => ctx.slots.register({
892
896
  name: "conversation.composer.dock",
893
- id: "stats",
897
+ id,
894
898
  priority: MOBILE_STATS_PRIORITY
895
899
  }, () => null)), "dsh-local-link: move mobile session statistics into session info");
896
900
  ctx.effect(() => ctx.slots.inject("conversation.session.header.utilities", () => ctx.slots.register({
@@ -947,17 +951,39 @@ window.__ModuleLoader__.load({
947
951
  return this.suppress;
948
952
  }
949
953
  };
954
+ /** Follow the rendered Session scope, not the Host catalog's former `current` field. */
955
+ function observeMobileComposerSession(guard, sessionId, activeInput) {
956
+ if (guard.selectionChanged(sessionId)) activeInput()?.blur();
957
+ return () => {
958
+ guard.selectionChanged(void 0);
959
+ };
960
+ }
961
+ function MobileComposerSessionObserver({ sessionId, guard, activeInput }) {
962
+ (0, react.useLayoutEffect)(() => observeMobileComposerSession(guard, sessionId, activeInput), [
963
+ guard,
964
+ sessionId,
965
+ activeInput
966
+ ]);
967
+ return null;
968
+ }
950
969
  function installMobileComposerAutofocusGuard(ctx) {
951
- const guard = new MobileComposerAutofocusGuard(ctx.sessions.list.getSnapshot().current);
970
+ const guard = new MobileComposerAutofocusGuard(void 0);
952
971
  const composerInput = (target) => {
953
972
  if (!(target instanceof HTMLElement)) return null;
954
973
  const input = target.closest("textarea,[contenteditable=\"true\"]");
955
974
  if (input === null) return null;
956
975
  return input.closest(".dllm-main") !== null || document.body.hasAttribute("data-dsh-local-link-mobile") ? input : null;
957
976
  };
958
- const offSessions = ctx.sessions.list.subscribe(() => {
959
- if (guard.selectionChanged(ctx.sessions.list.getSnapshot().current)) composerInput(document.activeElement)?.blur();
960
- });
977
+ const activeInput = () => composerInput(document.activeElement);
978
+ const offSessions = ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
979
+ name: "conversation.input.dock",
980
+ id: "dsh-local-link.mobile-composer-session",
981
+ order: -100
982
+ }, (props) => /* @__PURE__ */ react.default.createElement(MobileComposerSessionObserver, {
983
+ ...props,
984
+ guard,
985
+ activeInput
986
+ })));
961
987
  const onPointerDown = (event) => {
962
988
  const target = composerInput(event.target);
963
989
  if (target !== null) guard.pointerDown(target, Date.now());
@@ -1145,6 +1171,78 @@ ${MOBILE_SESSION_INFO_STYLES}
1145
1171
  "layout"
1146
1172
  ] });
1147
1173
  //#endregion
1174
+ //#region src/session-selection.tsx
1175
+ /** Selection belongs to the rendered Session scope, not the Host catalog. */
1176
+ var CurrentSessionTracker = class {
1177
+ current;
1178
+ owner;
1179
+ getCurrent = () => this.current;
1180
+ observe(sessionId) {
1181
+ const owner = Symbol("session scope");
1182
+ this.owner = owner;
1183
+ this.current = sessionId;
1184
+ return () => {
1185
+ if (this.owner !== owner) return;
1186
+ this.owner = void 0;
1187
+ this.current = void 0;
1188
+ };
1189
+ }
1190
+ };
1191
+ function SessionObserver({ sessionId, tracker }) {
1192
+ (0, react.useLayoutEffect)(() => tracker.observe(sessionId), [tracker, sessionId]);
1193
+ return null;
1194
+ }
1195
+ function trackCurrentSession(ctx, tracker) {
1196
+ return ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
1197
+ name: "conversation.input.dock",
1198
+ id: "dsh-local-link.current-session",
1199
+ order: -110
1200
+ }, (props) => /* @__PURE__ */ react.default.createElement(SessionObserver, {
1201
+ ...props,
1202
+ tracker
1203
+ })));
1204
+ }
1205
+ //#endregion
1206
+ //#region src/settings-navigation.ts
1207
+ function hasLabel(element, label) {
1208
+ return element.getAttribute("aria-label") === label || element.textContent?.trim() === label || [...element.children].some((child) => child.getAttribute("aria-hidden") !== "true" && child.textContent?.trim() === label);
1209
+ }
1210
+ /** Bounded, user-initiated bridge until Harness exposes section navigation. */
1211
+ function openSettingsSection(labels, environment = {
1212
+ document,
1213
+ requestFrame: (callback) => {
1214
+ requestAnimationFrame(callback);
1215
+ }
1216
+ }) {
1217
+ const doc = environment.document;
1218
+ const selectSection = () => {
1219
+ const section = [...doc.querySelectorAll("[role=\"dialog\"] nav button")].find((button) => hasLabel(button, labels.section));
1220
+ section?.click();
1221
+ return section !== void 0;
1222
+ };
1223
+ if (selectSection()) return;
1224
+ const legacy = [...doc.querySelectorAll("[data-slot=\"sidebar.settings\"] button[aria-haspopup=\"dialog\"], [data-slot=\"sidebar\"] button[aria-haspopup=\"dialog\"]")].find((button) => hasLabel(button, labels.settings));
1225
+ const launcher = legacy ?? doc.querySelector("[data-slot=\"settings.launcher\"] button[aria-haspopup=\"menu\"]");
1226
+ if (launcher === null) return;
1227
+ if (launcher.getAttribute("aria-expanded") !== "true") launcher.click();
1228
+ let waitingForMenu = legacy === void 0;
1229
+ let remainingFrames = 120;
1230
+ const deadline = Date.now() + 2e3;
1231
+ const advance = () => {
1232
+ if (selectSection()) return;
1233
+ if (remainingFrames-- <= 0 || Date.now() > deadline) return;
1234
+ if (waitingForMenu) {
1235
+ const settings = [...doc.querySelectorAll("[role=\"menu\"] [role=\"menuitem\"]")].find((button) => hasLabel(button, labels.settings));
1236
+ if (settings !== void 0) {
1237
+ waitingForMenu = false;
1238
+ settings.click();
1239
+ }
1240
+ }
1241
+ environment.requestFrame(advance);
1242
+ };
1243
+ environment.requestFrame(advance);
1244
+ }
1245
+ //#endregion
1148
1246
  //#region src/locales/en.json
1149
1247
  var en_default = {
1150
1248
  nav: "Local access",
@@ -1412,23 +1510,6 @@ ${MOBILE_SESSION_INFO_STYLES}
1412
1510
  }];
1413
1511
  });
1414
1512
  }
1415
- function openSettingsSection(label) {
1416
- const trigger = document.querySelector("button[aria-haspopup=\"dialog\"][aria-expanded]");
1417
- if (trigger === null) return;
1418
- trigger.click();
1419
- let attempts = 0;
1420
- const selectSection = () => {
1421
- const dialog = document.querySelector("[role=\"dialog\"]");
1422
- const target = dialog === null ? void 0 : [...dialog.querySelectorAll("nav button")].find((button) => button.textContent?.trim() === label);
1423
- if (target !== void 0) {
1424
- target.click();
1425
- return;
1426
- }
1427
- attempts += 1;
1428
- if (attempts < 10) window.requestAnimationFrame(selectSection);
1429
- };
1430
- window.requestAnimationFrame(selectSection);
1431
- }
1432
1513
  async function jsonRequest(path, init) {
1433
1514
  const response = await fetch(path, {
1434
1515
  ...init,
@@ -1467,7 +1548,7 @@ ${MOBILE_SESSION_INFO_STYLES}
1467
1548
  .dsh-local-link-popover__copy--copied{background:var(--dsw-alias-state-success-tertiary,#16803a22);color:var(--dsw-alias-state-success-primary,#39a85b)}
1468
1549
  .dsh-local-link-popover__error{color:var(--dsw-alias-state-error-primary,#c53030)!important}
1469
1550
  `;
1470
- function LocalLinkFooter({ wide, t, getCurrentSessionId }) {
1551
+ function LocalLinkFooter({ wide, t, getCurrentSessionId, getSettingsLabel }) {
1471
1552
  const desktop = desktopOrigin();
1472
1553
  const root = (0, react.useRef)(null);
1473
1554
  const popover = (0, react.useRef)(null);
@@ -1613,7 +1694,10 @@ ${MOBILE_SESSION_INFO_STYLES}
1613
1694
  variant: "ghost",
1614
1695
  onClick: () => {
1615
1696
  setOpen(false);
1616
- openSettingsSection(t("nav"));
1697
+ openSettingsSection({
1698
+ section: t("nav"),
1699
+ settings: getSettingsLabel()
1700
+ });
1617
1701
  }
1618
1702
  }, t("connect.pairedDevices"))), /* @__PURE__ */ react.default.createElement("p", null, t("connect.description")), /* @__PURE__ */ react.default.createElement("div", {
1619
1703
  className: "dsh-local-link-popover__content",
@@ -1881,6 +1965,8 @@ ${MOBILE_SESSION_INFO_STYLES}
1881
1965
  "layout"
1882
1966
  ];
1883
1967
  function apply(ctx) {
1968
+ const currentSession = new CurrentSessionTracker();
1969
+ ctx.effect(() => trackCurrentSession(ctx, currentSession), "dsh-local-link: current session for invitations");
1884
1970
  ctx.effect(() => ctx.locale.register(NS, {
1885
1971
  en: en_default,
1886
1972
  zh: zh_default
@@ -1894,10 +1980,12 @@ ${MOBILE_SESSION_INFO_STYLES}
1894
1980
  return () => style.remove();
1895
1981
  }, "dsh-local-link: interface styles");
1896
1982
  ctx.effect(() => {
1897
- const getCurrentSessionId = () => ctx.sessions.list.getSnapshot().current;
1983
+ const getCurrentSessionId = currentSession.getCurrent;
1984
+ const getSettingsLabel = () => ctx.locale.bind("settings")("trigger");
1898
1985
  const Footer = (props) => /* @__PURE__ */ react.default.createElement(LocalLinkFooter, {
1899
1986
  ...props,
1900
- getCurrentSessionId
1987
+ getCurrentSessionId,
1988
+ getSettingsLabel
1901
1989
  });
1902
1990
  return ctx.slots.inject("sidebar.footer.action", () => ctx.slots.register({
1903
1991
  name: "sidebar.footer.action",