dsh-github-copilot 0.1.0-alpha.1.dsh.0.2.1.alpha.5

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 (209) hide show
  1. package/AGENTS.md +439 -0
  2. package/CHANGELOG.md +875 -0
  3. package/CONTRIBUTING.md +55 -0
  4. package/LICENSE +21 -0
  5. package/README.md +366 -0
  6. package/README.zh.md +341 -0
  7. package/SECURITY.md +29 -0
  8. package/cordis.patch.yml +16 -0
  9. package/deployment-baseline.json +1580 -0
  10. package/docs/account-management-experience.md +143 -0
  11. package/docs/agent-readiness.md +110 -0
  12. package/docs/auto-high-cost.md +255 -0
  13. package/docs/auto-iteration-review.json +22 -0
  14. package/docs/auto-review-sampling.md +60 -0
  15. package/docs/auto-task-routing.md +341 -0
  16. package/docs/automatic-model-routing.md +236 -0
  17. package/docs/copilot-accounts.md +424 -0
  18. package/docs/copilot-compaction.md +148 -0
  19. package/docs/copilot-usage.md +133 -0
  20. package/docs/dual-model.md +66 -0
  21. package/docs/evidence-driven-iteration.md +86 -0
  22. package/docs/image-input-compatibility.md +64 -0
  23. package/docs/images/copilot-accounts-credits.png +0 -0
  24. package/docs/images/copilot-accounts.png +0 -0
  25. package/docs/images/copilot-current-provenance.json +39 -0
  26. package/docs/images/copilot-model-preferences.png +0 -0
  27. package/docs/images/copilot-search-routing.png +0 -0
  28. package/docs/images/copilot-session-continuation.png +0 -0
  29. package/docs/images/dual-model-desktop.png +0 -0
  30. package/docs/images/dual-model-mobile.png +0 -0
  31. package/docs/images/dual-model-provenance.json +35 -0
  32. package/docs/images/parent-model-follow.png +0 -0
  33. package/docs/manual-compaction-recovery.md +109 -0
  34. package/docs/mockups/copilot-account-dropdown.html +71 -0
  35. package/docs/mockups/copilot-account-management.html +393 -0
  36. package/docs/model-compatibility-acceptance.md +182 -0
  37. package/docs/npm-distribution.md +202 -0
  38. package/docs/official-first-016-alpha2.md +66 -0
  39. package/docs/official-first-020-rc1.md +32 -0
  40. package/docs/official-first-020-rc2.md +17 -0
  41. package/docs/official-first-021-alpha4.md +157 -0
  42. package/docs/official-first-021-alpha5.md +83 -0
  43. package/docs/plugin-diagnostics.md +605 -0
  44. package/docs/session-continuation.md +141 -0
  45. package/docs/session-search-routing.md +133 -0
  46. package/docs/single-route-migration.md +131 -0
  47. package/docs/web-lifecycle-rc2.md +55 -0
  48. package/lib/client.js +13236 -0
  49. package/lib/client.js.map +1 -0
  50. package/lib/copilot-identity-DRZY_d2X.js +15 -0
  51. package/lib/diagnostics-analysis-io.js +78 -0
  52. package/lib/diagnostics-analysis.js +427 -0
  53. package/lib/diagnostics-types-CF-qg8Do.js +708 -0
  54. package/lib/index.js +15661 -0
  55. package/lib/manual-compaction-recovery.js +485 -0
  56. package/lib/remote.js +1507 -0
  57. package/lib/request-budget-DLY_aRq0.js +87 -0
  58. package/lib/routed-web.js +120 -0
  59. package/lib/search-routing-CV2hs8as.js +792 -0
  60. package/lib/types/account-dropdown.d.ts +22 -0
  61. package/lib/types/account-model-auth.d.ts +15 -0
  62. package/lib/types/account-model-catalog.d.ts +70 -0
  63. package/lib/types/account-model-source.d.ts +85 -0
  64. package/lib/types/agent-compaction.d.ts +4 -0
  65. package/lib/types/authorization-code-clipboard.d.ts +4 -0
  66. package/lib/types/authorization-controller.d.ts +121 -0
  67. package/lib/types/auto-allocation-card.d.ts +9 -0
  68. package/lib/types/auto-allocation-diagnostics.d.ts +126 -0
  69. package/lib/types/auto-allocation-evidence.d.ts +44 -0
  70. package/lib/types/auto-allocation.d.ts +47 -0
  71. package/lib/types/auto-assessment-evidence.d.ts +111 -0
  72. package/lib/types/auto-model-host.d.ts +30 -0
  73. package/lib/types/auto-model-intent.d.ts +36 -0
  74. package/lib/types/auto-model-presentation.d.ts +57 -0
  75. package/lib/types/auto-model-routing.d.ts +64 -0
  76. package/lib/types/auto-review-sampling.d.ts +6 -0
  77. package/lib/types/auto-selection-explanation.d.ts +9 -0
  78. package/lib/types/auto-task-assessment.d.ts +49 -0
  79. package/lib/types/auto-task-classifier.d.ts +10 -0
  80. package/lib/types/background-compaction.d.ts +30 -0
  81. package/lib/types/client.d.ts +129 -0
  82. package/lib/types/compact-account.d.ts +42 -0
  83. package/lib/types/compaction-continuation-ui.d.ts +29 -0
  84. package/lib/types/compaction-continuation.d.ts +48 -0
  85. package/lib/types/compaction-input-estimate.d.ts +28 -0
  86. package/lib/types/compaction-pressure.d.ts +23 -0
  87. package/lib/types/compaction-replay.d.ts +18 -0
  88. package/lib/types/compatibility.d.ts +17 -0
  89. package/lib/types/composer-notice-style.d.ts +7 -0
  90. package/lib/types/config.d.ts +141 -0
  91. package/lib/types/content-file.d.ts +10 -0
  92. package/lib/types/context-evidence-ui.d.ts +28 -0
  93. package/lib/types/context-evidence.d.ts +256 -0
  94. package/lib/types/context-usage.d.ts +4 -0
  95. package/lib/types/copilot-account-presentation.d.ts +7 -0
  96. package/lib/types/copilot-accounts-card.d.ts +43 -0
  97. package/lib/types/copilot-accounts-host.d.ts +93 -0
  98. package/lib/types/copilot-accounts-remote.d.ts +85 -0
  99. package/lib/types/copilot-accounts-types.d.ts +43 -0
  100. package/lib/types/copilot-auth.d.ts +31 -0
  101. package/lib/types/copilot-grant.d.ts +11 -0
  102. package/lib/types/copilot-identity.d.ts +11 -0
  103. package/lib/types/copilot-request.d.ts +11 -0
  104. package/lib/types/copilot-stream-liveness.d.ts +23 -0
  105. package/lib/types/copilot-usage-card.d.ts +51 -0
  106. package/lib/types/copilot-usage-host.d.ts +61 -0
  107. package/lib/types/copilot-usage-normalize.d.ts +9 -0
  108. package/lib/types/copilot-usage-remote.d.ts +63 -0
  109. package/lib/types/copilot-usage-types.d.ts +20 -0
  110. package/lib/types/copilot-usage-ui.d.ts +4 -0
  111. package/lib/types/current-provider.d.ts +59 -0
  112. package/lib/types/deepseek-search-fallback.d.ts +11 -0
  113. package/lib/types/diagnostics-analysis-io.d.ts +23 -0
  114. package/lib/types/diagnostics-analysis.d.ts +298 -0
  115. package/lib/types/diagnostics-card.d.ts +12 -0
  116. package/lib/types/diagnostics-client.d.ts +13 -0
  117. package/lib/types/diagnostics-collector.d.ts +50 -0
  118. package/lib/types/diagnostics-host.d.ts +183 -0
  119. package/lib/types/diagnostics-remote.d.ts +113 -0
  120. package/lib/types/diagnostics-types.d.ts +893 -0
  121. package/lib/types/dual-model-host.d.ts +119 -0
  122. package/lib/types/dual-model-remote.d.ts +63 -0
  123. package/lib/types/dual-model-types.d.ts +34 -0
  124. package/lib/types/external-link.d.ts +3 -0
  125. package/lib/types/failure.d.ts +38 -0
  126. package/lib/types/http.d.ts +48 -0
  127. package/lib/types/image-input-admission.d.ts +5 -0
  128. package/lib/types/index.d.ts +39 -0
  129. package/lib/types/manual-compaction-recovery.d.ts +67 -0
  130. package/lib/types/migration-status.d.ts +50 -0
  131. package/lib/types/model-exclusions.d.ts +15 -0
  132. package/lib/types/model-preferences-card.d.ts +9 -0
  133. package/lib/types/model-protocol.d.ts +31 -0
  134. package/lib/types/native-select-style.d.ts +4 -0
  135. package/lib/types/native-settings-style.d.ts +10 -0
  136. package/lib/types/parent-model-follow-card.d.ts +32 -0
  137. package/lib/types/parent-model-follow.d.ts +44 -0
  138. package/lib/types/pi-provider-bridge.d.ts +22 -0
  139. package/lib/types/plan.d.ts +148 -0
  140. package/lib/types/pre-step-pressure.d.ts +8 -0
  141. package/lib/types/preview-provider.d.ts +77 -0
  142. package/lib/types/preview-route.d.ts +76 -0
  143. package/lib/types/probe.d.ts +39 -0
  144. package/lib/types/remote-codec.d.ts +10 -0
  145. package/lib/types/remote.d.ts +202 -0
  146. package/lib/types/replay-recovery-host.d.ts +28 -0
  147. package/lib/types/replay-recovery-remote.d.ts +14 -0
  148. package/lib/types/replay-recovery-types.d.ts +24 -0
  149. package/lib/types/replay-recovery-ui.d.ts +28 -0
  150. package/lib/types/replay-recovery.d.ts +17 -0
  151. package/lib/types/request-body-composition.d.ts +17 -0
  152. package/lib/types/request-body-evidence.d.ts +37 -0
  153. package/lib/types/request-body-timeout-marker.d.ts +2 -0
  154. package/lib/types/request-body-timeout.d.ts +4 -0
  155. package/lib/types/request-budget.d.ts +58 -0
  156. package/lib/types/request-diagnostics.d.ts +278 -0
  157. package/lib/types/request-upload-evidence.d.ts +23 -0
  158. package/lib/types/response-error-body.d.ts +3 -0
  159. package/lib/types/responses-reasoning-text.d.ts +24 -0
  160. package/lib/types/responses-reasoning.d.ts +7 -0
  161. package/lib/types/responses-replay-compat.d.ts +31 -0
  162. package/lib/types/responses-request-compression.d.ts +33 -0
  163. package/lib/types/route-ownership.d.ts +70 -0
  164. package/lib/types/routed-web.d.ts +50 -0
  165. package/lib/types/search-backend.d.ts +16 -0
  166. package/lib/types/search-routing-host.d.ts +19 -0
  167. package/lib/types/search-routing-policy.d.ts +18 -0
  168. package/lib/types/search-routing-remote.d.ts +20 -0
  169. package/lib/types/search-routing.d.ts +43 -0
  170. package/lib/types/search-tool-routing.d.ts +22 -0
  171. package/lib/types/serialize.d.ts +106 -0
  172. package/lib/types/session-accounts-controller.d.ts +20 -0
  173. package/lib/types/session-accounts-host.d.ts +33 -0
  174. package/lib/types/session-accounts-remote.d.ts +114 -0
  175. package/lib/types/session-accounts.d.ts +38 -0
  176. package/lib/types/session-continuation-host.d.ts +45 -0
  177. package/lib/types/session-continuation-remote.d.ts +22 -0
  178. package/lib/types/session-continuation-types.d.ts +62 -0
  179. package/lib/types/session-continuation-ui.d.ts +49 -0
  180. package/lib/types/session-continuation.d.ts +14 -0
  181. package/lib/types/settings-reader.d.ts +16 -0
  182. package/lib/types/sse.d.ts +28 -0
  183. package/lib/types/temporary-models.d.ts +25 -0
  184. package/lib/types/tool-schema-compat.d.ts +17 -0
  185. package/lib/types/traditional-search.d.ts +17 -0
  186. package/lib/types/turn-model-provenance.d.ts +45 -0
  187. package/lib/types/turn-request-models.d.ts +55 -0
  188. package/lib/types/turn-selection-card.d.ts +24 -0
  189. package/lib/types/turn-selection-host.d.ts +35 -0
  190. package/lib/types/turn-selection-remote.d.ts +17 -0
  191. package/lib/types/turn-selection.d.ts +186 -0
  192. package/lib/types/turn-usage-evidence.d.ts +66 -0
  193. package/lib/types/turn-usage-notice.d.ts +7 -0
  194. package/lib/types/types.d.ts +69 -0
  195. package/lib/types/usage.d.ts +26 -0
  196. package/lib/types/watchdog.d.ts +22 -0
  197. package/lib/types/web-delegate.d.ts +12 -0
  198. package/lib/types/web-search-routing-card.d.ts +16 -0
  199. package/lib/types/web-search-routing-config.d.ts +12 -0
  200. package/lib/types/wire-anthropic.d.ts +37 -0
  201. package/lib/types/wire.d.ts +56 -0
  202. package/lib/web-delegate.js +9 -0
  203. package/output/auto-model-mockup/index.html +207 -0
  204. package/package.json +261 -0
  205. package/scripts/analyze-diagnostics.mjs +91 -0
  206. package/scripts/check-search-composition.mjs +191 -0
  207. package/scripts/iteration-review.mjs +53 -0
  208. package/scripts/release-policy.mjs +353 -0
  209. package/scripts/select-core-release.mjs +11 -0
@@ -0,0 +1,182 @@
1
+ # Copilot compatibility acceptance
2
+
3
+ This change is not complete when a GPT-6-only prototype works or a PR is merely opened. The requested result is a plugin-only, data-driven Copilot integration, including public reasoning summaries, followed by verified delivery and local upgrade.
4
+
5
+ ## Scope
6
+
7
+ Follow the [plugin-only boundary](../AGENTS.md#plugin-only-implementation-boundary). Reuse the published DSH/pi-ai adapter and OAuth interfaces. Do not modify Core, dependency artifacts, private registries, or shared upstream catalogs. A plugin-owned Copilot route may serve multiple account-advertised models; this is configuration and lifecycle integration, not another implementation of generic wire serialization.
8
+
9
+ ## Required behavior
10
+
11
+ 1. **Account-driven discovery.** Read the provider's model metadata with bounded requests and account-scoped cache lifetime. A new model with sufficient supported metadata must not require another model-ID patch or plugin release. A new model name alone is insufficient evidence of its protocol or capabilities.
12
+ 2. **Protocol selection from evidence.** Use advertised `supported_endpoints` for Responses, Chat Completions, or Anthropic Messages. Native pi catalog choices may be retained only when compatible with the advertised endpoints. Do not infer a protocol from a GPT, Gemini, Claude, or other name prefix. Missing or unsupported metadata produces an explicit diagnostic, not a guessed route.
13
+ 3. **Capabilities stay distinct.** Preserve context, input and output limits separately; do not invent large limits or unsupported reasoning levels. Respect disabled/unconfigured policy, picker eligibility and tool/stream support. Provider metadata does not authorize changing account policy.
14
+ 4. **One credential lifecycle.** All plugin-owned routes share the canonical Host-only Copilot OAuth record. Model discovery, refresh and in-flight requests remain bound to the same account generation. Account switches, entitlement removal, disposal and stale callbacks must fail closed without copying credentials or changing other providers.
15
+ 5. **Thinking is included.** Preserve public summary deltas and final-only summaries without duplicate text. Validate selected effort and keep native default semantics. Empty or encrypted-only responses must not become fabricated explanations. Native replay, images and file projection retain their owning adapter's behavior; opaque replay is not displayed or rewritten into raw reasoning text.
16
+ 6. **Current pi 0.87.1 compatibility.** The original acceptance target was 0.85.1; official DSH rc.2 now depends on `^0.87.1`. Pin and test the exact published SDK version, not just a GitHub release label. Its Copilot GPT-6 catalog protocol must not override contrary provider endpoint evidence. An updated catalog entry is not sufficient grounds to retire a correction if the protocol/capabilities are still wrong.
17
+ 7. **Do not infer temperature support from reasoning metadata.** No verified supplier contract establishes that `capabilities.supports.thinking` means temperature is unsupported or supported. Automatic reviewer-only omission requires authenticated exact official rc.2 root callback identity through the public service-read/Loader/profile package seams and account-proven managed Responses metadata. Clone before native delegation, preserve concurrent ordinary Chat and reject unqualified identity without broad fallback. Test actual Host startup/disposal and the unchanged native reviewer/LLM/adapter pipeline, with explicit nonzero/no-skip fixture collection. The independent `github-copilot.responsesOmitTemperature` override remains default false; explicit true affects all managed Responses. Preserve frozen options, cancellation, other protocols/providers and canonical ownership. Never use prompt/model/error matching, retry a rejection, rewrite a verdict or change permissions. See [the exact public proof and limitations](./auto-review-sampling.md); previously excluded fixture execution claims stay retracted.
18
+
19
+ ## Regression evidence
20
+
21
+ - Include GPT-6 Astra, Gemini 3.8 Flash and GPT-5.6 Sol Fast metadata fixtures, plus arbitrary unseen IDs on all three supported protocols. The unseen-ID cases must pass without adding those IDs to implementation tables.
22
+ - Cover missing/conflicting endpoints, missing/invalid limits, duplicate conflicting IDs, explicit denial, stale account snapshots, unsupported reasoning labels, unknown fields and hostile extra getters.
23
+ - Exercise real published adapter/SDK code against local synthetic HTTP for all supported protocols, including tools, public summaries, two-turn opaque replay, images and interruption/retry paths. Synthetic results are not claims of live account availability.
24
+ - The exact pinned rc.2 source trace must retain the reviewer's frozen `temperature: 0` request with no `purpose`/`sessionId`. Run that unchanged native reviewer through the managed route and real pi-ai serializer: default-off preserves temperature for thinking `true`, `false`, or absent; explicit opt-in omits it for each value without mutating caller input. Cover allow, deny, malformed verdict, HTTP error and cancellation with one wire attempt; only allow may execute the synthetic tool. Qualify the fixture against tagged source and exact published artifacts. Synthetic metadata proves no supplier temperature semantics.
25
+ - Verify managed request-body timeout guidance only for the observed HTTP `408`, exact `user_request_timeout` code and request-body message. Bound clone reads to 8 KiB/250 ms, retain the original native response, and expose only fixed guidance plus final string-body UTF-8 bytes. Preserve failure code, retry metadata, cancellation, unchanged retry payloads and independent dispatches. Do not reclassify 408 as overflow, invent a safe byte threshold, change client timeouts, refresh OAuth, compact automatically or promise elimination of upstream failures.
26
+ - Verify byte-aware managed HTTP/SSE liveness through unchanged published and tagged adapters: heartbeat bytes may cross the original semantic deadline before actual output, but endless heartbeat-only output must hit the bounded native deadline. Real header/body stalls retain the original interval and a dispatch-local TIMEOUT; consumer think time, caller/credential cancellation, exact bytes, parser ownership and one native wire attempt remain unchanged. Explicit WebSocket/auto and opt-out retain native-only behavior. Preserve the 20 MiB native image budget by default; explicit smaller budgets must use native offload and retain mapped read-only paths/history, never hidden trimming or a claimed supplier threshold. These synthetic cases do not attest production heartbeat activity or cure HTTP 408.
27
+ - Run source/test typechecks, complete repository tests, built Host/Client/Remote smoke, archive verification, and relevant unchanged-Core compatibility fixtures. Do not suppress type or test failures to bridge incompatible SDK versions.
28
+
29
+ ## Explicit public-interface limits
30
+
31
+ - The published Core model-info contract exposes combined context capacity, not a separate prompt-token budget. The managed route retains truthful capacities and adds provider-scoped estimated admission (`INPUT_LIMIT_ESTIMATED_GUARD`), with optional earlier local pressure using existing stock recovery. This is not exact provider token counting or native dual-limit metadata support. Preserve explicit summary output caps and resolved reasoning; unsupported low-effort controls are not guessed. Already oversized manual summaries still fail without silent trimming or chunking. See [compaction budgets and acceptance boundaries](./copilot-compaction.md); no Core patch or false contextWindow is permitted.
32
+ - Advertised reasoning labels that the native SDK cannot express must show `REASONING_EFFORTS_UNSUPPORTED` rather than being silently hidden or guessed. Such a warning need not disable ordinary model requests.
33
+ - The Core-facing adapter integration uses the public `streamSimple` path. Its advanced protocol-specific `stream` entry must reject explicitly rather than accepting incompatible client objects from another SDK version. The event-stream compatibility boundary must verify the full public surface at compile time and preserve the original stream object.
34
+ - Cached catalog entries do not authorize requests independently. A change in the current grant's model-permission list invalidates old proofs even when the token and account identity are unchanged; a new server-enabled model absent from the earlier grant list remains discoverable without rewriting the grant.
35
+ - A plugin-owned credential invalidation or disposal preserves its specific `ABORTED` diagnostic through the native stream boundary. Only the plugin's own abort reason identity authorizes that diagnostic; upstream text never does. This does not repair HTTP 408 request-body timeouts or transport termination, change retries/timeouts, or turn incomplete Responses output into success. SDK error events can contain initialized zero usage without a received measurement; the public usage object lacks a presence flag, so the plugin does not discard zeros or rewrite native context metering.
36
+
37
+ ## Delivery and local acceptance
38
+
39
+ - Open the plugin PR with tests, evidence limits, migrations and rollback. Merge only after required checks and review are satisfied; the user has explicitly included merge in this task's acceptance scope.
40
+ - Publish the aligned version through the protected Release workflow and verify the release/tag/commit/assets/checksum.
41
+ - Upgrade the user's actual local profile to that verified plugin artifact; do not infer the profile from a README example. Verify installed bytes and loaded runtime separately.
42
+ - The user has requested local upgrade. Explain any session-interrupting restart before doing it and obtain acknowledgement of that interruption. Do not install a modified Core as part of the upgrade.
43
+ - Report remaining limitations honestly, including unavailable provider metadata, unsupported protocols, optional summaries and any unperformed live checks.
44
+
45
+ ## Metadata references
46
+
47
+ - [Microsoft Copilot API types](https://github.com/microsoft/vscode/blob/main/src/typings/copilot-api.d.ts)
48
+ - [Endpoint-driven Copilot discovery implementation reference](https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/plugin/github-copilot/models.ts)
49
+ - [pi v0.85.1 release](https://github.com/earendil-works/pi/releases/tag/v0.85.1)
50
+ - [pi v0.87.1 release](https://github.com/earendil-works/pi/releases/tag/v0.87.1)
51
+
52
+ These references guide parsing and tests; they are not a guarantee that the upstream discovery schema will never change. Schema drift must be surfaced rather than silently guessed.
53
+
54
+ ## Authentication, replay and request diagnostics
55
+
56
+ These failures have different owners; do not repair every rejection by signing out.
57
+
58
+ | Diagnostic | Boundary and safe action |
59
+ |---|---|
60
+ | `COPILOT_AUTHORIZATION_BEGIN_FAILED` | Sign-in did not complete; interaction milestones are not a credential commit or root-cause proof |
61
+ | `COPILOT_ROUTE_REPAIR_FAILED` | Authentication is retained; review legacy configuration and use explicit repair |
62
+ | Native AUTH / HTTP 401 | Exact managed proof may be retired; a later explicit request/discovery can renew natively, not replay the failed message |
63
+ | `COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH` | Exact uncoded item-scope rejection is request-local INVALID_REQUEST, without invalidating shared proof/other requests |
64
+ | `COPILOT_RESPONSES_REPLAY_UNSUPPORTED` | Incomplete/reference-only historical payload lacks safe reconstruction evidence |
65
+ | `COPILOT_REQUEST_BODY_TIMEOUT` | Strict verified request-body 408; composition/timing is not proof of overflow or network cause |
66
+
67
+ HTTP auth recovery is bounded by account cooldown, including forced discovery.
68
+ An old late response cannot invalidate a newer sign-in. HTTP 403, network errors
69
+ and strings mentioning 401 are not auth evidence; malformed/ambiguous/oversized
70
+ bodies retain native handling. HTTP tests do not prove WebSocket recovery.
71
+
72
+ ### Responses replay compatibility
73
+
74
+ The public SDK payload hook normalizes only direct IDs on complete assistant
75
+ messages, function calls and encrypted reasoning items. A narrowly recognized
76
+ empty completed reasoning shell can be omitted from outgoing requests only with
77
+ empty summary/content, no encrypted content and no unknown fields. Durable
78
+ history, public summaries, opaque bytes, nested IDs, phase and `call_id` pairing
79
+ stay unchanged.
80
+
81
+ The source-checkout follow-up for #279 adds bounded structure evidence to an
82
+ exact verified scope rejection: total items, direct ID fields, reference items,
83
+ encrypted reasoning items, unrecognized items, `previous_response_id`/`store`
84
+ state and presence of the two native session/request headers. It observes the
85
+ final HTTP dispatch, not the earlier SDK payload before caller replacement.
86
+ Only fixed labels and counts enter the separate `dispatchEvidence` diagnostic
87
+ and Host warning; the main error stays concise and points to explicit recovery
88
+ or a new conversation. No IDs, header values, message text, arguments, results
89
+ or opaque bytes are retained. The shared
90
+ 16 MiB/depth/work diagnostic limits apply; unavailable evidence never becomes
91
+ zero counts. Historical errors are not rewritten; absence of captured evidence
92
+ is not zero counts.
93
+ Structure counts alone do not repair cross-turn scope rejection: zero direct
94
+ IDs does not prove encrypted replay is portable.
95
+
96
+ Switching from account A to B does not make old account/connection-bound
97
+ encrypted reasoning portable. An exact scope rejection is not proof that
98
+ sign-in failed or that a particular encrypted item was rejected. Recovery
99
+ is an explicitly authorized, lossy continuation, not a portability repair.
100
+ Starting a new conversation avoids replaying the old history.
101
+
102
+ ### Explicit session replay recovery
103
+
104
+ After an exact verified managed Responses scope rejection, **Replay recovery**
105
+ above that session's composer automatically offers the failed request's old
106
+ encrypted items on opening the eligible session, when its native `running`
107
+ snapshot settles, or when its `lastAgentError` changes while idle. These public
108
+ Session snapshot changes trigger read-only Host evidence reads, not model calls,
109
+ history reads, new durable events or polling. Normal sessions show no notice.
110
+ Dismissal is local to the mounted model/session and evidence revision; a new
111
+ failure can reappear. Read errors remain distinct from missing evidence.
112
+
113
+ Context evidence and recovery use the public full-width
114
+ `conversation.input.dock` with shared native secondary typography for body
115
+ text and controls. They stack above the composer rather than squeezing into
116
+ its non-wrapping statistics row. Native meters, statistics and parent DOM stay
117
+ unchanged; authorization itself still sends no message.
118
+
119
+ The normal Client offers one persistent Session policy. When off, the notice
120
+ explains the loss and offers **Enable visible-history continuation** or Cancel.
121
+ Enabling writes the same revision-checked Session policy used by account controls;
122
+ it persists across accounts/restarts until disabled, without an hourly consent.
123
+ When already on, show status and diagnostic guidance, not another authorization.
124
+ Use native Retry separately. Missing or failed policy reads have an explicit
125
+ diagnostic and Retry read, never a guessed off state or legacy authorization
126
+ fallback. No authorization duration radios or next-turn-only actions are shown.
127
+ Controls are disabled during a native turn.
128
+
129
+ The following temporary recovery mechanism and strict Remotes remain for
130
+ compatibility, not new normal UI authorization. Their one-hour evidence/proof
131
+ lifetime is not the lifetime of the persistent Session policy:
132
+
133
+ This is lossy recovery, not a supplier-scope repair. Only complete normalized
134
+ encrypted reasoning items whose entire serialized fingerprints match that
135
+ failed request are omitted from later outgoing requests in the same session
136
+ and model. Their hidden state **and their item summaries** are no longer sent;
137
+ displayed messages, tool calls/results and stored history are not modified.
138
+ New or changed reasoning items remain native-owned. Another scope failure
139
+ requires fresh confirmation rather than broadening enabled omission silently.
140
+
141
+ Evidence is bounded to 64 sessions, 512 distinct items per session, and one
142
+ hour in the current Host. Only hashes, a model label and confirmation metadata
143
+ are retained, never opaque payloads. The Client receives count/model/state,
144
+ an opaque revision, optional duration and evidence expiry only. The original
145
+ `get`/`setEnabled` descriptors retain their identities; `setEnabled(true)` still
146
+ means bounded session consent, and additive `authorize` selects a duration.
147
+ A one-shot expiry read updates the mounted notice, not a polling timer.
148
+ Token/account/metadata proof discontinuity, expiry,
149
+ session disposal or Host restart revokes evidence; an old error on disk cannot
150
+ create a candidate. Re-read status after these changes. Disabling affects
151
+ future requests and does not undo answers already generated.
152
+
153
+ Admission requires the initiating native Agent request signal and exact
154
+ session; unbound requests, compaction, titles, classifier requests, other
155
+ models and other sessions cannot borrow consent. Active-turn writes are
156
+ rejected. Public native Client/Host gateways enforce explicit Agent lookup;
157
+ no ambient Client session projection is added. No Core changes, credentials
158
+ reset, history rewrite, general wire adapter or automatic business retry is
159
+ introduced. This is not a remedy for HTTP 408, quota or context limits.
160
+
161
+ Two explicitly authorized real-history diagnostic calls reproduced HTTP 401
162
+ with 12 old encrypted items and returned HTTP 200 after omitting exactly those
163
+ items in a disposable request copy, preserving all 80 tool pairs. This
164
+ implicates the old item set, not any specific item, token rotation or backend
165
+ expiry rule. Sequential calls cannot freeze hidden supplier state. Synthetic
166
+ request-chain and native gateway tests qualify the opt-in mechanism; they do
167
+ not establish that every rejected history is recoverable or that an installed
168
+ runtime has enabled it.
169
+
170
+ After actual HTTP 408, a newly prepared attempt in the same native step can
171
+ reuse exact normalized payload only when transcript/every other field agree,
172
+ with matching references and no conflicts. Evidence is bound to Session/model/
173
+ account proof and original signal, expires in 60 seconds, is limited to 2 MiB
174
+ and clears on next step/turn, concurrency, cancellation or account discontinuity.
175
+ This creates no retry or cold-history reconstruction. Canonical/other routes,
176
+ protocols and native retry policy stay unchanged. Synthetic adapter tests are
177
+ not acceptance proof for an old conversation. Never discard opaque reasoning,
178
+ rewrite history, replay business work or reset credentials automatically.
179
+
180
+ For TLS/quota, see [trust boundaries](./copilot-usage.md#account-data-boundary).
181
+ For HTTP 408 and oversized summaries, see
182
+ [budget and recovery limits](./copilot-compaction.md#existing-oversized-history-and-recovery-limits).
@@ -0,0 +1,202 @@
1
+ # Distribution and installation
2
+
3
+ Every new version is distributed through an immutable GitHub Release and public
4
+ npm, using the **same original verified tarball**. Package bootstrap is complete;
5
+ subsequent publication uses the configured OIDC Trusted Publisher. Earlier
6
+ Release-only policy and one-time bootstrap tooling are historical.
7
+
8
+ ## Authorization and readiness
9
+
10
+ Use approved registry access and build environments.
11
+ A blocked corporate registry is not authorization to use a VPN, proxy, mirror,
12
+ personal device or CI as a bypass. Local synthetic registry tests do not prove
13
+ connectivity, publication rights or live Desktop compatibility.
14
+
15
+ Versions align package, deployment baseline, both README URLs and annotated tag.
16
+ Channel is `alpha`, `beta`, `rc` or stable `latest`; never silently rename a
17
+ package, move/reuse tags, repack immutable assets or publish placeholders.
18
+
19
+ ## Exact-Core release lines
20
+
21
+ Each exact DSH Core starts its own plugin sequence at
22
+ `0.1.0-alpha.1.dsh.<normalized-Core>`; fixes for that Core increment `alpha.N`.
23
+ Core `0.2.1-alpha.5` therefore starts at
24
+ `0.1.0-alpha.1.dsh.0.2.1.alpha.5`, not a new global plugin minor. This is
25
+ numbering only: implementation, Git history and reviewed compatibility evidence
26
+ continue. No old release/tag is renamed or reused.
27
+
28
+ `deployment-baseline.json.releaseLines` is the explicit selection map. It retains
29
+ published anchors Core `0.2.0-rc.2` → plugin `0.4.2-alpha.15` and Core
30
+ `0.2.1-alpha.4` → plugin `0.4.2-alpha.16`; the alpha.5 line is **pending**.
31
+ Run `node scripts/select-core-release.mjs <exact-Core>` in a current source
32
+ checkout or verified package. This read-only command looks up the mapped exact
33
+ GitHub Release and npm version; it verifies the non-draft release, prerelease
34
+ flag, named tarball/checksum assets and exact npm `engines.dsh` before returning
35
+ an npm spec and Release/archive URLs. A missing pending entry reports pending;
36
+ a Release without observable npm bytes reports incomplete; unknown Core
37
+ versions fail explicitly. Network/auth/invalid metadata errors stop without a
38
+ recommendation. This map is a reviewed snapshot, not an automatic updater hook.
39
+
40
+ Release validation checks the suffix against exact `engines.dsh`, baseline and
41
+ Core peer metadata. It permits a lower numeric plugin version only for a new
42
+ exact-Core line starting at alpha.1 with the previous published anchor retained;
43
+ same-Core downgrades remain forbidden. Historical releases without a suffix stay
44
+ valid historical anchors, not guessed current compatibility.
45
+
46
+ The shared npm `alpha` pointer is chronological distribution state, **not**
47
+ compatibility-aware selection, and can move to a lower SemVer for an explicitly
48
+ mapped independent Core line. Never install from global `latest`/`alpha` or
49
+ choose the global maximum without checking the exact-Core mapping. No new npm
50
+ channels or old-Core maintenance commitment is introduced.
51
+
52
+ Read-only inspection of official alpha.5 CLI `apps/cli/src/plugin.ts`,
53
+ `packages/boot/plugin-manager/src/operations.ts` and native boot compatibility
54
+ contracts establishes install-spec handling and exact engine admission.
55
+ Registry specs use pnpm's selected version and engine preflight; git/tarball
56
+ specs rely on post-fetch admission. These are not consumption of this
57
+ plugin-owned map. No compatibility-aware
58
+ native updater integration is qualified here. Continue to use separately approved
59
+ exact-version/profile commands and the applicable Desktop CLI/preflight checks;
60
+ the suffix alone does not make an incompatible package safe or migrate a profile.
61
+
62
+ ## Trusted publishing
63
+
64
+ [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) requires npm
65
+ >=11.5.1 and Node >=22.14.0. Publishing uses Node 24 and pinned npm 11.5.1;
66
+ development retains the package's pnpm pin.
67
+
68
+ | Publisher field | Value |
69
+ |---|---|
70
+ | Provider | GitHub Actions, GitHub-hosted runner |
71
+ | Owner / repository | `cloga` / `dsh-github-copilot` |
72
+ | Workflow | `ci.yml` caller, not reusable `release.yml` |
73
+ | Environment | Unset |
74
+ | Allowed action | Direct `npm publish` |
75
+
76
+ Caller and reusable workflow grant `id-token: write`. No normal release uses
77
+ `NPM_TOKEN` / `NODE_AUTH_TOKEN` or persistent-token fallback. Direct publication
78
+ permission is explicit, not implied by a stage. Staged publication is separately
79
+ approved, pending npm maintainer review/2FA, not live; it reserves the version.
80
+ [`npm stage publish`](https://docs.npmjs.com/cli/v11/commands/npm-stage/) requires
81
+ an existing package and cannot bootstrap one. Do not change auth/2FA policy to
82
+ repair publication.
83
+
84
+ ## Same bytes, recovery and tags
85
+
86
+ The non-cancelling repository release concurrency group serializes publication.
87
+ External publishers must coordinate; dist-tags are not atomic CAS.
88
+
89
+ After the complete compatibility gate, pack once with
90
+ `pnpm --config.ignore-scripts=true pack --pack-destination artifacts`.
91
+ Verification already built/prepacked. Recovery downloads the original uploaded
92
+ archive, verifies tag/source, size/digests, SHA-256/SHA-512 and build equality,
93
+ and never repacks/overwrites immutable bytes. Release assets include
94
+ `SHA256SUMS`; npm receives that same archive with lifecycle scripts disabled.
95
+ When the tagged package declares `releaseNotes: "CHANGELOG.md"`, publication
96
+ uses only the exact matching version section from that tracked checkout.
97
+ Reconciliation requires the identical body; older tags without that declaration
98
+ retain their original `Release v<version>.` body. A warning must never be added
99
+ to an old Release in a way that breaks its immutable provenance checks.
100
+
101
+ Only registry E404 establishes absence. Auth, TLS, malformed metadata and network
102
+ failures stop delivery. Existing exact versions require matching SRI and a
103
+ same-channel tag at that version or newer; conflicting bytes fail closed.
104
+ Visibility can lag a successful write. After successful/uncertain publication,
105
+ wait for visibility and reconcile read-only; **never automatically republish**.
106
+ A missing/older tag needs review, not a hidden dist-tag write.
107
+
108
+ Within one exact-Core line, SemVer ordering prevents downgrades. A new mapped
109
+ Core line may start lower than the historical global pointer; the publisher uses
110
+ the archive's explicit mapping or exact published package engine metadata, never
111
+ the suffix alone, to distinguish that transition. Unknown metadata fails closed.
112
+ Reconciling existing older bytes never changes the pointer. Report GitHub tag/commit/assets/SHA-256 and npm version/SRI
113
+ separately. A stable release may advance `latest` from a prerelease only when
114
+ that pointer names a prerelease of the exact same SemVer core version; other
115
+ cross-channel pointers and newer versions still fail closed. One channel
116
+ succeeding is partial delivery.
117
+ [Read-only reconciliation](./npm-publication-readback.md).
118
+
119
+ ## Installation preflight still applies
120
+
121
+ Desktop's native package manager accepts an exact verified npm spec, not a URL
122
+ or local archive. Generic/global CLI entry points must not be assumed to manage the reserved
123
+ `desktop` profile. Qualify Desktop's dedicated entry below.
124
+
125
+ Neither entry replaces the checksum-verified package's
126
+ `scripts/check-search-composition.mjs` preflight. Official `composeProfile()`
127
+ writes the empty `cordis.yml` root during normal launch, including resolved
128
+ Desktop profiles. `NONEMPTY_DISPOSABLE_PROFILE_ROOT` must therefore stop
129
+ installation/startup until its contents are preserved and reviewed.
130
+
131
+ A nonempty root may be reconstructible from existing bundles and persistent
132
+ patches, but must never be assumed disposable. Establish complete equality
133
+ through public composition and recheck source hashes before any separately
134
+ approved normalization. Installation approval is not blanket configuration
135
+ deletion approval. Check actual shared-peer resolution for stale profile-local
136
+ shadows; do not patch/copy peers as a plugin compatibility workaround.
137
+
138
+ ### Desktop-bundled CLI on official rc.2
139
+
140
+ Read-only inspection of official `@deepseek-ai/dsh-desktop-host@0.2.0-rc.2`
141
+ `lib/cli.js` confirms `runDesktopCli` calls public `runCli` with
142
+ `manageDesktopProfile: true` and bundled pnpm through Electron Node mode.
143
+ This capability is specific to the qualified entry, not a global shim or an
144
+ unverified future release.
145
+
146
+ Resolve the intended installation's `resources\runtime\cli\bin\dsh.cmd`, verify
147
+ its owning version/public entry and exact profile/home/anchor; do not rely on
148
+ PATH. With explicit installation approval, verified bytes and `supported: true`:
149
+
150
+ ```powershell
151
+ & '<verified Desktop installation>\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add '<absolute path to verified release.tgz>'
152
+ ```
153
+
154
+ This example grants no action permission or universal offline guarantee.
155
+ Dependencies still require an approved registry or complete authorized cache.
156
+ CLI support does **not** override composition safety: when preflight fails,
157
+ no add, root rewrite or
158
+ restart followed merely to get past that diagnostic is authorized.
159
+ Use one writer, a private metadata backup, guarded edits and full package/bundle/
160
+ patch/peer readback. Installed-on-disk and loaded runtime remain distinct.
161
+ Stopping/restarting requires separate restart approval.
162
+
163
+ ## Controlled offline CLI maintenance for standalone profiles
164
+
165
+ This installs a prebuilt verified Release using existing authorized caches;
166
+ it is not permission to bypass organizational registry restrictions.
167
+ It does not fix TLS or prove public npm health. **Do not use this path
168
+ unchanged for a Desktop-managed/reserved profile**: qualify Desktop's own entry
169
+ and retain independent preflight/approval checks.
170
+
171
+ 1. Obtain explicit installation approval for exact version/profile. Resolve
172
+ standalone CLI, install anchor, home and profile; do not infer ownership from
173
+ PATH or target reserved Desktop with a generic entry.
174
+ 2. Verify original Release bytes with an independently trusted SHA-256,
175
+ package name/version and safe archive layout. Extract only that artifact,
176
+ never a substitute local build or repack.
177
+ 3. Run `scripts/check-search-composition.mjs` with all startup patches and require
178
+ `supported: true`. Unknown/conflicting composition stops before mutation.
179
+ 4. Keep one writer. Take a private backup of package/lock/bundle/patch metadata
180
+ and record rollback bytes. Do not copy credential stores, `.env` or browser
181
+ storage. Host shutdown needs separate permission.
182
+ 5. Invoke the qualified CLI:
183
+
184
+ ```sh
185
+ dsh plugin --profile web add /absolute/path/to/verified-release.tgz --offline --ignore-scripts
186
+ ```
187
+
188
+ Offline needs existing cache; ignore-scripts excludes uncontrolled lifecycle
189
+ work. If cache is incomplete or a build is required, stop. Do not silently
190
+ remove flags, change registry or acquire blocked dependencies elsewhere.
191
+ Keep TLS verification enabled; platform refusals remain authoritative.
192
+ 6. Check exit result, installed version, lock/files and all metadata differences.
193
+ Re-run preflight and import-only smoke without plugin activation. CLI may
194
+ reconcile `dsh.profile.bundles`; preserve unrelated entries and review
195
+ unexpected changes. Use package manager, never manual node_modules copying
196
+ or Core patches. A failed command is not proof nothing changed.
197
+ 7. Report version/checksum/backup and evidence limits. Obtain restart approval,
198
+ then separately verify loaded build and intended behavior.
199
+
200
+ Rollback needs fresh-state review and narrow restoration of this operation's
201
+ changes, never a whole backup over later user edits. This procedure grants no
202
+ future-update permission or machine-wide network policy change.
@@ -0,0 +1,66 @@
1
+ # Official-first review: DSH 0.1.6-alpha.2
2
+
3
+ > **Historical review:** this preserves the earlier evaluation, not current
4
+ > support or delivery readiness. Use the [rc.2 review](./official-first-020-rc2.md)
5
+ > and current README for the supported host.
6
+
7
+ ## Target and evidence boundary
8
+
9
+ Candidate plugin **`0.4.0-alpha.25`** adds the ninth exact target: official **`dsh-v0.1.6-alpha.2`**, commit **`ddefc45fbc7f8e46dd73185e68295696d1297887`**. All eight earlier pins remain, including the historical controlled Desktop baseline; development dependencies remain exactly `0.1.2-rc.1`. This review inspected the unchanged official source checkout read-only. Every official source link below is pinned to that commit, not a moving branch. The [official release notes](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.6-alpha.2) were also reviewed: runtime dependency resolution/unload and multiple coexisting Client Sessions make lifecycle and ownership checks mandatory; native subagent sidebar support is not frozen planner/executor policy parity. Native vision-input and Messages API fixes remain the adapter's responsibility, and the companion must not duplicate or override them. The new Plugin Manager owns persistent installation; this adaptation adds no dynamic-plugin replacement or installer. These notes plus source contracts are not published-artifact or installed-runtime qualification.
10
+
11
+ Prefer official implementations when they satisfy the requirement, including configuration/data migration, API behavior, safety and runtime acceptance. **Complete** means the cited official contract covers the named scope, not that a live deployment passed. **Partial** identifies both an official capability and a concrete remaining requirement. **Unverified** means parity has not been established; it does not mean official support is absent. Decisions are **retain**, **migrate**, or **retire**; conditional retirement requires the evidence in the last column and a reviewed change, never automatic removal on a version bump.
12
+
13
+ ## Role-experience retirement follow-up (#158)
14
+
15
+ The user no longer requires a dedicated planner/executor experience. Alpha.34 therefore **retires the role card, old Settings fallback, configuration writes and new dedicated roots**, independently of official feature parity or pending [Core PR #95](https://github.com/cloga/deepseek-harness/pull/95). That Core PR is separate parent-to-child default routing with its own native UI, not a shipped dependency of this plugin.
16
+
17
+ The historical role/UI retention decisions below are superseded for new use. **Retain only existing-history policy/route enforcement and exact-request recovery**, with strict compatibility Remotes, until a separately reviewed retirement or migration can preserve those histories safely. Do not silently reinterpret a dedicated history as an ordinary Session. Account/search/usage cards remain unchanged. No new official version or API is adopted by this retirement.
18
+
19
+ ## Compact decision matrix (alpha.25 historical comparison)
20
+
21
+ | Custom surface / purpose | Exact official source and support | Decision | Remaining gap / retirement trigger |
22
+ |---|---|---|---|
23
+ | OAuth/native adapter: one Host credential lifecycle and normal Copilot transport | **Complete for the native owner:** [pi-ai flow registration](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/login.ts#L111-L161), [credential bridge](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/auth.ts), [public adapter export](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/index.ts#L65-L88). **Unverified** for replacing the companion's strict grant normalization and conditional bootstrap in every retained profile. | **Retain** thin integration with official ownership; **retire** any duplicate general transport/auth path rather than introducing one (none is authorized here). | Keep credentials Host-only and native refresh/transport. Remove the conditional bootstrap or grant bridge only after each affected profile provides the service and native persistence satisfies the same JSON-only grant contract, with runtime acceptance and no credential copying. |
24
+ | Account discovery: account-authorized endpoints/capabilities, new IDs and bounded freshness | **Partial:** official [discovery](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/discovery.ts#L1-L43) explicitly uses the installed catalog for catalog providers; wire interrogation of other routes returns draft candidates for user adoption, not a catalog refresh. | **Retain** account-scoped metadata source feeding the official adapter. | The cited path is not equivalent to authenticated Copilot metadata with per-model `supported_endpoints`, account invalidation, TTL/cooldown and no static-ID intersection. **Migrate**, then retire this source, once official behavior meets those requirements and migration preserves settings, history, selections and account proof. No claim is made about every other official discovery path. |
25
+ | Frozen role selection: dedicated planner/executor pair captured per new root | **Partial:** [native v3 descriptor](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/subagent/subagent/src/descriptor.ts#L1-L85), [cold-resume route restoration](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/subagent/subagent/src/continuation.ts#L434-L448), and [native tool configuration](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/subagent/tool-subagent/src/index.ts#L75-L130) already support explicit child models and scoped composition. End-to-end parity for the dedicated UI/root policy is **unverified**. | **Migrate** erroneous plugin descriptor admission to native v3; **retain** the dedicated policy overlay. | An optional model-selection setting is not evidence of fixed per-root pair enforcement, session-local creation, CAS or uncertain-create identity. Retire the overlay only after an official path demonstrates these behaviors, no global-default writes, no fallback model and equivalent reviewed recovery. |
26
+ | Provider search policy: follow initiating Chat or explicit primary, one distinct final fallback | **Partial:** official [Web selection/registration/search](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/web/web/src/index.ts#L50-L146) supports configured IDs, unique-usable auto-selection, cancellation forwarding and source caps. Its documented selection rules are not the companion's Chat-following/final-fallback policy. | **Retain** reversible facade and namespaced Models policy; continue using official provider/tool contracts. | Retirement requires exact registered-ID discovery, captured initiating owner, provider-owned search model, one distinct final fallback, no fallback on cancellation/account-proof invalidation, and honest backend/API-charge disclosure. Review original web composition restoration before removing the facade; do not infer whole-product absence from this one service. |
27
+ | Remote boundary: strict validation across old and alpha.2 Gateways | **Complete for factory shape:** [TypertCodec](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/typert/protocol/src/types.ts#L212-L232), [loader validation](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/typert/loader/src/index.ts#L270-L278), [Host decode](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/api/gateway/src/index.ts#L1135-L1155). Cross-baseline runtime qualification remains pending. | **Migrate** to strict `create()` factories; **retain** legacy `schema` bridge. | Both fields resolve the same strict parser; never use `src-json` as a compatibility escape. Retire only the legacy field/helper when old supported consumers no longer require it and exact Host/Client boundary regressions pass. Endpoint payloads remain unchanged. |
28
+ | Lifecycle/Session seam: initialize policy before queued work; rebuild derived state safely | **Complete for serialized initialization:** official [Agent announcement](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/core/agent/src/index.ts#L524-L555) awaits `ctx.serial(..., 'agent/created', ...)`. | **Retain** awaited initialization and public projection integration; **retire** the old cache generation via `stateVersion: 2`. | Refold durable events, never add synchronous history reads or rewrite descriptors. Retire plugin lifecycle glue only if official dedicated-policy lifecycle covers creation, resume, cancellation, unload and recovery. Broad exact-source and live acceptance remain unverified. |
29
+ | UI seam: integrated account controls, Models search/role cards and reversible cleanup | **Complete for extension slots:** official [Models section declaration](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/client/ui-settings-models/src/client/index.ts#L131-L141) exposes keyed/root `settings.models.provider-card` and list/root `settings.models.footer`. Full official parity for the companion workflows is **unverified**. | **Retain** additive contributions and old-Core fallback; preserve native Edit/Delete. | Retire each custom card only when official UI covers its account/discovery or search/role workflow with the same safety, accessibility and lifecycle behavior and passes actual Client/Desktop acceptance. Slot existence is not feature parity and does not authorize hiding or merging real routes. |
30
+
31
+ ## Compaction-budget follow-up (#146)
32
+
33
+ Official alpha.2 support is **partial**: [combined model context and adapter purpose policy](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm/src/types.ts) plus [transactional basic compaction](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/compaction/compaction-basic/src/index.ts) are reused unchanged. Independent Copilot prompt ceilings and full native-request admission remain companion-owned; stock summaries do not fit/chunk an already oversized prefix.
34
+
35
+ **Retain** a metadata-driven estimated budget guard, optional exact-request pressure signalling through stock recovery, and capability-supported low summary effort only when no effort has been resolved. Preserve real catalog capacity, caller output cap, history, cancellation and native transport. No second compaction service, private mutation, automatic model switching or Core patch is added. Retire each companion component when official behavior covers its constraints and passes equivalent exact-runtime regression and migration qualification. [Detailed scope and recovery limitations](./copilot-compaction.md) distinguish prevention from already-oversized-history rescue; the historical alpha.25 evidence below is not qualification of this follow-up.
36
+
37
+ ## Account quota follow-up (#153)
38
+
39
+ Official alpha.2 provides a public additive [`conversation.composer.dock`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/client/ui-conversation/src/client/contract/slots.ts), while its [`ContextMeter`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/client/ui-conversation/src/client/skeleton/ContextMeter.tsx) owns token occupancy, not account billing. This is **partial** support for the requested account-credit presentation, not justification to replace the composer or native meter.
40
+
41
+ **Retain** a bounded Host account-quota source and an optional additive control with a separate strict Remote namespace. Existing [`mapUsage`](https://github.com/deepseek-ai/deepseek-harness/blob/ddefc45fbc7f8e46dd73185e68295696d1297887/packages/llm/llm-pi-ai/src/stream.ts) exposes token counts, not complete Copilot per-request credit receipts; show session credits as unavailable rather than reading opaque replay state or creating a second wire. Retire the companion control when an official account-usage surface provides equivalent budget units, pooled/missing/stale semantics, account isolation and Client lifecycle. Per-session accounting additionally requires attributable, deduplicated native receipts and tested retry/background-work coverage. [Quota scope and evidence limits](./copilot-usage.md) remain distinct from live account permissions and installed Desktop acceptance.
42
+
43
+ ## Managed Responses replay follow-up (#162)
44
+
45
+ The unchanged native adapter remains the owner of durable history reconstruction and model transport. The plugin's pinned pi-ai `0.85.1` public `ProviderRequestOptions.onPayload` callback is forwarded by `buildBaseOptions` and invoked after `buildParams` in `api/openai-responses.js`, before HTTP dispatch. This is **complete extension support**, not proof that native replay IDs are portable across Copilot connection scopes. Offline native serialization retains assistant/reasoning item IDs; the observed uncoded input-item-scope HTTP 401 is also misclassified by the plugin's previous all-401 token rejection observer.
46
+
47
+ **Retain** a narrow managed-route post-serialization normalization and bounded exact-error observer, using those existing public seams. Do not change Core, SDK artifacts, the canonical provider or stored replay. Preserve encrypted bytes, public summaries, phases, tool call/result linkage and nested IDs; reference-only or incomplete ID-bearing input fails explicitly. A verified scope rejection is a request-local `INVALID_REQUEST`, not shared credential invalidation, and adds no retry. Public OpenAI types require IDs for some replay shapes, so this policy is Copilot-specific and real endpoint/old-history acceptance remains **unverified** until separately tested. Synthetic request and concurrency regressions do not establish that acceptance.
48
+
49
+ Retire this compatibility layer only when an unchanged published native SDK/adapter provides equivalent Copilot replay-scope handling and error isolation, and the same old-session, cancellation, callback, genuine-auth and concurrent-request cases pass without plugin intervention. A dependency version increase alone is not evidence of parity.
50
+
51
+ ## Descriptor correction is not a history conversion
52
+
53
+ Native `subagent/descriptor` was already **v3 in the retained rc.1 baseline**; the plugin's v1 expectation was a plugin/test bug. Alpha.25 admits the native continuable `spawn` descriptor with explicit `agentProvider`/`agentModel`, and validates its declared native fields. Native descriptor v3, plugin role-policy version, plugin projection cache version and whole-Session storage-format versions are separate concepts.
54
+
55
+ The plugin projection's **`stateVersion: 2`** forces refolding from events rather than reusing old cached child admission. For dedicated role-owned roots/lineages, unknown/v1/v2, malformed or conflicting child descriptors **fail closed and remain unmodified**. Ordinary native children outside that lineage remain Core-owned, including inherited-model `spawn` children and other provider backends; the global creation listener must not reject them for failing the dedicated executor grammar. Neither a cache rebuild nor changing a numeric field can recover missing provenance/composition. Review the original child's state and work before explicitly creating a **new child** through the dedicated planner. Never synthesize a v3 descriptor, automatically replace the child, replay work, or advertise a fake conversion. Official Session-format migration code elsewhere is not authorization to reinterpret a plugin's invalid role descriptor. See [model roles](./dual-model.md#alpha25-descriptor-and-remote-compatibility).
56
+
57
+ ## Qualification ledger and release gate
58
+
59
+ - **Passed, local verification:** exact source markers and full `pnpm verify`: **1373 Vitest tests passed, 2 expected skips, 176 tooling tests passed**, plus typechecks, build and package smoke. Pack/tarball verification passed. The unrelated-native-child ownership regression was fixed and reviewed. These local checks do not execute all alpha.2 services.
60
+ - **Passed, scoped exact-source runtime: 15/15 tests across three files** — `alpha2-contracts-core.fixture.ts` (8), `remote-core.fixture.ts` (1), and `session-context-core.fixture.ts` (6). Coverage includes the real native v3 descriptor and projection-cache restore, real Typert registry codec registration/disposal, public WebRuntime unload, Client authorization/roles/catalog Gateway paths and Session context. Actual Host Gateway strict parsing is exercised through an **explicit test-local contribution**; this is not evidence of autogenerated production factory registration. The production source fallback independently validates its inputs. This supplemental run uses unchanged exact public source, official **TypeScript `6.0.3`**, declared **`mime-types@3.0.2`** and **`ws@8.21.0`**, and shared Zod `^4.4.3`. Scratch dependencies were installed through the normal configured mirror without Core or dependency-artifact patches. This is not qualification of the full official-root-helper dependency closure.
61
+ - **Blocked broad frozen source-runtime setup:** the configured dependency mirror returns **HTTP 404 for `node-addon-require-builtin@0.1.6`**. The scoped run resolved its TypeScript and `mime-types` prerequisites; they are no longer blockers. The unchanged official-root-helper CI fixture was not run locally against the full frozen closure. Dependency setup failure is not evidence of a plugin/Core contract failure, and scoped success is not a passing full-runtime matrix.
62
+ - **Full official-helper qualification pending:** `tests/fixtures/alpha2-contracts-core.fixture.ts`, together with existing Remote/Session context fixtures through `scripts/verify-tagged-core.mjs`, must pass in the complete gate. Local `tests/remote-codec.spec.ts` and `tests/dual-model-projection.spec.ts` cover the regression contract separately.
63
+ - **Not executed:** candidate CI qualification. The intended Windows/Linux gate preserves all **nine** exact baselines, with all **seven** tagged-source targets using unchanged source-runtime fixtures. The optional Chat fixture additionally covers the retained rc.1 target.
64
+ - **Not claimed:** live Copilot/OAuth requests, published npm/Core/Desktop artifact compatibility, packaged Electron activation, installed/loaded version equivalence, or a published alpha.25 release. Package ranges and source markers are admission/static evidence only.
65
+
66
+ Before delivery, record exact fixture results and all required CI on the candidate revision, then follow immutable publication and packed-byte verification. A dependency blocker must remain visible rather than being hidden by disabling tests, patching Core/dependencies, or claiming official support is absent. Any approved installation is separate from activation; preserve running Sessions and do not restart them for this review.
@@ -0,0 +1,32 @@
1
+ # Official-first review: DSH 0.2.0-rc.1
2
+
3
+ > **Historical review:** this preserves the earlier evaluation, not current
4
+ > support or delivery readiness. Use the [rc.2 review](./official-first-020-rc2.md)
5
+ > and current README for the supported host.
6
+
7
+ ## Target and evidence boundary
8
+
9
+ Candidate plugin **`0.4.0-alpha.38`** adds official Core **`0.2.0-rc.1`**, tag commit [`4878cdabd87d4041bdaff61d04c966883b9fd07a`](https://github.com/deepseek-ai/deepseek-harness/commit/4878cdabd87d4041bdaff61d04c966883b9fd07a), as the current target while retaining every earlier compatibility pin. The independently observed Windows Desktop feed also identifies `0.2.0-rc.1`; its Desktop package set is not materialized in this checkout. Source/API qualification, npm package fixtures, and Desktop installation/runtime qualification are separate evidence.
10
+
11
+ This review inspected only the exact official tag and unchanged installed package artifacts. **Complete** means the cited public contract supports the named behavior, not that Desktop or a live service was qualified. **Partial** identifies both the official capability and the gap. **Unverified** means parity was not established, not that official support is absent. Decisions are **retain**, **migrate**, or **retire**. A retirement trigger is evidence for a separately reviewed change, never permission for automatic removal on a version bump.
12
+
13
+ ## Compatibility decisions
14
+
15
+ | Surface | Exact official contract and support | Decision | Remaining gap / retirement trigger |
16
+ |---|---|---|---|
17
+ | Copilot OAuth, credentials, catalog and ordinary model transport | The unchanged official [`llm-pi-ai` login/auth exports](https://github.com/deepseek-ai/deepseek-harness/tree/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/llm/llm-pi-ai/src) continue to own provider registration, OAuth grants, refresh and normal transport. | **Retain** the narrow public credential bridge and account-scoped route; do not add a second adapter or catalog. | The official path does not establish the companion's strict grant normalization, conditional authorization bootstrap, or authenticated per-account endpoint/capability metadata. Retire those bridges only after public official behavior and runtime acceptance preserve the same data and safety contracts. |
18
+ | Core settings access and invalidation | [`SettingsForms`](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/settings/settings/src/index.ts) and its public [types](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/settings/settings/src/types.ts) expose current descriptor/mutation APIs and the `settings/document-updated` event. | **Migrate** readers to the public descriptor path where legacy `get` is absent; **retain** a narrow legacy branch for older supported releases. | Retire the compatibility reader/listener only when the corresponding older Core pins are removed through an explicit support-policy change and the current namespace/redaction guarantees remain intact. |
19
+ | Volatile provider configuration | The public [`PiAiConfig` provider view](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/llm/llm-pi-ai/src/config.ts) wraps provider storage; callers materialize it through `.get()` rather than object indexing. | **Migrate** the plugin's route builder to `.get()` and **retain** object support for older native layouts. | Do not infer registration from an empty volatile wrapper. Retire the legacy object branch only with removal of the older baselines and matching fixture evidence. |
20
+ | Tool results and message history | The current [`Message` contract](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/llm/llm/src/message.ts) includes first-class `role: 'tool'` messages; older history can still contain nested tool-result blocks. | **Migrate** serialization to recognize both current and retained forms without rewriting source history. | Do not collapse tool messages into assistant text or change replay ownership. Retire legacy handling only after old stored histories are outside the declared support scope. |
21
+ | Agent creation and existing role-history restoration | The public [Agent lifecycle](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/core/agent/src/index.ts) serializes and awaits `agent/created`; the event carries a creation source. | **Retain** compatibility-only projection restoration and test it through the awaited public lifecycle. | Retired role UI/settings/new-root behavior stays retired. Runtime policy enforcement and old-history recovery remain plugin-owned; never infer permission from a missing or malformed descriptor. |
22
+ | Remote and Client Gateway validation | Current [Typert codecs](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/typert/protocol/src/types.ts) expose `create()` factories. The [Client Gateway](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/api/gateway/src/client/index.ts) forwards parameter payloads without local parsing; strict input validation belongs at the registered Host boundary. Strict result codecs decode only when the descriptor publishes a decoder. | **Migrate** descriptor tests to current `create()` factories; **retain** the same strict Host codecs and legacy `.schema` helper bridge. | Client-side tests must not claim pre-transport input filtering or result validation the current Gateway does not promise. The exact-source Host fixture must continue to prove strict registered-boundary parsing. Retire the legacy bridge only after old Core consumers leave support. |
23
+ | Models UI and additive contribution | The official [Models Client](https://github.com/deepseek-ai/deepseek-harness/blob/4878cdabd87d4041bdaff61d04c966883b9fd07a/packages/client/ui-settings-models/src/client/index.ts) declares keyed `settings.models.provider-card` and list `settings.models.footer` slots. | **Retain** additive account/search controls and native model editing. | Slot existence is not account-management or search-policy parity. Retire a control only after equivalent official workflow, accessibility, ownership and lifecycle behavior pass Client/Desktop acceptance. |
24
+ | Web routing and search | Official Web exposes registered provider dispatch; the plugin's public facade captures an exact registered provider before routed search. | **Retain** fail-closed captured-registration dispatch and the explicit missing-seam diagnostic. | Never replace captured identity with an ID-only lookup, global model default or another Session's selection. Desktop/runtime and live provider behavior remain unverified. |
25
+ | Plugin installation and Desktop injection | The official Windows Desktop feed identifies release `0.2.0-rc.1`, but no installed Desktop package set or loaded runtime is present here. | **Retain** package entry-point/peer checks and document the independent Desktop boundary. | Do not claim successful injection, install, activation, authentication, model calls or UI behavior from Core source or npm package tests alone. |
26
+
27
+ ## Qualification ledger
28
+
29
+ - The release/tag and public source contracts above are pinned; the Core tree and installed dependencies were not modified.
30
+ - Local source build, focused tests, repository verifiers, exact-tag runtime fixtures and the complete gate must be reported separately after execution. Package-version metadata is not semantic or runtime proof.
31
+ - No real Copilot OAuth, model, search, live-profile change, Desktop install/restart, publication, push or pull request is part of this adaptation.
32
+ - Desktop package hashes/contents, packaged Electron activation, and loaded-version equivalence are **not verified** in this checkout. The observed feed release is not a materialized Desktop artifact.
@@ -0,0 +1,17 @@
1
+ # Official-first review: DSH 0.2.0-rc.2
2
+
3
+ ## Target and evidence
4
+
5
+ The sole admitted target is official [`dsh-v0.2.0-rc.2`](https://github.com/deepseek-ai/deepseek-harness/tree/639ed015397290b3745d163aafe02ffee4aa3f84), commit `639ed015397290b3745d163aafe02ffee4aa3f84`. Compare it with the retained [rc.1 baseline](./official-first-020-rc1.md) using the [official source comparison](https://github.com/deepseek-ai/deepseek-harness/compare/dsh-v0.2.0-rc.1...dsh-v0.2.0-rc.2). The signed installed Windows Desktop `dsh/desktop-runtime.json` is 2,817,387 bytes, SHA-256 `29561160fb7825c3968708f5700564f4381a976985fc270ee5dcc42e5a0a3a54`, and lists 287 shared packages. Desktop, Core and Desktop Host report rc.2; the 16 declared DSH peers resolve rc.2, Cordis 4.0.4 and schemastery 3.18.4. The descriptor establishes peer ownership, not plugin activation, Electron integration or live provider calls.
6
+
7
+ ## Public contracts and decisions
8
+
9
+ | Surface | Official support / remaining gap | Decision and retirement trigger |
10
+ |---|---|---|
11
+ | Native model adapter and SDK | Published [`@deepseek-ai/dsh-llm-pi-ai@0.2.0-rc.2`](https://registry.npmjs.org/@deepseek-ai/dsh-llm-pi-ai/-/dsh-llm-pi-ai-0.2.0-rc.2.tgz) depends on pi-ai `^0.87.1`. The native SDK now passes branded `TranscriptContext` to providers, with prompt and tools folded into system messages. | **Migrate** the plugin-owned provider bridge and estimated admission to exact pi-ai `0.87.1`; count each normalized message as a lower bound even when earlier usage anchors omit changed prefixes. Retain native transport and the same stream object. Retire this bridge only when official account-scoped metadata and admission preserve these contracts. |
12
+ | Native Auto authorization review | rc.2 `classifyRisk` is strictly fail-closed but freezes `temperature: 0` into an unscoped public `ctx.llm.stream` request; pi-ai forwards every defined Responses temperature. No verified supplier contract establishes that `supports.thinking` determines temperature compatibility. | **Retain a default-off explicit plugin override** on the managed account-discovered Responses route: `github-copilot.responsesOmitTemperature` omits temperature from every managed Responses request only when configured true. This can mitigate the reported reviewer error but changes request semantics for all requests on that protocol. Preserve the Core request, parser, cancellation, one attempt and nonmanaged routes. Never auto-enable from metadata; canonical Core-owned routes remain outside scope. Retire when a verified supplier contract or official adapter provides truthful per-request sampling compatibility and exact-source qualification preserves deny/malformed/error/cancel behavior. |
13
+ | Profile bundle patches | Public `bundlePatchPaths` accepts a bundle's string or ordered array of patches. Signed rc.2 `dsh-web-app` lists five patches, whereas the old plugin preflight accepted only one string. | **Migrate** read-only preflight to the published resolver and compose every patch in order, rejecting malformed manifests and unsupported routing. Retire only after an official installer provides equivalent fail-closed structural admission. |
14
+ | Models UI, authorization, Remote, Session and search | Published rc.2 package entrypoints and inspected public seams retain the rc.1 forms. The official rc.2 UI-agent-preset removes its `developerTools` injection, which this plugin does not use. | **Retain** the public Host/Client/Remote integrations and their guarded ownership. Retirement requires verified official equivalent behavior plus migration and runtime acceptance; lack of a new public seam is not evidence of complete parity. |
15
+ | Desktop package graph | Signed descriptor has the current shared peers; pi-ai and Zod are not shared Host packages. The bundled adapter resolves pi-ai 0.87.1 and Zod separately. | **Retain** required Host peers and Client external React; do not copy bundled dependencies or patch Core. Recheck effective profile resolution before Desktop installation because a stale profile-local Host peer may shadow the bundle. |
16
+
17
+ The unchanged-tagged-source and exact published-artifact fixtures must pass on Windows and Linux before publication. Local synthetic HTTP, source markers, package imports and signed peer metadata do not prove account entitlement, Copilot model calls, loaded Desktop plugin state or profile installation. The Desktop owner performs installation separately after verified publication and preflight; no credentials, model settings or Session histories are migrated by this change.