dsh-auth-remote 0.2.0 → 0.3.2

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 (69) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/CHANGELOG.zh-CN.md +21 -0
  3. package/CONTRIBUTING.md +2 -0
  4. package/CONTRIBUTING.zh-CN.md +2 -0
  5. package/README.md +33 -47
  6. package/README.zh-CN.md +33 -47
  7. package/dist/cli.js +63 -530
  8. package/dist/cli.js.map +4 -4
  9. package/dist/client.js +917 -135
  10. package/dist/client.js.map +3 -3
  11. package/dist/index.js +124 -67
  12. package/dist/index.js.map +4 -4
  13. package/dist/login.css +0 -21
  14. package/dist/login.css.map +2 -2
  15. package/dist/login.js +892 -155
  16. package/dist/login.js.map +3 -3
  17. package/dist/types/adapters/dsh/browser-capability.d.ts.map +1 -1
  18. package/dist/types/adapters/dsh/compatibility.d.ts +1 -1
  19. package/dist/types/adapters/dsh/compatibility.d.ts.map +1 -1
  20. package/dist/types/adapters/dsh/liveshare.d.ts +4 -0
  21. package/dist/types/adapters/dsh/liveshare.d.ts.map +1 -0
  22. package/dist/types/adapters/dsh/runtime-capabilities.d.ts +6 -11
  23. package/dist/types/adapters/dsh/runtime-capabilities.d.ts.map +1 -1
  24. package/dist/types/adapters/dsh/webserver.d.ts +8 -4
  25. package/dist/types/adapters/dsh/webserver.d.ts.map +1 -1
  26. package/dist/types/cli/ipc-client.d.ts.map +1 -1
  27. package/dist/types/cli/messages.d.ts +56 -0
  28. package/dist/types/cli/messages.d.ts.map +1 -0
  29. package/dist/types/cli/profile.d.ts.map +1 -1
  30. package/dist/types/cli/prompt.d.ts.map +1 -1
  31. package/dist/types/config.d.ts +2 -2
  32. package/dist/types/config.d.ts.map +1 -1
  33. package/dist/types/http/account-login.d.ts.map +1 -1
  34. package/dist/types/index.d.ts.map +1 -1
  35. package/dist/types/shared/dsh-support.d.ts.map +1 -1
  36. package/dist/types/shared/i18n.d.ts +878 -105
  37. package/dist/types/shared/i18n.d.ts.map +1 -1
  38. package/dist/types/shared/locales/de.d.ts +145 -0
  39. package/dist/types/shared/locales/de.d.ts.map +1 -0
  40. package/dist/types/shared/locales/en.d.ts +0 -49
  41. package/dist/types/shared/locales/en.d.ts.map +1 -1
  42. package/dist/types/shared/locales/es.d.ts +145 -0
  43. package/dist/types/shared/locales/es.d.ts.map +1 -0
  44. package/dist/types/shared/locales/fr.d.ts +145 -0
  45. package/dist/types/shared/locales/fr.d.ts.map +1 -0
  46. package/dist/types/shared/locales/ja.d.ts +145 -0
  47. package/dist/types/shared/locales/ja.d.ts.map +1 -0
  48. package/dist/types/shared/locales/pt.d.ts +145 -0
  49. package/dist/types/shared/locales/pt.d.ts.map +1 -0
  50. package/dist/types/shared/locales/ru.d.ts +145 -0
  51. package/dist/types/shared/locales/ru.d.ts.map +1 -0
  52. package/dist/types/shared/locales/zh.d.ts +0 -49
  53. package/dist/types/shared/locales/zh.d.ts.map +1 -1
  54. package/docs/deployment.md +30 -22
  55. package/docs/deployment.zh-CN.md +30 -22
  56. package/docs/development.md +70 -56
  57. package/docs/development.zh-CN.md +70 -56
  58. package/docs/legacy-compatibility.md +149 -80
  59. package/docs/legacy-compatibility.zh-CN.md +149 -80
  60. package/docs/releasing.md +15 -9
  61. package/docs/releasing.zh-CN.md +15 -9
  62. package/docs/reverse-proxy.md +2 -2
  63. package/docs/reverse-proxy.zh-CN.md +2 -2
  64. package/docs/support-history.md +67 -60
  65. package/docs/support-history.zh-CN.md +67 -60
  66. package/examples/web-profile-auth-remote.patch.yml +1 -1
  67. package/package.json +19 -22
  68. package/dist/types/cli/language.d.ts +0 -14
  69. package/dist/types/cli/language.d.ts.map +0 -1
@@ -2,17 +2,19 @@
2
2
 
3
3
  [简体中文](deployment.zh-CN.md)
4
4
 
5
- The npm example targets plugin `0.2.0`, DSH `0.2.1-rc.2` and its default `~/.dsh` data directory. The eleven supported releases and maintenance dates are in the [compatibility matrix](../README.md#dsh-compatibility); exact-version evidence and distribution records are in [DSH → plugin history](support-history.md#by-dsh). Use the [development guide](development.md) for isolated source builds. Choose your own hostname, proxy network and service manager.
5
+ This guide targets unpublished plugin candidate `0.3.2` with recommended DSH `0.2.2-alpha.2` and default `~/.dsh` data directory. See [README](../README.md#dsh-compatibility) for eight-version support/dates, [history](support-history.md#by-dsh) for old pairs and distribution, and [development](development.md) for source builds.
6
6
 
7
- Native capability lists below cover the exact DSH releases supported by plugin `0.2.0`, including both `0.2.1` RC releases.
7
+ The native capabilities below apply to `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4` and `0.2.2-alpha.2`.
8
8
 
9
- ## Minimal installation from npm
9
+ Upstream DSH `0.2.2-alpha.2` itself requires Node `>=24.9.0`; the plugin still declares Node `>=24` and adds no minor-version gate.
10
10
 
11
- Install the published package into the default `web` profile:
11
+ ## Minimal installation of the candidate archive
12
+
13
+ `0.3.2` is unpublished. Build and verify a local archive using the [development guide](development.md), then install that file. Published `0.3.1` retains its seven-host history and does not include this new-host adaptation; see the [exact distribution record](support-history.md#plugin-0.3.1). Use the same default `web` profile:
12
14
 
13
15
  ```sh
14
16
  dsh --version
15
- dsh plugin --profile web add dsh-auth-remote@0.2.0
17
+ dsh plugin --profile web add ./artifacts/dsh-auth-remote-0.3.2.tgz
16
18
  dsh plugin --profile web list
17
19
  dsh web --no-open --port 13090
18
20
  ```
@@ -21,7 +23,7 @@ Verify the selected DSH version and plugin list. No profile patch is needed for
21
23
 
22
24
  ```sh
23
25
  curl -fsS http://127.0.0.1:13090/auth-remote/ready
24
- dsh plugin --profile web exec dsh-auth-remote init --lang en
26
+ dsh plugin --profile web exec dsh-auth-remote init
25
27
  ```
26
28
 
27
29
  Open the printed root `http://127.0.0.1:13090/`. Anonymous navigation redirects to sign-in; anonymous business APIs are denied. The bundle suppresses native token URLs and automatic browser opening. Keep development and test homes separate from this account profile.
@@ -53,20 +55,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
53
55
 
54
56
  All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
55
57
 
56
- | Field | Effective value |
57
- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
- | `publicUrl` | CLI `--public-url` replaces the whole file URL on DSH `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`; otherwise file URL, migrated legacy single item, then actual listener root. Accept only absolute HTTP(S) roots with optional final slash, no credentials/path/query/fragment. |
59
- | `host` | CLI `--host`, then file, then `127.0.0.1`. Require a concrete IPv4 literal; DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` also accept concrete IPv6, including mapped forms. No DNS names or wildcard binds. |
60
- | `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound. |
61
- | `tlsCert`, `tlsKey` | DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`. Supply both file fields, or both CLI `--tls-cert`/`--tls-key`. A CLI pair replaces the whole file pair; sources are never mixed and unused file certificate paths are not read. Omit TLS for HTTP. |
62
- | `requireTotp` | Defaults to `false`. An unbound account may skip setup; an already bound account still needs its second factor. Set `true` to require TOTP enrollment before access. Explicit true/false settings, existing bindings and backup codes survive upgrades. |
63
- | `manualAccountLogin` | Defaults to `true`. Native Settings writes the current profile override; accepted saves affect new attempts immediately and persist across restarts without restarting authentication. False preserves admitted attempts and official credentials. Full manual-feature verification targets DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1` and `0.2.1-rc.2`; see README for forward admission and required API checks. |
64
- | `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions. |
65
- | `preserveOriginPaths` | Optional canonical segment-prefix paths; default `[]`. Matching routes keep the validated public Host and existing Origin after authentication. The final public origin configures native Connection trust automatically. |
58
+ | Field | Effective value |
59
+ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60
+ | `publicUrl` | CLI `--public-url` replaces the file URL, then migrated legacy single item, then actual listener root. HTTP(S) roots only, optional final slash, no credentials/path/query/fragment. |
61
+ | `host` | CLI, file, then `127.0.0.1`. Concrete IPv4/IPv6, including mapped forms; reject DNS names and wildcard binds. |
62
+ | `port` | CLI `--port`, then file, then `3080`, independently of host. `0` derives the entry only after the actual nonzero port is bound. |
63
+ | `tlsCert`, `tlsKey` | Supply both file fields or both CLI `--tls-cert`/`--tls-key`; CLI replaces the entire pair, without mixed sources or reading unused file paths. Omit for HTTP. |
64
+ | `requireTotp` | Defaults to `false`. An unbound account may skip setup; an already bound account still needs its second factor. Set `true` to require TOTP enrollment before access. Explicit true/false settings, existing bindings and backup codes survive upgrades. |
65
+ | `manualAccountLogin` | Defaults true. Native Settings writes the profile override; accepted saves immediately affect new authorizations and survive restart without restarting authentication. False preserves admitted attempts and official credentials. All eight have complete regression targets; see README for future admission/APIs. |
66
+ | `sessionHours` | Fixed default lifetime of 168 hours. Reducing it tightens existing sessions; increasing it does not revive expired sessions. |
67
+ | `preserveOriginPaths` | Optional canonical segment-prefix paths; default `[]`. Matching routes keep the validated public Host and existing Origin after authentication. The final public origin configures native Connection trust automatically. |
66
68
 
67
69
  **Pay particular attention to TLS paths:** relative file values resolve from the selected profile directory, where its `cordis.patch.yml` lives. Relative CLI paths resolve from the process's launch working directory. Neither uses the bundle or another overlay's directory. Absolute paths stay absolute.
68
70
 
69
- For a DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` override example, `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` replaces file host, port and URL independently. The listener binds an actual free port; the explicit public root stays unchanged. Configure any proxy to reach that actual port. Omit `--host` to keep the file host when overriding only the port.
71
+ On every supported version, `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` overrides file host, port and URL independently. The listener uses an actual free port while the explicit public root stays fixed; configure the proxy for that port. Omit host when overriding only port.
70
72
 
71
73
  For example, file `tlsCert: ./tls/dsh.crt` means `~/.dsh/profiles/web/tls/dsh.crt` even if you launch from a different directory. The following command uses `./launch-workdir/tls/dsh.crt` and the matching key instead:
72
74
 
@@ -77,13 +79,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
77
79
 
78
80
  Supplying only one CLI flag fails even if the file contains the other half. Missing, unreadable, empty, malformed or mismatched certificate/key material fails startup without an HTTP fallback, and releases listener/admin/storage resources. Choose a certificate valid for the browser hostname; the plugin delegates TLS to the official listener.
79
81
 
80
- CLI public URL overrides are available only on DSH `0.2.1-alpha.1`, `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`. DSH `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2` reject that unknown flag and need the plugin file field; their Web prompt and `DSH_WEB_URL` retain the native fixed IPv4 loopback URL with the actual port. The plugin admission and printed public root still follow its effective configuration. 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` reject native IPv6/TLS.
82
+ All supported versions natively provide `--public-url`, IPv6 and TLS; this candidate retains the native API migration completed in `0.3.1`.
81
83
 
82
- DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` publishes the final Web URL in model runtime context and `DSH_WEB_URL`; DSH `0.2.1-alpha.1`, `0.2.1-alpha.2` embed it in the Web prompt section.
84
+ All eight project the final Web URL through model runtime context and `DSH_WEB_URL`; tests still scan all Web sections for duplicate URLs or tokens.
83
85
 
84
86
  ## Native HTTPS and IPv6
85
87
 
86
- On DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, merge this complete auth row for direct IPv6 loopback HTTPS, using your own certificate and key:
88
+ All eight supported versions can use this complete auth row for IPv6 loopback HTTPS with your own certificate/key:
87
89
 
88
90
  ```yaml
89
91
  - id: auth-remote
@@ -124,7 +126,7 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
124
126
 
125
127
  Plugin cookies follow the validated external origin and are host-only, HttpOnly and SameSite; HTTPS sets Secure. Native bridge credentials stay server-side and follow the native listener protocol, including HTTPS cookie audience/Secure when a public HTTP proxy fronts native HTTPS. Ports do not isolate browser cookies.
126
128
 
127
- Standard `/api` routes work with `preserveOriginPaths: []`; there is no need to list `/api`. The plugin always declares its finalized native bridge authority in Connection's `trustedHosts`, using the actual bound port (including `--port 0`), so downstream plugins that read this list can recognize the bridge without an extra trusted-host flag. Explicit CLI trusted hosts are merged and deduplicated; they do not expand the outer public-origin policy. Add a prefix only when a downstream route needs the original public Host. The plugin forwards an Origin only when the request supplied one, and preflights and declares the selected public authority for preserved paths. No separate Connection row is needed. Ordinary DSH `0.2.1-alpha.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` routes use the normalized native bind authority; Connection on 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` retains its internal HTTP loopback bridge. Both paths still require a full session. Revocation, Connection loss or storage failure closes active uploads, streams and upgrades and withdraws business admission. Readiness does not mean the account is initialized.
129
+ Standard `/api` routes work with `preserveOriginPaths: []`; there is no need to list `/api`. The plugin always declares its finalized native bridge authority in Connection's `trustedHosts`, using the actual bound port (including `--port 0`), so downstream plugins that read this list can recognize the bridge without an extra trusted-host flag. Explicit CLI trusted hosts are merged and deduplicated; they do not expand the outer public-origin policy. Add a prefix only when a downstream route needs the original public Host. The plugin forwards an Origin only when the request supplied one, and preflights and declares the selected public authority for preserved paths. No separate Connection row is needed. Ordinary routes on all eight use the normalized native bind authority and require a full session. Revocation, Connection loss or storage failure closes active uploads, streams and upgrades and withdraws business admission. Readiness does not mean the account is initialized.
128
130
 
129
131
  ## Start and verify the public entry
130
132
 
@@ -137,10 +139,16 @@ Startup prints the actual protocol/address/port and one distinct public root, de
137
139
 
138
140
  ## Backup, recovery and changes
139
141
 
142
+ Before upgrading an old deployment to `0.3.2`, stop DSH and back up the authentication directory, profile patch and package/lock files. Keep access private and retain independent `webserver disabled: true`. Upgrade DSH to a listed target first (recommended `0.2.2-alpha.2`), then install the plugin and verify readiness, anonymous denial, login and revocation. The six retired hosts cannot install `0.3.2`; do not grant a version-risk exemption. To roll back, stop the service, select an explicit old host (for example `0.2.1-alpha.2`) with last supported plugin `0.2.0`, and restore matching package/lock/patch backups. The six-host retirement happened in published `0.3.1` and is not repeated here. This migration does not change authentication data format; still check schema when restoring and never overwrite live state.
143
+
144
+ These are plugin `0.3.2` behavior changes, independent of DSH retirement: CLI text is fixed English, so remove `--lang` from scripts; JSON fields are unchanged. The standalone login page has no language selector and uses new `dsh-auth-remote-lang` memory, then `navigator.language`, then English. Old `dsh-auth-remote.locale` is ignored, retained and not migrated. Entering DSH remembers only native accepted preferences; signing out keeps them. The eight plugin languages do not expand old DSH native language catalogs.
145
+
140
146
  Stop DSH and verify it released the profile lock before copying `~/.dsh/profiles/web/auth-remote/auth-state.json`. Keep the copy in a private directory (0700) with file mode 0600. It contains password hashes, the TOTP secret, backup-code hashes and sessions. Do not copy an in-progress temporary file, overwrite live locked state or commit it. Back up the corresponding profile patch and package/lock files.
141
147
 
142
148
  For recovery, stop DSH, check schema/package compatibility, restore with private ownership/mode, then check readiness and CLI `status --json`. Local `reset-password`, `reset-totp` and `revoke-sessions` revoke sessions. A lost management response has an uncertain outcome; inspect status before another mutation.
143
149
 
144
150
  To change the external entry, replace the one `publicUrl`, update the proxy and restart DSH. Verify the new entry and rejection of the former non-loopback entry, including cookies, redirects, uploads and long connections. Do not temporarily configure both origins in this plugin.
145
151
 
146
- Official DeepSeek account authorization on DSH `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` uses the manual callback dialog described in the [README](../README.md#sign-in-to-an-official-deepseek-account). No callback listener or open loopback port is needed on the browser computer. Keep `/auth-remote/account/*` behind the same session/origin gate; submissions use same-origin JSON POSTs. Direct HTTP access to the native `/oauth/callback` cannot complete this manual handoff. No proxy exception, broader `preserveOriginPaths`, or cross-site allowance is required.
152
+ Official DeepSeek authorization on all eight uses the [README manual callback dialog](../README.md#sign-in-to-an-official-deepseek-account). No callback listener or open loopback port is needed on the browser computer. `/auth-remote/account/*` retains the session/origin gate and same-origin JSON POSTs; direct HTTP access to native `/oauth/callback` cannot complete this handoff. No proxy exception, broader paths or cross-site allowance is required.
153
+
154
+ Before using LiveShare on DSH `0.2.2-alpha.2`, enable it, configure Relay and sign in as Owner through native DSH setup. This plugin does not enable sharing or rewrite Relay configuration. Viewers receive no administrator identity; plugin sign-out and stopping a share are independent operations. Local protocol stand-ins establish basic compatibility; real Relay/OAuth, visitor models and file-write experience require separate verification. No broader anonymous exception or preserveOriginPaths setting is required.
@@ -2,17 +2,19 @@
2
2
 
3
3
  [English](deployment.md)
4
4
 
5
- npm 示例面向插件 `0.2.0`、DSH `0.2.1-rc.2` 与默认 `~/.dsh` 数据目录。十一版支持集合及维护日期见[兼容矩阵](../README.zh-CN.md#dsh-兼容性),精确版本证据和分发记录见 [DSH → 插件历史](support-history.zh-CN.md#by-dsh)。隔离源码构建见[开发指南](development.zh-CN.md)。域名、代理网络和服务管理器由部署者选择。
5
+ 本指南面向未发布插件候选 `0.3.2` 与推荐 DSH `0.2.2-alpha.2`,使用默认 `~/.dsh` 数据目录。八版支持/日期见 [README](../README.zh-CN.md#dsh-兼容性),旧组合与分发事实见[历史](support-history.zh-CN.md#by-dsh)。源码构建见[开发指南](development.zh-CN.md)。
6
6
 
7
- 下文原生能力列表覆盖插件 `0.2.0` 支持的精确 DSH 版本,包括两个 `0.2.1` RC 版本。
7
+ 下列原生能力适用于 `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`、`0.2.2-alpha.2`。
8
8
 
9
- ## 从 npm 最小化安装
9
+ 上游 DSH `0.2.2-alpha.2` 自身要求 Node `>=24.9.0`;插件仍声明 Node `>=24`,不增加小版本拦截。
10
10
 
11
- 把已发布的包安装到默认 `web` profile:
11
+ ## 最小化安装候选归档
12
+
13
+ `0.3.2` 尚未发布。按[开发指南](development.zh-CN.md)构建并验证本地归档后,安装该文件。已发布 `0.3.1` 保留七版历史,不包含本次新版宿主适配;分发事实见[精确历史记录](support-history.zh-CN.md#plugin-0.3.1)。保持同一默认 `web` profile:
12
14
 
13
15
  ```sh
14
16
  dsh --version
15
- dsh plugin --profile web add dsh-auth-remote@0.2.0
17
+ dsh plugin --profile web add ./artifacts/dsh-auth-remote-0.3.2.tgz
16
18
  dsh plugin --profile web list
17
19
  dsh web --no-open --port 13090
18
20
  ```
@@ -21,7 +23,7 @@ dsh web --no-open --port 13090
21
23
 
22
24
  ```sh
23
25
  curl -fsS http://127.0.0.1:13090/auth-remote/ready
24
- dsh plugin --profile web exec dsh-auth-remote init --lang zh
26
+ dsh plugin --profile web exec dsh-auth-remote init
25
27
  ```
26
28
 
27
29
  打开打印的 `http://127.0.0.1:13090/` 根地址。匿名导航跳转登录页,匿名业务 API 被拒绝。bundle 关闭原生 token URL 输出和自动打开浏览器;开发、测试 home 与账号 profile 分开。
@@ -53,20 +55,20 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
53
55
 
54
56
  以下字段均直接位于 `auth-remote.config`,没有别名或嵌套 TLS 对象。
55
57
 
56
- | 字段 | 生效值 |
57
- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
58
- | `publicUrl` | DSH `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 的 CLI `--public-url` 整项替换文件 URL;否则依次为文件、旧单项迁移、实际监听根地址。仅接受绝对 HTTP(S) 根 URL,可带末尾斜杠,不能带凭据、子路径、查询或片段。 |
59
- | `host` | CLI `--host`、文件、默认 `127.0.0.1`。要求具体 IPv4 字面量;DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 还接受具体 IPv6,包含 mapped 格式。拒绝 DNS 名称和通配绑定。 |
60
- | `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。 |
61
- | `tlsCert`、`tlsKey` | DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 可用。两个文件字段必须成对,CLI `--tls-cert`/`--tls-key` 也必须成对。CLI 整组替换文件组,不混合来源、不读取未采用的文件证书路径。省略 TLS 即 HTTP。 |
62
- | `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。 |
63
- | `manualAccountLogin` | 默认 `true`。原生 Settings 写当前 profile override,保存后当前页新授权立即生效且重启保留,不重启认证服务;false 不取消已接纳授权或退出官方账号。完整手动功能实测目标为 DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2`,前向准入与必要 API 检查见 README。 |
64
- | `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
65
- | `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
58
+ | 字段 | 生效值 |
59
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
60
+ | `publicUrl` | CLI `--public-url` 整项覆盖文件,其次旧单项迁移、实际监听根。只接纳 HTTP(S) 根 URL,可带末尾斜杠,无凭据/子路径/查询/片段。 |
61
+ | `host` | CLI、文件、默认 `127.0.0.1`。具体 IPv4/IPv6(含 mapped),拒绝 DNS 与通配绑定。 |
62
+ | `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。 |
63
+ | `tlsCert`、`tlsKey` | 文件字段或 CLI `--tls-cert`/`--tls-key` 必须成对,CLI 整组覆盖,不混来源,不读未采用文件。省略即 HTTP。 |
64
+ | `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。 |
65
+ | `manualAccountLogin` | 默认 true,原生 Settings 写当前 profile override;保存立即影响新授权且重启保留,不重启认证。false 保留已接纳授权和官方凭据。八版完整回归,未来准入及必要 API 见 README。 |
66
+ | `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
67
+ | `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
66
68
 
67
69
  **特别注意 TLS 路径:**文件中的相对值以所选 profile 目录为基准,即其 `cordis.patch.yml` 所在目录;CLI 的相对路径以进程启动 cwd 为基准。两者均不以 bundle 或其他 overlay 目录为基准。绝对路径保持绝对。
68
70
 
69
- DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 的覆盖示例 `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别替换文件 host、port 和 URL。监听绑定真实空闲端口,显式公开根地址保持不变;代理须到达该实际端口。仅覆盖端口时,省略 `--host` 即保留文件 host。
71
+ 全部支持版本中,`dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别覆盖文件 host、port、URL。监听使用实际空闲端口,公开根地址保持显式值,代理须到达该实际端口;仅覆盖 port 时可省略 host。
70
72
 
71
73
  例如文件 `tlsCert: ./tls/dsh.crt` 始终指 `~/.dsh/profiles/web/tls/dsh.crt`,从其他目录启动也不变。以下命令则使用 `./launch-workdir/tls/dsh.crt` 和对应私钥:
72
74
 
@@ -77,13 +79,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
77
79
 
78
80
  只给一个 CLI 参数会失败,即使文件提供另一半也不混用。证书/私钥缺失、不可读、空内容、PEM 无效或不匹配时启动失败,不回退 HTTP,并释放监听、管理 socket 和存储资源。证书须对浏览器主机名有效;TLS 由官方监听处理。
79
81
 
80
- CLI 公开 URL 覆盖仅在 DSH `0.2.1-alpha.1`、`0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 可用。DSH `0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2` 对该未知参数报错,须使用插件文件字段;其 Web 提示和 `DSH_WEB_URL` 保留原生固定 IPv4 回环 URL 加实际端口,插件准入和公开地址输出仍取生效配置。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` 明确拒绝原生 IPv6/TLS。
82
+ 全部支持版本原生提供 `--public-url`、IPv6 和 TLS;本候选沿用已发布 `0.3.1` 完成的原生 API 迁移。
81
83
 
82
- DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 将最终 Web 地址写入模型运行时上下文和 `DSH_WEB_URL`;DSH `0.2.1-alpha.1`、`0.2.1-alpha.2` 将地址写入 Web 提示段落。
84
+ 八版均把最终 Web URL 写入模型 runtime context 与 `DSH_WEB_URL`;测试仍扫描所有 Web 提示段,要求无重复地址或 token。
83
85
 
84
86
  ## 原生 HTTPS 与 IPv6
85
87
 
86
- DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 的 IPv6 回环 HTTPS 可合并以下完整认证条目,使用自己的证书和私钥:
88
+ 全部八个支持版本都可合并以下完整认证条目提供 IPv6 回环 HTTPS,使用自己的证书/私钥:
87
89
 
88
90
  ```yaml
89
91
  - id: auth-remote
@@ -124,7 +126,7 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2
124
126
 
125
127
  插件 Cookie 跟随已验证外部来源,限主机、HttpOnly、SameSite,HTTPS 设置 Secure。原生桥接凭据仅保留服务端,跟随原生监听协议;公开 HTTP 代理接入原生 HTTPS 时,其原生 Cookie audience/Secure 仍按 HTTPS。浏览器 Cookie 不通过端口隔离。
126
128
 
127
- 标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 普通路径使用归一化原生 bind authority,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` 的 Connection 保留内部 HTTP 回环桥接;两类路径均需完整会话。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
129
+ 标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。八版普通路径统一使用归一化原生 bind authority,经过完整会话认证。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
128
130
 
129
131
  ## 启动并验证公开入口
130
132
 
@@ -137,10 +139,16 @@ DSH `0.2.1-alpha.2`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2
137
139
 
138
140
  ## 备份、恢复与变更
139
141
 
142
+ 升级旧部署到 `0.3.2` 前,停止 DSH 并备份认证目录、profile patch、package/lock;保持入口私有和独立 `webserver disabled: true`。先把宿主升级至所列八版(推荐 `0.2.2-alpha.2`),再安装新插件并核对 ready、匿名拒绝、登录及撤销。六个已退役宿主不能安装 `0.3.2`,不要授予版本风险豁免。回退时停服,选择明确旧宿主(例如 `0.2.1-alpha.2`)与最后支持插件 `0.2.0`,恢复匹配的包/锁/patch 备份。六个宿主的退役发生于已发布 `0.3.1`,本次不重复退役。此次迁移不改变认证数据格式;恢复时仍核对 schema,禁止覆盖运行中的状态。
143
+
144
+ 这些是插件 `0.3.2` 自身的行为迁移,与 DSH 退役无关:CLI 固定英语,删除脚本中的 `--lang` 参数;JSON 字段不变。独立登录页不再提供语言选择器,按新 `dsh-auth-remote-lang` 缓存、`navigator.language`、英文选择语言。旧 `dsh-auth-remote.locale` 不读取、不清理、不迁移;进入 DSH 后仅同步原生已接纳的偏好,退出保留。插件八语不会扩充旧 DSH 的原生语言目录。
145
+
140
146
  停止 DSH 并确认释放 profile 锁,再复制 `~/.dsh/profiles/web/auth-remote/auth-state.json`。副本目录权限 0700、文件权限 0600;它含密码哈希、TOTP 密钥、备用码哈希和会话。不要复制写入中的临时文件、覆盖运行中持锁状态或提交 Git;同时备份对应 profile patch 和包/锁文件。
141
147
 
142
148
  恢复时先停止 DSH,检查 schema/包兼容,以私有属主/权限恢复,再核对 ready 和 CLI `status --json`。本地 `reset-password`、`reset-totp`、`revoke-sessions` 均撤销会话。管理响应丢失后结果不明,先查状态再执行下一次修改。
143
149
 
144
150
  外部入口变更时,替换唯一 `publicUrl`、更新代理并重启 DSH。检查新入口与旧非回环入口的拒绝,包含 Cookie、重定向、上传和长连接。不要在插件中临时配置两个来源。
145
151
 
146
- DSH `0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.1`、`0.2.1-rc.2` 官方 DeepSeek 账号授权使用 [README 中的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器所在电脑无需回调监听器或开放回环端口。`/auth-remote/account/*` 继续经过相同的会话与来源门禁,回填通过同源 JSON POST 提交;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大 `preserveOriginPaths` 或放宽跨站规则。
152
+ 全部八个支持版本的官方 DeepSeek 账号授权使用 [README 的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器电脑无需监听器或开放回环端口。`/auth-remote/account/*` 保持相同会话/来源门禁,只接纳同源 JSON POST;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大路径或放宽跨站规则。
153
+
154
+ 在 DSH `0.2.2-alpha.2` 使用 LiveShare 前,按原生方式启用该功能、配置 Relay 并完成 Owner 登录。本插件不自动启用分享或改写 Relay 配置;查看者不获得管理员身份,插件退出与停止分享是独立操作。本地协议替身只建立基础兼容证据,真实 Relay/OAuth、访客模型及文件写入体验另行验证。无需扩大匿名例外或 preserveOriginPaths。
@@ -2,9 +2,9 @@
2
2
 
3
3
  [简体中文](development.zh-CN.md)
4
4
 
5
- This guide describes the eleven exact verification targets for plugin `0.2.0`. RC additions do not extend npm `0.1.10` historical support; final same-archive results are recorded separately.
5
+ This guide describes eight exact verification targets for unpublished plugin candidate `0.3.2`, defaulting to DSH `0.2.2-alpha.2`. Final same-archive evidence belongs to separate, unpackaged execution records; declarations and reports are distinct.
6
6
 
7
- Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.2.1-rc.2`. Browser tests use Playwright-managed Chromium and a Node HTTP/HTTPS forwarder.
7
+ Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.2.2-alpha.2`. DSH `0.2.2-alpha.2` itself requires Node.js `>=24.9.0`; the plugin engine stays `>=24`. Browser tests use Playwright-managed Chromium and a Node HTTP/HTTPS forwarder.
8
8
 
9
9
  ## Set up and check a checkout
10
10
 
@@ -16,7 +16,7 @@ pnpm pack:local
16
16
  pnpm smoke
17
17
  ```
18
18
 
19
- `pnpm check` runs type checking, formatting, build, package/deployment/document checks, then unit, integration, CLI, and browser tests. `pnpm pack:local` writes `artifacts/dsh-auth-remote-0.2.0.tgz` after static checks; it does not publish. `pnpm smoke` installs that archive into an isolated DSH home, starts the pinned DSH runtime briefly, checks readiness, anonymous redirection/denial and an online CLI status, then stops it.
19
+ `pnpm check` runs type checking, formatting, build, package/deployment/document checks, then unit, integration, CLI, and browser tests. `pnpm pack:local` writes `artifacts/dsh-auth-remote-0.3.2.tgz` after static checks; it does not publish. `pnpm smoke` installs that archive into an isolated DSH home, starts the pinned DSH runtime briefly, checks readiness, anonymous redirection/denial and an online CLI status, then stops it.
20
20
 
21
21
  ## Use the isolated development profile
22
22
 
@@ -31,7 +31,7 @@ The scripts manage only `.dev/runtime-<version>` and `.dev/dsh-home` under this
31
31
  For direct inspection, use the same isolated home explicitly:
32
32
 
33
33
  ```sh
34
- DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-rc.2/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
34
+ DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.2-alpha.2/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
35
35
  ```
36
36
 
37
37
  The development home contains test account data. Keep it private and do not commit or copy it into a deployment profile.
@@ -40,7 +40,9 @@ The development home contains test account data. Keep it private and do not comm
40
40
 
41
41
  `pnpm test:unit` covers the auth state machine, TOTP, backup codes, origin policy, translations, storage durability and lock recovery. `pnpm test:integration` exercises real HTTP/WebSocket sockets, native readiness, cookies, origin decisions and revocation. `pnpm test:cli` builds the real archive and tests interactive and noninteractive commands against isolated profiles and Unix sockets. `pnpm test:browser` boots the selected DSH version with temporary profiles and verifies the login and Security & sign-in UI, native settings, workspace, upload/preview, SSE, WebSocket and an HTTPS forwarding chain.
42
42
 
43
- Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.1-rc.2`).
43
+ Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.2-alpha.2`).
44
+
45
+ Shared Host environments are allowlisted without real model credentials/endpoints; browser launch removes ambient proxy variables. Before first key entry, `localModelEndpoint` points native llm-deepseek baseURL at a local HTTP stub, without preseeded keys or disabled onboarding. UI cases require zero model calls; proxy chat allows only local chat and native session-title POSTs. Counts are checked at fixture close and unexpected requests fail.
44
46
 
45
47
  The DSH test runtime lives in `.cache/test-runtime/<version>` and is pinned separately from the source dependencies. Host services and React remain external to the client bundle. The [deployment guide](deployment.md) describes profile and backup rules.
46
48
 
@@ -48,95 +50,107 @@ Before changing compatibility declarations or adaptations, read the [legacy comp
48
50
 
49
51
  Isolated verification installs use pnpm file copies so shared package hardlink metadata changes cannot trigger client hot reloads in another profile.
50
52
 
51
- Support decisions live in the [policy](support-policy.md), release facts in the [bidirectional history](support-history.md), and adaptation evidence in the inventory. Update all three with README in both languages; do not derive old release claims from the current candidate manifest.
53
+ Current candidate support is in [README](../README.md#dsh-compatibility), release facts in the [bidirectional history](support-history.md), and adaptation evidence in the inventory. Both support policies retain the previous release record and remain unchanged for this `0.3.2` work; never derive old release claims from the current candidate manifest.
52
54
 
53
55
  ## Cross-version verification
54
56
 
55
- The default test target is DSH `0.2.1-rc.2`. Set `DSH_TEST_VERSION` to `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.2`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, or `0.2.1-rc.2`; test runtimes live separately under `.cache/test-runtime/<version>` and development runtimes under `.dev/runtime-<version>`. `DSH_TEST_BIN` must report the exact selected version. CI retains CLI and installation smoke for all eleven releases. Full verification runs every browser target; ordinary verification uses the fixed boundary selection below. Development types and integration tests use the pinned DSH `0.2.1-rc.2` packages. The source checkout test guide (`tests/README.md`) describes real Loader/model URL checks and native IPv6/TLS positive or unsupported-capability assertions; unavailable native test transport fails instead of skipping.
57
+ The default target is DSH `0.2.2-alpha.2`; `DSH_TEST_VERSION` accepts only `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2`. Test runtimes live under `.cache/test-runtime/<version>` and development runtimes under `.dev/runtime-<version>`. `DSH_TEST_BIN` must report that exact version. CI keeps eight-version CLI/installation smoke; full runs eight complete browser targets and ordinary uses the selection below. Development types and integration use locked `0.2.2-alpha.2` packages. All eight targets check the real Loader, model runtime context/`DSH_WEB_URL`, and positive IPv4/IPv6 HTTP/HTTPS security boundaries. Missing native transport support fails instead of skipping.
56
58
 
57
59
  ```sh
58
- DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:cli
59
- DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:browser
60
- DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:cli
61
- DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:browser
62
- DSH_TEST_VERSION=0.2.0-rc.1 pnpm test:cli
63
- DSH_TEST_VERSION=0.2.0-rc.1 pnpm test:browser
64
- DSH_TEST_VERSION=0.2.0-rc.2 pnpm test:cli
65
- DSH_TEST_VERSION=0.2.0-rc.2 pnpm test:browser
66
- DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:cli
67
- DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:browser
68
- DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:cli
69
- DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:browser
70
60
  DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:cli
71
61
  DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:browser
72
62
  DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:cli
73
63
  DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:browser
74
- pnpm test:cli
75
- pnpm test:browser
64
+ DSH_TEST_VERSION=0.2.1-alpha.5 pnpm test:cli
65
+ DSH_TEST_VERSION=0.2.1-alpha.5 pnpm test:browser
66
+ DSH_TEST_VERSION=0.2.1-rc.1 pnpm test:cli
67
+ DSH_TEST_VERSION=0.2.1-rc.1 pnpm test:browser
68
+ DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:cli
69
+ DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:browser
70
+ DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:cli
71
+ DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:browser
72
+ DSH_TEST_VERSION=0.2.2-alpha.2 pnpm test:cli
73
+ DSH_TEST_VERSION=0.2.2-alpha.2 pnpm test:browser
74
+ DSH_TEST_VERSION=0.2.2-alpha.2 pnpm test:cli
75
+ DSH_TEST_VERSION=0.2.2-alpha.2 pnpm test:browser
76
76
  ```
77
77
 
78
78
  Browser tests save light/dark, desktop/narrow-screen screenshots under `.cache/ui-review/<version>` for visual review. Security CSS is installed and removed with the plugin, scopes its selectors to the plugin page, and reads the host's live `--dsw-*` tokens. The standalone login uses a subset of DSH 0.2.0-rc.1 theme tokens and the system color scheme without reading host preferences before authentication.
79
79
 
80
- Official-account tests use a local Platform stand-in with the actual DSH `0.2.1-rc.2` account provider. They check the original redirect URI and PKCE verifier during exchange, rejected state/URL/session combinations, duplicate submissions, cancellation, expiry and retries. Browser coverage checks the instruction-first menu and onboarding dialog, failed loopback navigation followed by paste/confirm, blocked popups, live locale and responsive light/dark layout. These tests do not establish a real official-account authorization session.
80
+ Official-account tests use a local Platform stand-in with the actual DSH `0.2.2-alpha.2` account provider. They check the original redirect URI and PKCE verifier during exchange, rejected state/URL/session combinations, duplicate submissions, cancellation, expiry and retries. Browser coverage checks the instruction-first menu and onboarding dialog, failed loopback navigation followed by paste/confirm, blocked popups, live locale and responsive light/dark layout. These tests do not establish a real official-account authorization session.
81
81
 
82
82
  Core account tests load the exact provider from locked development dependencies, so they do not require a pre-existing CLI runtime cache. Browser tests still exercise the provider installed into each isolated DSH profile.
83
83
 
84
- This temporary adapter uses `>=0.2.1-alpha.3` including prereleases, required capabilities and live configuration. Full manual-feature regression covers `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1` and `0.2.1-rc.2`. 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.2` verify base authentication, complete Security & sign-in interactions, live configuration persistence and unavailable manual-feature feedback. Future admission is not verification. Support or shared host-adapter changes require the same final tgz across all eleven CLI, browser and smoke runs. Use the fixed-archive consumer with `--suite cli --suite browser --suite smoke` for each exact release, as shown below and in the release guide. It restores the verified dist, checks SHA-256 per suite and isolates smoke from development profiles; do not use repacking wrappers in the loop. See `DSH-ACCOUNT-001` for public-callback evidence, migration and retirement conditions.
84
+ The temporary account adapter retains capability and live-configuration checks; complete manual-feature regression targets `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2`. After global minimum admission the server no longer branches for older hosts; the separately exported helper still checks omitted, invalid and older inputs. Forward admission is not verification. Support or shared host-adapter changes require the same final tgz across all eight CLI, complete browser and smoke runs with `--suite cli --suite browser --suite smoke` per release. Never call rebuilding/repacking wrappers in the consumer loop. The runner restores archive dist, checks SHA-256 per suite and isolates smoke from development profiles. See `DSH-ACCOUNT-001` for public-callback evidence and migration/retirement conditions.
85
85
 
86
86
  `live-config.spec.ts` observes the real Loader reference/fiber, auth/store identity, lock, listener and SSE/WebSocket continuity, checks the loaded dependency chain and restarts to verify the profile override. It does not fabricate services. Dialog regression covers cancellation/errors, focus/keyboard, optional/enforced TOTP, one-time code copying and redirect holds after revocation. Task documents, test credentials, profiles, screenshots and generated directories must remain outside the npm archive.
87
87
 
88
- `account-login.spec.ts` also exercises real native configuration HMR on every declared release: changing ordinary `sessionHours` rebuilds the listener, then an external Settings write must wait for an existing native transaction while genuine nesting is rejected. On `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1` and `0.2.1-rc.2`, modifying the isolated installed plugin additionally verifies native module replacement followed by re-enabling manual sign-in. The test-only transaction probe calls the real HMR service; it replaces no service and never enters the npm archive. The narrow listener-context adaptation is documented in `DSH-HMR-001`. Protected remote deployments require the independent profile-level native-listener disable in the deployment guide. The two RC startup regressions damage only isolated plugin copies: an incompatible `engines.dsh` must make the real Loader skip the bundle, while an injected plugin-side admission range must reach its own runtime rejection. Both must fail startup with no TCP, HTTP, readiness or WebSocket fallback; upstream code, versions and Loader auditing remain unchanged.
88
+ `account-login.spec.ts` exercises real configuration HMR on all eight: an ordinary `sessionHours` change rebuilds the listener, independent Settings writes wait for the native transaction queue, and genuine nesting remains rejected. Isolated plugin code replacement must allow manual sign-in to be enabled again. The transaction probe calls real HMR, replaces no service and is never packaged; see `DSH-HMR-001`. Protected remote profiles independently disable native webserver. On all eight, `startup-compatibility.spec.ts` damages only isolated plugin copies: `0.2.1-alpha.3` uses an incompatible Host peer for Loader skip, the other seven an incompatible `engines.dsh`; every version also gets an injected plugin admission range for post-import runtime rejection. Both paths must fail naturally without TCP/HTTP/readiness/WebSocket fallback; upstream and Loader auditing are unchanged.
89
89
 
90
90
  The account preference binding recovers an initial failed read through the native describe mirror’s `ensure()` API. Recovery of an already held namespace uses the explicitly injected `remote.settings` transport and folds the accepted namespace back into that mirror. A sign-in click while the preference is loading waits for the shared read, then uses the latest accepted true/false value; loading does not select the native flow. Browser regression covers initial failure, a temporarily missing namespace and delayed reads for both routing choices.
91
91
 
92
- The `0.2.1-rc.2` native Search/Fetch settings regression uses an isolated remote Host and the actual three settings namespaces plus the credentials domain. It covers provider selection, validation/save errors, refresh/restart persistence and anonymous/revoked-session refusal. All configured endpoints are local test endpoints, and their request counter must remain zero; no paid Search/Fetch or official account operation is performed. The source test guide details this boundary.
92
+ Native Search/Fetch settings regression on `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4` and `0.2.2-alpha.2` covers real settings/credentials selection, failed saves, refresh/restart persistence and anonymous/revoked-session refusal. Endpoints are local and request counts must stay zero. On `0.2.1-rc.3`, `0.2.1-rc.4` and `0.2.2-alpha.2`, `rc-navigation.spec.ts` checks global/session/right-sidebar More menus, native settings/model selection and refusal after revocation. Market/Creator entries are inspected without installation or external authorization. Public sessions/sessionProjections APIs create a real session empty completed turn to expose native menus; no chat is sent and no snapshot is replaced. Official dynamic `/models` internal semantics are outside the verification claim.
93
93
 
94
- Startup maintenance diagnostics use the installed plugin's exact declarations and explicit lifecycle records. Each exact-version/state warning appears once per process, including configuration or module HMR; a new process warns again. Legacy logs include announced dates and migration guidance. Unverified or explicitly retired inputs warn about the missing current support commitment, while normal support stays quiet. Dates never stop service, and required API, package identity and security failures still refuse it. `dsh-support.test.ts` crosses both eligibility dates with a mocked clock; the account HMR regression also checks real legacy and normal startup output. A separate legacy module case uses the same candidate's manifest/dist in an isolated, explicitly watchable directory through public Loader insertion and HMR `base/root`; the default node_modules exclusion remains in effect. No real version is recorded as retired.
94
+ Startup diagnostics use installed exact declarations and explicit lifecycle records, warning once per process/version/state even across configuration/module HMR. The three Alpha releases are legacy from 2026-10-28 with a 14-day window and earliest eligibility 2026-11-11 (Asia/Shanghai); dates never stop service. The six retired versions record last plugin `0.2.0`, retirement release `0.3.1` and preparation date `retiredOn: 2026-10-28`, which is not an actual npm publication timestamp. Mock-clock tests preserve classification after eligibility; real legacy HMR checks process-wide deduplication. API, package identity and security failures still refuse service.
95
95
 
96
- `browser/host-release.spec.ts` fixes four real round trips: `0.2.1-alpha.4` ↔ `0.2.1-alpha.3`, `0.2.1-alpha.5` ↔ `0.2.1-alpha.4`, `0.2.1-rc.1` ↔ `0.2.1-alpha.5`, and `0.2.1-rc.2` ↔ `0.2.1-rc.1`. Each keeps the page in one temporary profile/port, checks the native release prompt, reloads to verify authentication, the original session and persisted settings, then restores the starting release. Only `0.2.1-alpha.3` lacks release metadata and reads unknown; every other destination must show its actual full version. No upstream source, version or dependency-graph metadata is changed.
96
+ `browser/host-release.spec.ts` fixes seven real round trips: `0.2.1-alpha.4` ↔ `0.2.1-alpha.3`, `0.2.1-alpha.5` ↔ `0.2.1-alpha.4`, `0.2.1-rc.1` ↔ `0.2.1-alpha.5`, `0.2.1-rc.2` ↔ `0.2.1-rc.1`, `0.2.1-rc.3` ↔ `0.2.1-rc.2`, `0.2.1-rc.4` ↔ `0.2.1-rc.3`, and `0.2.2-alpha.2` ↔ `0.2.1-rc.4`. Each keeps the page in one temporary profile/port, checks the native release prompt, reloads to verify authentication, the original session and persisted settings, then restores the starting release. Only `0.2.1-alpha.3` lacks release metadata and reads unknown; every other destination must show its actual full version. No upstream source, version or dependency-graph metadata is changed.
97
97
 
98
98
  ## Consume a fixed archive
99
99
 
100
100
  `pnpm verify:packed` consumes an existing tgz without building or packing. Record its SHA-256 first, then pass the archive, that digest, an exact declared DSH release and one or more suites:
101
101
 
102
102
  ```sh
103
- sha256sum artifacts/dsh-auth-remote-0.2.0.tgz
104
- pnpm verify:packed --archive artifacts/dsh-auth-remote-0.2.0.tgz --sha256 <recorded-sha256> --dsh-version 0.2.1-rc.2 --suite cli --suite browser --suite smoke
103
+ sha256sum artifacts/dsh-auth-remote-0.3.2.tgz
104
+ pnpm verify:packed --archive artifacts/dsh-auth-remote-0.3.2.tgz --sha256 <recorded-sha256> --dsh-version 0.2.2-alpha.2 --suite cli --suite browser --suite smoke
105
105
  ```
106
106
 
107
107
  The consumer validates the package name/version and selected release declaration, stages those exact bytes at the fixed artifact path and restores only the archive's dist. CLI execution and installation comparisons therefore use that dist. It rejects unsafe tar entries, a changed digest, unknown selections, zero actual tests and skipped/cancelled/todo tests. Node's passing placeholder for a test file with no matching cases does not count as a real test. `--test-name-pattern` optionally filters one `cli` or `browser` suite; its report is explicitly partial and includes the files, pattern and actual commands. Fixed specialized suites cannot override their filter/count requirements; every required file must register tests.
108
108
 
109
- | Suite | Selection |
110
- | ------------------- | ----------------------------------------------------------------------------------- |
111
- | `cli` | All CLI test files |
112
- | `browser` | All browser test files |
113
- | `smoke` | Install and briefly boot the archive in a new marked home |
114
- | `theme` | The exact login/security theme and narrow-screen case (one real test) |
115
- | `startup-transport` | startup-compatibility and native-transport on `0.2.1-alpha.1`, `0.2.1-alpha.2` |
116
- | `account` | startup-compatibility, account-login and live-config on `0.2.1-alpha.3` |
117
- | `host-release` | One real round trip on `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2` |
118
- | `rc-bootstrap` | host-release and dsh-bootstrap on `0.2.1-rc.1` (two real tests) |
109
+ | Suite | Selection |
110
+ | -------------- | -------------------------------------------------------------------------------------------------------------------------------- |
111
+ | `cli` | All CLI test files |
112
+ | `browser` | All browser test files |
113
+ | `smoke` | Install and briefly boot the archive in a new marked home |
114
+ | `theme` | The exact login/security theme and narrow-screen case (one real test) |
115
+ | `account` | startup-compatibility, account-login and live-config on `0.2.1-alpha.3` |
116
+ | `host-release` | One real round trip on `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2` |
117
+ | `rc-bootstrap` | host-release and dsh-bootstrap on `0.2.1-rc.1` (two real tests) |
119
118
 
120
119
  Consumption is serial within a checkout, enforced by a consumer lock. Each suite checks the input archive, fixed consumer archive and restored dist again. JSON reports and test logs remain under `.cache/verify-packed/`. Smoke creates its marked temporary root directly under `.cache/v-*` to keep the management socket within Linux's pathname limit in the default GitHub checkout. It uses its own runtime/home and `--port 0`; it reads only that child process's announced actual loopback address and checks online CLI status in the same profile. Existing `.dev/dsh-home` and services on 13090 are independent. Only the newly created verification root is removed. `DSH_VERIFY_ROOT` is internal and rejects unmarked, symlinked or external paths; ordinary development commands retain their existing profile and port.
121
120
 
121
+ ## Independent retired-host refusal verification
122
+
123
+ `verify-retired.mjs` does not extend `DSH_TEST_VERSION` or the positive matrix. It checks the same candidate/SHA256SUMS and published `0.2.0` integrity, then uses two private old profiles for real CLI rejection/complete rollback and native peer skip of a whole incompatible package. The latter preserves actual old peer resolution, repeatedly confirms no TCP/HTTP/readiness/WebSocket listener, and cleans up processes. The six-host one-time acceptance belongs to the `0.3.1` migration history. Current full/release plans run only `0.2.1-alpha.2`, and ordinary runs none.
124
+
125
+ ```sh
126
+ node scripts/verify-retired.mjs --archive artifacts/dsh-auth-remote-0.3.2.tgz --sha256 <recorded-sha256> --retired-dsh-version 0.2.1-alpha.2
127
+ ```
128
+
129
+ The six independent negative targets are `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` and `0.2.1-alpha.2`. Reports stay separate from positive evidence under `.cache/verify-retired/`.
130
+
122
131
  ## Ordinary and full CI plans
123
132
 
124
133
  `scripts/ci-plan.mjs` selects ordinary verification only when every changed path is one of `CHANGELOG.md`, `CHANGELOG.zh-CN.md`, `CONTRIBUTING.md`, `CONTRIBUTING.zh-CN.md`, `LICENSE` or `tests/unit/i18n.test.ts`. Any other path selects full verification, including source, shared tests/helpers, package/lock/build scripts, workflows, README, support policies and compatibility inventories. Renames/copies, unknown statuses, empty or incomplete differences and an unexpected/dirty checkout also select full. PR comparison uses the actual event base/head and verifies merge parents; push comparison uses before/after. Missing commit evidence falls back to full.
125
134
 
126
- Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule always use full verification. Ordinary reduction is enabled only after the first eleven-release, same-archive full validation succeeds. Every plan retains CLI/smoke on all eleven releases; the ordinary browser matrix is fixed:
127
-
128
- | Exact DSH release | Ordinary browser selection |
129
- | ----------------- | ----------------------------------------------- |
130
- | `0.1.7-rc.1` | `browser` (complete) |
131
- | `0.1.7-rc.2` | `theme` |
132
- | `0.2.0-rc.1` | No separate browser job; CLI/smoke retained |
133
- | `0.2.0-rc.2` | `browser` (complete) |
134
- | `0.2.1-alpha.1` | `startup-transport` |
135
- | `0.2.1-alpha.2` | `startup-transport` |
136
- | `0.2.1-alpha.3` | `account` |
137
- | `0.2.1-alpha.4` | `host-release` |
138
- | `0.2.1-alpha.5` | `host-release` |
139
- | `0.2.1-rc.1` | `rc-bootstrap` |
140
- | `0.2.1-rc.2` | `browser` (complete, including search settings) |
141
-
142
- The shared workflow validates the exact chosen matrix before consumption. A combination omitted by this explicit plan has no job; an unexpected skipped/cancelled job or zero required test file fails the aggregate. `CI Verify` requires the plan, producer and reusable verification to succeed. All high-risk changes and releases still require every browser target on the same archive. Keep fixed-port tests serial in one checkout; local concurrent jobs require separate source/dist/artifacts/runtime/profile trees, an independent copy of node_modules, and network namespaces. pnpm exec can refresh command shims, so workers must use their own writable dependency copy. Keep any shared source dependency directory read-only as a guard, and use copy-mode installation to avoid shared HMR inode changes.
135
+ Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule use full verification. Every plan keeps eight-version CLI/smoke. Full runs eight complete browser targets plus the independent real negative job on `0.2.1-alpha.2`; ordinary runs no real retired-host negative job. Its browser matrix is fixed:
136
+
137
+ | Exact DSH release | Ordinary browser selection |
138
+ | ----------------- | -------------------------- |
139
+ | `0.2.1-alpha.3` | `browser` |
140
+ | `0.2.1-alpha.4` | `host-release` |
141
+ | `0.2.1-alpha.5` | `host-release` |
142
+ | `0.2.1-rc.1` | `rc-bootstrap` |
143
+ | `0.2.1-rc.2` | `browser` |
144
+ | `0.2.1-rc.3` | `browser` |
145
+ | `0.2.1-rc.4` | `browser` |
146
+ | `0.2.2-alpha.2` | `browser` |
147
+
148
+ The shared workflow validates the exact matrix. Full requires validate, cli-smoke, browser and retired-rejection to succeed; ordinary accepts only the predetermined retired-rejection skip and requires the other three successes. Unknown plans, missing results, failures, cancellations and other skips fail. `CI Verify` also requires plan/producer success; releases use full and inherit the negative gate. Keep fixed-port tests serial per checkout; local parallel jobs require independent source/dist/artifacts/runtime/profile trees, writable node_modules copies and network namespaces. Copy-mode installation avoids shared HMR inode changes.
149
+
150
+ On exact DSH `0.2.2-alpha.2`, `native-transport.spec.ts` compares genuine native asset/fallback bytes and ETags for GET/HEAD/304, rejects anonymous/revoked correct-tag requests, and retains immutable 200 semantics for real bundle/map/chunk artifacts and nonimmutable index behavior. Four real `/api/remote.mux` cases cover native HTTPS/proxy, default/none compression, whole-frame threshold/RSV1, successful ready frames and actual expiry/revocation. The installed native Gateway/ws owns transport and compression.
151
+
152
+ The new-host `account-login.spec.ts` source-HMR fault case preserves the initial instance on import failure, then throws after genuine replacement initialization to prove old/failed resource cleanup and native automatic rollback. It checks real provider fibers, listeners, state-lock nonces, mux closure, persisted authentication, the first restored Settings save and final lock reacquisition. The copied entry uses one canonical file URL and explicit native watch roots; public log export observes warnings without replacing HMR.
153
+
154
+ Browser language tests cover all eight plugin dictionaries, login fallback/memory, native accepted preference vs optimistic edits, delayed/unavailable/failed reads and saves, storage failures and sign-out/revocation persistence. DSH's native language catalog is unchanged. CLI tests require fixed English across environment languages and reject every `--lang` form before profile access; the published `0.2.0` retired fixture keeps its historical Chinese contract.
155
+
156
+ `liveshare.spec.ts` registers only on exact `0.2.2-alpha.2`: real native Host/Owner PKCE/share worker/viewer carriers and stop operations use a local Relay identity/transport stand-in. Viewer clients remain inert for administrator features. Tests do not establish real Relay/OAuth, visitor models or file writes. Partial filtered reports and file placeholders never certify the final eight-host archive.