dsh-auth-remote 0.1.10 → 0.3.1
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 +31 -0
- package/CHANGELOG.zh-CN.md +31 -0
- package/CONTRIBUTING.md +5 -1
- package/CONTRIBUTING.zh-CN.md +5 -1
- package/README.md +22 -24
- package/README.zh-CN.md +22 -24
- package/cordis.patch.yml +2 -2
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/index.js +102 -38
- package/dist/index.js.map +4 -4
- package/dist/types/adapters/dsh/compatibility.d.ts +1 -1
- package/dist/types/adapters/dsh/compatibility.d.ts.map +1 -1
- package/dist/types/adapters/dsh/runtime-capabilities.d.ts +6 -11
- package/dist/types/adapters/dsh/runtime-capabilities.d.ts.map +1 -1
- package/dist/types/config.d.ts +2 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/http/account-login.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/dsh-support.d.ts +38 -0
- package/dist/types/shared/dsh-support.d.ts.map +1 -0
- package/docs/deployment.md +25 -21
- package/docs/deployment.zh-CN.md +25 -21
- package/docs/development.md +80 -23
- package/docs/development.zh-CN.md +80 -23
- package/docs/legacy-compatibility.md +106 -79
- package/docs/legacy-compatibility.zh-CN.md +106 -79
- package/docs/releasing.md +46 -10
- package/docs/releasing.zh-CN.md +46 -10
- package/docs/reverse-proxy.md +2 -2
- package/docs/reverse-proxy.zh-CN.md +2 -2
- package/docs/support-history.md +103 -0
- package/docs/support-history.zh-CN.md +103 -0
- package/docs/support-policy.md +87 -0
- package/docs/support-policy.zh-CN.md +87 -0
- package/examples/web-profile-auth-remote.patch.yml +3 -2
- package/package.json +26 -23
package/docs/development.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](development.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This guide describes seven exact verification targets for unpublished plugin candidate `0.3.1`, defaulting to DSH `0.2.1-rc.4`. Final same-archive evidence belongs to separate, unpackaged execution records; this guide does not certify unfinished candidate verification.
|
|
6
|
+
|
|
7
|
+
Development and the full test suite use Linux (`/proc` is required for the profile lock), Node.js 24+, pnpm 12.5.1, and DSH `0.2.1-rc.4`. Browser tests use Playwright-managed Chromium and a Node HTTP/HTTPS forwarder.
|
|
6
8
|
|
|
7
9
|
## Set up and check a checkout
|
|
8
10
|
|
|
@@ -14,7 +16,7 @@ pnpm pack:local
|
|
|
14
16
|
pnpm smoke
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
`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.1.
|
|
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.1.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.
|
|
18
20
|
|
|
19
21
|
## Use the isolated development profile
|
|
20
22
|
|
|
@@ -29,7 +31,7 @@ The scripts manage only `.dev/runtime-<version>` and `.dev/dsh-home` under this
|
|
|
29
31
|
For direct inspection, use the same isolated home explicitly:
|
|
30
32
|
|
|
31
33
|
```sh
|
|
32
|
-
DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-
|
|
34
|
+
DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-rc.4/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
The development home contains test account data. Keep it private and do not commit or copy it into a deployment profile.
|
|
@@ -38,7 +40,9 @@ The development home contains test account data. Keep it private and do not comm
|
|
|
38
40
|
|
|
39
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.
|
|
40
42
|
|
|
41
|
-
Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.1-
|
|
43
|
+
Browser network traffic uses a Node HTTP/HTTPS forwarder. The dedicated self-signed certificate and key under `tests/fixtures/tls/` are test fixtures only; they are never packaged or deployment credentials. Chat uses a local model stub. No real third-party authorization or paid model request is exercised. The default browser is Playwright Chromium; `DSH_TEST_BROWSER` can select a local browser executable, and `DSH_TEST_BIN` can select another binary only if it reports the exact selected version (default `0.2.1-rc.4`).
|
|
44
|
+
|
|
45
|
+
Shared Host environments are allowlisted without real model credentials/endpoints; browser launch removes ambient proxy variables. Before first key entry, `localModelEndpoint` points native llm-deepseek baseURL at a local HTTP stub, without preseeded keys or disabled onboarding. UI cases require zero model calls; proxy chat allows only local chat and native session-title POSTs. Counts are checked at fixture close and unexpected requests fail.
|
|
42
46
|
|
|
43
47
|
The DSH test runtime lives in `.cache/test-runtime/<version>` and is pinned separately from the source dependencies. Host services and React remain external to the client bundle. The [deployment guide](deployment.md) describes profile and backup rules.
|
|
44
48
|
|
|
@@ -46,43 +50,96 @@ Before changing compatibility declarations or adaptations, read the [legacy comp
|
|
|
46
50
|
|
|
47
51
|
Isolated verification installs use pnpm file copies so shared package hardlink metadata changes cannot trigger client hot reloads in another profile.
|
|
48
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 `0.3.1`; never derive old release claims from the current candidate manifest.
|
|
54
|
+
|
|
49
55
|
## Cross-version verification
|
|
50
56
|
|
|
51
|
-
The default
|
|
57
|
+
The default target is DSH `0.2.1-rc.4`; `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`. 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 seven-version CLI/installation smoke; full runs seven complete browser targets and ordinary uses the selection below. Development types and integration use locked `0.2.1-rc.4` packages. All seven verify 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.
|
|
52
58
|
|
|
53
59
|
```sh
|
|
54
|
-
DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:cli
|
|
55
|
-
DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:browser
|
|
56
|
-
DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:cli
|
|
57
|
-
DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:browser
|
|
58
|
-
DSH_TEST_VERSION=0.2.0-rc.1 pnpm test:cli
|
|
59
|
-
DSH_TEST_VERSION=0.2.0-rc.1 pnpm test:browser
|
|
60
|
-
DSH_TEST_VERSION=0.2.0-rc.2 pnpm test:cli
|
|
61
|
-
DSH_TEST_VERSION=0.2.0-rc.2 pnpm test:browser
|
|
62
|
-
DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:cli
|
|
63
|
-
DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:browser
|
|
64
|
-
DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:cli
|
|
65
|
-
DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:browser
|
|
66
60
|
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:cli
|
|
67
61
|
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:browser
|
|
68
62
|
DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:cli
|
|
69
63
|
DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:browser
|
|
70
|
-
pnpm test:cli
|
|
71
|
-
pnpm test:browser
|
|
64
|
+
DSH_TEST_VERSION=0.2.1-alpha.5 pnpm test:cli
|
|
65
|
+
DSH_TEST_VERSION=0.2.1-alpha.5 pnpm test:browser
|
|
66
|
+
DSH_TEST_VERSION=0.2.1-rc.1 pnpm test:cli
|
|
67
|
+
DSH_TEST_VERSION=0.2.1-rc.1 pnpm test:browser
|
|
68
|
+
DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:cli
|
|
69
|
+
DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:browser
|
|
70
|
+
DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:cli
|
|
71
|
+
DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:browser
|
|
72
|
+
DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:cli
|
|
73
|
+
DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:browser
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
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.
|
|
75
77
|
|
|
76
|
-
Official-account tests use a local Platform stand-in with the actual DSH `0.2.1-
|
|
78
|
+
Official-account tests use a local Platform stand-in with the actual DSH `0.2.1-rc.4` 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.
|
|
77
79
|
|
|
78
80
|
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.
|
|
79
81
|
|
|
80
|
-
|
|
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 seven 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.
|
|
81
83
|
|
|
82
84
|
`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.
|
|
83
85
|
|
|
84
|
-
`account-login.spec.ts`
|
|
86
|
+
`account-login.spec.ts` exercises real configuration HMR on all seven: 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 seven, `startup-compatibility.spec.ts` damages only isolated plugin copies: `0.2.1-alpha.3` uses an incompatible Host peer for Loader skip, the other six 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.
|
|
85
87
|
|
|
86
88
|
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.
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
Native Search/Fetch settings regression on `0.2.1-rc.2`, `0.2.1-rc.3` and `0.2.1-rc.4` 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` and `0.2.1-rc.4`, `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
|
+
|
|
92
|
+
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
|
+
|
|
94
|
+
`browser/host-release.spec.ts` fixes six 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`, and `0.2.1-rc.4` ↔ `0.2.1-rc.3`. 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
|
+
|
|
96
|
+
## Consume a fixed archive
|
|
97
|
+
|
|
98
|
+
`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
|
+
|
|
100
|
+
```sh
|
|
101
|
+
sha256sum artifacts/dsh-auth-remote-0.3.1.tgz
|
|
102
|
+
pnpm verify:packed --archive artifacts/dsh-auth-remote-0.3.1.tgz --sha256 <recorded-sha256> --dsh-version 0.2.1-rc.4 --suite cli --suite browser --suite smoke
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
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
|
+
|
|
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) |
|
|
116
|
+
|
|
117
|
+
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
|
+
|
|
119
|
+
## Independent retired-host refusal verification
|
|
120
|
+
|
|
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. All six run once for this migration acceptance; subsequent full/release plans run only `0.2.1-alpha.2`, and ordinary runs none.
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
node scripts/verify-retired.mjs --archive artifacts/dsh-auth-remote-0.3.1.tgz --sha256 <recorded-sha256> --retired-dsh-version 0.2.1-alpha.2
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
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/`.
|
|
128
|
+
|
|
129
|
+
## Ordinary and full CI plans
|
|
130
|
+
|
|
131
|
+
`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
|
+
|
|
133
|
+
Manual dispatch, unknown events, every release and the Monday 00:00 UTC schedule use full verification. Every plan keeps seven-version CLI/smoke. Full runs seven 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
|
+
|
|
135
|
+
| Exact DSH release | Ordinary browser selection |
|
|
136
|
+
| ----------------- | -------------------------- |
|
|
137
|
+
| `0.2.1-alpha.3` | `browser` |
|
|
138
|
+
| `0.2.1-alpha.4` | `host-release` |
|
|
139
|
+
| `0.2.1-alpha.5` | `host-release` |
|
|
140
|
+
| `0.2.1-rc.1` | `rc-bootstrap` |
|
|
141
|
+
| `0.2.1-rc.2` | `browser` |
|
|
142
|
+
| `0.2.1-rc.3` | `browser` |
|
|
143
|
+
| `0.2.1-rc.4` | `browser` |
|
|
144
|
+
|
|
145
|
+
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.
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[English](development.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本指南描述未发布插件候选 `0.3.1` 的七版精确验证目标,默认 DSH `0.2.1-rc.4`。最终同包运行证据另记包外执行记录;本指南不认证尚未完成的候选验证。
|
|
6
|
+
|
|
7
|
+
开发和完整测试需要 Linux(profile 锁依赖 `/proc`)、Node.js 24+、pnpm 12.5.1,以及 DSH `0.2.1-rc.4`。浏览器测试使用 Playwright 管理的 Chromium 和 Node HTTP/HTTPS 转发器。
|
|
6
8
|
|
|
7
9
|
兼容声明或适配变更前,先阅读 [Legacy 兼容维护清单](legacy-compatibility.zh-CN.md)。共同复核运行时准入、测试目标、CI 和用户声明;适用版本退出支持集合时同次清理专属运行时代码及测试。旧插件配置按自身迁移策略退役,保留共享安全逻辑,并用完整版本号与精确版本证据同步更新中英文清单及两个维度的矩阵。
|
|
8
10
|
|
|
@@ -16,7 +18,7 @@ pnpm pack:local
|
|
|
16
18
|
pnpm smoke
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
`pnpm check` 依次执行类型、格式、构建、包/部署/文档检查,以及单元、集成、CLI 和浏览器测试。`pnpm pack:local` 在静态检查后写出 `artifacts/dsh-auth-remote-0.1.
|
|
21
|
+
`pnpm check` 依次执行类型、格式、构建、包/部署/文档检查,以及单元、集成、CLI 和浏览器测试。`pnpm pack:local` 在静态检查后写出 `artifacts/dsh-auth-remote-0.3.1.tgz`,不会发布。`pnpm smoke` 将包安装到隔离 DSH_HOME,短暂启动固定版本的 DSH,验证就绪、匿名重定向/拒绝和在线 CLI 状态,然后停止。
|
|
20
22
|
|
|
21
23
|
## 使用隔离开发 profile
|
|
22
24
|
|
|
@@ -31,7 +33,7 @@ pnpm dev:start
|
|
|
31
33
|
直接查看状态时显式使用同一隔离 home:
|
|
32
34
|
|
|
33
35
|
```sh
|
|
34
|
-
DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-
|
|
36
|
+
DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-rc.4/node_modules/.bin/dsh" plugin --profile web exec dsh-auth-remote status --json
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
开发 home 可能含测试账号数据,须保持私有,不要提交或复制到部署 profile。
|
|
@@ -40,49 +42,104 @@ DSH_HOME="$PWD/.dev/dsh-home" "$PWD/.dev/runtime-0.2.1-alpha.5/node_modules/.bin
|
|
|
40
42
|
|
|
41
43
|
`pnpm test:unit` 覆盖认证状态机、TOTP、备用码、来源策略、翻译、存储持久性和锁恢复。`pnpm test:integration` 使用真实 HTTP/WebSocket socket 验证原生就绪、Cookie、来源判定与撤销。`pnpm test:cli` 构建真实压缩包,并用隔离 profile/Unix socket 验证交互与非交互命令。`pnpm test:browser` 用临时 profile 启动所选的 DSH 版本,验证登录、安全与登录页、原生设置、工作区、上传/预览、SSE、WebSocket 和 HTTPS 转发链。
|
|
42
44
|
|
|
43
|
-
浏览器网络链路使用 Node HTTP/HTTPS 转发器。`tests/fixtures/tls/` 下的专用自签证书与私钥仅为测试夹具,不进入安装包,也不是部署凭证。聊天使用本地模型替身;不执行真实第三方授权或付费模型请求。默认浏览器为 Playwright Chromium;`DSH_TEST_BROWSER` 可选择本地浏览器程序,`DSH_TEST_BIN` 仅在报告所选精确版本(默认 `0.2.1-
|
|
45
|
+
浏览器网络链路使用 Node HTTP/HTTPS 转发器。`tests/fixtures/tls/` 下的专用自签证书与私钥仅为测试夹具,不进入安装包,也不是部署凭证。聊天使用本地模型替身;不执行真实第三方授权或付费模型请求。默认浏览器为 Playwright Chromium;`DSH_TEST_BROWSER` 可选择本地浏览器程序,`DSH_TEST_BIN` 仅在报告所选精确版本(默认 `0.2.1-rc.4`)时可替换 DSH 二进制。
|
|
46
|
+
|
|
47
|
+
共享 Host 环境由 allowlist 构造,清除真实模型凭据/endpoint;浏览器清除 ambient 代理变量。`localModelEndpoint` 在首次输入 Key 前把原生 llm-deepseek baseURL 指向本地 HTTP 替身,不预存 Key、不关闭引导。UI 专项要求零模型调用;代理聊天只接纳本地 chat 和原生 session-title 两次 POST。计数在 fixture 关闭时检查,异常请求使测试失败。
|
|
44
48
|
|
|
45
49
|
DSH 测试运行时位于 `.cache/test-runtime/<version>`,与源码依赖分别固定。宿主服务和 React 不打入客户端 bundle。[部署指南](deployment.zh-CN.md)说明 profile 与备份规则。
|
|
46
50
|
|
|
47
51
|
隔离验证安装使用 pnpm 的文件复制模式,避免不同 profile 共享包文件的硬链接元数据变化触发 DSH 客户端热重载。
|
|
48
52
|
|
|
53
|
+
本候选当前支持见 [README](../README.zh-CN.md#dsh-兼容性),发布事实见[双向历史](support-history.zh-CN.md),适配证据见库存。两份 support-policy 保留前一发布记录,`0.3.1` 本次不修改;不能用当前候选 manifest 推导旧发布声明。
|
|
54
|
+
|
|
49
55
|
## 跨版本验证
|
|
50
56
|
|
|
51
|
-
默认测试 DSH `0.2.1-
|
|
57
|
+
默认测试 DSH `0.2.1-rc.4`;`DSH_TEST_VERSION` 仅可选择 `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`。测试运行时位于 `.cache/test-runtime/<version>`,开发运行时位于 `.dev/runtime-<version>`;`DSH_TEST_BIN` 必须报告所选精确版本。CI 保留七版 CLI/安装 smoke,全量运行七版完整 browser,普通使用下文固定选择。开发类型与集成测试使用锁定的 `0.2.1-rc.4` 包。七版均验证真实 Loader、模型 runtime context/`DSH_WEB_URL` 和 IPv4/IPv6 HTTP/HTTPS 正向安全边界;测试传输不可用时失败,不跳过。
|
|
52
58
|
|
|
53
59
|
```sh
|
|
54
|
-
DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:cli
|
|
55
|
-
DSH_TEST_VERSION=0.1.7-rc.1 pnpm test:browser
|
|
56
|
-
DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:cli
|
|
57
|
-
DSH_TEST_VERSION=0.1.7-rc.2 pnpm test:browser
|
|
58
|
-
DSH_TEST_VERSION=0.2.0-rc.1 pnpm test:cli
|
|
59
|
-
DSH_TEST_VERSION=0.2.0-rc.1 pnpm test:browser
|
|
60
|
-
DSH_TEST_VERSION=0.2.0-rc.2 pnpm test:cli
|
|
61
|
-
DSH_TEST_VERSION=0.2.0-rc.2 pnpm test:browser
|
|
62
|
-
DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:cli
|
|
63
|
-
DSH_TEST_VERSION=0.2.1-alpha.1 pnpm test:browser
|
|
64
|
-
DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:cli
|
|
65
|
-
DSH_TEST_VERSION=0.2.1-alpha.2 pnpm test:browser
|
|
66
60
|
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:cli
|
|
67
61
|
DSH_TEST_VERSION=0.2.1-alpha.3 pnpm test:browser
|
|
68
62
|
DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:cli
|
|
69
63
|
DSH_TEST_VERSION=0.2.1-alpha.4 pnpm test:browser
|
|
70
|
-
pnpm test:cli
|
|
71
|
-
pnpm test:browser
|
|
64
|
+
DSH_TEST_VERSION=0.2.1-alpha.5 pnpm test:cli
|
|
65
|
+
DSH_TEST_VERSION=0.2.1-alpha.5 pnpm test:browser
|
|
66
|
+
DSH_TEST_VERSION=0.2.1-rc.1 pnpm test:cli
|
|
67
|
+
DSH_TEST_VERSION=0.2.1-rc.1 pnpm test:browser
|
|
68
|
+
DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:cli
|
|
69
|
+
DSH_TEST_VERSION=0.2.1-rc.2 pnpm test:browser
|
|
70
|
+
DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:cli
|
|
71
|
+
DSH_TEST_VERSION=0.2.1-rc.3 pnpm test:browser
|
|
72
|
+
DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:cli
|
|
73
|
+
DSH_TEST_VERSION=0.2.1-rc.4 pnpm test:browser
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
浏览器测试把浅色/深色、桌面/窄屏截图保存在 `.cache/ui-review/<version>`,供人工检查。安全页的 CSS 在插件生效时注入、销毁时移除,所有选择器只作用于插件页面,并直接引用宿主 `--dsw-*` 主题变量。独立登录页使用 dsh 0.2.0-rc.1 的主题变量子集并跟随系统配色,不读取登录前不可用的宿主设置。
|
|
75
77
|
|
|
76
|
-
官方账号专项测试使用本地平台替身与真实 DSH `0.2.1-
|
|
78
|
+
官方账号专项测试使用本地平台替身与真实 DSH `0.2.1-rc.4` 账号提供者,验证兑换保留原始 redirect URI 和 PKCE verifier,以及错误 state/URL/会话、重复提交、取消、过期和重试。浏览器覆盖账号菜单与引导中的先说明弹窗、回环导航失败后粘贴确认、弹窗拦截、动态语言与浅深色响应式布局。这些测试不会建立真实官方账号授权。
|
|
77
79
|
|
|
78
80
|
账号核心测试从锁定的开发依赖加载精确版本提供者,无需预先存在 CLI 运行时缓存;浏览器测试仍使用隔离 DSH profile 中实际安装的提供者。
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
此临时账号适配保留必要能力与动态配置检查;完整手动功能回归覆盖 `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`。全局下限准入后的服务端不再分流旧宿主,独立导出 helper 仍检查缺省、无效和旧版本参数。未来准入不构成已验证声明。支持范围或共享宿主适配变更须用同一最终 tgz 完整运行七版 CLI、browser 与 smoke,逐版执行 `--suite cli --suite browser --suite smoke`;禁止在消费循环调用重建/重打包包装命令。运行器恢复归档 dist、逐 suite 校验 SHA-256,并隔离 smoke 与开发 profile。公网回调、迁移及退役条件见 `DSH-ACCOUNT-001`。
|
|
81
83
|
|
|
82
84
|
`live-config.spec.ts` 仅观察真实 Loader 的配置引用/fiber、认证/存储实例、锁、监听器及 SSE/WebSocket 连续性,核对实际依赖链并重启验证 profile override;不伪造服务。安全弹窗回归覆盖取消/错误、焦点/键盘、默认及强制 TOTP、一次性备用码复制与会话撤销后跳转保持。任务文档、测试凭证、profile、截图及生成目录不得进入 npm 包。
|
|
83
85
|
|
|
84
|
-
`account-login.spec.ts`
|
|
86
|
+
`account-login.spec.ts` 在七版验证真实原生配置 HMR:修改普通 `sessionHours` 重建监听器,独立 Settings 写入仍等待已有事务,真正嵌套仍被拒绝;隔离插件代码替换后可重新开启手动登录。事务探针调用真实 HMR,不替代服务,不进入 npm 包,最小监听器上下文适配见 `DSH-HMR-001`。受保护远程部署独立禁用原生 webserver。`startup-compatibility.spec.ts` 在七版破坏隔离插件副本:`0.2.1-alpha.3` 用不兼容 Host peer 验证 Loader skip,其余六版用不兼容 `engines.dsh`;各版还注入插件自身准入范围,验证导入后的运行拒绝。两路径均须自行失败且无 TCP/HTTP/readiness/WebSocket 回退,不改上游或 Loader 审计。
|
|
85
87
|
|
|
86
88
|
账号配置绑定通过原生 describe 镜像的 `ensure()` API 恢复首次读取失败;已有镜像中的命名空间恢复使用明确注入的 `remote.settings` 传输,并将已接纳值回填到同一镜像。偏好加载期间点击登录会等待共享读取,再按最新接纳的 true/false 值选择入口;加载中不等同于关闭。浏览器回归覆盖首次读取失败、命名空间暂缺,以及两种路由选择的延迟读取。
|
|
87
89
|
|
|
88
|
-
`
|
|
90
|
+
`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4` 的原生 Search/Fetch 设置回归覆盖真实设置/凭据域的选择、保存失败和刷新/重启持久化,以及匿名/撤销会话拒绝。全部地址为本地测试地址,请求计数必须为零。`rc-navigation.spec.ts` 在 `0.2.1-rc.3`、`0.2.1-rc.4` 验证全局、会话、右侧栏 More 菜单、原生设置/模型选择及撤销后拒绝;只检查插件市场/Creator 入口可见,不执行安装或外部授权。通过公开 sessions/sessionProjections 构造真实会话的空完成 turn 以展示原生菜单,不发送聊天,不替换快照。官方动态 `/models` 内部语义不在承诺内。
|
|
91
|
+
|
|
92
|
+
启动维护诊断读取已安装插件的精确声明与显式生命周期记录,同一进程每个精确版本/状态只提示一次,配置/模块 HMR 不重置。三个 Alpha 的 legacy 起算 2026-10-28、14 日窗口、最早资格 2026-11-11(Asia/Shanghai),日期不会停服。六个退役版本记录最后插件 `0.2.0`、退役版本 `0.3.1` 和准备日期 `retiredOn: 2026-10-28`,该日期不是 npm 实际发布时间。单元以模拟时钟确认到期不改变分类;真实 legacy HMR 用例观察同进程去重。必要 API、包身份和安全失败仍拒绝服务。
|
|
93
|
+
|
|
94
|
+
`browser/host-release.spec.ts` 固定六组真实宿主往返切换:`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`。同一临时 profile/端口保留页面,检查原生版本提示,刷新后核对认证、原会话和持久设置,再恢复起始版本。只有 `0.2.1-alpha.3` 无 release 元数据并显示未解析;其余目的宿主必须显示真实完整版本。不修改上游源码、版本或依赖图元数据。
|
|
95
|
+
|
|
96
|
+
## 消费固定归档
|
|
97
|
+
|
|
98
|
+
`pnpm verify:packed` 消费已有 tgz,不构建或打包。先记录 SHA-256,再传入归档、该摘要、精确声明的 DSH 版本及一个或多个 suite:
|
|
99
|
+
|
|
100
|
+
```sh
|
|
101
|
+
sha256sum artifacts/dsh-auth-remote-0.3.1.tgz
|
|
102
|
+
pnpm verify:packed --archive artifacts/dsh-auth-remote-0.3.1.tgz --sha256 <recorded-sha256> --dsh-version 0.2.1-rc.4 --suite cli --suite browser --suite smoke
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
运行器验证包名/版本及所选宿主声明,将相同字节放到固定制品路径,仅恢复归档中的 dist,因此 CLI 执行与安装比较都使用这份 dist。不安全 tar 条目、摘要变化、未知选择、零真实用例及 skipped/cancelled/todo 用例均失败。Node 对无匹配用例文件产生的通过占位项不计作真实测试。`--test-name-pattern` 可筛选单个 `cli` 或 `browser` suite,报告明确标记为局部,并包含文件、筛选表达式与实际命令。固定专项不能覆盖其筛选/数量要求,每个必需文件均须注册测试。
|
|
106
|
+
|
|
107
|
+
| Suite | 选择范围 |
|
|
108
|
+
| -------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
109
|
+
| `cli` | 全部 CLI 测试文件 |
|
|
110
|
+
| `browser` | 全部浏览器测试文件 |
|
|
111
|
+
| `smoke` | 在新建且带标记的 home 中安装并短暂启动归档 |
|
|
112
|
+
| `theme` | 精确登录/安全主题与窄屏用例(1 个真实测试) |
|
|
113
|
+
| `account` | `0.2.1-alpha.3` 的 startup-compatibility、account-login 与 live-config |
|
|
114
|
+
| `host-release` | `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` 的真实往返切换(1 个真实测试) |
|
|
115
|
+
| `rc-bootstrap` | `0.2.1-rc.1` 的 host-release 与 dsh-bootstrap(2 个真实测试) |
|
|
116
|
+
|
|
117
|
+
同一 checkout 的消费以锁保证串行。每个 suite 结束均重新校验输入归档、固定消费归档及恢复的 dist。JSON 报告和测试日志保留在 `.cache/verify-packed/`。smoke 直接在 `.cache/v-*` 新建带内部标记的短目录,确保默认 GitHub 检出路径下的管理 socket 不超过 Linux 路径上限;使用独立 runtime/home,以 `--port 0` 启动,仅读取该子进程公布的实际回环地址,并在相同 profile 检查在线 CLI 状态。既有 `.dev/dsh-home` 和 13090 上的服务保持独立,只清理本次新建的验证根目录。`DSH_VERIFY_ROOT` 是内部入口,拒绝无标记、符号链接及外部路径;普通开发命令保留原有 profile 和端口。
|
|
118
|
+
|
|
119
|
+
## 独立退役拒绝验证
|
|
120
|
+
|
|
121
|
+
`verify-retired.mjs` 不扩展 `DSH_TEST_VERSION` 或正向矩阵。它核验同一候选/SHA256SUMS 及已发布 `0.2.0` 的完整性,在两个私有旧 profile 验证真实 CLI 安装拒绝/完整回滚,以及完整不兼容包的原生 peer skip。后一路保留真实旧 peer 解析、连续确认无 TCP/HTTP/readiness/WebSocket 监听并清理进程。六版只在本次迁移最终验收完整运行;后续 full/发布仅运行 `0.2.1-alpha.2`,ordinary 不运行。
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
node scripts/verify-retired.mjs --archive artifacts/dsh-auth-remote-0.3.1.tgz --sha256 <recorded-sha256> --retired-dsh-version 0.2.1-alpha.2
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
六个独立负向目标:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.2`。结果与正向报告分开保存在 `.cache/verify-retired/`。
|
|
128
|
+
|
|
129
|
+
## 普通与全量 CI 计划
|
|
130
|
+
|
|
131
|
+
`scripts/ci-plan.mjs` 仅在全部变更路径均为 `CHANGELOG.md`、`CHANGELOG.zh-CN.md`、`CONTRIBUTING.md`、`CONTRIBUTING.zh-CN.md`、`LICENSE` 或 `tests/unit/i18n.test.ts` 时选择普通计划。其他任何路径均全量,包括源码、共享测试/helper、package/lock/构建脚本、工作流、README、支持规范与兼容库存。重命名/复制、未知状态、空或不完整差异、异常/有未提交变更的检出也全量。PR 比较真实事件 base/head 并核对合并父提交,push 比较 before/after;缺少提交证据回退全量。
|
|
132
|
+
|
|
133
|
+
手动运行、未知事件、每次发布及 UTC 周一 00:00 的定时检查固定 full。所有计划保留七版 CLI/smoke;full 运行七版完整 browser 和 `0.2.1-alpha.2` 独立真实负向任务,ordinary 不运行真实旧宿主负向。普通 browser 固定如下:
|
|
134
|
+
|
|
135
|
+
| 精确 DSH 版本 | 普通 browser 选择 |
|
|
136
|
+
| --------------- | ----------------- |
|
|
137
|
+
| `0.2.1-alpha.3` | `browser` |
|
|
138
|
+
| `0.2.1-alpha.4` | `host-release` |
|
|
139
|
+
| `0.2.1-alpha.5` | `host-release` |
|
|
140
|
+
| `0.2.1-rc.1` | `rc-bootstrap` |
|
|
141
|
+
| `0.2.1-rc.2` | `browser` |
|
|
142
|
+
| `0.2.1-rc.3` | `browser` |
|
|
143
|
+
| `0.2.1-rc.4` | `browser` |
|
|
144
|
+
|
|
145
|
+
共享工作流先验证精确矩阵。full 聚合要求 validate、cli-smoke、browser、retired-rejection 全部成功;ordinary 仅接受 retired-rejection 的预定 skipped,其余必须成功。未知 plan、缺失结果、失败/取消或其他 skip 均拒绝。`CI Verify` 还要求 plan/producer 成功,发布固定 full 并继承负向门禁。单 checkout 固定端口测试串行;本地并发需独立源码/dist/制品/runtime/profile、可写 node_modules 副本及网络命名空间,复制安装避免共享 HMR inode 变化。
|