dsh-github-copilot 0.4.0-alpha.46 → 0.4.0-alpha.49

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.48 (prepared)
4
+
5
+ - 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).
6
+ - Preserve explicit fixed-model selections, real request headers and per-turn Auto decisions without changing existing Sessions with a recorded concrete route.
7
+ - Supersede unpublished alpha.47 after its immutable pre-created tag failed the protected exact-annotation check; no alpha.47 GitHub Release or npm package was created.
8
+
9
+ ## 0.4.0-alpha.47 (publication blocked)
10
+
11
+ - Publication stopped after packing and checksum verification because the immutable pre-created tag's annotation did not satisfy the protected exact-message check.
12
+ - The alpha.47 tag remains unchanged and is not reused; its prepared Copilot Auto selection fix is carried by alpha.48.
13
+
3
14
  ## 0.4.0-alpha.46 (prepared)
4
15
 
5
16
  - Distinguish known TLS certificate-verification failures from other Copilot quota network errors without revealing provider errors or disabling certificate validation (#186).
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.46`. 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.49`. 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.46/dsh-github-copilot-0.4.0-alpha.46.tgz
101
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.49/dsh-github-copilot-0.4.0-alpha.49.tgz
102
102
  ```
103
103
 
104
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.46` 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.49` 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,7 +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
+
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.
119
121
 
120
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.
121
123
 
@@ -167,9 +169,11 @@ Agents should treat the browser authorization as a human handoff, not as a token
167
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.
168
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.
169
171
 
170
- GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.46`, 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.49`, 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
+
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).
171
175
 
172
- **Desktop hot-upgrade boundary:** exact rc.2 deliberately reports `restart-required` when an installed dependency is upgraded in place. Do not remove and re-add this bundle to force a hot upgrade: removing its patch after activation asks the public Loader to move the official `web` service out of the companion's named isolate, and an isolated remove/re-add regression shows that rc.2 can leave the official fiber active while global Web consumers, the delegate, and routed Web remain pending until process restart. The plugin cannot repair that state after its own bundle has been removed without a Core/private hook or persistent profile mutation, neither of which is allowed. Treat the native manager's restart-required result as authoritative, finish the package transaction, and perform a separately approved Desktop restart before sign-in or search validation.
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.
173
177
 
174
178
  No `copilot2api` process, external gateway, placeholder API key, pasted GitHub token, or separate `dsh-web-search-provider` installation is required.
175
179
 
@@ -435,8 +439,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
435
439
  `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.
436
440
 
437
441
  ```sh
438
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.46/dsh-github-copilot-0.4.0-alpha.46.tgz
439
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.46/SHA256SUMS
442
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.49/dsh-github-copilot-0.4.0-alpha.49.tgz
443
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.49/SHA256SUMS
440
444
  sha256sum --check SHA256SUMS
441
445
  ```
442
446
 
@@ -444,7 +448,7 @@ PowerShell can verify the same two downloaded files with:
444
448
 
445
449
  ```powershell
446
450
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
447
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.46.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
451
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.49.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
448
452
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
449
453
  ```
450
454
 
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.46`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ > 下文自动维护账号模型元数据与 provider 集成控件描述目标版本 `0.4.0-alpha.49`;这不代表已有的两条真实路由被合并或移除。版本化 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.46/dsh-github-copilot-0.4.0-alpha.46.tgz
103
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.49/dsh-github-copilot-0.4.0-alpha.49.tgz
104
104
  ```
105
105
 
106
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.46`。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.49`。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,7 +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
+
122
+ 新 Session 继承任一默认 Auto 偏好时,首次解析请求会把准确的虚拟偏好记录为该 Session 的持久选择,请求头仍记录实际模型。后续轮次继续保留该偏好,而不会固定到请求头;显式选择真实模型才切换到固定路由。旧 `auto` ID 保持均衡档。全局默认值变化不会迁移已有具体模型记录的 Session。
121
123
 
122
124
  只有另一个符合条件的表面仍挂载时,切换才保留共享账号状态 owner。最后一个表面卸载或声明替换没有挂载重叠时停止轮询;以后挂载会先读状态,再按需另行确保元数据。状态读取和详情切换本身仍不访问网络,但打开 Models 可以发现缺失/过期的已登录账号元数据。后台凭据/reset 通知清除 Client 状态并只读查询,不在每次 token 事件强制发现;下次打开/使用时再确保元数据。
123
125
 
@@ -169,9 +171,11 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
169
171
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
170
172
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
171
173
 
172
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.46`,不是 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.49`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
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)。
173
177
 
174
- **Desktop 热升级边界:**精确 rc.2 在原有 dependency 上执行原位升级时会明确返回 `restart-required`。不要通过先移除再重新添加本 bundle 来强行热升级:bundle 已激活后移除其 patch,会要求公开 Loader 把官方 `web` service 从 companion 的命名 isolate 移回全局;隔离的移除/重加回归证明,rc.2 可能让官方 fiber 保持 active,却使全局 Web consumers、delegate 与 routed Web 一直 pending,直到进程重启。bundle 被移除后,本插件若不使用 Core/private hook 或持久化 profile 修改就无法修复该状态,而这两种做法都不允许。应把原生 manager 的 restart-required 结果视为权威,完成 package transaction,并在登录或搜索验收前执行另行批准的 Desktop 重启。
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 或运行中的进程。
175
179
 
176
180
  不需要运行 `copilot2api`,不需要外部 gateway、placeholder API key、原始 GitHub token 或单独安装 `dsh-web-search-provider`。
177
181
 
@@ -446,8 +450,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
446
450
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
447
451
 
448
452
  ```sh
449
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.46/dsh-github-copilot-0.4.0-alpha.46.tgz
450
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.46/SHA256SUMS
453
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.49/dsh-github-copilot-0.4.0-alpha.49.tgz
454
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.49/SHA256SUMS
451
455
  sha256sum --check SHA256SUMS
452
456
  ```
453
457
 
@@ -455,7 +459,7 @@ PowerShell 可以对已下载的同一组文件执行:
455
459
 
456
460
  ```powershell
457
461
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
458
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.46.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
462
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.49.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
459
463
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
460
464
  ```
461
465
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.46"
11
+ "version": "0.4.0-alpha.49"
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.
@@ -122,6 +136,8 @@ The plugin uses only published public seams:
122
136
 
123
137
  The virtual Auto selection can remain pending while the real request header records the actual model. This is intentional: an unrelated real header must not consume the durable Auto preference. A later explicit picker selection replaces the pending Auto choice through Core's normal projection.
124
138
 
139
+ For an otherwise unselected Session that inherits Auto from the global default, the first virtual request persists a `model/selection` Auto intent before its real request header. Core's request-header fallback would otherwise make the next turn fixed. The plugin restores the pending Auto route during subsequent prompt assembly and request resolution without changing the real header, and yields immediately to a later explicit selection. It does not turn an existing Session with a real recorded route into Auto just because the global default changed.
140
+
125
141
  ## Acceptance criteria
126
142
 
127
143
  The MVP is accepted only when unchanged official Core contract tests prove:
@@ -143,9 +159,21 @@ Synthetic tests prove composition and contracts only. They do not prove a live a
143
159
 
144
160
  - benchmark-backed quality/latency/cost ranking;
145
161
  - GitHub health signals or GitHub's private Auto service;
146
- - user-selectable Efficiency/Balance/Intelligence tiers;
162
+ - user-managed exclusions of individual account models and custom picker grouping;
147
163
  - cross-provider routing;
148
164
  - native subagent Auto inheritance;
149
165
  - model fallback after a provider failure;
150
166
  - side-effect replay;
151
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.
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,