dsh-auth-remote 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"dsh-support.d.ts","sourceRoot":"","sources":["../../../src/shared/dsh-support.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAA;AACnE,MAAM,MAAM,UAAU,GAClB;IAAE,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GAC7D;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAanE,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,EAIzD,CAAA;AAGD,eAAO,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,EAczD,CAAA;AAGH,sFAAsF;AACtF,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,OAAO,GAAE,SAAS,kBAAkB,EAAc,GACjD,UAAU,CAWZ;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAYzE;AAID,2FAA2F;AAC3F,wBAAgB,cAAc,CAC5B,OAAO,EAAE,UAAU,EACnB,KAAK,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAmB,GAC9C,OAAO,CAUT"}
1
+ {"version":3,"file":"dsh-support.d.ts","sourceRoot":"","sources":["../../../src/shared/dsh-support.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,QAAQ,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,gBAAgB,CAAA;AACnE,MAAM,MAAM,UAAU,GAClB;IAAE,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,GAC7D;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAanE,eAAO,MAAM,mBAAmB,EAAE,SAAS,eAAe,EAIzD,CAAA;AAGD,eAAO,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,EAmB3D,CAAA;AAGD,sFAAsF;AACtF,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,OAAO,GAAE,SAAS,kBAAkB,EAAc,GACjD,UAAU,CAWZ;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAYzE;AAID,2FAA2F;AAC3F,wBAAgB,cAAc,CAC5B,OAAO,EAAE,UAAU,EACnB,KAAK,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAmB,GAC9C,OAAO,CAUT"}
@@ -2,19 +2,17 @@
2
2
 
3
3
  [简体中文](deployment.zh-CN.md)
4
4
 
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.
5
+ This guide covers `0.3.4` and its DSH `0.2.2-alpha.3` development default and recommended host. Use the default `~/.dsh` data directory only for your intended account, never for verification. See [README](../README.md#dsh-compatibility) for nine exact declarations, the [support policy](support-policy.md) for maintenance and [development](development.md) for source builds. Published `0.3.3` keeps its nine declarations. Confirm `0.3.4` availability from the completed release workflow and npm registry.
6
6
 
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`.
7
+ Production acceptance is bounded to Linux with `/proc`, Node.js 24 and Playwright Chromium. DSH `0.2.2-alpha.3` requires Node `>=24.9.0`; the plugin engine stays `>=24`. The Alpha host is not an upstream stable release. Native IPv4/IPv6 HTTP/HTTPS and the existing Node forwarding topologies are covered by the prescribed local tests. A real non-loopback IPv6 interface, other platforms/browsers, real Nginx/Traefik, official-account authorization and production Relay/OAuth are unverified; local protocol stand-ins do not establish real-service behavior.
8
8
 
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.
9
+ ## Minimal installation
10
10
 
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:
11
+ After the independent-profile rehearsal and backup below, use the same intended `web` profile for installation and the running service. After successful publication, install the npm version; for an offline installation, substitute the absolute path to your verified release archive:
14
12
 
15
13
  ```sh
16
14
  dsh --version
17
- dsh plugin --profile web add ./artifacts/dsh-auth-remote-0.3.2.tgz
15
+ dsh plugin --profile web add dsh-auth-remote@0.3.4
18
16
  dsh plugin --profile web list
19
17
  dsh web --no-open --port 13090
20
18
  ```
@@ -55,20 +53,20 @@ DSH replaces the entire plugin `config` when a later patch row supplies one. Pre
55
53
 
56
54
  All plugin fields below belong directly in `auth-remote.config`; there are no aliases or nested TLS objects.
57
55
 
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. |
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. |
68
66
 
69
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.
70
68
 
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.
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.
72
70
 
73
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:
74
72
 
@@ -79,13 +77,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
79
77
 
80
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.
81
79
 
82
- All supported versions natively provide `--public-url`, IPv6 and TLS; this candidate retains the native API migration completed in `0.3.1`.
83
-
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.
80
+ The final public Web URL appears in model runtime context and `DSH_WEB_URL`, without a native authentication token.
85
81
 
86
82
  ## Native HTTPS and IPv6
87
83
 
88
- All eight supported versions can use this complete auth row for IPv6 loopback HTTPS with your own certificate/key:
84
+ Use this complete auth row for IPv6 loopback HTTPS with your own certificate/key:
89
85
 
90
86
  ```yaml
91
87
  - id: auth-remote
@@ -116,7 +112,7 @@ The old field remains a plugin migration contract, independently of DSH version
116
112
  | Two or more items, even duplicates | Fail; manually choose one public entry and replace the array with `publicUrl`. |
117
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. |
118
114
 
119
- 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. To roll back to 0.1.5, restore its compatible old configuration backup; the new fields are not a 0.1.5 contract.
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.
120
116
 
121
117
  ## Source and bridge contract
122
118
 
@@ -126,11 +122,11 @@ Anonymous GET/HEAD requests to exactly `/manifest.webmanifest`, `/favicon.svg`,
126
122
 
127
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.
128
124
 
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.
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.
130
126
 
131
127
  ## Start and verify the public entry
132
128
 
133
- 1. Verify Linux, Node.js 24+, the exact compatible DSH version, and the intended profile/package. Keep test and development data separate.
129
+ 1. Verify Linux, Node.js 24+ (at least `24.9.0` for default DSH `0.2.2-alpha.3`), the exact compatible DSH version, and the intended profile/package. Keep test and development data separate.
134
130
  2. Merge one complete profile configuration and configure a private reachable proxy upstream if needed; see the [proxy guide](reverse-proxy.md).
135
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`.
136
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.
@@ -139,9 +135,13 @@ Startup prints the actual protocol/address/port and one distinct public root, de
139
135
 
140
136
  ## Backup, recovery and changes
141
137
 
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.
138
+ Before upgrading, record the exact old DSH version, plugin archive and digest, profile configuration and package/lock files. Stop the old process, confirm that it released the profile lock, and back up the complete target profile, authentication state, DSH data and configuration with private permissions. Keep the original backup intact. Copy it into an independent private `DSH_HOME` to rehearse the selected exact host and verified `0.3.4` release archive; do not reuse a production profile for verification.
139
+
140
+ Only then change the stopped production installation. Keep its public entry private and retain the independent `webserver disabled: true` row until readiness, anonymous rejection, login and session revocation checks pass. Do not overwrite live state. This version changes no plugin storage format.
143
141
 
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.
142
+ For rollback, stop the new process and restore the matching old exact host, plugin archive, configuration and corresponding complete data backup. Host-switch tests establish only their covered configuration/session contracts; they do not promise that an old host can read arbitrary new production data. Use the matching backup for production data rollback.
143
+
144
+ 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.4`: 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.
145
145
 
146
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.
147
147
 
@@ -149,6 +149,4 @@ For recovery, stop DSH, check schema/package compatibility, restore with private
149
149
 
150
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.
151
151
 
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.
152
+ 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.
@@ -2,19 +2,17 @@
2
2
 
3
3
  [English](deployment.md)
4
4
 
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)。
5
+ 本指南面向 `0.3.4` 及其开发默认和推荐宿主 DSH `0.2.2-alpha.3`。默认 `~/.dsh` 只用于预期账号,不用于验证。九版精确声明见 [README](../README.zh-CN.md#dsh-兼容性),维护见[支持规范](support-policy.zh-CN.md),源码构建见[开发指南](development.zh-CN.md)。已发布 `0.3.3` 保留九版声明;`0.3.4` 的可用性由发布工作流完成状态和 npm registry 确认。
6
6
 
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`。
7
+ 生产验收边界为带 `/proc` 的 Linux、Node.js 24 和 Playwright Chromium。DSH `0.2.2-alpha.3` 要求 Node `>=24.9.0`;插件引擎仍为 `>=24`。Alpha 宿主不是上游稳定版。规定的本地测试覆盖原生 IPv4/IPv6 HTTP/HTTPS 与既有 Node 转发拓扑;真实非回环 IPv6 网卡、其他平台/浏览器、真实 Nginx/Traefik、官方账号授权及生产 Relay/OAuth 未验证,本地协议替身不证明真实服务行为。
8
8
 
9
- 上游 DSH `0.2.2-alpha.2` 自身要求 Node `>=24.9.0`;插件仍声明 Node `>=24`,不增加小版本拦截。
9
+ ## 最小化安装
10
10
 
11
- ## 最小化安装候选归档
12
-
13
- `0.3.2` 尚未发布。按[开发指南](development.zh-CN.md)构建并验证本地归档后,安装该文件。已发布 `0.3.1` 保留七版历史,不包含本次新版宿主适配;分发事实见[精确历史记录](support-history.zh-CN.md#plugin-0.3.1)。保持同一默认 `web` profile:
11
+ 完成下方独立 profile 演练和备份后,安装与运行使用同一预期 `web` profile;发布工作流成功后安装 npm 版本;离线安装时改用已验证发布归档的绝对路径:
14
12
 
15
13
  ```sh
16
14
  dsh --version
17
- dsh plugin --profile web add ./artifacts/dsh-auth-remote-0.3.2.tgz
15
+ dsh plugin --profile web add dsh-auth-remote@0.3.4
18
16
  dsh plugin --profile web list
19
17
  dsh web --no-open --port 13090
20
18
  ```
@@ -55,20 +53,20 @@ HTTPS 代理入口可把以下条目合并到 `~/.dsh/profiles/web/cordis.patch.
55
53
 
56
54
  以下字段均直接位于 `auth-remote.config`,没有别名或嵌套 TLS 对象。
57
55
 
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 信任。 |
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 信任。 |
68
66
 
69
67
  **特别注意 TLS 路径:**文件中的相对值以所选 profile 目录为基准,即其 `cordis.patch.yml` 所在目录;CLI 的相对路径以进程启动 cwd 为基准。两者均不以 bundle 或其他 overlay 目录为基准。绝对路径保持绝对。
70
68
 
71
- 全部支持版本中,`dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别覆盖文件 host、port、URL。监听使用实际空闲端口,公开根地址保持显式值,代理须到达该实际端口;仅覆盖 port 时可省略 host。
69
+ `dsh web --no-open --host ::1 --port 0 --public-url https://dsh.example.com/` 分别覆盖文件 host、port、URL。监听使用实际空闲端口,公开根地址保持显式值,代理须到达该实际端口;仅覆盖 port 时可省略 host。
72
70
 
73
71
  例如文件 `tlsCert: ./tls/dsh.crt` 始终指 `~/.dsh/profiles/web/tls/dsh.crt`,从其他目录启动也不变。以下命令则使用 `./launch-workdir/tls/dsh.crt` 和对应私钥:
74
72
 
@@ -79,13 +77,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
79
77
 
80
78
  只给一个 CLI 参数会失败,即使文件提供另一半也不混用。证书/私钥缺失、不可读、空内容、PEM 无效或不匹配时启动失败,不回退 HTTP,并释放监听、管理 socket 和存储资源。证书须对浏览器主机名有效;TLS 由官方监听处理。
81
79
 
82
- 全部支持版本原生提供 `--public-url`、IPv6 和 TLS;本候选沿用已发布 `0.3.1` 完成的原生 API 迁移。
83
-
84
- 八版均把最终 Web URL 写入模型 runtime context 与 `DSH_WEB_URL`;测试仍扫描所有 Web 提示段,要求无重复地址或 token。
80
+ 最终公开 Web URL 写入模型 runtime context 与 `DSH_WEB_URL`,不含原生认证 token。
85
81
 
86
82
  ## 原生 HTTPS 与 IPv6
87
83
 
88
- 全部八个支持版本都可合并以下完整认证条目提供 IPv6 回环 HTTPS,使用自己的证书/私钥:
84
+ 合并以下完整认证条目,使用自己的证书/私钥提供 IPv6 回环 HTTPS:
89
85
 
90
86
  ```yaml
91
87
  - id: auth-remote
@@ -116,7 +112,7 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
116
112
  | 两项及以上,包含重复值 | 失败;人工选择唯一公开入口,用 `publicUrl` 替换数组。 |
117
113
  | 任意显式 `allowedOrigins` 与文件或 CLI `publicUrl` 共存,含空数组或相同 URL | 失败;使用新字段前删除旧字段。 |
118
114
 
119
- 升级前备份旧 patch。单项替换为 `publicUrl: https://dsh.example.com/`;空数组删除即可保留派生行为。旧多来源安装必须主动选择一个规范入口,在流量到达受保护上游前把其他浏览器主机名导向该入口。回退 0.1.5 时恢复其兼容的旧配置备份;新字段不属于 0.1.5 契约。
115
+ 升级前备份旧 patch。单项替换为 `publicUrl: https://dsh.example.com/`;空数组删除即可保留派生行为。旧多来源安装必须主动选择一个规范入口,在流量到达受保护上游前把其他浏览器主机名导向该入口。回退时须恢复与所选插件版本兼容的配置。
120
116
 
121
117
  ## 来源与桥接契约
122
118
 
@@ -126,11 +122,11 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
126
122
 
127
123
  插件 Cookie 跟随已验证外部来源,限主机、HttpOnly、SameSite,HTTPS 设置 Secure。原生桥接凭据仅保留服务端,跟随原生监听协议;公开 HTTP 代理接入原生 HTTPS 时,其原生 Cookie audience/Secure 仍按 HTTPS。浏览器 Cookie 不通过端口隔离。
128
124
 
129
- 标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。八版普通路径统一使用归一化原生 bind authority,经过完整会话认证。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
125
+ 标准 `/api` 路由在 `preserveOriginPaths: []` 下即可工作,无需列 `/api`。插件始终将定稿的原生桥接 authority 登记到 Connection 的 `trustedHosts`,使用实际绑定端口(包含 `--port 0`),读取该列表的下游插件无需额外 trusted-host 参数即可识别桥接地址。显式 CLI trusted hosts 合并去重,不扩大外层公开来源策略。仅在下游需要原始公网 Host 时加入前缀;Origin 仅在请求已有时透传,保留路径预检并登记所选公开 authority。无需单独 Connection 条目。普通路径使用归一化原生 bind authority,经过完整会话认证。撤销、Connection 丢失或存储故障会关闭活跃上传、流和升级连接,撤回业务准入。ready 不表示账号已初始化。
130
126
 
131
127
  ## 启动并验证公开入口
132
128
 
133
- 1. 核对 Linux、Node.js 24+、精确兼容 DSH 版本及目标 profile/包;测试开发数据独立。
129
+ 1. 核对 Linux、Node.js 24+(默认 DSH `0.2.2-alpha.3` 至少需要 `24.9.0`)、精确兼容 DSH 版本及目标 profile/包;测试开发数据独立。
134
130
  2. 合并一个完整 profile 配置,需要代理时建立私有可达上游,参见[代理指南](reverse-proxy.zh-CN.md)。
135
131
  3. 启动 DSH。HTTP 上游示例检查 `curl -fsS -H 'Host: dsh.example.com' http://127.0.0.1:13090/auth-remote/ready`,要求预期插件/协议和 `ready: true`。
136
132
  4. 核对匿名 HTML 跳转和 API 拒绝,再本地初始化、登录、绑定 TOTP、保存备用码。经所选入口测试官方设置、工作区、预览、上传、SSE/WebSocket 和撤销。
@@ -139,9 +135,13 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
139
135
 
140
136
  ## 备份、恢复与变更
141
137
 
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,禁止覆盖运行中的状态。
138
+ 升级前记录原精确 DSH 版本、插件归档及摘要、profile 配置和 package/lock 文件。停止旧进程并确认 profile 锁释放,以私有权限备份完整目标 profile、认证状态、DSH 数据和配置,保留原始备份。先将备份复制到独立私有 `DSH_HOME`,演练所选精确宿主与已验证的 `0.3.4` 发布归档;验证不得复用生产 profile。
139
+
140
+ 演练通过后再修改已停服的生产安装。在 readiness、匿名拒绝、登录与会话撤销检查通过前,保持公开入口私有,并保留独立 `webserver disabled: true`。不得覆盖运行中的状态;本版本不修改插件存储格式。
143
141
 
144
- 这些是插件 `0.3.2` 自身的行为迁移,与 DSH 退役无关:CLI 固定英语,删除脚本中的 `--lang` 参数;JSON 字段不变。独立登录页不再提供语言选择器,按新 `dsh-auth-remote-lang` 缓存、`navigator.language`、英文选择语言。旧 `dsh-auth-remote.locale` 不读取、不清理、不迁移;进入 DSH 后仅同步原生已接纳的偏好,退出保留。插件八语不会扩充旧 DSH 的原生语言目录。
142
+ 回滚时先停止新进程,再恢复匹配的原精确宿主、插件归档、配置及对应完整数据备份。宿主切换测试只证明所覆盖的配置/会话契约,不承诺旧宿主可直接读取任意新生产数据;生产数据回滚必须使用对应备份。
143
+
144
+ 从早于 `0.3.2` 的插件升级时,须考虑 `0.3.2` 已引入、`0.3.4` 保留的行为:CLI 固定英语,删除脚本中的 `--lang` 参数;JSON 字段不变。独立登录页不提供语言选择器,按 `dsh-auth-remote-lang` 缓存、`navigator.language`、英文选择语言。旧 `dsh-auth-remote.locale` 不读取、不清理、不迁移;进入 DSH 后仅同步原生已接纳的偏好,退出保留。插件八语不会扩充 DSH 的原生语言目录。
145
145
 
146
146
  停止 DSH 并确认释放 profile 锁,再复制 `~/.dsh/profiles/web/auth-remote/auth-state.json`。副本目录权限 0700、文件权限 0600;它含密码哈希、TOTP 密钥、备用码哈希和会话。不要复制写入中的临时文件、覆盖运行中持锁状态或提交 Git;同时备份对应 profile patch 和包/锁文件。
147
147
 
@@ -149,6 +149,4 @@ dsh web --no-open --tls-cert ./tls/dsh.crt --tls-key ./tls/dsh.key
149
149
 
150
150
  外部入口变更时,替换唯一 `publicUrl`、更新代理并重启 DSH。检查新入口与旧非回环入口的拒绝,包含 Cookie、重定向、上传和长连接。不要在插件中临时配置两个来源。
151
151
 
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。
152
+ 官方 DeepSeek 账号授权使用 [README 的手动回填弹窗](../README.zh-CN.md#登录-deepseek-官方账号)。浏览器电脑无需监听器或开放回环端口。`/auth-remote/account/*` 保持相同会话/来源门禁,只接纳同源 JSON POST;直接 HTTP 访问原生 `/oauth/callback` 不能完成此手动对接。无需代理例外、扩大路径或放宽跨站规则。
@@ -2,9 +2,9 @@
2
2
 
3
3
  [简体中文](development.zh-CN.md)
4
4
 
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.
5
+ This guide describes nine exact verification targets for `0.3.4`, defaulting to DSH `0.2.2-alpha.3`. 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.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.
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.3`. DSH `0.2.2-alpha.3` 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.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.
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.4.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.2-alpha.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.3/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.2-alpha.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.3`).
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 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.
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.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.
57
+ The default target is DSH `0.2.2-alpha.3`; `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.3`. 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.3` 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
@@ -69,52 +69,54 @@ DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:cli
69
69
  DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:browser
70
70
  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
- 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
72
+ DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:cli
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.3 pnpm test:cli
77
+ DSH_TEST_VERSION=0.2.2-alpha.3 pnpm test:browser
76
78
  ```
77
79
 
78
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.
79
81
 
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.
82
+ Official-account tests use a local Platform stand-in with the actual DSH `0.2.2-alpha.3` 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
83
 
82
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.
83
85
 
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.
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.3`. 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.
85
87
 
86
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.
87
89
 
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.
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.
89
91
 
90
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.
91
93
 
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.
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`, `0.2.2-alpha.3` 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`, `0.2.2-alpha.3`, `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
95
 
94
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.
95
97
 
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.
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`, `0.2.2-alpha.3` ↔ `0.2.1-rc.5`. 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
99
 
98
100
  ## Consume a fixed archive
99
101
 
100
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:
101
103
 
102
104
  ```sh
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
+ sha256sum artifacts/dsh-auth-remote-0.3.4.tgz
106
+ pnpm verify:packed --archive artifacts/dsh-auth-remote-0.3.4.tgz --sha256 <recorded-sha256> --dsh-version 0.2.2-alpha.3 --suite cli --suite browser --suite smoke
105
107
  ```
106
108
 
107
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.
108
110
 
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) |
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.3` |
119
+ | `rc-bootstrap` | host-release and dsh-bootstrap on `0.2.1-rc.1` (two real tests) |
118
120
 
119
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.
120
122
 
@@ -123,7 +125,7 @@ Consumption is serial within a checkout, enforced by a consumer lock. Each suite
123
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.
124
126
 
125
127
  ```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
128
+ node scripts/verify-retired.mjs --archive artifacts/dsh-auth-remote-0.3.4.tgz --sha256 <recorded-sha256> --retired-dsh-version 0.2.1-alpha.2
127
129
  ```
128
130
 
129
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/`.
@@ -132,7 +134,7 @@ The six independent negative targets are `0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1
132
134
 
133
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.
134
136
 
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:
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:
136
138
 
137
139
  | Exact DSH release | Ordinary browser selection |
138
140
  | ----------------- | -------------------------- |
@@ -143,14 +145,23 @@ Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule
143
145
  | `0.2.1-rc.2` | `browser` |
144
146
  | `0.2.1-rc.3` | `browser` |
145
147
  | `0.2.1-rc.4` | `browser` |
146
- | `0.2.2-alpha.2` | `browser` |
148
+ | `0.2.1-rc.5` | `browser` |
149
+ | `0.2.2-alpha.3` | `browser` |
147
150
 
148
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.
149
152
 
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.
153
+ On exact DSH `0.2.2-alpha.3`, `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
154
 
152
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.
153
156
 
154
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.
155
158
 
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.
159
+ `liveshare.spec.ts` registers on exact `0.2.2-alpha.3`: 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.
160
+
161
+ Version `0.3.4` is prepared for release; actual availability is established by the release workflow and npm registry. Published `0.3.3` retains nine declarations; the new exact `0.2.2-alpha.3` claim is not retroactive. Release acceptance requires one final archive on Linux/Node.js 24 (at least `24.9.0` for the new default)/Chromium. Other Node majors cannot substitute for this acceptance; real proxy products, external authorization, a non-loopback IPv6 interface and other platforms/browsers remain unverified.
162
+
163
+ Direct development dependencies use DSH `0.2.2-alpha.3`, Cordis `4.0.6-alpha.2` and Schemastery `3.18.6-alpha.2`; the actual new host chain uses Loader `1.0.7-alpha.2` and Include `1.0.11-alpha.2`. These are distribution package versions. Keep `autoInstallPeers: false` and only verified, installer-required exact release-age exceptions. Configuration observation reads canonical `entry.fiber.ctx.fiber.effectiveConfig`, falling back to `config` only when the old host has no accessor; inactive fibers, absent values and non-`.get()` references fail. Production retains the constructor's native Volatile reference.
164
+
165
+ `settings-icon.spec.ts` registers on all nine hosts: `0.2.2-alpha.3` checks the native shield, size/currentColor/selection, light/dark narrow layouts, contribution release/default restoration, genuine declaration withdrawal/recreation without duplicates and disposal; the other eight check the default icon. Observation/release controls live only in fixtures, and native Loader resolves the modules. Viewers install no administrator effects. Complete browser verification checks mandatory mux/resource/HMR/icon TAP names as well as nonempty files; name-filtered runs are partial. Language cases assert the actual visited sets rather than relying on their titles.
166
+
167
+ LiveShare is an officially published, experimental optional plugin, disabled by default (`listedByDefault: false`); this plugin never enables it automatically. Necessary compatibility applies to exact `0.2.2-alpha.3`. Local protocol stand-ins do not establish production Relay/OAuth, real visitor model operations or file writing. Private-interface dependencies and unknown-host limits remain in the inventory.