dsh-github-copilot 0.4.0-alpha.38 → 0.4.0-alpha.40

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/AGENTS.md CHANGED
@@ -29,7 +29,7 @@ Use native DSH tools for goals, background jobs and scoped subagents. Use local
29
29
 
30
30
  ## Product and architecture
31
31
 
32
- `dsh-github-copilot` currently admits and targets only official DSH and Windows Desktop `0.2.0-rc.1`. Nine earlier DSH pins remain in `deployment-baseline.json` as historical evidence, not current support or CI release gates. It does not own a general Copilot chat adapter. DSH's built-in `llm-pi-ai` mount owns the GitHub Copilot provider, catalog, OAuth method and grant format, token exchange, refresh, and normal model transport.
32
+ `dsh-github-copilot` currently admits and targets only official DSH and Windows Desktop `0.2.0-rc.2`. Ten earlier DSH pins remain in `deployment-baseline.json` as historical evidence, not current support or CI release gates. It does not own a general Copilot chat adapter. DSH's built-in `llm-pi-ai` mount owns the GitHub Copilot provider, catalog, OAuth method and grant format, token exchange, refresh, and normal model transport.
33
33
 
34
34
  This repository owns eleven narrow surfaces:
35
35
 
@@ -127,12 +127,13 @@ The retained upstream baselines and current qualification target are:
127
127
  - Official tag `dsh-v0.1.6-alpha.1`, commit `0a15e36e7f82b6ed45af6fa9759f29b40dcd965d`.
128
128
  - Official tag `dsh-v0.1.6-alpha.2`, commit `ddefc45fbc7f8e46dd73185e68295696d1297887`.
129
129
  - Official tag `dsh-v0.2.0-rc.1`, commit `4878cdabd87d4041bdaff61d04c966883b9fd07a`; the independently verified Windows Desktop feed also identifies `0.2.0-rc.1`.
130
+ - Official tag `dsh-v0.2.0-rc.2`, commit `639ed015397290b3745d163aafe02ffee4aa3f84`; the signed installed Windows Desktop descriptor identifies the rc.2 shared peer graph.
130
131
 
131
- The release admission, development dependency and CI targets are exact official `0.2.0-rc.1`; the other nine pins remain historical evidence only. CI runs the unchanged tagged-source runtime fixture and an isolated exact published-npm-artifact fixture for `0.2.0-rc.1` on Windows and Linux. The current fixture must await serialized `agent/created`, avoid new synchronous Session-history reads, and verify MCP resource cursors, PTC/workflow names, cancellable Sandbox/Shell preparation, optional-plugin startup policy, attachment cache separation, durable `IMAGE_OFFLOAD_REQUIRED` projection/retry and Team pagination without taking ownership of those services. Compatibility metadata and synthetic tests do not prove live endpoints, a materialized Desktop package set, installed Desktop bytes, release publication or loaded runtime state. Public Host, Client and Remote seams remain available; this baseline update does not authorize implementation rewrites.
132
+ The release admission, development dependency and CI targets are exact official `0.2.0-rc.2`; the other ten pins remain historical evidence only. CI runs the unchanged tagged-source runtime fixture and an isolated exact published-npm-artifact fixture for `0.2.0-rc.2` on Windows and Linux. The current fixture must await serialized `agent/created`, avoid new synchronous Session-history reads, and verify MCP resource cursors, PTC/workflow names, cancellable Sandbox/Shell preparation, optional-plugin startup policy, attachment cache separation, durable `IMAGE_OFFLOAD_REQUIRED` projection/retry and Team pagination without taking ownership of those services. Signed installed Desktop package-set evidence proves peer ownership only; neither it nor synthetic tests prove live endpoints, plugin activation, publication or loaded runtime state. Public Host, Client and Remote seams remain available; this baseline update does not authorize Core implementation rewrites.
132
133
 
133
134
  These pins document compatibility evidence. They do not authorize creating another controlled Core patch or making one a prerequisite for new plugin fixes.
134
135
 
135
- - Models UI: `0.1.2-rc.1`, `0.1.3-alpha.1`, `0.1.5-alpha.1`, `0.1.5-alpha.2`, `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`, `0.1.6-alpha.2` and `0.2.0-rc.1` expose `settings.models.provider-card`, keyed by settings namespace `llm-pi-ai`, to embed login/status/Refresh/Manage in a mounted configured canonical `github-copilot` row and suppress the separate footer controller. With no such row mounted, retain footer fallback; rc.2 uses a dedicated `settings.section`. Preserve the shared account-state owner across transfer only while another eligible surface remains mounted. Unmounting the last surface or replacing declarations without overlapping mounts stops polling; a later controller reads status and separately non-forcing ensures missing/idle/stale/error/loading signed-in metadata, without replaying the old forced-login action. Manual Refresh models lives inside Manage; errors expose Retry. Opening Models is no longer guaranteed network-free, but status/details themselves remain pure. This additive slot cannot replace Core Edit/Delete: retain the native editor, while normal plugin discovery needs no manual model definitions. UI integration must not merge/remove actual canonical and `github-copilot-preview` routes or rewrite credentials, configuration, history or selection.
136
+ - Models UI: `0.1.2-rc.1`, `0.1.3-alpha.1`, `0.1.5-alpha.1`, `0.1.5-alpha.2`, `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`, `0.1.6-alpha.2`, `0.2.0-rc.1` and `0.2.0-rc.2` expose `settings.models.provider-card`, keyed by settings namespace `llm-pi-ai`, to embed login/status/Refresh/Manage in a mounted configured canonical `github-copilot` row and suppress the separate footer controller. With no such row mounted, retain footer fallback; historical 0.1.1-rc.2 uses a dedicated `settings.section`. Preserve the shared account-state owner across transfer only while another eligible surface remains mounted. Unmounting the last surface or replacing declarations without overlapping mounts stops polling; a later controller reads status and separately non-forcing ensures missing/idle/stale/error/loading signed-in metadata, without replaying the old forced-login action. Manual Refresh models lives inside Manage; errors expose Retry. Opening Models is no longer guaranteed network-free, but status/details themselves remain pure. This additive slot cannot replace Core Edit/Delete: retain the native editor, while normal plugin discovery needs no manual model definitions. UI integration must not merge/remove actual canonical and `github-copilot-preview` routes or rewrite credentials, configuration, history or selection.
136
137
  - Authorization flow key: `llm-pi-ai/github-copilot`.
137
138
  - Authorization verification links recognize the public `window.dshDesktop.protocolVersion === 1` marker and use `_self` so Desktop's existing `will-navigate` handler opens the system browser without popup creation. Other hosts retain `_blank`; display a selectable manual URL in both cases. This does not confirm browser launch or OAuth success. Manage omits the compatibility disclosure but retains actionable legacy diagnostics and explicit repair; migration documentation and backend ownership are unchanged.
138
139
  - Authorization service: rc.1 Core provides it; the rc.2 web/headless profiles rely on this package's runtime dependency and conditional bootstrap.
@@ -204,7 +205,7 @@ Then run `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.
204
205
 
205
206
  `pnpm verify` checks the Agent contract, source and local test types, baseline markers, a clean build, Vitest tests, Node tooling tests, and real built Host import/Client-loader/Remote smoke. `tests/fixtures` are intentionally excluded from local test typecheck because they import source from a separate pinned Core checkout. The checked-in code must pass; never suppress compiler errors or weaken a test to get a green report.
206
207
 
207
- The release CI matrix targets only exact official `0.2.0-rc.1` on Windows and Linux; earlier pins are not support gates. It runs the unchanged tagged-source runtime fixture, optional native Chat fixture, and exact published-artifact adapter fixture. This is a required gate, not evidence that a candidate qualification has executed. `verify:upstream` is static seam-marker evidence. `verify:controlled-core` exclusively installs a temporary config fixture, refuses an existing target, and removes only its own file; it is not full plugin activation. Published-artifact synthetic adapter fixtures do not prove live provider transport. The release job must wait for the complete reusable CI matrix on the tagged revision, then verify its own packed bytes before publishing.
208
+ The release CI matrix targets only exact official `0.2.0-rc.2` on Windows and Linux; earlier pins are not support gates. It runs the unchanged tagged-source runtime fixture, optional native Chat fixture, and exact published-artifact adapter fixture. This is a required gate, not evidence that a candidate qualification has executed. `verify:upstream` is static seam-marker evidence. `verify:controlled-core` exclusively installs a temporary config fixture, refuses an existing target, and removes only its own file; it is not full plugin activation. Published-artifact synthetic adapter fixtures do not prove live provider transport. The release job must wait for the complete reusable CI matrix on the tagged revision, then verify its own packed bytes before publishing.
208
209
 
209
210
  ### Evidence and side effects
210
211
 
package/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  # Changelog
2
2
 
3
- ## 0.4.0-alpha.38 (prepared)
3
+ ## 0.4.0-alpha.40 (prepared)
4
+
5
+ - Sanitize authorization failures into allowlisted begin-stage and post-auth route-repair diagnostics in the existing Remote error field; unknown or legacy arbitrary errors remain generic.
6
+ - Stop retaining or logging raw authorization errors, including message, URL, response body, token, device code, and nested cause content; render safe stage-specific next steps.
7
+ - Add regressions for cancellation, successful authorization, route-repair failure, nested causes, secret-bearing errors, arbitrary thrown values, and backward-compatible generic Client behavior (#172).
8
+ - Diagnostics identify only where the flow failed; they do not explain or resolve the underlying OAuth failure.
9
+
10
+ ## 0.4.0-alpha.39 (prepared)
11
+
12
+ - Qualify the exact official DSH and signed Windows Desktop `0.2.0-rc.2` peer graph; retain rc.1 as historical evidence.
13
+ - Align the managed native adapter with pi-ai `0.87.1` transcript contexts and preserve truthful estimated input admission.
14
+ - Compose ordered bundle patch arrays in the read-only installation preflight through the public rc.2 API, with malformed/ordering regressions.
15
+
16
+ ## 0.4.0-alpha.38
4
17
 
5
18
  - Add official DSH `0.2.0-rc.1` as the current exact compatibility target while retaining the existing baseline pins; use the corresponding public Core packages in development and tagged-source CI.
6
19
  - Adapt plugin settings reads/listeners to the current public `SettingsForms` descriptor/event API while retaining legacy Core compatibility. Materialize volatile pi-ai provider profiles through their public getter.
package/README.md CHANGED
@@ -22,9 +22,10 @@ A focused DSH companion for GitHub Copilot sign-in, account-aware model profiles
22
22
  | Official DSH `0.1.5-rc.2` | Tag commit [`fb2c4b9`](https://github.com/deepseek-ai/deepseek-harness/commit/fb2c4b9e698e30edb738bca4cf0618587db7d203) | **Settings → Models** provider card |
23
23
  | Official DSH `0.1.6-alpha.1` | Tag commit [`0a15e36`](https://github.com/deepseek-ai/deepseek-harness/commit/0a15e36e7f82b6ed45af6fa9759f29b40dcd965d) | **Settings → Models** provider card |
24
24
  | Official DSH `0.1.6-alpha.2` | Tag `dsh-v0.1.6-alpha.2`, commit [`ddefc45`](https://github.com/deepseek-ai/deepseek-harness/commit/ddefc45fbc7f8e46dd73185e68295696d1297887) | **Settings → Models** provider card |
25
- | Official DSH and Windows Desktop `0.2.0-rc.1` (current qualification target) | Tag `dsh-v0.2.0-rc.1`, commit [`4878cd`](https://github.com/deepseek-ai/deepseek-harness/commit/4878cdabd87d4041bdaff61d04c966883b9fd07a) | **Settings → Models** provider card |
25
+ | Official DSH `0.2.0-rc.1` (historical) | Tag `dsh-v0.2.0-rc.1`, commit [`4878cd`](https://github.com/deepseek-ai/deepseek-harness/commit/4878cdabd87d4041bdaff61d04c966883b9fd07a) | **Settings → Models** provider card |
26
+ | Official DSH and Windows Desktop `0.2.0-rc.2` (current qualification target) | Tag `dsh-v0.2.0-rc.2`, commit [`639ed0`](https://github.com/deepseek-ai/deepseek-harness/commit/639ed015397290b3745d163aafe02ffee4aa3f84) | **Settings → Models** provider card |
26
27
 
27
- The table preserves historical source pins; this release admits and gates **only `0.2.0-rc.1`**. The prior pins are not current support claims. The published-artifact synthetic transport fixture and development dependencies target the exact `0.2.0-rc.1` npm artifacts. Its unchanged tagged-source fixture runs without building or patching Core. These checks do not establish live endpoint, installed Desktop package-set, or loaded-runtime proof. Existing public Host, Client, and Remote seams are retained. Stock Core model-entry `api` support is not a prerequisite for the plugin-owned route. The exact peer and `engines.dsh` declarations are admission checks, not live compatibility proof. No Core patch is installed by this plugin.
28
+ The table preserves historical source pins; this release admits and gates **only `0.2.0-rc.2`**. The prior pins are not current support claims. The published-artifact synthetic transport fixture and development dependencies target exact `0.2.0-rc.2` npm artifacts. Its unchanged tagged-source fixture runs without building or patching Core. The signed Desktop shared-package descriptor was audited for peer ownership, not plugin loading or live endpoints. Existing public Host, Client, and Remote seams are retained. Stock Core model-entry `api` support is not a prerequisite for the plugin-owned route. Exact peer and `engines.dsh` declarations are admission checks, not live compatibility proof. No Core patch is installed by this plugin.
28
29
 
29
30
  ### Alpha.11 compatibility correction (#105)
30
31
 
@@ -62,7 +63,11 @@ Source markers, local rc.1-backed focused tests and fifteen scoped exact-source
62
63
 
63
64
  ### Alpha.26 official DSH 0.2.0-rc.1 adaptation
64
65
 
65
- The current source target is official tag `dsh-v0.2.0-rc.1`, commit `4878cdabd87d4041bdaff61d04c966883b9fd07a`; the independently verified Windows Desktop release feed also reports `0.2.0-rc.1` (SHA-512 `hPdqeajEHTXYEUOkOX7q1FflGU9jyOkRVDNSPxIDWhNihWjiVal0gtuT5zvtBRlX29VhqfHL31q4owGNp4ee6A==`). Development dependencies, peer admission and CI target exactly this release; earlier pins are historical evidence only. The unchanged-source runtime fixture covers the plugin's OAuth credential seam, account-owned model discovery and native adapter, reasoning/streaming/tool behavior, Web search, Remote codecs, Session context and strict schema compatibility; the published npm fixture independently checks package/class identity and synthetic transport. Prior Desktop package graphs are retained only for dependency-ownership audit and do not validate the 0.2.0 Desktop package set. Current package-set materialization, Electron loading, live sign-in and profile upgrade are **not** claimed by these tests.
66
+ The historical source target was official tag `dsh-v0.2.0-rc.1`, commit `4878cdabd87d4041bdaff61d04c966883b9fd07a`; the independently verified Windows Desktop release feed also reported `0.2.0-rc.1` (SHA-512 `hPdqeajEHTXYEUOkOX7q1FflGU9jyOkRVDNSPxIDWhNihWjiVal0gtuT5zvtBRlX29VhqfHL31q4owGNp4ee6A==`). Its unchanged-source runtime fixture covered the plugin's OAuth credential seam, account-owned model discovery and native adapter, reasoning/streaming/tool behavior, Web search, Remote codecs, Session context and strict schema compatibility; the published npm fixture independently checked package/class identity and synthetic transport. Those tests did not validate the 0.2.0 Desktop package set, Electron loading, live sign-in or profile upgrade.
67
+
68
+ ### Alpha.39 official DSH 0.2.0-rc.2 adaptation (#170)
69
+
70
+ Official tag `dsh-v0.2.0-rc.2` at `639ed015397290b3745d163aafe02ffee4aa3f84` is the sole admitted target. Its published adapter now depends on pi-ai `^0.87.1`; this plugin pins `0.87.1`, updates the native transcript-based request estimator and keeps the same public stream instance. The install preflight uses public `bundlePatchPaths` to compose ordered array patches from rc.2 bundles, still rejecting invalid manifests and unsupported routing. Signed Windows Desktop `dsh/desktop-runtime.json` (SHA-256 `29561160fb7825c3968708f5700564f4381a976985fc270ee5dcc42e5a0a3a54`) records 287 shared packages; declared peers match the rc.2 host graph. The [official-first rc.2 review](./docs/official-first-020-rc2.md) records public API decisions and remaining limits. Source, package, and Desktop peer evidence do not prove loaded plugin behavior, Copilot OAuth, or live model calls.
66
71
 
67
72
  Installation does not reconcile stale profile-local copies of DSH host peers. Before an upgrade, inspect the effective dependency resolution against the Desktop's shipped package versions; an older local `@deepseek-ai/dsh-authorization` can shadow the bundled service, fail Core peer validation and disable authorization-dependent account plugins. This package does not remove or replace such files. Use the separate approved Desktop repair procedure and verify effective module resolution before attributing a startup failure to this plugin. See [the 0.2.0 official-first review](./docs/official-first-020-rc1.md).
68
73
 
@@ -80,7 +85,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
80
85
 
81
86
  ## Install and sign in
82
87
 
83
- The commands below target the package version `0.4.0-alpha.38`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
88
+ The commands below target the package version `0.4.0-alpha.40`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
84
89
 
85
90
  Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
86
91
 
@@ -88,15 +93,15 @@ Before installing/updating, unpack the **checksum-verified** archive into a temp
88
93
  node package/scripts/check-search-composition.mjs --profile-dir /absolute/profile --home /absolute/DSH_HOME --install-anchor /absolute/dsh/package.json
89
94
  ```
90
95
 
91
- Include any launcher patch files with repeated `--patch /absolute/file` arguments. Require `supported: true`; otherwise do not install the routing bundle. The preflight rejects custom, disabled, nested or already-isolated web-service layouts, reserved routing collisions, and a nonempty disposable `cordis.yml` root before any mutation. It parses through public Core APIs and never boots plugins, resolves credentials or rewrites configuration. DSH 0.2's normal `composeProfile()` also rewrites that root to `[]`, including on Desktop's resolved-profile path; preserve and resolve any nonempty root before attempting install/startup. **`dsh plugin add` does not automatically run this preflight.** It is a required installer/operator step, not a universal compatibility guarantee. Also check that effective profile dependency resolution does not let a stale profile-local DSH peer shadow the host's bundled `0.2.0-rc.1` service; the plugin installer does not reconcile old host modules.
96
+ Include any launcher patch files with repeated `--patch /absolute/file` arguments. Require `supported: true`; otherwise do not install the routing bundle. The preflight rejects custom, disabled, nested or already-isolated web-service layouts, reserved routing collisions, and a nonempty disposable `cordis.yml` root before any mutation. It parses through public Core APIs and never boots plugins, resolves credentials or rewrites configuration. DSH 0.2's normal `composeProfile()` also rewrites that root to `[]`, including on Desktop's resolved-profile path; preserve and resolve any nonempty root before attempting install/startup. **`dsh plugin add` does not automatically run this preflight.** It is a required installer/operator step, not a universal compatibility guarantee. Also check that effective profile dependency resolution does not let a stale profile-local DSH peer shadow the host's bundled `0.2.0-rc.2` service; the plugin installer does not reconcile old host modules.
92
97
 
93
98
  For a standalone named profile only, the supported CLI command is:
94
99
 
95
100
  ```sh
96
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.38/dsh-github-copilot-0.4.0-alpha.38.tgz
101
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.40/dsh-github-copilot-0.4.0-alpha.40.tgz
97
102
  ```
98
103
 
99
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.38` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
104
+ For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.40` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
100
105
 
101
106
  Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in**, and complete the GitHub device-code flow. Plugin installation changes the selected profile; activation follows that profile's normal reload/restart policy.
102
107
 
@@ -105,7 +110,7 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
105
110
  1. Open **Settings → Models** and find **GitHub Copilot**. Account controls appear in an existing configured canonical `github-copilot` card, suppressing the separate footer controller; otherwise the footer fallback (or old-Core **Settings → GitHub Copilot**) remains usable. An already-signed-in account automatically ensures missing/idle/stale/error/loading metadata once on opening; fresh ready metadata makes no discovery request. No native provider or manual refresh is needed for the normal discovery flow.
106
111
  2. Select **Sign in with GitHub**. The authorization area expands automatically with a prominent one-time code, **Open GitHub verification page**, **Copy code**, and **Cancel sign-in**. No extra **Manage** click is needed. Recognized Desktop v1 hosts use their existing same-window external-navigation handoff to the system browser instead of a popup; web hosts retain a new tab. If nothing opens, select and copy the displayed verification address into your browser. The plugin cannot confirm that the system browser opened.
107
112
  3. Copy the code, open the verification link, and complete authorization in your own GitHub browser session. Copy success/failure is announced accessibly; manual copying remains available. Never paste a GitHub token into DSH.
108
- 4. DSH polls only while authorization is in flight. Successful explicit **Start sign-in** (the **Sign in with GitHub** button), including a UI account switch, forces exactly one bounded discovery after immediate or polled success. The code and verification link clear, the automatic authorization area closes, and the account shows **Signed in** and **Manage**. Manually opened details stay open; cancellation clears the old code and errors remain visible.
113
+ 4. DSH polls only while authorization is in flight. Successful explicit **Start sign-in** (the **Sign in with GitHub** button), including a UI account switch, forces exactly one bounded discovery after immediate or polled success. The code and verification link clear, the automatic authorization area closes, and the account shows **Signed in** and **Manage**. Manually opened details stay open; cancellation clears the old code. Failures show only a safe stage diagnostic: `COPILOT_AUTHORIZATION_BEGIN_FAILED` means authorization did not complete; `COPILOT_ROUTE_REPAIR_FAILED` means authorization completed but local route repair failed. The latter retains authentication and directs you to **Manage → Repair model configuration**. These codes do not explain or resolve the underlying sign-in failure; raw provider details are never displayed or logged.
109
114
  5. Choose an accepted model under **GitHub Copilot** (stable route ID `github-copilot-preview`). Normal opening/use maintains metadata without requiring **Refresh models**. **Manage** contains the optional manual refresh, model details and sign-out. The compatibility disclosure is removed; legacy configuration diagnostics and explicit repair remain available when needed, and the [migration guide](./docs/single-route-migration.md) remains in the documentation. Errors remain visible with **Retry**, including when details are collapsed; neither discovery nor retry changes your current/default model or replays messages.
110
115
 
111
116
  One shared account-state owner survives transfer while another eligible surface remains mounted. Last-surface unmount or nonoverlapping declaration replacement stops polling; a later mount reads status and separately ensures metadata if needed. Status reads and details toggles themselves remain network-free, but opening Models can discover missing/stale signed-in metadata. Background credential/reset notifications clear Client state and read status rather than forcing discovery on every token event; the next open/use ensures metadata.
@@ -158,7 +163,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
158
163
  5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
159
164
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
160
165
 
161
- GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.38`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
166
+ GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.40`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
162
167
 
163
168
  No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
164
169
 
@@ -388,9 +393,9 @@ pnpm verify
388
393
  pnpm pack --pack-destination artifacts
389
394
  ```
390
395
 
391
- Use Node 24 LTS for development and the pinned pnpm version; runtime dependencies require Node >=22.19.0. `pnpm verify` runs the Agent contract check, source and local test typechecking, baseline markers, clean build, Vitest and Node tooling tests, and a real built Host import plus Client/Remote smoke. After packing, run `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz` to verify archive exports, media, allowed contents and equality to that build. CI gates only exact DSH `0.2.0-rc.1` on Windows and Linux, using its unchanged source runtime and published npm artifacts; the nine earlier pins are retained historical evidence, not release gates. Release publication depends on this exact-target matrix. This candidate's CI qualification has not executed; see the alpha.25 and alpha.26 evidence limits above.
396
+ Use Node 24 LTS for development and the pinned pnpm version; runtime dependencies require Node >=22.19.0. `pnpm verify` runs the Agent contract check, source and local test typechecking, baseline markers, clean build, Vitest and Node tooling tests, and a real built Host import plus Client/Remote smoke. After packing, run `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz` to verify archive exports, media, allowed contents and equality to that build. CI gates only exact DSH `0.2.0-rc.2` on Windows and Linux, using its unchanged source runtime and published npm artifacts; the ten earlier pins are retained historical evidence, not release gates. Release publication depends on this exact-target matrix; local tests alone do not establish CI qualification.
392
397
 
393
- For the optional reasoning UI integration, `pnpm verify:reasoning-ui -- <Core checkout>` runs a synthetic native-renderer, Slot registry and history-assembly fixture against a clean pinned `0.2.0-rc.1` checkout with its Chat dependencies installed. It exclusively creates one temporary test file and removes it only if unchanged. This is local integration/static-render evidence, not a live browser or Copilot API test; the CI definition covers only the current target, without implying this candidate's qualification has run.
398
+ For the optional reasoning UI integration, `pnpm verify:reasoning-ui -- <Core checkout>` runs a synthetic native-renderer, Slot registry and history-assembly fixture against a clean pinned `0.2.0-rc.2` checkout with its Chat dependencies installed. It exclusively creates one temporary test file and removes it only if unchanged. This is local integration/static-render evidence, not a live browser or Copilot API test; the CI definition covers only the current target, without implying this candidate's qualification has run.
394
399
 
395
400
  ### Agent-driven development
396
401
 
@@ -422,8 +427,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
422
427
  `package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
423
428
 
424
429
  ```sh
425
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.38/dsh-github-copilot-0.4.0-alpha.38.tgz
426
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.38/SHA256SUMS
430
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.40/dsh-github-copilot-0.4.0-alpha.40.tgz
431
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.40/SHA256SUMS
427
432
  sha256sum --check SHA256SUMS
428
433
  ```
429
434
 
@@ -431,7 +436,7 @@ PowerShell can verify the same two downloaded files with:
431
436
 
432
437
  ```powershell
433
438
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
434
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.38.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
439
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.40.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
435
440
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
436
441
  ```
437
442
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  一个聚焦 GitHub Copilot 登录、通用账号模型发现、Copilot 专用 Tool 兼容与供应方托管搜索的 DSH companion。插件根据供应方返回的端点和能力元数据组装模型,复用公开的 `@deepseek-ai/dsh-llm-pi-ai` adapter 与 pi-ai SDK,不另写一套通用传输/序列化器,也不维护需要逐个添加新模型 ID 的静态目录。
11
11
 
12
- > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.38`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.40`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
13
13
 
14
14
  Alpha.24 修复 Web search 卡片缺少精确 Remote 依赖声明的问题。卡片仍位于 **Settings → Models**(`settings.models.footer`,list/root),旧 Core 回退到独立 Web search section,而非 General。搜索子 Fiber 独立等待 routing namespace,不影响账号控件和既有搜索安全检查;实际打包 Desktop 验收仍是独立关卡。
15
15
 
@@ -26,9 +26,10 @@ Alpha.24 修复 Web search 卡片缺少精确 Remote 依赖声明的问题。卡
26
26
  | 官方 DSH `0.1.5-rc.2` | Tag commit [`fb2c4b9`](https://github.com/deepseek-ai/deepseek-harness/commit/fb2c4b9e698e30edb738bca4cf0618587db7d203) | **Settings → Models** provider card |
27
27
  | 官方 DSH `0.1.6-alpha.1` | Tag commit [`0a15e36`](https://github.com/deepseek-ai/deepseek-harness/commit/0a15e36e7f82b6ed45af6fa9759f29b40dcd965d) | **Settings → Models** provider card |
28
28
  | 官方 DSH `0.1.6-alpha.2` | Tag `dsh-v0.1.6-alpha.2`,commit [`ddefc45`](https://github.com/deepseek-ai/deepseek-harness/commit/ddefc45fbc7f8e46dd73185e68295696d1297887) | **Settings → Models** provider card |
29
- | 官方 DSH 与 Windows Desktop `0.2.0-rc.1`(当前待验收目标) | Tag `dsh-v0.2.0-rc.1`,commit [`4878cd`](https://github.com/deepseek-ai/deepseek-harness/commit/4878cdabd87d4041bdaff61d04c966883b9fd07a) | **Settings → Models** provider card |
29
+ | 官方 DSH `0.2.0-rc.1`(历史) | Tag `dsh-v0.2.0-rc.1`,commit [`4878cd`](https://github.com/deepseek-ai/deepseek-harness/commit/4878cdabd87d4041bdaff61d04c966883b9fd07a) | **Settings → Models** provider card |
30
+ | 官方 DSH 与 Windows Desktop `0.2.0-rc.2`(当前待验收目标) | Tag `dsh-v0.2.0-rc.2`,commit [`639ed0`](https://github.com/deepseek-ai/deepseek-harness/commit/639ed015397290b3745d163aafe02ffee4aa3f84) | **Settings → Models** provider card |
30
31
 
31
- 上表保留历史源码 pin;本版本**仅准入并 gate 精确的 `0.2.0-rc.1`**,旧 pin 不代表当前支持。已发布制品的合成 transport fixture 与开发依赖均精确针对 `0.2.0-rc.1` npm 制品。未修改标签源码 fixture 不构建或给 Core 打补丁。这些检查不证明真实端点、已安装 Desktop package-set 或已加载运行时。已有公开 Host、Client 与 Remote 接口保留。精确 peer 与 `engines.dsh` 只声明包准入,不是真实兼容性证明;插件不安装 Core 补丁。
32
+ 上表保留历史源码 pin;本版本**仅准入并 gate 精确的 `0.2.0-rc.2`**,旧 pin 不代表当前支持。已发布制品的合成 transport fixture 与开发依赖均精确针对 `0.2.0-rc.2` npm 制品。未修改标签源码 fixture 不构建或给 Core 打补丁。已审计签名 Desktop 的共享包清单,证明 peer 所有权而非插件已加载或真实端点。已有公开 Host、Client 与 Remote 接口保留。精确 peer 与 `engines.dsh` 只声明包准入,不是真实兼容性证明;插件不安装 Core 补丁。
32
33
 
33
34
  ### Alpha.11 兼容修复(#105)
34
35
 
@@ -64,7 +65,11 @@ Candidate manifest 将 `@deepseek-ai/dsh-authorization` 与 `@deepseek-ai/schema
64
65
 
65
66
  ### Alpha.26 官方 DSH 0.2.0-rc.1 适配
66
67
 
67
- 当前源码目标为官方 tag `dsh-v0.2.0-rc.1`,commit `4878cdabd87d4041bdaff61d04c966883b9fd07a`;独立核实的 Windows Desktop 发布 feed 也报告 `0.2.0-rc.1`(SHA-512 `hPdqeajEHTXYEUOkOX7q1FflGU9jyOkRVDNSPxIDWhNihWjiVal0gtuT5zvtBRlX29VhqfHL31q4owGNp4ee6A==`)。开发依赖、peer 准入与 CI 仅针对此版本,旧 pin 仅作历史证据。未修改源码 fixture 覆盖插件 OAuth 凭据接口、账号模型发现与原生 adapter、reasoning/stream/tool、Web 搜索、Remote codec、Session context 与严格 schema 兼容;另以发布 npm 制品 fixture 验证包/类身份和合成传输。既有 Desktop package graph 仅用于依赖所有权审计,不验证 0.2.0 Desktop package-set。当前 package-set 物化、Electron 加载、真实登录或 profile 升级均**未**由这些测试证明。
68
+ 历史源码目标是官方 tag `dsh-v0.2.0-rc.1`,commit `4878cdabd87d4041bdaff61d04c966883b9fd07a`;独立核实的 Windows Desktop 发布 feed 也报告 `0.2.0-rc.1`(SHA-512 `hPdqeajEHTXYEUOkOX7q1FflGU9jyOkRVDNSPxIDWhNihWjiVal0gtuT5zvtBRlX29VhqfHL31q4owGNp4ee6A==`)。当时未修改源码 fixture 覆盖插件 OAuth 凭据接口、账号模型发现与原生 adapter、reasoning/stream/tool、Web 搜索、Remote codec、Session context 与严格 schema 兼容;另以发布 npm 制品 fixture 验证包/类身份和合成传输。该证据并不证明 Desktop package-set、Electron 加载、真实登录或 profile 升级。
69
+
70
+ ### Alpha.39 官方 DSH 0.2.0-rc.2 适配(#170)
71
+
72
+ 当前仅准入官方 tag `dsh-v0.2.0-rc.2`、commit `639ed015397290b3745d163aafe02ffee4aa3f84`。其公开 adapter 依赖 pi-ai `^0.87.1`;插件精确固定 `0.87.1`,调整原生 transcript 的请求预算估算,保留相同的公开 stream 对象。安装预检通过公开 `bundlePatchPaths` 按原顺序组合 rc.2 bundle 的数组 patch,仍拒绝无效 manifest 和不支持的路由。签名 Windows Desktop 的 `dsh/desktop-runtime.json`(SHA-256 `29561160fb7825c3968708f5700564f4381a976985fc270ee5dcc42e5a0a3a54`)记录 287 个共享包,插件声明的 peer 与 rc.2 Host graph 匹配。参见[官方优先 rc.2 审查](./docs/official-first-020-rc2.md)。源码、制品及 Desktop peer 证据均不等于插件已加载、真实 Copilot OAuth 或模型调用。
68
73
 
69
74
  安装不会协调旧 profile 内的 DSH Host peer 副本。升级前请检查实际依赖解析,确认 Desktop 解析到随附的 Host 模块版本;旧的 profile-local `@deepseek-ai/dsh-authorization` 可能遮蔽随 Desktop 捆绑的服务,因 Core peer 校验失败而禁用 authorization 及其依赖的账号插件。本包不会删除或替换这些文件。请遵循单独获批的 Desktop 修复流程,并先验证实际模块解析,再将启动故障归因于本插件。详见[0.2.0 官方优先审查](./docs/official-first-020-rc1.md)。
70
75
 
@@ -90,15 +95,15 @@ Host 使用现有 canonical OAuth grant 有界读取 GitHub 内部额度端点
90
95
  node package/scripts/check-search-composition.mjs --profile-dir /absolute/profile --home /absolute/DSH_HOME --install-anchor /absolute/dsh/package.json
91
96
  ```
92
97
 
93
- 若启动时还有额外 patch,用重复的 `--patch /absolute/file` 参数一并提供。必须得到 `supported: true` 才继续安装;自定义、已禁用、嵌套、已有隔离映射的 web 服务、路由保留名称冲突或非空的 disposable `cordis.yml` root 都会在修改前拒绝。预检只用 Core 公开解析接口,不启动插件、不读取认证凭据、不改配置。DSH 0.2 的正常 `composeProfile()` 也会把该 root 重写为 `[]`,包括 Desktop 已解析 profile 的启动路径;如 root 非空,必须先保存数据并解决该问题。**`dsh plugin add` 不会自动执行这项预检**;这是安装者必做步骤,不是对任意第三方组合的兼容保证。还应检查实际依赖解析不会让旧 profile-local DSH peer 遮蔽 Desktop 随附的 `0.2.0-rc.1` 服务;插件安装器不会协调旧 Host 模块。
98
+ 若启动时还有额外 patch,用重复的 `--patch /absolute/file` 参数一并提供。必须得到 `supported: true` 才继续安装;自定义、已禁用、嵌套、已有隔离映射的 web 服务、路由保留名称冲突或非空的 disposable `cordis.yml` root 都会在修改前拒绝。预检只用 Core 公开解析接口,不启动插件、不读取认证凭据、不改配置。DSH 0.2 的正常 `composeProfile()` 也会把该 root 重写为 `[]`,包括 Desktop 已解析 profile 的启动路径;如 root 非空,必须先保存数据并解决该问题。**`dsh plugin add` 不会自动执行这项预检**;这是安装者必做步骤,不是对任意第三方组合的兼容保证。还应检查实际依赖解析不会让旧 profile-local DSH peer 遮蔽 Desktop 随附的 `0.2.0-rc.2` 服务;插件安装器不会协调旧 Host 模块。
94
99
 
95
100
  仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
96
101
 
97
102
  ```sh
98
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.38/dsh-github-copilot-0.4.0-alpha.38.tgz
103
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.40/dsh-github-copilot-0.4.0-alpha.40.tgz
99
104
  ```
100
105
 
101
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.38`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
106
+ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.40`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
102
107
 
103
108
  随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
104
109
 
@@ -107,7 +112,7 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
107
112
  1. 打开 **设置 → 模型**,找到 **GitHub Copilot**。账号控件嵌入已有配置的 canonical `github-copilot` 卡片,不另显示页脚控制器;没有此类卡片时仍可用页脚 fallback(旧 Core 使用 **Settings → GitHub Copilot**)。已登录时,页面打开会自动确保缺失/idle/过期/error/loading的模型元数据就绪;新鲜 ready 缓存不发发现请求。正常流程无需添加原生 provider 或手动刷新。
108
113
  2. 点击 **Sign in with GitHub** 后,验证码区域自动展开,提供醒目的一次性验证码、**Open GitHub verification page**、**Copy code** 和 **Cancel sign-in**。不需要再点一次 **Manage**。识别到 Desktop v1 宿主时,通过现有的同窗口外部导航处理交给系统浏览器,不依赖弹出窗口;网页版仍打开新标签页。如果没有打开,可选中并复制界面显示的验证网址到浏览器。插件无法确认系统浏览器是否已打开。
109
114
  3. 复制验证码,打开验证链接,在自己的 GitHub 浏览器会话中完成授权。复制成功/失败均有可访问的反馈;手工复制仍可用。不要把 GitHub token 粘贴到 DSH。
110
- 4. DSH 只在授权进行中轮询。显式 **Start sign-in**(**Sign in with GitHub** 按钮,包括界面切换账号)成功后,无论立即返回还是轮询观察到成功,都只强制执行一次有界发现。验证码和验证链接清除,自动授权区域收起,账号显示 **Signed in、Manage**。手动打开的详情保持展开;取消清除旧验证码,错误仍明确显示。
115
+ 4. DSH 只在授权进行中轮询。显式 **Start sign-in**(**Sign in with GitHub** 按钮,包括界面切换账号)成功后,无论立即返回还是轮询观察到成功,都只强制执行一次有界发现。验证码和验证链接清除,自动授权区域收起,账号显示 **Signed in、Manage**。手动打开的详情保持展开;取消清除旧验证码。失败仅显示安全的阶段诊断:`COPILOT_AUTHORIZATION_BEGIN_FAILED` 表示授权流程未完成;`COPILOT_ROUTE_REPAIR_FAILED` 表示授权已完成但本地路由修复失败。后者会保留认证,并提示前往 **Manage → Repair model configuration**。这些代码不解释或解决底层登录失败,原始 provider 详情不会显示或记录。
111
116
  5. 在 **GitHub Copilot** 分组选择接受的模型(稳定路由 ID 为 `github-copilot-preview`)。正常打开/使用会自动维护元数据,无需手动 **Refresh models**。**Manage** 内保留可选的手动刷新、模型明细与退出登录,移除兼容说明折叠区;需要时仍显示旧配置诊断和显式修复操作,[迁移指南](./docs/single-route-migration.md)继续保留在文档中。错误即使在详情折叠时也会显示并提供 **Retry**;发现或重试均不切换当前/默认模型,也不重放消息。
112
117
 
113
118
  只有另一个符合条件的表面仍挂载时,切换才保留共享账号状态 owner。最后一个表面卸载或声明替换没有挂载重叠时停止轮询;以后挂载会先读状态,再按需另行确保元数据。状态读取和详情切换本身仍不访问网络,但打开 Models 可以发现缺失/过期的已登录账号元数据。后台凭据/reset 通知清除 Client 状态并只读查询,不在每次 token 事件强制发现;下次打开/使用时再确保元数据。
@@ -160,7 +165,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
160
165
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
161
166
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
162
167
 
163
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.38`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
168
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.40`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
164
169
 
165
170
  不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
166
171
 
@@ -399,9 +404,9 @@ pnpm verify
399
404
  pnpm pack --pack-destination artifacts
400
405
  ```
401
406
 
402
- 开发建议使用 Node 24 LTS 和固定的 pnpm 版本;运行时依赖要求 Node >=22.19.0。`pnpm verify` 检查 Agent contract、源码与本地测试类型、baseline marker、干净构建、Vitest 与 Node 工具测试,以及真实构建 Host 导入和 Client/Remote smoke。打包后执行 `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz`,检查归档 export、图片、允许的文件以及与本次构建的一致性。CI 仅在 Windows/Linux 上 gate 精确 DSH `0.2.0-rc.1`,使用未修改源码 runtime 与发布 npm 制品;其余九个 pin 仅为历史证据,不是发布 gate。发布必须等待此精确目标矩阵通过;本 candidate 的 CI 验收尚未执行,证据限制见上文 alpha.25 与 alpha.26 说明。
407
+ 开发建议使用 Node 24 LTS 和固定的 pnpm 版本;运行时依赖要求 Node >=22.19.0。`pnpm verify` 检查 Agent contract、源码与本地测试类型、baseline marker、干净构建、Vitest 与 Node 工具测试,以及真实构建 Host 导入和 Client/Remote smoke。打包后执行 `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz`,检查归档 export、图片、允许的文件以及与本次构建的一致性。CI 仅在 Windows/Linux 上 gate 精确 DSH `0.2.0-rc.2`,使用未修改源码 runtime 与发布 npm 制品;其余十个 pin 仅为历史证据,不是发布 gate。发布必须等待此精确目标矩阵通过;本地测试不等于 CI 验收。
403
408
 
404
- 对于可选的思考显示集成,`pnpm verify:reasoning-ui -- <Core checkout>` 会在已安装 Chat 依赖的干净、精确 pin 的 `0.2.0-rc.1` checkout 中,执行合成的原生渲染器、Slot 注册器与历史组装 fixture。它只会独占创建一个临时测试文件,并仅在文件未被修改时清理。这是本地集成/静态渲染证据,不是真实浏览器或 Copilot API 测试;CI 仅覆盖当前目标,不表示本 candidate 已执行验收。
409
+ 对于可选的思考显示集成,`pnpm verify:reasoning-ui -- <Core checkout>` 会在已安装 Chat 依赖的干净、精确 pin 的 `0.2.0-rc.2` checkout 中,执行合成的原生渲染器、Slot 注册器与历史组装 fixture。它只会独占创建一个临时测试文件,并仅在文件未被修改时清理。这是本地集成/静态渲染证据,不是真实浏览器或 Copilot API 测试;CI 仅覆盖当前目标,不表示本 candidate 已执行验收。
405
410
 
406
411
  ### Agent 驱动开发
407
412
 
@@ -433,8 +438,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
433
438
  `package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
434
439
 
435
440
  ```sh
436
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.38/dsh-github-copilot-0.4.0-alpha.38.tgz
437
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.38/SHA256SUMS
441
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.40/dsh-github-copilot-0.4.0-alpha.40.tgz
442
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.40/SHA256SUMS
438
443
  sha256sum --check SHA256SUMS
439
444
  ```
440
445
 
@@ -442,7 +447,7 @@ PowerShell 可以对已下载的同一组文件执行:
442
447
 
443
448
  ```powershell
444
449
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
445
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.38.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
450
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.40.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
446
451
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
447
452
  ```
448
453
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.38"
11
+ "version": "0.4.0-alpha.40"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -19,12 +19,12 @@
19
19
  "platforms": ["windows", "linux"],
20
20
  "node": ">=22.19.0",
21
21
  "dsh": {
22
- "release": "0.2.0-rc.1",
23
- "tag": "dsh-v0.2.0-rc.1",
24
- "commit": "4878cdabd87d4041bdaff61d04c966883b9fd07a",
25
- "developmentRelease": "0.2.0-rc.1",
26
- "admittedReleases": ["0.2.0-rc.1"],
27
- "peerRange": "0.2.0-rc.1",
22
+ "release": "0.2.0-rc.2",
23
+ "tag": "dsh-v0.2.0-rc.2",
24
+ "commit": "639ed015397290b3745d163aafe02ffee4aa3f84",
25
+ "developmentRelease": "0.2.0-rc.2",
26
+ "admittedReleases": ["0.2.0-rc.2"],
27
+ "peerRange": "0.2.0-rc.2",
28
28
  "baselines": [
29
29
  {
30
30
  "release": "0.1.1-rc.2",
@@ -195,6 +195,32 @@
195
195
  "managedProviderValidation": "synthetic-tagged-source-runtime",
196
196
  "resolvedProfileDiagnostics": "plugin-owned-empty-modelErrors",
197
197
  "runtimeTests": ["tests/preview-route.spec.ts", "tests/published-core.spec.ts", "tests/single-route.spec.ts", "tests/search-routing.spec.ts", "tests/routed-web.spec.ts", "tests/deepseek-search-fallback.spec.ts", "tests/tool-schema-compat.spec.ts", "tests/fixtures/alpha2-contracts-core.fixture.ts", "tests/fixtures/compaction-pressure-core.fixture.ts", "tests/remote-codec.spec.ts", "tests/dual-model-projection.spec.ts", "tests/fixtures/session-context-core.fixture.ts", "tests/fixtures/remote-core.fixture.ts"]
198
+ },
199
+ {
200
+ "release": "0.2.0-rc.2",
201
+ "tag": "dsh-v0.2.0-rc.2",
202
+ "commit": "639ed015397290b3745d163aafe02ffee4aa3f84",
203
+ "source": "https://github.com/deepseek-ai/deepseek-harness",
204
+ "desktopRelease": "0.2.0-rc.2",
205
+ "modelsUi": "provider-card",
206
+ "providerHeaders": "fetch-validated-discovery",
207
+ "strictModeCompat": "route-switch",
208
+ "fileContentHelper": "contentHasFile",
209
+ "agentCreation": "awaited-serial-agent-created",
210
+ "sessionHistory": "request-header-and-projections-no-new-sync-history",
211
+ "sessionFormatVersion": 4,
212
+ "strictRemoteCodecs": "create-factories-with-legacy-schema-bridge",
213
+ "roleChildDescriptorVersion": 3,
214
+ "roleChildCacheVersion": 2,
215
+ "roleChildHistory": "unknown-legacy-history-fail-closed",
216
+ "runtimeDependencies": "public-resolution-and-unload",
217
+ "clientSessionContext": "multiple-session-owner-isolation",
218
+ "evidenceScope": "unchanged-tagged-source-target",
219
+ "standaloneNpmArtifacts": "tested",
220
+ "desktopPackageSet": "installed-descriptor-audited",
221
+ "managedProviderValidation": "synthetic-tagged-source-runtime",
222
+ "resolvedProfileDiagnostics": "plugin-owned-empty-modelErrors",
223
+ "runtimeTests": ["tests/preview-route.spec.ts", "tests/published-core.spec.ts", "tests/single-route.spec.ts", "tests/search-routing.spec.ts", "tests/routed-web.spec.ts", "tests/deepseek-search-fallback.spec.ts", "tests/tool-schema-compat.spec.ts", "tests/fixtures/alpha2-contracts-core.fixture.ts", "tests/fixtures/compaction-pressure-core.fixture.ts", "tests/remote-codec.spec.ts", "tests/dual-model-projection.spec.ts", "tests/fixtures/session-context-core.fixture.ts", "tests/fixtures/remote-core.fixture.ts"]
198
224
  }
199
225
  ],
200
226
  "packages": [
@@ -216,13 +242,13 @@
216
242
  "@deepseek-ai/dsh-web-search-deepseek"
217
243
  ]
218
244
  },
219
- "piAi": "0.85.1",
245
+ "piAi": "0.87.1",
220
246
  "runtimeDependencies": {
221
- "@earendil-works/pi-ai": "0.85.1",
247
+ "@earendil-works/pi-ai": "0.87.1",
222
248
  "zod": "^4.4.3"
223
249
  },
224
250
  "sharedPeerDependencies": {
225
- "@deepseek-ai/dsh-authorization": "0.2.0-rc.1",
251
+ "@deepseek-ai/dsh-authorization": "0.2.0-rc.2",
226
252
  "@deepseek-ai/schemastery": "^3.18.2"
227
253
  },
228
254
  "clientExternals": {
@@ -245,6 +271,12 @@
245
271
  "packageCount": 246,
246
272
  "scope": "historical-ownership-only-not-current-compatibility",
247
273
  "descriptorStatus": "not-materialized"
274
+ },
275
+ {
276
+ "id": "desktop-0.2.0-rc.2-signed-runtime",
277
+ "sourceSha256": "29561160fb7825c3968708f5700564f4381a976985fc270ee5dcc42e5a0a3a54",
278
+ "packageCount": 287,
279
+ "scope": "installed-signed-desktop-peer-ownership-only-not-loaded-plugin"
248
280
  }
249
281
  ]
250
282
  },
@@ -286,7 +318,7 @@
286
318
  {"file": "package.json", "marker": "\"external\": ["}
287
319
  ],
288
320
  "tests": [
289
- {"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "retains old Desktop shared graphs as ownership evidence, not current compatibility claims"},
321
+ {"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "retains historical graphs and audits signed rc.2 Desktop peer ownership"},
290
322
  {"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "shared graph gate rejects bundled, optional, incompatible, or unaudited host ownership"},
291
323
  {"file": "tests/scripts/desktop-package-graph.test.mjs", "name": "client externals stay outside the strict Node peer graph"}
292
324
  ]
@@ -673,7 +705,7 @@
673
705
  {"file": "tests/client.spec.ts", "name": "mounts its Remote contribution and registers the rc.1 provider-card seat"},
674
706
  {"file": "tests/authorization-controller.spec.ts", "name": "signs in through the built-in flow without recreating a canonical profile"},
675
707
  {"file": "tests/authorization-controller.spec.ts", "name": "clears the one-time device code immediately when sign-in is cancelled"},
676
- {"file": "tests/authorization-controller.spec.ts", "name": "clears the one-time device code when authorization fails"}
708
+ {"file": "tests/authorization-controller.spec.ts", "name": "reports only the safe begin-stage diagnostic and never logs rejected values"}
677
709
  ]
678
710
  },
679
711
  {
@@ -905,7 +937,7 @@
905
937
  "id": "dsh-supported-baselines-fail-loud-guard",
906
938
  "required": true,
907
939
  "sourceMarkers": [
908
- {"file": "src/compatibility.ts", "marker": "peerRange: '0.2.0-rc.1'"}
940
+ {"file": "src/compatibility.ts", "marker": "peerRange: '0.2.0-rc.2'"}
909
941
  ],
910
942
  "tests": [
911
943
  {"file": "tests/compatibility.spec.ts", "name": "admits only the exact current official release"},
@@ -13,7 +13,7 @@ Follow the [plugin-only boundary](../AGENTS.md#plugin-only-implementation-bounda
13
13
  3. **Capabilities stay distinct.** Preserve context, input and output limits separately; do not invent large limits or unsupported reasoning levels. Respect disabled/unconfigured policy, picker eligibility and tool/stream support. Provider metadata does not authorize changing account policy.
14
14
  4. **One credential lifecycle.** All plugin-owned routes share the canonical Host-only Copilot OAuth record. Model discovery, refresh and in-flight requests remain bound to the same account generation. Account switches, entitlement removal, disposal and stale callbacks must fail closed without copying credentials or changing other providers.
15
15
  5. **Thinking is included.** Preserve public summary deltas and final-only summaries without duplicate text. Validate selected effort and keep native default semantics. Empty or encrypted-only responses must not become fabricated explanations. Native replay, images and file projection retain their owning adapter's behavior; opaque replay is not displayed or rewritten into raw reasoning text.
16
- 6. **pi 0.85.1 compatibility.** Pin and test the requested published SDK version, not just a GitHub release label. Its Copilot GPT-6 catalog protocol must not override contrary provider endpoint evidence. An updated catalog entry is not sufficient grounds to retire a correction if the protocol/capabilities are still wrong.
16
+ 6. **Current pi 0.87.1 compatibility.** The original acceptance target was 0.85.1; official DSH rc.2 now depends on `^0.87.1`. Pin and test the exact published SDK version, not just a GitHub release label. Its Copilot GPT-6 catalog protocol must not override contrary provider endpoint evidence. An updated catalog entry is not sufficient grounds to retire a correction if the protocol/capabilities are still wrong.
17
17
 
18
18
  ## Regression evidence
19
19
 
@@ -42,5 +42,6 @@ Follow the [plugin-only boundary](../AGENTS.md#plugin-only-implementation-bounda
42
42
  - [Microsoft Copilot API types](https://github.com/microsoft/vscode/blob/main/src/typings/copilot-api.d.ts)
43
43
  - [Endpoint-driven Copilot discovery implementation reference](https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/plugin/github-copilot/models.ts)
44
44
  - [pi v0.85.1 release](https://github.com/earendil-works/pi/releases/tag/v0.85.1)
45
+ - [pi v0.87.1 release](https://github.com/earendil-works/pi/releases/tag/v0.87.1)
45
46
 
46
47
  These references guide parsing and tests; they are not a guarantee that the upstream discovery schema will never change. Schema drift must be surfaced rather than silently guessed.
@@ -0,0 +1,16 @@
1
+ # Official-first review: DSH 0.2.0-rc.2
2
+
3
+ ## Target and evidence
4
+
5
+ The sole admitted target is official [`dsh-v0.2.0-rc.2`](https://github.com/deepseek-ai/deepseek-harness/tree/639ed015397290b3745d163aafe02ffee4aa3f84), commit `639ed015397290b3745d163aafe02ffee4aa3f84`. Compare it with the retained [rc.1 baseline](./official-first-020-rc1.md) using the [official source comparison](https://github.com/deepseek-ai/deepseek-harness/compare/dsh-v0.2.0-rc.1...dsh-v0.2.0-rc.2). The signed installed Windows Desktop `dsh/desktop-runtime.json` is 2,817,387 bytes, SHA-256 `29561160fb7825c3968708f5700564f4381a976985fc270ee5dcc42e5a0a3a54`, and lists 287 shared packages. Desktop, Core and Desktop Host report rc.2; the 16 declared DSH peers resolve rc.2, Cordis 4.0.4 and schemastery 3.18.4. The descriptor establishes peer ownership, not plugin activation, Electron integration or live provider calls.
6
+
7
+ ## Public contracts and decisions
8
+
9
+ | Surface | Official support / remaining gap | Decision and retirement trigger |
10
+ |---|---|---|
11
+ | Native model adapter and SDK | Published [`@deepseek-ai/dsh-llm-pi-ai@0.2.0-rc.2`](https://registry.npmjs.org/@deepseek-ai/dsh-llm-pi-ai/-/dsh-llm-pi-ai-0.2.0-rc.2.tgz) depends on pi-ai `^0.87.1`. The native SDK now passes branded `TranscriptContext` to providers, with prompt and tools folded into system messages. | **Migrate** the plugin-owned provider bridge and estimated admission to exact pi-ai `0.87.1`; count each normalized message as a lower bound even when earlier usage anchors omit changed prefixes. Retain native transport and the same stream object. Retire this bridge only when official account-scoped metadata and admission preserve these contracts. |
12
+ | Profile bundle patches | Public `bundlePatchPaths` accepts a bundle's string or ordered array of patches. Signed rc.2 `dsh-web-app` lists five patches, whereas the old plugin preflight accepted only one string. | **Migrate** read-only preflight to the published resolver and compose every patch in order, rejecting malformed manifests and unsupported routing. Retire only after an official installer provides equivalent fail-closed structural admission. |
13
+ | Models UI, authorization, Remote, Session and search | Published rc.2 package entrypoints and inspected public seams retain the rc.1 forms. The official rc.2 UI-agent-preset removes its `developerTools` injection, which this plugin does not use. | **Retain** the public Host/Client/Remote integrations and their guarded ownership. Retirement requires verified official equivalent behavior plus migration and runtime acceptance; lack of a new public seam is not evidence of complete parity. |
14
+ | Desktop package graph | Signed descriptor has the current shared peers; pi-ai and Zod are not shared Host packages. The bundled adapter resolves pi-ai 0.87.1 and Zod separately. | **Retain** required Host peers and Client external React; do not copy bundled dependencies or patch Core. Recheck effective profile resolution before Desktop installation because a stale profile-local Host peer may shadow the bundle. |
15
+
16
+ The unchanged-tagged-source and exact published-artifact fixtures must pass on Windows and Linux before publication. Local synthetic HTTP, source markers, package imports and signed peer metadata do not prove account entitlement, Copilot model calls, loaded Desktop plugin state or profile installation. The Desktop owner performs installation separately after verified publication and preflight; no credentials, model settings or Session histories are migrated by this change.
package/lib/client.js CHANGED
@@ -44,6 +44,14 @@ window.__ModuleLoader__.load({
44
44
  discoverModels: "COPILOT_MODEL_DISCOVERY_FAILED",
45
45
  reconcile: "COPILOT_CONFIGURATION_REPAIR_FAILED"
46
46
  };
47
+ const authorizationFailureCodes = /* @__PURE__ */ new Set([
48
+ "COPILOT_AUTHORIZATION_FAILED",
49
+ "COPILOT_AUTHORIZATION_BEGIN_FAILED",
50
+ "COPILOT_ROUTE_REPAIR_FAILED"
51
+ ]);
52
+ function safeAuthorizationFailure(error) {
53
+ return typeof error === "string" && authorizationFailureCodes.has(error) ? error : "COPILOT_AUTHORIZATION_FAILED";
54
+ }
47
55
  /** One mounted account's snapshot, bounded freshness check and explicit actions.
48
56
  * Initial signed-in status ensures missing/idle/stale/error metadata once or
49
57
  * joins loading metadata; the Host owns single flight and failure cooldown.
@@ -100,7 +108,7 @@ window.__ModuleLoader__.load({
100
108
  const accept = (decoded, operation) => {
101
109
  const previousCode = noticeCode();
102
110
  const { accountModels, notices, error, ...rest } = decoded;
103
- const failure = error !== void 0 || decoded.phase === "error" ? "COPILOT_AUTHORIZATION_FAILED" : void 0;
111
+ const failure = error !== void 0 || decoded.phase === "error" ? safeAuthorizationFailure(error) : void 0;
104
112
  const view = {
105
113
  ...rest,
106
114
  notices: decoded.inFlight && !suppressNotice ? notices : [],
@@ -6949,6 +6957,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6949
6957
  "signed-in",
6950
6958
  "error"
6951
6959
  ].includes(owned.phase) || typeof owned.configured !== "boolean" || typeof owned.writable !== "boolean" || typeof owned.inFlight !== "boolean") return void 0;
6960
+ if (owned.error !== void 0 && typeof owned.error !== "string") owned.error = "COPILOT_AUTHORIZATION_FAILED";
6952
6961
  const notices = source.notices;
6953
6962
  if (!Array.isArray(notices)) return void 0;
6954
6963
  owned.notices = notices.map((notice) => {
@@ -7455,6 +7464,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7455
7464
  };
7456
7465
  function compactErrorMessage(code) {
7457
7466
  if (code === "COPILOT_MODEL_DISCOVERY_FAILED") return "Could not refresh models. Try again.";
7467
+ if (code === "COPILOT_AUTHORIZATION_BEGIN_FAILED") return "GitHub sign-in did not complete. Try again. If it continues, share diagnostic code COPILOT_AUTHORIZATION_BEGIN_FAILED with support.";
7468
+ if (code === "COPILOT_ROUTE_REPAIR_FAILED") return "GitHub sign-in completed, but model configuration repair failed. Authentication is retained. Open Manage and choose Repair model configuration. If it continues, share diagnostic code COPILOT_ROUTE_REPAIR_FAILED with support.";
7458
7469
  if (code === "COPILOT_AUTHORIZATION_START_FAILED") return "Could not confirm sign-in. Retry status to check.";
7459
7470
  if (code === "COPILOT_AUTHORIZATION_CANCEL_FAILED") return "Could not confirm cancellation. Retry status to check.";
7460
7471
  if (code === "COPILOT_SIGN_OUT_FAILED") return "Could not confirm sign-out. Retry status to check.";