dsh-github-copilot 0.1.0-alpha.2.dsh.0.2.1.alpha.5 → 0.1.0-alpha.2.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 (59) hide show
  1. package/AGENTS.md +190 -48
  2. package/CHANGELOG.md +54 -0
  3. package/CONTRIBUTING.md +18 -0
  4. package/README.md +113 -346
  5. package/README.zh.md +79 -313
  6. package/cordis.patch.yml +0 -13
  7. package/deployment-baseline.json +151 -269
  8. package/docs/agent-readiness.md +1 -1
  9. package/docs/auto-high-cost.md +4 -0
  10. package/docs/auto-review-sampling.md +6 -3
  11. package/docs/auto-task-routing.md +4 -0
  12. package/docs/automatic-model-routing.md +15 -6
  13. package/docs/copilot-accounts.md +10 -1
  14. package/docs/copilot-compaction.md +12 -1
  15. package/docs/copilot-usage.md +16 -4
  16. package/docs/dual-model.md +13 -8
  17. package/docs/image-input-compatibility.md +49 -2
  18. package/docs/model-compatibility-acceptance.md +97 -173
  19. package/docs/npm-distribution.md +11 -0
  20. package/docs/official-first-021-rc3.md +86 -0
  21. package/docs/plugin-diagnostics.md +16 -40
  22. package/docs/session-search-routing.md +4 -0
  23. package/docs/web-lifecycle-rc2.md +60 -55
  24. package/lib/client.js +2823 -1699
  25. package/lib/client.js.map +1 -1
  26. package/lib/{copilot-identity-DRZY_d2X.js → copilot-identity-BF8J8-9O.js} +1 -4
  27. package/lib/diagnostics-analysis.js +1 -1
  28. package/lib/{diagnostics-types-CF-qg8Do.js → diagnostics-types-eEWwFOFD.js} +2 -42
  29. package/lib/index.js +960 -4713
  30. package/lib/manual-compaction-recovery.js +2 -2
  31. package/lib/remote.js +16 -5
  32. package/lib/routed-web.js +17 -6
  33. package/lib/traditional-search-BZpWOTZA.js +80 -0
  34. package/lib/types/auto-model-presentation.d.ts +4 -0
  35. package/lib/types/client.d.ts +1 -3
  36. package/lib/types/compatibility.d.ts +5 -5
  37. package/lib/types/composer-notice-style.d.ts +2 -0
  38. package/lib/types/context-evidence.d.ts +4 -4
  39. package/lib/types/copilot-usage-host.d.ts +5 -0
  40. package/lib/types/copilot-usage-remote.d.ts +3 -0
  41. package/lib/types/copilot-usage-types.d.ts +1 -1
  42. package/lib/types/image-input-admission.d.ts +16 -1
  43. package/lib/types/index.d.ts +2 -15
  44. package/lib/types/model-preferences-card.d.ts +1 -1
  45. package/lib/types/preview-route.d.ts +2 -1
  46. package/lib/types/replay-failure-evidence.d.ts +34 -0
  47. package/lib/types/replay-recovery-types.d.ts +7 -0
  48. package/lib/types/replay-recovery-ui.d.ts +2 -1
  49. package/lib/types/request-body-evidence.d.ts +3 -0
  50. package/lib/types/responses-replay-compat.d.ts +21 -1
  51. package/lib/types/routed-web.d.ts +1 -1
  52. package/lib/types/session-continuation-ui.d.ts +1 -0
  53. package/lib/types/tool-schema-compat.d.ts +4 -14
  54. package/lib/types/turn-selection-card.d.ts +2 -1
  55. package/package.json +74 -72
  56. package/scripts/check-search-composition.mjs +15 -38
  57. package/lib/search-routing-CV2hs8as.js +0 -792
  58. package/lib/types/parent-model-follow-card.d.ts +0 -32
  59. package/output/auto-model-mockup/index.html +0 -207
package/AGENTS.md CHANGED
@@ -22,16 +22,74 @@ 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
30
  ## Product and architecture
31
31
 
32
- `dsh-github-copilot` currently admits and targets only official DSH `0.2.1-alpha.5`. Twelve earlier DSH pins remain in `deployment-baseline.json` as historical evidence, not current support or CI release gates. Alpha.5 Desktop artifacts/signatures are unverified; 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.
33
-
34
- This repository maintains twelve narrow surfaces and ownership boundaries:
32
+ ### Confirmed product scope (#455, #456)
33
+
34
+ The user-confirmed direction on 2026-11-14 supersedes conflicting legacy feature
35
+ requirements below: this plugin is a lightweight GitHub Copilot model integration
36
+ for DSH Desktop, not a second agent product. The qualification target is the exact
37
+ official DSH `0.2.2-rc.3` source and published package graph; it is a candidate,
38
+ not supported or delivered until the required CI gates pass.
39
+
40
+ DSH owns application login, AgentLoop, model selection, Auto, parent-model
41
+ following, subagents, tools, Web, permissions, history, context/compaction, and
42
+ Usage. The plugin owns only Copilot's native OAuth/credential integration,
43
+ account-proven model and capability discovery, published-adapter composition,
44
+ and narrowly evidenced Copilot compatibility. Do not add a DeepSeek login check,
45
+ read DeepSeek credentials, add another Copilot login or wire, or redirect failed
46
+ Copilot calls to another provider.
47
+
48
+ Parent/child relationships, inheritance, delegation, lifecycle and scheduling
49
+ follow DSH's native contract, not a plugin-defined policy. Subagent compatibility
50
+ means supplying models to that existing flow. Do not add a child-account
51
+ inheritance mode, parent lookup as credential authority, or plugin-owned child
52
+ routing. Verify authentication and request isolation through the same provider
53
+ contract used by ordinary native calls. A missing public seam is a concrete
54
+ compatibility limit to report, not permission to invent a parallel relationship.
55
+
56
+ Retire plugin-owned Auto and parent-follow policy/UI and custom hosted-search
57
+ execution/routing. Old conversation continuity is not an acceptance requirement.
58
+ Retain GitHub Copilot account quota and useful
59
+ enhancements; remove other functionality only when it is demonstrably redundant
60
+ or unnecessary, not merely because it extends the basic model route. Never delete
61
+ or rewrite user settings, accounts, or history, silently substitute a model, or
62
+ claim a native replacement until the
63
+ exact public API and behavior are verified. Preserve necessary Copilot
64
+ authentication, account/turn isolation, request correctness, and actionable
65
+ diagnostics. HydraFusion/Max are explicitly out of scope (#441).
66
+
67
+ Model-facing DSH capabilities added over time, including native subagent model
68
+ selection and actual child invocation (#456), are compatibility goals for
69
+ account-available Copilot models. Verify each against exact public Core APIs and
70
+ supplier-advertised capabilities with focused tests. Unknown metadata or
71
+ unsupported behavior must fail or diagnose explicitly; do not infer support,
72
+ add model-ID routing rules, patch Core, or claim untested parity.
73
+
74
+ When any later legacy detail in this guide conflicts with this confirmed scope,
75
+ follow this section and the current acceptance criteria in #455/#456.
76
+
77
+ The user clarified that the ordinary route should be DSH's native
78
+ `github-copilot` provider, with only useful plugin enhancements through public
79
+ APIs. Retire the separate managed route when native-route acceptance is met;
80
+ do not preserve it solely to continue old conversations or create a history
81
+ migration. Existing stored conversations, credentials and settings are not
82
+ authorized for deletion or rewriting. Explicitly document that old managed
83
+ route selections may become unavailable. Native model selection and actual
84
+ subagent invocation must be verified on `github-copilot`, not inferred from
85
+ managed-route tests. Record enhancements that cannot safely attach to native
86
+ APIs rather than patching Core or misrepresenting support.
87
+
88
+ The last qualified release line is official DSH `0.2.1-rc.3`; its source/artifact CI passed on Windows/Linux in run `40098031196`, while Desktop artifacts/signatures remain unverified. DSH `0.2.2-rc.3` is the current requested candidate and has not passed this repository's required CI. The previous thirteen pins remain historical evidence, not current support or release gates. Do not treat either prerelease as a production Core upgrade recommendation. DSH's built-in `llm-pi-ai` owns the canonical GitHub Copilot provider, OAuth, grant format, token exchange, refresh, and normal model transport.
89
+
90
+ The following is a historical architecture inventory, not a requirement to keep
91
+ every surface as a product feature; apply the confirmed scope above when deciding
92
+ which runtime registrations, UI, and settings remain active:
35
93
 
36
94
  1. A conditional authorization-service bootstrap plus Host controller that joins DSH authorization, credentials, and settings.
37
95
  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.
@@ -91,17 +149,23 @@ codes, never raw errors. Installation alone neither selects nor invokes recovery
91
149
  See `src/compaction-replay.ts` and `docs/manual-compaction-recovery.md` (#349).
92
150
 
93
151
  ## Approved multi-account ownership extension (#297)
94
-
95
- Login environments (#424) use only pinned native pi-ai OAuth for GitHub.com and
96
- validated single-label `tenant.ghe.com` Enterprise Cloud hosts. Preserve host
97
- binding through identity, duplicate checks, reauthorization and native refresh/
98
- 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
100
- global Fetch patch/second flow. GHES and Enterprise quota remain unsupported.
101
- See `src/copilot-login-environment.ts` and `docs/copilot-accounts.md`.
152
+
153
+ Login environments (#424) use only pinned native pi-ai OAuth for GitHub.com and
154
+ validated single-label `tenant.ghe.com` Enterprise Cloud hosts. Preserve host
155
+ binding through identity, duplicate checks, reauthorization and native refresh/
156
+ discovery/request auth. Plugin identity rejects redirects; native OAuth redirect
157
+ control is unavailable in pi-ai 1.1.0 and must not be claimed or emulated with a
158
+ global Fetch patch/second flow. GHES and Enterprise quota remain unsupported.
159
+ See `src/copilot-login-environment.ts` and `docs/copilot-accounts.md`.
102
160
 
103
161
  Identity presentation uses additive `ensureIdentity` Remotes, including explicit-Agent Session lookup. Keep `get` metadata-only; visible surfaces may ensure on their sixty-second cadence. Fresh ten-minute cache avoids requests, same-account consumers join a bounded flight, and failures cool down thirty seconds unless explicitly refreshed. Credential notifications revoke pending work even when token bytes are unchanged; no late cache publication. Quota may settle independently only with account-coherent metadata. Presentation cache never replaces fresh identity validation for switch, reauthorization or duplicate checks. Preserve strict sanitized diagnostics and Session/turn ownership (#309).
104
162
 
163
+ Models account-management/add controls apply a fifteen-second presentation
164
+ deadline only to metadata/identity reads (#346). A failed initial read offers
165
+ metadata-only Retry; late results and disposal cannot publish stale state.
166
+ Never apply this deadline to add/cancel/switch/reauthorize/remove mutations,
167
+ release their fences, cancel Host work or introduce an automatic retry.
168
+
105
169
  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).
106
170
 
107
171
  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.
@@ -151,6 +215,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
151
215
  - `src/serialize.ts`, `src/sse.ts`, `src/failure.ts`: protocol conversion and bounded error handling.
152
216
  - `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.
153
217
  - `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.
218
+ - 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.
154
219
  - `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.
155
220
  - `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.
156
221
  - `tests/`: unit and integration evidence; mirror the source area being changed.
@@ -159,26 +224,28 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
159
224
  - `lib/`: generated release output; never edit it.
160
225
 
161
226
  ## Non-negotiable invariants
162
-
163
- Auxiliary classifier disable proof accepts explicit supplier `off` or the
164
- selected protocol's native `none` (Responses/Completions) or `disabled`
165
- (Anthropic), scoped to the isolated classifier model only. Missing/empty effort
166
- metadata remains unproven. Strict ephemeral candidate counts record one fixed
167
- first-rejection reason per candidate and distinguish native off preparation
168
- failure; no candidate IDs, raw metadata, prompts or new persistent population.
169
- No-fit warnings contain fixed codes only. Legacy absent evidence stays unknown.
170
-
171
- Auxiliary context projection reserves current/nearest user text and, for exact
172
- continuations, a substantive anchor within twelve preceding user messages plus
173
- its user chain. Keep 12 rows/1600 characters per row/8000 serialized characters.
174
- Task text limitations, absent anchors and task nontext content block downshift;
175
- incidental history omissions alone do not. Retained text is not semantic
176
- completeness. Preserve genuine classifier unknown, off/no-tools/one-call
177
- behavior and native Chat input. Optional strict projection/returned-demand
178
- evidence is content-free and ephemeral, never a new persistent population.
227
+
228
+ Auxiliary classifier disable proof accepts explicit supplier `off` or the
229
+ selected protocol's native `none` (Responses/Completions) or `disabled`
230
+ (Anthropic), scoped to the isolated classifier model only. Missing/empty effort
231
+ metadata remains unproven. Strict ephemeral candidate counts record one fixed
232
+ first-rejection reason per candidate and distinguish native off preparation
233
+ failure; no candidate IDs, raw metadata, prompts or new persistent population.
234
+ No-fit warnings contain fixed codes only. Legacy absent evidence stays unknown.
235
+
236
+ Auxiliary context projection reserves current/nearest user text and, for exact
237
+ continuations, a substantive anchor within twelve preceding user messages plus
238
+ its user chain. Keep 12 rows/1600 characters per row/8000 serialized characters.
239
+ Task text limitations, absent anchors and task nontext content block downshift;
240
+ incidental history omissions alone do not. Retained text is not semantic
241
+ completeness. Preserve genuine classifier unknown, off/no-tools/one-call
242
+ behavior and native Chat input. Optional strict projection/returned-demand
243
+ evidence is content-free and ephemeral, never a new persistent population.
179
244
 
180
245
  - Explicit replay recovery (#279, #289) is default-off and bound to the initiating native request signal, Session, model and current account proof. Only exact verified scope failures capture bounded full-item fingerprints; no replay bytes reach Client or storage. Public Session running/error snapshots trigger read-only notices on open/settled turns, never polling or durable recovery events. Two-stage confirmation chooses next matching turn (all steps/retries until turn/end) or bounded Session consent, omitting matching old encrypted items and their item summaries only on outgoing requests, never durable history or new reasoning. Preserve get/setEnabled descriptor identities and legacy session-consent semantics; authorize is additive. Active-turn writes, ambient-scope calls and automatic retries are forbidden. Expiry, disposal and proof discontinuity revoke evidence. See `docs/model-compatibility-acceptance.md`.
181
246
 
247
+ - Cold-open scheduled recovery (#433) refolds only the latest native terminal scope-failure classification/sequence through a separate public projection. Exclude copied fork/child prefixes and clear on later turns. This preserves the explicit persistent continuation entry after request evidence expires or the picker changes; it does not reconstruct fingerprints, invalid items or account origin. Keep missing diagnostics unknown, loss disclosure and confirmed Settings CAS; never enable, resend or retry automatically.
248
+
182
249
  - Do not implement a second general wire adapter or independently maintained static Copilot model catalog. The account-scoped route composes the published adapter and SDK with validated supplier metadata.
183
250
  - Protocol and capability corrections must follow authenticated, current account metadata; new model IDs must not need new implementation tables. Native pi metadata may be reused only where it agrees with advertised endpoints and capabilities. Matching IDs alone do not prove correctness or authorize migration back into another Core catalog. Preserve old bounded ownership journals solely for verified restoration of legacy writes, never for new global protocol overrides.
184
251
  - Native Auto review compatibility must preserve Core's frozen request and strict fail-closed verdict ownership. Automatic reviewer-only omission uses the documented public `internal/get` service-read waterfall, exact Loader root ownership and independently imported official rc.2 `apply` callback equality through same-profile `PluginPackages.packageOf` facts. Clone before native `stream` delegation only for account-proven managed Responses. Recheck identity after await and revoke on disposal; aliases, descendants, impostors and unknown package identity remain native with bounded diagnostics. Never activate a second reviewer or use private caches/registries. Missing optional reviewer packages do not block plugin startup. Ordinary concurrent Chat stays unchanged. The separate legacy `github-copilot.responsesOmitTemperature` override defaults off and affects all managed Responses only when explicitly enabled; it is not the automatic reviewer policy or a capability claim. Never infer support from thinking metadata, match reviewer prompts/models/errors, intercept canonical routes, retry/resend, migrate settings, rewrite verdicts or change permissions. See `docs/auto-review-sampling.md`.
@@ -240,8 +307,9 @@ The retained upstream baselines and current qualification target are:
240
307
  - Official tag `dsh-v0.2.0-rc.2`, commit `639ed015397290b3745d163aafe02ffee4aa3f84`; the signed installed Windows Desktop descriptor identifies the rc.2 shared peer graph.
241
308
  - Official tag `dsh-v0.2.1-alpha.4`, commit `86a402200d95fecef4529d969836f1fe13c6cb0d`; historical alpha.16 source/npm qualification only.
242
309
  - Official tag `dsh-v0.2.1-alpha.5`, commit `1517a4dbca0a2789ff1d41ba439600f8547d23fa`; exact source/npm qualification is separate from unverified candidate Desktop artifacts/signatures.
310
+ - 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.
243
311
 
244
- The release admission, development dependency and CI targets are exact official `0.2.1-alpha.5`; the other twelve 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-alpha.2`, schemastery `3.18.5-alpha.2` 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. Historical signed Desktop evidence is not alpha.5 package/signature acceptance. Neither source nor synthetic tests prove live endpoints, plugin activation, publication or loaded runtime state. See [the official-first review](./docs/official-first-021-alpha5.md); this update does not authorize Core implementation rewrites or experimental durable records.
312
+ 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.
245
313
 
246
314
  These pins document compatibility evidence. They do not authorize creating another controlled Core patch or making one a prerequisite for new plugin fixes.
247
315
 
@@ -307,10 +375,84 @@ Desktop plugin upgrades do not necessarily reconcile profile-local copies of Hos
307
375
 
308
376
  ## Mechanical verification
309
377
 
310
- Run from the repository root:
378
+ When a task explicitly requires post-upgrade Desktop/UI acceptance, use acceptance
379
+ contract/report schema 2 described in `docs/agent-acceptance.md`. Exact-head CI
380
+ and installed-on-disk evidence cannot replace live behavior or the public loaded
381
+ plugin version. Attempt safe authorized checks on an already-running Desktop;
382
+ unreliable local npm is not a reason to skip them. Use existing computer-use
383
+ tools, never shell activation or a repository script as an App controller.
384
+ Begin with current app discovery, not a historical "already open" claim. If not
385
+ running, start only with explicit launch authorization via controlled `start_app`
386
+ using the exact approved target; then verify discovery and fresh UI, not merely
387
+ the launch receipt. Do not start an already-running app again. A welcome screen
388
+ is not automatically an auth blocker: inspect an official safe skip first. DSH's
389
+ Add API Key -> Set up later path does not submit/store a key or authenticate;
390
+ use it only when actually exposed, within tool permission rules. Never infer
391
+ Copilot account invalidity from welcome UI or bypass real authentication/warnings.
392
+ Welcome dismissal may replace the window: rediscover app/window and read its fresh
393
+ tree before acting, rather than retrying a stale window on an empty immediate diff.
394
+ Honor user-input interruption: reread UI before retrying the same permitted action.
395
+ Before handoff, freshly discover the current app and inspect the target panel or
396
+ workspace, reporting the observation time only; past success does not establish
397
+ current running state or guarantee the app remains running later.
398
+ An action receipt or empty immediate diff is not a navigation failure: obtain
399
+ a fresh post-action `get_window_state` observation first. Keep one attempt per
400
+ supported navigation method, at most two different methods, then report precise
401
+ `automation-blocked` and request the named panel once. User absence or an
402
+ unanswered request never grants permission or proves the panel opened.
403
+ App unavailable, restart/install, account/OAuth/paid actions outside explicit
404
+ permission stay blocked. Do not repeat exhausted methods on ordinary continuation.
405
+ Record only fixed action/outcome codes, numeric times and version/source facts;
406
+ never upload identities, credentials or conversation content. Unknown loaded
407
+ version permits qualified observations only, not a version-specific fix claim.
408
+ For formal upgrade acceptance, prefer the published exact-version GitHub Release
409
+ asset canonical URL, never a local source directory, build, link or worktree.
410
+ A downloaded official tgz is a verified GitHub cache, not a local build; use it
411
+ only as a documented fallback when native URL delivery is unavailable/rejected.
412
+ Record exact source URL/version, archive and Release SHA-256, numeric observation
413
+ time and fixed fallback reason separately. Matching hashes do not grant install
414
+ or restart permission or prove the resulting runtime loaded. The consistency
415
+ checker never downloads/installs or independently authenticates this provenance.
416
+ Missing/not-run/blocked/error/timeout mandatory evidence cannot pass acceptance; even a
417
+ consistent complete report is not trusted proof of execution or automatic closure.
418
+ Keep required-check completeness separate from issue disposition. Controlled
419
+ regressions can exercise timers, never-resolving requests, late results and
420
+ simulated disconnects; production Desktop fault injection is different. Do not
421
+ disconnect networking, alter proxies/accounts or trigger paid requests to fill
422
+ coverage without specific permission. After a specific defect is fixed, relevant
423
+ controlled regressions/exact CI pass, release/install/load premises are met and
424
+ normal live checks do not reproduce it, explicit user risk acceptance may close
425
+ with "fixed/not reproduced; untested faults listed; reopen on recurrence".
426
+ Do not claim the original root cause or production fault coverage was proven.
427
+ Lack of safe/non-destructive production injection alone is not an indefinite
428
+ closure blocker. Known failures/reproduction, critical safety gaps and mandatory
429
+ requirements remain blockers; residual-risk disposition cannot relabel them
430
+ passed or authorize automatic issue closure.
431
+
432
+ For the opt-in task acceptance pilot, define observable requirements before
433
+ implementation and validate the clean candidate with
434
+ `node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
435
+ See [acceptance evidence](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md): exact commit/contract and
436
+ local file integrity are checked, not execution, environment truth, reviewer
437
+ independence or delivery permission. Keep reports outside Git and never upload
438
+ live diagnostics automatically. Failed, blocked and not-run requirements cannot
439
+ pass; new commits require new evidence. Existing review/CI/release gates remain
440
+ authoritative. This tooling does not activate agents or access live profiles.
441
+
442
+ Choose a bounded local auxiliary check or authoritative remote evidence explicitly
443
+ with `node scripts/agent.mjs guard --task TASK_ID --environment local-auxiliary
444
+ --operation scripts-test` or `--environment github-actions-evidence
445
+ --operation ci-evidence --head FULL_COMMIT_SHA`. The dependency-free scripts
446
+ tests are the only guarded local verification here. Do not run dependency
447
+ installation/recovery locally; full install, build, types, integration and
448
+ package verification use the existing GitHub Actions workflow. See
449
+ [environment and CI evidence guardrails](./docs/environment-evidence-guardrails.md).
450
+ The guard covers only operations invoked through this entry point and is not a
451
+ shell sandbox.
452
+
453
+ The full gate and package commands, run by the existing CI workflow, are:
311
454
 
312
455
  ```sh
313
- pnpm install --frozen-lockfile
314
456
  pnpm verify
315
457
  pnpm pack --pack-destination artifacts
316
458
  ```
@@ -319,9 +461,9 @@ Then run `pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.
319
461
 
320
462
  `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.
321
463
 
322
- 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.
464
+ 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.
323
465
 
324
- The release CI matrix targets only exact official `0.2.1-alpha.5` 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.
466
+ 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.
325
467
 
326
468
  ### Evidence and side effects
327
469
 
@@ -341,7 +483,7 @@ The release CI matrix targets only exact official `0.2.1-alpha.5` on Windows and
341
483
  | 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 |
342
484
  | 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 |
343
485
  | 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. |
344
- | Host attach/restart | Reconciles the stored profile; search proofs stay lazy and do not start at attach |
486
+ | Host attach/restart | Does not repair or rewrite the stored native profile; search proofs stay lazy and do not start at attach |
345
487
  | 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 |
346
488
  | 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 |
347
489
  | Release install | Writes a named user profile; installed on disk is not loaded in the running Host |
@@ -379,19 +521,19 @@ Completed-turn Usage diagnostics (#259) are read-only plugin conversation data a
379
521
  Auto task routing (#258) uses current `model_picker_category` facts, never model
380
522
  names, effort or context capacity as a quality category. Hard eligibility/input
381
523
  fit precede task/preference policy; unknown category and uncertain task evidence
382
- remain explicit. High-cost-v4 retains every eligible fitting model across
383
- categories with positive weight. Task/preference sets the favored target, not
384
- hard category exclusion. Per-model category factors are target 1, second 0.25,
385
- third 0.05, unknown 0.02 in the existing order, then multiplied by cost/recency.
386
- These are uncalibrated trial factors, not fixed category probability quotas;
387
- candidate populations affect shares. Ordinary weight 1 receives finite
388
- previous-model multiplier 1.5; marked base 0.2 decays to 0.02 only for the previous
389
- model. One-turn recency resets after a different model, not a hidden streak
390
- counter or task-failure inference. Preserve v1/v2/v3 historical codecs/cohorts and
391
- their original explanation. Fit is not task
392
- success; non-target draws are intentional opportunity, not absence/failure of
393
- target candidates. Never infer incapability or add task-failure escalation.
394
- Capture actual reasons once
524
+ remain explicit. High-cost-v4 retains every eligible fitting model across
525
+ categories with positive weight. Task/preference sets the favored target, not
526
+ hard category exclusion. Per-model category factors are target 1, second 0.25,
527
+ third 0.05, unknown 0.02 in the existing order, then multiplied by cost/recency.
528
+ These are uncalibrated trial factors, not fixed category probability quotas;
529
+ candidate populations affect shares. Ordinary weight 1 receives finite
530
+ previous-model multiplier 1.5; marked base 0.2 decays to 0.02 only for the previous
531
+ model. One-turn recency resets after a different model, not a hidden streak
532
+ counter or task-failure inference. Preserve v1/v2/v3 historical codecs/cohorts and
533
+ their original explanation. Fit is not task
534
+ success; non-target draws are intentional opportunity, not absence/failure of
535
+ target candidates. Never infer incapability or add task-failure escalation.
536
+ Capture actual reasons once
395
537
  per turn without durable decision events or changing Usage.
396
538
  `autoSemanticAssessment` is default-on by explicit user rollout request (#267),
397
539
  only for locally unknown demand; preserve explicit false opt-out. One bounded concrete
package/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.2.dsh.0.2.2.rc.3 (prepared)
4
+
5
+ - Explain the native provider's canonical OAuth binding and the existing additional-account coexistence limit, while retaining the visible account panel outside the native Add draft (#458).
6
+ - Bind native-route quota to the canonical OAuth record rather than the plugin-selected account, and show an explicit unavailable state when native credential or endpoint attribution cannot be proven.
7
+ - Keep native quota and context-incident diagnostics available without optional managed-route Remotes, and stop automatically modifying native provider settings at startup or sign-in.
8
+ - Exercise native Copilot subagent selection and synthetic concurrent requests with the plugin absent, enabled and disposed.
9
+ - The native route still uses its own catalog; account-discovered models apply to `github-copilot-preview`. Copilot-hosted search, native Auto-review sampling compatibility and native per-Session multi-account routing remain incomplete.
10
+ - Live OAuth, provider calls, billing attribution and Desktop activation remain unverified.
11
+
12
+ ## 0.1.0-alpha.1.dsh.0.2.2.rc.3 (prepared)
13
+
14
+ - Begin narrowing the product to account-authorized Copilot models through DSH's published native adapter. Plugin-owned Auto and parent-follow routing and hosted-search composition are retired in the candidate; preserve account quota and review other enhancements before removing only demonstrably unnecessary functionality.
15
+ - Hide inactive Auto and parent-follow settings and remove the obsolete Auto high-cost marking control without changing saved preferences; retain legacy settings and Remote for compatibility.
16
+ - Preserve historical account, model and incomplete-Usage evidence separately from retired Auto selection UI; never reconstruct account history or replace native Usage.
17
+ - Label retired Auto and parent-follow documentation as historical and omit the obsolete Auto UI mockup from the package.
18
+ - Require account-metadata-driven native subagent model selection and actual child invocation, including supported Thinking and concurrent/account-bound request checks; synthetic exact-source fixtures passed on Windows and Linux, but do not establish live supplier or Desktop behavior.
19
+ - Target DSH ownership of parent/child relationships, inheritance and scheduling; legacy dedicated-role orchestration still requires safe retirement.
20
+ - Remove HydraFusion/Max from scope. No additional login, Core changes, model-name routing rules, silent provider substitution, publication, profile installation, or Desktop restart is included.
21
+ - Target official DSH 0.2.2-rc.3. Required Windows/Linux CI, pnpm-lock alignment, publication, profile installation, and loaded-runtime compatibility remain unverified.
22
+
23
+ ## 0.1.0-alpha.5.dsh.0.2.1.rc.3 (prepared)
24
+
25
+ - Replace the stale rc.2 Desktop lifecycle heading with version-neutral guidance. Recommend a full exit and restart only when the native plugin manager reports `restart-required`; do not repeatedly toggle an Off plugin when the manager reports only pending service dependencies.
26
+ - Keep historical rc.2 Desktop observations distinct from current rc.3 synthetic Loader evidence, and synchronize the English/Chinese README and user-visible copy regressions (#453).
27
+ - Prepare same-Core alpha.5 metadata only. The rc.3 release mapping remains pending; no tag, GitHub Release, npm publication, profile installation or Desktop restart is included.
28
+
29
+ ## 0.1.0-alpha.4.dsh.0.2.1.rc.3 (prepared)
30
+
31
+ - Carry forward bounded Responses replay refusal diagnostics from retired draft #218 under #446: fixed reasons, zero-based input positions, allowlisted type/status and field-presence booleans through the existing native `INVALID_REQUEST` surface. No IDs, summaries, tool data, unknown values or encrypted bytes enter diagnostics.
32
+ - Exercise current pinned pi-ai 1.1.0 synthetic two-turn summary-only rejection and terminal encryption backfill, preserving original history, exact opaque bytes and `call_id` pairing. Retain existing replay acceptance, account isolation, consent and cancellation ownership; no new retry, history deletion or model switch.
33
+ - Prepare the next same-Core candidate metadata for required PR validation only. No tag, merge, publication, profile installation, restart or live model call is authorized.
34
+
35
+ ## 0.1.0-alpha.3.dsh.0.2.1.rc.3 (prepared)
36
+
37
+ - Explain projected-image admission failures through the standard native error path with bounded model, projected/allowed MIME, projected role/position and current build details (#426). Retain the existing fail-closed gate, explicit account restrictions and native projection ownership.
38
+ - Explain why historical images can block text-only continuations and offer explicit future-turn recovery choices. No automatic model switch, retry, image conversion/removal, history mutation or new diagnostic collector.
39
+ - Auto still checks general vision capability before candidate-specific projection is available. This change does not establish the original incident's model, image format, trigger block or loaded version, and does not claim live recovery. PR-only preparation does not authorize merge, publication, installation or restart.
40
+
41
+ ## 0.1.0-alpha.2.dsh.0.2.1.rc.3 (prepared)
42
+
43
+ - Bound account-management metadata and identity reads to fifteen seconds, provide metadata-only Retry after initial failure, and discard late results (#346). Account mutations retain their original locks and settlement; no Host cancellation or automatic retry.
44
+ - Align recovery and context notices with native composer side clearance on narrow and embedded layouts, avoid double-constraining nested disclosures, and distinguish primary Enable from quiet Cancel (#317). Explicit loss consent and native history/compaction ownership remain unchanged.
45
+ - Add validated model/protocol, UTC header-observation time and strictly formatted supplier request IDs to verified 408 diagnostics (#276). Recommend image-offload changes only when recognized image bytes are present. No transport, retry, timeout, account or stored-diagnostic changes; production timeout cause/frequency remains unproven.
46
+ - Retain exact DSH 0.2.1-rc.3 admission and the documented native hot-readd limitation. No Core changes, profile installation, sign-in, paid model probes or restart.
47
+
48
+ ## 0.1.0-alpha.1.dsh.0.2.1.rc.3 (prepared)
49
+
50
+ - Target exact official DSH 0.2.1-rc.3 at `1f81c047fc48fa190a683e469daa699857e9afe8` (#432, #435). Align engines, public peers, exact reviewer ownership and Windows/Linux tagged-source and published-artifact qualification without Core changes.
51
+ - Adapt the plugin-owned search runtime to the public rc.3 `WebRuntime` Volatile-provider contract. Preserve native provider, account, transport, retry and configuration ownership.
52
+ - Retain cold-open scheduled replay-scope failure evidence for the explicit continuation policy control (#433). Missing ephemeral fingerprints remain unknown; no automatic enable, retry, account fallback or stored-history mutation.
53
+ - Parse concatenated Zstandard frames independently in the offline history maintenance tool, retaining bounded structural checks, source hashes and detached-copy-only output. No live history repair is performed.
54
+ - Restore this exact source-bound release-notes section and test the tracked package/changelog preflight before publication (#436). Immutable tags/releases, OIDC publication and identical GitHub/npm archive verification remain unchanged.
55
+ - DSH rc.3 is a prerelease, not a production upgrade recommendation. Desktop artifacts/signatures, live activation, OAuth and model/search calls remain unverified; publication does not authorize profile installation, migration or restart. Rc.2 hosts must retain their existing compatible plugin.
56
+
3
57
  ## 0.1.0-alpha.2.dsh.0.2.1.alpha.5 (prepared)
4
58
 
5
59
  - Add a login-environment choice for independently authorized GitHub.com and GitHub Enterprise Cloud data-residency (`tenant.ghe.com`) Copilot accounts through pinned pi-ai 1.1.0 (#424). Validate the tenant before login; bind device links, identity, duplicate checks and reauthorization to its host.
package/CONTRIBUTING.md CHANGED
@@ -33,6 +33,24 @@ Core inspection is read-only. Isolated tests may use unchanged pinned Core artif
33
33
 
34
34
  Generated `lib/` output, archives, `.env`, tokens, local credentials, machine state and production screenshots with real authorization codes must not be committed. Use synthetic fixtures for screenshots and report staged UI honestly.
35
35
 
36
+ The project disables pnpm's minimum package publication age. Newly published
37
+ dependencies can therefore be installed immediately; lockfile integrity and
38
+ the required CI and release checks still apply.
39
+
40
+ ## Task acceptance pilot
41
+
42
+ Define requirement IDs, expected behavior, verification methods and non-goals
43
+ before implementation. On the clean committed candidate, use
44
+ `node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
45
+ The [acceptance evidence guide](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md) defines the bounded
46
+ contract and report formats. Keep evidence outside Git, record exact commit and
47
+ contract/artifact hashes, and distinguish failed, blocked and not-run outcomes.
48
+ This verifies consistency only, not test execution, independent review or live
49
+ behavior; it never replaces required reviews or CI. Review artifacts before any
50
+ explicit sharing and do not upload raw live diagnostics. Subsequent commits need
51
+ fresh evidence. The current-Core PR-template target is mechanically checked
52
+ against package metadata without altering historical evidence.
53
+
36
54
  ## Release changes
37
55
 
38
56
  GitHub Releases and npm are the default distribution channels for every new version, superseding the Release-only decision in #43 at the user's request. The public package uses the exact same verified tarball in both channels. No automatic npm opt-out is allowed. See [npm distribution](./docs/npm-distribution.md) for initial maintainer bootstrap, OIDC, retry recovery and organizational access requirements.