dsh-completion-guard 0.10.0 → 0.11.0
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 +30 -1
- package/CHANGELOG.zh-CN.md +30 -1
- package/README.md +4 -2
- package/README.zh-CN.md +4 -2
- package/bin/dsh-completion-guard-activation.mjs +3 -1
- package/bin/dsh-completion-guard-host-lock.mjs +29 -8
- package/dist/domain/index.d.ts +2 -2
- package/dist/domain/index.js +2 -2
- package/dist/{domain-Dqw5NrT-.js → domain-rozEDKXB.js} +4920 -1248
- package/dist/{index-rCqdIg5B.d.ts → index-ClmcMWbM.d.ts} +29 -13
- package/dist/index.d.ts +10 -2
- package/dist/index.js +400 -66
- package/docs/ACTIVATION_MIGRATION.md +14 -10
- package/docs/COMPATIBILITY.md +18 -2
- package/docs/DEPENDENCY_SCAN.md +123 -0
- package/docs/GETTING_STARTED.md +9 -9
- package/docs/HOST_LOCK_UPGRADE.md +18 -8
- package/docs/LOCAL_ACCEPTANCE.md +8 -0
- package/docs/PRIVACY.md +15 -1
- package/docs/README.md +1 -1
- package/docs/THIRD_PARTY_LICENSES.md +29 -1
- package/docs/UI_PERFORMANCE.md +75 -0
- package/manifests/desktop-distribution.v1.json +40 -1
- package/manifests/rc021-rc3-byte-audit.json +989 -0
- package/manifests/supported-host.v1.json +268 -13
- package/package.json +42 -38
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Measure session switching on isolated rc.2/rc.3 frontends
|
|
2
|
+
|
|
3
|
+
This is repository operator tooling. Run these scripts from the accepted source checkout; they are not commands supplied by the npm plugin. The browser and DSH host must belong to the same disposable acceptance batch. Do not point the driver at your daily browser/profile.
|
|
4
|
+
|
|
5
|
+
Create a new fixture HOME and manifest before initializing its Web profile:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
node scripts/create-ui-session-fixture.mjs --home <unused-task-home> \
|
|
9
|
+
--frontend-url http://127.0.0.1:<assigned-port>/ \
|
|
10
|
+
--source-commit <full-accepted-commit> --artifact-sha256 <accepted-tgz-sha256> \
|
|
11
|
+
--output <new-fixture.json> --host-version 0.2.1-rc.3 \
|
|
12
|
+
--prelude-turns 100 --distribution tool --output-bytes 4096
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The producer creates a task-owned plan with two independent session IDs and unique history markers; it refuses existing HOME/output paths. It deliberately leaves session creation to the loaded host. `prelude-turns` accepts 0–10000; `distribution roots` creates independent root requests, while `distribution tool` adds three synthetic tool round trips per prelude turn with one output of `output-bytes` (0–1048576). These are persisted frames; no command is executed. The final marker adds one turn. Each completed history records actual event count, serialized event bytes, root input count/density and tool-result count. Preserve the manifest and producer hash.
|
|
16
|
+
The versioned preparation entrypoint installs the supplied canonical tgz through the official managed CLI, checks its embedded source/version, runs inspect → inject → dump → verify-dump from the installed Guard, and can keep the isolated Web host running. `verify-dump` validates only Guard host-lock fields, not the complete YAML syntax or other plugin entries; the preparation also parses the complete composed configuration through the official boot API before starting a host:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
node scripts/prepare-ui-session-fixture.mjs --fixture <fixture.json> \
|
|
20
|
+
--runtime-root <managed-runtime-root> --artifact <accepted.tgz> \
|
|
21
|
+
--artifact-record <release-artifact.json> --output <new-preflight.json> --preflight
|
|
22
|
+
node scripts/prepare-ui-session-fixture.mjs --fixture <fixture.json> \
|
|
23
|
+
--runtime-root <managed-runtime-root> --artifact <accepted.tgz> \
|
|
24
|
+
--artifact-record <release-artifact.json> --output <new-preparation.json> --serve
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use distinct new result paths. Preflight reads the canonical artifact identity and probes a child in that invocation; it does not install or start a host. The actual run uses this fixture's `DSH_HOME/sessions` and `profiles/web`, strips ambient credential environment layers, binds HOME and platform user directories to the task, disables title/account/other-provider routes after checking the actual composed config, disables telemetry/background Goal driving, and points the inert model route at a closed loopback endpoint. Only anonymous HTTP(S) proxies with explicit loopback ports may enter from the invocation environment; credentials, non-loopback routes and conflicting uppercase/lowercase aliases are refused. Proxy variables are canonicalized and NO_PROXY is limited to loopback. No proxy port is discovered and TLS remains enabled. It does not send a model request. After Guard loads, the fixture plugin uses the official AgentRegistry to create both sessions, requires actual `fresh_creation` / `always` bindings and the registered Guard tool, writes history, flushes, disposes the seed agents, and reopens each official persistence reader to verify its ID and marker. It exports `<new-preparation.json>.protected-fixture.json`. The `.ready.json` records these checks; the driver still verifies rendered identities and the live agent after official UI promotion through the task-owned read-only observer. A missing or inactive Guard fails the run rather than measuring a mode-unknown path. Preserve the private host log. Signal the preparation process after measurement; it stops only its owned process tree, reports cleanup failure, and preserves the HOME/results. This preparation record does not replace the repository's native-acceptance/v2 install/no-op/parity/lifecycle annex.
|
|
28
|
+
|
|
29
|
+
Start a task-owned browser with an explicit loopback CDP endpoint through the native platform's supported launcher. Do not disable its sandbox. The browser owner retains its PID/profile and stops it after measurement. These startup/installation operations remain native steps and do not become passing facts because fixture creation succeeded. Never reuse a daily host, hard-code its port, repack the artifact, or send messages to seed markers.
|
|
30
|
+
|
|
31
|
+
Then run:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
node scripts/measure-session-switch.mjs --fixture <new-preparation.json>.protected-fixture.json \
|
|
35
|
+
--web-preparation <new-preparation.json>.ready.json \
|
|
36
|
+
--cdp-url http://127.0.0.1:<browser-debug-port>/ \
|
|
37
|
+
--output <new-measurement.json> --switches 100
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For Web, `--web-preparation` must name this live run’s ready receipt. The driver verifies the receipt against the fixture and owned process, reads the unique same-origin startup URL from the private run log, and uses the official token-to-cookie exchange. The driver reads the startup URL from the private host log into memory and does not copy it into measurement reports; the original startup log remains private. Measurement reports retain only the clean frontend URL and receipt hash. Authentication stays enabled. After an observer restart, supply `<new-observer-run.json>.ready.json`, rather than the seed run’s ready receipt. Desktop does not use this option.
|
|
41
|
+
|
|
42
|
+
The driver creates one browser tab and closes it on success, failure or handled interruption. Web uses a fixed 1440×1000 CDP viewport and records the actual dimensions; Desktop retains and records its native window dimensions. Before the first timed session open, it acknowledges only the reviewed official preview notice through its Continue button, opens the sidebar if needed, and expands the fixture’s Ungrouped row through pointer events. It waits for the exact two session IDs and expanded state; unknown dialogs, duplicate controls and failed transitions fail closed. Readiness actions and epochs are reported separately. An outer host-launch-to-completion measurement includes this preparation time; it is not subtracted from startup latency. It never starts or stops the browser/DSH host. It clicks the official session tree rows (`data-row-key`, `aria-selected`), reads visible history inside `data-chat-flow`, waits for the reviewed loading hint to disappear, and inserts a probe through browser input events into the official `data-composer-input` editor. The fixture must have empty drafts; the probe is removed and the empty draft read back before a sample is accepted. Overall interactivity ends at successful input readback; draft cleanup time is recorded separately. Loading appearance/disappearance and observed duration are separate fields, or null when no indicator appeared. No Enter/send action occurs. The other history's unique marker is a negative control. A missing session row must be refused without changing the active session. Unknown layouts/identity, load errors, unobservable input, failed controls, timeouts and too few samples fail nonzero. Failed runs retain a result; they are not timing passes.
|
|
43
|
+
|
|
44
|
+
The public attributes and loading/error classes are bound to the reviewed rc.2 and rc.3 workspace, chat and conversation frontend components. Their relevant DOM components/selectors were compared before sharing this adapter; other versions are refused. An unknown new layout requires an explicit adapter review, not a guessed successful field. Protocol/control unit tests are not rendered frontend or native evidence: a real browser smoke run is still required for each applicable host.
|
|
45
|
+
|
|
46
|
+
For formal performance acceptance, retain the agreed same-host baseline/candidate inputs, fixed A/A noise, paired/interleaved order, at least 30 cold and 100 warm samples per required cell, P50/P95, one-sided 95% bounds, lifecycle/RSS checks, and actual history scales. `--switches` only collects one warm tab's sequence; it does not label samples cold or run those statistical gates. The native owner must stop its own host/browser before removing the owned HOME and report cleanup separately. Desktop GUI acceptance requires its supported isolated carrier/CDP route; a Web result does not certify Desktop.
|
|
47
|
+
|
|
48
|
+
For the 0.11.0 comparison, use isolated rc.2 hosts for the paired 0.10.0/candidate regression cells: the public 0.10.0 baseline does not qualify rc.3 Desktop. Run rc.3 GUI, latency and lifecycle acceptance separately and retain that missing valid baseline boundary. Do not weaken baseline admission, downgrade daily hosts, or call the separate rc.3 timings a paired regression pass.
|
|
49
|
+
|
|
50
|
+
The driver also exports `initialOpen`, separate from its warm sequence: the first click's epoch, click-to-input-readback time, input completion epoch, loading observations and whether that target was already live before selection. It never labels this record cold. For a cold run, create and persist the fixture in a separate seed process, stop that process, and start a new observer-only host. Require `initialOpen.preClickTargetLive === false` and the outer launcher's fresh-process evidence; use the recorded completion epoch with the launch epoch for startup-inclusive timing. Do not seed, append, promote, or read the target's full history in that cold process before the GUI opens it.
|
|
51
|
+
|
|
52
|
+
For Web, reuse the original plan and exact seed receipt in a new preparation run:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
node scripts/prepare-ui-session-fixture.mjs --fixture <original-plan.json> \
|
|
56
|
+
--runtime-root <managed-runtime-root> --artifact <accepted.tgz> \
|
|
57
|
+
--artifact-record <release-artifact.json> --output <new-observer-run.json> \
|
|
58
|
+
--mode observe --seed-fixture <seed-preparation.json>.protected-fixture.json \
|
|
59
|
+
--seed-sha256 <sha256-of-that-protected-fixture> --serve
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This mode skips installation and injection, rechecks the installed identity, and supplies the probe's explicit `mode: observe`. The probe verifies nonce, source/artifact, HOME/profile, host version, producer/probe bytes and existing fresh-creation bindings; it refuses already-live fixture agents. It registers only the read-only live observer, without creating, appending, promoting or reading either session history. It writes a new observer-ready receipt and preserves the seed receipt. Unknown modes and changed/missing identities or bindings fail closed. Actual process isolation, cold state and restoration remain native observations.
|
|
63
|
+
|
|
64
|
+
For Desktop, create the plan with `--surface desktop --frontend-url dsh-app://app/`. The Web preparation command does not prepare or launch Desktop. The native acceptance owner supplies a qualified isolated Desktop profile with the same frozen artifact, `activation: always`, and the `scripts/ui-session-host-fixture.mjs` plugin. Its config binds `fixturePath`, `runtimeRoot` (`app.asar/dsh`), the installed injected `guardConfig`, and a new `output` seed receipt. After the separate seed process stops, use explicit `mode: observe`, that same `output`, `seedReceiptSha256`, and a distinct new `runOutput`. The probe checks the physical Desktop carrier lock separately from its SDK namespace. The existing versioned Desktop install/no-op/lock workflow remains the preparation contract; a handwritten profile or fabricated anchors are not equivalent.
|
|
65
|
+
|
|
66
|
+
The native launcher must use a task-owned `DSH_HOME`, a new `<fixture-home>/desktop-user-data`, the official signed executable and a dedicated loopback CDP endpoint. It must bind actual process ownership and the main renderer before writing a `dsh-ui-desktop-owner/v1` receipt with `fixtureNonce`, `sourceCommit`, `hostVersion`, absolute `home` and `userDataDir`, exact `cdpUrl`, `rendererUrl: "dsh-app://app/"`, `targetId`, `processId` and `carrierSha256`. Keep that native launch evidence with the receipt. The driver validates the receipt's identity fields; it does not claim those declarations independently prove the launcher/process arguments.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
node scripts/measure-session-switch.mjs --fixture <desktop-protected-fixture.json> \
|
|
70
|
+
--cdp-url http://127.0.0.1:<owned-desktop-debug-port> \
|
|
71
|
+
--desktop-ownership <native-owner-receipt.json> \
|
|
72
|
+
--output <new-desktop-measurement.json> --switches 100
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The Desktop driver attaches only to that existing `dsh-app://app/` main renderer, verifies its exact URL and detaches afterwards. It never creates or closes a Desktop window. A new file tab cannot use the application's main-frame IPC and is refused. Custom-protocol URLs are compared explicitly; their `null` URL origins are never treated as equal. The task-owned live observer uses the application's actual protocol handler to reach its registered read-only backend route. The native owner handles any welcome-screen transition through the official UI, verifies that fixture targets were not preopened, and stops only its isolated process tree after measurement. Unit transport controls establish neither a rendered Desktop pass nor native cleanup.
|
|
@@ -12,7 +12,15 @@
|
|
|
12
12
|
"rewriteRelativeImportExtensions": true,
|
|
13
13
|
"verbatimModuleSyntax": false
|
|
14
14
|
},
|
|
15
|
-
"scope": "Exact Desktop distribution supplements only; these are not registry package inventories. The declared Desktop build commit is an opaque signed identity, not a claim that it equals the public source pin."
|
|
15
|
+
"scope": "Exact Desktop distribution supplements only; these are not registry package inventories. The declared Desktop build commit is an opaque signed identity, not a claim that it equals the public source pin.",
|
|
16
|
+
"rc3Acquisition": {
|
|
17
|
+
"observedDate": "2026-10-25",
|
|
18
|
+
"method": "official CDN zip downloaded, SHA-512 recorded, codesign --verify --deep --strict passed (TeamIdentifier NAN929V4UM, identifier com.deepseek.dsh), ASAR header recomputed and matched the independently verified local install header, desktop manifest and desktop-runtime.json extracted from the archive",
|
|
19
|
+
"zipSha256": "599a3ceef4d58f2b82bfd61ca4ef9d55c0f8e055dde60550c92f00d78d0cad2f",
|
|
20
|
+
"asarHeaderSha256": "84140c5d09050010753077cde3c8e35fc2e050054f1ed69f761fae8b6fdd4b95",
|
|
21
|
+
"invariantCompanions": "none present in the rc.3 distribution ASAR; `files` remains the rc.2-only supplement set and is consumed only by the rc.2 rows",
|
|
22
|
+
"windows": "Windows installed carrier and retained official installer Authenticode Valid; signed ElectronAsar/Integrity equals measured header; root/runtime manifests and metadata match signed header integrity; retained installer size and SHA-512 equal official win-x64 nightly updater metadata (2026-10-26). Native Guard install/no-op/lifecycle acceptance is separate."
|
|
23
|
+
}
|
|
16
24
|
},
|
|
17
25
|
"files": [
|
|
18
26
|
{
|
|
@@ -119,6 +127,37 @@
|
|
|
119
127
|
"releaseUrl": "https://download.deepseek.com/dsh-desk/bin/win-x64/deepseek-harness-0.2.1-rc.2-win-x64.exe",
|
|
120
128
|
"releaseSha512": "39POl5osl9PKMqrPXQA52dh/bCV0Z02vOV9cTjOJDHE6gsJwp5bv7lfgB3mVWAKspX7a/w1iTi+8Listdhq45g==",
|
|
121
129
|
"vendorPublisher": "Hangzhou DeepSeek Artificial Intelligence Co., Ltd."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "desktop-0.2.1-rc.3-darwin-arm64",
|
|
133
|
+
"platform": "darwin",
|
|
134
|
+
"arch": "arm64",
|
|
135
|
+
"version": "0.2.1-rc.3",
|
|
136
|
+
"runtimeVersion": "0.2.1-rc.3",
|
|
137
|
+
"pnpmVersion": "11.28.5",
|
|
138
|
+
"asarHeaderSha256": "84140c5d09050010753077cde3c8e35fc2e050054f1ed69f761fae8b6fdd4b95",
|
|
139
|
+
"desktopManifestSha256": "ac5d5922a061519322befb742e8b8285197d6ca975a2a38e8049ef37c67e63d2",
|
|
140
|
+
"buildCommit": "be72761ee1a6736ebcdf4f3739363b083ae53c98",
|
|
141
|
+
"buildDirty": false,
|
|
142
|
+
"releaseUrl": "https://download.deepseek.com/dsh-desk/bin/mac-arm64/deepseek-harness-0.2.1-rc.3-mac-arm64.zip",
|
|
143
|
+
"releaseSha512": "0tCeP/zLGLtsH+S4BD4TIyRJ8TwRhh7xaJprTMOUoEfj7hYJFC3G5l6nl/2zCTS41MeE9k+KRN19RE9sqX6goQ==",
|
|
144
|
+
"vendorTeam": "NAN929V4UM",
|
|
145
|
+
"vendorIdentifier": "com.deepseek.dsh"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "desktop-0.2.1-rc.3-win32-x64",
|
|
149
|
+
"platform": "win32",
|
|
150
|
+
"arch": "x64",
|
|
151
|
+
"version": "0.2.1-rc.3",
|
|
152
|
+
"runtimeVersion": "0.2.1-rc.3",
|
|
153
|
+
"pnpmVersion": "11.28.5",
|
|
154
|
+
"asarHeaderSha256": "c30a30589e62c5c571f73c27ca22b94bb0d931815f2a2e122ae1c7dc904ab594",
|
|
155
|
+
"desktopManifestSha256": "ac5d5922a061519322befb742e8b8285197d6ca975a2a38e8049ef37c67e63d2",
|
|
156
|
+
"buildCommit": "be72761ee1a6736ebcdf4f3739363b083ae53c98",
|
|
157
|
+
"buildDirty": false,
|
|
158
|
+
"releaseUrl": "https://download.deepseek.com/dsh-desk/bin/win-x64/deepseek-harness-0.2.1-rc.3-win-x64.exe",
|
|
159
|
+
"releaseSha512": "q5IGr2Bf+TvvCpagHj49Ypn/ZrqR7kqrYpLjqXP7VfDINmddlqZQmG+YfsdL3q3EdTRMRlKz/a3jDAEzdNdDOw==",
|
|
160
|
+
"vendorPublisher": "Hangzhou DeepSeek Artificial Intelligence Co., Ltd."
|
|
122
161
|
}
|
|
123
162
|
]
|
|
124
163
|
}
|