dsh-github-copilot 0.4.0-alpha.43 → 0.4.0-alpha.45

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
@@ -23,7 +23,7 @@ This repository follows a **plugin-only** policy: implement fixes in `dsh-github
23
23
  3. Run `node scripts/agent.mjs doctor --json` before install. It is a dependency-free, read-only repository preflight: exit 0 means preflight passed, 1 means prerequisites missing, 2 means invalid arguments/metadata. Build presence is not build freshness, and no live DSH or credential readiness is claimed.
24
24
  4. Choose a task with `node scripts/agent.mjs plan models --json` (or authorization/search/client/compatibility/tooling/release). Output is an unexecuted argv plan, never implicit permission to run destructive operations.
25
25
  5. Use Node 24 LTS for development and the exact pnpm version in `package.json`; the runtime dependency floor is Node 22.19.0. Run frozen install in this checkout. Dependencies/build output are not carried into worktrees.
26
- 6. Create/reuse a tracking issue and feature branch, implement a regression first, run the full gate, inspect the diff, and open a PR. After an authorized merge of an important update, continue through the release-delivery rule below without another release prompt. Merge, live-profile install and worktree checkout still require explicit user approval.
26
+ 6. Create/reuse a tracking issue and feature branch, implement a regression first, run the full gate, inspect the diff, and open a PR. For requested delivery, merge after required review/CI and branch protection without a separate approval prompt, unless the user limits scope. Important updates continue through the release-delivery rule below. Live-profile install and worktree checkout still require explicit user approval.
27
27
 
28
28
  Use native DSH tools for goals, background jobs and scoped subagents. Use local Git and the GitHub REST API for delivery; no external orchestration daemon, roster or `vcs_*` tool is required. Do not assume a model provider's identity is the assisting agent.
29
29
 
@@ -170,9 +170,9 @@ For alpha.25, source markers, local rc.1-backed focused tests and fifteen scoped
170
170
 
171
171
  ## Important-update release delivery
172
172
 
173
- - User-requested important updates include user-visible features, behavior fixes, compatibility fixes, and security or stability fixes. Their default delivery includes publication after an authorized merge and green required CI; do not stop at a merged PR or ask a second time whether to release.
173
+ - User-requested important updates include user-visible features, behavior fixes, compatibility fixes, and security or stability fixes. Their default delivery includes publication after a reviewed merge and green required CI; do not stop at a merged PR or ask a second time whether to release.
174
174
  - Explicit user restrictions such as code-only, review-only or do-not-release take precedence. Pure documentation and internal-only changes are not automatically release-bearing; they need an explicit release request if publication is desired. A task plan is not permission for an unrelated release.
175
- - Plan version alignment with the implementation PR whenever possible. If the prepared version/tag is unused and aligned, release it; otherwise prepare the next appropriate SemVer version through the normal PR path. Preserve the prerelease channel unless promotion is explicitly requested. Any additional version PR still needs merge approval, not a repeated release-scope question.
175
+ - Plan version alignment with the implementation PR whenever possible. If the prepared version/tag is unused and aligned, release it; otherwise prepare the next appropriate SemVer version through the normal PR path. Preserve the prerelease channel unless promotion is explicitly requested. Any additional version PR follows the same required review/CI and branch protection, without a separate merge-approval prompt.
176
176
  - Check all required CI, tag rules and package/archive checks. Create a fresh annotated tag only on the verified merged revision, let the protected Release workflow publish, and verify the non-draft Release, intended prerelease flag, tag/commit, assets and SHA-256. Never bypass failing CI, move a tag or substitute an unverified local archive.
177
177
  - A release-bearing update is not fully delivered until the published Release URL, verified version/commit/assets/checksum and npm version/SRI are reported. If CI, permissions or network prevents either channel, report partial delivery and the exact pending step; never describe merged-only or GitHub-only work as fully delivered.
178
178
  - This standing release authorization does not authorize profile installation, sign-out, worktree checkout or interruption of running Sessions. Keep published, installed-on-disk and loaded-runtime status separate; a session-interrupting restart still requires explicit acknowledgement.
@@ -246,8 +246,8 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
246
246
  - Work on a feature branch; never commit directly to `main`.
247
247
  - Reference the issue in the commit and use truthful tool attribution: `Assisted-by: DeepSeek Harness (DSH)` for this DSH session. For a different tool, name the tool actually used. `node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"` formats the trailer without inventing an identity.
248
248
  - `Co-authored-by` is reserved for actual collaborators with verified identities. Do not copy the Copilot App trailer from history or invent a bot email. The model provider is not the authoring tool. Keep the user's Git author unchanged and do not rewrite published history.
249
- - State expected results and scope before the complete gate; compare actual outcomes before pushing. All current CI checks must be green before any authorized merge.
249
+ - State expected results and scope before the complete gate; compare actual outcomes before pushing. All required reviews and CI checks must pass before merging.
250
250
  - Push only the feature branch and open a PR targeting the resolved default branch with `Fixes #<issue>`. Include risks, tests, evidence limits, and rollback.
251
- - Merge, installing into a user profile, sign-out and worktree checkout require explicit user approval. Important-update publication follows the standing release-delivery rule above, not a second release prompt; other releases need an explicit request. Never bypass branch/tag protection.
251
+ - A user request to deliver work permits merging its PR after required review/CI and branch protection without a separate approval prompt; honor explicit code-only, review-only or do-not-merge restrictions. Installing into a user profile, sign-out and worktree checkout still require explicit user approval. Important-update publication follows the standing release-delivery rule above, not a second release prompt; other releases need an explicit request. Never bypass branch/tag protection.
252
252
 
253
253
  GitHub operations must use the repository owner's intended authenticated identity. Inject credentials only into the current Git/API process; never print or persist them or add machine-specific credential paths here. Network failure is not an authentication failure: follow user-authorized network recovery, bound retries, preserve local work and report pending remote delivery honestly.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.45 (prepared)
4
+
5
+ - Add a fixed, allowlisted latest-observed authorization milestone to failed sign-in diagnostics without inspecting or retaining rejected values, provider responses, credentials, prompts, notices, or nested causes (#178).
6
+ - Clear the ephemeral milestone on cancellation, success, sign-out, and each new attempt; distinguish observed request, prompt, and notice progress from an inferred failure cause.
7
+ - Document the exact rc.2 hot-removal boundary: removing the routing bundle after activation can strand the public Web service isolate until restart, while the native manager already marks existing-package upgrades as restart-required. Do not remove and re-add the package to bypass that boundary.
8
+ - Supersede unpublished alpha.44 after its immutable tag failed the protected annotation check; no alpha.44 GitHub Release or npm package was created.
9
+
3
10
  ## 0.4.0-alpha.43 (prepared)
4
11
 
5
12
  - Put Web search routing and Copilot hosted-search options on the plugin bundle's detail page through the public `plugins.bundle.config` slot (#177).
package/CONTRIBUTING.md CHANGED
@@ -29,7 +29,7 @@ Core inspection is read-only. Isolated tests may use unchanged pinned Core artif
29
29
  Validate the resulting exact path with `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz`. The release task plan supplies that path automatically. Never run broad cleanup on an existing artifacts directory just to package again.
30
30
  6. Inspect the complete diff, compare expected versus actual results, and report what was NOT checked. Source markers, stubbed unit tests, built module imports, upstream config fixtures, authenticated API calls, installation, and loaded UI are different evidence layers.
31
31
  7. Commit with the issue reference and accurate attribution. For work assisted by DSH use `Assisted-by: DeepSeek Harness (DSH)`. Other agents must name the actual tool; do not infer authorship from the model vendor or copy a bot identity. Add `Co-authored-by` only for real verified collaborators. No fabricated email, author replacement or published-history rewrite.
32
- 8. Push the feature branch and open a PR containing `Fixes #<issue>`, verification, risks and rollback. Merge only with explicit approval and after all Windows/Linux x controlled-rc.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 CI jobs pass.
32
+ 8. Push the feature branch and open a PR containing `Fixes #<issue>`, verification, risks and rollback. For user-requested delivery, merge without an additional approval prompt after required review/CI and branch protection; respect explicit code-only, review-only or do-not-merge restrictions.
33
33
 
34
34
  Generated `lib/` output, archives, `.env`, tokens, local credentials, machine state and production screenshots with real authorization codes must not be committed. Use synthetic fixtures for screenshots and report staged UI honestly.
35
35
 
@@ -37,7 +37,7 @@ Generated `lib/` output, archives, `.env`, tokens, local credentials, machine st
37
37
 
38
38
  GitHub Releases and npm are the default distribution channels for every new version, superseding the Release-only decision in #43 at the user's request. The public package uses the exact same verified tarball in both channels. No automatic npm opt-out is allowed. See [npm distribution](./docs/npm-distribution.md) for initial maintainer bootstrap, OIDC, retry recovery and organizational access requirements.
39
39
 
40
- Important user-requested features, behavior fixes, compatibility fixes, and security or stability fixes include release follow-through by default after authorized merge and green required CI. Do not stop at the merged PR or ask for a second release confirmation. User instructions limiting delivery to code/review or forbidding publication take precedence; documentation-only, internal-only and unrelated releases are not implicitly authorized. Follow the [important-update delivery rule](./AGENTS.md#important-update-release-delivery).
40
+ Important user-requested features, behavior fixes, compatibility fixes, and security or stability fixes include release follow-through by default after a reviewed merge and green required CI. Do not stop at the merged PR or ask for a second release confirmation. User instructions limiting delivery to code/review or forbidding publication take precedence; documentation-only, internal-only and unrelated releases are not implicitly authorized. Follow the [important-update delivery rule](./AGENTS.md#important-update-release-delivery).
41
41
 
42
42
  Prepare version alignment in the implementation PR. Important runtime or delivery changes fail the `release-ready` PR check unless `package.json` is strictly newer than the base and `deployment-baseline.json` plus both README install URLs agree. Retain the current prerelease channel unless promotion is requested. Docs/tests-only changes may keep the current version. Never move or reuse a tag. Local installation, sign-out and worktree checkout still need explicit approval; restarting active Sessions requires acknowledgement of the interruption.
43
43
 
package/README.md CHANGED
@@ -85,7 +85,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
85
85
 
86
86
  ## Install and sign in
87
87
 
88
- The commands below target the package version `0.4.0-alpha.43`. 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.45`. 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):
89
89
 
90
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):
91
91
 
@@ -98,10 +98,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
98
98
  For a standalone named profile only, the supported CLI command is:
99
99
 
100
100
  ```sh
101
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.43/dsh-github-copilot-0.4.0-alpha.43.tgz
101
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.45/dsh-github-copilot-0.4.0-alpha.45.tgz
102
102
  ```
103
103
 
104
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.43` 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.45` 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.
105
105
 
106
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.
107
107
 
@@ -110,7 +110,7 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
110
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.
111
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.
112
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.
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.
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. A failed begin can also show a fixed **latest observed milestone** (`AUTHORIZATION_REQUESTED`, `INTERACTION_PROMPT_OBSERVED`, or `INTERACTION_NOTICE_OBSERVED`). It reports only progress observed through the public interaction callbacks, not the failing operation or a credential commit. The latter route-repair code retains authentication and directs you to **Manage → Repair model configuration**. These codes and milestones do not explain or resolve the underlying sign-in failure; raw provider details are never displayed or logged.
114
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.
115
115
 
116
116
  ### Auto model routing
@@ -167,7 +167,9 @@ Agents should treat the browser authorization as a human handoff, not as a token
167
167
  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.
168
168
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
169
169
 
170
- 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.43`, 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).
170
+ 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.45`, 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).
171
+
172
+ **Desktop hot-upgrade boundary:** exact rc.2 deliberately reports `restart-required` when an installed dependency is upgraded in place. Do not remove and re-add this bundle to force a hot upgrade: removing its patch after activation asks the public Loader to move the official `web` service out of the companion's named isolate, and an isolated remove/re-add regression shows that rc.2 can leave the official fiber active while global Web consumers, the delegate, and routed Web remain pending until process restart. The plugin cannot repair that state after its own bundle has been removed without a Core/private hook or persistent profile mutation, neither of which is allowed. Treat the native manager's restart-required result as authoritative, finish the package transaction, and perform a separately approved Desktop restart before sign-in or search validation.
171
173
 
172
174
  No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
173
175
 
@@ -416,15 +418,15 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
416
418
 
417
419
  `agent-contract.json` maps authorization, models, search, client, compatibility, tooling and release tasks to owning files and tests. Plans return unexecuted argument arrays, including the exact package-version archive path. Doctor checks repository prerequisites only: exit 0 means preflight passed, 1 means missing prerequisites, 2 means invalid input/metadata. For clean machine-readable output prefer the direct `node` command rather than parsing pnpm progress logs.
418
420
 
419
- Attribution follows the actual tool: `Assisted-by: DeepSeek Harness (DSH)` for DSH-assisted changes, not a Copilot App co-author inferred from the model provider. Keep the human Git author and reserve `Co-authored-by` for verified collaborators. Merge, profile install, sign-out and worktree checkout require explicit approval. Important updates include post-merge release follow-through under the policy below; they do not require another release prompt.
421
+ Attribution follows the actual tool: `Assisted-by: DeepSeek Harness (DSH)` for DSH-assisted changes, not a Copilot App co-author inferred from the model provider. Keep the human Git author and reserve `Co-authored-by` for verified collaborators. User-requested delivery can merge after required review/CI and branch protection without a separate approval prompt. Profile install, sign-out and worktree checkout still require explicit approval. Important updates include post-merge release follow-through under the policy below.
420
422
 
421
423
  Evidence is layered: package presence/import and passing synthetic tests do not prove live DSH activation, account entitlement, model transport or hosted search. Authorization `status()` is read-only; explicit reconciliation/startup may persist configuration, while capability probes run only on actual eligible requests. None of these reports implies live transport success without a real request. Search resolves captured effective initiating Session request config or explicit request options and keeps per-owner plans instead of deriving them from the future global default; unsupported context still fails closed. Release, Ops migration and registry readback remain separate evidence. See the [readiness audit](./docs/agent-readiness.md) for evidence and remaining limitations.
422
424
 
423
425
  ## Important-update release delivery
424
426
 
425
- Important user-requested features, behavior fixes, compatibility fixes, and security or stability fixes include publication after an authorized merge and green required CI. The agent must continue version preparation, the protected tag/Release workflow and asset verification without waiting for a second request to release. Plan version alignment in the implementation PR where practical; preserve the prerelease channel unless promotion is requested.
427
+ Important user-requested features, behavior fixes, compatibility fixes, and security or stability fixes include publication after a reviewed merge and green required CI. The agent must continue version preparation, the protected tag/Release workflow and asset verification without waiting for a second request to release. Plan version alignment in the implementation PR where practical; preserve the prerelease channel unless promotion is requested.
426
428
 
427
- An explicit code-only/review-only/do-not-release instruction takes precedence. Documentation-only and internal-only changes do not trigger a release by default. Merge approval is still required, including for a separate version PR; profile installation and session-interrupting restarts remain separate. This is agent delivery policy, not an unconditional publish-on-merge CI trigger.
429
+ An explicit code-only/review-only/do-not-merge/do-not-release instruction takes precedence. Documentation-only and internal-only changes do not trigger a release by default. A separate version PR still needs required review/CI and branch protection, not another merge-approval prompt; profile installation and session-interrupting restarts remain separate. This is agent delivery policy, not an unconditional publish-on-merge CI trigger.
428
430
 
429
431
  Report the published Release URL, version, tag/commit and verified asset SHA-256 before calling release delivery complete. If publication is blocked, report the concrete CI/permission/network blocker and pending step rather than treating a merged PR or local build as a release. Full rules are in [AGENTS.md](./AGENTS.md#important-update-release-delivery).
430
432
 
@@ -433,8 +435,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
433
435
  `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.
434
436
 
435
437
  ```sh
436
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.43/dsh-github-copilot-0.4.0-alpha.43.tgz
437
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.43/SHA256SUMS
438
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.45/dsh-github-copilot-0.4.0-alpha.45.tgz
439
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.45/SHA256SUMS
438
440
  sha256sum --check SHA256SUMS
439
441
  ```
440
442
 
@@ -442,7 +444,7 @@ PowerShell can verify the same two downloaded files with:
442
444
 
443
445
  ```powershell
444
446
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
445
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.43.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
447
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.45.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
446
448
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
447
449
  ```
448
450
 
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.43`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.45`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
13
13
 
14
14
  Alpha.24 修复了 Web search 卡片缺少精确 Remote 依赖声明的问题。当时卡片位于 **设置 → 模型**(`settings.models.footer`,list/root),旧 Core 回退到独立 Web search section。现在优先显示在插件详情页;搜索子 Fiber 仍独立等待 routing namespace,不影响账号控件和既有搜索安全检查;实际打包 Desktop 验收仍是独立关卡。
15
15
 
@@ -100,10 +100,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
100
100
  仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
101
101
 
102
102
  ```sh
103
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.43/dsh-github-copilot-0.4.0-alpha.43.tgz
103
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.45/dsh-github-copilot-0.4.0-alpha.45.tgz
104
104
  ```
105
105
 
106
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.43`。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.45`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
107
107
 
108
108
  随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
109
109
 
@@ -112,7 +112,7 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
112
112
  1. 打开 **设置 → 模型**,找到 **GitHub Copilot**。账号控件嵌入已有配置的 canonical `github-copilot` 卡片,不另显示页脚控制器;没有此类卡片时仍可用页脚 fallback(旧 Core 使用 **Settings → GitHub Copilot**)。已登录时,页面打开会自动确保缺失/idle/过期/error/loading的模型元数据就绪;新鲜 ready 缓存不发发现请求。正常流程无需添加原生 provider 或手动刷新。
113
113
  2. 点击 **Sign in with GitHub** 后,验证码区域自动展开,提供醒目的一次性验证码、**Open GitHub verification page**、**Copy code** 和 **Cancel sign-in**。不需要再点一次 **Manage**。识别到 Desktop v1 宿主时,通过现有的同窗口外部导航处理交给系统浏览器,不依赖弹出窗口;网页版仍打开新标签页。如果没有打开,可选中并复制界面显示的验证网址到浏览器。插件无法确认系统浏览器是否已打开。
114
114
  3. 复制验证码,打开验证链接,在自己的 GitHub 浏览器会话中完成授权。复制成功/失败均有可访问的反馈;手工复制仍可用。不要把 GitHub token 粘贴到 DSH。
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 详情不会显示或记录。
115
+ 4. DSH 只在授权进行中轮询。显式 **Start sign-in**(**Sign in with GitHub** 按钮,包括界面切换账号)成功后,无论立即返回还是轮询观察到成功,都只强制执行一次有界发现。验证码和验证链接清除,自动授权区域收起,账号显示 **Signed in、Manage**。手动打开的详情保持展开;取消清除旧验证码。失败仅显示安全的阶段诊断:`COPILOT_AUTHORIZATION_BEGIN_FAILED` 表示授权流程未完成;`COPILOT_ROUTE_REPAIR_FAILED` 表示授权已完成但本地路由修复失败。begin 失败还可以显示固定的“最近观察到的里程碑” (`AUTHORIZATION_REQUESTED`、`INTERACTION_PROMPT_OBSERVED` 或 `INTERACTION_NOTICE_OBSERVED`);它只表示公开 interaction callback 已观察到的进度,不代表失败操作或 credential commit。后者会保留认证,并提示前往 **Manage → Repair model configuration**。这些代码和里程碑不解释或解决底层登录失败,原始 provider 详情不会显示或记录。
116
116
  5. 在 **GitHub Copilot** 分组选择接受的模型(稳定路由 ID 为 `github-copilot-preview`)。正常打开/使用会自动维护元数据,无需手动 **Refresh models**。**Manage** 内保留可选的手动刷新、模型明细与退出登录,移除兼容说明折叠区;需要时仍显示旧配置诊断和显式修复操作,[迁移指南](./docs/single-route-migration.md)继续保留在文档中。错误即使在详情折叠时也会显示并提供 **Retry**;发现或重试均不切换当前/默认模型,也不重放消息。
117
117
 
118
118
  ### Auto 模型路由
@@ -169,7 +169,9 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
169
169
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
170
170
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
171
171
 
172
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.43`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
172
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.45`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
173
+
174
+ **Desktop 热升级边界:**精确 rc.2 在原有 dependency 上执行原位升级时会明确返回 `restart-required`。不要通过先移除再重新添加本 bundle 来强行热升级:bundle 已激活后移除其 patch,会要求公开 Loader 把官方 `web` service 从 companion 的命名 isolate 移回全局;隔离的移除/重加回归证明,rc.2 可能让官方 fiber 保持 active,却使全局 Web consumers、delegate 与 routed Web 一直 pending,直到进程重启。bundle 被移除后,本插件若不使用 Core/private hook 或持久化 profile 修改就无法修复该状态,而这两种做法都不允许。应把原生 manager 的 restart-required 结果视为权威,完成 package transaction,并在登录或搜索验收前执行另行批准的 Desktop 重启。
173
175
 
174
176
  不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
175
177
 
@@ -427,15 +429,15 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
427
429
 
428
430
  `agent-contract.json` 把 authorization、models、search、client、compatibility、tooling、release 任务映射到负责文件和测试。Plan 返回尚未执行的参数数组,包含当前包版本对应的归档路径。Doctor 仅检查仓库前置条件:退出码 0 表示 preflight 通过,1 表示缺少依赖,2 表示参数或元数据错误。需要纯 JSON 时直接运行 `node`,不要解析 pnpm 的进度日志。
429
431
 
430
- 署名依据实际工具:DSH 协助的改动使用 `Assisted-by: DeepSeek Harness (DSH)`,不能因为模型来自 Copilot 就添加 Copilot App co-author。保留人类 Git author;`Co-authored-by` 只用于身份经过确认的真实协作者。合并、安装到 profile、登出和 worktree checkout 仍需要明确批准。重要更新默认包含合并后的发版交付,按下文规则继续推进,不再重复询问是否发版。
432
+ 署名依据实际工具:DSH 协助的改动使用 `Assisted-by: DeepSeek Harness (DSH)`,不能因为模型来自 Copilot 就添加 Copilot App co-author。保留人类 Git author;`Co-authored-by` 只用于身份经过确认的真实协作者。用户要求交付的工作,在必要评审/CI 和分支保护通过后可合并,无需逐次另行询问。安装到 profile、登出和 worktree checkout 仍需要明确批准。重要更新默认包含合并后的发版交付,按下文规则继续推进,不再重复询问是否发版。
431
433
 
432
434
  验证证据必须分层:包存在、模块导入和合成测试通过,不证明真实 DSH 已激活、账号权限有效、模型请求或搜索成功。Authorization `status()` 现在为只读;显式 reconciliation 或启动仍可能持久化配置,能力 probe 只在真实且符合条件的请求中运行。没有真实请求时,这些状态均不能证明 transport 已成功。搜索解析捕获的发起 Session 有效请求配置或显式请求 options并按 owner 保存 plan,不再从未来全局默认值派生;不支持的上下文仍保守失败。发布、Ops 迁移及 registry 回读仍是独立证据。完整发现、证据与剩余限制见[readiness 审计](./docs/agent-readiness.md)。
433
435
 
434
436
  ## 重要更新的发版交付
435
437
 
436
- 用户要求的重要功能、行为修复、兼容性修复以及安全或稳定性修复,默认包含授权合并且必要 CI 通过后的版本发布。Agent 必须继续完成版本准备、受保护的 tag/Release 流程和制品核验,不再等用户另外催一次“发版”。能在实现 PR 中准备好版本信息时一并完成;除非明确要求转正式版,否则保留预发布通道。
438
+ 用户要求的重要功能、行为修复、兼容性修复以及安全或稳定性修复,默认包含通过评审合并且必要 CI 通过后的版本发布。Agent 必须继续完成版本准备、受保护的 tag/Release 流程和制品核验,不再等用户另外催一次“发版”。能在实现 PR 中准备好版本信息时一并完成;除非明确要求转正式版,否则保留预发布通道。
437
439
 
438
- 用户明确要求“只改代码/只评审/不要发布”时优先遵守。纯文档、纯内部改动不默认发版。合并仍需批准,包括额外的版本 PR;本机安装、会中重启仍分别保留授权与安全检查。这是 Agent 的交付规则,不是把 CI 改成所有 PR 一合并就无条件发包。
440
+ 用户明确要求“只改代码/只评审/不要合并/不要发布”时优先遵守。纯文档、纯内部改动不默认发版。额外的版本 PR 仍须通过必要评审/CI 与分支保护,但不需另问一次合并批准;本机安装、会中重启仍分别保留授权与安全检查。这是 Agent 的交付规则,不是把 CI 改成所有 PR 一合并就无条件发包。
439
441
 
440
442
  只有报告了已发布的 Release 链接、版本、tag/commit 及核验后的制品 SHA-256,才能称为发版交付完成。若被 CI、权限或网络阻塞,必须说明具体原因和待执行步骤,不能把“已合并”或“本地已构建”说成“已发布”。完整规则见 [AGENTS.md](./AGENTS.md#important-update-release-delivery)。
441
443
 
@@ -444,8 +446,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
444
446
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
445
447
 
446
448
  ```sh
447
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.43/dsh-github-copilot-0.4.0-alpha.43.tgz
448
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.43/SHA256SUMS
449
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.45/dsh-github-copilot-0.4.0-alpha.45.tgz
450
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.45/SHA256SUMS
449
451
  sha256sum --check SHA256SUMS
450
452
  ```
451
453
 
@@ -453,7 +455,7 @@ PowerShell 可以对已下载的同一组文件执行:
453
455
 
454
456
  ```powershell
455
457
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
456
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.43.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
458
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.45.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
457
459
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
458
460
  ```
459
461
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.43"
11
+ "version": "0.4.0-alpha.45"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -696,7 +696,8 @@
696
696
  {"file": "src/client.ts", "marker": "data-dsh-github-copilot-device-code"},
697
697
  {"file": "src/external-link.ts", "marker": "externalLinkTarget"},
698
698
  {"file": "src/client.ts", "marker": "data-dsh-github-copilot-verification-url"},
699
- {"file": "src/authorization-controller.ts", "marker": "GitHubCopilotAuthorizationController"}
699
+ {"file": "src/authorization-controller.ts", "marker": "GitHubCopilotAuthorizationController"},
700
+ {"file": "src/authorization-controller.ts", "marker": "INTERACTION_NOTICE_OBSERVED"}
700
701
  ],
701
702
  "tests": [
702
703
  {"file": "tests/client.spec.ts", "name": "exposes a device code only while authorization is in flight"},
@@ -710,7 +711,10 @@
710
711
  {"file": "tests/client.spec.ts", "name": "mounts its Remote contribution and registers the rc.1 provider-card seat"},
711
712
  {"file": "tests/authorization-controller.spec.ts", "name": "signs in through the built-in flow without recreating a canonical profile"},
712
713
  {"file": "tests/authorization-controller.spec.ts", "name": "clears the one-time device code immediately when sign-in is cancelled"},
713
- {"file": "tests/authorization-controller.spec.ts", "name": "reports only the safe begin-stage diagnostic and never logs rejected values"}
714
+ {"file": "tests/authorization-controller.spec.ts", "name": "reports only the safe begin-stage diagnostic and never logs rejected values"},
715
+ {"file": "tests/authorization-controller.spec.ts", "name": "reports the latest observed milestone for a %s rejection"},
716
+ {"file": "tests/authorization-controller.spec.ts", "name": "does not misreport a synthetic credential-commit rejection as an observed commit"},
717
+ {"file": "tests/authorization-controller.spec.ts", "name": "clears the ephemeral authorization milestone after cancellation and success"}
714
718
  ]
715
719
  },
716
720
  {
package/lib/client.js CHANGED
@@ -5644,7 +5644,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5644
5644
  "ROUTE_CONFLICT"
5645
5645
  ]).optional()
5646
5646
  }).strict().optional(),
5647
- error: string().optional()
5647
+ error: string().optional(),
5648
+ authorizationMilestone: _enum([
5649
+ "AUTHORIZATION_REQUESTED",
5650
+ "INTERACTION_PROMPT_OBSERVED",
5651
+ "INTERACTION_NOTICE_OBSERVED"
5652
+ ]).optional()
5648
5653
  }).strict();
5649
5654
  const result = strictRemoteCodec(GITHUB_COPILOT_AUTHORIZATION_VIEW_TYPE_SYMBOL, GitHubCopilotAuthorizationViewSchema);
5650
5655
  const GITHUB_COPILOT_MIGRATION_STATUS_TYPE_SYMBOL = "dsh-github-copilot#GitHubCopilotMigrationStatus";
@@ -7364,6 +7369,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7364
7369
  "error"
7365
7370
  ].includes(owned.phase) || typeof owned.configured !== "boolean" || typeof owned.writable !== "boolean" || typeof owned.inFlight !== "boolean") return void 0;
7366
7371
  if (owned.error !== void 0 && typeof owned.error !== "string") owned.error = "COPILOT_AUTHORIZATION_FAILED";
7372
+ const milestone = source.authorizationMilestone;
7373
+ if (typeof milestone === "string" && [
7374
+ "AUTHORIZATION_REQUESTED",
7375
+ "INTERACTION_PROMPT_OBSERVED",
7376
+ "INTERACTION_NOTICE_OBSERVED"
7377
+ ].includes(milestone)) owned.authorizationMilestone = milestone;
7367
7378
  const notices = source.notices;
7368
7379
  if (!Array.isArray(notices)) return void 0;
7369
7380
  owned.notices = notices.map((notice) => {
@@ -7868,9 +7879,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7868
7879
  maxWidth: "100%",
7869
7880
  cursor: "pointer"
7870
7881
  };
7871
- function compactErrorMessage(code) {
7882
+ function compactErrorMessage(code, milestone) {
7872
7883
  if (code === "COPILOT_MODEL_DISCOVERY_FAILED") return "Could not refresh models. Try again.";
7873
- 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.";
7884
+ if (code === "COPILOT_AUTHORIZATION_BEGIN_FAILED") return `GitHub sign-in did not complete.${milestone === void 0 ? "" : ` Latest observed milestone: ${milestone}.`} Try again. If it continues, share diagnostic code COPILOT_AUTHORIZATION_BEGIN_FAILED with support.`;
7874
7885
  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.";
7875
7886
  if (code === "COPILOT_AUTHORIZATION_START_FAILED") return "Could not confirm sign-in. Retry status to check.";
7876
7887
  if (code === "COPILOT_AUTHORIZATION_CANCEL_FAILED") return "Could not confirm cancellation. Retry status to check.";
@@ -7971,7 +7982,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7971
7982
  fontSize: "13px",
7972
7983
  overflowWrap: "anywhere"
7973
7984
  }
7974
- }, compactErrorMessage(state.error)), authorizing ? (0, react.createElement)("div", {
7985
+ }, compactErrorMessage(state.error, view?.authorizationMilestone)), authorizing ? (0, react.createElement)("div", {
7975
7986
  "data-dsh-github-copilot-auto-authorization": true,
7976
7987
  style: {
7977
7988
  marginTop: "8px",