dsh-github-copilot 0.4.0-alpha.77 → 0.4.0-alpha.79

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
@@ -147,6 +147,7 @@ These pins document compatibility evidence. They do not authorize creating anoth
147
147
  - Client activation: package metadata injects DSH remotes and Models UI; `./client` mounts `./remote`.
148
148
  - Provider headers: rc.1 validates configured headers through Fetch and reuses Host-owned headers during model discovery.
149
149
  - Remote results: the nine ordinary authorization/model-preference methods retain the Zod v4 `GitHubCopilotAuthorizationView` strict codec required by rc.2 and accepted by rc.1. The tenth no-argument `migrationStatus()` method has a separate strict `GitHubCopilotMigrationStatus` codec; it does not change the ordinary auth contract.
150
+ - Single-model saves use the additive `setModelExcluded(modelId, excluded)` Remote with an independent strict `GitHubCopilotModelPreferencesView` result. Preserve the ten existing descriptor identities/codecs. Do not read credentials, discover models or enumerate Sessions on this mutation path; confirm native CAS persistence before returning.
150
151
 
151
152
  When upgrading DSH or pi-ai, inspect the exact tagged public exports and update the baseline, compatibility guard, tests, and docs together. Apply the **official-first policy**: compare each customization's purpose against exact official source/contracts, classify complete/partial/unverified support, choose retain/migrate/retire, and record the remaining gap plus a concrete retirement trigger. Unverified parity is not evidence of absence. Prefer official behavior only after configuration/data migration, safety and runtime acceptance are reviewed; remove redundant paths and their obsolete tests without losing user-visible acceptance coverage. The current comparison is [official-first alpha.2](./docs/official-first-016-alpha2.md).
152
153
 
@@ -238,6 +239,12 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
238
239
 
239
240
  ## Changing capabilities
240
241
 
242
+ The turn selection Host endpoint must use `TurnSelectionController`, extending
243
+ public `TypertRemoteService` with `@Remote get`. A plain `ctx.provide` object
244
+ cannot supply the native gateway binding or source method discovery. Test both
245
+ actual Client and Host gateways; a synthetic RPC success cannot prove Host
246
+ reachability. Preserve native Agent lookup and bounded store ownership (#254).
247
+
241
248
  Automatic pressure and Auto recovery availability resolve the initiating Agent's bound preset through public `agentPresets.composedPreset()` / `serviceFor(agent, 'compaction')`. A bound preset without an engine must not borrow global recovery. Only non-preset Agents use their own `agent.ctx.get('compaction')`; never scan Core's private registry or cache an engine across preset replacement. Native transactions, cancellation, retry policy and manual-only segmented recovery remain unchanged.
242
249
 
243
250
  Selection footer Remote calls carry an explicit viewed Session ID and turn.
@@ -249,7 +256,7 @@ same turn only and never replays inference. See #249.
249
256
 
250
257
  Parent-model following uses the profile-wide `github-copilot.followParentModel` switch (default false), with a single control in the plugin-detail page (#234). Never require per-session enrollment for the ordinary experience. Preserve legacy `parentModelFollow` bindings independently, including when the broad switch is off. `src/parent-model-follow.ts` and the Auto Host integration use public projections and per-turn scoped routing, never descriptor/history/default writes. Child-owned explicit selections win; enabling authorizes replacement of creation-time route snapshots, not removal of later picker history. Only supported native spawn children and managed Copilot parents participate; roots, other providers, fork descriptors and historical dedicated policies remain native. Missing eligible parent evidence fails explicitly. Settings changes preserve admitted turns, and Client saves use one path-level CAS without credentials/discovery. See `docs/parent-model-follow.md` for requirements/mockup and `docs/automatic-model-routing.md` for exact-source evidence.
251
258
 
252
- Model preferences must survive the Client's owned-field projection before strict decoding. `excludedModelIds` is a hidden volatile Config leaf, read via `readInlineConfig`; exercise native SettingsForms CAS, fiber preservation and restart persistence, not only map-backed settings mocks. Missing preference/selection evidence leaves model rows read-only with named diagnostics and status-only Retry. Unknown exclusion state is not an empty exclusion set. Discovery diagnostics stay in a separate Manage disclosure.
259
+ Model preferences must survive the Client's owned-field projection before strict decoding. `excludedModelIds` is a hidden volatile Config leaf, read via `readInlineConfig`; exercise native SettingsForms CAS, fiber preservation and restart persistence, not only map-backed settings mocks. Missing preference settings leave model rows read-only with named diagnostics and status-only Retry. Unknown exclusion state is not an empty exclusion set. Discovery diagnostics stay in a separate Manage disclosure. Selected models are excludable without scanning Sessions/defaults; the legacy `lockedModelIds` wire leaf stays empty. Check exclusion at new-turn admission through public `agent/request`, preserving only the same Session/turn/model and exact native request signal for subsequent steps/retries. Clear admission on `turn/end`. Direct/unbound requests and new turns remain excluded; never rewrite selections/history or switch models silently. Account/token/metadata/cancellation guards remain independent and revocable.
253
260
 
254
261
  Capture the traced `remote.githubCopilot` namespace once per account UI registration, shared by provider/footer/section renders. Native namespace property reads create fresh proxy identities; rereading during parent renders resets the mounted account controller and can block exclusion changes on redundant status/discovery work. Actual registration teardown and credential/connection invalidation retain their existing safety semantics.
255
262
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.79 (prepared)
4
+
5
+ - Bind retained turn selection reads through the public `TypertRemoteService` and `@Remote get`, fixing the Host registration missing from the alpha.76 Client-only correction (#254).
6
+ - Cover actual Client-to-Host calls in source-discovery and strict modes, including Auto/Manual, missing evidence, missing/denied identities and unload; preserve lookup checks and the existing bounded decision store.
7
+
8
+ ## 0.4.0-alpha.78 (prepared)
9
+
10
+ - Optimize individual Exclude/Restore saves with a strict preferences-only Remote response, avoiding credential/account-status reads and live-session scans (#252). Keep single-row immediate persistence, CAS conflicts, invalidation and failure recovery; no batch UI.
11
+ - Permit exclusion of selected models without rewriting Session/default selections. Preserve already admitted native turns through tool steps and retries, reject excluded models on new turns, and retain account/token/metadata/cancellation guards.
12
+ - Native configuration serialization, file locks and Loader synchronization still gate save completion; no live latency threshold or loaded Desktop upgrade is claimed.
13
+
3
14
  ## 0.4.0-alpha.77 (prepared)
4
15
 
5
16
  - Resolve automatic compaction pressure and Auto recovery availability from the initiating Agent's preset through the existing public service lookup (#248), including Desktop's isolated compaction groups.
package/README.md CHANGED
@@ -106,7 +106,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
106
106
 
107
107
  ## Install and sign in
108
108
 
109
- The commands below target the package version `0.4.0-alpha.77`. 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):
109
+ The commands below target the package version `0.4.0-alpha.79`. 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):
110
110
 
111
111
  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):
112
112
 
@@ -119,10 +119,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
119
119
  For a standalone named profile only, the supported CLI command is:
120
120
 
121
121
  ```sh
122
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.77/dsh-github-copilot-0.4.0-alpha.77.tgz
122
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.79/dsh-github-copilot-0.4.0-alpha.79.tgz
123
123
  ```
124
124
 
125
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.77` 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.
125
+ For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.79` 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.
126
126
 
127
127
  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.
128
128
 
@@ -132,9 +132,9 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
132
132
  2. Select **Sign in with GitHub**. The authorization area expands automatically with a prominent one-time code, **Open GitHub verification page**, **Copy code**, and **Cancel sign-in**. No extra **Manage** click is needed. Recognized Desktop v1 hosts use their existing same-window external-navigation handoff to the system browser instead of a popup; web hosts retain a new tab. If nothing opens, select and copy the displayed verification address into your browser. The plugin cannot confirm that the system browser opened.
133
133
  3. Copy the code, open the verification link, and complete authorization in your own GitHub browser session. Copy success/failure is announced accessibly; manual copying remains available. Never paste a GitHub token into DSH.
134
134
  4. DSH polls only while authorization is in flight. Successful explicit **Start sign-in** (the **Sign in with GitHub** button), including a UI account switch, forces exactly one bounded discovery after immediate or polled success. The code and verification link clear, the automatic authorization area closes, and the account shows **Signed in** and **Manage**. Manually opened details stay open; cancellation clears the old code. Failures show only a safe stage diagnostic: `COPILOT_AUTHORIZATION_BEGIN_FAILED` means authorization did not complete; `COPILOT_ROUTE_REPAIR_FAILED` means authorization completed but local route repair failed. A failed begin can also show a fixed **latest observed milestone** (`AUTHORIZATION_REQUESTED`, `INTERACTION_PROMPT_OBSERVED`, or `INTERACTION_NOTICE_OBSERVED`). It reports only progress observed through the public interaction callbacks, not the failing operation or a credential commit. The latter route-repair code retains authentication and directs you to **Manage → Repair model configuration**. These codes and milestones do not explain or resolve the underlying sign-in failure; raw provider details are never displayed or logged.
135
- 5. Choose an accepted model under **GitHub Copilot** (stable route ID `github-copilot-preview`). Normal opening/use maintains metadata without requiring **Refresh models**. **Manage → Model preferences** provides search, **All / Enabled / Excluded** filters, and immediate **Exclude/Restore** actions. Excluded exact IDs disappear from the managed picker and every Auto pool; temporarily absent excluded IDs remain restorable. Exclusion-driven parent renders retain the mounted account controller and metadata without restarting status checks or model discovery. Models selected by a live session or the future default are locked until those fixed selections change. No exclusion rewrites history, changes selection, or mutates account entitlement. **Discovery details** contains metadata diagnostics separately from the model controls. Legacy configuration diagnostics and explicit repair remain available when needed, and the [migration guide](./docs/single-route-migration.md) remains in the documentation.
135
+ 5. Choose an accepted model under **GitHub Copilot** (stable route ID `github-copilot-preview`). Normal opening/use maintains metadata without requiring **Refresh models**. **Manage → Model preferences** provides search, **All / Enabled / Excluded** filters, and immediate single-model **Exclude/Restore** actions. Excluded exact IDs disappear from the managed picker and new Auto pools; temporarily absent excluded IDs remain restorable. A selected model can be excluded: already admitted native turns keep their model through tool steps and retries, while new turns cannot use it. A fixed selection is not automatically replaced; select another model before its next turn. Exclusion-driven parent renders retain the mounted account controller and metadata without restarting status checks or model discovery. No exclusion rewrites history, changes selection, or mutates account entitlement. **Discovery details** contains metadata diagnostics separately from the model controls. Legacy configuration diagnostics and explicit repair remain available when needed, and the [migration guide](./docs/single-route-migration.md) remains in the documentation.
136
136
 
137
- If preferences cannot be read, available account rows remain visible but read-only. Unknown exclusion status is not shown as enabled. A named diagnostic distinguishes unavailable/invalid settings from incomplete selection evidence; **Retry** reads Host status only, without refreshing OAuth or discovering models. Failed writes retain the last confirmed state. Exclusions use native live, hidden Config fields and path-level settings CAS, so saving does not remount the plugin. Account model discovery alone does not prove that preference settings or model transport are working.
137
+ If preferences cannot be read, available account rows remain visible but read-only. Unknown exclusion status is not shown as enabled. Named diagnostics distinguish unavailable/invalid settings; **Retry** reads Host status only, without refreshing OAuth or discovering models. Failed writes retain the last confirmed state. Individual saves return only strict model preferences, without scanning sessions or reading credentials/full account status. Exclusions use native live, hidden Config fields and path-level settings CAS, so saving does not remount the plugin. Native configuration queue, file-lock and Loader synchronization may still delay confirmation; no optimistic success is shown before persistence completes. Account model discovery alone does not prove that preference settings or model transport are working.
138
138
 
139
139
  ### Auto model routing
140
140
 
@@ -146,6 +146,8 @@ Completed Copilot replies show **Auto (preference)** and an expandable recorded
146
146
 
147
147
  The selection footer mounts independently of optional conversation projections. Native completed-turn evidence lets retained Auto/Manual records remain visible if those projections are unavailable; incomplete attribution stays explicit in the information disclosure. This does not restore lost selection records or prove that an installed update is loaded in Desktop.
148
148
 
149
+ Alpha.79 also fixes the Host half of selection reads: the retained decision store is now exposed through the public Remote service binding and method marker, not a plain provided object rejected by the native gateway. Actual Client-to-Host roundtrips cover both source discovery and strict descriptors. This complements alpha.76's Client argument fix; it does not recover lost records or change Auto model selection.
150
+
149
151
  Auto input fitting uses Core's native TokenMeter for every entered message, including reasoning and tool history, plus its current-surface/tool-envelope floor. Missing or invalid native measurement fails Auto explicitly rather than silently selecting from an undercount. This prevents the known estimation error but does not rescue history whose summary input already exceeds every eligible model's budget; see [compaction limits](./docs/copilot-compaction.md#existing-oversized-history-and-recovery-limits).
150
152
 
151
153
  Alpha.63 fixes a missing footer on official Desktop by supporting its native ChatNodeStore rather than requiring a JavaScript Map. It does not change Auto selection or recover reasons already lost on Host restart.
@@ -175,7 +177,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
175
177
  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.
176
178
  6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
177
179
 
178
- 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.77`, 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).
180
+ 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.79`, 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).
179
181
 
180
182
  **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 disable, removal, or upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) may leave dependent entries pending until Desktop is fully exited and cold-restarted. If the native manager reports only entries such as `pending (waiting for service: web)` while this plugin already shows **Off**, the requested disabled state has been persisted; cold-restart Desktop instead of repeatedly toggling or reinstalling the plugin. Other errors are not covered by this guidance and must still be investigated.
181
183
 
@@ -454,8 +456,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
454
456
  `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.
455
457
 
456
458
  ```sh
457
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.77/dsh-github-copilot-0.4.0-alpha.77.tgz
458
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.77/SHA256SUMS
459
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.79/dsh-github-copilot-0.4.0-alpha.79.tgz
460
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.79/SHA256SUMS
459
461
  sha256sum --check SHA256SUMS
460
462
  ```
461
463
 
@@ -463,7 +465,7 @@ PowerShell can verify the same two downloaded files with:
463
465
 
464
466
  ```powershell
465
467
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
466
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.77.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
468
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.79.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
467
469
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
468
470
  ```
469
471
 
package/README.zh.md CHANGED
@@ -26,7 +26,7 @@ Core 管理。详见[图片兼容性与限制](./docs/image-input-compatibility.
26
26
 
27
27
  截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
28
28
 
29
- > 当前文档与安装命令对应版本 `0.4.0-alpha.77`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
29
+ > 当前文档与安装命令对应版本 `0.4.0-alpha.79`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
30
30
 
31
31
  Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
32
32
 
@@ -121,10 +121,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
121
121
  仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
122
122
 
123
123
  ```sh
124
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.77/dsh-github-copilot-0.4.0-alpha.77.tgz
124
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.79/dsh-github-copilot-0.4.0-alpha.79.tgz
125
125
  ```
126
126
 
127
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.77`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
127
+ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.79`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
128
128
 
129
129
  随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
130
130
 
@@ -134,9 +134,9 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
134
134
  2. 点击 **Sign in with GitHub** 后,验证码区域自动展开,提供醒目的一次性验证码、**Open GitHub verification page**、**Copy code** 和 **Cancel sign-in**。不需要再点一次 **Manage**。识别到 Desktop v1 宿主时,通过现有的同窗口外部导航处理交给系统浏览器,不依赖弹出窗口;网页版仍打开新标签页。如果没有打开,可选中并复制界面显示的验证网址到浏览器。插件无法确认系统浏览器是否已打开。
135
135
  3. 复制验证码,打开验证链接,在自己的 GitHub 浏览器会话中完成授权。复制成功/失败均有可访问的反馈;手工复制仍可用。不要把 GitHub token 粘贴到 DSH。
136
136
  4. DSH 只在授权进行中轮询。显式 **Start sign-in**(**Sign in with GitHub** 按钮,包括界面切换账号)成功后,无论立即返回还是轮询观察到成功,都只强制执行一次有界发现。验证码和验证链接清除,自动授权区域收起,账号显示 **Signed in、Manage**。手动打开的详情保持展开;取消清除旧验证码。失败仅显示安全的阶段诊断:`COPILOT_AUTHORIZATION_BEGIN_FAILED` 表示授权流程未完成;`COPILOT_ROUTE_REPAIR_FAILED` 表示授权已完成但本地路由修复失败。begin 失败还可以显示固定的“最近观察到的里程碑” (`AUTHORIZATION_REQUESTED`、`INTERACTION_PROMPT_OBSERVED` 或 `INTERACTION_NOTICE_OBSERVED`);它只表示公开 interaction callback 已观察到的进度,不代表失败操作或 credential commit。后者会保留认证,并提示前往 **Manage → Repair model configuration**。这些代码和里程碑不解释或解决底层登录失败,原始 provider 详情不会显示或记录。
137
- 5. 在 **GitHub Copilot** 分组选择接受的模型(稳定路由 ID 为 `github-copilot-preview`)。正常打开/使用会自动维护元数据,无需手动 **Refresh models**。**Manage → Model preferences** 提供搜索、**All / Enabled / Excluded** 筛选,以及立即保存的 **Exclude/Restore** 操作;被排除的精确 ID 会退出托管 picker 与所有 Auto 候选,暂时不在账号元数据中的排除 ID 仍可恢复。排除触发父级重绘时,保留已挂载的账号控制器及元数据,不重新启动状态检查或模型发现。被实时会话或未来默认设置选中的固定模型,在对应选择改变前不可排除。排除不会改写历史、切换选择或修改账号权限。发现说明及能力警告收纳在独立的 **Discovery details** 中。
137
+ 5. 在 **GitHub Copilot** 分组选择接受的模型(稳定路由 ID 为 `github-copilot-preview`)。正常打开/使用会自动维护元数据,无需手动 **Refresh models**。**Manage → Model preferences** 提供搜索、**All / Enabled / Excluded** 筛选,以及逐个立即保存的 **Exclude/Restore** 操作;被排除的精确 ID 会退出托管 picker 与新 turn 的 Auto 候选,暂时不在账号元数据中的排除 ID 仍可恢复。已经选中的模型也可以排除:已准入的原生 turn 在后续工具步骤及重试中保留原模型,新 turn 不得再使用它。固定选择不会自动替换,需要在下一 turn 前另选模型。排除触发父级重绘时,保留已挂载的账号控制器及元数据,不重新启动状态检查或模型发现。排除不会改写历史、切换选择或修改账号权限。发现说明及能力警告收纳在独立的 **Discovery details** 中。
138
138
 
139
- 偏好读取失败时,已有账号模型仍以只读列表显示,未知排除状态不会伪装成已启用。明确的诊断码区分设置不可用、设置无效与选择证据不完整;**Retry** 仅重读 Host 状态,不刷新 OAuth 或发现模型。保存失败保留最后确认的状态。排除设置使用原生动态隐藏 Config 字段及路径级 CAS,保存无需重新挂载插件。账号模型发现成功不等于偏好设置或模型调用已正常工作。
139
+ 偏好读取失败时,已有账号模型仍以只读列表显示,未知排除状态不会伪装成已启用。明确的诊断码区分设置不可用与设置无效;**Retry** 仅重读 Host 状态,不刷新 OAuth 或发现模型。保存失败保留最后确认的状态。单次保存仅返回严格校验的模型偏好,不扫描会话、不读取凭据或完整账号状态。排除设置使用原生动态隐藏 Config 字段及路径级 CAS,保存无需重新挂载插件。原生配置队列、文件锁及 Loader 同步仍可能延迟确认;实际持久化完成前不会显示保存成功。账号模型发现成功不等于偏好设置或模型调用已正常工作。
140
140
 
141
141
  ### Auto 模型路由
142
142
 
@@ -148,6 +148,8 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
148
148
 
149
149
  选择标记独立于可选会话投影挂载。投影不可用时,原生已完成回合证据仍允许显示保留的 Auto/手动记录;归属证据不完整会在信息弹层中明确说明。这不会恢复丢失的选择记录,也不证明已安装的更新已在 Desktop 加载。
150
150
 
151
+ Alpha.79 进一步修复选模读取的 Host 端:通过官方 Remote 服务绑定与方法标记暴露现有决策存储,不再使用会被原生网关拒绝的普通对象。实际 Client→Host 连通回归覆盖源码发现和严格描述符两种方式。这补齐 alpha.76 的 Client 参数修复,不恢复已丢失记录,也不改变 Auto 的选模逻辑。
152
+
151
153
  Auto 输入适配通过 Core 原生 TokenMeter 逐条估算消息,包含推理与工具历史,并保留原生当前上下文/工具定义测量值作为下限。缺失或无效的测量会明确报错,不再静默漏算后选模型。这能修复已知估算错误,但不能救回摘要输入已经超出所有合格模型预算的历史;详见[压缩恢复边界](./docs/copilot-compaction.md#existing-oversized-history-and-recovery-limits)。
152
154
 
153
155
  Alpha.63 通过支持官方 Desktop 的原生 ChatNodeStore、移除必须为 JavaScript Map 的错误限制,修复尾栏不显示的问题。不改变 Auto 选择策略,也不能恢复 Host 重启后已丢失的选择原因。
@@ -177,7 +179,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
177
179
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
178
180
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
179
181
 
180
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.77`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
182
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.79`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
181
183
 
182
184
  **Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
183
185
 
@@ -465,8 +467,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
465
467
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
466
468
 
467
469
  ```sh
468
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.77/dsh-github-copilot-0.4.0-alpha.77.tgz
469
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.77/SHA256SUMS
470
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.79/dsh-github-copilot-0.4.0-alpha.79.tgz
471
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.79/SHA256SUMS
470
472
  sha256sum --check SHA256SUMS
471
473
  ```
472
474
 
@@ -474,7 +476,7 @@ PowerShell 可以对已下载的同一组文件执行:
474
476
 
475
477
  ```powershell
476
478
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
477
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.77.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
479
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.79.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
478
480
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
479
481
  ```
480
482
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.77"
11
+ "version": "0.4.0-alpha.79"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -223,7 +223,7 @@
223
223
  "desktopPackageSet": "installed-descriptor-audited",
224
224
  "managedProviderValidation": "synthetic-tagged-source-runtime",
225
225
  "resolvedProfileDiagnostics": "plugin-owned-empty-modelErrors",
226
- "runtimeTests": ["tests/preview-route.spec.ts", "tests/published-core.spec.ts", "tests/single-route.spec.ts", "tests/search-routing.spec.ts", "tests/routed-web.spec.ts", "tests/deepseek-search-fallback.spec.ts", "tests/tool-schema-compat.spec.ts", "tests/fixtures/alpha2-contracts-core.fixture.ts", "tests/fixtures/compaction-pressure-core.fixture.ts", "tests/remote-codec.spec.ts", "tests/dual-model-projection.spec.ts", "tests/fixtures/scoped-compaction-core.fixture.ts", "tests/fixtures/session-context-core.fixture.ts", "tests/fixtures/remote-core.fixture.ts"]
226
+ "runtimeTests": ["tests/preview-route.spec.ts", "tests/published-core.spec.ts", "tests/single-route.spec.ts", "tests/search-routing.spec.ts", "tests/routed-web.spec.ts", "tests/deepseek-search-fallback.spec.ts", "tests/tool-schema-compat.spec.ts", "tests/fixtures/alpha2-contracts-core.fixture.ts", "tests/fixtures/compaction-pressure-core.fixture.ts", "tests/remote-codec.spec.ts", "tests/dual-model-projection.spec.ts", "tests/fixtures/scoped-compaction-core.fixture.ts", "tests/fixtures/model-exclusions-core.fixture.ts", "tests/fixtures/session-context-core.fixture.ts", "tests/fixtures/remote-core.fixture.ts"]
227
227
  }
228
228
  ],
229
229
  "packages": [
@@ -549,6 +549,8 @@
549
549
  {"file": "src/preview-route.ts", "marker": "modelErrors: new Map<string, string>()"},
550
550
  {"file": "src/preview-route.ts", "marker": "ctx.llm.registerAdapter"},
551
551
  {"file": "src/preview-route.ts", "marker": "createAccountModelSource"},
552
+ {"file": "src/model-exclusions.ts", "marker": "class ModelExclusionTurns"},
553
+ {"file": "src/remote.ts", "marker": "githubCopilot.setModelExcluded"},
552
554
  {"file": "src/preview-provider.ts", "marker": "native.streamSimple"},
553
555
  {"file": "src/request-body-timeout.ts", "marker": "COPILOT_REQUEST_BODY_TIMEOUT"},
554
556
  {"file": "src/response-error-body.ts", "marker": "readResponseErrorJson"},
@@ -562,6 +564,8 @@
562
564
  {"file": "tests/inline/apply.spec.ts", "name": "delegates Anthropic in-band system authority before probing at position %s"},
563
565
  {"file": "tests/preview-route.spec.ts", "name": "discovers mixed and unseen account models without model-name routing rules"},
564
566
  {"file": "tests/preview-route.spec.ts", "name": "uses unmodified stock LlmRuntime preparation and leaves canonical model registration alone"},
567
+ {"file": "tests/fixtures/model-exclusions-core.fixture.ts", "name": "keeps native tool steps in an admitted turn after exclusion and enforces exclusion on the next turn (%s)"},
568
+ {"file": "tests/authorization-controller.spec.ts", "name": "answers a narrow single-model save without reading credentials or enumerating sessions"},
565
569
  {"file": "tests/preview-route.spec.ts", "name": "replays opaque reasoning and tool-call identities through the native adapter on a second turn"},
566
570
  {"file": "tests/preview-route.spec.ts", "name": "enriches only a verified 408 while preserving native failure classification and retry ownership"},
567
571
  {"file": "tests/preview-provider.spec.ts", "name": "observes verified %s timeout without changing bytes, Response, native retries or credential ownership"},
@@ -1062,6 +1066,7 @@
1062
1066
  {"file": "src/turn-model-provenance.ts", "marker": "assistant/message"},
1063
1067
  {"file": "src/turn-selection-card.ts", "marker": "Selection unknown"},
1064
1068
  {"file": "src/turn-selection-remote.ts", "marker": "lookup: 'agent'"},
1069
+ {"file": "src/turn-selection-host.ts", "marker": "extends TypertRemoteService"},
1065
1070
  {"file": "src/turn-selection-card.ts", "marker": "Selection unavailable"},
1066
1071
  {"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
1067
1072
  ],
@@ -109,6 +109,30 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
109
109
 
110
110
  ## Attribution and explanation
111
111
 
112
+ **Host binding follow-up (alpha.79, #254):** alpha.76 fixed Client argument
113
+ projection, but the Host still provided selection reads as an ordinary
114
+ `ctx.provide(..., { get })` object. That is not a Typert Remote service.
115
+ The native strict Host gateway rejects it with `gateway/binding-invalid`
116
+ before reading the store; source-mode discovery cannot expose the endpoint
117
+ without a Remote binding and method marker. A fresh master reply can therefore
118
+ show **Selection unavailable** even after the Client fix.
119
+
120
+ `TurnSelectionController` now extends the published `TypertRemoteService` and
121
+ marks `get` with `@Remote`, following the other plugin Host controllers. It wraps
122
+ the same bounded `TurnSelectionStore`, with unchanged explicit Session/turn
123
+ arguments, native Agent lookup/access checks, missing-evidence semantics and
124
+ disposal. It does not append history, grant child access, infer a selection or
125
+ alter Auto routing.
126
+
127
+ Regression coverage crosses the actual Client gateway, in-process native Host
128
+ connection and actual Host gateway in both source-discovery and strict modes.
129
+ It reproduces the old registration failure and checks Auto, Manual, missing
130
+ records, missing/denied identities, removal and service unload. An isolated
131
+ process also exercised the unchanged rc.2 public modules bundled in the installed
132
+ Desktop; this is contract evidence, not a query of the running Host or live
133
+ model transport. The previous Client-only mock transport was insufficient
134
+ evidence for Host reachability.
135
+
112
136
  **Fresh master/lead selection reads (alpha.76, #249):** the footer explicitly
113
137
  calls `get(viewedSessionId, turn)`. Its old Remote descriptor also declared an
114
138
  automatic `agent` scope projection. The unchanged rc.2 Client gateway prefers
package/lib/client.js CHANGED
@@ -5791,6 +5791,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5791
5791
  ]).optional()
5792
5792
  }).strict();
5793
5793
  const result = strictRemoteCodec(GITHUB_COPILOT_AUTHORIZATION_VIEW_TYPE_SYMBOL, GitHubCopilotAuthorizationViewSchema);
5794
+ const GitHubCopilotModelPreferencesViewSchema = GitHubCopilotAuthorizationViewSchema.shape.modelPreferences.unwrap();
5794
5795
  const GITHUB_COPILOT_MIGRATION_STATUS_TYPE_SYMBOL = "dsh-github-copilot#GitHubCopilotMigrationStatus";
5795
5796
  const selectionSchema = object({
5796
5797
  provider: string().min(1).max(512),
@@ -5871,6 +5872,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5871
5872
  }],
5872
5873
  result
5873
5874
  })),
5875
+ {
5876
+ id: "dsh-github-copilot:githubCopilot.setModelExcluded",
5877
+ service: "githubCopilotAuthorization",
5878
+ namespace: "githubCopilot",
5879
+ method: "setModelExcluded",
5880
+ invocation: direct,
5881
+ parameters: [{
5882
+ name: "modelId",
5883
+ wire: "modelId",
5884
+ source: "json",
5885
+ codec: strictRemoteCodec("dsh-github-copilot#GitHubCopilotModelId", string().min(1).max(512))
5886
+ }, {
5887
+ name: "excluded",
5888
+ wire: "excluded",
5889
+ source: "json",
5890
+ codec: strictRemoteCodec("dsh-github-copilot#GitHubCopilotModelExcluded", boolean())
5891
+ }],
5892
+ result: strictRemoteCodec("dsh-github-copilot#GitHubCopilotModelPreferencesView", GitHubCopilotModelPreferencesViewSchema)
5893
+ },
5874
5894
  {
5875
5895
  id: "dsh-github-copilot:githubCopilot.migrationStatus",
5876
5896
  service: "githubCopilotAuthorization",
@@ -8288,7 +8308,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8288
8308
  const available = models?.models ?? [];
8289
8309
  const settingsKnown = preferences !== void 0 && preferences.revision !== void 0;
8290
8310
  const excluded = new Set(preferences?.excludedModelIds ?? []);
8291
- const locked = new Set(preferences?.lockedModelIds ?? []);
8292
8311
  const diagnostic = error ?? preferences?.error ?? (preferences === void 0 ? "COPILOT_MODEL_PREFERENCES_UNAVAILABLE" : void 0);
8293
8312
  const writable = preferences?.writable === true && settingsKnown;
8294
8313
  const rows = [...available.map((model) => ({
@@ -8313,7 +8332,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8313
8332
  setError(void 0);
8314
8333
  setErrorModel(modelId);
8315
8334
  try {
8316
- const result = modelId === void 0 ? await props.remote.status() : restore ? await props.remote.restoreModel(modelId) : await props.remote.excludeModel(modelId);
8335
+ if (modelId !== void 0) {
8336
+ const result = await props.remote.setModelExcluded(modelId, !restore);
8337
+ if (!current()) return;
8338
+ if (!result.ok) {
8339
+ setError("COPILOT_MODEL_EXCLUSION_SAVE_FAILED");
8340
+ return;
8341
+ }
8342
+ const parsed = GitHubCopilotModelPreferencesViewSchema.safeParse(result.value);
8343
+ if (!parsed.success) {
8344
+ setError("COPILOT_MODEL_PREFERENCES_UNAVAILABLE");
8345
+ return;
8346
+ }
8347
+ setPreferences(parsed.data);
8348
+ setError(parsed.data.error);
8349
+ return;
8350
+ }
8351
+ const result = await props.remote.status();
8317
8352
  if (!current()) return;
8318
8353
  if (!result.ok) {
8319
8354
  setError("COPILOT_MODEL_EXCLUSION_SAVE_FAILED");
@@ -8345,7 +8380,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8345
8380
  return (0, react.createElement)("details", { "data-dsh-github-copilot-model-preferences": true }, (0, react.createElement)("summary", null, settingsKnown ? `Model preferences · ${visibleCount} enabled · ${excluded.size} excluded` : "Model preferences · Read-only"), (0, react.createElement)("p", { style: {
8346
8381
  fontSize: "14px",
8347
8382
  marginBlock: "12px"
8348
- } }, "Excluded models disappear from the managed picker and are never considered by Auto. Restoring a model does not select it."), diagnostic === void 0 ? null : (0, react.createElement)("div", {
8383
+ } }, "Excluded models disappear from the managed picker and cannot start a new turn, including Auto. An admitted turn keeps its model. Fixed selections are not changed; select another model before the next turn. Restoring a model does not select it."), diagnostic === void 0 ? null : (0, react.createElement)("div", {
8349
8384
  role: "alert",
8350
8385
  "data-dsh-github-copilot-model-preferences-error": true,
8351
8386
  style: {
@@ -8408,8 +8443,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8408
8443
  }
8409
8444
  }, filtered.map((model) => {
8410
8445
  const isExcluded = excluded.has(model.id);
8411
- const isLocked = locked.has(model.id);
8412
- const disabled = !writable || busyModel !== void 0 || !isExcluded && isLocked;
8446
+ const disabled = !writable || busyModel !== void 0;
8413
8447
  return (0, react.createElement)("li", {
8414
8448
  key: model.id,
8415
8449
  style: {
@@ -8424,7 +8458,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8424
8458
  minWidth: 0,
8425
8459
  overflowWrap: "anywhere",
8426
8460
  fontSize: "14px"
8427
- } }, (0, react.createElement)("strong", null, model.name), (0, react.createElement)("br"), (0, react.createElement)("code", null, model.id), (0, react.createElement)("span", null, !settingsKnown ? " · Exclusion status unknown" : isExcluded ? " · Excluded" : " · Enabled"), model.available ? null : (0, react.createElement)("span", null, " · Temporarily absent from account metadata"), !isExcluded && isLocked ? (0, react.createElement)("span", null, " · Selected by a session or the default. Select another fixed model there before excluding.") : null, errorModel === model.id && error !== void 0 ? (0, react.createElement)("span", {
8461
+ } }, (0, react.createElement)("strong", null, model.name), (0, react.createElement)("br"), (0, react.createElement)("code", null, model.id), (0, react.createElement)("span", null, !settingsKnown ? " · Exclusion status unknown" : isExcluded ? " · Excluded" : " · Enabled"), model.available ? null : (0, react.createElement)("span", null, " · Temporarily absent from account metadata"), errorModel === model.id && error !== void 0 ? (0, react.createElement)("span", {
8428
8462
  role: "status",
8429
8463
  style: {
8430
8464
  display: "block",
@@ -8440,7 +8474,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8440
8474
  disabled,
8441
8475
  "aria-label": `${isExcluded ? "Restore" : "Exclude"} ${model.name}`,
8442
8476
  onClick: () => update(model.id, isExcluded),
8443
- title: !isExcluded && isLocked ? "Select another fixed model before excluding this one." : void 0,
8444
8477
  "data-dsh-github-copilot-model-action": isExcluded ? "restore" : "exclude",
8445
8478
  "data-model-id": model.id
8446
8479
  }, busyModel === model.id ? "Saving…" : isExcluded ? "Restore" : "Exclude"));