dsh-github-copilot 0.4.0-alpha.53 → 0.4.0-alpha.55

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
@@ -234,6 +234,8 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
234
234
 
235
235
  ## Changing capabilities
236
236
 
237
+ Auto history compatibility (alpha.54, #204): official rc.2 `Session.append()` has no public ignorable-envelope option. Do not emit optional `github-copilot/auto-model-decision` events or borrow another event type; retain native real-model provenance and durable Auto selection without a new attribution footer. `scripts/repair-auto-model-history.mjs` is explicit source-checkout maintenance, not a runtime hook: strict pinned official v4 validation, check-only by default, optional detached repaired copy plus byte-exact backup. It never replaces live history. Applying a copy requires separately approved stopped writers and a fresh source-hash check. See `docs/automatic-model-routing.md`.
238
+
237
239
  1. Identify the owning seam using `agent-contract.json`; do not duplicate an upstream owner.
238
240
  2. Add or update focused tests before changing deployment claims.
239
241
  3. Update both READMEs when user behavior, setup, migration, or boundaries change.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.55 (prepared)
4
+
5
+ - Use a quota-only, reusable TLS-verified dispatcher with Node default and system CA roots for the GitHub Copilot usage endpoint (#209). This removes reliance on launcher inheritance of `NODE_USE_SYSTEM_CA` for quota requests, without changing Core, sign-in, model/search transport or global trust.
6
+ - Show an explicit unavailable diagnostic if system trust cannot be read or the dispatcher cannot be created; preserve injected fetch isolation and close the dispatcher on disposal.
7
+
8
+ ## 0.4.0-alpha.54 (prepared)
9
+
10
+ - Stop writing optional Auto attribution events that official DSH 0.2.0-rc.2 cannot mark ignorable, preventing subsequent Session history reads from failing (#204). Auto routing, durable virtual selection, and Core's actual model provenance are unchanged; new turns omit the plugin-specific attribution footer.
11
+ - Add an explicit source-checkout recovery command using the unchanged official v4 codec. It validates a detached repaired copy and preserves a byte-exact original backup, without replacing live histories or restarting Desktop.
12
+
3
13
  ## 0.4.0-alpha.53 (prepared)
4
14
 
5
15
  - Fix Auto model concentration and context budget overflow by evaluating input fit as a hard routing condition before preference and distributing soft preferences across candidate bands with deterministic turn seeding (#199).
package/README.md CHANGED
@@ -13,7 +13,7 @@ A focused DSH companion for GitHub Copilot sign-in, account-aware model profiles
13
13
 
14
14
  - **Account and models:** sign in, inspect account-discovered models, refresh metadata, and manage the account from the native GitHub Copilot row under **Settings → Models**.
15
15
  - **Search routing:** choose the primary and fallback search providers under **Plugins → dsh-github-copilot → Details**. The page intentionally exposes only those user-facing choices; protocol probes, timeouts, allowlists, and transport switches are not presented as routine UI. If the updated routed service is not active yet, the card reports **Restart required** instead of presenting a broken form.
16
- - **Usage:** eligible Copilot sessions get an optional **Credits** control beside the composer, with provider-reported billing-cycle data and explicit unavailable/stale states. TLS diagnostics explain how Windows users behind Watt Toolkit/Steam++-style local trust roots can start Desktop with `NODE_USE_SYSTEM_CA=1` without disabling certificate verification.
16
+ - **Usage:** eligible Copilot sessions get an optional **Credits** control beside the composer, with provider-reported billing-cycle data and explicit unavailable/stale states. The quota request alone combines Node default and OS trust roots without disabling certificate verification or relying on Desktop launcher environment inheritance.
17
17
  - **Compatibility:** the plugin applies Copilot-only tool-schema, reasoning-presentation, request-budget, and account-model compatibility through published DSH APIs. It does not patch Core or maintain a second model catalog.
18
18
 
19
19
  ![Current Web search provider routing on the plugin details page](./docs/images/copilot-search-routing.png)
@@ -96,7 +96,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
96
96
 
97
97
  ## Install and sign in
98
98
 
99
- The commands below target the package version `0.4.0-alpha.53`. 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):
99
+ The commands below target the package version `0.4.0-alpha.55`. 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):
100
100
 
101
101
  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):
102
102
 
@@ -109,10 +109,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
109
109
  For a standalone named profile only, the supported CLI command is:
110
110
 
111
111
  ```sh
112
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
112
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.55/dsh-github-copilot-0.4.0-alpha.55.tgz
113
113
  ```
114
114
 
115
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.53` 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.
115
+ For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.55` 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.
116
116
 
117
117
  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.
118
118
 
@@ -126,7 +126,11 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
126
126
 
127
127
  ### Auto model routing
128
128
 
129
- The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool. Before preference, routing evaluates input headroom against each candidate's hard input budget, filtering out candidates that cannot accommodate current messages. Soft preferences distribute across upper/lower/center candidate bands using deterministic in-memory seeds to avoid monopolizing a single top candidate across Sessions. If no candidate fits, Auto selects the largest input capacity model and triggers compaction pressure on compressible history. Auto resolves once per Core turn to a real model; every tool step, retry and automatic compaction recovery in that turn stays on that model, while a later Chat or Goal turn may choose again. Image turns require an account-verified image-capable candidate. The completed turn tail shows `Auto · <actual model>` (or the selected preference) with a compact `?` explanation. Search keeps its independent provider-owned model policy, and subagents / Team teammates continue to inherit Core's concrete route rather than being relabeled as Auto. See the [policy and mockup](./docs/automatic-model-routing.md); model exclusions and a nested picker are still proposals.
129
+ The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool. Before preference, routing evaluates input headroom against each candidate's hard input budget, filtering out candidates that cannot accommodate current messages. Soft preferences distribute across upper/lower/center candidate bands using deterministic in-memory seeds to avoid monopolizing a single top candidate across Sessions. If no candidate fits, Auto selects the largest input capacity model and triggers compaction pressure on compressible history. Auto resolves once per Core turn to a real model; every tool step, retry and automatic compaction recovery in that turn stays on that model, while a later Chat or Goal turn may choose again. Image turns require an account-verified image-capable candidate. New turns retain Core's actual model/usage details but omit the plugin-specific Auto explanation footer: official rc.2 cannot safely append the optional plugin event. Compatible historical attribution remains visible. Search keeps its independent provider-owned model policy, and subagents / Team teammates continue to inherit Core's concrete route rather than being relabeled as Auto. See the [policy and mockup](./docs/automatic-model-routing.md); model exclusions and a nested picker are still proposals.
130
+
131
+ **History loading error mentioning `github-copilot/auto-model-decision`:** alpha.54 prevents new incompatible events; upgrading or restarting does not repair existing logs. The [explicit recovery command](./docs/automatic-model-routing.md#recovering-affected-histories) validates a detached copy with the official codec and retains an exact original backup. Applying it to a live Session requires separate approval and stopped writers; no automatic history migration occurs.
132
+
133
+ If a conversation disappeared after using the original alpha.54 recovery utility, use the corrected source-checkout utility: it restores the independent zstd header frame required for Desktop discovery, without deleting or changing logical history rows. Its report includes `reframedHeader`; logical event validation alone was insufficient in the original utility.
130
134
 
131
135
  When a virtual Auto preference is inherited as the default in a new Session, the first resolved request records that exact preference as the Session's durable selection while its request header still records the real model. Later turns retain the preference instead of locking to that header; explicitly selecting a real model switches to the fixed route. The existing `auto` ID remains Balance. Existing Sessions with a concrete recorded choice are not migrated by a change to the global default.
132
136
 
@@ -149,11 +153,11 @@ Agents should treat the browser authorization as a human handoff, not as a token
149
153
  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.
150
154
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
151
155
 
152
- 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.53`, 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).
156
+ 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.55`, 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).
153
157
 
154
158
  **Desktop package-update and Web-lifecycle boundaries:** the native manager's `restart-required` result for an in-place installed-package upgrade is authoritative and distinct from plugin-bundle removal/re-add behavior. Any plugin upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) cannot rebind active consumers via hot reload; Desktop must be fully exited and cold-restarted to take effect. A pinned public Loader characterization records that, with the exact bundle IDs and an active provider, staged first-add can leave global `ctx.web` and an active consumer unavailable even after the routed row is enabled. A separate complete cold-loaded Web-routing composition works initially but loses global `ctx.web` and its consumer on removal and remains unavailable after re-add/reconciliation. An earlier temporary harness used alias IDs and no active provider, so its successful final add was not equivalent to the exact bundle fixture. These are synthetic Loader observations, not native Desktop manager coverage or proof of restart recovery. Do not use bundle removal/re-add as a hot-upgrade workaround; follow the manager's upgrade result and separately authorized restart requirements. See [the rc.2 lifecycle characterization and bounded public-API finding](https://github.com/cloga/dsh-github-copilot/blob/main/docs/web-lifecycle-rc2.md).
155
159
 
156
- **Host TLS trust diagnostics:** no Desktop trust preference was found. The linked lifecycle note records a narrowly scoped, user-owned launcher option for a fresh Desktop process with Node system CA trust enabled; it expands the accepted CA set and is not a fix established for the prior sign-in failure. It requires a full quit first to avoid single-instance handoff and durable launcher/standard-I/O lifetime. It is documentation only: no launcher, global environment, Desktop profile, shortcut, trust store, or live process was changed.
160
+ **Host TLS trust boundary:** this plugin adds system roots only to its quota request; it does not change Desktop process trust, sign-in, models, search or other requests. A correctly environmented Desktop launch previously restored quota, while a recovery launch without the inherited process variable caused it to regress despite HKCU retaining `NODE_USE_SYSTEM_CA=1`; normal relaunch restored it. The quota fix avoids this launcher dependency after an authorized upgrade and reload. No live Desktop profile, trust store or process is changed by the package alone.
157
161
 
158
162
  No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
159
163
 
@@ -352,7 +356,7 @@ Existing installations must follow the [single-route migration guide](./docs/sin
352
356
  - **`AUTH` / “API key is invalid” after signing in again:** this label does not prove the conversation cached an old key. On the managed route, an observed model HTTP 401 retires only the exact current token proof, except the narrowly recognized Responses replay-scope rejection described below. The failed request stays failed: no automatic message replay, logout or model switch. Your next request (or model discovery) can perform one native OAuth renewal even before stored expiry, then validate account metadata. Repeated rejection is bounded per account by `accountModelFailureCooldownMs` (five minutes by default, at least one second); even forced discovery cannot bypass this recovery cooldown. If the renewed token is still rejected, wait for the cooldown and inspect account/permission status rather than repeatedly signing out. A new sign-in is not overwritten by a late old response. HTTP 403, network errors and strings mentioning 401 do not trigger this recovery. It observes native HTTP transport only; WebSocket recovery and live endpoint acceptance are not claimed.
353
357
  - **`input item ID does not belong to this connection` / `input item does not belong to this connection`:** these are the two observed Responses history-reference rejection messages, not proof of an invalid API key. On `github-copilot-preview` only, a bounded clone of the actual HTTP 401 JSON identifies these exact uncoded errors, with matching outer/nested messages; the plugin reports `INVALID_REQUEST` with `COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH` without retiring shared account proof, aborting neighboring calls, renewing credentials or retrying the request. Unknown, malformed, oversized or ambiguous error bodies retain native authentication handling. Historical error records are not rewritten.
354
358
  - **Managed Responses replay compatibility:** the public SDK `onPayload` hook normalizes only direct item IDs on complete assistant messages, function calls and reasoning items carrying encrypted content. It preserves `call_id` pairing, encrypted bytes, public summaries, `phase`, nested IDs and durable history. Reference-only, incomplete or unsupported ID-bearing items fail explicitly with `COPILOT_RESPONSES_REPLAY_UNSUPPORTED`; no hidden history trimming or model switch occurs. This is Copilot-specific, not a universal OpenAI schema change: public OpenAI types require IDs on some replay forms. Native SDK/pinned-Core synthetic tests verify transport shape and isolation, not real Copilot acceptance of an old conversation. Canonical `github-copilot`, other providers and non-Responses protocols are unchanged; install/activation and old-session endpoint acceptance require separate review.
355
- - **Quota TLS verification failure (`COPILOT_USAGE_TLS` / `UNABLE_TO_VERIFY_LEAF_SIGNATURE`):** when using network accelerators or local proxies such as Watt Toolkit / Steam++, GitHub HTTPS requests are intercepted via a local self-signed root CA installed in the Windows system certificate store. Because Node.js defaults to its built-in Mozilla CA bundle, it does not trust the local CA without configuration. On Node.js 22.13.0+ / 24+, configure `NODE_USE_SYSTEM_CA=1` in your User environment variables (via `[Environment]::SetEnvironmentVariable("NODE_USE_SYSTEM_CA", "1", "User")`) or in the Desktop launcher script. This enables Node.js to trust the Windows system certificate store while strictly preserving TLS signature verification. `dsh-doctor.mjs --fix` and `dsh-windows-ops` will automatically configure this environment setting.
359
+ - **Quota TLS verification failure (`COPILOT_USAGE_TLS` / `UNABLE_TO_VERIFY_LEAF_SIGNATURE`):** the quota request uses a reusable, TLS-verified agent combining Node's default and system CA roots, including trusted Windows roots installed by Watt Toolkit / Steam++-style accelerators. `NODE_USE_SYSTEM_CA=1` is no longer required for this plugin-owned request after the updated plugin is loaded; it can still matter for unrelated Desktop traffic. `COPILOT_USAGE_TRUST_UNAVAILABLE` means system roots could not be loaded or the agent could not be created, and no request was sent. Check the Host certificate store and proxy configuration without disabling verification; neither diagnostic proves a specific proxy or live account status.
356
360
  - **Scope rejection persists after alpha.36:** its original exact-message classifier missed the observed wording without `ID`. Alpha.37 only closes that classification/isolation gap; it does not further rewrite payloads or prove that the rejected history can be replayed. The parallel-request failure is reproduced with the native adapter in a fixture that does not load cron. This establishes a companion error-handling defect, not the upstream reason for rejecting the original item. `Request aborted` alone does not identify its cause; `COPILOT_MODEL_SOURCE_AUTH_FAILED` is a generalized pre-catalog auth-resolution failure, whose cached result may recur without another auth attempt. Compare actual loaded version, request provenance and the same history/model before attributing another machine's success to a plugin downgrade or cron removal. Do not silently discard encrypted reasoning, retry old business work or reset credentials.
357
361
  - **Canonical route says `not-configured`:** with configured login this is normal managed-only mode; inspect account discovery separately rather than creating a native profile.
358
362
  - **Delete dialog stays on “Deleting…”:** this update does not prove that hang fixed. Do not repeatedly delete; after an authorized Host stop, inspect persisted settings and follow the migration guide before deciding whether any removal is still needed.
@@ -420,8 +424,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
420
424
  `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.
421
425
 
422
426
  ```sh
423
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
424
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/SHA256SUMS
427
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.55/dsh-github-copilot-0.4.0-alpha.55.tgz
428
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.55/SHA256SUMS
425
429
  sha256sum --check SHA256SUMS
426
430
  ```
427
431
 
@@ -429,7 +433,7 @@ PowerShell can verify the same two downloaded files with:
429
433
 
430
434
  ```powershell
431
435
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
432
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.53.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
436
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.55.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
433
437
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
434
438
  ```
435
439
 
package/README.zh.md CHANGED
@@ -13,14 +13,14 @@
13
13
 
14
14
  - **账号与模型:**在 **设置 → 模型** 的原生 GitHub Copilot 行内完成登录、查看账号发现模型、刷新元数据及账号管理。
15
15
  - **搜索路由:**在 **插件 → dsh-github-copilot → 详情**选择主搜索 Provider 与兜底 Provider。页面只保留用户真正需要的两项选择,不再把协议探测、超时、白名单或传输开关作为日常配置暴露。更新后的路由服务尚未激活时,卡片会明确显示 **需要重启生效(Restart required)**,而不是继续展示无法使用的表单。
16
- - **用量:**符合条件的 Copilot 会话会在输入框旁显示可选的 **Credits / 额度** 控件,展示供应方明确返回的计费周期数据,并如实区分不可用与历史快照。TLS 诊断会指导使用 Watt Toolkit/Steam++ 等本地信任根的 Windows 用户通过 `NODE_USE_SYSTEM_CA=1` 启动 Desktop,无需关闭证书校验。
16
+ - **用量:**符合条件的 Copilot 会话会在输入框旁显示可选的 **Credits / 额度** 控件,展示供应方明确返回的计费周期数据,并如实区分不可用与历史快照。仅额度请求组合 Node 默认证书与系统信任根,无需依赖 Desktop launcher 的环境变量继承,且保持 TLS 验签。
17
17
  - **兼容处理:**插件通过 DSH 已发布公开接口提供 Copilot 专用 Tool Schema、Thinking 展示、请求预算及账号模型兼容,不修改 Core,也不维护第二套模型目录。
18
18
 
19
19
  ![当前插件详情页的 Web 搜索 Provider 路由](./docs/images/copilot-search-routing.png)
20
20
 
21
21
  截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
22
22
 
23
- > 当前文档与安装命令对应版本 `0.4.0-alpha.53`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
23
+ > 当前文档与安装命令对应版本 `0.4.0-alpha.55`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
24
24
 
25
25
  Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
26
26
 
@@ -111,10 +111,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
111
111
  仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
112
112
 
113
113
  ```sh
114
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
114
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.55/dsh-github-copilot-0.4.0-alpha.55.tgz
115
115
  ```
116
116
 
117
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.53`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
117
+ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.55`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
118
118
 
119
119
  随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
120
120
 
@@ -128,7 +128,11 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
128
128
 
129
129
  ### Auto 模型路由
130
130
 
131
- 托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有验证过的图片候选。回复末尾显示 `Auto · <真实模型>`(或所选偏好)和原因。搜索仍由独立策略管理;原生子代理与 Team 队友继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md);模型排除与嵌套菜单仍只是提案。
131
+ 托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有验证过的图片候选。新轮次保留 Core 的真实模型/用量信息,但暂不生成插件专属的 Auto 原因提示:官方 rc.2 无法安全追加这类可选插件事件;兼容历史中的归因仍保留显示。搜索仍由独立策略管理;原生子代理与 Team 队友继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md);模型排除与嵌套菜单仍只是提案。
132
+
133
+ **历史加载报错包含 `github-copilot/auto-model-decision`:**alpha.54 阻止新问题事件写入,但升级或重启不会修复已有日志。[显式恢复命令](./docs/automatic-model-routing.md#recovering-affected-histories)使用官方 codec 校验独立修复副本,同时保存原始字节备份。替换实际 Session 日志必须另行批准并先停止所有写入者;插件不会自动迁移历史。
134
+
135
+ 如果使用原始 alpha.54 恢复工具后会话从列表消失,请使用修正后的源码恢复工具:它会恢复 Desktop 发现会话所需的独立 zstd 头帧,不删除或改变逻辑历史记录。报告中的 `reframedHeader` 表示此项修复;原工具仅校验逻辑事件,并不足以证明 Desktop 可读。
132
136
 
133
137
  新 Session 继承任一默认 Auto 偏好时,首次解析请求会把准确的虚拟偏好记录为该 Session 的持久选择,请求头仍记录实际模型。后续轮次继续保留该偏好,而不会固定到请求头;显式选择真实模型才切换到固定路由。旧 `auto` ID 保持均衡档。全局默认值变化不会迁移已有具体模型记录的 Session。
134
138
 
@@ -151,11 +155,11 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
151
155
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
152
156
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
153
157
 
154
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.53`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
158
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.55`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
155
159
 
156
160
  **Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。任何包含服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的插件升级均无法通过热重载重新绑定活动组件与 consumer,必须退出应用并冷重启 Desktop 才能完全生效。pinned public Loader characterization 记录了:使用 bundle 的精确 ID 且 provider 已激活时,分阶段首次添加可能在 routed row 启用后仍令全局 `ctx.web` 和 consumer 不可用;另一独立序列从完整冷加载且正常工作的 Web-routing composition 开始,移除后全局 `ctx.web` 与 consumer 不可用,重加/重试 reconciliation 仍未恢复。较早的临时 harness 使用别名 ID 且没有 active provider,因此其最终添加成功并不等同于精确 bundle fixture。这些都是合成 Loader 观察,不是原生 Desktop manager 覆盖,也不证明重启后恢复。不要用移除/重加 bundle 作为热升级绕行;遵循 manager 的升级结果及另行批准的重启要求。详见 [rc.2 生命周期 characterization 与有限的 public API 结论](https://github.com/cloga/dsh-github-copilot/blob/main/docs/web-lifecycle-rc2.md)。
157
161
 
158
- **Host TLS trust 诊断:**未发现 Desktop trust 设置。上述生命周期说明记录了一个仅供未来选择的、用户自有 launcher 选项:为全新 Desktop process 启用 Node system CA trust;它会扩大可接受 CA 集合,且尚未证明能修复先前 sign-in 失败。必须先完整退出,以免单实例 handoff,并让 launcher 及其标准 I/O 在 Desktop 生命周期内保持有效。这仅是文档建议;没有创建 launcher,也没有修改全局环境、Desktop profile、快捷方式、trust store 或运行中的进程。
162
+ **Host TLS trust 边界:**本插件只为额度请求添加系统信任根,不修改 Desktop 进程级信任、登录、模型、搜索或其他请求。之前带有正确环境变量的 Desktop 启动让额度恢复;后续恢复脚本启动没有继承进程变量,尽管 HKCU 保留 `NODE_USE_SYSTEM_CA=1`,额度仍再次失败;正常手动启动后又恢复。更新后的插件在获准升级和重新加载后消除额度请求对该继承链的依赖;仅发布包不会修改当前 Desktop profile、trust store 或进程。
159
163
 
160
164
  不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
161
165
 
@@ -363,7 +367,7 @@ Copilot Session 如需更宽的文件或命令权限,必须在调用前选择
363
367
  - **重新登录后出现 `AUTH`/“API key is invalid”:**这个标签并不证明旧会话缓存了旧 Key。托管路由实际收到模型 HTTP 401 后,只撤销与当前请求精确匹配的 Token 证明,但下述严格识别的 Responses 历史引用错误除外;该次请求仍然失败,不自动重发消息、退出登录或切换模型。下一次请求(或模型发现)可通过原生 OAuth 进行一次续期,即使记录的有效期尚未到期,随后重新校验账号模型元数据。连续拒绝受账号级 `accountModelFailureCooldownMs` 限制(默认五分钟,至少一秒),强制发现也不能绕过该恢复冷却。续期后仍被拒绝时,请等待冷却并检查账号/权限状态,不要反复退出登录。迟到的旧响应不能覆盖新登录;403、网络错误和仅含 401 字样的错误不触发恢复。这里只观察原生 HTTP 传输,不声称覆盖 WebSocket,也不代表真实端点验收通过。
364
368
  - **`input item ID does not belong to this connection`/`input item does not belong to this connection`:**这是已观测到的两种 Responses 历史引用拒绝文案,不证明 API key 无效。仅在 `github-copilot-preview` 上,插件对实际 HTTP 401 JSON 的有界副本严格识别这两种无错误码的精确文案,并要求外层/内层消息一致,返回带 `COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH` 的 `INVALID_REQUEST`;不撤销共享账号证明、不连带中止其他请求、不续期凭据,也不自动重发。未知、格式错误、过大或存在歧义的错误体继续沿用原生鉴权处理;历史报错记录不会被改写。
365
369
  - **托管 Responses 历史兼容处理:**通过 SDK 公开 `onPayload` 回调,只处理完整 assistant 消息、函数调用以及携带加密内容的 reasoning 条目的直接 item ID。保留 `call_id` 配对、加密字节、公开摘要、`phase`、嵌套 ID 和持久化历史。仅含引用、不完整或不支持的带 ID 条目明确报 `COPILOT_RESPONSES_REPLAY_UNSUPPORTED`,不暗中裁剪历史或切换模型。这是 Copilot 特定兼容策略,不是对通用 OpenAI 协议的改写:公开 OpenAI 类型要求部分回放条目具有 ID。原生 SDK/固定 Core 的合成测试只证明请求形态与隔离行为,不证明真实 Copilot 已接受旧会话。Core 自有 `github-copilot`、其他供应方和非 Responses 协议保持不变;安装、激活和旧会话端点验收需分别确认。
366
- - **用量与额度 TLS 验签失败(`COPILOT_USAGE_TLS` / `UNABLE_TO_VERIFY_LEAF_SIGNATURE`):**当使用 Watt Toolkit(Steam++)等网络加速器或本地代理时,代理通常会向 Windows 系统证书库安装本地根证书以拦截并代理 GitHub HTTPS 流量。Node.js 默认仅信任内置 Mozilla CA 证书库,因此会出现证书链无法验证的错误。在 Node.js 22.13.0+ / 24+ 环境下,在用户环境变量中设置 `NODE_USE_SYSTEM_CA=1`(或通过 `[Environment]::SetEnvironmentVariable("NODE_USE_SYSTEM_CA", "1", "User")` 固化),或者在 Desktop 启动脚本中添加 `set "NODE_USE_SYSTEM_CA=1"`。该设置让 Node.js 信任 Windows 系统证书库,同时保持严格的 TLS 签名验证。`dsh-doctor.mjs --fix` 及 `dsh-windows-ops` 工具集均已固化该检测与自动修复逻辑。
370
+ - **用量与额度 TLS 验签失败(`COPILOT_USAGE_TLS` / `UNABLE_TO_VERIFY_LEAF_SIGNATURE`):**额度请求使用可复用的专用 agent,组合 Node 默认与系统证书信任根,包括 Watt Toolkit/Steam++ 等加速器安装的受信任 Windows 根证书。更新插件实际加载后,此请求不再需要 `NODE_USE_SYSTEM_CA=1`;其他 Desktop 流量仍可能依赖该进程设置。`COPILOT_USAGE_TRUST_UNAVAILABLE` 表示无法读取系统证书或创建 agent,请求未发送。请检查 Host 证书库和代理配置,不要关闭 TLS 验签;仅凭诊断无法证明具体代理路径或账号状态。
367
371
  - **alpha.36 后仍有历史作用域拒绝:**原先的精确分类漏掉了不含 `ID` 的已观测文案。Alpha.37 只补齐分类与隔离,不进一步改写 payload,也不证明原被拒绝的历史已经可用。不加载 cron 的原生适配器测试已复现并行请求被连带中断,证明的是 Copilot 插件错误处理缺陷,而不是上游拒绝条目的原始原因。`Request aborted` 单独不能确定取消来源;`COPILOT_MODEL_SOURCE_AUTH_FAILED` 是目录发现前认证解析的泛化错误,缓存结果可重复返回而不代表再次认证。判断另一台机器为何正常,需对齐实际加载版本、请求来源和同一历史/模型,不能直接归因于降级插件或卸载 cron。不要暗中丢弃加密 reasoning、重发旧业务或重置凭据。
368
372
  - **Canonical 状态为 `not-configured`:**已登录时属于正常单托管路由模式;账号发现就绪与否另行检查,不需要创建原生 profile。
369
373
  - **删除对话框一直显示 “Deleting…”:**本次改动不证明该卡住问题已修复。不要重复删除;取得许可停止 Host 后检查持久化设置,按迁移指南判断是否仍需移除。
@@ -431,8 +435,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
431
435
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
432
436
 
433
437
  ```sh
434
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
435
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/SHA256SUMS
438
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.55/dsh-github-copilot-0.4.0-alpha.55.tgz
439
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.55/SHA256SUMS
436
440
  sha256sum --check SHA256SUMS
437
441
  ```
438
442
 
@@ -440,7 +444,7 @@ PowerShell 可以对已下载的同一组文件执行:
440
444
 
441
445
  ```powershell
442
446
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
443
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.53.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
447
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.55.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
444
448
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
445
449
  ```
446
450
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.53"
11
+ "version": "0.4.0-alpha.55"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -988,7 +988,7 @@
988
988
  "required": true,
989
989
  "sourceMarkers": [
990
990
  {"file": "src/preview-route.ts", "marker": "GITHUB_COPILOT_AUTO_MODEL_ID"},
991
- {"file": "src/auto-model-host.ts", "marker": "github-copilot/auto-model-decision"},
991
+ {"file": "src/auto-model-host.ts", "marker": "keep attribution out of the log"},
992
992
  {"file": "src/auto-model-presentation.ts", "marker": "conversation.chat.turnTail"},
993
993
  {"file": "src/auto-model-presentation.ts", "marker": "data-time-hover-root"},
994
994
  {"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
@@ -999,6 +999,7 @@
999
999
  {"file": "tests/auto-model-host.spec.ts", "name": "resolves after downstream model selection and freezes one decision per turn"},
1000
1000
  {"file": "tests/auto-model-host.spec.ts", "name": "replaces Core virtual-Auto switch guidance with the resolved real route"},
1001
1001
  {"file": "tests/auto-model-presentation.spec.ts", "name": "folds a durable decision into turn-scoped credential-free attribution"},
1002
+ {"file": "tests/auto-model-presentation.spec.ts", "name": "omits attribution when a compatible history contains no optional decision"},
1002
1003
  {"file": "tests/auto-model-presentation.spec.ts", "name": "places Auto attribution after the settled clock and reveals it only on hover"},
1003
1004
  {"file": "tests/preview-route.spec.ts", "name": "publishes Auto as a virtual picker entry but refuses unresolved adapter dispatch"},
1004
1005
  {"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "shrinks durable history and rebuilds the switched model request without sending the oversized original"}
@@ -67,7 +67,7 @@ To avoid monopolizing a single top candidate (such as Grok 4.7) across all turns
67
67
 
68
68
  These are **capacity preferences**, not measured quality, speed, price, or inference-cost preferences. They cannot promise that Intelligence is smarter or Efficiency faster or cheaper. The actual request-budget and compaction checks still apply after selection; no cost or speed metadata is fabricated.
69
69
 
70
- The exact virtual preference stays in the Session's pending selection across turns, while each real request header and transport record the chosen account model. The durable decision event also records the preference, candidate counts, input budget, and input fit diagnostic. Switching to a real model ends automatic routing for subsequent turns.
70
+ The exact virtual preference stays in the Session's pending selection across turns, while each real request header and transport record the chosen account model. Switching to a real model ends automatic routing for subsequent turns. New turns no longer write a separate decision event; compatible historical events without a preference field remain Balance for display.
71
71
 
72
72
  ## Images
73
73
 
@@ -104,6 +104,10 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
104
104
 
105
105
  ## Attribution and explanation
106
106
 
107
+ **Compatibility fix (alpha.54):** new turns omit the plugin-specific Auto footer. Official `0.2.0-rc.2` cannot set an `ignorable` envelope through public `Session.append()`, and its reader rejects unknown required plugin events. The plugin therefore stops writing `github-copilot/auto-model-decision` rather than patching Core, mutating event objects, or borrowing an unrelated event type. Core's actual model/usage provenance and Auto routing remain unchanged. Restore new attribution only when a supported public informational-event or equivalent storage seam has proven cold-read compatibility.
108
+
109
+ The following presentation remains available for compatible historical decision events; absence of such an event produces no plugin attribution or guessed explanation.
110
+
107
111
  Core already places route and usage details at the end of a completed turn. The MVP follows that interaction pattern rather than adding provider/model tags above the answer.
108
112
 
109
113
  For a completed Auto response, the attribution sits on the same footer row as Core's usage and clock, after the end time. It stays hidden until the message is hovered or focused, matching that chrome. It is not a separate line above the answer. The turn-tail display is:
@@ -121,7 +125,29 @@ The `?` opens a compact explanation using normalized facts such as:
121
125
  - number of eligible account models;
122
126
  - number of models that can fit turn context (when restricted by input headroom).
123
127
 
124
- The plugin records a credential-free `github-copilot/auto-model-decision` Session event before Core persists the real request header. Historical attribution is derived from that durable decision plus assistant/request provenance, never from the current picker or a later catalog snapshot. Raw prompts, credentials, provider response bodies, and guessed prices are never disclosed.
128
+ Earlier releases recorded a credential-free `github-copilot/auto-model-decision` Session event before Core persisted the real request header. Historical attribution is derived from that durable decision, never from the current picker or a later catalog snapshot. Raw prompts, credentials, provider response bodies, and guessed prices are never disclosed.
129
+
130
+ ### Recovering affected histories
131
+
132
+ Upgrading prevents new incompatible events but does **not** rewrite existing logs. Repeated restarts cannot repair a stored missing marker.
133
+
134
+ From a source checkout of this version, with Node 24 LTS and the pinned dependencies installed using `pnpm install --frozen-lockfile`, run:
135
+
136
+ ```powershell
137
+ # Read-only validation; prints counts, affected sequence numbers and hashes, never conversation content.
138
+ node scripts\repair-auto-model-history.mjs 'C:\absolute\path\session.v4.jsonl.zstd'
139
+
140
+ # Optional: create a NEW private recovery directory outside the live Session directory.
141
+ node scripts\repair-auto-model-history.mjs 'C:\absolute\path\session.v4.jsonl.zstd' --write-copy 'C:\private\new-recovery-directory'
142
+ ```
143
+
144
+ This is an explicit offline maintenance utility, not an installed plugin hook. It reads all concatenated zstd frames, uses the exact published official `0.2.0-rc.2` format catalog for strict whole-history validation, and adds only `ignorable: true` to recognized Auto decision envelopes. It preserves type, sequence, time, data and all other rows. Unknown required events, invalid decisions, torn tails, invalid relationships, non-v4 input and compressed/decoded inputs over 128 MiB fail closed. It never repairs or drops other errors.
145
+
146
+ Copy mode creates `original.session.v4.jsonl.zstd` (byte-exact backup), `session.v4.jsonl.zstd` (validated repaired copy), and `repair.json` (SHA-256 receipt). It refuses existing destinations and never writes the source. Keep the directory private: both logs contain conversation history. A check/copy can become stale if an active writer appends later.
147
+
148
+ The compressed output keeps the header in its own first zstd frame, as required by Desktop's persistence discovery and reader. The original alpha.54 utility incorrectly combined the header and events into one frame: those copies passed logical event validation but disappeared from Desktop discovery. Use the corrected utility on such a copy; `reframedHeader: true` reports this physical-layout repair even when `changedSeqs` is empty. No logical rows change during reframing, and the current source is backed up separately. A zero `changedSeqs` count alone from the original utility was not proof of Desktop readability.
149
+
150
+ **Applying a copy requires separate operator approval:** first stop all writers for that Session, verify the fixed plugin will load before resuming, and recheck the live log against `originalSha256`. If it changed, regenerate and validate a fresh copy. Preserve the backup, replace only the exact affected log, verify its hash against `repairedSha256`, then use the normal official history reader to reopen it. Do not replay business requests as a test. If recovery fails, stop writers before restoring the exact original backup. Neither this utility nor the plugin installs itself, replaces a live file, restarts Desktop, clears credentials, or automatically migrates histories.
125
151
 
126
152
  ## Subagents and Agent Teams
127
153
 
@@ -166,7 +192,7 @@ The implementation is accepted only when unchanged official Core contract tests
166
192
  6. image admission and real candidate filtering agree, including the no-image-candidate failure.
167
193
  7. choosing a smaller-context model can trigger the existing local pressure signal, Core compaction, and same-model retry without sending the oversized request.
168
194
  8. hosted search remains independent and never receives the virtual Auto ID as a transport model.
169
- 9. the turn-tail attribution is derived from durable decision/provenance data and is hidden for explicit model turns.
195
+ 9. no new unknown required attribution event is written; compatible historical attribution is retained, while missing decision events produce no guessed footer.
170
196
  10. input fit check filters out candidates with insufficient hard input headroom before soft preference.
171
197
  11. soft preferences distribute across upper/lower/center candidate bands without monopolizing one top model.
172
198
  12. no Core file, dependency artifact, private registry, shared model catalog, or live history is modified.
@@ -24,7 +24,9 @@ The Host uses the existing `llm-pi-ai/github-copilot` OAuth grant through public
24
24
 
25
25
  Quota requests are lazy, single-flight and bounded by timeout, response size and cache/failure policy. Account continuity is checked around asynchronous work and before releasing cached data. Authentication denial, sign-out, account invalidation or disposal must not release a previous account's snapshot. A same-account transient failure may expose a timestamped last-known snapshot, never a current balance. Responses and diagnostics exclude tokens, raw provider bodies and account identifiers. Requests do not follow redirects with the credential; custom enterprise hosts are not guessed.
26
26
 
27
- Known certificate-validation failures in the Host fetch are reported as `COPILOT_USAGE_TLS` instead of an undifferentiated network failure. This is a read-only diagnostic, not proof of the exact Desktop network path or authorization state; inspect the Host's trust store and approved proxy configuration without disabling TLS validation. On Windows environments using network accelerators or local proxies such as Watt Toolkit / Steam++, the proxy intercepts HTTPS traffic with a local root certificate installed into the Windows system certificate store. Because Node.js historically relies on its built-in Mozilla CA bundle, Node.js 22.13.0+ / 24+ provides native system CA support via `NODE_USE_SYSTEM_CA=1`. Setting `NODE_USE_SYSTEM_CA=1` in the user environment or launcher script allows Node.js to trust the Windows system certificate store while maintaining strict TLS signature verification. Other fetch failures remain `COPILOT_USAGE_NETWORK`. When the account snapshot is unavailable, details show the diagnostic and guidance instead of empty oversized credit columns or an implied budget. The popover background is opaque even if the host's menu token contains transparency.
27
+ The plugin's default quota fetch lazily creates one request-scoped Undici agent for `https://api.github.com/copilot_internal/user`. It unions and deduplicates `tls.getCACertificates('default')` (including any configured extra CA certificates) and `tls.getCACertificates('system')`, with `rejectUnauthorized: true`. Node 22.19.0 provides both CA APIs; Undici 6 supports that runtime floor. The agent is reused for refreshes and destroyed on controller disposal. Injected test fetchers bypass the agent. No global dispatcher, environment variable, Desktop trust preference, model/search transport or credential owner is changed.
28
+
29
+ This removes reliance on a Desktop launcher inheriting `NODE_USE_SYSTEM_CA=1` for **quota requests only**. On a machine where Watt Toolkit / Steam++ installs a trusted Windows root, quota worked under a correctly environmented launch, then failed when a recovery launcher omitted the process variable despite its persistence in HKCU; a normal manual relaunch restored quota. That is operational evidence for the launcher-inheritance explanation, not proof that this new plugin build has been installed or loaded. Other Desktop traffic, including sign-in and models, still follows its existing process-level trust configuration. If system CA retrieval or agent creation fails, the quota shows `COPILOT_USAGE_TRUST_UNAVAILABLE` without issuing a request or weakening TLS. Certificate verification failures still show `COPILOT_USAGE_TLS`; other fetch failures remain `COPILOT_USAGE_NETWORK`. No diagnostic alone proves proxy routing, authorization or a live balance. Inspect approved Host trust/proxy settings without disabling TLS validation. When unavailable, details show guidance instead of implying a budget. The popover background is opaque even if the host's menu token contains transparency.
28
30
 
29
31
  The Client receives only the separate strict `githubCopilotUsage` namespace (`get` and `refresh`). Existing authorization and migration methods retain their schemas. Refresh does not change settings, budget, plan, model selection or billing policy. This meter is informational and does not authorize spending or implement a budget enforcement loop.
30
32
 
package/lib/client.js CHANGED
@@ -5497,6 +5497,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5497
5497
  "COPILOT_USAGE_NO_ALLOCATION",
5498
5498
  "COPILOT_USAGE_NETWORK",
5499
5499
  "COPILOT_USAGE_TLS",
5500
+ "COPILOT_USAGE_TRUST_UNAVAILABLE",
5500
5501
  "COPILOT_USAGE_TIMEOUT",
5501
5502
  "COPILOT_USAGE_BODY_TOO_LARGE",
5502
5503
  "COPILOT_USAGE_REDIRECT",
@@ -6879,7 +6880,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6879
6880
  refreshing: "Refreshing…",
6880
6881
  error: "Could not refresh usage. Try again.",
6881
6882
  unavailableExplanation: "Account usage is currently unavailable.",
6882
- tlsError: "Could not verify the connection to GitHub. If using an accelerator or proxy like Watt Toolkit, enable system CA trust (set NODE_USE_SYSTEM_CA=1 in environment); TLS verification stays enabled.",
6883
+ tlsError: "Could not verify the connection to GitHub using Node and system CA trust. Check the Host certificate store or proxy configuration; TLS verification remains enabled.",
6884
+ trustError: "Could not load system CA trust for the quota request. Check that the Host supports Node system certificates; TLS verification was not bypassed.",
6883
6885
  signedOut: "Sign in to Copilot in Models to view account usage.",
6884
6886
  lastUpdated: "Last updated",
6885
6887
  reset: "Resets",
@@ -6911,7 +6913,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6911
6913
  refreshing: "正在刷新…",
6912
6914
  error: "无法刷新用量,请重试。",
6913
6915
  unavailableExplanation: "当前无法获取账号用量。",
6914
- tlsError: "无法验证与 GitHub 的连接。若使用 Watt Toolkit 等加速器或代理,可启用系统证书库(设置环境变量 NODE_USE_SYSTEM_CA=1);TLS 验证仍保持开启。",
6916
+ tlsError: "使用 Node 和系统证书信任仍无法验证 GitHub 连接。请检查 Host 的证书库或代理配置;TLS 验证保持开启。",
6917
+ trustError: "无法为额度请求加载系统证书信任。请检查 Host 是否支持 Node 系统证书;不会绕过 TLS 验证。",
6915
6918
  signedOut: "请在模型设置中登录 Copilot,以查看账号用量。",
6916
6919
  lastUpdated: "更新于",
6917
6920
  reset: "重置时间",
@@ -7188,7 +7191,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7188
7191
  }, t.missing) : null, failed ? (0, react.createElement)("p", {
7189
7192
  role: "alert",
7190
7193
  style: muted
7191
- }, t.error) : null, view?.state === "signed-out" ? (0, react.createElement)("p", { style: muted }, t.signedOut) : !available && !busy && props.remote !== void 0 ? (0, react.createElement)("p", { style: muted }, view?.diagnostic === "COPILOT_USAGE_TLS" ? t.tlsError : t.unavailableExplanation) : null, available ? (0, react.createElement)("div", { style: {
7194
+ }, t.error) : null, view?.state === "signed-out" ? (0, react.createElement)("p", { style: muted }, t.signedOut) : !available && !busy && props.remote !== void 0 ? (0, react.createElement)("p", { style: muted }, view?.diagnostic === "COPILOT_USAGE_TLS" ? t.tlsError : view?.diagnostic === "COPILOT_USAGE_TRUST_UNAVAILABLE" ? t.trustError : t.unavailableExplanation) : null, available ? (0, react.createElement)("div", { style: {
7192
7195
  display: "grid",
7193
7196
  gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
7194
7197
  gap: 12