dsh-github-copilot 0.4.0-alpha.100

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 (156) hide show
  1. package/AGENTS.md +312 -0
  2. package/CHANGELOG.md +479 -0
  3. package/CONTRIBUTING.md +46 -0
  4. package/LICENSE +21 -0
  5. package/README.md +203 -0
  6. package/README.zh.md +202 -0
  7. package/SECURITY.md +29 -0
  8. package/cordis.patch.yml +16 -0
  9. package/deployment-baseline.json +1299 -0
  10. package/docs/agent-readiness.md +110 -0
  11. package/docs/auto-task-routing.md +234 -0
  12. package/docs/automatic-model-routing.md +205 -0
  13. package/docs/copilot-accounts.md +236 -0
  14. package/docs/copilot-compaction.md +120 -0
  15. package/docs/copilot-usage.md +125 -0
  16. package/docs/dual-model.md +66 -0
  17. package/docs/image-input-compatibility.md +64 -0
  18. package/docs/images/copilot-accounts-credits.png +0 -0
  19. package/docs/images/copilot-accounts.png +0 -0
  20. package/docs/images/copilot-model-preferences.png +0 -0
  21. package/docs/images/copilot-search-routing.png +0 -0
  22. package/docs/images/dual-model-desktop.png +0 -0
  23. package/docs/images/dual-model-mobile.png +0 -0
  24. package/docs/images/dual-model-provenance.json +35 -0
  25. package/docs/images/parent-model-follow.png +0 -0
  26. package/docs/manual-compaction-recovery.md +64 -0
  27. package/docs/model-compatibility-acceptance.md +164 -0
  28. package/docs/npm-distribution.md +149 -0
  29. package/docs/official-first-016-alpha2.md +66 -0
  30. package/docs/official-first-020-rc1.md +32 -0
  31. package/docs/official-first-020-rc2.md +16 -0
  32. package/docs/session-search-routing.md +133 -0
  33. package/docs/single-route-migration.md +130 -0
  34. package/docs/web-lifecycle-rc2.md +55 -0
  35. package/lib/client.js +10822 -0
  36. package/lib/client.js.map +1 -0
  37. package/lib/copilot-identity-DRZY_d2X.js +15 -0
  38. package/lib/index.js +11689 -0
  39. package/lib/manual-compaction-recovery.js +315 -0
  40. package/lib/remote.js +734 -0
  41. package/lib/request-budget-DLY_aRq0.js +87 -0
  42. package/lib/routed-web.js +120 -0
  43. package/lib/search-routing-CqysPLve.js +792 -0
  44. package/lib/types/account-model-auth.d.ts +15 -0
  45. package/lib/types/account-model-catalog.d.ts +70 -0
  46. package/lib/types/account-model-source.d.ts +85 -0
  47. package/lib/types/agent-compaction.d.ts +4 -0
  48. package/lib/types/authorization-controller.d.ts +119 -0
  49. package/lib/types/auto-assessment-evidence.d.ts +46 -0
  50. package/lib/types/auto-model-host.d.ts +27 -0
  51. package/lib/types/auto-model-intent.d.ts +36 -0
  52. package/lib/types/auto-model-presentation.d.ts +57 -0
  53. package/lib/types/auto-model-routing.d.ts +59 -0
  54. package/lib/types/auto-selection-explanation.d.ts +9 -0
  55. package/lib/types/auto-task-assessment.d.ts +47 -0
  56. package/lib/types/auto-task-classifier.d.ts +9 -0
  57. package/lib/types/background-compaction.d.ts +30 -0
  58. package/lib/types/client.d.ts +115 -0
  59. package/lib/types/compact-account.d.ts +42 -0
  60. package/lib/types/compaction-pressure.d.ts +23 -0
  61. package/lib/types/compatibility.d.ts +17 -0
  62. package/lib/types/config.d.ts +89 -0
  63. package/lib/types/content-file.d.ts +10 -0
  64. package/lib/types/context-evidence-ui.d.ts +11 -0
  65. package/lib/types/context-evidence.d.ts +108 -0
  66. package/lib/types/context-usage.d.ts +4 -0
  67. package/lib/types/copilot-account-presentation.d.ts +7 -0
  68. package/lib/types/copilot-accounts-card.d.ts +30 -0
  69. package/lib/types/copilot-accounts-host.d.ts +75 -0
  70. package/lib/types/copilot-accounts-remote.d.ts +77 -0
  71. package/lib/types/copilot-accounts-types.d.ts +42 -0
  72. package/lib/types/copilot-auth.d.ts +25 -0
  73. package/lib/types/copilot-grant.d.ts +11 -0
  74. package/lib/types/copilot-identity.d.ts +11 -0
  75. package/lib/types/copilot-request.d.ts +11 -0
  76. package/lib/types/copilot-stream-liveness.d.ts +23 -0
  77. package/lib/types/copilot-usage-card.d.ts +30 -0
  78. package/lib/types/copilot-usage-host.d.ts +58 -0
  79. package/lib/types/copilot-usage-normalize.d.ts +9 -0
  80. package/lib/types/copilot-usage-remote.d.ts +63 -0
  81. package/lib/types/copilot-usage-types.d.ts +20 -0
  82. package/lib/types/copilot-usage-ui.d.ts +4 -0
  83. package/lib/types/current-provider.d.ts +59 -0
  84. package/lib/types/deepseek-search-fallback.d.ts +11 -0
  85. package/lib/types/dual-model-host.d.ts +119 -0
  86. package/lib/types/dual-model-remote.d.ts +63 -0
  87. package/lib/types/dual-model-types.d.ts +34 -0
  88. package/lib/types/external-link.d.ts +3 -0
  89. package/lib/types/failure.d.ts +38 -0
  90. package/lib/types/http.d.ts +48 -0
  91. package/lib/types/image-input-admission.d.ts +5 -0
  92. package/lib/types/index.d.ts +39 -0
  93. package/lib/types/manual-compaction-recovery.d.ts +52 -0
  94. package/lib/types/migration-status.d.ts +50 -0
  95. package/lib/types/model-exclusions.d.ts +15 -0
  96. package/lib/types/model-preferences-card.d.ts +9 -0
  97. package/lib/types/model-protocol.d.ts +31 -0
  98. package/lib/types/native-select-style.d.ts +4 -0
  99. package/lib/types/parent-model-follow-card.d.ts +41 -0
  100. package/lib/types/parent-model-follow.d.ts +44 -0
  101. package/lib/types/pi-provider-bridge.d.ts +22 -0
  102. package/lib/types/plan.d.ts +148 -0
  103. package/lib/types/pre-step-pressure.d.ts +8 -0
  104. package/lib/types/preview-provider.d.ts +66 -0
  105. package/lib/types/preview-route.d.ts +74 -0
  106. package/lib/types/probe.d.ts +39 -0
  107. package/lib/types/reasoning-presentation.d.ts +55 -0
  108. package/lib/types/remote-codec.d.ts +10 -0
  109. package/lib/types/remote.d.ts +199 -0
  110. package/lib/types/replay-recovery-host.d.ts +28 -0
  111. package/lib/types/replay-recovery-remote.d.ts +14 -0
  112. package/lib/types/replay-recovery-types.d.ts +24 -0
  113. package/lib/types/replay-recovery-ui.d.ts +26 -0
  114. package/lib/types/replay-recovery.d.ts +17 -0
  115. package/lib/types/request-body-evidence.d.ts +34 -0
  116. package/lib/types/request-body-timeout-marker.d.ts +2 -0
  117. package/lib/types/request-body-timeout.d.ts +4 -0
  118. package/lib/types/request-budget.d.ts +58 -0
  119. package/lib/types/request-upload-evidence.d.ts +23 -0
  120. package/lib/types/response-error-body.d.ts +3 -0
  121. package/lib/types/responses-reasoning-text.d.ts +24 -0
  122. package/lib/types/responses-reasoning.d.ts +7 -0
  123. package/lib/types/responses-replay-compat.d.ts +30 -0
  124. package/lib/types/route-ownership.d.ts +70 -0
  125. package/lib/types/routed-web.d.ts +50 -0
  126. package/lib/types/search-backend.d.ts +16 -0
  127. package/lib/types/search-routing-host.d.ts +19 -0
  128. package/lib/types/search-routing-policy.d.ts +18 -0
  129. package/lib/types/search-routing-remote.d.ts +20 -0
  130. package/lib/types/search-routing.d.ts +43 -0
  131. package/lib/types/search-tool-routing.d.ts +22 -0
  132. package/lib/types/serialize.d.ts +106 -0
  133. package/lib/types/settings-reader.d.ts +16 -0
  134. package/lib/types/sse.d.ts +28 -0
  135. package/lib/types/temporary-models.d.ts +25 -0
  136. package/lib/types/tool-schema-compat.d.ts +17 -0
  137. package/lib/types/traditional-search.d.ts +17 -0
  138. package/lib/types/turn-model-provenance.d.ts +45 -0
  139. package/lib/types/turn-selection-card.d.ts +10 -0
  140. package/lib/types/turn-selection-host.d.ts +11 -0
  141. package/lib/types/turn-selection-remote.d.ts +13 -0
  142. package/lib/types/turn-selection.d.ts +119 -0
  143. package/lib/types/turn-usage-evidence.d.ts +66 -0
  144. package/lib/types/turn-usage-notice.d.ts +7 -0
  145. package/lib/types/types.d.ts +69 -0
  146. package/lib/types/usage.d.ts +26 -0
  147. package/lib/types/watchdog.d.ts +22 -0
  148. package/lib/types/web-delegate.d.ts +12 -0
  149. package/lib/types/web-search-routing-card.d.ts +16 -0
  150. package/lib/types/web-search-routing-config.d.ts +12 -0
  151. package/lib/types/wire-anthropic.d.ts +37 -0
  152. package/lib/types/wire.d.ts +56 -0
  153. package/lib/web-delegate.js +9 -0
  154. package/output/auto-model-mockup/index.html +207 -0
  155. package/package.json +236 -0
  156. package/scripts/check-search-composition.mjs +191 -0
@@ -0,0 +1,64 @@
1
+ # Image input compatibility
2
+
3
+ Target: official DSH / Windows Desktop `0.2.0-rc.2`. Plugin-only.
4
+
5
+ ## Current behavior
6
+
7
+ Auto checks actual typed image blocks in **all entered messages**, including
8
+ historical user/tool content after a text-only continuation. It does not inspect
9
+ tool arguments or infer images from filenames/textual offload placeholders.
10
+ Core's `offloaded: true` marker means projected text, not image bytes.
11
+
12
+ The picker advertises aggregate image input only with an eligible account image
13
+ model. Auto filters text-only candidates before task preferences; no eligible
14
+ image model fails explicitly rather than sending content to an unverified route.
15
+
16
+ For fixed and Auto managed calls, the account-bound public `inspectRequest`
17
+ hook checks the native transcript's **projected MIME** before wire dispatch:
18
+
19
+ | Diagnostic | Meaning |
20
+ |---|---|
21
+ | `COPILOT_IMAGE_INPUT_UNSUPPORTED` | Current account model does not admit image input |
22
+ | `COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE` | Actual projected MIME evidence is unavailable |
23
+ | `COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED` | Explicit account MIME restrictions reject that projection |
24
+
25
+ Omitted account MIME lists preserve existing verified vision behavior but do
26
+ not prove universal format acceptance. The plugin neither invents a list nor
27
+ converts images itself. Native error/finish behavior, historical attachments,
28
+ turn freezing and existing cancellation/retry policy stay unchanged.
29
+
30
+ ## Evidence layers and recovery limits
31
+
32
+ Source filename, durable attachment MIME and outgoing projected MIME are
33
+ different facts. Native rc.2 prepares images through public attachment services
34
+ and may re-encode them. A `.png` display name can belong to durable WebP; that
35
+ alone does not establish what the provider received.
36
+
37
+ Do not exclude a model by name to conceal a format failure. A supplier/model
38
+ card's general vision claim is not GitHub endpoint format proof. Exact-format
39
+ Auto filtering from durable MIME can reject a model whose native projection
40
+ would be accepted; candidate-specific projection would require another public
41
+ contract and reviewed tests.
42
+
43
+ The current fix diagnoses explicit incompatibility, not every provider 400.
44
+ When advertised restrictions and outgoing projection agree but the endpoint
45
+ rejects it, retain the native error. Do not invent capability corrections,
46
+ reselect mid-turn, add a fallback wire or replay the request automatically.
47
+ An explicit smaller [native image budget](./copilot-compaction.md) changes
48
+ outgoing visibility through Core offload; it is not a supplier JSON threshold.
49
+
50
+ ## Verification
51
+
52
+ Historical tool-image continuation first reproduced the old missed-image
53
+ requirement. Regressions now cover all Auto preferences, historical user/tool
54
+ images, no vision candidate and native WebP-to-PNG projection against explicit
55
+ PNG/JPEG restrictions. A mismatch emits native `finish(error)` with zero model
56
+ requests.
57
+
58
+ The [delivery CI](https://github.com/cloga/dsh-github-copilot/actions/runs/36966798814)
59
+ passed exact unchanged rc.2 Windows/Linux source and published-adapter fixtures,
60
+ full verification and archive gates. Local synthetic transport demonstrates
61
+ admission/ownership, not live endpoint acceptance or a particular Desktop's
62
+ loaded version. The original [investigation #236](https://github.com/cloga/dsh-github-copilot/issues/236)
63
+ retains the bounded observation and delivery evidence; old local registry
64
+ failures are not a permanent unsupported/shipping-pending claim.
Binary file
@@ -0,0 +1,35 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "built-component-synthetic-fixture",
4
+ "packageVersion": "0.4.0-alpha.20",
5
+ "sourceBranch": "feature/copilot-dual-model",
6
+ "baselineCommit": "f44fd1b15ba93dad3bea0c498648dab3392788d5",
7
+ "component": "src/dual-model-card.ts",
8
+ "fixture": "tests/browser/dual-model.html",
9
+ "server": "tests/browser/serve-dual-model.mjs",
10
+ "clientArtifact": "lib/client.js",
11
+ "clientArtifactSha256": "65fa84f960e9facdc4ca8c72292c2a136c6e9b5bcf22271d899fb10eba5e12ab",
12
+ "browser": "Playwright-managed Microsoft Edge",
13
+ "locale": "zh",
14
+ "productionServices": false,
15
+ "modelCalls": false,
16
+ "accountAndWorkspaceData": "synthetic",
17
+ "images": [
18
+ {
19
+ "path": "docs/images/dual-model-desktop.png",
20
+ "viewport": { "width": 1440, "height": 1000 },
21
+ "theme": "dark",
22
+ "state": "configuration saved; selected workspace; create enabled",
23
+ "sha256": "0911486f93ff120b85c1d7e97c83f35b742cd912b10ab046b05a3be505790107"
24
+ },
25
+ {
26
+ "path": "docs/images/dual-model-mobile.png",
27
+ "viewport": { "width": 390, "height": 1000 },
28
+ "theme": "light",
29
+ "state": "one synthetic session created and opened through fixture callback",
30
+ "sha256": "5e6342c844047e9872f3b48eeaeec72036b1453754b1e7e5011d87f1ec1f6d04"
31
+ }
32
+ ],
33
+ "observations": { "horizontalOverflow": false, "syntheticCreatedSessions": 1 },
34
+ "limits": ["not a production Desktop screenshot", "not a live Copilot model request", "not complete Settings-shell integration proof"]
35
+ }
@@ -0,0 +1,64 @@
1
+ # Oversized manual compaction recovery
2
+
3
+ Tracking: [#228](https://github.com/cloga/dsh-github-copilot/issues/228). Target: unchanged official DSH `0.2.0-rc.2` (`639ed015397290b3745d163aafe02ffee4aa3f84`). This document specifies a **separately selected** Host compaction engine; installing this plugin by itself does not replace a running Core engine.
4
+
5
+ ## Requirements and failure boundary
6
+
7
+ An already oversized, compressible manual summary must be able to make progress without submitting the same over-budget prompt again. The motivating detached session had a roughly 508k estimated summary input versus a roughly 368k hard input budget with 65,536 reserved output tokens. The independent model prompt ceiling, not the output reservation alone, binds. The native one-shot summarizer sends the entire selected balanced span plus a directive, and the managed-route guard correctly refuses that input. The prior Auto meter repair prevents incorrect candidate selection; it does not shorten this summary.
8
+
9
+ Recovery must leave the original Session surface intact until a smaller *complete* checkpoint has been accepted by Core's native transaction. It must retain the system head, tool declarations and chronological content, never split a tool-call/result pair, honor cancellation and source changes, bound all provider calls, and preserve the actual summary route and output cap. If a fixed head or one indivisible unit cannot fit, an intermediate summary is truncated/empty, account proof expires, the history changes, or the call limit is exhausted, fail with a named diagnostic and no replacement. No live inference, credential changes, automatic model switch, history deletion or summary-success claim follows from a local test.
10
+
11
+ ## Composition and algorithm
12
+
13
+ `CopilotManualRecoveryCompactionEngine` is an opt-in alternative to **one** official `BasicCompactionEngine` registration. Operators selecting it must replace (not mount alongside) their existing basic compaction service in the same Host scope; the default plugin registration never changes the service. It subclasses the published engine and calls `super.compactNow`: Core still owns idle maintenance, a single bracketed durable transaction, balanced range selection, checkpoint framing, source-stability/shrink checks, cancellation, failure classification, flush, and optional native pruning. The subclass hook runs recovery **only** inside an explicit manual call with an authenticated, current managed Copilot summary model. Automatic compaction and all other providers delegate to the stock hook unchanged. A pending model picker is not summary-route evidence: an explicit native summary target wins, then the latest committed header, then Agent options.
14
+
15
+ The plugin's account service supplies a current descriptor and a revocable proof without starting discovery or reading credentials into the Client. The summary budget uses `min(maxInputTokens, contextWindow - configuredOutputCap) - safetyTokens`; an additional 4096-token allowance covers Core's appended directive and estimation variance. Each candidate request is conservatively bounded by serialized UTF-8 size including system, tools, prior intermediate checkpoint and current messages. Native managed-route admission remains the final authority. A call that still exceeds that guard fails; it is never retried with a hidden wire rewrite.
16
+
17
+ The hook partitions the *original* span only at balanced boundaries, summarizes each part through `super.summarize`, and supplies the previous completed intermediate checkpoint as context for the next call. Thus the last completed summary contains all processed parts in chronological order. Default maximum: 16 calls (hard maximum 32); each carries the native cancellation signal and checks account proof before and after dispatch. The original surface is not modified between calls. Core checks for a smaller replacement and current source after the final result; any failure closes the native marker without a replacement. Only an explicit manual command starts this process.
18
+
19
+ ## Background command for Desktop
20
+
21
+ With this engine selected and the public `commands` and `jobs` services available in its scope, use:
22
+
23
+ ```text
24
+ /copilot-compact
25
+ /copilot-compact status
26
+ /copilot-compact cancel
27
+ ```
28
+
29
+ The jobs package is a development-only type dependency: the plugin imports no jobs runtime implementation, and the engine's public declaration does not expose its types. Runtime access is through the optionally injected Host service; no jobs package is bundled, installed as a new peer, or registered by this plugin.
30
+
31
+ The first command acknowledges **job admission**, not a completed summary. The existing native `/compact` command remains unchanged. Desktop rc.2 forwards unary command requests through Node `fetch`; a long synchronous compact can exceed the default 300-second response-header wait and lose its caller connection. The background command returns promptly and transfers work to a Session-owned native job with its own cancellation controller. A later HTTP disconnect does not cancel admitted work.
32
+
33
+ Status and cancellation apply only to the invoking Agent's latest job. Duplicate starts return the current running job rather than starting another transaction. The selected engine still acquires Core's maintenance lock and owns the only native transaction; another active turn or compaction can cause the admitted job to fail. Job status distinguishes running, completed, failed and cancelled work. Failure details are sanitized; consult the native compaction/end record for the underlying summary/transaction diagnostic. Provider timeout, truncation, capacity and account-proof failures remain failures.
34
+
35
+ The plugin collects the job's native settlement with `jobs.wait`, so the ordinary job reporter does not wake the model or resume its Goal. It never calls followup or inject. Explicit cancellation, owner disposal and plugin/Host teardown cancel and drain the producer. Owner teardown can fail native maintenance before the job receives cancellation; that outcome remains failed rather than being relabeled successful or cancelled. Jobs are process-local: status does not survive a Host restart, and the plugin does not silently restart interrupted work. Durable Core compaction events remain the outcome evidence. Merely installing the main plugin does not select this engine or make this command available; missing commands/jobs services leave the background entry unavailable without changing ordinary compaction.
36
+
37
+ **Audit:** each physical call goes through Core's public `llm.stream` seam with its actual route/cap. The final native summary event is intentionally *unmarked* (`llmStreamCall` absent), not a fabricated claim of one call. It records summed provider-reported usage only when **every** underlying call supplied usage; optional counters are included only if present on every call. The native event format has no per-call array or durable per-call transcript in a single summary event; do not infer individual request accounting from that aggregate. This is a real observability limit of the unchanged public contract.
38
+
39
+ This aggregate is not per-call attribution: it cannot reconstruct which intermediate request used which tokens, identify each physical response, or prove that native call-attribution consumers count every intermediate request. The plugin does not manufacture `llmStreamCall`, response IDs, or individual durable usage records to fill that gap. Reported aggregate provider usage and Core's native call-attribution/accounting are separate evidence layers.
40
+
41
+ ## Native admission and historical usage evidence
42
+
43
+ The exact rc.2 `llm-pi-ai` public adapter converts both plain and replay-backed historical assistant messages with `emptyPiUsage()` and `timestamp: 0` (`replay.ts`); converted user messages, including new intermediate checkpoints, also have timestamp zero (`context.ts`). Therefore creating a checkpoint **does not** invalidate an old SDK usage anchor through a newer timestamp. On this pin, Core does not carry the historical assistant usage into the SDK context in the first place. Recovery neither clears that usage itself nor changes message timestamps, replay state, native conversion, the SDK estimator or the final managed guard. This behavior must be requalified when the Core/pi-ai pin changes.
44
+
45
+ The unchanged-Core fixture exercises the real managed adapter and its `inspectRequest` guard with a synthetic 27-turn history whose latest provider-reported input is 508,198 tokens. It first proves stock manual compaction fails the 12,000-token input bound without reaching the synthetic wire, then proves the opt-in engine commits one replacement through bounded calls. The captured SDK estimates include the complete native compaction directive, system policy and tool schemas, not a prompt with its final directive removed. Every dispatched estimate fits the hard limit; the 8,192 output cap is preserved, source events remain byte-identical, and every intermediate wire call observes the original surface generation. Estimator instrumentation calls the original SDK utility without altering its result. The fixture verifies zero carried usage anchors, aggregate usage and the deliberately absent single-call marker. Synthetic scaled-down input limits and transport establish native admission/transaction behavior, not provider-exact capacity or live Copilot success.
46
+
47
+ ## Limitations and operational use
48
+
49
+ This path only helps histories with balanced boundaries and intermediate summaries that fit their model's input and output limits. One giant user/tool result, a huge fixed head/tool schema, an incomplete tool pair, provider truncation, or a final checkpoint that is not smaller remain explicit failures. Intermediate model summaries are lossy in the same sense as ordinary Core compaction; review important context before explicitly invoking manual compaction. The conservative UTF-8 bound may reject a request that a provider could accept. The algorithm does not claim provider-exact token measurement or repair of a damaged/unmatched pre-existing compaction bracket.
50
+
51
+ Select the exported `dsh-github-copilot/manual-compaction-recovery` Host class **instead of** the stock basic compaction plugin in a reviewed Host composition. For a composition that normally contains `- name: '@deepseek-ai/dsh-compaction-basic'`, remove that single row and use this row in the same scope:
52
+
53
+ ```yaml
54
+ - name: 'dsh-github-copilot/manual-compaction-recovery'
55
+ config:
56
+ auto: true
57
+ maxTokens: 65536 # example only: preserve the reviewed original cap
58
+ ```
59
+
60
+ Keep the existing BasicCompactionConfig, including any modelPolicies and actual maxTokens; configure a summary route deliberately if the last committed model cannot serve the summary. Do not enable two compaction services or modify a live profile without explicit approval. The normal plugin and all ordinary sessions remain usable without this replacement; the package export alone neither installs it nor changes an existing Session.
61
+
62
+ ## Acceptance and retirement
63
+
64
+ Focused tests must exercise oversized balanced histories, native durable replacement and no replacement on cancellation, truncation, stale source or proof, irreducible units and bounded-call exhaustion. Verify the exact published Core source fixture, frozen install, full plugin gate and immutable package smoke before describing a deployable release. CI with synthetic transport proves no live Copilot availability. Retire this companion path only when official compaction safely handles independent prompt ceilings and multi-call/manual recovery with equivalent durable audit, lifecycle and transaction guarantees.
@@ -0,0 +1,164 @@
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
+
18
+ ## Regression evidence
19
+
20
+ - 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.
21
+ - Cover missing/conflicting endpoints, missing/invalid limits, duplicate conflicting IDs, explicit denial, stale account snapshots, unsupported reasoning labels, unknown fields and hostile extra getters.
22
+ - 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.
23
+ - 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.
24
+ - 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.
25
+ - 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.
26
+
27
+ ## Explicit public-interface limits
28
+
29
+ - 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.
30
+ - 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.
31
+ - 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.
32
+ - 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.
33
+ - 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.
34
+
35
+ ## Delivery and local acceptance
36
+
37
+ - 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.
38
+ - Publish the aligned version through the protected Release workflow and verify the release/tag/commit/assets/checksum.
39
+ - 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.
40
+ - 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.
41
+ - Report remaining limitations honestly, including unavailable provider metadata, unsupported protocols, optional summaries and any unperformed live checks.
42
+
43
+ ## Metadata references
44
+
45
+ - [Microsoft Copilot API types](https://github.com/microsoft/vscode/blob/main/src/typings/copilot-api.d.ts)
46
+ - [Endpoint-driven Copilot discovery implementation reference](https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/plugin/github-copilot/models.ts)
47
+ - [pi v0.85.1 release](https://github.com/earendil-works/pi/releases/tag/v0.85.1)
48
+ - [pi v0.87.1 release](https://github.com/earendil-works/pi/releases/tag/v0.87.1)
49
+
50
+ 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.
51
+
52
+ ## Authentication, replay and request diagnostics
53
+
54
+ These failures have different owners; do not repair every rejection by signing out.
55
+
56
+ | Diagnostic | Boundary and safe action |
57
+ |---|---|
58
+ | `COPILOT_AUTHORIZATION_BEGIN_FAILED` | Sign-in did not complete; interaction milestones are not a credential commit or root-cause proof |
59
+ | `COPILOT_ROUTE_REPAIR_FAILED` | Authentication is retained; review legacy configuration and use explicit repair |
60
+ | Native AUTH / HTTP 401 | Exact managed proof may be retired; a later explicit request/discovery can renew natively, not replay the failed message |
61
+ | `COPILOT_RESPONSES_REPLAY_SCOPE_MISMATCH` | Exact uncoded item-scope rejection is request-local INVALID_REQUEST, without invalidating shared proof/other requests |
62
+ | `COPILOT_RESPONSES_REPLAY_UNSUPPORTED` | Incomplete/reference-only historical payload lacks safe reconstruction evidence |
63
+ | `COPILOT_REQUEST_BODY_TIMEOUT` | Strict verified request-body 408; composition/timing is not proof of overflow or network cause |
64
+
65
+ HTTP auth recovery is bounded by account cooldown, including forced discovery.
66
+ An old late response cannot invalidate a newer sign-in. HTTP 403, network errors
67
+ and strings mentioning 401 are not auth evidence; malformed/ambiguous/oversized
68
+ bodies retain native handling. HTTP tests do not prove WebSocket recovery.
69
+
70
+ ### Responses replay compatibility
71
+
72
+ The public SDK payload hook normalizes only direct IDs on complete assistant
73
+ messages, function calls and encrypted reasoning items. A narrowly recognized
74
+ empty completed reasoning shell can be omitted from outgoing requests only with
75
+ empty summary/content, no encrypted content and no unknown fields. Durable
76
+ history, public summaries, opaque bytes, nested IDs, phase and `call_id` pairing
77
+ stay unchanged.
78
+
79
+ The source-checkout follow-up for #279 adds bounded structure evidence to an
80
+ exact verified scope rejection: total items, direct ID fields, reference items,
81
+ encrypted reasoning items, unrecognized items, `previous_response_id`/`store`
82
+ state and presence of the two native session/request headers. It observes the
83
+ final HTTP dispatch, not the earlier SDK payload before caller replacement.
84
+ Only fixed labels and counts enter the existing error; no IDs, header values,
85
+ message text, arguments, results or opaque bytes are retained. The shared
86
+ 16 MiB/depth/work diagnostic limits apply; unavailable evidence never becomes
87
+ zero counts. Historical errors without this suffix have no such evidence.
88
+ Structure counts alone do not repair cross-turn scope rejection: zero direct
89
+ IDs does not prove encrypted replay is portable.
90
+
91
+ ### Explicit session replay recovery
92
+
93
+ After an exact verified managed Responses scope rejection, **Replay recovery**
94
+ in that session's composer automatically offers the failed request's old
95
+ encrypted items on opening the eligible session, when its native `running`
96
+ snapshot settles, or when its `lastAgentError` changes while idle. These public
97
+ Session snapshot changes trigger read-only Host evidence reads, not model calls,
98
+ history reads, new durable events or polling. Normal sessions show no notice.
99
+ Dismissal is local to the mounted model/session and evidence revision; a new
100
+ failure can reappear. Read errors remain distinct from missing evidence.
101
+
102
+ Choose **Review recovery options**, then **Next matching turn only** (the
103
+ default choice) or **Continue in this session**, and **Accept loss and authorize**.
104
+ This does not send a message or retry the failed request. Use the native Send or
105
+ Retry control separately; the plugin adds no competing sender. Complete native
106
+ replay remains the default until explicit consent.
107
+
108
+ Next-turn consent is admitted on the next bound, matching-model native request
109
+ and covers all steps and native retries of that turn, not just one HTTP attempt.
110
+ It is consumed at that turn's `turn/end`, including cancelled/failed turns.
111
+ Other models, purposes and unbound requests cannot consume it. Session consent
112
+ survives turn endings but shares the same bounded evidence/proof lifetime.
113
+ Controls are disabled during a native turn; Host checks remain authoritative.
114
+
115
+ This is lossy recovery, not a supplier-scope repair. Only complete normalized
116
+ encrypted reasoning items whose entire serialized fingerprints match that
117
+ failed request are omitted from later outgoing requests in the same session
118
+ and model. Their hidden state **and their item summaries** are no longer sent;
119
+ displayed messages, tool calls/results and stored history are not modified.
120
+ New or changed reasoning items remain native-owned. Another scope failure
121
+ requires fresh confirmation rather than broadening enabled omission silently.
122
+
123
+ Evidence is bounded to 64 sessions, 512 distinct items per session, and one
124
+ hour in the current Host. Only hashes, a model label and confirmation metadata
125
+ are retained, never opaque payloads. The Client receives count/model/state,
126
+ an opaque revision, optional duration and evidence expiry only. The original
127
+ `get`/`setEnabled` descriptors retain their identities; `setEnabled(true)` still
128
+ means bounded session consent, and additive `authorize` selects a duration.
129
+ A one-shot expiry read updates the mounted notice, not a polling timer.
130
+ Token/account/metadata proof discontinuity, expiry,
131
+ session disposal or Host restart revokes evidence; an old error on disk cannot
132
+ create a candidate. Re-read status after these changes. Disabling affects
133
+ future requests and does not undo answers already generated.
134
+
135
+ Admission requires the initiating native Agent request signal and exact
136
+ session; unbound requests, compaction, titles, classifier requests, other
137
+ models and other sessions cannot borrow consent. Active-turn writes are
138
+ rejected. Public native Client/Host gateways enforce explicit Agent lookup;
139
+ no ambient Client session projection is added. No Core changes, credentials
140
+ reset, history rewrite, general wire adapter or automatic business retry is
141
+ introduced. This is not a remedy for HTTP 408, quota or context limits.
142
+
143
+ Two explicitly authorized real-history diagnostic calls reproduced HTTP 401
144
+ with 12 old encrypted items and returned HTTP 200 after omitting exactly those
145
+ items in a disposable request copy, preserving all 80 tool pairs. This
146
+ implicates the old item set, not any specific item, token rotation or backend
147
+ expiry rule. Sequential calls cannot freeze hidden supplier state. Synthetic
148
+ request-chain and native gateway tests qualify the opt-in mechanism; they do
149
+ not establish that every rejected history is recoverable or that an installed
150
+ runtime has enabled it.
151
+
152
+ After actual HTTP 408, a newly prepared attempt in the same native step can
153
+ reuse exact normalized payload only when transcript/every other field agree,
154
+ with matching references and no conflicts. Evidence is bound to Session/model/
155
+ account proof and original signal, expires in 60 seconds, is limited to 2 MiB
156
+ and clears on next step/turn, concurrency, cancellation or account discontinuity.
157
+ This creates no retry or cold-history reconstruction. Canonical/other routes,
158
+ protocols and native retry policy stay unchanged. Synthetic adapter tests are
159
+ not acceptance proof for an old conversation. Never discard opaque reasoning,
160
+ rewrite history, replay business work or reset credentials automatically.
161
+
162
+ For TLS/quota, see [trust boundaries](./copilot-usage.md#account-data-boundary).
163
+ For HTTP 408 and oversized summaries, see
164
+ [budget and recovery limits](./copilot-compaction.md#existing-oversized-history-and-recovery-limits).
@@ -0,0 +1,149 @@
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
+ ## Trusted publishing
20
+
21
+ [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) requires npm
22
+ >=11.5.1 and Node >=22.14.0. Publishing uses Node 24 and pinned npm 11.5.1;
23
+ development retains the package's pnpm pin.
24
+
25
+ | Publisher field | Value |
26
+ |---|---|
27
+ | Provider | GitHub Actions, GitHub-hosted runner |
28
+ | Owner / repository | `cloga` / `dsh-github-copilot` |
29
+ | Workflow | `ci.yml` caller, not reusable `release.yml` |
30
+ | Environment | Unset |
31
+ | Allowed action | Direct `npm publish` |
32
+
33
+ Caller and reusable workflow grant `id-token: write`. No normal release uses
34
+ `NPM_TOKEN` / `NODE_AUTH_TOKEN` or persistent-token fallback. Direct publication
35
+ permission is explicit, not implied by a stage. Staged publication is separately
36
+ approved, pending npm maintainer review/2FA, not live; it reserves the version.
37
+ [`npm stage publish`](https://docs.npmjs.com/cli/v11/commands/npm-stage/) requires
38
+ an existing package and cannot bootstrap one. Do not change auth/2FA policy to
39
+ repair publication.
40
+
41
+ ## Same bytes, recovery and tags
42
+
43
+ The non-cancelling repository release concurrency group serializes publication.
44
+ External publishers must coordinate; dist-tags are not atomic CAS.
45
+
46
+ After the complete compatibility gate, pack once with
47
+ `pnpm --config.ignore-scripts=true pack --pack-destination artifacts`.
48
+ Verification already built/prepacked. Recovery downloads the original uploaded
49
+ archive, verifies tag/source, size/digests, SHA-256/SHA-512 and build equality,
50
+ and never repacks/overwrites immutable bytes. Release assets include
51
+ `SHA256SUMS`; npm receives that same archive with lifecycle scripts disabled.
52
+
53
+ Only registry E404 establishes absence. Auth, TLS, malformed metadata and network
54
+ failures stop delivery. Existing exact versions require matching SRI and a
55
+ same-channel tag at that version or newer; conflicting bytes fail closed.
56
+ Visibility can lag a successful write. After successful/uncertain publication,
57
+ wait for visibility and reconcile read-only; **never automatically republish**.
58
+ A missing/older tag needs review, not a hidden dist-tag write.
59
+
60
+ SemVer ordering prevents downgrades. Missing older releases are not published
61
+ when their channel already points newer; reconciling existing older bytes never
62
+ lowers the pointer. Report GitHub tag/commit/assets/SHA-256 and npm version/SRI
63
+ separately. One channel succeeding is partial delivery.
64
+ [Read-only reconciliation](./npm-publication-readback.md).
65
+
66
+ ## Installation preflight still applies
67
+
68
+ Desktop's native package manager accepts an exact verified npm spec, not a URL
69
+ or local archive. Generic/global CLI entry points must not be assumed to manage the reserved
70
+ `desktop` profile. Qualify Desktop's dedicated entry below.
71
+
72
+ Neither entry replaces the checksum-verified package's
73
+ `scripts/check-search-composition.mjs` preflight. Official `composeProfile()`
74
+ writes the empty `cordis.yml` root during normal launch, including resolved
75
+ Desktop profiles. `NONEMPTY_DISPOSABLE_PROFILE_ROOT` must therefore stop
76
+ installation/startup until its contents are preserved and reviewed.
77
+
78
+ A nonempty root may be reconstructible from existing bundles and persistent
79
+ patches, but must never be assumed disposable. Establish complete equality
80
+ through public composition and recheck source hashes before any separately
81
+ approved normalization. Installation approval is not blanket configuration
82
+ deletion approval. Check actual shared-peer resolution for stale profile-local
83
+ shadows; do not patch/copy peers as a plugin compatibility workaround.
84
+
85
+ ### Desktop-bundled CLI on official rc.2
86
+
87
+ Read-only inspection of official `@deepseek-ai/dsh-desktop-host@0.2.0-rc.2`
88
+ `lib/cli.js` confirms `runDesktopCli` calls public `runCli` with
89
+ `manageDesktopProfile: true` and bundled pnpm through Electron Node mode.
90
+ This capability is specific to the qualified entry, not a global shim or an
91
+ unverified future release.
92
+
93
+ Resolve the intended installation's `resources\runtime\cli\bin\dsh.cmd`, verify
94
+ its owning version/public entry and exact profile/home/anchor; do not rely on
95
+ PATH. With explicit installation approval, verified bytes and `supported: true`:
96
+
97
+ ```powershell
98
+ & '<verified Desktop installation>\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add '<absolute path to verified release.tgz>'
99
+ ```
100
+
101
+ This example grants no action permission or universal offline guarantee.
102
+ Dependencies still require an approved registry or complete authorized cache.
103
+ CLI support does **not** override composition safety: when preflight fails,
104
+ no add, root rewrite or
105
+ restart followed merely to get past that diagnostic is authorized.
106
+ Use one writer, a private metadata backup, guarded edits and full package/bundle/
107
+ patch/peer readback. Installed-on-disk and loaded runtime remain distinct.
108
+ Stopping/restarting requires separate restart approval.
109
+
110
+ ## Controlled offline CLI maintenance for standalone profiles
111
+
112
+ This installs a prebuilt verified Release using existing authorized caches;
113
+ it is not permission to bypass organizational registry restrictions.
114
+ It does not fix TLS or prove public npm health. **Do not use this path
115
+ unchanged for a Desktop-managed/reserved profile**: qualify Desktop's own entry
116
+ and retain independent preflight/approval checks.
117
+
118
+ 1. Obtain explicit installation approval for exact version/profile. Resolve
119
+ standalone CLI, install anchor, home and profile; do not infer ownership from
120
+ PATH or target reserved Desktop with a generic entry.
121
+ 2. Verify original Release bytes with an independently trusted SHA-256,
122
+ package name/version and safe archive layout. Extract only that artifact,
123
+ never a substitute local build or repack.
124
+ 3. Run `scripts/check-search-composition.mjs` with all startup patches and require
125
+ `supported: true`. Unknown/conflicting composition stops before mutation.
126
+ 4. Keep one writer. Take a private backup of package/lock/bundle/patch metadata
127
+ and record rollback bytes. Do not copy credential stores, `.env` or browser
128
+ storage. Host shutdown needs separate permission.
129
+ 5. Invoke the qualified CLI:
130
+
131
+ ```sh
132
+ dsh plugin --profile web add /absolute/path/to/verified-release.tgz --offline --ignore-scripts
133
+ ```
134
+
135
+ Offline needs existing cache; ignore-scripts excludes uncontrolled lifecycle
136
+ work. If cache is incomplete or a build is required, stop. Do not silently
137
+ remove flags, change registry or acquire blocked dependencies elsewhere.
138
+ Keep TLS verification enabled; platform refusals remain authoritative.
139
+ 6. Check exit result, installed version, lock/files and all metadata differences.
140
+ Re-run preflight and import-only smoke without plugin activation. CLI may
141
+ reconcile `dsh.profile.bundles`; preserve unrelated entries and review
142
+ unexpected changes. Use package manager, never manual node_modules copying
143
+ or Core patches. A failed command is not proof nothing changed.
144
+ 7. Report version/checksum/backup and evidence limits. Obtain restart approval,
145
+ then separately verify loaded build and intended behavior.
146
+
147
+ Rollback needs fresh-state review and narrow restoration of this operation's
148
+ changes, never a whole backup over later user edits. This procedure grants no
149
+ 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.