dsh-auth-remote 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -1
- package/CHANGELOG.zh-CN.md +18 -1
- package/CONTRIBUTING.md +1 -1
- package/CONTRIBUTING.zh-CN.md +1 -1
- package/README.md +53 -48
- package/README.zh-CN.md +53 -48
- package/dist/cli.js +63 -530
- package/dist/cli.js.map +4 -4
- package/dist/client.js +915 -133
- package/dist/client.js.map +3 -3
- package/dist/index.js +83 -22
- package/dist/index.js.map +3 -3
- package/dist/login.css +0 -21
- package/dist/login.css.map +2 -2
- package/dist/login.js +892 -155
- package/dist/login.js.map +3 -3
- package/dist/types/adapters/dsh/browser-capability.d.ts.map +1 -1
- package/dist/types/adapters/dsh/liveshare.d.ts +4 -0
- package/dist/types/adapters/dsh/liveshare.d.ts.map +1 -0
- package/dist/types/adapters/dsh/webserver.d.ts +8 -4
- package/dist/types/adapters/dsh/webserver.d.ts.map +1 -1
- package/dist/types/cli/ipc-client.d.ts.map +1 -1
- package/dist/types/cli/messages.d.ts +56 -0
- package/dist/types/cli/messages.d.ts.map +1 -0
- package/dist/types/cli/profile.d.ts.map +1 -1
- package/dist/types/cli/prompt.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/i18n.d.ts +878 -105
- package/dist/types/shared/i18n.d.ts.map +1 -1
- package/dist/types/shared/locales/de.d.ts +145 -0
- package/dist/types/shared/locales/de.d.ts.map +1 -0
- package/dist/types/shared/locales/en.d.ts +0 -49
- package/dist/types/shared/locales/en.d.ts.map +1 -1
- package/dist/types/shared/locales/es.d.ts +145 -0
- package/dist/types/shared/locales/es.d.ts.map +1 -0
- package/dist/types/shared/locales/fr.d.ts +145 -0
- package/dist/types/shared/locales/fr.d.ts.map +1 -0
- package/dist/types/shared/locales/ja.d.ts +145 -0
- package/dist/types/shared/locales/ja.d.ts.map +1 -0
- package/dist/types/shared/locales/pt.d.ts +145 -0
- package/dist/types/shared/locales/pt.d.ts.map +1 -0
- package/dist/types/shared/locales/ru.d.ts +145 -0
- package/dist/types/shared/locales/ru.d.ts.map +1 -0
- package/dist/types/shared/locales/zh.d.ts +0 -49
- package/dist/types/shared/locales/zh.d.ts.map +1 -1
- package/docs/deployment.md +26 -26
- package/docs/deployment.zh-CN.md +26 -26
- package/docs/development.md +40 -26
- package/docs/development.zh-CN.md +40 -26
- package/docs/legacy-compatibility.md +128 -69
- package/docs/legacy-compatibility.zh-CN.md +126 -67
- package/docs/releasing.md +11 -11
- package/docs/releasing.zh-CN.md +11 -11
- package/docs/support-history.md +52 -49
- package/docs/support-history.zh-CN.md +52 -49
- package/docs/support-policy.md +25 -7
- package/docs/support-policy.zh-CN.md +25 -7
- package/examples/web-profile-auth-remote.patch.yml +1 -1
- package/package.json +16 -14
- package/dist/types/cli/language.d.ts +0 -14
- package/dist/types/cli/language.d.ts.map +0 -1
package/docs/deployment.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](deployment.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
This guide
|
|
5
|
+
This guide covers plugin `0.3.3` with recommended DSH `0.2.2-alpha.2` and the default `~/.dsh` data directory. See [README](../README.md#dsh-compatibility) for the nine supported DSH releases, the [support policy](support-policy.md) for maintenance details, and [development](development.md) for source builds.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
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.
|
|
8
8
|
|
|
9
|
-
## Minimal installation
|
|
9
|
+
## Minimal installation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Use the same default `web` profile for installation and the running service:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
dsh --version
|
|
15
|
-
dsh plugin --profile web add dsh-auth-remote@0.3.
|
|
15
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.3
|
|
16
16
|
dsh plugin --profile web list
|
|
17
17
|
dsh web --no-open --port 13090
|
|
18
18
|
```
|
|
@@ -21,7 +21,7 @@ Verify the selected DSH version and plugin list. No profile patch is needed for
|
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
curl -fsS http://127.0.0.1:13090/auth-remote/ready
|
|
24
|
-
dsh plugin --profile web exec dsh-auth-remote init
|
|
24
|
+
dsh plugin --profile web exec dsh-auth-remote init
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
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 +53,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
|
|
|
53
53
|
|
|
54
54
|
All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
|
|
55
55
|
|
|
56
|
-
| Field | Effective value
|
|
57
|
-
| --------------------- |
|
|
58
|
-
| `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.
|
|
59
|
-
| `host` | CLI, file, then `127.0.0.1`. Concrete IPv4/IPv6, including mapped forms; reject DNS names and 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` | 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.
|
|
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 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.
|
|
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.
|
|
56
|
+
| Field | Effective value |
|
|
57
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| `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. |
|
|
59
|
+
| `host` | CLI, file, then `127.0.0.1`. Concrete IPv4/IPv6, including mapped forms; reject DNS names and 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` | 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. |
|
|
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 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. |
|
|
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. |
|
|
66
66
|
|
|
67
67
|
**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
68
|
|
|
69
|
-
|
|
69
|
+
`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
70
|
|
|
71
71
|
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
72
|
|
|
@@ -77,13 +77,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
77
77
|
|
|
78
78
|
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
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
All seven project the final Web URL through model runtime context and `DSH_WEB_URL`; tests still scan all Web sections for duplicate URLs or tokens.
|
|
80
|
+
The final public Web URL appears in model runtime context and `DSH_WEB_URL`, without a native authentication token.
|
|
83
81
|
|
|
84
82
|
## Native HTTPS and IPv6
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
Use this complete auth row for IPv6 loopback HTTPS with your own certificate/key:
|
|
87
85
|
|
|
88
86
|
```yaml
|
|
89
87
|
- id: auth-remote
|
|
@@ -114,7 +112,7 @@ The old field remains a plugin migration contract, independently of DSH version
|
|
|
114
112
|
| Two or more items, even duplicates | Fail; manually choose one public entry and replace the array with `publicUrl`. |
|
|
115
113
|
| Any explicit `allowedOrigins` plus file or CLI `publicUrl`, even an empty array or identical URL | Fail; remove the legacy field before using the new one. |
|
|
116
114
|
|
|
117
|
-
Back up the old patch before upgrading. Replace a single item with `publicUrl: https://dsh.example.com/`; remove an empty array to keep derived behavior. An installation with several public origins needs a deliberate choice of one canonical entry. Route alternate browser hostnames to that entry before they reach the protected upstream.
|
|
115
|
+
Back up the old patch before upgrading. Replace a single item with `publicUrl: https://dsh.example.com/`; remove an empty array to keep derived behavior. An installation with several public origins needs a deliberate choice of one canonical entry. Route alternate browser hostnames to that entry before they reach the protected upstream. A rollback must restore configuration compatible with the selected plugin version.
|
|
118
116
|
|
|
119
117
|
## Source and bridge contract
|
|
120
118
|
|
|
@@ -124,11 +122,11 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
|
|
|
124
122
|
|
|
125
123
|
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
124
|
|
|
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 routes
|
|
125
|
+
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 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
126
|
|
|
129
127
|
## Start and verify the public entry
|
|
130
128
|
|
|
131
|
-
1. Verify Linux, Node.js 24
|
|
129
|
+
1. Verify Linux, Node.js 24+ (at least `24.9.0` for recommended DSH `0.2.2-alpha.2`), the exact compatible DSH version, and the intended profile/package. Keep test and development data separate.
|
|
132
130
|
2. Merge one complete profile configuration and configure a private reachable proxy upstream if needed; see the [proxy guide](reverse-proxy.md).
|
|
133
131
|
3. Start DSH. For the HTTP upstream example, inspect `curl -fsS -H 'Host: dsh.example.com' http://127.0.0.1:13090/auth-remote/ready` and require the expected plugin/protocol and `ready: true`.
|
|
134
132
|
4. Confirm anonymous HTML redirect and API denial, then initialize locally, sign in, bind TOTP and save backup codes. Exercise official settings, workspace, preview, uploads, SSE/WebSocket and revocation through the selected entry.
|
|
@@ -137,7 +135,9 @@ Startup prints the actual protocol/address/port and one distinct public root, de
|
|
|
137
135
|
|
|
138
136
|
## Backup, recovery and changes
|
|
139
137
|
|
|
140
|
-
Before upgrading
|
|
138
|
+
Before upgrading to `0.3.3`, stop DSH and back up the authentication directory, profile patch and package/lock files. Keep access private and retain independent `webserver disabled: true`. Confirm that DSH is a listed target (recommended `0.2.2-alpha.2`), install the plugin, and verify readiness, anonymous denial, login and revocation. To roll back, stop the service and restore matching host/plugin package, lock and patch backups. This release does not change the authentication data format; still check schema when restoring and never overwrite live state.
|
|
139
|
+
|
|
140
|
+
When upgrading from a plugin earlier than `0.3.2`, account for the behavior changes introduced in `0.3.2` and retained in `0.3.3`: CLI text is fixed English, so remove `--lang` from scripts; JSON fields are unchanged. The standalone login page has no language selector and uses `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 plugin's eight languages do not expand DSH's native language catalog.
|
|
141
141
|
|
|
142
142
|
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.
|
|
143
143
|
|
|
@@ -145,4 +145,4 @@ For recovery, stop DSH, check schema/package compatibility, restore with private
|
|
|
145
145
|
|
|
146
146
|
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.
|
|
147
147
|
|
|
148
|
-
Official DeepSeek authorization
|
|
148
|
+
Official DeepSeek authorization 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.
|
package/docs/deployment.zh-CN.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
[English](deployment.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本指南面向插件 `0.3.3` 与推荐 DSH `0.2.2-alpha.2`,使用默认 `~/.dsh` 数据目录。九个支持版本见 [README](../README.zh-CN.md#dsh-兼容性),维护细节见[支持规范](support-policy.zh-CN.md)。源码构建见[开发指南](development.zh-CN.md)。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
上游 DSH `0.2.2-alpha.2` 自身要求 Node `>=24.9.0`;插件仍声明 Node `>=24`,不增加小版本拦截。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 最小化安装
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
安装和运行服务使用同一默认 `web` profile:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
14
|
dsh --version
|
|
15
|
-
dsh plugin --profile web add dsh-auth-remote@0.3.
|
|
15
|
+
dsh plugin --profile web add dsh-auth-remote@0.3.3
|
|
16
16
|
dsh plugin --profile web list
|
|
17
17
|
dsh web --no-open --port 13090
|
|
18
18
|
```
|
|
@@ -21,7 +21,7 @@ dsh web --no-open --port 13090
|
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
curl -fsS http://127.0.0.1:13090/auth-remote/ready
|
|
24
|
-
dsh plugin --profile web exec dsh-auth-remote init
|
|
24
|
+
dsh plugin --profile web exec dsh-auth-remote init
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
打开打印的 `http://127.0.0.1:13090/` 根地址。匿名导航跳转登录页,匿名业务 API 被拒绝。bundle 关闭原生 token URL 输出和自动打开浏览器;开发、测试 home 与账号 profile 分开。
|
|
@@ -53,20 +53,20 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
|
|
|
53
53
|
|
|
54
54
|
以下字段均直接位于 `auth-remote.config`,没有别名或嵌套 TLS 对象。
|
|
55
55
|
|
|
56
|
-
| 字段 | 生效值
|
|
57
|
-
| --------------------- |
|
|
58
|
-
| `publicUrl` | CLI `--public-url` 整项覆盖文件,其次旧单项迁移、实际监听根。只接纳 HTTP(S) 根 URL,可带末尾斜杠,无凭据/子路径/查询/片段。
|
|
59
|
-
| `host` | CLI、文件、默认 `127.0.0.1`。具体 IPv4/IPv6(含 mapped),拒绝 DNS 与通配绑定。
|
|
60
|
-
| `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。
|
|
61
|
-
| `tlsCert`、`tlsKey` | 文件字段或 CLI `--tls-cert`/`--tls-key` 必须成对,CLI 整组覆盖,不混来源,不读未采用文件。省略即 HTTP。
|
|
62
|
-
| `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。
|
|
63
|
-
| `manualAccountLogin` | 默认 true,原生 Settings 写当前 profile override;保存立即影响新授权且重启保留,不重启认证。false
|
|
64
|
-
| `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。
|
|
65
|
-
| `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。
|
|
56
|
+
| 字段 | 生效值 |
|
|
57
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
+
| `publicUrl` | CLI `--public-url` 整项覆盖文件,其次旧单项迁移、实际监听根。只接纳 HTTP(S) 根 URL,可带末尾斜杠,无凭据/子路径/查询/片段。 |
|
|
59
|
+
| `host` | CLI、文件、默认 `127.0.0.1`。具体 IPv4/IPv6(含 mapped),拒绝 DNS 与通配绑定。 |
|
|
60
|
+
| `port` | CLI `--port`、文件、默认 `3080`,与 host 分别覆盖。`0` 在真实非零端口绑定后才生成入口。 |
|
|
61
|
+
| `tlsCert`、`tlsKey` | 文件字段或 CLI `--tls-cert`/`--tls-key` 必须成对,CLI 整组覆盖,不混来源,不读未采用文件。省略即 HTTP。 |
|
|
62
|
+
| `requireTotp` | 默认 `false`,未绑定账号可跳过,已绑定账号仍需第二因素;设为 `true` 可强制先完成绑定再访问。升级保留显式 true/false、已有绑定及备用码。 |
|
|
63
|
+
| `manualAccountLogin` | 默认 true,原生 Settings 写当前 profile override;保存立即影响新授权且重启保留,不重启认证。false 保留已接纳授权和官方凭据。 |
|
|
64
|
+
| `sessionHours` | 默认固定 168 小时。缩短会收紧已有会话,放宽不会复活过期会话。 |
|
|
65
|
+
| `preserveOriginPaths` | 可选的规范路径段前缀,默认 `[]`。匹配路径在认证后保留已验证公网 Host 和已有 Origin;最终公开来源自动配置原生 Connection 信任。 |
|
|
66
66
|
|
|
67
67
|
**特别注意 TLS 路径:**文件中的相对值以所选 profile 目录为基准,即其 `cordis.patch.yml` 所在目录;CLI 的相对路径以进程启动 cwd 为基准。两者均不以 bundle 或其他 overlay 目录为基准。绝对路径保持绝对。
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
`dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别覆盖文件 host、port、URL。监听使用实际空闲端口,公开根地址保持显式值,代理须到达该实际端口;仅覆盖 port 时可省略 host。
|
|
70
70
|
|
|
71
71
|
例如文件 `tlsCert: ./tls/dsh.crt` 始终指 `~/.dsh/profiles/web/tls/dsh.crt`,从其他目录启动也不变。以下命令则使用 `./launch-workdir/tls/dsh.crt` 和对应私钥:
|
|
72
72
|
|
|
@@ -77,13 +77,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
77
77
|
|
|
78
78
|
只给一个 CLI 参数会失败,即使文件提供另一半也不混用。证书/私钥缺失、不可读、空内容、PEM 无效或不匹配时启动失败,不回退 HTTP,并释放监听、管理 socket 和存储资源。证书须对浏览器主机名有效;TLS 由官方监听处理。
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
七版均把最终 Web URL 写入模型 runtime context 与 `DSH_WEB_URL`;测试仍扫描所有 Web 提示段,要求无重复地址或 token。
|
|
80
|
+
最终公开 Web URL 写入模型 runtime context 与 `DSH_WEB_URL`,不含原生认证 token。
|
|
83
81
|
|
|
84
82
|
## 原生 HTTPS 与 IPv6
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
合并以下完整认证条目,使用自己的证书/私钥提供 IPv6 回环 HTTPS:
|
|
87
85
|
|
|
88
86
|
```yaml
|
|
89
87
|
- id: auth-remote
|
|
@@ -114,7 +112,7 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
114
112
|
| 两项及以上,包含重复值 | 失败;人工选择唯一公开入口,用 `publicUrl` 替换数组。 |
|
|
115
113
|
| 任意显式 `allowedOrigins` 与文件或 CLI `publicUrl` 共存,含空数组或相同 URL | 失败;使用新字段前删除旧字段。 |
|
|
116
114
|
|
|
117
|
-
升级前备份旧 patch。单项替换为 `publicUrl: https://dsh.example.com
|
|
115
|
+
升级前备份旧 patch。单项替换为 `publicUrl: https://dsh.example.com/`;空数组删除即可保留派生行为。旧多来源安装必须主动选择一个规范入口,在流量到达受保护上游前把其他浏览器主机名导向该入口。回退时须恢复与所选插件版本兼容的配置。
|
|
118
116
|
|
|
119
117
|
## 来源与桥接契约
|
|
120
118
|
|
|
@@ -124,11 +122,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
124
122
|
|
|
125
123
|
插件 Cookie 跟随已验证外部来源,限主机、HttpOnly、SameSite,HTTPS 设置 Secure。原生桥接凭据仅保留服务端,跟随原生监听协议;公开 HTTP 代理接入原生 HTTPS 时,其原生 Cookie audience/Secure 仍按 HTTPS。浏览器 Cookie 不通过端口隔离。
|
|
126
124
|
|
|
127
|
-
标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection
|
|
125
|
+
标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。普通路径使用归一化原生 bind authority,经过完整会话认证。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
|
|
128
126
|
|
|
129
127
|
## 启动并验证公开入口
|
|
130
128
|
|
|
131
|
-
1. 核对 Linux、Node.js 24
|
|
129
|
+
1. 核对 Linux、Node.js 24+(推荐 DSH `0.2.2-alpha.2` 至少需要 `24.9.0`)、精确兼容 DSH 版本及目标 profile/包;测试开发数据独立。
|
|
132
130
|
2. 合并一个完整 profile 配置,需要代理时建立私有可达上游,参见[代理指南](reverse-proxy.zh-CN.md)。
|
|
133
131
|
3. 启动 DSH。HTTP 上游示例检查 `curl -fsS -H 'Host: dsh.example.com' http://127.0.0.1:13090/auth-remote/ready`,要求预期插件/协议和 `ready: true`。
|
|
134
132
|
4. 核对匿名 HTML 跳转和 API 拒绝,再本地初始化、登录、绑定 TOTP、保存备用码。经所选入口测试官方设置、工作区、预览、上传、SSE/WebSocket 和撤销。
|
|
@@ -137,7 +135,9 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
137
135
|
|
|
138
136
|
## 备份、恢复与变更
|
|
139
137
|
|
|
140
|
-
|
|
138
|
+
升级到 `0.3.3` 前,停止 DSH 并备份认证目录、profile patch、package/lock;保持入口私有和独立 `webserver disabled: true`。确认宿主属于所列支持版本(推荐 `0.2.2-alpha.2`),安装插件并核对 ready、匿名拒绝、登录及撤销。回退时停服并恢复匹配的宿主/插件包、锁和 patch 备份。此次发布不改变认证数据格式;恢复时仍核对 schema,禁止覆盖运行中的状态。
|
|
139
|
+
|
|
140
|
+
从早于 `0.3.2` 的插件升级时,须考虑 `0.3.2` 已引入、`0.3.3` 保留的行为:CLI 固定英语,删除脚本中的 `--lang` 参数;JSON 字段不变。独立登录页不提供语言选择器,按 `dsh-auth-remote-lang` 缓存、`navigator.language`、英文选择语言。旧 `dsh-auth-remote.locale` 不读取、不清理、不迁移;进入 DSH 后仅同步原生已接纳的偏好,退出保留。插件八语不会扩充 DSH 的原生语言目录。
|
|
141
141
|
|
|
142
142
|
停止 DSH 并确认释放 profile 锁,再复制 `~/.dsh/profiles/web/auth-remote/auth-state.json`。副本目录权限 0700、文件权限 0600;它含密码哈希、TOTP 密钥、备用码哈希和会话。不要复制写入中的临时文件、覆盖运行中持锁状态或提交 Git;同时备份对应 profile patch 和包/锁文件。
|
|
143
143
|
|
|
@@ -145,4 +145,4 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
|
|
|
145
145
|
|
|
146
146
|
外部入口变更时,替换唯一 `publicUrl`、更新代理并重启 DSH。检查新入口与旧非回环入口的拒绝,包含 Cookie、重定向、上传和长连接。不要在插件中临时配置两个来源。
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
官方 DeepSeek 账号授权使用 [README 的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器电脑无需监听器或开放回环端口。`/auth-remote/account/*` 保持相同会话/来源门禁,只接纳同源 JSON POST;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大路径或放宽跨站规则。
|
package/docs/development.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](development.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
This guide describes
|
|
5
|
+
This guide describes nine exact verification targets for planned plugin release `0.3.3`, defaulting to DSH `0.2.2-alpha.2`. Final same-archive evidence belongs to unpackaged test reports; 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.
|
|
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.3.
|
|
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.3.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.
|
|
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,7 @@ 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.
|
|
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
44
|
|
|
45
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.
|
|
46
46
|
|
|
@@ -50,11 +50,11 @@ Before changing compatibility declarations or adaptations, read the [legacy comp
|
|
|
50
50
|
|
|
51
51
|
Isolated verification installs use pnpm file copies so shared package hardlink metadata changes cannot trigger client hot reloads in another profile.
|
|
52
52
|
|
|
53
|
-
Current
|
|
53
|
+
Current support is in [README](../README.md#dsh-compatibility) and the [support policy](support-policy.md), release facts in the [bidirectional history](support-history.md), and adaptation evidence in the inventory. Never derive old release claims from the current manifest.
|
|
54
54
|
|
|
55
55
|
## Cross-version verification
|
|
56
56
|
|
|
57
|
-
The default target is DSH `0.2.
|
|
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.1-rc.5`, `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 nine-version CLI/installation smoke; full runs nine complete browser targets and ordinary uses the selection below. Development types and integration use locked `0.2.2-alpha.2` packages. All nine 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.
|
|
58
58
|
|
|
59
59
|
```sh
|
|
60
60
|
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:cli
|
|
@@ -71,57 +71,61 @@ DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:cli
|
|
|
71
71
|
DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:browser
|
|
72
72
|
DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:cli
|
|
73
73
|
DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:browser
|
|
74
|
+
DSH_TEST_VERSION=0.2.1-rc.5 pnpm test:cli
|
|
75
|
+
DSH_TEST_VERSION=0.2.1-rc.5 pnpm test:browser
|
|
76
|
+
DSH_TEST_VERSION=0.2.2-alpha.2 pnpm test:cli
|
|
77
|
+
DSH_TEST_VERSION=0.2.2-alpha.2 pnpm test:browser
|
|
74
78
|
```
|
|
75
79
|
|
|
76
80
|
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.
|
|
77
81
|
|
|
78
|
-
Official-account tests use a local Platform stand-in with the actual DSH `0.2.
|
|
82
|
+
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.
|
|
79
83
|
|
|
80
84
|
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.
|
|
81
85
|
|
|
82
|
-
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`. 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
|
|
86
|
+
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.1-rc.5`, `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 nine 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.
|
|
83
87
|
|
|
84
88
|
`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.
|
|
85
89
|
|
|
86
|
-
`account-login.spec.ts` exercises real configuration HMR on all
|
|
90
|
+
`account-login.spec.ts` exercises real configuration HMR on all nine: 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 nine, `startup-compatibility.spec.ts` damages only isolated plugin copies: `0.2.1-alpha.3` uses an incompatible Host peer for Loader skip, the other eight 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.
|
|
87
91
|
|
|
88
92
|
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.
|
|
89
93
|
|
|
90
|
-
Native Search/Fetch settings regression on `0.2.1-rc.2`, `0.2.1-rc.3
|
|
94
|
+
Native Search/Fetch settings regression on `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.1-rc.5` 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`, `0.2.1-rc.5` 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.
|
|
91
95
|
|
|
92
96
|
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.
|
|
93
97
|
|
|
94
|
-
`browser/host-release.spec.ts` fixes
|
|
98
|
+
`browser/host-release.spec.ts` fixes eight 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`, `0.2.1-rc.5` ↔ `0.2.1-rc.4`, 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.
|
|
95
99
|
|
|
96
100
|
## Consume a fixed archive
|
|
97
101
|
|
|
98
102
|
`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:
|
|
99
103
|
|
|
100
104
|
```sh
|
|
101
|
-
sha256sum artifacts/dsh-auth-remote-0.3.
|
|
102
|
-
pnpm verify:packed --archive artifacts/dsh-auth-remote-0.3.
|
|
105
|
+
sha256sum artifacts/dsh-auth-remote-0.3.3.tgz
|
|
106
|
+
pnpm verify:packed --archive artifacts/dsh-auth-remote-0.3.3.tgz --sha256 <recorded-sha256> --dsh-version 0.2.2-alpha.2 --suite cli --suite browser --suite smoke
|
|
103
107
|
```
|
|
104
108
|
|
|
105
109
|
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.
|
|
106
110
|
|
|
107
|
-
| Suite | Selection
|
|
108
|
-
| -------------- |
|
|
109
|
-
| `cli` | All CLI test files
|
|
110
|
-
| `browser` | All browser test files
|
|
111
|
-
| `smoke` | Install and briefly boot the archive in a new marked home
|
|
112
|
-
| `theme` | The exact login/security theme and narrow-screen case (one real test)
|
|
113
|
-
| `account` | startup-compatibility, account-login and live-config on `0.2.1-alpha.3`
|
|
114
|
-
| `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` |
|
|
115
|
-
| `rc-bootstrap` | host-release and dsh-bootstrap on `0.2.1-rc.1` (two real tests)
|
|
111
|
+
| Suite | Selection |
|
|
112
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| `cli` | All CLI test files |
|
|
114
|
+
| `browser` | All browser test files |
|
|
115
|
+
| `smoke` | Install and briefly boot the archive in a new marked home |
|
|
116
|
+
| `theme` | The exact login/security theme and narrow-screen case (one real test) |
|
|
117
|
+
| `account` | startup-compatibility, account-login and live-config on `0.2.1-alpha.3` |
|
|
118
|
+
| `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.1-rc.5`, `0.2.2-alpha.2` |
|
|
119
|
+
| `rc-bootstrap` | host-release and dsh-bootstrap on `0.2.1-rc.1` (two real tests) |
|
|
116
120
|
|
|
117
121
|
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.
|
|
118
122
|
|
|
119
123
|
## Independent retired-host refusal verification
|
|
120
124
|
|
|
121
|
-
`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.
|
|
125
|
+
`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.
|
|
122
126
|
|
|
123
127
|
```sh
|
|
124
|
-
node scripts/verify-retired.mjs --archive artifacts/dsh-auth-remote-0.3.
|
|
128
|
+
node scripts/verify-retired.mjs --archive artifacts/dsh-auth-remote-0.3.3.tgz --sha256 <recorded-sha256> --retired-dsh-version 0.2.1-alpha.2
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
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,7 +134,7 @@ The six independent negative targets are `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1
|
|
|
130
134
|
|
|
131
135
|
`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.
|
|
132
136
|
|
|
133
|
-
Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule use full verification. Every plan keeps
|
|
137
|
+
Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule use full verification. Every plan keeps nine-version CLI/smoke. Full runs nine 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:
|
|
134
138
|
|
|
135
139
|
| Exact DSH release | Ordinary browser selection |
|
|
136
140
|
| ----------------- | -------------------------- |
|
|
@@ -141,5 +145,15 @@ Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule
|
|
|
141
145
|
| `0.2.1-rc.2` | `browser` |
|
|
142
146
|
| `0.2.1-rc.3` | `browser` |
|
|
143
147
|
| `0.2.1-rc.4` | `browser` |
|
|
148
|
+
| `0.2.1-rc.5` | `browser` |
|
|
149
|
+
| `0.2.2-alpha.2` | `browser` |
|
|
144
150
|
|
|
145
151
|
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.
|
|
152
|
+
|
|
153
|
+
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.
|
|
154
|
+
|
|
155
|
+
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.
|
|
156
|
+
|
|
157
|
+
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.
|
|
158
|
+
|
|
159
|
+
`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 nine-host archive.
|