dsh-github-copilot 0.1.0-alpha.2.dsh.0.2.1.rc.3 → 0.1.0-alpha.20.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.
Files changed (100) hide show
  1. package/AGENTS.md +427 -60
  2. package/CHANGELOG.md +149 -0
  3. package/CONTRIBUTING.md +35 -5
  4. package/README.md +237 -358
  5. package/README.zh.md +169 -321
  6. package/cordis.patch.yml +0 -13
  7. package/deployment-baseline.json +212 -312
  8. package/docs/account-management-experience.md +10 -5
  9. package/docs/agent-autonomy-evaluation.md +78 -0
  10. package/docs/agent-readiness.md +50 -7
  11. package/docs/auto-high-cost.md +10 -20
  12. package/docs/auto-review-sampling.md +56 -4
  13. package/docs/auto-task-routing.md +6 -2
  14. package/docs/automatic-model-routing.md +8 -4
  15. package/docs/copilot-accounts.md +141 -83
  16. package/docs/copilot-compaction.md +1 -1
  17. package/docs/copilot-usage.md +20 -4
  18. package/docs/dual-model.md +13 -8
  19. package/docs/image-input-compatibility.md +28 -62
  20. package/docs/manual-compaction-recovery.md +12 -11
  21. package/docs/model-compatibility-acceptance.md +111 -190
  22. package/docs/npm-distribution.md +21 -2
  23. package/docs/official-first-016-alpha2.md +3 -2
  24. package/docs/official-first-020-rc1.md +3 -2
  25. package/docs/official-first-020-rc2.md +4 -0
  26. package/docs/official-first-021-alpha4.md +3 -0
  27. package/docs/official-first-021-alpha5.md +5 -0
  28. package/docs/official-first-021-rc3.md +3 -0
  29. package/docs/plugin-diagnostics.md +12 -602
  30. package/docs/session-continuation.md +13 -9
  31. package/docs/session-search-routing.md +10 -3
  32. package/docs/single-route-migration.md +102 -125
  33. package/docs/web-lifecycle-rc2.md +19 -10
  34. package/lib/client.js +3333 -2735
  35. package/lib/client.js.map +1 -1
  36. package/lib/copilot-identity-BpfZQOip.js +21 -0
  37. package/lib/index.js +6469 -10095
  38. package/lib/manual-compaction-recovery.js +3 -17
  39. package/lib/remote.js +131 -433
  40. package/lib/routed-web.js +9 -4
  41. package/lib/traditional-search-6Gf2GmQW.js +114 -0
  42. package/lib/types/account-model-catalog.d.ts +2 -0
  43. package/lib/types/authorization-controller.d.ts +36 -0
  44. package/lib/types/auto-model-presentation.d.ts +4 -0
  45. package/lib/types/client.d.ts +1 -8
  46. package/lib/types/compatibility.d.ts +5 -5
  47. package/lib/types/config.d.ts +10 -5
  48. package/lib/types/context-evidence.d.ts +8 -8
  49. package/lib/types/copilot-accounts-host.d.ts +9 -1
  50. package/lib/types/copilot-accounts-remote.d.ts +2 -0
  51. package/lib/types/copilot-accounts-types.d.ts +1 -1
  52. package/lib/types/copilot-auth.d.ts +1 -1
  53. package/lib/types/copilot-identity.d.ts +2 -0
  54. package/lib/types/copilot-system-trust.d.ts +3 -0
  55. package/lib/types/copilot-usage-card.d.ts +14 -0
  56. package/lib/types/copilot-usage-host.d.ts +9 -0
  57. package/lib/types/copilot-usage-remote.d.ts +11 -1
  58. package/lib/types/copilot-usage-types.d.ts +3 -1
  59. package/lib/types/index.d.ts +2 -15
  60. package/lib/types/model-preferences-card.d.ts +1 -1
  61. package/lib/types/native-copilot-access.d.ts +28 -0
  62. package/lib/types/native-copilot-search-remote.d.ts +18 -0
  63. package/lib/types/native-copilot-search.d.ts +21 -0
  64. package/lib/types/native-model-sync.d.ts +38 -0
  65. package/lib/types/native-search-model-card.d.ts +10 -0
  66. package/lib/types/preview-provider.d.ts +0 -6
  67. package/lib/types/preview-route.d.ts +12 -1
  68. package/lib/types/remote.d.ts +90 -3
  69. package/lib/types/responses-replay-compat.d.ts +21 -1
  70. package/lib/types/session-accounts-host.d.ts +12 -1
  71. package/lib/types/session-accounts-remote.d.ts +2 -0
  72. package/lib/types/session-accounts.d.ts +2 -1
  73. package/lib/types/session-continuation-ui.d.ts +1 -0
  74. package/lib/types/tool-schema-compat.d.ts +4 -14
  75. package/lib/types/traditional-search.d.ts +3 -1
  76. package/lib/types/turn-selection-card.d.ts +2 -1
  77. package/package.json +75 -74
  78. package/scripts/autonomy-evaluation.mjs +313 -0
  79. package/scripts/check-search-composition.mjs +14 -38
  80. package/scripts/release-policy.mjs +2 -1
  81. package/tests/fixtures/autonomy-evaluation.json +71 -0
  82. package/lib/copilot-identity-DRZY_d2X.js +0 -15
  83. package/lib/diagnostics-analysis-io.js +0 -78
  84. package/lib/diagnostics-analysis.js +0 -427
  85. package/lib/diagnostics-types-CF-qg8Do.js +0 -708
  86. package/lib/search-routing-CV2hs8as.js +0 -792
  87. package/lib/types/auto-allocation-diagnostics.d.ts +0 -126
  88. package/lib/types/diagnostics-analysis-io.d.ts +0 -23
  89. package/lib/types/diagnostics-analysis.d.ts +0 -298
  90. package/lib/types/diagnostics-card.d.ts +0 -12
  91. package/lib/types/diagnostics-client.d.ts +0 -13
  92. package/lib/types/diagnostics-collector.d.ts +0 -50
  93. package/lib/types/diagnostics-host.d.ts +0 -183
  94. package/lib/types/diagnostics-remote.d.ts +0 -113
  95. package/lib/types/diagnostics-types.d.ts +0 -893
  96. package/lib/types/image-input-admission.d.ts +0 -5
  97. package/lib/types/parent-model-follow-card.d.ts +0 -32
  98. package/lib/types/request-diagnostics.d.ts +0 -278
  99. package/output/auto-model-mockup/index.html +0 -207
  100. package/scripts/analyze-diagnostics.mjs +0 -91
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
 
@@ -22,21 +22,194 @@ This repository follows a **plugin-only** policy: implement fixes in `dsh-github
22
22
  2. Read this file, then `node scripts/agent.mjs describe --json`. `agent-contract.json` maps each task to its owning files, focused tests, risks and approval boundaries; package scripts and release URLs are derived from current metadata.
23
23
  3. Run `node scripts/agent.mjs doctor --json` before install. It is a dependency-free, read-only repository preflight: exit 0 means preflight passed, 1 means prerequisites missing, 2 means invalid arguments/metadata. Build presence is not build freshness, and no live DSH or credential readiness is claimed.
24
24
  4. Choose a task with `node scripts/agent.mjs plan models --json` (or authorization/search/client/compatibility/tooling/release). Output is an unexecuted argv plan, never implicit permission to run destructive operations.
25
- 5. Use Node 24 LTS for development and the exact pnpm version in `package.json`; the runtime dependency floor is Node 22.19.0. Run frozen install in this checkout. Dependencies/build output are not carried into worktrees.
25
+ 5. Use Node 24 LTS for development and the exact pnpm version in `package.json`; the runtime dependency floor is Node 22.19.0. Select the execution environment and task explicitly with `node scripts/agent.mjs guard`. Local auxiliary checks are limited to the guarded dependency-free script tests; dependency installation and full verification belong to GitHub Actions. Do not retry local dependency restoration, change registries, or treat local reports/idle sessions as CI evidence. The guard applies only to operations routed through it; it cannot prevent direct shell bypass.
26
26
  6. Create/reuse a tracking issue and feature branch, implement a regression first, run the full gate, inspect the diff, and open a PR. For requested delivery, merge after required review/CI and branch protection without a separate approval prompt, unless the user limits scope. Important updates continue through the release-delivery rule below. Live-profile install and worktree checkout still require explicit user approval.
27
27
 
28
28
  Use native DSH tools for goals, background jobs and scoped subagents. Use local Git and the GitHub REST API for delivery; no external orchestration daemon, roster or `vcs_*` tool is required. Do not assume a model provider's identity is the assisting agent.
29
29
 
30
- ## Product and architecture
30
+ ## Session isolation and temporary artifacts (#442)
31
+
32
+ - Prefer one app-managed worktree per independent repository session when supported and authorized. A branch-backed session, folder session or shared checkout is not necessarily isolated. Verify the actual workspace and branch; preserve the user's chosen workspace. Creating or checking out another worktree still requires separate approval.
33
+ - Store temporary evidence, downloads, scratch files and backups in the session-owned artifact area outside the repository checkout. Keep only intentional deliverables in the repository. Clean up only explicitly identified temporary files created by the current task; never hide, move, delete or stage pre-existing files merely to make a gate pass.
34
+ - Inspect the explicit staged and committed diff before delivery. Unrelated untracked files are not by themselves a Git conflict or proof of a GitHub permission failure. Respect each delivery tool's own instructions and allowed fallback paths; repository guidance cannot override those requirements or branch protection.
35
+ - Continue routine investigation and authorized delivery without repeated approval prompts. For a genuine decision, safety boundary or tool-policy blocker, ask or report it once with the exact consequence; do not loop while the user is unavailable. Preserve existing approval boundaries for profile installation, sign-out, disruptive restart and worktree checkout.
36
+
37
+ These are agent instructions and contract-drift checks, not a filesystem sandbox or a guarantee that every session uses a worktree.
38
+
39
+ ### Scoped autonomous execution (#491)
40
+
41
+ **Keep progressing within the user's authorization; ask only at a new boundary.**
42
+ Before asking, check the direct user instructions already available for this task.
43
+ Retain the approved target, purpose, side effects, limits and any revocation in
44
+ session-owned task state. Completing one step, receiving a continuation reminder,
45
+ losing a UI window or finding the user unavailable does not by itself erase that
46
+ authorization. A checkpoint records evidence of consent, not a new permission
47
+ grant; respect any tool that requires fresh direct consent or cannot recover it.
48
+
49
+ Proceed with safe inspection, isolated checks and bounded recovery without routine
50
+ confirmation. An explicit "restart and check" approval covers stopping the approved
51
+ app, starting that same target and inspecting it. If fresh discovery subsequently
52
+ proves it is not running before that check completes, allow at most one recovery
53
+ start under the same authorization, unless the user or tool limits consent to one
54
+ invocation. Do not stop an app that is already running for this recovery, start a
55
+ different target, reinstall, change settings/accounts or broaden the operation.
56
+ Unknown app state calls for read-only discovery, not a guessed launch. Repeated
57
+ exit is a concrete failure to investigate and report, not an unlimited restart loop.
58
+
59
+ Tool consent, refusal and interruption controls take precedence. Report
60
+ "the tool reported input interruption", not "you were operating the app";
61
+ the report does not independently establish human activity or intent. Reobserve
62
+ through the same supported tool before any permitted retry. An interrupted
63
+ attempt is not proof of navigation or product failure. Preserve attempt budgets
64
+ across continuation and compaction; do not reset them by renaming the task,
65
+ switching tools to evade refusal, or receiving an automated completion reminder.
66
+
67
+ At a genuine blocker, state the exact missing permission/capability, consequence
68
+ and next action once, then continue any independent authorized work. Do not repeat
69
+ the same question or unchanged waiting message. If no safe work remains, use the
70
+ host's blocked/awaiting-input mechanism when available; otherwise give one truthful
71
+ partial handoff and wait for changed evidence or user input. A completion reminder
72
+ is not new consent, a retry-budget reset or evidence of success. Never mark an
73
+ unverified requirement passed merely to end the loop.
74
+
75
+ | Situation | Decision |
76
+ |---|---|
77
+ | Approved restart/check; exact app is confirmed stopped | Continue the approved start/check, including the one bounded recovery start when consent permits; do not ask again solely because a previous step finished. |
78
+ | App is already running, target differs, or consent was revoked | Observe the running app; obtain new consent only for the new disruptive action, never infer it from prior installation approval. |
79
+ | Tool reports interruption; user says they did not interact | Keep both facts separate, reread UI and follow the tool's permitted recovery; do not blame the user or bypass the tool. |
80
+ | Genuine approval is missing and the user is absent | Keep that action blocked, do other authorized work, and do not send repeated waiting messages. |
81
+ | Install/import checks pass but loaded version is unknown | Preserve partial status; neither a policy check nor disk evidence proves runtime acceptance. |
31
82
 
32
- `dsh-github-copilot` currently admits and targets only official DSH `0.2.1-rc.3`, a prerelease. The prior thirteen DSH pins remain in `deployment-baseline.json` as historical evidence, not current support or CI release gates. Rc.3 source/artifact CI qualification passed on Windows/Linux in run `40098031196`; Desktop artifacts/signatures remain unverified. Do not treat this unpublished candidate as a production Core upgrade recommendation. The signed rc.2 Desktop evidence is historical peer ownership only. Rc.2 installations must retain alpha.15 or their existing compatible plugin. It does not own a general Copilot chat adapter. DSH's built-in `llm-pi-ai` mount owns the GitHub Copilot provider, catalog, OAuth method and grant format, token exchange, refresh, and normal model transport.
83
+ This policy is exposed by `agent.mjs describe/plan` and checked for drift, not
84
+ enforced by a runtime permission engine. It grants no new live-profile access and
85
+ does not bypass tool approvals, plugin-only ownership, required reviews or CI.
33
86
 
34
- This repository maintains twelve narrow surfaces and ownership boundaries:
87
+ ## Product and architecture
88
+
89
+ ### Confirmed product scope (#455, #456)
90
+
91
+ Current source target: official DSH `0.2.2-rc.3`. The exact source commit and
92
+ dependency versions are recorded in `deployment-baseline.json` and `package.json`.
93
+
94
+ The native enhancement request (#460/#461) adds only reviewer-scoped Responses
95
+ sampling compatibility and an optional canonical-account hosted-search backend.
96
+ Use public native ownership/configuration proof and prepared dispatch; never
97
+ replace Web, select a backend, migrate accounts/settings, or bypass review.
98
+ Search permits one fixed capability proof and one final query within 25 seconds,
99
+ with four concurrent operations and configuration/credential/disposal fences.
100
+ The plugin settings may explicitly choose the native search model, defaulting to
101
+ automatic. List only the canonical account/native Responses intersection; metadata
102
+ is not search proof. Invalid or unavailable explicit choices fail without fallback.
103
+ Use a separate hidden volatile `nativeSearchModel` leaf with path-level CAS and
104
+ readback; never migrate or interpret the old `searchModel` as this choice.
105
+ The former plugin routing UI and managed Auto remain retired. Supplier calls,
106
+ live installation and restarts are separate from synthetic CI acceptance.
107
+
108
+ The user-authorized native model sync (#466, #479) is a narrow exception to the
109
+ no-settings-rewrite rule: after a visible preview and one explicit confirmation, one
110
+ revision-checked write may replace only
111
+ `llm-pi-ai.providers.github-copilot.models` in an existing canonical profile.
112
+ Prove current canonical-account metadata and the native adapter-owned catalog.
113
+ The explicit #508 direction changes this operation to ID-only account model
114
+ submission, not capability qualification: submit all enabled account IDs as
115
+ `{ id }` references without intersecting them with the native catalog. Do not copy,
116
+ correct or certify account capacity, input, image or reasoning facts here.
117
+ Unknown native IDs are advisory only, not skipped; do not invent definitions
118
+ or rewrite route defaults. Native validation may reject the entire update.
119
+ The native adapter owns inherited definitions, validation,
120
+ requests and their limitations. This does not weaken account capability proof
121
+ for search or other plugin-owned request paths. Disclose additions, updates,
122
+ removals and IDs absent from the native catalog, and that replacing customized entries removes their
123
+ per-model overrides and output request defaults. A successful sync is not
124
+ model-call compatibility evidence.
125
+ Prepare the preview without forced discovery from existing verified evidence.
126
+ An existing `compat.supportsStrictMode: false` may be preserved only when at
127
+ least one synced Responses or Completions model supports it; block other unproven
128
+ compatibility overrides. Recheck account/catalog/preferences and Settings evidence
129
+ before the one-shot write, then read back both user and effective values. Never create a profile,
130
+ change other paths or perform this sync automatically.
131
+
132
+ The user-confirmed direction on 2026-11-14 supersedes conflicting legacy feature
133
+ requirements below: this plugin is a lightweight GitHub Copilot model integration
134
+ for DSH Desktop, not a second agent product. The qualification target is the exact
135
+ official DSH `0.2.2-rc.3` source and published package graph. Each new revision
136
+ requires its own CI and release evidence; a previous release does not qualify it.
137
+
138
+ DSH owns application login, AgentLoop, model selection, Auto, parent-model
139
+ following, subagents, tools, Web, permissions, history, context/compaction, and
140
+ Usage. The plugin owns only Copilot's native OAuth/credential integration,
141
+ account-proven model and capability discovery, published-adapter composition,
142
+ and narrowly evidenced Copilot compatibility. Do not add a DeepSeek login check,
143
+ read DeepSeek credentials, add another Copilot login or wire, or redirect failed
144
+ Copilot calls to another provider.
145
+
146
+ Parent/child relationships, inheritance, delegation, lifecycle and scheduling
147
+ follow DSH's native contract, not a plugin-defined policy. Subagent compatibility
148
+ means supplying models to that existing flow. Do not add a child-account
149
+ inheritance mode, parent lookup as credential authority, or plugin-owned child
150
+ routing. Verify authentication and request isolation through the same provider
151
+ contract used by ordinary native calls. A missing public seam is a concrete
152
+ compatibility limit to report, not permission to invent a parallel relationship.
153
+
154
+ Retire plugin-owned Auto and parent-follow policy/UI and custom hosted-search
155
+ execution/routing. Old conversation continuity is not an acceptance requirement.
156
+ Retain GitHub Copilot account quota and useful
157
+ enhancements; remove other functionality only when it is demonstrably redundant
158
+ or unnecessary, not merely because it extends the basic model route. Never delete
159
+ or rewrite user settings, accounts, or history, silently substitute a model, or
160
+ claim a native replacement until the
161
+ exact public API and behavior are verified. Preserve necessary Copilot
162
+ authentication, account/turn isolation, request correctness, and actionable
163
+ diagnostics. HydraFusion/Max are explicitly out of scope (#441).
164
+
165
+ Model-facing DSH capabilities added over time, including native subagent model
166
+ selection and actual child invocation (#456), are compatibility goals for
167
+ account-available Copilot models. Verify each against exact public Core APIs and
168
+ supplier-advertised capabilities with focused tests. Unknown metadata or
169
+ unsupported behavior must fail or diagnose explicitly; do not infer support,
170
+ add model-ID routing rules, patch Core, or claim untested parity.
171
+
172
+ When any later legacy detail in this guide conflicts with this confirmed scope,
173
+ follow this section and the current acceptance criteria in #455/#456.
174
+
175
+ The user clarified that the ordinary route is DSH's native
176
+ `github-copilot` provider, with useful plugin enhancements attached only through
177
+ public APIs. The production package registers no `github-copilot-preview`
178
+ provider; do not restore it to preserve old selections or create a history
179
+ migration. Existing stored conversations, credentials and settings are not
180
+ authorized for deletion or rewriting. Explicitly document that old preview
181
+ route selections may become unavailable. Native model selection and actual
182
+ subagent invocation must be verified on `github-copilot`, not inferred from
183
+ legacy-route tests. Record enhancements that cannot safely attach to native
184
+ APIs rather than patching Core or misrepresenting support.
185
+
186
+ For official DSH `0.2.2-rc.3`, plugin `0.1.0-alpha.14.dsh.0.2.2.rc.3`
187
+ at `5d82df760683eeae7bb0413c946e4d25daef2049` passed the Windows/Linux
188
+ source/artifact CI in [run 43691055529](https://github.com/cloga/dsh-github-copilot/actions/runs/43691055529)
189
+ and was published to GitHub Releases and npm. This evidence is limited to that
190
+ revision; later changes require their own CI and publication evidence.
191
+ Desktop signatures, installation, loaded state, OAuth and supplier calls are not
192
+ established. The `desktopCandidateQualified: false` contract
193
+ tracks the unverified Desktop artifact/live-acceptance layer, not a failed CI.
194
+ Earlier pins are historical evidence, not current support gates. A prerelease
195
+ is not a production Core upgrade recommendation. DSH's built-in `llm-pi-ai`
196
+ owns the canonical GitHub Copilot provider, OAuth, grant format, token exchange,
197
+ refresh, and normal model transport.
198
+
199
+ Historical [#483](https://github.com/cloga/dsh-github-copilot/issues/483):
200
+ releases through alpha.12 could reject native schema-default compatibility
201
+ maps, blocking hosted-search proof and reviewer-only temperature omission.
202
+ The alpha.13 release includes a narrow fix; confirm live behavior independently.
203
+ Do not suggest profile edits as a workaround.
204
+
205
+ The following is a historical architecture inventory, not a requirement to keep
206
+ every surface as a product feature; apply the confirmed scope above when deciding
207
+ which runtime registrations, UI, and settings remain active:
35
208
 
36
209
  1. A conditional authorization-service bootstrap plus Host controller that joins DSH authorization, credentials, and settings.
37
210
  2. A Client Models provider-card contribution with one shared account-state owner, Client-safe Remote descriptors and a nested plugin-owned model-preferences disclosure; embed in an existing configured canonical row, suppress its separate footer controller, and retain footer/old-Core section fallback when no such row is mounted.
38
211
  3. Strict JSON normalization of pi-ai's provider-owned Copilot OAuth grant.
39
- 4. Preserve intentional absence of `llm-pi-ai.providers.github-copilot`; reconcile only existing legacy profiles and verified ownership journals. Fresh installations use the single account-discovered route; existing profiles require explicit migration, never silent removal.
212
+ 4. Preserve intentional absence of `llm-pi-ai.providers.github-copilot`; reconcile only existing legacy profiles and verified ownership journals. The confirmed #466 models-only sync is the narrow explicit exception above; never create or remove a native profile automatically.
40
213
  5. Direct provider-hosted search using the same Host-side credential lifecycle.
41
214
  6. Provider-scoped tool-schema compatibility for Copilot payload behaviors; Core remains the tool and execution owner.
42
215
  7. A bounded account-discovery route that supplies validated endpoint/capability metadata to the published native adapter, including explicit managed Responses sampling compatibility, plus exact plugin-owned model exclusions enforced across its directory, Auto pools and direct admission, without maintaining model-ID routing rules or changing Core's catalog.
@@ -52,22 +225,12 @@ projection may diagnose concrete failed-zero or invalid-sample incidents; ordina
52
225
  request progress and absent fresh sampling stay quiet. Never filter shared native
53
226
  usage, replace Core's meter, infer current occupancy/percentages or rewrite history.
54
227
  See [quota boundaries](./docs/copilot-usage.md).
55
- 12. Default-off local account/Checking/compaction diagnostics through public storage-domain and strict additive Remotes. Keep fixed-dimension Client/Host and logical/physical populations separate, with bounded handles/rows, 14-day retention, explicit loss/uncertainty and native commit evidence. Isolate the home-wide backend by public profile context, never account/Session identity; one writer per profile is required. No content, raw errors, identities/hashes, credential/history reads, ad-hoc files, Settings logs, upload, daily task or automatic repair. Aggregate and Auto controls remain independent. Separately consented `requestDiagnosticsEnabled` collects at most 128 content-free managed-adapter physical requests for 24 hours within the shared 2 MiB cap. Random stream groups/dispatch indices are not Session/turn identity or Core retry counts. Local body-write completion does not prove supplier receipt; abort attribution needs actual signal evidence, not EOF text. Never change transport/retries/Usage to obtain diagnostics. All controls use hidden volatile CAS leaves with exact readback; clear is a separately confirmed epoch fence. Missing/corrupt storage remains unavailable, never healthy empty data. Publication does not enable collection. See [local diagnostics](./docs/plugin-diagnostics.md).
56
-
57
- Auto aggregate assessment outcomes are fixed codes only; keep legacy missing reasons
58
- unrecorded and separate from new cohorts. Count decisions by selected/no-fit counts,
59
- not repeated candidate opportunities. Never change assessment policy, deadline or
60
- context safety merely to populate diagnostics; retain the shared storage/row bounds.
61
-
62
- Credential-change observations (#402) use the existing independent request
63
- consent: at most 128 fixed notification/commit rows and pending handles for 24
64
- hours within the shared 2 MiB cap. Derive reasons only from existing refresh
65
- checks, never new credential reads. No grant/record/identity/endpoint values or
66
- hashes; random change IDs join verdict phases only. Live-wire counts are not
67
- unique requests, retries or execution proof. Unknown source and missing legacy
68
- evidence stay unknown. Preserve #385 qualification/revocation; clear, pause,
69
- expiry and disposal fence later callbacks. Each diagnostic population, including
70
- Auto, is independently collapsed by default; opening it never enables collection.
228
+ 12. Local diagnostics is retired (#499): do not register its service, UI,
229
+ Remotes, storage or collectors. Preserve existing data and the four hidden
230
+ legacy settings without rewriting them; even true values do not enable
231
+ collection. Older releases may collect again if loaded with those settings.
232
+ Native Usage, context incident notices, immediate request errors and native
233
+ refresh qualification remain independent. See [retirement details](./docs/plugin-diagnostics.md).
71
234
 
72
235
  ## Session-policy compaction replay consent (#349, #352)
73
236
 
@@ -90,13 +253,50 @@ Safe background diagnostics use bounded Error cause chains and fixed allowlisted
90
253
  codes, never raw errors. Installation alone neither selects nor invokes recovery.
91
254
  See `src/compaction-replay.ts` and `docs/manual-compaction-recovery.md` (#349).
92
255
 
93
- ## Approved multi-account ownership extension (#297)
256
+ ## Approved multi-account ownership extension (#297, #474)
257
+
258
+ The user-approved #297 extension allows independently authorized
259
+ `github-copilot/account-<opaque-id>` records in DSH's credentials service.
260
+ The later explicit #474 direction supersedes the earlier prohibition on
261
+ canonical writes only for a user-confirmed global account switch: copy the
262
+ selected normalized OAuth grant into `llm-pi-ai/github-copilot` through the
263
+ public serialized credential API so DSH's existing native provider uses it.
264
+ Do not intercept native reads, patch Core, create a second provider as the
265
+ switching solution, or change model/history/provider settings. The selected
266
+ account applies profile-wide to future native requests; in-progress requests
267
+ retain their admitted credentials.
268
+
269
+ Before replacing a different configured canonical grant, preserve it in a new
270
+ plugin-owned account record unless the previous selected account already owns
271
+ that exact grant. Refuse when preservation would exceed the account bound. On
272
+ later switches, synchronize the previous active account's saved grant from
273
+ canonical before replacement. Use exact per-record serialization/readback and
274
+ path-level Settings CAS. A failed Settings commit may roll back only while the
275
+ canonical record still exactly matches the attempted write; otherwise retain
276
+ data and report uncertainty. Fence native Agent turns, OAuth and account
277
+ mutations. Direct provider calls outside observable Agent turn lifecycle remain
278
+ outside the plugin's turn fence.
279
+ Refresh remains owned by native pi-ai `Models.getAuth()` and DSH
280
+ `modifyRecord()`; the pinned Copilot refresh keeps the refresh token stable.
281
+ If selection and canonical credential diverge after an external native sign-in,
282
+ show an actionable mismatch and require explicit recovery; never auto-migrate.
283
+
284
+ Keep the native UI and its canonical quota/search attribution. The
285
+ `github-copilot-preview` adapter remains compatibility code but is not
286
+ registered by the production package entry. Session account overrides are not
287
+ evidence of native-provider behavior or a reason to register a second model
288
+ provider. Disposal removes only plugin registrations. Native model selections
289
+ remain native; explicit `web.searchProvider=github-copilot-hosted` needs a
290
+ user-selected replacement before uninstall. Missing configured Web backends return
291
+ `WEB_PROVIDER_CONFIGURED_MISSING`, not automatic fallback. Uninstall leaves the
292
+ last selected grant in the native canonical record. No automatic
293
+ Settings/history migration or sign-out.
94
294
 
95
295
  Login environments (#424) use only pinned native pi-ai OAuth for GitHub.com and
96
296
  validated single-label `tenant.ghe.com` Enterprise Cloud hosts. Preserve host
97
297
  binding through identity, duplicate checks, reauthorization and native refresh/
98
298
  discovery/request auth. Plugin identity rejects redirects; native OAuth redirect
99
- control is unavailable in pi-ai 1.1.0 and must not be claimed or emulated with a
299
+ control is unavailable in pi-ai 1.3.0 and must not be claimed or emulated with a
100
300
  global Fetch patch/second flow. GHES and Enterprise quota remain unsupported.
101
301
  See `src/copilot-login-environment.ts` and `docs/copilot-accounts.md`.
102
302
 
@@ -108,15 +308,15 @@ metadata-only Retry; late results and disposal cannot publish stale state.
108
308
  Never apply this deadline to add/cancel/switch/reauthorize/remove mutations,
109
309
  release their fences, cancel Host work or introduce an automatic retry.
110
310
 
111
- 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).
311
+ 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).
112
312
 
113
- 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.
313
+ 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.
114
314
 
115
- 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.
315
+ 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 account authorization and the global default; Credits may select an already authorized managed-route account for this Session's subsequent turns or restore global inheritance (#305/#318). An explicit choice equal to the default remains explicit. Freeze account ownership before 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.
116
316
 
117
- Account selection shows the current account and a compact Switch dropdown with no account search, never a flat unbounded account list. Mark the current choice, scroll long lists internally and place Add at the bottom. Saved-account reauthorization/removal remains in a separate management disclosure. One Models Manage disclosure contains account management and cross-account exact-ID model preferences. Continuation settings belong beside account controls. Persist the initial default-on epoch and later global changes with path-level CAS; only unseeded Sessions born after a known epoch inherit it, never retroactively enroll existing/unknown/forked histories. Normal Client continuation uses only the persistent Session policy; no next-turn-only or temporary-recovery duration choices. Explicit-off account changes require persistent-enable/keep-off/cancel choices, then fresh account revision readback before CAS. Exact replay failures offer loss-disclosed persistent Enable/Cancel when off, diagnostics without repeated authorization when on. Missing policy evidence fails explicitly, never a temporary authorization fallback. Retain old next-turn/recovery strict Remote contracts and Host admission for compatibility; failure-evidence expiry does not disable the persistent policy. No automatic send/retry, history writes, private Settings navigation or inferred encrypted account origin. The approved synthetic mock and current navigation limit are documented in [account management](./docs/account-management-experience.md).
317
+ Account selection shows the current account and a compact Switch dropdown with no account search, never a flat unbounded account list. Mark the current choice and scroll long lists internally; Add and saved-account reauthorization/removal remain in Models, not Credits. One Models Manage disclosure contains account management and cross-account exact-ID model preferences. The former new-Session continuation default is not shown now that the managed route is retired; preserve existing settings and compatibility contracts. The historical default-on epoch and later changes use path-level CAS; only unseeded Sessions born after a known epoch inherit it, never retroactively enroll existing/unknown/forked histories. Normal Client continuation uses only the persistent Session policy; no next-turn-only or temporary-recovery duration choices. Explicit-off account changes require persistent-enable/keep-off/cancel choices, then fresh account revision readback before CAS. Exact replay failures offer loss-disclosed persistent Enable/Cancel when off, diagnostics without repeated authorization when on. Missing policy evidence fails explicitly, never a temporary authorization fallback. Retain old next-turn/recovery strict Remote contracts and Host admission for compatibility; failure-evidence expiry does not disable the persistent policy. No automatic send/retry, history writes, private Settings navigation or inferred encrypted account origin. The approved synthetic mock and current navigation limit are documented in [account management](./docs/account-management-experience.md).
118
318
 
119
- Use hidden volatile `sessionAccounts` with path-level SettingsForms CAS, readback and restart evidence. Session account Remotes use explicit viewed IDs, native Agent lookup and strict codecs, never automatic Client scope. Credits uses that Session's account for identity/quota, rejecting mismatched or late results. Historical Account is an additive assistant-actions disclosure beside native Usage, captured only after a real ordinary native chunk; bounded Host-lifetime evidence becomes unknown after restart/eviction and is never reconstructed from today's settings. No new durable events, history/default/model/Usage writes, automatic account fallback, replay deletion or message retry. See [the requirements and acceptance gates](./docs/copilot-accounts.md).
319
+ Use hidden volatile `sessionAccounts` with path-level SettingsForms CAS, readback and restart evidence. Session account Remotes use explicit viewed IDs, native Agent lookup and strict codecs, never automatic Client scope. Credits uses that Session's account for identity/quota, rejecting mismatched or late results. Historical Account is an additive assistant-actions disclosure beside native Usage, captured only after a real ordinary native chunk; bounded Host-lifetime evidence becomes unknown after restart/eviction and is never reconstructed from today's settings. Account-only model membership may use explicitly configured native IDs outside the native catalog, but never expands reviewer/search protocol qualification or proves model capability. Preserve native ownership, canonical-account matching and credential/configuration revocation. No new durable events, history/default/model/Usage writes, automatic account fallback, replay deletion or message retry. See [the requirements and acceptance gates](./docs/copilot-accounts.md).
120
320
 
121
321
  ## Retired model-role compatibility boundary (#158)
122
322
 
@@ -129,8 +329,14 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
129
329
  - `src/index.ts`: authorization bootstrap, dependency-gated Host entry, settings registration, listener, and `ctx.web` provider composition.
130
330
  - `src/authorization-controller.ts`: sign-in/status/sign-out and route mutation.
131
331
  - `src/copilot-grant.ts`, `src/copilot-auth.ts`: strict grant normalization and narrow pi-ai `CredentialStore` adapter; canonical compatibility and explicitly selected account records follow the account-binding contract.
132
- - `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.
133
- - `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.
332
+ - `src/client.ts`: account and model controls, the native search-model setting,
333
+ and additive optional Chat integration through public slots.
334
+ - `src/native-copilot-access.ts`, `src/native-copilot-search.ts`,
335
+ `src/native-search-model-card.ts`: proof-bound canonical hosted search in
336
+ DSH's existing Web service and its explicit model choice.
337
+ - `src/web-search-routing-config.ts`, `src/web-search-routing-card.ts`: retained
338
+ legacy routing code and compatibility exports; the old routing UI and facade
339
+ are not mounted current behavior. Never reactivate them implicitly.
134
340
  - `tests/fixtures/reasoning-presentation-core.fixture.ts`: native blank-reasoning rendering acceptance and independent Auto/Usage mount evidence. Do not restore the retired plugin renderer/provenance projection or change messages, replay indexes or Usage.
135
341
  - `src/remote.ts`: Typert Remote contribution. Never add credential payloads here.
136
342
  - `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, quota-specific credential owner or general model wire.
@@ -148,17 +354,18 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
148
354
  - `src/temporary-models.ts`: exact, account-gated corrections with semantic protocol/capability retirement.
149
355
  - `src/model-protocol.ts`: explicit Core capability detection and conservative legacy fallback.
150
356
  - `src/responses-reasoning.ts`, `src/responses-reasoning-text.ts`: selected-model effort mapping and public summary assembly.
151
- - `src/tool-schema-compat.ts`: Copilot-only prompt-assembly filter for unusable escalation arguments and action-specific Goal update schemas.
152
- - `src/plan.ts`: Copilot-only, fail-closed hosted-search candidate lifecycle.
153
- - `src/auto-assessment-evidence.ts`: bounded request-local semantic classifier milestones copied into strict ephemeral turn evidence; no prompts, replay, credentials or error bodies. Total includes preparation; adapter start and first text are not HTTP dispatch/byte timings. Keep one configured monotonic deadline (30s default, 1000–120000ms) checked at preparation/native request/result boundaries and 128-token compact output; delayed timer settlement is not a real-time guarantee. The user-approved budget trial is not calibrated latency or proof of past timeout causes. Empty classifier setting retains metadata-driven automatic selection; a nonempty exact account ID preserves proof/exclusion/text/headroom guards, never a virtual Auto ID or silent alternate-model fallback. Both native volatile Config leaves affect future assessments and preserve admitted turns. Prefer eligible supplier-advertised reasoning-off classifiers, but request off only when supplier and public prepared-model effort agree; unsupported native controls stay unchanged. No guessed optimal/latency ranking, benchmark requests, adaptive timeout, cooldown or cross-turn cache without reviewed observations.
154
- - `src/probe.ts`: bounded native-search capability proof.
155
- - `src/wire.ts`, `src/wire-anthropic.ts`: inline hosted-search streaming.
156
- - `src/traditional-search.ts`: `github-copilot-hosted` `ctx.web` provider.
357
+ - `src/tool-schema-compat.ts`: Copilot-only prompt-assembly filter for unusable escalation arguments; Goal schemas remain native.
358
+ - `src/plan.ts`, `src/probe.ts`, `src/wire.ts`, `src/wire-anthropic.ts`,
359
+ `src/traditional-search.ts`: retained historical hosted-search and routing
360
+ implementation; current registration is owned by `src/native-copilot-search.ts`.
361
+ - `src/auto-assessment-evidence.ts`: retained historical classifier evidence;
362
+ plugin-owned Auto assessment and routing are not mounted. Preserve bounded,
363
+ content-free evidence without reactivating them.
157
364
  - `src/serialize.ts`, `src/sse.ts`, `src/failure.ts`: protocol conversion and bounded error handling.
158
365
  - `src/response-error-body.ts`, `src/request-body-timeout.ts`, `src/request-upload-evidence.ts`: bounded clone-only HTTP error evidence and safe managed upload-timeout guidance. Request-scoped public Node diagnostic events supply numeric local body-write/header/ALPN evidence only after an exact verified `408/user_request_timeout`; absent events, multiple native requests and work limits stay explicit. Always dispose subscriptions when Fetch settles, without changing its arguments, Response/errors, dispatcher, proxy or retry owner. Local body-write completion is not upload duration, kernel ACK, supplier receipt or execution; its absence does not prove incomplete upload. Native failure classification/retry metadata stay unchanged; final JSON bytes are not tokens or a payload limit. A separate explicit opt-in compression setting is default-off and never activated by a 408; never infer overflow, auto-compact, trim history, switch models or add retries from a 408.
159
366
  - `src/responses-request-compression.ts`: asynchronous `node:zlib` gzip at `Z_BEST_SPEED` only for exact account-proven official Copilot HTTPS `/responses` JSON POSTs through the existing public Fetch seam. `github-copilot.responsesRequestCompression` defaults false; enforce the 256 KiB minimum, 32 MiB compression-work bound and both 5%/4 KiB savings thresholds. Skips retain the original request with a fixed reason, and cancellation/account/deadline fences run before dispatch. No custom Fetch, other protocol, explicit `auto`/WebSocket, DNS/proxy/dispatcher changes, context-admission or replay changes, resend after an encoding rejection, or new retry. Gzip is wire encoding, not compaction or proof of supplier receipt.
160
367
  - Verified 408 error correlation (#276) adds only validated model/protocol, UTC header-observation time and strictly formatted `x-github-request-id` / `x-request-id` response IDs. Missing/malformed IDs stay unavailable; no other header values or new persisted population. IDs do not prove receipt/execution, and zero/unknown image composition cannot justify image-budget guidance.
161
- - `src/request-body-evidence.ts`, `src/request-body-composition.ts`: bounded numeric original-JSON spans for verified 408s and separately consented request observations. Keep replay validation/recovery at 16 MiB; only diagnostic composition may use the 32 MiB cooperative scanner with 64 Ki-character yields, a two-second monotonic deadline and four scan slots. Do not build a full payload object graph or decode image/replay values. Conversation/tool definitions/top-level system/residual partition total bytes; structural image and opaque replay spans are disjoint conversation subsets. Unknown/limited/cancelled evidence stays explicit. Opted-in large scans start after Fetch invocation without delaying ordinary native delivery; retained numeric rows may update after settlement only behind consent/clear/retention/eviction fences. Retain source strings only for bounded in-flight counting, never in storage/logs. Fetch-to-header time excludes analysis and is not upload duration. With gzip, report original JSON and prepared HTTP-body bytes separately; neither establishes delivered bytes. No automatic mitigation, timeout/retry changes or supplier-limit claim.
368
+ - `src/request-body-evidence.ts`, `src/request-body-composition.ts`: bounded numeric original-JSON spans for verified 408 guidance only. Keep replay validation/recovery at 16 MiB; error composition may use the 32 MiB cooperative scanner with 64 Ki-character yields, a two-second monotonic deadline and four scan slots. Do not build a full payload object graph or decode image/replay values. Conversation/tool definitions/top-level system/residual partition total bytes; structural image and opaque replay spans are disjoint conversation subsets. Unknown/limited/cancelled evidence stays explicit. Retain source strings only for bounded in-flight counting, never in storage/logs. With gzip, report original JSON and prepared HTTP-body bytes separately; neither establishes delivered bytes. No automatic mitigation, timeout/retry changes or supplier-limit claim.
162
369
  - `src/copilot-stream-liveness.ts`: request-local HTTP/SSE byte-idle observation, paired with the public native adapter's bounded assistant-chunk deadline. Default five-minute byte idle and ten-minute semantic silence; no fake assistant output, private watchdog access, new retry or Core patch. Consumer think time is excluded; explicit WebSocket/auto stays native-only. `chatStreamLiveness: false` restores native-only timing. `chatMaxRequestImageBytes` retains Core's 20 MiB default; smaller explicit settings authorize only native image offload, not hidden history trimming or a guessed supplier limit. Synthetic heartbeat evidence is not production heartbeat proof.
163
370
  - `tests/`: unit and integration evidence; mirror the source area being changed.
164
371
  - `deployment-baseline.json`: declared machine-readable compatibility and capability evidence inventory.
@@ -167,6 +374,10 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
167
374
 
168
375
  ## Non-negotiable invariants
169
376
 
377
+ The following two classifier and context-projection paragraphs are historical
378
+ constraints on retained plugin Auto code, not a current runtime feature or
379
+ authorization to reactivate it.
380
+
170
381
  Auxiliary classifier disable proof accepts explicit supplier `off` or the
171
382
  selected protocol's native `none` (Responses/Completions) or `disabled`
172
383
  (Anthropic), scoped to the isolated classifier model only. Missing/empty effort
@@ -207,29 +418,37 @@ evidence is content-free and ephemeral, never a new persistent population.
207
418
  See `docs/copilot-accounts.md` (#385).
208
419
  - 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.
209
420
  - Settings changes are path-level. Never replace the whole `llm-pi-ai` section or unrelated provider profiles.
210
- - 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.
211
- - 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.
421
+ - 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.
422
+ - The explicitly selected `github-copilot-hosted` backend uses the canonical native Copilot account and account-proven Responses models also present in the native catalog. Its configured model or deterministic first eligible model receives one fixed capability probe followed by one user query, without fallback or replay. Enforce the 25-second deadline, four-operation limit and account/configuration/disposal fences; metadata alone is not search proof. The old plugin router and custom inline transport are historical, not active alternatives. If that legacy wire is ever deliberately restored, file blocks, including nested tool-result files, must still delegate through `next()` so Core owns file projection.
212
423
  - Misconfiguration and API drift fail loudly with a named missing seam. Do not fall back to process-local secrets or implicit machine state.
213
424
  - Host, Client, and Remote package entries must stay independently buildable and exported.
214
425
  - The package must self-provide authorization when Core omits it, reuse an existing service without duplicate registration, and never activate the integration body before authorization is available.
215
426
 
216
427
  ## Session and migration ownership (V3, alpha.8, #99)
217
428
 
429
+ The following legacy managed-route/search design is historical. The plugin
430
+ router and managed Auto are retired, and removing the canonical native route is
431
+ not the current direction. Do not execute the old migration proposal; use the
432
+ confirmed scope above and the [current README](./README.md).
433
+
218
434
  - One global Host account supplies many models; selected/history-backed Sessions retain independent model context. Auto-mode native search derives from the captured initiating Session's effective request-header/config or explicit `GenerateOptions`, never another Session or future global default C. Fixed/fallback Copilot search uses the explicit provider-owned `searchModel` override when nonempty, otherwise bounded automatic account-owned Responses selection; it never borrows the Chat model, another Session's selection or the global chat default. `Agent.options` is the activation seed, not selected Session-model evidence; `installModelSelection` overrides request/assembly; Core records the effective `Session.requestHeader().config` before tools. Without proven request context, traditional search is unavailable. A newly selected pending model must not reuse the old request header as current prompt guidance. Per-owner plan caches prevent different-model A/B reuse/cancellation; metadata remains shared.
219
435
  - 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.
220
436
  - 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.
221
437
  - 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.
222
438
  - 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.
223
439
  - 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.
224
- - 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.
440
+ - 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.
225
441
 
226
442
  ## Live migration readiness (alpha.9, #101)
227
443
 
444
+ Historical readiness evidence only: it is not an authorization or current plan
445
+ to remove the native provider or migrate settings.
446
+
228
447
  - Use no-argument `githubCopilot.migrationStatus()` for fresh live-Agent evidence; generic `session/list` may be stale and plugin inventory alone has no loaded-version evidence. `src/migration-status.ts` reads public leaves synchronously and reports loaded build `plugin.name/version`, `protocolVersion: 1`, `observedAt`, capability flags and completeness flags. Missing/unknown/incomplete is not safe absence.
229
448
  - Capabilities are `agentsList`, `sessionProjections`, `settingsCas`, `providerRegistry`, `defaultSelection`; `complete.sessions/defaultSelection/routes` describes evidence completeness, not migration approval. Effective selection uses pending projection, request-header config, then default only for genuinely empty Sessions with known projection state. Running `activeRequestSelection` is the latest recorded header, not proven in-flight LLM work. Native effective configuration and native/managed registration are separate flags.
230
449
  - This read invokes no auth status/model discovery, credentials or network and mutates no settings/Sessions. No normal UI/global current-model/search card is added. Nine ordinary authorization/model-preference Remotes retain their codec; the tenth migration Remote uses a separate strict `GitHubCopilotMigrationStatus` codec.
231
450
  - `historyScope: live-agents-only` excludes cold stored histories. Require operator acknowledgement that older conversations may need a new explicit selection later. Loaded version/structural capability self-reports are not full Desktop/Core byte attestation or an atomic cross-namespace guarantee; recheck immediately before CAS.
232
- - The planned `cloga/dsh-windows-ops` command `tools/migrate-copilot-managed-route.ps1` is separate config-only maintenance after release. V1 performs no automated Session/default writes, cold-history scan, plugin install, restart or full Desktop-baseline acceptance. Resolve selection blockers separately with explicit approval; never report this planned command or live migration as published/installed/completed without evidence.
451
+ - The earlier planned `cloga/dsh-windows-ops` command `tools/migrate-copilot-managed-route.ps1` is superseded: production no longer registers the managed model route, so provider-profile removal is not required. Never claim that this historical command or a live migration was published/installed/completed without evidence.
233
452
 
234
453
  ## Supported DSH seams
235
454
 
@@ -249,19 +468,32 @@ The retained upstream baselines and current qualification target are:
249
468
  - Official tag `dsh-v0.2.0-rc.2`, commit `639ed015397290b3745d163aafe02ffee4aa3f84`; the signed installed Windows Desktop descriptor identifies the rc.2 shared peer graph.
250
469
  - Official tag `dsh-v0.2.1-alpha.4`, commit `86a402200d95fecef4529d969836f1fe13c6cb0d`; historical alpha.16 source/npm qualification only.
251
470
  - Official tag `dsh-v0.2.1-alpha.5`, commit `1517a4dbca0a2789ff1d41ba439600f8547d23fa`; exact source/npm qualification is separate from unverified candidate Desktop artifacts/signatures.
252
- - Official tag `dsh-v0.2.1-rc.3`, commit `1f81c047fc48fa190a683e469daa699857e9afe8`; prerelease target with a public `WebRuntime` Volatile-provider contract change. Source and published artifacts require exact CI qualification; Desktop artifacts/signatures remain unverified.
253
-
254
- The release admission, development dependency and CI targets are exact official `0.2.1-rc.3`; the earlier thirteen pins remain historical evidence only. CI runs unchanged tagged-source and isolated exact published-npm-artifact fixtures on Windows and Linux. Public APIs require pi-ai `1.1.0`, Cordis `4.0.5`, cordis-plugin-loader `1.0.6`, schemastery `3.18.5` and storage-domain-compatible Zod `4.4.3`. The current fixture must await serialized `agent/created`, avoid new synchronous Session-history reads, and preserve MCP/PTC/workflow/Sandbox/Shell/image-offload/Team ownership. Native gateway fixtures bind an explicit public owner Peer and interactive Client carrier; Session-controller fixtures register native resources. Synthetic identities never authorize live access. Neither source nor synthetic tests prove live endpoints, plugin activation, publication or loaded runtime state. See the [rc.3 qualification evidence](./docs/official-first-021-rc3.md); passing source/artifact CI does not authorize Core implementation rewrites or experimental durable records.
471
+ - Official tag `dsh-v0.2.1-rc.3`, commit `1f81c047fc48fa190a683e469daa699857e9afe8`; historical prerelease with a public `WebRuntime` Volatile-provider contract change.
472
+ - Official tag `dsh-v0.2.2-rc.3`, commit `38a6a5c965aa99ab525161efb7cc5cf1fe62fced`; current source and published-package qualification target.
473
+
474
+ Release admission, development dependencies and CI target the exact current
475
+ Core in `package.json`; prior pins are historical. The exact pi-ai,
476
+ Cordis, loader, schemastery and Zod versions also come from package metadata.
477
+ CI runs unchanged tagged-source and isolated published-artifact fixtures on
478
+ Windows and Linux. Fixtures await serialized `agent/created`, avoid new
479
+ synchronous Session-history reads, and preserve MCP/PTC/workflow/Sandbox/Shell/
480
+ image-offload/Team ownership. Native gateway fixtures bind an explicit public
481
+ owner Peer and interactive Client carrier; Session-controller fixtures register
482
+ native resources. Synthetic identities never authorize live access. Source or
483
+ synthetic tests alone do not prove live endpoints, plugin activation,
484
+ publication or loaded runtime state. The [0.2.1-rc.3 review](./docs/official-first-021-rc3.md)
485
+ is historical; passing source/artifact CI never authorizes Core rewrites or
486
+ experimental durable records.
255
487
 
256
488
  These pins document compatibility evidence. They do not authorize creating another controlled Core patch or making one a prerequisite for new plugin fixes.
257
489
 
258
- - 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.
490
+ - 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.
259
491
  - 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.
260
492
  - 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.
261
493
  - Authorization service: rc.1 Core provides it; the rc.2 web/headless profiles rely on this package's runtime dependency and conditional bootstrap.
262
494
  - Credentials: use record description/read/modify/delete APIs on the Host. Never read records in the browser.
263
495
  - Copilot grant schema: `type: oauth`, non-empty `refresh`/`access`, finite `expires`, optional non-empty `enterpriseUrl`, and optional deduplicated non-empty-string `availableModelIds`.
264
- - Settings: never recreate a missing `providers.github-copilot` profile. Existing native profiles remain user/Core-owned and require explicit migration before only the account-discovered route is listed.
496
+ - Settings: never recreate a missing `providers.github-copilot` profile. Existing native profiles remain user/Core-owned; production does not register a second account-discovered model route. Native model sync is an explicit, reviewed operation on an existing canonical profile.
265
497
  - Per-model API: do not assume stock Core honors a configured model.api. Verify the existing published behavior; where it cannot serve a model, use a plugin-local, exact-model alternative or report the limitation rather than patching Core.
266
498
  - Route activation: the dormant `llm-pi-ai` mount observes the profile and registers the route.
267
499
  - Client activation: package metadata injects DSH remotes and Models UI; `./client` mounts `./remote`.
@@ -269,9 +501,9 @@ These pins document compatibility evidence. They do not authorize creating anoth
269
501
  - Remote results: the nine ordinary authorization/model-preference methods retain the Zod v4 `GitHubCopilotAuthorizationView` strict codec required by rc.2 and accepted by rc.1. The tenth no-argument `migrationStatus()` method has a separate strict `GitHubCopilotMigrationStatus` codec; it does not change the ordinary auth contract.
270
502
  - Single-model saves use the additive `setModelExcluded(modelId, excluded)` Remote with an independent strict `GitHubCopilotModelPreferencesView` result. Preserve the ten existing descriptor identities/codecs. Do not read credentials, discover models or enumerate Sessions on this mutation path; confirm native CAS persistence before returning.
271
503
 
272
- When upgrading DSH or pi-ai, inspect the exact tagged public exports and update the baseline, compatibility guard, tests, and docs together. Apply the **official-first policy**: compare each customization's purpose against exact official source/contracts, classify complete/partial/unverified support, choose retain/migrate/retire, and record the remaining gap plus a concrete retirement trigger. Unverified parity is not evidence of absence. Prefer official behavior only after configuration/data migration, safety and runtime acceptance are reviewed; remove redundant paths and their obsolete tests without losing user-visible acceptance coverage. The current comparison is [official-first alpha.2](./docs/official-first-016-alpha2.md).
504
+ When upgrading DSH or pi-ai, inspect the exact tagged public exports and update the baseline, compatibility guard, tests, and docs together. Apply the **official-first policy**: compare each customization's purpose against exact official source/contracts, classify complete/partial/unverified support, choose retain/migrate/retire, and record the remaining gap plus a concrete retirement trigger. Unverified parity is not evidence of absence. Prefer official behavior only after configuration/data migration, safety and runtime acceptance are reviewed; remove redundant paths and their obsolete tests without losing user-visible acceptance coverage. The [alpha.2 comparison](./docs/official-first-016-alpha2.md) is historical, not the current release qualification.
273
505
 
274
- For alpha.25, source markers, local rc.1-backed focused tests and fifteen scoped exact-source runtime tests passed (alpha.2 contracts 8, Remote 1 and Session-context 6). Full local `pnpm verify` passed: 1373 Vitest tests with 2 expected skips, 176 tooling tests, typechecks, build and package smoke; pack/tarball verification passed. The scoped tests use a supplemental resolver with official TypeScript `6.0.3`, declared `mime-types@3.0.2` and `ws@8.21.0`, and shared Zod `^4.4.3`, without source/dependency patches, not the full official-root-helper closure. Broad frozen dependency installation is blocked by the configured mirror's HTTP 404 for `node-addon-require-builtin@0.1.6`, and candidate CI qualification has not executed. Keep these limits separate from live Desktop, published-artifact, OAuth and model-call compatibility; none is claimed.
506
+ For historical alpha.25, source markers, local rc.1-backed focused tests and fifteen scoped exact-source runtime tests passed (alpha.2 contracts 8, Remote 1 and Session-context 6). Full local `pnpm verify` passed: 1373 Vitest tests with 2 expected skips, 176 tooling tests, typechecks, build and package smoke; pack/tarball verification passed. The scoped tests used a supplemental resolver with official TypeScript `6.0.3`, declared `mime-types@3.0.2` and `ws@8.21.0`, and shared Zod `^4.4.3`, without source/dependency patches, not the full official-root-helper closure. That historical local mirror lacked `node-addon-require-builtin@0.1.6`; the observation is not the current CI status. Keep historical limits separate from live Desktop, published-artifact, OAuth and model-call compatibility.
275
507
 
276
508
  ## Code and documentation conventions
277
509
 
@@ -294,13 +526,45 @@ For alpha.25, source markers, local rc.1-backed focused tests and fifteen scoped
294
526
 
295
527
  ## Important-update release delivery
296
528
 
297
- - User-requested important updates include user-visible features, behavior fixes, compatibility fixes, and security or stability fixes. Their default delivery includes publication after a reviewed merge and green required CI; do not stop at a merged PR or ask a second time whether to release.
298
- - Explicit user restrictions such as code-only, review-only or do-not-release take precedence. Pure documentation and internal-only changes are not automatically release-bearing; they need an explicit release request if publication is desired. A task plan is not permission for an unrelated release.
529
+ - User-requested important plugin updates include user-visible features, behavior fixes, compatibility fixes, and security or stability fixes for plugin consumers. Their default delivery includes publication after a reviewed merge and green required CI; do not stop at a merged PR or ask a second time whether to release. Repository engineering features are not plugin features merely because they improve the project.
530
+ - Explicit user restrictions such as code-only, review-only or do-not-release take precedence. Pure documentation and internal-only changes are not automatically release-bearing; distributing them as plugin artifacts requires an explicit request for that artifact, not a generic delivery instruction. A task plan is not permission for an unrelated release.
299
531
  - Plan version alignment with the implementation PR whenever possible. If the prepared version/tag is unused and aligned, release it; otherwise prepare the next appropriate SemVer version through the normal PR path. Preserve the prerelease channel unless promotion is explicitly requested. Any additional version PR follows the same required review/CI and branch protection, without a separate merge-approval prompt.
300
532
  - Check all required CI, tag rules and package/archive checks. Create a fresh annotated tag only on the verified merged revision, let the protected Release workflow publish, and verify the non-draft Release, intended prerelease flag, tag/commit, assets and SHA-256. Never bypass failing CI, move a tag or substitute an unverified local archive.
301
533
  - A release-bearing update is not fully delivered until the published Release URL, verified version/commit/assets/checksum and npm version/SRI are reported. If CI, permissions or network prevents either channel, report partial delivery and the exact pending step; never describe merged-only or GitHub-only work as fully delivered.
302
534
  - This standing release authorization does not authorize profile installation, sign-out, worktree checkout or interruption of running Sessions. Keep published, installed-on-disk and loaded-runtime status separate; a session-interrupting restart still requires explicit acknowledgement.
303
535
 
536
+ ### Classify delivery before packaging (#502)
537
+
538
+ Choose the task's consumer impact before editing versions, installation URLs or
539
+ package contents. Record the classification and concrete rationale in the PR's
540
+ `Release delivery` section:
541
+
542
+ | Classification | Completion and artifact boundary |
543
+ | --- | --- |
544
+ | `repository-only` | Agent guidance, CI, tests, documentation governance and unshipped development tools complete at reviewed merge and green required CI. Keep the plugin version and package whitelist unchanged; no plugin release or local upgrade is needed. |
545
+ | `plugin-update` | An actual plugin runtime, compatibility or release-significant consumer-package change follows the important-update release gates above. A version/baseline/whitelist edit alone is not evidence of such a change. |
546
+ | `explicit-plugin-artifact` | An explicit request to distribute an engineering artifact as a plugin package may authorize that separate delivery. Record the actual artifact-specific request under `Authorization`; generic "deliver/publish" instructions or release-status questions are not that authorization. A version-only follow-through PR may instead cite the already reviewed and authorized plugin update; it needs no second approval. |
547
+ | `release-recovery` | Repair publication infrastructure or reconcile an already authorized version without a new version or changed consumer payload. Verify that existing release's outcome; do not describe reconciliation as a new plugin upgrade. |
548
+
549
+ Never add repository tools, fixtures or guides to `package.json.files`, or bump a
550
+ version, merely to make an engineering task releasable. If an intended change
551
+ touches an already shipped executable or other release-significant file, preserve the existing release-policy gate:
552
+ separate/defer that artifact change or establish its real consumer release scope,
553
+ never relabel it repository-only to bypass the gate. Preserve historical releases,
554
+ tags and package contents; this rule does not authorize unpublishing or repacking.
555
+ Documentation-only source edits, including packaged guides, may wait for the next
556
+ independently justified version without changing any already published bytes.
557
+
558
+ The existing PR `documentation-impact` check also checks this declaration against
559
+ the actual base/head manifests and important-file diff. It rejects repository-only
560
+ package changes and metadata-only manufactured plugin updates, and requires a
561
+ reviewable artifact-specific authorization statement for the explicit exception.
562
+ These are consistency checks, not proof of semantic impact or user consent; an
563
+ agent or human must review the rationale and actual request without adding a new
564
+ human-only approval gate. Report repository delivery, plugin publication,
565
+ installed-on-disk and loaded-runtime status separately. No runtime benefit means
566
+ no recommendation to install or restart merely because a new package exists.
567
+
304
568
  ## Installation-agent PowerShell practice
305
569
 
306
570
  Installation agents using the DSH `pwsh` tool must follow these rules:
@@ -317,10 +581,90 @@ Desktop plugin upgrades do not necessarily reconcile profile-local copies of Hos
317
581
 
318
582
  ## Mechanical verification
319
583
 
320
- Run from the repository root:
584
+ When a task explicitly requires post-upgrade Desktop/UI acceptance, use acceptance
585
+ contract/report schema 2 described in `docs/agent-acceptance.md`. Exact-head CI
586
+ and installed-on-disk evidence cannot replace live behavior or the public loaded
587
+ plugin version. Attempt safe authorized checks on an already-running Desktop;
588
+ unreliable local npm is not a reason to skip them. Use existing computer-use
589
+ tools, never shell activation or a repository script as an App controller.
590
+ Begin with current app discovery, not a historical "already open" claim. If not
591
+ running, start only with explicit launch authorization (including an applicable
592
+ restart/check approval retained under scoped autonomous execution) via controlled
593
+ `start_app` using the exact approved target; then verify discovery and fresh UI, not merely
594
+ the launch receipt. Do not start an already-running app again. A welcome screen
595
+ is not automatically an auth blocker: inspect an official safe skip first. DSH's
596
+ Add API Key -> Set up later path does not submit/store a key or authenticate;
597
+ use it only when actually exposed, within tool permission rules. Never infer
598
+ Copilot account invalidity from welcome UI or bypass real authentication/warnings.
599
+ Welcome dismissal may replace the window: rediscover app/window and read its fresh
600
+ tree before acting, rather than retrying a stale window on an empty immediate diff.
601
+ Honor tool-reported input interruption without inferring human intent: reread UI
602
+ before retrying the same permitted action.
603
+ Before handoff, freshly discover the current app and inspect the target panel or
604
+ workspace, reporting the observation time only; past success does not establish
605
+ current running state or guarantee the app remains running later.
606
+ An action receipt or empty immediate diff is not a navigation failure: obtain
607
+ a fresh post-action `get_window_state` observation first. Keep one attempt per
608
+ supported navigation method, at most two different methods. A tool-required
609
+ interruption recovery may retry that same method once after fresh observation;
610
+ it is not a new method or an unlimited retry exemption. Then report precise
611
+ `automation-blocked` and request the named panel once. User absence or an
612
+ unanswered request never grants permission or proves the panel opened.
613
+ App unavailable, restart/install, account/OAuth/paid actions outside explicit
614
+ permission stay blocked; first check whether the needed action is already covered
615
+ by scoped authorization. Do not repeat exhausted methods on ordinary continuation
616
+ or repeat an unchanged blocker message.
617
+ Record only fixed action/outcome codes, numeric times and version/source facts;
618
+ never upload identities, credentials or conversation content. Unknown loaded
619
+ version permits qualified observations only, not a version-specific fix claim.
620
+ For formal upgrade acceptance, prefer the published exact-version GitHub Release
621
+ asset canonical URL, never a local source directory, build, link or worktree.
622
+ A downloaded official tgz is a verified GitHub cache, not a local build; use it
623
+ only as a documented fallback when native URL delivery is unavailable/rejected.
624
+ Record exact source URL/version, archive and Release SHA-256, numeric observation
625
+ time and fixed fallback reason separately. Matching hashes do not grant install
626
+ or restart permission or prove the resulting runtime loaded. The consistency
627
+ checker never downloads/installs or independently authenticates this provenance.
628
+ Missing/not-run/blocked/error/timeout mandatory evidence cannot pass acceptance; even a
629
+ consistent complete report is not trusted proof of execution or automatic closure.
630
+ Keep required-check completeness separate from issue disposition. Controlled
631
+ regressions can exercise timers, never-resolving requests, late results and
632
+ simulated disconnects; production Desktop fault injection is different. Do not
633
+ disconnect networking, alter proxies/accounts or trigger paid requests to fill
634
+ coverage without specific permission. After a specific defect is fixed, relevant
635
+ controlled regressions/exact CI pass, release/install/load premises are met and
636
+ normal live checks do not reproduce it, explicit user risk acceptance may close
637
+ with "fixed/not reproduced; untested faults listed; reopen on recurrence".
638
+ Do not claim the original root cause or production fault coverage was proven.
639
+ Lack of safe/non-destructive production injection alone is not an indefinite
640
+ closure blocker. Known failures/reproduction, critical safety gaps and mandatory
641
+ requirements remain blockers; residual-risk disposition cannot relabel them
642
+ passed or authorize automatic issue closure.
643
+
644
+ For the opt-in task acceptance pilot, define observable requirements before
645
+ implementation and validate the clean candidate with
646
+ `node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
647
+ See [acceptance evidence](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md): exact commit/contract and
648
+ local file integrity are checked, not execution, environment truth, reviewer
649
+ independence or delivery permission. Keep reports outside Git and never upload
650
+ live diagnostics automatically. Failed, blocked and not-run requirements cannot
651
+ pass; new commits require new evidence. Existing review/CI/release gates remain
652
+ authoritative. This tooling does not activate agents or access live profiles.
653
+
654
+ Choose a bounded local auxiliary check or authoritative remote evidence explicitly
655
+ with `node scripts/agent.mjs guard --task TASK_ID --environment local-auxiliary
656
+ --operation scripts-test` or `--environment github-actions-evidence
657
+ --operation ci-evidence --head FULL_COMMIT_SHA`. The dependency-free scripts
658
+ tests are the only guarded local verification here. Do not run dependency
659
+ installation/recovery locally; full install, build, types, integration and
660
+ package verification use the existing GitHub Actions workflow. See
661
+ [environment and CI evidence guardrails](./docs/environment-evidence-guardrails.md).
662
+ The guard covers only operations invoked through this entry point and is not a
663
+ shell sandbox.
664
+
665
+ The full gate and package commands, run by the existing CI workflow, are:
321
666
 
322
667
  ```sh
323
- pnpm install --frozen-lockfile
324
668
  pnpm verify
325
669
  pnpm pack --pack-destination artifacts
326
670
  ```
@@ -329,9 +673,19 @@ Then run `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.
329
673
 
330
674
  `pnpm verify` checks the Agent contract, source and local test types, baseline markers, a clean build, Vitest tests, Node tooling tests, and real built Host import/Client-loader/Remote smoke. `tests/fixtures` are intentionally excluded from local test typecheck because they import source from a separate pinned Core checkout. The checked-in code must pass; never suppress compiler errors or weaken a test to get a green report.
331
675
 
332
- If the exact frozen install is blocked solely by an enterprise registry or network policy while the repository's GitHub Actions can obtain the unchanged pinned packages from an authorized official registry, record the attempted command and exact environmental failure as **local validation blocked**, not passed. A PR may proceed with that limitation disclosed; the complete required GitHub CI matrix, including its install, tests, build and package checks, is then the authoritative gate before merge. Never weaken or skip CI, substitute dependencies, bypass organizational restrictions, claim unrun local gates succeeded, or tag/release a revision whose required CI is not green. If CI has the same failure, resolve it through approved infrastructure rather than bypassing it.
676
+ If a historical/approved local installation attempt is blocked solely by an enterprise registry or network policy while GitHub Actions can obtain unchanged pinned packages from an authorized official registry, record it as **local validation blocked**, not passed. Do not repeat dependency recovery, switch sources, or expand permissions. A PR may proceed with that limitation disclosed; the complete required GitHub CI matrix, including install, tests, build and package checks, is authoritative before merge. Never weaken or skip CI, substitute dependencies, bypass organizational restrictions, claim unrun local gates succeeded, or tag/release a revision whose required CI is not green. If CI has the same failure, resolve it through approved infrastructure rather than bypassing it.
333
677
 
334
- The release CI matrix targets only exact official `0.2.1-rc.3` on Windows and Linux; earlier pins are not support gates. It runs the unchanged tagged-source runtime fixture, optional native Chat fixture, exact published-artifact adapter fixture and all 28 native reviewer regressions without skips. This is a required gate, not evidence that an unexecuted qualification passed. `verify:upstream` is static seam-marker evidence. `verify:controlled-core` exclusively installs a temporary config fixture, refuses an existing target, and removes only its own file; it is not full plugin activation. Published-artifact synthetic adapter fixtures do not prove live provider transport. The release job must wait for the complete reusable CI matrix on the tagged revision, then verify its own packed bytes before publishing.
678
+ The release CI matrix targets only the exact current Core on Windows and Linux;
679
+ earlier pins are not support gates. It runs the unchanged tagged-source runtime
680
+ fixture, optional native Chat fixture, exact published-artifact adapter fixture
681
+ and the reviewer regressions required by the current CI workflow without skips.
682
+ This is a required gate, not evidence that an unexecuted qualification passed.
683
+ `verify:upstream` is static seam-marker evidence. `verify:controlled-core`
684
+ exclusively installs a temporary config fixture, refuses an existing target,
685
+ and removes only its own file; it is not full plugin activation. Published-artifact
686
+ synthetic adapter fixtures do not prove live provider transport. The release job
687
+ must wait for the complete reusable CI matrix on the tagged revision, then
688
+ verify its own packed bytes before publishing.
335
689
 
336
690
  ### Evidence and side effects
337
691
 
@@ -350,8 +704,8 @@ The release CI matrix targets only exact official `0.2.1-rc.3` on Windows and Li
350
704
  | 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 |
351
705
  | 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 |
352
706
  | 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 |
353
- | 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. |
354
- | Host attach/restart | Reconciles the stored profile; search proofs stay lazy and do not start at attach |
707
+ | Historical routing screenshot | `copilot-search-routing.png` records a retired plugin-detail routing card with synthetic providers; it does not depict the current UI or prove live search or Desktop activation. |
708
+ | Host attach/restart | Does not repair or rewrite the stored native profile; search proofs stay lazy and do not start at attach |
355
709
  | 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 |
356
710
  | 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 |
357
711
  | Release install | Writes a named user profile; installed on disk is not loaded in the running Host |
@@ -360,6 +714,10 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
360
714
 
361
715
  ## Changing capabilities
362
716
 
717
+ The plugin-owned Auto and parent-follow implementations described in historical
718
+ paragraphs below are not mounted current behavior. Preserve retained data and
719
+ compatibility code, but do not reactivate their routing or UI.
720
+
363
721
  Auto routing, assessment, cost weights, continuity and assistance changes must
364
722
  first read and validate `docs/auto-iteration-review.json` using
365
723
  `scripts/iteration-review.mjs`. Follow `docs/evidence-driven-iteration.md`:
@@ -428,7 +786,7 @@ Retain native Host agent lookup/access checks and strict codecs. Failed reads
428
786
  must remain distinct from successfully read missing evidence; Retry reads the
429
787
  same turn only and never replays inference. See #249.
430
788
 
431
- Parent-model following uses the profile-wide `github-copilot.followParentModel` switch (default false), with a single control in the plugin-detail page (#234). Never require per-session enrollment for the ordinary experience. Preserve legacy `parentModelFollow` bindings independently, including when the broad switch is off. `src/parent-model-follow.ts` and the Auto Host integration use public projections and per-turn scoped routing, never descriptor/history/default writes. Child-owned explicit selections win; enabling authorizes replacement of creation-time route snapshots, not removal of later picker history. Only supported native spawn children and managed Copilot parents participate; roots, other providers, fork descriptors and historical dedicated policies remain native. Missing eligible parent evidence fails explicitly. Settings changes preserve admitted turns, and Client saves use one path-level CAS without credentials/discovery. See `docs/parent-model-follow.md` for requirements/mockup and `docs/automatic-model-routing.md` for exact-source evidence.
789
+ Historical parent-model following used the profile-wide `github-copilot.followParentModel` switch and a plugin-detail control (#234). That routing and control are retired; DSH owns current parent/child behavior. Preserve legacy `parentModelFollow` data without reactivating the plugin policy, mutating descriptors/history/defaults or silently migrating settings. See `docs/parent-model-follow.md` and `docs/automatic-model-routing.md` for historical evidence.
432
790
 
433
791
  Model preferences must survive the Client's owned-field projection before strict decoding. `excludedModelIds` is a hidden volatile Config leaf, read via `readInlineConfig`; exercise native SettingsForms CAS, fiber preservation and restart persistence, not only map-backed settings mocks. Missing preference settings leave model rows read-only with named diagnostics and status-only Retry. Unknown exclusion state is not an empty exclusion set. Discovery diagnostics stay in a separate Manage disclosure. Selected models are excludable without scanning Sessions/defaults; the legacy `lockedModelIds` wire leaf stays empty. Check exclusion at new-turn admission through public `agent/request`, preserving only the same Session/turn/model and exact native request signal for subsequent steps/retries. Clear admission on `turn/end`. Direct/unbound requests and new turns remain excluded; never rewrite selections/history or switch models silently. Account/token/metadata/cancellation guards remain independent and revocable.
434
792
 
@@ -440,7 +798,16 @@ Auto intent continuity (#293) uses the strict `githubCopilotAutoModelIntent` pub
440
798
 
441
799
  1. Identify the owning seam using `agent-contract.json`; do not duplicate an upstream owner.
442
800
  2. Add or update focused tests before changing deployment claims.
443
- 3. Update both READMEs when user behavior, setup, migration, or boundaries change.
801
+ 3. Review both READMEs and every affected domain document against source for
802
+ user behavior, setup, migration, limitations, and evidence changes. Update
803
+ both READMEs and the relevant `docs/*.md` in the same PR for user-facing
804
+ changes, beyond version-only edits. For unchanged behavior, explain why.
805
+ The PR `Documentation impact` declaration is checked against changed files
806
+ and rechecked when edited; it cannot judge semantic accuracy or relevance.
807
+ An agent or human reviewer must check those claims against source and retain
808
+ dated historical evidence. Record findings in the PR. This is not a new
809
+ human-only approval gate; agents may complete the review and proceed when
810
+ actual GitHub review/CI requirements and authorization boundaries are met.
444
811
  4. Update `deployment-baseline.json`, `agent-contract.json` and their verifiers when the corresponding contract changes.
445
812
  5. Build before package smoke; never hand-edit `lib/`.
446
813