dsh-github-copilot 0.4.0-alpha.48 → 0.4.0-alpha.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.50 (prepared)
4
+
5
+ - Add a visible restart banner in `WebSearchRoutingCard` when the routed search service composition is unready, guiding users to cold-restart Desktop (#196).
6
+ - Streamline the plugin details configuration page by removing the internal `HostedSearchSettingsCard` debugging form from `plugins.bundle.config`, leaving only `WebSearchRoutingCard`.
7
+ - Add guidance on `NODE_USE_SYSTEM_CA=1` for Copilot Quota TLS verification when using network accelerators or local proxies like Watt Toolkit (Steam++).
8
+ - Update documentation on cold-restart requirements for `cordis.patch.yml` service recomposition and Windows system CA trust.
9
+
10
+ ## 0.4.0-alpha.49 (prepared)
11
+
12
+ - Add bounded soft capacity preferences to Copilot Auto model routing (#192).
13
+
3
14
  ## 0.4.0-alpha.48 (prepared)
4
15
 
5
16
  - Keep the managed Copilot Auto model selected across turns when inherited as a new Session's default; record its durable intent before the first real-model request header and restore the virtual route on later turns (#189).
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.48`. 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.50`. 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.48/dsh-github-copilot-0.4.0-alpha.48.tgz
101
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.50/dsh-github-copilot-0.4.0-alpha.50.tgz
102
102
  ```
103
103
 
104
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.48` 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.50` 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
 
@@ -115,9 +115,9 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
115
115
 
116
116
  ### Auto model routing
117
117
 
118
- The managed GitHub Copilot group includes a virtual **Auto** model. Auto resolves once per Core turn to a real model from the current authenticated account catalog; every tool step, retry and automatic compaction recovery in that turn stays on that real 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>` with a compact `?` explanation. Search keeps its independent provider-owned model policy, and general native subagents continue to inherit Core's concrete route rather than being relabeled as Auto. The deterministic MVP uses advertised capacity only and makes no model-quality, latency, price, health or GitHub-private-router claim. See the [MVP contract and mockup](./docs/automatic-model-routing.md).
118
+ 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; the preference biases the advertised-capacity ranking, not model eligibility, quality, speed or cost. 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 general native subagents 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.
119
119
 
120
- When Auto is inherited as the default in a new Session, the first resolved request records Auto as the Session's durable selection while its request header still records the real model. Later turns remain on Auto instead of locking to that header; explicitly selecting a real model switches to the fixed route. Existing Sessions with a concrete recorded choice are not migrated by a change to the global default.
120
+ 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.
121
121
 
122
122
  One shared account-state owner survives transfer while another eligible surface remains mounted. Last-surface unmount or nonoverlapping declaration replacement stops polling; a later mount reads status and separately ensures metadata if needed. Status reads and details toggles themselves remain network-free, but opening Models can discover missing/stale signed-in metadata. Background credential/reset notifications clear Client state and read status rather than forcing discovery on every token event; the next open/use ensures metadata.
123
123
 
@@ -169,9 +169,9 @@ Agents should treat the browser authorization as a human handoff, not as a token
169
169
  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.
170
170
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
171
171
 
172
- 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.48`, 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).
172
+ 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.50`, 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).
173
173
 
174
- **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. 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).
174
+ **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).
175
175
 
176
176
  **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.
177
177
 
@@ -273,7 +273,7 @@ Auto-mode native search identity comes from the captured initiating Session's ef
273
273
 
274
274
  The bundle composes a plugin-owned web-service facade while preserving the original official service and its exact configuration in a named realm. It does not edit Core or agent presets. Native `web_search` consumers keep their argument validation, query/source limits, middleware, timeout and presentation; the same routing also covers direct `ctx.web.search` consumers with proven initiating context.
275
275
 
276
- The **Web search** card under **Plugins → dsh-github-copilot → Details** controls routing across search backends through the public `plugins.bundle.config` slot (keyed by package name). The same page offers expandable Copilot hosted-search options (enablement, route allowlist, citations, tool filtering, proof, deadlines, and legacy fallback). Routing and hosted-search options have independent Save actions and revision-checked writes to their existing namespaces. When the bundle slot is unavailable, routing falls back to **Settings → Models**, or **Settings → Web search** if the Models footer is also unavailable; advanced options remain available through the existing settings section. Only one routing card is registered at a time; leaving the detail page discards unsaved edits. Account sign-in, status, and model refresh remain under **Settings → Models**. No settings values are migrated or rewritten merely by opening the new page. Removing the companion restores the original web service.
276
+ The **Web search** card under **Plugins → dsh-github-copilot → Details** controls routing across search backends through the public `plugins.bundle.config` slot (keyed by package name). Routing has its own revision-checked writes. When the bundle slot is unavailable, routing falls back to **Settings → Models**, or **Settings → Web search** if the Models footer is also unavailable; advanced options remain available through the existing settings section. Only one routing card is registered at a time; leaving the detail page discards unsaved edits. Account sign-in, status, and model refresh remain under **Settings → Models**. No settings values are migrated or rewritten merely by opening the new page. Removing the companion restores the original web service.
277
277
 
278
278
  The **Search provider** selector offers **Auto — follow Chat** and the actual search providers registered through the routed facade. **Fallback provider** uses the same catalog, with an additional **None — no fallback** choice. These are search backends, not individual models: Copilot is one backend even when different account models can execute its search requests. Ordinary setup needs only these provider choices, not a separate search model.
279
279
 
@@ -372,6 +372,7 @@ Existing installations must follow the [single-route migration guide](./docs/sin
372
372
  - **`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.
373
373
  - **`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.
374
374
  - **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.
375
+ - **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.
375
376
  - **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.
376
377
  - **Canonical route says `not-configured`:** with configured login this is normal managed-only mode; inspect account discovery separately rather than creating a native profile.
377
378
  - **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.
@@ -439,8 +440,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
439
440
  `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.
440
441
 
441
442
  ```sh
442
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.48/dsh-github-copilot-0.4.0-alpha.48.tgz
443
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.48/SHA256SUMS
443
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.50/dsh-github-copilot-0.4.0-alpha.50.tgz
444
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.50/SHA256SUMS
444
445
  sha256sum --check SHA256SUMS
445
446
  ```
446
447
 
@@ -448,7 +449,7 @@ PowerShell can verify the same two downloaded files with:
448
449
 
449
450
  ```powershell
450
451
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
451
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.48.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
452
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.50.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
452
453
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
453
454
  ```
454
455
 
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.48`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.50`;这不代表已有的两条真实路由被合并或移除。版本化 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.48/dsh-github-copilot-0.4.0-alpha.48.tgz
103
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.50/dsh-github-copilot-0.4.0-alpha.50.tgz
104
104
  ```
105
105
 
106
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.48`。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.50`。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
 
@@ -117,9 +117,9 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
117
117
 
118
118
  ### Auto 模型路由
119
119
 
120
- 托管 GitHub Copilot 分组包含一个虚拟 **Auto** 模型。Auto 在每个 Core turn 只解析一次,从当前认证账号目录选择一个真实模型;同轮的工具步骤、重试和自动 compact 恢复始终使用该真实模型,后续 Chat 或 Goal 新轮次可以重新选择。图片轮次必须有账号元数据验证过的图片模型。完成回复的末尾显示 `Auto · <真实模型>`,同一行 `?` 提供简短原因。搜索继续使用独立的 Provider 内部模型策略;通用原生子代理仍继承 Core 的具体路由,不被重新标成 Auto。首版确定性策略只使用供应方公布的容量,不声称知道模型质量、延迟、价格、健康状态或 GitHub 私有 Auto 算法。详见 [MVP 合同与 mockup](./docs/automatic-model-routing.md)。
120
+ 托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池;偏好只改变公布容量的排序目标,不改变资格,也不保证模型质量、速度或成本。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有验证过的图片候选。回复末尾显示 `Auto · <真实模型>`(或所选偏好)和原因。搜索仍由独立策略管理;原生子代理继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md);模型排除与嵌套菜单仍只是提案。
121
121
 
122
- 新 Session 继承默认 Auto 时,首次解析请求会把 Auto 记录为该 Session 的持久选择,请求头仍记录实际使用的模型。后续轮次继续处于 Auto,而不会固定到该请求头;只有显式手选真实模型才切换到固定路由。全局默认值变化不会迁移已有具体模型记录的 Session。
122
+ 新 Session 继承任一默认 Auto 偏好时,首次解析请求会把准确的虚拟偏好记录为该 Session 的持久选择,请求头仍记录实际模型。后续轮次继续保留该偏好,而不会固定到请求头;显式选择真实模型才切换到固定路由。旧 `auto` ID 保持均衡档。全局默认值变化不会迁移已有具体模型记录的 Session。
123
123
 
124
124
  只有另一个符合条件的表面仍挂载时,切换才保留共享账号状态 owner。最后一个表面卸载或声明替换没有挂载重叠时停止轮询;以后挂载会先读状态,再按需另行确保元数据。状态读取和详情切换本身仍不访问网络,但打开 Models 可以发现缺失/过期的已登录账号元数据。后台凭据/reset 通知清除 Client 状态并只读查询,不在每次 token 事件强制发现;下次打开/使用时再确保元数据。
125
125
 
@@ -171,9 +171,9 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
171
171
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
172
172
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
173
173
 
174
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.48`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
174
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.50`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
175
175
 
176
- **Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。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)。
176
+ **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)。
177
177
 
178
178
  **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 或运行中的进程。
179
179
 
@@ -281,7 +281,7 @@ Grant 写入或复用前,Host normalizer 只会把 pi-ai 文档化的 `type`
281
281
 
282
282
  新版 bundle 通过插件自有的 web 服务外观层分流,将原官方服务及完整配置保留在命名作用域中,不修改 Core 或会话预设。原生 `web_search` 保留参数校验、查询/来源数量限制、执行中间件、超时和结果展示;有可靠发起会话上下文的直接 `ctx.web.search` 调用也使用相同分流规则。
283
283
 
284
- 在 **插件 → dsh-github-copilot → 详情**中,**Web search** 卡片通过公开的 `plugins.bundle.config`(按包名索引)设置跨后端搜索路由;同一页面还可展开 Copilot 托管搜索选项(开关、路由白名单、引用、工具过滤、能力证明、超时及旧兜底)。两组设置分别保存,仍通过各自原有命名空间与修订号校验写入。若 bundle slot 不可用,路由卡片回退到 **设置 → 模型**;若 Models footer 也不可用,则回退到 **设置 → Web search**;高级选项仍可通过原设置分区修改。同一时间只注册一处路由卡片,离开详情页会丢弃未保存的草稿。账号登录、状态及模型刷新仍在 **设置 → 模型**。仅打开新页面不会迁移或改写已有设置,卸载本插件后恢复原 web 服务。
284
+ 在 **插件 → dsh-github-copilot → 详情**中,**Web search** 卡片通过公开的 `plugins.bundle.config`(按包名索引)设置跨后端搜索路由,并通过独立修订号校验保存。若 bundle slot 不可用,路由卡片回退到 **设置 → 模型**;若 Models footer 也不可用,则回退到 **设置 → Web search**;高级选项仍可通过原设置分区修改。同一时间只注册一处路由卡片,离开详情页会丢弃未保存的草稿。账号登录、状态及模型刷新仍在 **设置 → 模型**。仅打开新页面不会迁移或改写已有设置,卸载本插件后恢复原 web 服务。
285
285
 
286
286
  **Search provider** 主选择器提供 **Auto — follow Chat** 和通过路由外观层实际注册的搜索 Provider;**Fallback provider**(兜底后端)使用同一目录,额外提供 **None — no fallback**。选择项代表搜索后端,不代表单个模型:即使多个账号模型可以执行搜索,Copilot 仍然只有一个搜索后端。普通配置只需选择这两个 Provider,不再要求另选搜索模型。
287
287
 
@@ -383,6 +383,7 @@ Copilot Session 如需更宽的文件或命令权限,必须在调用前选择
383
383
  - **重新登录后出现 `AUTH`/“API key is invalid”:**这个标签并不证明旧会话缓存了旧 Key。托管路由实际收到模型 HTTP 401 后,只撤销与当前请求精确匹配的 Token 证明,但下述严格识别的 Responses 历史引用错误除外;该次请求仍然失败,不自动重发消息、退出登录或切换模型。下一次请求(或模型发现)可通过原生 OAuth 进行一次续期,即使记录的有效期尚未到期,随后重新校验账号模型元数据。连续拒绝受账号级 `accountModelFailureCooldownMs` 限制(默认五分钟,至少一秒),强制发现也不能绕过该恢复冷却。续期后仍被拒绝时,请等待冷却并检查账号/权限状态,不要反复退出登录。迟到的旧响应不能覆盖新登录;403、网络错误和仅含 401 字样的错误不触发恢复。这里只观察原生 HTTP 传输,不声称覆盖 WebSocket,也不代表真实端点验收通过。
384
384
  - **`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`;不撤销共享账号证明、不连带中止其他请求、不续期凭据,也不自动重发。未知、格式错误、过大或存在歧义的错误体继续沿用原生鉴权处理;历史报错记录不会被改写。
385
385
  - **托管 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 协议保持不变;安装、激活和旧会话端点验收需分别确认。
386
+ - **用量与额度 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` 工具集均已固化该检测与自动修复逻辑。
386
387
  - **alpha.36 后仍有历史作用域拒绝:**原先的精确分类漏掉了不含 `ID` 的已观测文案。Alpha.37 只补齐分类与隔离,不进一步改写 payload,也不证明原被拒绝的历史已经可用。不加载 cron 的原生适配器测试已复现并行请求被连带中断,证明的是 Copilot 插件错误处理缺陷,而不是上游拒绝条目的原始原因。`Request aborted` 单独不能确定取消来源;`COPILOT_MODEL_SOURCE_AUTH_FAILED` 是目录发现前认证解析的泛化错误,缓存结果可重复返回而不代表再次认证。判断另一台机器为何正常,需对齐实际加载版本、请求来源和同一历史/模型,不能直接归因于降级插件或卸载 cron。不要暗中丢弃加密 reasoning、重发旧业务或重置凭据。
387
388
  - **Canonical 状态为 `not-configured`:**已登录时属于正常单托管路由模式;账号发现就绪与否另行检查,不需要创建原生 profile。
388
389
  - **删除对话框一直显示 “Deleting…”:**本次改动不证明该卡住问题已修复。不要重复删除;取得许可停止 Host 后检查持久化设置,按迁移指南判断是否仍需移除。
@@ -450,8 +451,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
450
451
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
451
452
 
452
453
  ```sh
453
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.48/dsh-github-copilot-0.4.0-alpha.48.tgz
454
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.48/SHA256SUMS
454
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.50/dsh-github-copilot-0.4.0-alpha.50.tgz
455
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.50/SHA256SUMS
455
456
  sha256sum --check SHA256SUMS
456
457
  ```
457
458
 
@@ -459,7 +460,7 @@ PowerShell 可以对已下载的同一组文件执行:
459
460
 
460
461
  ```powershell
461
462
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
462
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.48.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
463
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.50.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
463
464
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
464
465
  ```
465
466
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.48"
11
+ "version": "0.4.0-alpha.50"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -1,6 +1,6 @@
1
1
  # GitHub Copilot Auto model routing MVP
2
2
 
3
- **Tracking:** [#174](https://github.com/cloga/dsh-github-copilot/issues/174)
3
+ **Tracking:** [#174](https://github.com/cloga/dsh-github-copilot/issues/174), [#192](https://github.com/cloga/dsh-github-copilot/issues/192)
4
4
 
5
5
  **Target:** official DSH and Windows Desktop `0.2.0-rc.2`
6
6
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  ## User contract
12
12
 
13
- The managed `github-copilot-preview` provider contributes one virtual model named **Auto** to the ordinary model picker. Auto never appears under another provider and never routes across providers or accounts.
13
+ The managed `github-copilot-preview` provider contributes **Auto · Balance** (the existing `auto` ID), **Auto · Efficiency**, and **Auto · Intelligence** to the ordinary flat model picker. They never appear under another provider and never route across providers or accounts. Explicitly selecting another virtual preference preserves Auto intent; only a real model selection exits Auto.
14
14
 
15
15
  Selecting Auto uses normal Core selection behavior, including saving it as the future default selection. For every Core turn, the plugin resolves Auto to one real model from the authenticated account catalog:
16
16
 
@@ -40,6 +40,20 @@ Capacity ordering is based on account-advertised reasoning range, context window
40
40
 
41
41
  The MVP makes no additional model call to classify a turn. It does not retry another model after provider output begins, replay tool side effects, or implement wire-time fallback.
42
42
 
43
+ ### Soft capacity preferences
44
+
45
+ All three virtual preferences use the *same* eligible account models. Account entitlement and verified input capability (including image input) are hard filters; preference only changes where the routing policy lands in the deterministic, advertised-capacity order. It cannot turn an ineligible model into a candidate. The initial measurable matrix, with `low`, `middle = floor((n - 1) / 2)`, and `high = n - 1` indices for `n` eligible models, is:
46
+
47
+ | Latest-turn class | Efficiency | Balance (`auto`) | Intelligence |
48
+ | --- | --- | --- | --- |
49
+ | Fast | low | low | middle |
50
+ | Balanced | low | middle | high |
51
+ | Strong | min(high, max(1, middle)) | high | high |
52
+
53
+ For a single candidate every cell selects it; for two candidates a strong turn still selects the higher-capacity one even with Efficiency. Intelligence can use a lighter model for a short turn, and Efficiency can use a higher-capacity model for a demanding turn. 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.
54
+
55
+ 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; historical events without that field remain Balance for display. Switching to a real model ends automatic routing for subsequent turns.
56
+
43
57
  ## Images
44
58
 
45
59
  Image input is part of the MVP.
@@ -112,7 +126,7 @@ A later plugin-owned delegation entry may carry explicit Auto intent in its own
112
126
 
113
127
  The plugin uses only published public seams:
114
128
 
115
- - `PreviewAdapter.listModels()` publishes the virtual Auto picker entry alongside real account models.
129
+ - `PreviewAdapter.listModels()` publishes three virtual Auto picker entries alongside real account models.
116
130
  - `PreviewAdapter.resolveModel()` returns aggregate Auto modalities for picker admission.
117
131
  - `agent/pre-step` captures the admitted current-turn messages.
118
132
  - a prepended `agent/request` listener awaits Core's model-selection middleware, recognizes only `github-copilot-preview/auto`, resolves one real account descriptor, and returns the real model before `request/header` persistence.
@@ -145,9 +159,21 @@ Synthetic tests prove composition and contracts only. They do not prove a live a
145
159
 
146
160
  - benchmark-backed quality/latency/cost ranking;
147
161
  - GitHub health signals or GitHub's private Auto service;
148
- - user-selectable Efficiency/Balance/Intelligence tiers;
162
+ - user-managed exclusions of individual account models and custom picker grouping;
149
163
  - cross-provider routing;
150
164
  - native subagent Auto inheritance;
151
165
  - model fallback after a provider failure;
152
166
  - side-effect replay;
153
167
  - automatic changes to existing Session selections, settings, or histories.
168
+
169
+ ## Exploration: excluded models and richer picker (not implemented)
170
+
171
+ **Tracking:** [#192](https://github.com/cloga/dsh-github-copilot/issues/192). **Interactive proposal:** [`output/auto-model-mockup/tiers.html`](../output/auto-model-mockup/tiers.html). This is a local, synthetic UI exercise, not a claim of current Core picker behavior. The three virtual preferences and capacity matrix above are implemented; model exclusions and nested picker controls in the mockup are **not**.
172
+
173
+ The attached Copilot example uses one Auto switch with a nested Efficiency / Balance / Intelligence menu. The supported DSH model picker is owned by Core and receives a flat provider directory from `PreviewAdapter.listModels()`; the plugin's Models provider-card and bundle-config slots cannot restructure that picker. The plugin advertises three rows under **GitHub Copilot**, with the existing `auto` ID as Balance for previously selected Sessions and defaults. A nested switch like the screenshot requires a separately reviewed public Core UI seam and is not a dependency of the plugin-only preferences.
174
+
175
+ The proposed exclusions are a separate **hard filter**, not a fourth preference. Today all three preferences share account entitlement and turn-required verified capabilities; no exclusion setting has been wired. The mockup uses illustrative capacity scores and simulated responses, not live evaluation of model quality, cost, or latency.
176
+
177
+ The model-management surface should be a small **GitHub Copilot · model preferences** section in the plugin's own settings UI, not a replacement of Core's picker. Offer search, a visible/hidden count, **Exclude** and **Restore** per currently validated account model, and a reason when an action is unavailable. Store excluded **exact account model IDs** in a plugin-owned path with revision-checked writes; validate entries against the current directory and preserve exclusion intent for temporarily absent IDs without pretending they are entitled. Do not mutate pi-ai's catalog, account grant, Core settings, or another provider's models. The plugin's advertised directory and every Auto candidate set exclude these IDs. A stale picker row or direct request for an excluded model must also fail with a named, actionable diagnostic rather than silently routing through it. Existing Session history is never rewritten: an old fixed selection can be restored or changed explicitly, but is not automatically moved. Prevent excluding the currently selected fixed model until another selection is made; allow restoring an excluded model. If exclusion or catalog changes leave no eligible candidate, Auto must fail closed. Account change and unavailable metadata must not be interpreted as permission to re-enable or guess models.
178
+
179
+ The native picker already owns provider groups and text search; listing the three virtual rows first and keeping excluded Copilot models out of its directory is achievable through the existing plugin-owned adapter. Custom section headers inside a provider, nested Auto menus, hiding other providers' models, and replacing Core search/layout are **not** available through the current additive slots. Before implementing, verify cold picker and `/model` refresh behavior, Session-local pending selection versus real request headers, selected-model exclusion, stale directories, concurrent settings edits, account switching, image admission, and zero-candidate failures against unchanged pinned Core. The prototype's invented model capacity order and response are illustrative only.
@@ -24,7 +24,7 @@ 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. 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
+ 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.
28
28
 
29
29
  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
30
 
package/lib/client.js CHANGED
@@ -6000,7 +6000,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6000
6000
  "fast",
6001
6001
  "balanced",
6002
6002
  "strong"
6003
- ].includes(String(event.data.taskClass)) || ![
6003
+ ].includes(String(event.data.taskClass)) || event.data.preference !== void 0 && ![
6004
+ "efficiency",
6005
+ "balance",
6006
+ "intelligence"
6007
+ ].includes(String(event.data.preference)) || ![
6004
6008
  "short-text-turn",
6005
6009
  "standard-turn",
6006
6010
  "large-structured-turn",
@@ -6011,6 +6015,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6011
6015
  value: {
6012
6016
  provider: event.data.provider,
6013
6017
  model: event.data.model,
6018
+ ...event.data.preference === void 0 ? {} : { preference: event.data.preference },
6014
6019
  taskClass: event.data.taskClass,
6015
6020
  reason: event.data.reason,
6016
6021
  candidateCount: event.data.candidateCount
@@ -6038,7 +6043,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6038
6043
  if (scope !== "turn") return null;
6039
6044
  const state = context.state ?? context.matches.map((match) => attribution(match.event)).find((value) => value !== void 0);
6040
6045
  if (state === void 0) return null;
6041
- if (previous?.turn === state.turn && previous.key === "github-copilot-auto-model-attribution" && previous.value.provider === state.value.provider && previous.value.model === state.value.model && previous.value.reason === state.value.reason && previous.value.taskClass === state.value.taskClass && previous.value.candidateCount === state.value.candidateCount) return previous;
6046
+ if (previous?.turn === state.turn && previous.key === "github-copilot-auto-model-attribution" && previous.value.provider === state.value.provider && previous.value.model === state.value.model && previous.value.reason === state.value.reason && previous.value.taskClass === state.value.taskClass && previous.value.preference === state.value.preference && previous.value.candidateCount === state.value.candidateCount) return previous;
6042
6047
  return {
6043
6048
  kind: "turn",
6044
6049
  turn: state.turn,
@@ -6062,7 +6067,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6062
6067
  }
6063
6068
  }
6064
6069
  function reasonText(value) {
6065
- return `${value.reason === "short-text-turn" ? "Short text turn" : value.reason === "large-structured-turn" ? "Large structured turn" : value.reason === "image-capability" ? "Image-capable model required" : "Standard turn"}; selected from ${value.candidateCount} eligible account model${value.candidateCount === 1 ? "" : "s"}.`;
6070
+ return `${value.reason === "short-text-turn" ? "Short text turn" : value.reason === "large-structured-turn" ? "Large structured turn" : value.reason === "image-capability" ? "Image-capable model required" : "Standard turn"}; ${value.preference ?? "balance"} capacity preference; selected from ${value.candidateCount} eligible account model${value.candidateCount === 1 ? "" : "s"}.`;
6066
6071
  }
6067
6072
  function Attribution(props) {
6068
6073
  const source = sourceOf(props);
@@ -6079,7 +6084,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6079
6084
  color: "var(--text-muted, #667085)",
6080
6085
  fontSize: 12
6081
6086
  }
6082
- }, react.createElement("span", null, `Auto · ${parsed.model}`), react.createElement("button", {
6087
+ }, react.createElement("span", null, `Auto${parsed.preference === void 0 || parsed.preference === "balance" ? "" : ` (${parsed.preference})`} · ${parsed.model}`), react.createElement("button", {
6083
6088
  type: "button",
6084
6089
  "aria-label": "Why this model",
6085
6090
  "aria-expanded": open,
@@ -6196,6 +6201,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6196
6201
  borderRadius: "14px",
6197
6202
  background: "color-mix(in srgb, currentColor 4%, transparent)"
6198
6203
  };
6204
+ const restartBannerStyle = {
6205
+ padding: "12px 14px",
6206
+ borderRadius: "10px",
6207
+ fontSize: "13px",
6208
+ lineHeight: 1.5,
6209
+ border: "1px solid color-mix(in srgb, var(--dsw-alias-color-warning, #e3a300) 40%, transparent)",
6210
+ background: "color-mix(in srgb, var(--dsw-alias-color-warning, #e3a300) 12%, transparent)",
6211
+ display: "grid",
6212
+ gap: "4px"
6213
+ };
6199
6214
  const fieldStyle = {
6200
6215
  display: "grid",
6201
6216
  gap: "6px",
@@ -6496,6 +6511,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6496
6511
  const [override, setOverride] = (0, react.useState)({ model: "" });
6497
6512
  const [providers, setProviders] = (0, react.useState)([]);
6498
6513
  const [catalogReady, setCatalogReady] = (0, react.useState)(false);
6514
+ const [restartRequired, setRestartRequired] = (0, react.useState)(false);
6499
6515
  const [loading, setLoading] = (0, react.useState)(true);
6500
6516
  const [saving, setSaving] = (0, react.useState)();
6501
6517
  const [writable, setWritable] = (0, react.useState)(false);
@@ -6515,6 +6531,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6515
6531
  setSaving(void 0);
6516
6532
  setWritable(false);
6517
6533
  setCatalogReady(false);
6534
+ setRestartRequired(false);
6518
6535
  setMessage("");
6519
6536
  setProviders([]);
6520
6537
  try {
@@ -6547,7 +6564,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6547
6564
  const parsed = catalog?.ok ? SearchProviderCatalogSchema.safeParse(catalog.value) : void 0;
6548
6565
  const ids = parsed?.success ? parsed.data.providers.map((entry) => entry.id) : [];
6549
6566
  if (!parsed?.success || !parsed.data.supported || new Set(ids).size !== ids.length || ids.includes("auto") || ids.includes("none")) {
6550
- setMessage("Search provider list is unavailable. Reload after the routed search service is active.");
6567
+ if (parsed?.success && !parsed.data.supported) {
6568
+ setRestartRequired(true);
6569
+ setMessage("Search service is not ready. Please restart Desktop to apply updates.");
6570
+ } else setMessage("Search provider list is unavailable. Reload after the routed search service is active.");
6551
6571
  return;
6552
6572
  }
6553
6573
  setProviders(ids.toSorted());
@@ -6690,7 +6710,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6690
6710
  style: cardStyle,
6691
6711
  "data-dsh-web-search-routing": true,
6692
6712
  "aria-busy": loading || saving !== void 0
6693
- }, (0, react.createElement)("div", null, (0, react.createElement)("h3", { style: {
6713
+ }, restartRequired ? (0, react.createElement)("div", {
6714
+ role: "alert",
6715
+ style: restartBannerStyle,
6716
+ "data-dsh-web-search-restart-banner": true
6717
+ }, (0, react.createElement)("strong", { style: { fontWeight: 600 } }, "Restart required to complete update / 检测到更新,请重启 Desktop 完成生效"), (0, react.createElement)("span", { style: { opacity: .85 } }, "Web search service composition requires a full application restart to rebind components. / Web 搜索服务组件更新需退出并重新启动 Desktop 以完成重编排。")) : null, (0, react.createElement)("div", null, (0, react.createElement)("h3", { style: {
6694
6718
  margin: 0,
6695
6719
  fontSize: "16px"
6696
6720
  } }, "Web search"), (0, react.createElement)("p", { style: {
@@ -6825,7 +6849,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6825
6849
  refreshing: "Refreshing…",
6826
6850
  error: "Could not refresh usage. Try again.",
6827
6851
  unavailableExplanation: "Account usage is currently unavailable.",
6828
- tlsError: "Could not verify the connection to GitHub. Check your trusted certificates or network proxy; TLS verification stays enabled.",
6852
+ 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.",
6829
6853
  signedOut: "Sign in to Copilot in Models to view account usage.",
6830
6854
  lastUpdated: "Last updated",
6831
6855
  reset: "Resets",
@@ -6857,7 +6881,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6857
6881
  refreshing: "正在刷新…",
6858
6882
  error: "无法刷新用量,请重试。",
6859
6883
  unavailableExplanation: "当前无法获取账号用量。",
6860
- tlsError: "无法验证与 GitHub 的连接。请检查受信任证书或网络代理;TLS 验证仍保持开启。",
6884
+ tlsError: "无法验证与 GitHub 的连接。若使用 Watt Toolkit 等加速器或代理,可启用系统证书库(设置环境变量 NODE_USE_SYSTEM_CA=1);TLS 验证仍保持开启。",
6861
6885
  signedOut: "请在模型设置中登录 Copilot,以查看账号用量。",
6862
6886
  lastUpdated: "更新于",
6863
6887
  reset: "重置时间",
@@ -8306,7 +8330,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8306
8330
  dispose = ctx.slots.register({
8307
8331
  name: "plugins.bundle.config",
8308
8332
  key: "dsh-github-copilot"
8309
- }, ({ view }) => view === "page" ? (0, react.createElement)("div", null, render(), (0, react.createElement)(HostedSearchSettingsCard, { settings })) : null);
8333
+ }, ({ view }) => view === "page" ? render() : null);
8310
8334
  } catch {
8311
8335
  ctx.logger.warn("[github-copilot] WEB_SEARCH_ROUTING_BUNDLE_UNAVAILABLE");
8312
8336
  return () => {};