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

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
@@ -56,8 +56,8 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
56
56
  - `src/index.ts`: authorization bootstrap, dependency-gated Host entry, settings registration, listener, and `ctx.web` provider composition.
57
57
  - `src/authorization-controller.ts`: sign-in/status/sign-out and route mutation.
58
58
  - `src/copilot-grant.ts`, `src/copilot-auth.ts`: strict grant normalization and narrow pi-ai `CredentialStore` adapter over `llm-pi-ai/github-copilot`.
59
- - `src/client.ts`: `settings.models.provider-card` account UI, a `plugins.bundle.config` search page (routing and independently saved hosted-search options) with Models/footer/section routing fallback, and independently managed optional Chat integration.
60
- - `src/web-search-routing-config.ts`, `src/web-search-routing-card.ts`: plugin-owned cross-provider live routing settings and the plugin-detail control surface. Routing is stored directly under the existing `github-copilot` settings namespace at `searchRouting`, mutating both leaves via nested paths `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']` in one CAS call; legacy separate routing namespaces are read as fallback only. Revisions coordinate between routing and legacy `searchModel` resets so subsequent edits do not false-conflict. The Models fallback retains routing only.
59
+ - `src/client.ts`: `settings.models.provider-card` account UI, a `plugins.bundle.config` provider-routing page with Models/footer/section fallback, and independently managed optional Chat integration.
60
+ - `src/web-search-routing-config.ts`, `src/web-search-routing-card.ts`: plugin-owned cross-provider live routing settings and the plugin-detail control surface. The user-facing page exposes only primary and fallback providers. Routing is stored directly under the existing `github-copilot` settings namespace at `searchRouting`, mutating both leaves via nested paths `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']` in one CAS call; legacy separate routing namespaces are read as fallback only. Revisions coordinate between routing and legacy `searchModel` resets so subsequent edits do not false-conflict. Hosted-search safety settings remain schema-owned rather than a routine tuning form. The Models fallback retains routing only.
61
61
  - `src/reasoning-presentation.ts`: guarded native Chat delegation and historical Copilot provenance; filters temporary view props only, never messages, signatures, replay indexes or usage.
62
62
  - `src/remote.ts`: Typert Remote contribution. Never add credential payloads here.
63
63
  - `src/copilot-usage-host.ts`, `src/copilot-usage-remote.ts`, `src/copilot-usage-card.ts`, `src/copilot-usage-ui.ts`: bounded Host quota snapshots, an independent strict namespace and reversible composer presentation. No real account fetches in tests, private Client store/DOM injection, new credential owner or general model wire.
@@ -100,7 +100,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
100
100
  - The ordinary Web search card selects only the primary and fallback providers and saves both routing leaves in one CAS mutation in the existing `github-copilot` namespace at `['searchRouting', 'searchProvider']` and `['searchRouting', 'defaultSearchProvider']`. It must not depend on Copilot model discovery, account credentials or a model selection to save routing. Capture traced Settings/routing Remote faces once per UI registration so parent renders do not reset drafts. Preserve a legacy nonempty `searchModel` override; display it read-only and reset it only through an explicit, separate narrow CAS setting `searchModel: ''`, never as a routing-save side effect. Because routing and `searchModel` share the `github-copilot` namespace and revision, successful mutation of either updates the other's expected revision to avoid false CAS conflicts while preserving unsaved drafts. Saving settings does not prove hosted-search capability.
101
101
  - Cold Chat picker and `/model` `listModels()` ensure the shared managed source without Settings first. Actual cold managed search non-forcing ensures metadata before deriving facts; existing 24h maximum TTL, cooldown, credential, allowlist and capability/probe gates remain.
102
102
  - Without `agents.currentInitiator`, traditional hosted search is unavailable with a named diagnostic; explicit marked `GenerateOptions` can still bind guarded inline requests, uncached if necessary. Credential notification during initial lazy discovery cannot distinguish own rotation from external account change via public status: fail closed with `WEB_PROVIDER_UNAVAILABLE` before probe/wire; a later user/driver request may retry, never automatically.
103
- - The new native Copilot draft warning says Save adds another real group, not a second account. Public additive APIs cannot veto Add or disable Save; this is warning-only, not enforced single-route registration. Core Edit/Delete remain. Alpha.7 screenshots illustrate timestamps, not alpha.8 migration/search proof.
103
+ - The new native Copilot draft warning says Save adds another real group, not a second account. Public additive APIs cannot veto Add or disable Save; this is warning-only, not enforced single-route registration. Core Edit/Delete remain.
104
104
  - Public `session.selectModel` also saves the future global default. Choose only approved Sessions/default; preserve other selected/history-backed Sessions, but do not promise unselected empty Sessions cannot inherit that default.
105
105
  - Code does not auto-migrate settings, credentials or history. After plugin release, approved Ops migration may compare-and-swap only the reviewed user-native `llm-pi-ai.providers.github-copilot` path after ruling out base/journal conflicts, then read back settings and registry. No hidden groups, bulk rewrites or credential copying. Search allowlist updates to the managed ID require a separate reviewed Ops edit; never silently broaden old lists.
106
106
 
@@ -224,7 +224,7 @@ The release CI matrix targets only exact official `0.2.0-rc.2` on Windows and Li
224
224
  | Last metadata display | Same-account data may display during TTL refresh/loading/error but never authorize requests; credential/account/permission invalidation or proof expiry immediately revokes evidence; TTL does not extend tokens |
225
225
  | Last-success timestamp (alpha.7, #97) | Show `snapshot.discoveredAt` once beside count outside Manage: English relative text, full LOCAL date/time/zone tooltip and accessible semantic `time`; missing/invalid/no account hides it, future uses absolute text. Pending/error retains last success, successful refresh replaces it and sign-out clears it. One mounted 60s display-only timer makes no RPC/status/discovery calls and is disposed with timestamp/unmount; cache/discovery lifecycle unchanged |
226
226
  | Definitive `UNKNOWN_MODEL` | One bounded metadata refresh, never message replay or automatic model switching; generic HTTP/network errors are not guessed to be unknown models |
227
- | README GIF/PNG illustrations | Primary alpha.7 model-freshness/model-refreshing PNGs show the built Client in isolated Edge with synthetic Remote/provider shell. Fake-clock checks advance the label from 8 to 10 minutes without additional RPC, retain timestamp during pending/error, replace it on refresh success, clear it and remove the timer on sign-out, and keep the 375px layout safe. Host TTL/cooldown timing needs unit tests, not screenshots; no live Core/production authorization. Provider-entry/authorization PNGs remain historical alpha.5; older compact GIF/PNGs alpha.3 |
227
+ | README screenshot | `copilot-search-routing.png` shows the current built plugin-detail routing card with synthetic providers in an isolated browser fixture. It proves only the current presentation surface, not live credentials, provider availability, search success or Desktop activation. |
228
228
  | Host attach/restart | Reconciles the stored profile; search proofs stay lazy and do not start at attach |
229
229
  | Background credential/reset notifications | Invalidate evidence and clear Client state with read-only status; no forced discovery on every token event; next Models open/use ensures metadata |
230
230
  | Eligible model/search request | May resolve/refresh credentials and run bounded capability proof; changes during proof must fail closed rather than reuse another account's proof |
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0-alpha.53 (prepared)
4
+
5
+ - Fix Auto model concentration and context budget overflow by evaluating input fit as a hard routing condition before preference and distributing soft preferences across candidate bands with deterministic turn seeding (#199).
6
+ - Exclude candidates whose hard input limit cannot admit estimated turn input, preventing `COPILOT_CONTEXT_BUDGET_EXCEEDED` failures.
7
+ - When no candidate fits, route to the largest input capacity model and trigger compaction pressure on compressible history.
8
+ - Distribute soft preferences across upper/lower/center candidate bands via deterministic in-memory hash of `sessionId:turn`, preventing top catalog models from monopolizing all Sessions while freezing selections across retries and steps within the same turn.
9
+
10
+ ## 0.4.0-alpha.52 (prepared)
11
+
12
+ - Place Copilot Auto model attribution after the settled turn clock on the same footer row, and reveal it only on hover or keyboard focus, matching usage and time chrome.
13
+
3
14
  ## 0.4.0-alpha.51 (prepared)
4
15
 
5
16
  - Fix web search routing settings save by reading and writing `searchRouting` under the existing `github-copilot` settings namespace, avoiding the unexported `installSection` limitation in official `@deepseek-ai/dsh-settings@0.2.0-rc.2` (#195).
package/README.md CHANGED
@@ -9,6 +9,17 @@
9
9
 
10
10
  A focused DSH companion for GitHub Copilot sign-in, account-aware model profiles, Copilot-specific tool compatibility, and provider-hosted search. It reuses DSH's built-in `@deepseek-ai/dsh-llm-pi-ai`; it is not a second Copilot model adapter or catalog.
11
11
 
12
+ ## Current experience
13
+
14
+ - **Account and models:** sign in, inspect account-discovered models, refresh metadata, and manage the account from the native GitHub Copilot row under **Settings → Models**.
15
+ - **Search routing:** choose the primary and fallback search providers under **Plugins → dsh-github-copilot → Details**. The page intentionally exposes only those user-facing choices; protocol probes, timeouts, allowlists, and transport switches are not presented as routine UI. If the updated routed service is not active yet, the card reports **Restart required** instead of presenting a broken form.
16
+ - **Usage:** eligible Copilot sessions get an optional **Credits** control beside the composer, with provider-reported billing-cycle data and explicit unavailable/stale states. TLS diagnostics explain how Windows users behind Watt Toolkit/Steam++-style local trust roots can start Desktop with `NODE_USE_SYSTEM_CA=1` without disabling certificate verification.
17
+ - **Compatibility:** the plugin applies Copilot-only tool-schema, reasoning-presentation, request-budget, and account-model compatibility through published DSH APIs. It does not patch Core or maintain a second model catalog.
18
+
19
+ ![Current Web search provider routing on the plugin details page](./docs/images/copilot-search-routing.png)
20
+
21
+ The screenshot uses the current built Client with synthetic providers in an isolated browser fixture. It demonstrates the shipped configuration surface, not live credentials, account access, search success, or production Desktop activation.
22
+
12
23
  ## Compatibility baselines and qualification targets
13
24
 
14
25
  | DSH surface | Exact source pin | Models UI seam |
@@ -85,7 +96,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
85
96
 
86
97
  ## Install and sign in
87
98
 
88
- The commands below target the package version `0.4.0-alpha.51`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
99
+ The commands below target the package version `0.4.0-alpha.53`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
89
100
 
90
101
  Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
91
102
 
@@ -98,10 +109,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
98
109
  For a standalone named profile only, the supported CLI command is:
99
110
 
100
111
  ```sh
101
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.51/dsh-github-copilot-0.4.0-alpha.51.tgz
112
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
102
113
  ```
103
114
 
104
- For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.51` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
115
+ For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.53` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
105
116
 
106
117
  Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in**, and complete the GitHub device-code flow. Plugin installation changes the selected profile; activation follows that profile's normal reload/restart policy.
107
118
 
@@ -115,7 +126,7 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
115
126
 
116
127
  ### Auto model routing
117
128
 
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.
129
+ The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool. Before preference, routing evaluates input headroom against each candidate's hard input budget, filtering out candidates that cannot accommodate current messages. Soft preferences distribute across upper/lower/center candidate bands using deterministic in-memory seeds to avoid monopolizing a single top candidate across Sessions. If no candidate fits, Auto selects the largest input capacity model and triggers compaction pressure on compressible history. Auto resolves once per Core turn to a real model; every tool step, retry and automatic compaction recovery in that turn stays on that model, while a later Chat or Goal turn may choose again. Image turns require an account-verified image-capable candidate. The completed turn tail shows `Auto · <actual model>` (or the selected preference) with a compact `?` explanation. Search keeps its independent provider-owned model policy, and subagents / Team teammates continue to inherit Core's concrete route rather than being relabeled as Auto. See the [policy and mockup](./docs/automatic-model-routing.md); model exclusions and a nested picker are still proposals.
119
130
 
120
131
  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
132
 
@@ -125,39 +136,8 @@ Concurrent status retries join the compact account's pending read. An obsolete r
125
136
 
126
137
  The public provider-card slot is additive: it cannot replace Core's **Edit/Delete** controls. The native editor remains available, but normal plugin discovery needs no manual model definitions. Embedding the controls does not merge `github-copilot` with `github-copilot-preview`, remove configuration, rewrite history or change model selection. If controls are missing from both eligible card and fallback, verify the active profile and loaded Host/Client version.
127
138
 
128
- **Timestamp illustration (`0.4.0-alpha.7`):** the retained images show that built Client in isolated Edge with synthetic Remote replies and a provider-shell fixture. They do not prove alpha.8 session/search isolation, the Add warning, or a completed route migration; no visual redesign is claimed beyond the new draft warning. The normal header shows sign-in status, model count, last successful update time and **Manage**; manual **Refresh models** appears only inside **Manage**. The browser fixture covered retained stale counts during refresh, status-only fresh reopen, manual refresh, Retry, credential clearing, forced login discovery and a 375 px viewport, with no external network requests or browser errors. This is not live Core/production authorization evidence; Host 24-hour TTL and cooldown timing are covered separately by unit tests, not these screenshots.
129
-
130
139
  The subdued **Updated … ago** timestamp uses the last successful model snapshot, not the time the page opened. Its tooltip and accessible label provide the complete local date/time and time zone. Display text updates locally as time passes without fetching status or models. Refresh/failure retains the previous successful time while that account's display evidence remains valid; sign-out/account invalidation clears it. Missing or invalid timestamps are hidden; future clock values use an absolute date instead of a misleading age. Manage does not repeat the timestamp.
131
140
 
132
- ![Alpha.7 signed-in provider with model count, last successful update time and Manage](./docs/images/copilot-model-freshness.png)
133
-
134
- ![Alpha.7 provider retains the previous model count and update time while refreshing](./docs/images/copilot-model-refreshing.png)
135
-
136
- <details>
137
- <summary>Historical alpha.5 and alpha.3 illustrations</summary>
138
-
139
- The alpha.5 provider PNGs below show the previous built Client in isolated Edge with synthetic Remote/provider-shell fixtures, not the current refresh layout.
140
-
141
- ![Alpha.5 account controls embedded in one GitHub Copilot provider row; synthetic fixture](./docs/images/copilot-provider-entry.png)
142
-
143
- ![Alpha.5 embedded authorization controls with a nonfunctional example device code](./docs/images/copilot-provider-authorization.png)
144
-
145
- **Historical illustrations (`0.4.0-alpha.3`):** the animation and older screenshots below show the earlier standalone fixture, not the provider-integrated layout. The old animation shows **Sign in → Copy code → Copied → Signed in → Refresh models → Metadata ready**. Actual GitHub authorization is a separate user step and was not recorded.
146
-
147
- ![Previous alpha.3 isolated account fixture: sign-in, copy feedback, and explicit model refresh](./docs/images/github-copilot-auth-flow.gif)
148
-
149
- The previous-version previews were recorded in an isolated, network-disabled browser fixture. They are not proof that the planned package version is published, installed or loaded. Authorization and discovery responses are synthetic; `ABCD-EFGH` is not a usable code. No real sign-in, sign-out, model refresh, credential change, or route migration was performed for recording, and no production cookies or browser storage were reused.
150
-
151
- Previous-version device-code illustration:
152
-
153
- ![Previous alpha.3 isolated account fixture awaiting authorization with a synthetic code and Copy code button](./docs/images/copilot-device-code-copy.png)
154
-
155
- Previous-version signed-in illustration (the current UI additionally performs the one bounded discovery after this user's successful Start sign-in):
156
-
157
- ![Previous alpha.3 isolated account fixture after sign-in, with explicit model refresh and no device code](./docs/images/copilot-auth-card-signed-in.png)
158
-
159
- </details>
160
-
161
141
  ### Agent and automation flow
162
142
 
163
143
  Agents should treat the browser authorization as a human handoff, not as a token-acquisition task:
@@ -169,7 +149,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
169
149
  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
150
  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
151
 
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.51`, 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).
152
+ GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.53`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
173
153
 
174
154
  **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
155
 
@@ -269,11 +249,11 @@ Auto-mode native search identity comes from the captured initiating Session's ef
269
249
  - **Legacy canonical inline agent-loop path:** eligible `github-copilot` requests support Responses or Anthropic Messages native-search candidates only while that legacy route remains configured.
270
250
  - **Chat Completions models:** remain usable through normal native transport but do not advertise hosted search.
271
251
 
272
- ### Session-aware search routing (implementation awaiting release)
252
+ ### Session-aware search routing
273
253
 
274
254
  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
255
 
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.
256
+ 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 uses revision-checked writes in the existing `github-copilot` settings namespace. When the bundle slot is unavailable, the routing card falls back to **Settings → Models**, or **Settings → Web search** if the Models footer is also unavailable. 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**. Opening the page does not migrate or rewrite settings, and the removed internal hosted-search tuning form is not part of the user-facing configuration. Removing the companion restores the original web service.
277
257
 
278
258
  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
259
 
@@ -343,7 +323,7 @@ The plugin does not rewrite `$DSH_HOME/AGENTS.md`. Installers may merge these ru
343
323
 
344
324
  The plugin's `github-copilot` settings section controls account-metadata freshness, managed request budgets and hosted search. `enabled` still controls hosted search only:
345
325
 
346
- Search **provider routing** and the `github-copilot` hosted-search options below are edited on the plugin detail page. The advanced form writes only explicitly changed leaves; it never rewrites a saved route allowlist just because another option was saved. Account-metadata and managed-budget options remain in their existing settings section.
326
+ The plugin details page exposes only **Search provider** and **Fallback provider**. Account-metadata, request-budget, and hosted-search safety values remain schema-backed settings for administrators and compatibility tooling; they are not routine user-facing controls.
347
327
 
348
328
  | Key | Default | Scope and meaning |
349
329
  |---|---:|---|
@@ -440,8 +420,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
440
420
  `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.
441
421
 
442
422
  ```sh
443
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.51/dsh-github-copilot-0.4.0-alpha.51.tgz
444
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.51/SHA256SUMS
423
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
424
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/SHA256SUMS
445
425
  sha256sum --check SHA256SUMS
446
426
  ```
447
427
 
@@ -449,7 +429,7 @@ PowerShell can verify the same two downloaded files with:
449
429
 
450
430
  ```powershell
451
431
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
452
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.51.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
432
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.53.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
453
433
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
454
434
  ```
455
435
 
package/README.zh.md CHANGED
@@ -9,9 +9,20 @@
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.51`;这不代表已有的两条真实路由被合并或移除。版本化 URL 不表示 Release 已发布或本机已加载;仅在该 Release 与校验和可用后使用安装命令。源码、发布制品、已安装版本和实际加载运行时需分别确认,本地升级和中断会话的重启仍需用户批准。
12
+ ## 当前体验
13
13
 
14
- Alpha.24 修复了 Web search 卡片缺少精确 Remote 依赖声明的问题。当时卡片位于 **设置 → 模型**(`settings.models.footer`,list/root),旧 Core 回退到独立 Web search section。现在优先显示在插件详情页;搜索子 Fiber 仍独立等待 routing namespace,不影响账号控件和既有搜索安全检查;实际打包 Desktop 验收仍是独立关卡。
14
+ - **账号与模型:**在 **设置 → 模型** 的原生 GitHub Copilot 行内完成登录、查看账号发现模型、刷新元数据及账号管理。
15
+ - **搜索路由:**在 **插件 → dsh-github-copilot → 详情**选择主搜索 Provider 与兜底 Provider。页面只保留用户真正需要的两项选择,不再把协议探测、超时、白名单或传输开关作为日常配置暴露。更新后的路由服务尚未激活时,卡片会明确显示 **需要重启生效(Restart required)**,而不是继续展示无法使用的表单。
16
+ - **用量:**符合条件的 Copilot 会话会在输入框旁显示可选的 **Credits / 额度** 控件,展示供应方明确返回的计费周期数据,并如实区分不可用与历史快照。TLS 诊断会指导使用 Watt Toolkit/Steam++ 等本地信任根的 Windows 用户通过 `NODE_USE_SYSTEM_CA=1` 启动 Desktop,无需关闭证书校验。
17
+ - **兼容处理:**插件通过 DSH 已发布公开接口提供 Copilot 专用 Tool Schema、Thinking 展示、请求预算及账号模型兼容,不修改 Core,也不维护第二套模型目录。
18
+
19
+ ![当前插件详情页的 Web 搜索 Provider 路由](./docs/images/copilot-search-routing.png)
20
+
21
+ 截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
22
+
23
+ > 当前文档与安装命令对应版本 `0.4.0-alpha.53`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
24
+
25
+ Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
15
26
 
16
27
  ## 兼容基线与待验收目标
17
28
 
@@ -100,10 +111,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
100
111
  仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
101
112
 
102
113
  ```sh
103
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.51/dsh-github-copilot-0.4.0-alpha.51.tgz
114
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
104
115
  ```
105
116
 
106
- Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.51`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
117
+ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.53`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
107
118
 
108
119
  随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
109
120
 
@@ -117,7 +128,7 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
117
128
 
118
129
  ### Auto 模型路由
119
130
 
120
- 托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池;偏好只改变公布容量的排序目标,不改变资格,也不保证模型质量、速度或成本。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有验证过的图片候选。回复末尾显示 `Auto · <真实模型>`(或所选偏好)和原因。搜索仍由独立策略管理;原生子代理继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md);模型排除与嵌套菜单仍只是提案。
131
+ 托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有验证过的图片候选。回复末尾显示 `Auto · <真实模型>`(或所选偏好)和原因。搜索仍由独立策略管理;原生子代理与 Team 队友继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md);模型排除与嵌套菜单仍只是提案。
121
132
 
122
133
  新 Session 继承任一默认 Auto 偏好时,首次解析请求会把准确的虚拟偏好记录为该 Session 的持久选择,请求头仍记录实际模型。后续轮次继续保留该偏好,而不会固定到请求头;显式选择真实模型才切换到固定路由。旧 `auto` ID 保持均衡档。全局默认值变化不会迁移已有具体模型记录的 Session。
123
134
 
@@ -127,39 +138,8 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
127
138
 
128
139
  公开的 provider-card slot 只能追加内容,不能替换 Core 的 **Edit/Delete**。原生编辑器仍保留,但正常插件发现流程无需手工定义模型。控件嵌入不等于合并 `github-copilot` 与 `github-copilot-preview`,不会删除配置、改写历史或切换模型选择。若已有卡片与 fallback 都缺少控件,请核对活动 profile 与实际加载的 Host/Client 版本。
129
140
 
130
- **时间戳示意(`0.4.0-alpha.7`):**保留的图片展示该版本实际构建 Client 的隔离 Edge 与合成 Remote/provider-shell fixture,不证明 alpha.8 会话/搜索隔离、新建警告或路由迁移已经完成。除新增 draft 警告外,不声称进行了视觉重设计。默认行显示登录状态、模型数量、上次成功更新时间与 **Manage**,手动 **Refresh models** 只在 **Manage** 内。浏览器 fixture 覆盖刷新时保留旧数量、新鲜缓存重开仅读状态、手动刷新、Retry、凭据清理、登录强制发现及 375 px 窄屏,无外部网络请求或浏览器错误。这不是真实 Core/生产授权证据;Host 24 小时 TTL 与冷却时序由单元测试另行覆盖,不能靠截图证明。
131
-
132
141
  低强调度的 **Updated … ago** 使用上次成功获取模型列表的时间,而不是打开页面的时间。悬停提示和无障碍标签提供本地完整日期、时间及时区;相对时间只在浏览器内更新,不请求状态或模型。读取缓存、刷新中或失败均保留上次成功时间(仅限仍有效的同账号展示证据);退出/账号失效后清除。没有有效时间戳则不显示;未来时间使用绝对日期,避免错误地显示“几分钟前”。Manage 内不再重复显示时间戳。
133
142
 
134
- ![Alpha.7 已登录 provider 显示模型数量、上次成功更新时间与 Manage](./docs/images/copilot-model-freshness.png)
135
-
136
- ![Alpha.7 刷新过程中保留之前的模型数量和更新时间](./docs/images/copilot-model-refreshing.png)
137
-
138
- <details>
139
- <summary>alpha.5 与 alpha.3 历史示意</summary>
140
-
141
- 下列 alpha.5 provider PNG 来自旧版实际构建 Client 的隔离 Edge 与合成 Remote/provider-shell fixture,不代表当前刷新布局。
142
-
143
- ![Alpha.5 单个 GitHub Copilot provider 行内的账号控件,合成测试环境](./docs/images/copilot-provider-entry.png)
144
-
145
- ![Alpha.5 provider 行内授权区域,展示不可用的示例验证码](./docs/images/copilot-provider-authorization.png)
146
-
147
- **历史示意(`0.4.0-alpha.3`):**下列动图和旧截图来自之前的独立账号 fixture,不是 provider 集成布局。旧动图展示 **登录 → 复制验证码 → 已复制 → 已登录 → 刷新账号模型 → 元数据就绪**;GitHub 真实授权是独立用户步骤,不在录制范围内。
148
-
149
- ![旧版 alpha.3 隔离账号 fixture:登录、验证码复制反馈与主动刷新模型](./docs/images/github-copilot-auth-flow.gif)
150
-
151
- 旧预览录制于隔离且禁用网络的浏览器 fixture,不代表计划版本已经发布、安装或加载。授权和模型发现响应均为合成数据;`ABCD-EFGH` 不可用于登录。录制没有执行真实登录、退出、模型刷新、凭据变更或路由迁移,也没有复用生产浏览器的 cookie 或存储状态。
152
-
153
- 旧版本验证码示意:
154
-
155
- ![旧版 alpha.3 隔离账号 fixture 等待授权,展示合成验证码与 Copy code 按钮](./docs/images/copilot-device-code-copy.png)
156
-
157
- 旧版本已登录示意(当前界面另外会在本用户成功 Start sign-in 后执行一次有界发现):
158
-
159
- ![旧版 alpha.3 隔离账号 fixture 已登录,保留主动刷新模型入口且无验证码](./docs/images/copilot-auth-card-signed-in.png)
160
-
161
- </details>
162
-
163
143
  ### Agent 与自动化流程
164
144
 
165
145
  Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行获取 token 的任务:
@@ -171,7 +151,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
171
151
  5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
172
152
  6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
173
153
 
174
- 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.51`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
154
+ 每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.53`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
175
155
 
176
156
  **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
157
 
@@ -277,11 +257,11 @@ Grant 写入或复用前,Host normalizer 只会把 pi-ai 文档化的 `type`
277
257
  - **通过 `ctx.web.search()` 使用 `github-copilot-hosted`:**只支持账号可用且协议经过核实的 OpenAI Responses 候选,包括符合条件的托管账号模型。
278
258
  - **Chat Completions 模型:**可走普通原生 SDK transport,但不会因此宣称 hosted search 可用。
279
259
 
280
- ### 按会话能力分流搜索(实现待发布)
260
+ ### 按会话能力分流搜索
281
261
 
282
262
  新版 bundle 通过插件自有的 web 服务外观层分流,将原官方服务及完整配置保留在命名作用域中,不修改 Core 或会话预设。原生 `web_search` 保留参数校验、查询/来源数量限制、执行中间件、超时和结果展示;有可靠发起会话上下文的直接 `ctx.web.search` 调用也使用相同分流规则。
283
263
 
284
- 在 **插件 → dsh-github-copilot → 详情**中,**Web search** 卡片通过公开的 `plugins.bundle.config`(按包名索引)设置跨后端搜索路由;搜索路由直接保存在 `github-copilot` 命名空间的 `searchRouting` 路径下,通过嵌套路径一次完成修订号校验写入,无需额外注册第二设置命名空间;同一页面还可展开 Copilot 托管搜索选项(开关、路由白名单、引用、工具过滤、能力证明、超时及旧兜底),两项操作分别保存并协同更新版本号。若 bundle slot 不可用,路由卡片回退到 **设置 → 模型**;若 Models footer 也不可用,则回退到 **设置 → Web search**;高级选项仍可通过原设置分区修改。同一时间只注册一处路由卡片,离开详情页会丢弃未保存的草稿。账号登录、状态及模型刷新仍在 **设置 → 模型**。仅打开新页面不会迁移或改写已有设置,卸载本插件后恢复原 web 服务。
264
+ 在 **插件 → dsh-github-copilot → 详情**中,**Web search** 卡片通过公开的 `plugins.bundle.config`(按包名索引)设置跨后端搜索路由;搜索路由直接保存在 `github-copilot` 命名空间的 `searchRouting` 路径下,并通过嵌套路径一次完成修订号校验写入。若 bundle slot 不可用,路由卡片回退到 **设置 → 模型**;若 Models footer 也不可用,则回退到 **设置 → Web search**。同一时间只注册一处路由卡片,离开详情页会丢弃未保存的草稿。账号登录、状态及模型刷新仍在 **设置 → 模型**。仅打开页面不会迁移或改写已有设置;已移除的内部托管搜索调参表单不再属于用户配置。卸载本插件后恢复原 web 服务。
285
265
 
286
266
  **Search provider** 主选择器提供 **Auto — follow Chat** 和通过路由外观层实际注册的搜索 Provider;**Fallback provider**(兜底后端)使用同一目录,额外提供 **None — no fallback**。选择项代表搜索后端,不代表单个模型:即使多个账号模型可以执行搜索,Copilot 仍然只有一个搜索后端。普通配置只需选择这两个 Provider,不再要求另选搜索模型。
287
267
 
@@ -346,7 +326,7 @@ Copilot Session 如需更宽的文件或命令权限,必须在调用前选择
346
326
 
347
327
  插件 `github-copilot` settings section 控制账号元数据新鲜度、托管请求预算与 hosted search;`enabled` 仍只控制 hosted search:
348
328
 
349
- 搜索**后端分流**与下表中的 `github-copilot` 托管搜索选项均可在插件详情页修改。高级表单只写明确更改的设置项;修改其他选项不会重写已保存的路由白名单。账号元数据及托管请求预算参数仍留在原设置分区。
329
+ 插件详情页只提供 **Search provider** 与 **Fallback provider**。账号元数据、请求预算及 hosted-search 安全参数仍作为管理员和兼容工具可用的 schema 设置保留,不再作为普通用户的日常配置项展示。
350
330
 
351
331
  | 键 | 默认值 | 作用范围与含义 |
352
332
  |---|---:|---|
@@ -451,8 +431,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
451
431
  `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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
452
432
 
453
433
  ```sh
454
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.51/dsh-github-copilot-0.4.0-alpha.51.tgz
455
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.51/SHA256SUMS
434
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/dsh-github-copilot-0.4.0-alpha.53.tgz
435
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.53/SHA256SUMS
456
436
  sha256sum --check SHA256SUMS
457
437
  ```
458
438
 
@@ -460,7 +440,7 @@ PowerShell 可以对已下载的同一组文件执行:
460
440
 
461
441
  ```powershell
462
442
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
463
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.51.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
443
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.53.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
464
444
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
465
445
  ```
466
446
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.0-alpha.51"
11
+ "version": "0.4.0-alpha.53"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -990,6 +990,7 @@
990
990
  {"file": "src/preview-route.ts", "marker": "GITHUB_COPILOT_AUTO_MODEL_ID"},
991
991
  {"file": "src/auto-model-host.ts", "marker": "github-copilot/auto-model-decision"},
992
992
  {"file": "src/auto-model-presentation.ts", "marker": "conversation.chat.turnTail"},
993
+ {"file": "src/auto-model-presentation.ts", "marker": "data-time-hover-root"},
993
994
  {"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
994
995
  ],
995
996
  "tests": [
@@ -998,6 +999,7 @@
998
999
  {"file": "tests/auto-model-host.spec.ts", "name": "resolves after downstream model selection and freezes one decision per turn"},
999
1000
  {"file": "tests/auto-model-host.spec.ts", "name": "replaces Core virtual-Auto switch guidance with the resolved real route"},
1000
1001
  {"file": "tests/auto-model-presentation.spec.ts", "name": "folds a durable decision into turn-scoped credential-free attribution"},
1002
+ {"file": "tests/auto-model-presentation.spec.ts", "name": "places Auto attribution after the settled clock and reveals it only on hover"},
1001
1003
  {"file": "tests/preview-route.spec.ts", "name": "publishes Auto as a virtual picker entry but refuses unresolved adapter dispatch"},
1002
1004
  {"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "shrinks durable history and rebuilds the switched model request without sending the oversized original"}
1003
1005
  ]
@@ -58,7 +58,7 @@ The provider integration introduced in `0.4.0-alpha.5` replaces the older indepe
58
58
  - **Last-success display (#97):** `snapshot.discoveredAt` appears beside the model count outside **Manage**, without a duplicate inside. Past times use English relative text; the tooltip and accessible semantic `time` expose the full local date, time and time zone. Missing/invalid timestamps or no account hide it; future times use an absolute label. One mounted 60-second display-only timer updates the relative text without RPC/status/discovery, and is disposed when the timestamp disappears or the view unmounts. Pending/failed refresh keeps the last success time; successful refresh replaces it and sign-out clears it. Cache/discovery and authorization rules are unchanged.
59
59
  - **Honest integration limit:** the published provider-card slot is additive and cannot replace Core **Edit/Delete**. Normal plugin discovery needs no manual model definitions, but the native editor stays available. Embedding account controls does not merge/remove canonical `github-copilot` and managed `github-copilot-preview`, copy credentials, rewrite configuration/history or migrate selection. Any optional real route removal still requires the [separate reviewed migration](./single-route-migration.md).
60
60
  - **Acceptance still required:** test missing/idle/stale/error/loading open-time ensure versus fresh-cache no-request, shared Host flight, TTL/cooldown boundaries, display-only stale data, immediate revocation, definitive unknown-model refresh without replay, Manage-only manual refresh and visible Retry. Retain provider/footer/old-Core fallback, overlapping-owner transfer, final-unmount cleanup and once-per-explicit-login tests. Read the implementation PR's actual results before claiming these checks passed; documentation is not runtime or live OAuth evidence.
61
- - **Browser/media evidence:** primary `copilot-model-freshness.png` and `copilot-model-refreshing.png` now show the actual alpha.7 built Client in isolated Edge with synthetic Remote/provider-shell fixtures. The timestamp check advanced a fake clock from 8 to 10 minutes with zero additional RPC, retained the prior time during pending/error, replaced it after successful refresh, cleared it and disposed the timer on sign-out, and verified a safe 375 px layout. Host TTL/cooldown timing is unit-test evidence, not screenshot evidence; no live Core or production authorization is claimed. Provider-entry/authorization PNGs remain historical alpha.5; older compact-account GIF/PNGs remain alpha.3.
61
+ - **Browser/media evidence:** `copilot-search-routing.png` shows the current built plugin-detail routing card in isolated Edge with synthetic providers. It is presentation evidence only, not proof of live credentials, provider availability, search success or Desktop activation. Host TTL/cooldown timing and account-control lifecycle remain unit-test evidence rather than screenshot evidence.
62
62
 
63
63
  ## Session-scoped Copilot follow-up (#99, planned alpha.8)
64
64
 
@@ -67,7 +67,7 @@ The provider integration introduced in `0.4.0-alpha.5` replaces the older indepe
67
67
  - **Native API limits:** a new Copilot draft warns that saving a native profile adds another real group, not another account. Add cannot be vetoed and Save cannot be disabled through the public additive slot. Public `session.selectModel` also writes the future global default; unselected empty Sessions can inherit it. Do not claim enforced one-route registration or immutable empty Sessions.
68
68
  - **Delivery boundary:** code does not auto-migrate configuration, credentials, selections or history. After release, the operator must resolve approved Session/default choices separately; the config-only v1 Ops command performs no automated selection writes, then may compare-and-swap only the reviewed user-native profile path after ruling out base/journal conflicts, and read back registration. Any search allowlist change to `github-copilot-preview` is a separate reviewed Ops edit, never silent broadening. See [migration](./single-route-migration.md).
69
69
  - **Request-context correction:** `Agent.options` remains Core's activation seed, not selected-model evidence. Real `installModelSelection` overrides request/assembly; the Session records effective `requestHeader().config` before tools. Capture the initiating Session's proven request context or use explicit `GenerateOptions`; otherwise traditional search is unavailable. Pending new selection before its next request must not expose the prior header as current prompt guidance.
70
- - **Acceptance/evidence:** use real `installModelSelection` to check concurrent A/B models against unchanged activation/default seed C, reject unproven or stale-header prompt guidance after a pending selection, cold Chat and `/model` discovery, cold search/probe, owner invalidation, missing initiator, Add warning with Save retained, and CAS-conflict refusal/readback. The retained alpha.7 screenshots illustrate timestamps, not these new behaviors or a completed migration; consult the implementation/ops results separately.
70
+ - **Acceptance/evidence:** use real `installModelSelection` to check concurrent A/B models against unchanged activation/default seed C, reject unproven or stale-header prompt guidance after a pending selection, cold Chat and `/model` discovery, cold search/probe, owner invalidation, missing initiator, Add warning with Save retained, and CAS-conflict refusal/readback. README screenshots do not prove these behaviors or a completed migration; consult the implementation and operations evidence separately.
71
71
 
72
72
  ## Live migration evidence follow-up (#101, planned alpha.9)
73
73
 
@@ -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), [#192](https://github.com/cloga/dsh-github-copilot/issues/192)
3
+ **Tracking:** [#174](https://github.com/cloga/dsh-github-copilot/issues/174), [#192](https://github.com/cloga/dsh-github-copilot/issues/192), [#199](https://github.com/cloga/dsh-github-copilot/issues/199)
4
4
 
5
5
  **Target:** official DSH and Windows Desktop `0.2.0-rc.2`
6
6
 
@@ -22,37 +22,52 @@ Selecting Auto uses normal Core selection behavior, including saving it as the f
22
22
 
23
23
  A Goal does not become one indefinitely frozen Auto decision. Each automatic continuation that Core opens as a new turn is classified independently. Tool steps inside that turn do not trigger another decision.
24
24
 
25
- ## MVP routing policy
25
+ ## Routing policy and input fit
26
26
 
27
27
  The account `/models` catalog is authoritative for entitlement and hard capabilities: protocol, context and output limits, image input, tool support, reasoning efforts, and server policy. Unknown or incomplete capability metadata fails closed.
28
28
 
29
- The catalog does not provide trustworthy quality, latency, price, or global-health rankings. The MVP therefore does **not** infer model quality from a marketing name, model-ID prefix, provider order, or token price. It does not claim to reproduce GitHub's private Auto algorithm.
29
+ The catalog does not provide trustworthy quality, latency, price, or global-health rankings. The routing policy therefore does **not** infer model quality from a marketing name, model-ID prefix, provider order, or token price. It does not claim to reproduce GitHub's private Auto algorithm.
30
30
 
31
- The initial deterministic policy classifies only the latest user turn:
31
+ ### Hard input fit check before preference
32
32
 
33
- | Class | Structural signal | Selection |
34
- | --- | --- | --- |
35
- | Fast | short text turn with little structured content | lowest eligible advertised capacity |
36
- | Balanced | ordinary text turn or image turn | median eligible advertised capacity |
37
- | Strong | large or highly structured text turn | highest eligible advertised capacity |
33
+ Before applying soft preferences, routing checks whether each candidate can accommodate the estimated input tokens of the current turn:
38
34
 
39
- Capacity ordering is based on account-advertised reasoning range, context window, and output capacity, with model ID used only as a deterministic tie-breaker. Capacity is not presented as a quality, latency, or cost fact. The policy is intentionally replaceable by reviewed benchmark evidence later.
35
+ 1. **Input estimate:** `estimateTurnInputTokens` measures current conversation messages using `@earendil-works/pi-ai/utils/estimate` (`estimateMessageTokens` and `estimateContextTokens`).
36
+ 2. **Hard candidate budget:** For each candidate model, `calculateRequestBudget` calculates `hardInputLimit` given the model context window, output reservation, and safety allowance.
37
+ 3. **Headroom filtering:** Candidates with insufficient headroom (`estimatedInputTokens > hardInputLimit`) are filtered out. If one or more fitting candidates exist, soft preference selects among the `fitting` subset.
38
+ 4. **No-fit and compaction recovery:** If no candidate can fit the current messages:
39
+ - Auto selects the candidate with the **largest input capacity** to give Core compaction maximum headroom.
40
+ - It records a structured diagnostic in the decision event:
41
+ - `fixed-content-cannot-fit`: the latest user turn alone exceeds maximum capacity and cannot be compacted away.
42
+ - `compaction-unavailable`: compaction is disabled or has zero retries configured.
43
+ - `attempted-but-still-oversized`: a compaction summary already exists in history and the turn remains oversized.
44
+ - `compaction-eligible`: prior history is compressible and downstream dispatch will trigger compaction pressure.
45
+ 5. **Final framing limitation:** At routing time, only messages are estimated; downstream `system-prompt/assemble` injects system prompt instructions and tool schemas. If final framing pushes a near-limit request over the budget, the native provider guard (`inspectRequest`) truthfully rejects the request with `COPILOT_CONTEXT_BUDGET_EXCEEDED` without bypassing safety boundaries.
40
46
 
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.
47
+ ### Soft capacity preferences across candidate bands
42
48
 
43
- ### Soft capacity preferences
49
+ All three virtual preferences use the *same* eligible account models. Account entitlement, verified input capability (including image input), and input headroom are hard filters; preference changes where the routing policy lands in the deterministic, advertised-capacity order across candidate bands:
44
50
 
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:
51
+ - **Intelligence:** Biased toward higher advertised capacity across the upper candidate band.
52
+ - **Efficiency:** Biased toward lower advertised capacity across the lower candidate band, though demanding tasks allow higher capacity.
53
+ - **Balance:** Central candidate band.
54
+
55
+ To avoid monopolizing a single top candidate (such as Grok 4.7) across all turns and Sessions, band selection uses an in-memory deterministic seed derived from `${sessionId}:${turn}` (or turn content when Session context is absent). This guarantees:
56
+
57
+ - Selection is **100% frozen** across all steps and retries within the same turn.
58
+ - Unrelated Sessions or turns sample across the candidate band rather than concentrating on one model.
59
+ - No sensitive prompt text or seed hashes are persisted or sent over the network.
60
+ - When only a single candidate is eligible or fitting, it is returned unchanged.
46
61
 
47
62
  | Latest-turn class | Efficiency | Balance (`auto`) | Intelligence |
48
63
  | --- | --- | --- | --- |
49
- | Fast | low | low | middle |
50
- | Balanced | low | middle | high |
51
- | Strong | min(high, max(1, middle)) | high | high |
64
+ | Fast | low band (index 0) | low band (index 0) | middle band |
65
+ | Balanced | lower band | center band | upper band |
66
+ | Strong | center band | upper band | upper band |
52
67
 
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.
68
+ These are **capacity preferences**, not measured quality, speed, price, or inference-cost preferences. They cannot promise that Intelligence is smarter or Efficiency faster or cheaper. The actual request-budget and compaction checks still apply after selection; no cost or speed metadata is fabricated.
54
69
 
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.
70
+ The exact virtual preference stays in the Session's pending selection across turns, while each real request header and transport record the chosen account model. The durable decision event also records the preference, candidate counts, input budget, and input fit diagnostic. Switching to a real model ends automatic routing for subsequent turns.
56
71
 
57
72
  ## Images
58
73
 
@@ -91,10 +106,10 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
91
106
 
92
107
  Core already places route and usage details at the end of a completed turn. The MVP follows that interaction pattern rather than adding provider/model tags above the answer.
93
108
 
94
- For a completed Auto response, the proposed turn-tail display is:
109
+ For a completed Auto response, the attribution sits on the same footer row as Core's usage and clock, after the end time. It stays hidden until the message is hovered or focused, matching that chrome. It is not a separate line above the answer. The turn-tail display is:
95
110
 
96
111
  ```text
97
- Auto · <actual model> ?
112
+ [actions] [usage] [time] Auto · <actual model> ?
98
113
  ```
99
114
 
100
115
  The `?` opens a compact explanation using normalized facts such as:
@@ -103,20 +118,21 @@ The `?` opens a compact explanation using normalized facts such as:
103
118
  - standard turn;
104
119
  - large structured turn;
105
120
  - image capability required;
106
- - number of eligible account models.
121
+ - number of eligible account models;
122
+ - number of models that can fit turn context (when restricted by input headroom).
107
123
 
108
124
  The plugin records a credential-free `github-copilot/auto-model-decision` Session event before Core persists the real request header. Historical attribution is derived from that durable decision plus assistant/request provenance, never from the current picker or a later catalog snapshot. Raw prompts, credentials, provider response bodies, and guessed prices are never disclosed.
109
125
 
110
- ## Subagents
126
+ ## Subagents and Agent Teams
111
127
 
112
128
  General native subagent Auto inheritance is **not** in the base MVP.
113
129
 
114
- Core currently creates a native child from the parent's effective real request configuration. Continuable descriptors retain the merged provider/model/effort but do not preserve enough public evidence to distinguish inherited Auto intent from an explicit child override that happens to equal the same real model. The plugin must not relabel that concrete child route as Auto or write a fabricated child selection.
130
+ In official DSH 0.2.0-rc.2, `TeamRoster.spawn` calls `ctx.subagents.startContinuable` without `request.agentOptions`. Core's `resolveChildAgentOptions` snapshots the parent's resolved concrete route into the teammate's options and durable descriptor. Public Core evidence cannot distinguish an inherited concrete snapshot from an explicit concrete override. The plugin must not relabel that concrete child route as Auto or write a fabricated child selection.
115
131
 
116
- The MVP therefore preserves native behavior:
132
+ The implementation preserves native behavior:
117
133
 
118
134
  - a child with an explicit model override uses that model;
119
- - a child without an override inherits Core's resolved concrete route;
135
+ - a child or Team teammate without an override inherits Core's resolved concrete route;
120
136
  - the child UI shows the real model truthfully;
121
137
  - no plugin code claims independent child Auto classification.
122
138
 
@@ -140,7 +156,7 @@ For an otherwise unselected Session that inherits Auto from the global default,
140
156
 
141
157
  ## Acceptance criteria
142
158
 
143
- The MVP is accepted only when unchanged official Core contract tests prove:
159
+ The implementation is accepted only when unchanged official Core contract tests prove:
144
160
 
145
161
  1. Auto appears only in the managed Copilot provider and explicit real/provider selections remain untouched.
146
162
  2. Core's downstream model-selection result is visible to the prepended plugin listener, and the committed request header contains the resolved real model.
@@ -151,7 +167,9 @@ The MVP is accepted only when unchanged official Core contract tests prove:
151
167
  7. choosing a smaller-context model can trigger the existing local pressure signal, Core compaction, and same-model retry without sending the oversized request.
152
168
  8. hosted search remains independent and never receives the virtual Auto ID as a transport model.
153
169
  9. the turn-tail attribution is derived from durable decision/provenance data and is hidden for explicit model turns.
154
- 10. no Core file, dependency artifact, private registry, shared model catalog, or live history is modified.
170
+ 10. input fit check filters out candidates with insufficient hard input headroom before soft preference.
171
+ 11. soft preferences distribute across upper/lower/center candidate bands without monopolizing one top model.
172
+ 12. no Core file, dependency artifact, private registry, shared model catalog, or live history is modified.
155
173
 
156
174
  Synthetic tests prove composition and contracts only. They do not prove a live account's model availability, provider quality, pricing, OAuth readiness, Desktop activation, or real transport success.
157
175
 
@@ -161,7 +179,7 @@ Synthetic tests prove composition and contracts only. They do not prove a live a
161
179
  - GitHub health signals or GitHub's private Auto service;
162
180
  - user-managed exclusions of individual account models and custom picker grouping;
163
181
  - cross-provider routing;
164
- - native subagent Auto inheritance;
182
+ - native subagent and Team Auto inheritance;
165
183
  - model fallback after a provider failure;
166
184
  - side-effect replay;
167
185
  - automatic changes to existing Session selections, settings, or histories.