dsh-github-copilot 0.1.0-alpha.8.dsh.0.2.2.rc.3 → 0.1.0-alpha.9.dsh.0.2.2.rc.3

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
@@ -7,10 +7,10 @@ This file is the authoritative entry point for humans and coding agents. Read it
7
7
  This repository follows a **plugin-only** policy: implement fixes in `dsh-github-copilot` through existing published public Core/pi-ai APIs. This rule applies to agents, subagents, scripts, installers and release plans, not just the final diff.
8
8
 
9
9
  - Do not edit DSH Core source, create Core implementation worktrees, prepare Core commits/PRs/releases, or rebuild/install a modified Core to complete this project's work.
10
- - Do not patch deployed Core or dependency artifacts in `node_modules`, ship hidden Core patches, replace Core prototypes/private registries, or mutate shared upstream model catalogs. Create only plugin-owned objects and reversible registrations through public APIs.
10
+ - Do not patch deployed Core or dependency artifacts in `node_modules`, ship hidden Core patches, replace Core prototypes/private registries, or mutate shared upstream model catalogs. Create plugin-owned objects and reversible registrations through public APIs; the sole Core-owned credential exception is the user-confirmed native Copilot account switch described below.
11
11
  - Do not make a Core patch, a new Core export, or an upstream Core PR being merged/released a prerequisite for delivering a plugin fix.
12
12
  - Read-only Core/API inspection and isolated compatibility tests against unchanged pinned artifacts are allowed. Test-only fixtures must not alter tracked Core implementation or a live deployment and must clean up only their own temporary files. Historical controlled baselines are regression evidence, not permission for new Core changes.
13
- - If the existing API cannot support the desired behavior, report the limit and choose a tested plugin-local alternative or defer that capability. Do not expand into Core work to preserve an earlier design claim. Reusing a published adapter class for an account-scoped, metadata-driven Copilot route is allowed; a second wire implementation, independently maintained static model catalog, copied credentials, or a fabricated single-route claim is not.
13
+ - If the existing API cannot support the desired behavior, report the limit and choose a tested plugin-local alternative or defer that capability. Do not expand into Core work to preserve an earlier design claim. Reusing a published adapter class for an account-scoped, metadata-driven Copilot route is allowed; a second wire implementation, independently maintained static model catalog, unapproved credential copies, or a fabricated single-route claim is not.
14
14
  - General model compatibility must be data-driven: new account models with supported endpoint/capability metadata must work without adding model IDs or name-prefix branches to code. Unknown or incomplete metadata must produce a diagnostic rather than guessed capabilities. Follow [the current acceptance checklist](./docs/model-compatibility-acceptance.md), including Thinking, pi version compatibility, PR/merge/release and the requested local upgrade.
15
15
  - Any future Core work requires a separate, explicit human request and separate task scope. Generic requests to fix compatibility, add models, optimize, or continue a goal do not grant that permission. Preserve abandoned Core work without resuming, publishing or deleting it automatically.
16
16
 
@@ -177,18 +177,43 @@ Safe background diagnostics use bounded Error cause chains and fixed allowlisted
177
177
  codes, never raw errors. Installation alone neither selects nor invokes recovery.
178
178
  See `src/compaction-replay.ts` and `docs/manual-compaction-recovery.md` (#349).
179
179
 
180
- ## Approved multi-account ownership extension (#297)
181
-
182
- The explicit #470 enhancement permits managed-account switching alongside
183
- independently configured native Copilot. Keep native UI and label the managed
184
- route `GitHub Copilot (multi-account)`; do not mirror grants, intercept native
185
- credentials, redirect native requests or change native selections. Missing
186
- managed registration and incomplete evidence remain blockers. Reuse native
187
- canonical quota/search isolation; do not revive retired Auto or routing UI.
188
- Disposal removes only plugin registrations. Plugin-model selections and explicit
189
- `web.searchProvider=github-copilot-hosted` need user-selected replacements before
190
- uninstall; missing configured Web backends return `WEB_PROVIDER_CONFIGURED_MISSING`,
191
- not automatic fallback. No automatic Settings/history migration or sign-out.
180
+ ## Approved multi-account ownership extension (#297, #474)
181
+
182
+ The user-approved #297 extension allows independently authorized
183
+ `github-copilot/account-<opaque-id>` records in DSH's credentials service.
184
+ The later explicit #474 direction supersedes the earlier prohibition on
185
+ canonical writes only for a user-confirmed global account switch: copy the
186
+ selected normalized OAuth grant into `llm-pi-ai/github-copilot` through the
187
+ public serialized credential API so DSH's existing native provider uses it.
188
+ Do not intercept native reads, patch Core, create a second provider as the
189
+ switching solution, or change model/history/provider settings. The selected
190
+ account applies profile-wide to future native requests; in-progress requests
191
+ retain their admitted credentials.
192
+
193
+ Before replacing a different configured canonical grant, preserve it in a new
194
+ plugin-owned account record unless the previous selected account already owns
195
+ that exact grant. Refuse when preservation would exceed the account bound. On
196
+ later switches, synchronize the previous active account's saved grant from
197
+ canonical before replacement. Use exact per-record serialization/readback and
198
+ path-level Settings CAS. A failed Settings commit may roll back only while the
199
+ canonical record still exactly matches the attempted write; otherwise retain
200
+ data and report uncertainty. Fence native Agent turns, OAuth and account
201
+ mutations. Direct provider calls outside observable Agent turn lifecycle remain
202
+ outside the plugin's turn fence.
203
+ Refresh remains owned by native pi-ai `Models.getAuth()` and DSH
204
+ `modifyRecord()`; the pinned Copilot refresh keeps the refresh token stable.
205
+ If selection and canonical credential diverge after an external native sign-in,
206
+ show an actionable mismatch and require explicit recovery; never auto-migrate.
207
+
208
+ Keep the native UI and its canonical quota/search attribution. Existing
209
+ `github-copilot-preview` behavior and Session account overrides remain
210
+ separately plugin-owned legacy behavior; they are not required for native
211
+ switching. Disposal removes only plugin registrations. Native model selections
212
+ and explicit `web.searchProvider=github-copilot-hosted` still need user-selected
213
+ replacements before uninstall; missing configured Web backends return
214
+ `WEB_PROVIDER_CONFIGURED_MISSING`, not automatic fallback. Uninstall leaves the
215
+ last selected grant in the native canonical record. No automatic
216
+ Settings/history migration or sign-out.
192
217
 
193
218
  Login environments (#424) use only pinned native pi-ai OAuth for GitHub.com and
194
219
  validated single-label `tenant.ghe.com` Enterprise Cloud hosts. Preserve host
@@ -206,9 +231,9 @@ metadata-only Retry; late results and disposal cannot publish stale state.
206
231
  Never apply this deadline to add/cancel/switch/reauthorize/remove mutations,
207
232
  release their fences, cancel Host work or introduce an automatic retry.
208
233
 
209
- Account display names survive freshness expiry in bounded Host memory, never credential invalidation or failed verification. Visible account lists may ensure missing configured names without activating accounts; no disk name cache, credential copying or identity-based authorization. Turn admission captures the first verified name for the frozen account. A missing name may be filled by one existing nonforcing account-bound lookup only during that exact active, uncancelled turn/signal; never after turn/end/disposal. Evidence still requires actual native delivery and never reconstructs completed history (#322).
234
+ Account display names survive freshness expiry in bounded Host memory, never credential invalidation or failed verification. Visible account lists may ensure missing configured names without activating accounts; no disk name cache, incidental credential copying or identity-based authorization. Only the explicit confirmed native-switch preservation/projection above may copy a normalized grant. Turn admission captures the first verified name for the frozen account. A missing name may be filled by one existing nonforcing account-bound lookup only during that exact active, uncancelled turn/signal; never after turn/end/disposal. Evidence still requires actual native delivery and never reconstructs completed history (#322).
210
235
 
211
- The user approved independently authorized account records in the existing DSH credentials service. The canonical `llm-pi-ai/github-copilot` record remains unchanged as the compatibility account. Additional plugin-owned `github-copilot/account-<opaque-id>` records must be written directly by official pi-ai OAuth through public account-bound stores; never copy/move grants, refill the canonical record, introduce a separate credential storage service, patch Core, or implement another wire/catalog. Native `Models.getAuth()` and DSH `modifyRecord()` remain the refresh and serialization owners.
236
+ Additional plugin-owned `github-copilot/account-<opaque-id>` records are written directly by official pi-ai OAuth through public account-bound stores. Only an explicit user-confirmed switch may project a selected normalized grant into the canonical record as specified above; preserve the former canonical grant before the first replacement. Never intercept Core credential reads, introduce a separate credential service, patch Core, or implement another wire/catalog. Native `Models.getAuth()` and DSH `modifyRecord()` remain the refresh and serialization owners.
212
237
 
213
238
  Settings store only the opaque global account selector and explicit `sessionAccounts` rows. Missing/invalid selectors or records fail explicitly, without another-account fallback. Models manages reauthorization/removal and the global default; Credits may select an already authorized account for this Session's subsequent turns, restore global inheritance or run add-only authorization without selecting it (#305/#318). An explicit choice equal to the default remains explicit. Freeze account ownership before Auto assessment and request admission, holding mutation fences until native `turn/end`/disposal; later Session/default changes never redirect running steps, retries or search. Account-local credentials, metadata, quota, proof cancellation and native adapter composition must remain isolated. Keep one public adapter/controller registration, with no second wire/catalog or Core changes. Reauthorization/removal of a pinned record stays blocked; global-default selection may continue independently.
214
239
 
@@ -305,7 +330,7 @@ evidence is content-free and ephemeral, never a new persistent population.
305
330
  See `docs/copilot-accounts.md` (#385).
306
331
  - Copilot OAuth grant writes must rebuild only pi-ai's documented provider fields as a fresh plain JSON object; unrelated extension values never reach DSH credential storage.
307
332
  - Settings changes are path-level. Never replace the whole `llm-pi-ai` section or unrelated provider profiles.
308
- - Sign-out deletes only the active Copilot credential record and keeps other records, the selector and route settings. A missing selected noncanonical slot fails explicitly; only an explicit eligible Add or Switch recovers it, never automatic canonical fallback.
333
+ - Native sign-out deletes only `llm-pi-ai/github-copilot` and keeps plugin account records, the selector and route settings. A selected plugin account remains saved and must be explicitly applied again after sign-out; a missing selected slot fails explicitly, never automatic canonical fallback.
309
334
  - Hosted search serves either an eligible initiating `github-copilot` / managed `github-copilot-preview` route, or provider-owned independent search selected by the web-search router. Independent search preserves a nonempty explicit `searchModel` override; otherwise the Host considers at most three eligible Responses models from current account route facts, in deterministic ID order, without a static model list. Metadata alone is not search proof, and the final user query is sent once after candidate proof, never replayed across models. Both paths require an account-available model and supported search protocol; custom inline transport remains legacy-canonical only. Never substitute the global chat default or another Session's identity. The default `probe: true` path requires successful capability proof; `probe: false` is an explicit trust override, not an implicit fallback. Any request containing a file block, including one nested in tool-result content, must bypass the custom wire through `next()` so Core retains file projection ownership.
310
335
  - Misconfiguration and API drift fail loudly with a named missing seam. Do not fall back to process-local secrets or implicit machine state.
311
336
  - Host, Client, and Remote package entries must stay independently buildable and exported.
@@ -319,7 +344,7 @@ evidence is content-free and ephemeral, never a new persistent population.
319
344
  - 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.
320
345
  - 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.
321
346
  - 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.
322
- - 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.
347
+ - Code does not automatically migrate settings, credentials or history; only a user-confirmed account switch updates the canonical credential as described above. 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 outside the explicit switch. Search allowlist updates to the managed ID require a separate reviewed Ops edit; never silently broaden old lists.
323
348
 
324
349
  ## Live migration readiness (alpha.9, #101)
325
350
 
@@ -353,7 +378,7 @@ The release admission, development dependency and CI targets are exact official
353
378
 
354
379
  These pins document compatibility evidence. They do not authorize creating another controlled Core patch or making one a prerequisite for new plugin fixes.
355
380
 
356
- - Models UI: `0.1.2-rc.1`, `0.1.3-alpha.1`, `0.1.5-alpha.1`, `0.1.5-alpha.2`, `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`, `0.1.6-alpha.2`, `0.2.0-rc.1` and `0.2.0-rc.2` expose `settings.models.provider-card`, keyed by settings namespace `llm-pi-ai`, to embed login/status/Refresh/Manage in a mounted configured canonical `github-copilot` row and suppress the separate footer controller. With no such row mounted, retain footer fallback; historical 0.1.1-rc.2 uses a dedicated `settings.section`. Preserve the shared account-state owner across transfer only while another eligible surface remains mounted. Unmounting the last surface or replacing declarations without overlapping mounts stops polling; a later controller reads status and separately non-forcing ensures missing/idle/stale/error/loading signed-in metadata, without replaying the old forced-login action. Manual Refresh models lives inside Manage; errors expose Retry. Opening Models is no longer guaranteed network-free, but status/details themselves remain pure. This additive slot cannot replace Core Edit/Delete: retain the native editor, while normal plugin discovery needs no manual model definitions. UI integration must not merge/remove actual canonical and `github-copilot-preview` routes or rewrite credentials, configuration, history or selection.
381
+ - Models UI: `0.1.2-rc.1`, `0.1.3-alpha.1`, `0.1.5-alpha.1`, `0.1.5-alpha.2`, `0.1.5-rc.1`, `0.1.5-rc.2`, `0.1.6-alpha.1`, `0.1.6-alpha.2`, `0.2.0-rc.1` and `0.2.0-rc.2` expose `settings.models.provider-card`, keyed by settings namespace `llm-pi-ai`, to embed login/status/Refresh/Manage in a mounted configured canonical `github-copilot` row and suppress the separate footer controller. With no such row mounted, retain footer fallback; historical 0.1.1-rc.2 uses a dedicated `settings.section`. Preserve the shared account-state owner across transfer only while another eligible surface remains mounted. Unmounting the last surface or replacing declarations without overlapping mounts stops polling; a later controller reads status and separately non-forcing ensures missing/idle/stale/error/loading signed-in metadata, without replaying the old forced-login action. Manual Refresh models lives inside Manage; errors expose Retry. Opening Models is no longer guaranteed network-free, but status/details themselves remain pure. This additive slot cannot replace Core Edit/Delete: retain the native editor, while normal plugin discovery needs no manual model definitions. Native account switching is the explicit, confirmed canonical credential exception above; other route, model, history and Settings ownership remains unchanged.
357
382
  - Canonical authorization flow key: `llm-pi-ai/github-copilot`; additional account flows bind directly to their own plugin-owned record under the approved #297 contract.
358
383
  - Authorization verification links recognize the public `window.dshDesktop.protocolVersion === 1` marker and use `_self` so Desktop's existing `will-navigate` handler opens the system browser without popup creation. Other hosts retain `_blank`; display a selectable manual URL in both cases. This does not confirm browser launch or OAuth success. Manage omits the compatibility disclosure but retains actionable legacy diagnostics and explicit repair; migration documentation and backend ownership are unchanged.
359
384
  - Authorization service: rc.1 Core provides it; the rc.2 web/headless profiles rely on this package's runtime dependency and conditional bootstrap.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0-alpha.8.dsh.0.2.2.rc.3 (prepared)
3
+ ## 0.1.0-alpha.9.dsh.0.2.2.rc.3 (prepared)
4
+
5
+ - Apply confirmed account switches to DSH's existing native `github-copilot` credential, preserving the replaced grant and protecting observable in-progress native Agent turns.
6
+ - Allow #466 native model sync for a saved-account selection only when its normalized grant matches the native canonical credential; mismatches and unavailable credentials remain blocked.
7
+ - Keep `github-copilot-preview` registered. This change does not complete #474's native-only route acceptance or retire the separate preview route.
8
+
9
+ ## 0.1.0-alpha.8.dsh.0.2.2.rc.3 (published)
4
10
 
5
11
  - Preview and explicitly confirm a one-time sync of enabled canonical-account models to an existing native Copilot provider (#466).
6
12
  - Preserve only models whose native protocol and account capability metadata can be safely represented; disclose skipped models, removals, updates, and per-request output defaults before replacing the native models setting.
package/README.md CHANGED
@@ -67,15 +67,15 @@ After the exact compatible release is available and verified, download its
67
67
  original asset and checksum in an empty directory:
68
68
 
69
69
  ```sh
70
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.8.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.8.dsh.0.2.2.rc.3.tgz
71
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.8.dsh.0.2.2.rc.3/SHA256SUMS
70
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.9.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.9.dsh.0.2.2.rc.3.tgz
71
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.9.dsh.0.2.2.rc.3/SHA256SUMS
72
72
  sha256sum --check SHA256SUMS
73
73
  ```
74
74
 
75
75
  For the `web` profile, install the same Release asset:
76
76
 
77
77
  ```sh
78
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.8.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.8.dsh.0.2.2.rc.3.tgz
78
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.9.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.9.dsh.0.2.2.rc.3.tgz
79
79
  ```
80
80
 
81
81
  Choose the intended profile explicitly. Then:
@@ -116,15 +116,16 @@ configured `maxTokens` as that model's per-request output default. The sync does
116
116
  not change credentials, select a model, alter history, or automatically follow
117
117
  later account changes.
118
118
 
119
- When adding DSH's native GitHub Copilot provider, use the separate plugin account
120
- panel to sign in. With no named key, the native route uses a stored canonical
121
- OAuth grant, not an independently selected additional account. Native and
122
- managed routes can coexist: use **Manage → Account management → Switch**, then
123
- choose a model under **GitHub Copilot (multi-account)** in the native picker.
124
- Switching changes only the managed default; managed **Credits** can select an
125
- account for that Session's subsequent turns. Native login, selected models and
126
- running turns are not redirected. The native picker is not guaranteed
127
- to filter its bundled catalog by account entitlement.
119
+ Use **Manage → Account management → Switch** in the native GitHub Copilot
120
+ account panel to apply a saved account to DSH's canonical
121
+ `llm-pi-ai/github-copilot` credential slot. This is profile-wide: subsequent
122
+ native requests use that account. The first switch preserves the prior native
123
+ OAuth grant as a saved account. In-progress requests are not redirected, and
124
+ the operation does not change model selections, provider settings or history.
125
+ Account switching does not change the native provider's bundled/configured
126
+ model catalog, which is not guaranteed to filter models by account entitlement.
127
+ The existing `github-copilot-preview` route remains a separate plugin-owned
128
+ model route; it is not required for native account switching.
128
129
  Starting the plugin or completing sign-in does not automatically repair the
129
130
  native provider's settings.
130
131
  The plugin registers optional `github-copilot-hosted` search in DSH's existing
@@ -150,18 +151,20 @@ managed continuation service; they do not replace DSH's context meter.
150
151
  ### Removing the enhancement
151
152
 
152
153
  Unloading the plugin removes its own routes, UI and listeners, not native
153
- Copilot credentials, configuration, model selections or history. Independently
154
- configured native **GitHub Copilot** remains usable with its original account.
155
- Removing the plugin is not signing out; explicit sign-out or removal of the
156
- original authorization is a different action and can affect native login.
154
+ Copilot credentials, configuration, model selections or history. Native
155
+ **GitHub Copilot** remains usable with whichever account was last explicitly
156
+ applied to the canonical credential slot. Removing the plugin is not signing
157
+ out; explicit sign-out or removal of that authorization is a different action
158
+ and can affect native login.
157
159
 
158
- Plugin-dependent selections do not become native automatically. Before removal,
160
+ Plugin-only model selections do not become native automatically. Before removal,
159
161
  explicitly select native models for Sessions/defaults using
160
162
  `github-copilot-preview`. If Web is set to `github-copilot-hosted`, select another
161
163
  available backend in native Web settings first. Removing the plugin does not
162
164
  rewrite Web settings: a retained missing backend produces
163
165
  `WEB_PROVIDER_CONFIGURED_MISSING`, not an automatic fallback. Additional-account
164
- switching and plugin-specific search require the plugin.
166
+ management and plugin-specific search require the plugin; the last selected
167
+ native OAuth grant remains in DSH's canonical credential record.
165
168
 
166
169
  Desktop's native package manager and its bundled CLI have different contracts
167
170
  from a standalone profile. Review the [Desktop CLI evidence](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)
package/README.zh.md CHANGED
@@ -55,15 +55,15 @@ node scripts/select-core-release.mjs 0.2.2-rc.3
55
55
  精确兼容版本发布且通过验证后,在空目录下载原始制品并校验:
56
56
 
57
57
  ```sh
58
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.8.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.8.dsh.0.2.2.rc.3.tgz
59
- curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.8.dsh.0.2.2.rc.3/SHA256SUMS
58
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.9.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.9.dsh.0.2.2.rc.3.tgz
59
+ curl -fLO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.9.dsh.0.2.2.rc.3/SHA256SUMS
60
60
  sha256sum --check SHA256SUMS
61
61
  ```
62
62
 
63
63
  例如安装到 `web` profile:
64
64
 
65
65
  ```sh
66
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.8.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.8.dsh.0.2.2.rc.3.tgz
66
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.9.dsh.0.2.2.rc.3/dsh-github-copilot-0.1.0-alpha.9.dsh.0.2.2.rc.3.tgz
67
67
  ```
68
68
 
69
69
  请明确选择目标 profile,然后:
@@ -91,12 +91,12 @@ Anthropic 模型也会被跳过;已有目录模型保留原生兼容性。只
91
91
  `maxTokens` 同时作为模型的单次请求输出默认值。同步不修改凭据、选择或历史,也不会自动
92
92
  跟随后续账号变化。
93
93
 
94
- 添加 DSH 原生 GitHub Copilot provider 时,可使用独立的插件账号面板登录。
95
- 没有指定密钥时,原生路线使用已保存的 canonical OAuth 凭据,而不是另行选择的
96
- 附加账号。原生与托管路线可以共存:在 **Manage → 账号管理 → 切换** 中选择账号,
97
- 再在原生模型选择器中选择 **GitHub Copilot (multi-account)** 下的模型。
98
- 切换仅改变托管路线的默认账号;托管 Session 的 **Credits** 可指定后续 turn 的账号。
99
- 不会重定向原生登录、已选模型或正在运行的 turn。原生选择器不保证按账号权限过滤内置模型目录。
94
+ 在原生 GitHub Copilot 账号面板的 **Manage → 账号管理 → 切换** 中选择账号,
95
+ 会将该账号应用到 DSH canonical 凭据槽 `llm-pi-ai/github-copilot`,供此 profile
96
+ 后续的原生请求使用。首次切换会将原有原生 OAuth 授权保留为已保存账号。
97
+ 切换不会重定向正在进行的请求,也不会更改模型选择、provider 设置或历史。
98
+ 原生 provider 的内置/配置模型目录不会因此按账号权限过滤。现有
99
+ `github-copilot-preview` 仍是独立的插件模型路线,但原生账号切换不依赖它。
100
100
  启动插件或完成登录时,不会自动修复原生 provider 设置。
101
101
  插件在 DSH 现有 Web 服务中注册可选的 `github-copilot-hosted` 搜索后端。
102
102
  请在原生 Web 设置中明确选择,并按需启用原生搜索工具;安装不会改变默认后端。
@@ -116,14 +116,14 @@ Web 服务替换或旧插件路由 UI。
116
116
  ### 移除增强
117
117
 
118
118
  卸载插件只撤销插件自己的路线、界面和监听,不删除原生 Copilot 凭据、配置、模型选择或历史。
119
- 已独立配置的原生 **GitHub Copilot** 仍使用原来的账号。卸载不是退出登录;
119
+ 原生 **GitHub Copilot** 继续使用最近一次明确应用到 canonical 凭据槽的账号。卸载不是退出登录;
120
120
  显式退出或移除原始授权是另一项操作,会影响原生登录。
121
121
 
122
122
  依赖插件的选择不会自动变成原生选择。卸载前,请明确将使用 `github-copilot-preview`
123
123
  的 Session/默认模型切回原生模型。如果 Web 选中了 `github-copilot-hosted`,
124
124
  请先在原生 Web 设置中选择其他可用后端。卸载不会改写 Web 设置;
125
125
  保留已缺失的后端会返回 `WEB_PROVIDER_CONFIGURED_MISSING`,不会自动回退。
126
- 附加账号切换和插件搜索仍然依赖插件。
126
+ 附加账号管理和插件专属搜索仍然依赖插件;最近选中的原生 OAuth 授权会保留在 DSH canonical 凭据记录中。
127
127
 
128
128
  Desktop 原生包管理器及其内置 CLI 与独立 profile 的操作约束不同。安装前请阅读
129
129
  [Desktop CLI 证据](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及
@@ -8,14 +8,14 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.1.0-alpha.8.dsh.0.2.2.rc.3"
11
+ "version": "0.1.0-alpha.9.dsh.0.2.2.rc.3"
12
12
  },
13
13
  "releaseLines": [
14
14
  { "core": "0.2.0-rc.2", "version": "0.4.2-alpha.15", "status": "published" },
15
15
  { "core": "0.2.1-alpha.4", "version": "0.4.2-alpha.16", "status": "published" },
16
16
  { "core": "0.2.1-alpha.5", "version": "0.1.0-alpha.2.dsh.0.2.1.alpha.5", "status": "published" },
17
17
  { "core": "0.2.1-rc.3", "version": "0.1.0-alpha.5.dsh.0.2.1.rc.3", "status": "published" },
18
- { "core": "0.2.2-rc.3", "version": "0.1.0-alpha.8.dsh.0.2.2.rc.3", "status": "pending" }
18
+ { "core": "0.2.2-rc.3", "version": "0.1.0-alpha.9.dsh.0.2.2.rc.3", "status": "pending" }
19
19
  ],
20
20
  "evidence": {
21
21
  "kind": "source-and-synthetic-test-inventory",
@@ -461,40 +461,45 @@
461
461
  {"file": "tests/session-accounts-host.spec.ts", "name": "ignores identity completion after the turn ends"},
462
462
  {"file": "tests/copilot-usage-card.spec.ts", "name": "switches only subsequent Session turns inside Credits and can restore inheritance"},
463
463
  {"file": "tests/fixtures/remote-core.fixture.ts", "name": "binds Session account choices and historical reads through native Client and %s Host gateways"},
464
- {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent native credentials and SettingsForms CAS across profile restart without cross-account OAuth writes"}
464
+ {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent accounts and SettingsForms CAS across restart with native sign-out recovery"}
465
465
  ]
466
466
  },
467
467
  {
468
468
  "id": "independent-copilot-accounts",
469
469
  "required": true,
470
470
  "evidenceScope": "synthetic-public-services-native-adapter-and-ui-not-live-oauth-or-provider-access",
471
- "activation": "managed-route-explicit-account-selector-with-independent-native-coexistence",
471
+ "activation": "confirmed-profile-wide-native-canonical-switch-with-independent-native-route",
472
472
  "sourceMarkers": [
473
473
  {"file": "src/copilot-accounts-host.ts", "marker": "async ensureIdentityFor(accountId: string)"},
474
474
  {"file": "src/copilot-login-environment.ts", "marker": "COPILOT_LOGIN_HOST_PATTERN"},
475
475
  {"file": "src/copilot-accounts-host.ts", "marker": "event.verificationUri !== copilotVerificationUri(host)"},
476
476
  {"file": "docs/copilot-accounts.md", "marker": "Native OAuth redirect control is unavailable"},
477
- {"file": "AGENTS.md", "marker": "Approved multi-account ownership extension (#297)"},
477
+ {"file": "AGENTS.md", "marker": "Approved multi-account ownership extension (#297, #474)"},
478
+ {"file": "src/copilot-accounts-host.ts", "marker": "await this.writeGrant('canonical', previousCanonical, selectedGrant)"},
479
+ {"file": "docs/copilot-accounts.md", "marker": "The user-approved native switch (#474) applies the selected saved grant"},
478
480
  {"file": "src/remote.ts", "marker": "...copilotAccountsRemote.descriptors"},
479
481
  {"file": "src/copilot-accounts-card.ts", "marker": "removeAccount(accountId: string, expectedRevision: number)"},
480
482
  {"file": "src/copilot-account-presentation.ts", "marker": "account data and credentials never travel between surfaces"},
481
483
  {"file": "docs/copilot-accounts.md", "marker": "A mutable active-account lookup inside each store method is forbidden"}
482
484
  ],
483
485
  "tests": [
484
- {"file": "tests/native-account-coexistence.spec.ts", "name": "keeps native requests, credentials and selection independent before, during and after multi-account enhancement"},
486
+ {"file": "tests/native-account-coexistence.spec.ts", "name": "applies confirmed account switches to native credentials and retains the native route after disposal"},
485
487
  {"file": "tests/scripts/copilot-login-environment.test.mjs", "name": "compares numeric identities within their host without relabeling legacy GitHub.com evidence"},
486
488
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "authorizes native GHE environments with host-scoped duplicates and immutable reauthorization hosts"},
487
489
  {"file": "tests/copilot-accounts-card.spec.ts", "name": "chooses a validated GHE environment without selecting an account or changing GitHub.com login"},
488
490
  {"file": "tests/copilot-identity-refresh.spec.ts", "name": "renews expired identity once for account %s without changing metadata-only reads"},
489
491
  {"file": "tests/copilot-account-identity-cache.spec.ts", "name": "hydrates saved inactive names without activating them, then reuses them"},
490
492
  {"file": "tests/account-dropdown.spec.ts", "name": "backs translucent native menu tokens with opaque Canvas and uses a dark elevation shadow"},
491
- {"file": "tests/copilot-account-identity-cache.spec.ts", "name": "retains inactive verified names after freshness expiry without reads or network in status"},
493
+ {"file": "tests/copilot-account-identity-cache.spec.ts", "name": "retains inactive verified names after freshness expiry without identity discovery in status"},
492
494
  {"file": "tests/copilot-usage-card.spec.ts", "name": "settles quota before a slow identity renewal and uses nonforcing ensure on visible refresh cadence"},
493
495
  {"file": "tests/copilot-usage-card.spec.ts", "name": "freezes the effective account when following is unchecked and restores following through the same CAS"},
494
496
  {"file": "tests/copilot-usage-card.spec.ts", "name": "retains confirmed following when consent is cancelled and disables it during confirmation"},
495
497
  {"file": "tests/copilot-usage-card.spec.ts", "name": "disables following when the Session selection cannot be read instead of treating it as a fixed account"},
496
498
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "never writes a captured A refresh into B after an external selection change"},
497
499
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "runs fresh switch identity and model preflight concurrently but commits only after both settle"},
500
+ {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "switches the native credential slot and preserves both accounts for later switches"},
501
+ {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "lets the user explicitly reconcile a selected account with externally changed native credentials"},
502
+ {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "rolls back the canonical grant and its temporary backup when selector CAS fails unchanged"},
498
503
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "permits record-bound requests during selector switching without admitting global requests or credential mutations"},
499
504
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "cancels and drains sibling switch preflight before releasing its mutation fence"},
500
505
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "rejects a changed credential identity during overlapping switch checks without saving"},
@@ -503,8 +508,9 @@
503
508
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "preserves uncertain commit ahead of missing-slot recovery"},
504
509
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "rechecks externally started canonical authorization before selector CAS"},
505
510
  {"file": "tests/fixtures/copilot-accounts-host-core.fixture.ts", "name": "retains canonical admission through polling and cancellation settlement"},
506
- {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent native credentials and SettingsForms CAS across profile restart without cross-account OAuth writes"},
511
+ {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent accounts and SettingsForms CAS across restart with native sign-out recovery"},
507
512
  {"file": "tests/copilot-accounts-card.spec.ts", "name": "requires a separate confirmation and uses the captured selector revision"},
513
+ {"file": "tests/copilot-accounts-card.spec.ts", "name": "requires confirmation before applying the selected account to mismatched native credentials"},
508
514
  {"file": "tests/copilot-accounts-card.spec.ts", "name": "reauthorizes the existing slot without requesting a new account or switching"},
509
515
  {"file": "tests/copilot-usage-card.spec.ts", "name": "shows current identity only in details without a Chat switching control"},
510
516
  {"file": "tests/copilot-usage-card.spec.ts", "name": "refuses to combine account B identity with account A quota"},
@@ -1405,7 +1411,7 @@
1405
1411
  {"file": "tests/auto-allocation-evidence.spec.ts", "name": "keeps legacy-only summaries v1 and separates mixed-policy decisions explicitly"},
1406
1412
  {"file": "tests/auto-allocation-evidence.spec.ts", "name": "counts each turn once, bounds retention and never recovers missing evidence after removal"},
1407
1413
  {"file": "tests/client.spec.ts", "name": "does not expose retired Auto cost controls or treat saved cost marks as model availability"},
1408
- {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent native credentials and SettingsForms CAS across profile restart without cross-account OAuth writes"}
1414
+ {"file": "tests/fixtures/copilot-accounts-persistence-core.fixture.ts", "name": "persists independent accounts and SettingsForms CAS across restart with native sign-out recovery"}
1409
1415
  ]
1410
1416
  },
1411
1417
  {
@@ -61,7 +61,7 @@ The provider integration introduced in `0.4.0-alpha.5` replaces the older indepe
61
61
  - **Discovery triggers (#95):** successful explicit UI **Start sign-in**/account switch forces one bounded discovery after immediate or polled completion. Opening Models separately calls non-forcing `ensureModels()` once for missing/idle/stale/error/loading signed-in metadata; error re-entry retries only after shared cooldown with no same-mount loop; loading joins the existing Host flight to observe completion without extra network. Fresh ready cache needs no request, and true unavailable/empty models do not auto-retry. Status/details remain network-free, not the entire opening flow. Background credential/reset events clear Client state and read status, not force discovery on every token event; next open/use ensures metadata.
62
62
  - **Freshness and authority (#95):** `github-copilot` settings default to `accountModelTtlMs: 86400000` (24h maximum reuse) and `accountModelFailureCooldownMs: 300000` (5min failure cooldown). One shared Host flight serves callers; no periodic metadata polling timer (the timestamp's display-only timer is separate). Last same-account metadata may display during TTL refresh/loading/error but never authorize requests. Credential/account/permission invalidation or proof expiry revokes request evidence immediately; the TTL does not extend tokens. Definitive `UNKNOWN_MODEL` triggers one bounded metadata refresh without message replay/model switching; generic HTTP/network errors are not guessed into that category.
63
63
  - **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.
64
- - **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).
64
+ - **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`, or automatically copy credentials, rewrite configuration/history or migrate selection. The later explicit native account switch is the only credential-projection exception; see [account ownership](./copilot-accounts.md). Any optional real route removal still requires the [separate reviewed migration](./single-route-migration.md).
65
65
  - **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.
66
66
  - **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.
67
67
 
@@ -106,17 +106,19 @@ continue to invalidate on every notification, not reuse old credentials.
106
106
 
107
107
  ### Selector switching and account-bound turns (#344)
108
108
 
109
- A global switch changes only the selector. Explicit record-bound request leases
110
- may be acquired during its preflight and CAS so already admitted turns can
111
- prepare and dispatch their next native step with their frozen account. A new
112
- turn still captures its account once at admission; it does not adopt a later
113
- selector. Unbound/global leases remain blocked during switching, and all
114
- requests remain blocked during credential authorization/removal/sign-out.
115
- Pinned records cannot be reauthorized or removed until their leases end.
116
- Cancellation, route eligibility, credential validity and account-model checks
117
- remain independent. This is not automatic retry or permission to redirect an
118
- existing turn. Deferred native fixtures exercise all three supported protocols
119
- while the selector operation is still pending, not just after it settles.
109
+ A confirmed profile-global switch updates the selector and applies its grant
110
+ to the native canonical credential slot. Native Agent-turn leases block the
111
+ switch until those turns settle; direct provider calls outside observable Agent
112
+ turn lifecycle cannot be fenced by the plugin. Explicit account-bound managed
113
+ turn leases may continue during switch preflight and CAS with their frozen
114
+ account. A new turn still captures its account once at admission and does not
115
+ adopt a later selector. All requests remain blocked during credential
116
+ authorization/removal/sign-out. Pinned records cannot be reauthorized or
117
+ removed until their leases end. Cancellation, route eligibility, credential
118
+ validity and account-model checks remain independent. This is not an automatic
119
+ retry or permission to redirect an existing turn. Deferred native fixtures
120
+ exercise supported protocols while the selector operation is pending, not
121
+ just after it settles.
120
122
 
121
123
  ### Global switch responsiveness (#342)
122
124
 
@@ -199,15 +201,18 @@ This feature does not introduce another CLI runtime to obtain quota.
199
201
  The user explicitly approved this limited extension of the previous
200
202
  single-record policy:
201
203
 
202
- - Official canonical credentials remain under their existing owner.
204
+ - The native provider retains OAuth refresh and request ownership. Only a
205
+ user-confirmed profile-global switch may apply the selected normalized grant
206
+ to the canonical record through DSH's public serialized credential API.
203
207
  - The plugin may own additional `github-copilot/account-<opaque-id>` records,
204
208
  obtained by official OAuth writing directly into the target record.
205
209
  - All records use the existing DSH credentials service and documented grant
206
210
  normalization. No credentials enter Settings, Client, Remotes, logs or docs.
207
211
  - Official pi-ai remains the OAuth and refresh implementation owner. The plugin
208
212
  owns only account addressing, selection, lifecycle and safe presentation.
209
- - This does not authorize Core changes, credential cloning, ambient credential
210
- discovery, copied upstream catalogs or a second general transport adapter.
213
+ - Apart from that explicit switch, this does not authorize credential copying,
214
+ Core changes, ambient credential discovery, copied upstream catalogs or a
215
+ second general transport adapter.
211
216
 
212
217
  ## Account binding and persistence
213
218
 
@@ -273,15 +278,15 @@ available for retained compatibility fixtures. Account persistence acceptance
273
278
  uses real SettingsForms and the production route diagnostic, without an
274
279
  eligibility override.
275
280
 
276
- 1. Capture the selector revision and verify managed-route availability and complete route/activity evidence.
281
+ 1. Capture the selector revision and verify the configured native route and complete route/activity evidence.
277
282
  2. Validate target identity, refresh authorization as needed and check account
278
283
  model metadata without publishing it as the active account.
279
- 3. Hold an admission fence during commit. Existing account-pinned managed
280
- turns may continue; unbound legacy preparation remains conservatively fenced.
281
- 4. CAS the selector, read back committed settings and confirm target evidence.
282
- 5. Update the default directory and UI without revoking another account's
283
- running turn/proofs or writing model/history/default selection. Credential
284
- replacement revokes only the matching account runtime and search/quota proof.
284
+ 3. Hold an admission fence against native Agent turns, authorization and other
285
+ account mutations. Existing account-pinned managed turns may continue.
286
+ 4. Preserve a different canonical grant before replacing it, then write the
287
+ target grant through DSH's serialized credential API and CAS the selector.
288
+ 5. Read back both canonical credentials and Settings; report uncertainty if
289
+ either commit cannot be proven. Model/history/default selection is unchanged.
285
290
 
286
291
  `COPILOT_ACCOUNTS_BUSY` is transient: each account status read reevaluates
287
292
  current managed Agent activity, operation leases and authorization. A rejected
@@ -308,42 +313,59 @@ A guessed idle timeout must not permit reauthorization/removal of its account.
308
313
 
309
314
  ## Route compatibility
310
315
 
311
- Core's canonical route still reads its canonical record. Do not intercept
312
- Core's store, mutate its prototypes or mirror selected grants into its record.
313
- The reversible enhancement (#470) permits native and managed routes together.
314
- The native **GitHub Copilot** route remains bound to its canonical credential;
315
- **GitHub Copilot (multi-account)** (`github-copilot-preview`) uses the plugin
316
- selector or an explicit managed Session account. Native configuration,
317
- selection and activity no longer block a managed-account switch. Missing
318
- managed registration or incomplete route/activity evidence still blocks it
319
- with a named diagnostic. Account leases, authorization fences and CAS remain.
320
-
321
- Use the native Models/Chat interface to select the managed model for multi-account
322
- work. No store interception or canonical credential substitution is performed.
323
- Native quota and optional native hosted search retain their separately qualified
324
- canonical account; managed default or Session changes never supply their identity.
325
- No account identity is inferred for a native credential/endpoint override.
316
+ The user-approved native switch (#474) applies the selected saved grant to
317
+ DSH's existing canonical `llm-pi-ai/github-copilot` record through the public
318
+ credentials service. The native provider continues to own OAuth refresh and
319
+ request transport; the plugin does not intercept its store, patch Core or
320
+ register another provider for switching. Switching is profile-wide and affects
321
+ future native requests. Observable native Agent turns keep their admitted
322
+ credentials and block a switch until they settle; direct provider calls outside
323
+ that lifecycle cannot be fenced by the plugin. Before replacing a different
324
+ canonical grant, preserve it as a plugin-owned saved account unless the
325
+ previously selected account already owns that exact grant. If the bounded
326
+ account limit prevents preservation, refuse the switch. Later switches refresh
327
+ the previously active saved record from canonical before replacing the
328
+ canonical grant.
329
+
330
+ The switch is fenced against native Chat turns, authorization, other account
331
+ mutations, and Settings revision changes. Credential writes use the DSH
332
+ serialized `modifyRecord` path with exact grant readback. A failed Settings
333
+ commit rolls back only if the canonical record still equals the grant written
334
+ by that attempt; otherwise retain the recoverable records and report an
335
+ uncertain commit. A selector/canonical mismatch after upgrade or an external
336
+ native sign-in is shown explicitly and requires a user-selected recovery; no
337
+ automatic credential or Settings migration occurs.
338
+
339
+ The existing `github-copilot-preview` route and Session account overrides are
340
+ separate plugin-owned behavior; they are not the mechanism for native account
341
+ switching. Native quota and optional native hosted search continue to use only
342
+ the canonical credential, which after a confirmed switch contains the selected
343
+ account's grant. No account identity is inferred for a native
344
+ credential/endpoint override.
326
345
 
327
346
  Any migration uses the existing separately approved, explicit configuration
328
347
  workflow. Enabling accounts does not remove native profiles, rewrite stored
329
348
  Sessions or silently migrate their route IDs.
330
349
 
331
- Sign-out deletes only the selected record. Inactive records remain intact.
332
- For a noncanonical selection, the selector remains unchanged after sign-out:
333
- the missing selected slot fails explicitly, never falls back to canonical.
334
- With a managed route, complete route/Session evidence and no conflicting admitted
335
- activity, Models still permits an explicit CAS switch to a stored valid account
336
- or Add into a new inactive slot. The missing-slot view remains an error even
337
- when `switchable` is true for that recovery. Existing Sign in never recreates
338
- the missing slot with an unverified replacement identity; use Add then Switch.
350
+ Native sign-out deletes only the canonical credential record; it does not
351
+ delete the selected plugin-owned account slot or change the selector. If the
352
+ selector is noncanonical, the view reports a canonical/selector mismatch and
353
+ requires explicit reapplication before native requests use that saved account.
354
+ With a configured native route and no conflicting admitted activity, Models
355
+ permits an explicit switch to a stored valid account or Add into an inactive
356
+ slot. A missing selected slot remains an error even when `switchable` is true
357
+ for recovery. Existing Sign in never recreates a missing plugin slot with an
358
+ unverified replacement identity; use Add then Switch.
339
359
 
340
360
  ### Uninstall boundary
341
361
 
342
- Disposal removes only plugin-owned registrations. Native credentials, provider
343
- configuration, native model selection and history remain unchanged. The synthetic
344
- published-adapter regression exercises native calls before mounting, during A/B
345
- switching and after disposal with the same original credential. It is not live
346
- Desktop or supplier acceptance.
362
+ Disposal removes only plugin-owned registrations. The last explicitly applied
363
+ grant remains in the native canonical credential record, so bare native Copilot
364
+ continues using that account after uninstall. Provider configuration, native
365
+ model selection and history remain unchanged. The synthetic published-adapter
366
+ regression exercises native calls before mounting, across a confirmed A/B
367
+ credential switch and after disposal. It is not live Desktop or supplier
368
+ acceptance.
347
369
 
348
370
  Removing the plugin does not convert plugin-only model selections. Explicitly
349
371
  select a native model for affected Sessions/defaults before uninstalling.