dsh-github-copilot 0.1.0-alpha.5.dsh.0.2.1.rc.3 → 0.1.0-alpha.6.dsh.0.2.2.rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/AGENTS.md +91 -4
  2. package/CHANGELOG.md +43 -0
  3. package/CONTRIBUTING.md +4 -0
  4. package/README.md +140 -379
  5. package/README.zh.md +100 -338
  6. package/cordis.patch.yml +0 -13
  7. package/deployment-baseline.json +128 -270
  8. package/docs/agent-readiness.md +1 -1
  9. package/docs/auto-high-cost.md +4 -0
  10. package/docs/auto-review-sampling.md +27 -4
  11. package/docs/auto-task-routing.md +4 -0
  12. package/docs/automatic-model-routing.md +4 -0
  13. package/docs/copilot-accounts.md +39 -7
  14. package/docs/copilot-usage.md +20 -4
  15. package/docs/dual-model.md +13 -8
  16. package/docs/model-compatibility-acceptance.md +97 -203
  17. package/docs/plugin-diagnostics.md +18 -40
  18. package/docs/session-search-routing.md +4 -0
  19. package/docs/web-lifecycle-rc2.md +13 -12
  20. package/lib/client.js +2730 -1645
  21. package/lib/client.js.map +1 -1
  22. package/lib/{copilot-identity-DRZY_d2X.js → copilot-identity-BF8J8-9O.js} +1 -4
  23. package/lib/diagnostics-analysis.js +1 -1
  24. package/lib/{diagnostics-types-CF-qg8Do.js → diagnostics-types-eEWwFOFD.js} +2 -42
  25. package/lib/index.js +1320 -4832
  26. package/lib/manual-compaction-recovery.js +2 -2
  27. package/lib/remote.js +15 -1
  28. package/lib/routed-web.js +9 -4
  29. package/lib/traditional-search-CgIL4oRu.js +114 -0
  30. package/lib/types/auto-model-presentation.d.ts +4 -0
  31. package/lib/types/client.d.ts +1 -3
  32. package/lib/types/compatibility.d.ts +5 -5
  33. package/lib/types/context-evidence.d.ts +4 -4
  34. package/lib/types/copilot-accounts-host.d.ts +5 -0
  35. package/lib/types/copilot-system-trust.d.ts +3 -0
  36. package/lib/types/copilot-usage-card.d.ts +14 -0
  37. package/lib/types/copilot-usage-host.d.ts +9 -0
  38. package/lib/types/copilot-usage-remote.d.ts +10 -0
  39. package/lib/types/copilot-usage-types.d.ts +3 -1
  40. package/lib/types/index.d.ts +2 -15
  41. package/lib/types/model-preferences-card.d.ts +1 -1
  42. package/lib/types/native-copilot-access.d.ts +16 -0
  43. package/lib/types/native-copilot-search.d.ts +5 -0
  44. package/lib/types/preview-route.d.ts +2 -1
  45. package/lib/types/session-continuation-ui.d.ts +1 -0
  46. package/lib/types/tool-schema-compat.d.ts +4 -14
  47. package/lib/types/traditional-search.d.ts +3 -1
  48. package/lib/types/turn-selection-card.d.ts +2 -1
  49. package/package.json +73 -72
  50. package/scripts/check-search-composition.mjs +14 -38
  51. package/lib/search-routing-CV2hs8as.js +0 -792
  52. package/lib/types/parent-model-follow-card.d.ts +0 -32
  53. package/output/auto-model-mockup/index.html +0 -207
package/AGENTS.md CHANGED
@@ -27,11 +27,87 @@ This repository follows a **plugin-only** policy: implement fixes in `dsh-github
27
27
 
28
28
  Use native DSH tools for goals, background jobs and scoped subagents. Use local Git and the GitHub REST API for delivery; no external orchestration daemon, roster or `vcs_*` tool is required. Do not assume a model provider's identity is the assisting agent.
29
29
 
30
- ## Product and architecture
30
+ ## Session isolation and temporary artifacts (#442)
31
+
32
+ - Prefer one app-managed worktree per independent repository session when supported and authorized. A branch-backed session, folder session or shared checkout is not necessarily isolated. Verify the actual workspace and branch; preserve the user's chosen workspace. Creating or checking out another worktree still requires separate approval.
33
+ - Store temporary evidence, downloads, scratch files and backups in the session-owned artifact area outside the repository checkout. Keep only intentional deliverables in the repository. Clean up only explicitly identified temporary files created by the current task; never hide, move, delete or stage pre-existing files merely to make a gate pass.
34
+ - Inspect the explicit staged and committed diff before delivery. Unrelated untracked files are not by themselves a Git conflict or proof of a GitHub permission failure. Respect each delivery tool's own instructions and allowed fallback paths; repository guidance cannot override those requirements or branch protection.
35
+ - Continue routine investigation and authorized delivery without repeated approval prompts. For a genuine decision, safety boundary or tool-policy blocker, ask or report it once with the exact consequence; do not loop while the user is unavailable. Preserve existing approval boundaries for profile installation, sign-out, disruptive restart and worktree checkout.
31
36
 
32
- `dsh-github-copilot` currently admits and targets only official DSH `0.2.1-rc.3`, a prerelease. The prior thirteen DSH pins remain in `deployment-baseline.json` as historical evidence, not current support or CI release gates. Rc.3 source/artifact CI qualification passed on Windows/Linux in run `40098031196`; Desktop artifacts/signatures remain unverified. Do not treat this unpublished candidate as a production Core upgrade recommendation. The signed rc.2 Desktop evidence is historical peer ownership only. Rc.2 installations must retain alpha.15 or their existing compatible plugin. It does not own a general Copilot chat adapter. DSH's built-in `llm-pi-ai` mount owns the GitHub Copilot provider, catalog, OAuth method and grant format, token exchange, refresh, and normal model transport.
37
+ These are agent instructions and contract-drift checks, not a filesystem sandbox or a guarantee that every session uses a worktree.
33
38
 
34
- This repository maintains twelve narrow surfaces and ownership boundaries:
39
+ ## Product and architecture
40
+
41
+ ### Confirmed product scope (#455, #456)
42
+
43
+ The native enhancement request (#460/#461) adds only reviewer-scoped Responses
44
+ sampling compatibility and an optional canonical-account hosted-search backend.
45
+ Use public native ownership/configuration proof and prepared dispatch; never
46
+ replace Web, select a backend, migrate accounts/settings, or bypass review.
47
+ Search permits one fixed capability proof and one final query within 25 seconds,
48
+ with four concurrent operations and configuration/credential/disposal fences.
49
+ The former plugin routing UI and managed Auto remain retired. Supplier calls,
50
+ live installation and restarts are separate from synthetic CI acceptance.
51
+
52
+ The user-confirmed direction on 2026-11-14 supersedes conflicting legacy feature
53
+ requirements below: this plugin is a lightweight GitHub Copilot model integration
54
+ for DSH Desktop, not a second agent product. The qualification target is the exact
55
+ official DSH `0.2.2-rc.3` source and published package graph; it is a candidate,
56
+ not supported or delivered until the required CI gates pass.
57
+
58
+ DSH owns application login, AgentLoop, model selection, Auto, parent-model
59
+ following, subagents, tools, Web, permissions, history, context/compaction, and
60
+ Usage. The plugin owns only Copilot's native OAuth/credential integration,
61
+ account-proven model and capability discovery, published-adapter composition,
62
+ and narrowly evidenced Copilot compatibility. Do not add a DeepSeek login check,
63
+ read DeepSeek credentials, add another Copilot login or wire, or redirect failed
64
+ Copilot calls to another provider.
65
+
66
+ Parent/child relationships, inheritance, delegation, lifecycle and scheduling
67
+ follow DSH's native contract, not a plugin-defined policy. Subagent compatibility
68
+ means supplying models to that existing flow. Do not add a child-account
69
+ inheritance mode, parent lookup as credential authority, or plugin-owned child
70
+ routing. Verify authentication and request isolation through the same provider
71
+ contract used by ordinary native calls. A missing public seam is a concrete
72
+ compatibility limit to report, not permission to invent a parallel relationship.
73
+
74
+ Retire plugin-owned Auto and parent-follow policy/UI and custom hosted-search
75
+ execution/routing. Old conversation continuity is not an acceptance requirement.
76
+ Retain GitHub Copilot account quota and useful
77
+ enhancements; remove other functionality only when it is demonstrably redundant
78
+ or unnecessary, not merely because it extends the basic model route. Never delete
79
+ or rewrite user settings, accounts, or history, silently substitute a model, or
80
+ claim a native replacement until the
81
+ exact public API and behavior are verified. Preserve necessary Copilot
82
+ authentication, account/turn isolation, request correctness, and actionable
83
+ diagnostics. HydraFusion/Max are explicitly out of scope (#441).
84
+
85
+ Model-facing DSH capabilities added over time, including native subagent model
86
+ selection and actual child invocation (#456), are compatibility goals for
87
+ account-available Copilot models. Verify each against exact public Core APIs and
88
+ supplier-advertised capabilities with focused tests. Unknown metadata or
89
+ unsupported behavior must fail or diagnose explicitly; do not infer support,
90
+ add model-ID routing rules, patch Core, or claim untested parity.
91
+
92
+ When any later legacy detail in this guide conflicts with this confirmed scope,
93
+ follow this section and the current acceptance criteria in #455/#456.
94
+
95
+ The user clarified that the ordinary route should be DSH's native
96
+ `github-copilot` provider, with only useful plugin enhancements through public
97
+ APIs. Retire the separate managed route when native-route acceptance is met;
98
+ do not preserve it solely to continue old conversations or create a history
99
+ migration. Existing stored conversations, credentials and settings are not
100
+ authorized for deletion or rewriting. Explicitly document that old managed
101
+ route selections may become unavailable. Native model selection and actual
102
+ subagent invocation must be verified on `github-copilot`, not inferred from
103
+ managed-route tests. Record enhancements that cannot safely attach to native
104
+ APIs rather than patching Core or misrepresenting support.
105
+
106
+ The last qualified release line is official DSH `0.2.1-rc.3`; its source/artifact CI passed on Windows/Linux in run `40098031196`, while Desktop artifacts/signatures remain unverified. DSH `0.2.2-rc.3` is the current requested candidate and has not passed this repository's required CI. The previous thirteen pins remain historical evidence, not current support or release gates. Do not treat either prerelease as a production Core upgrade recommendation. DSH's built-in `llm-pi-ai` owns the canonical GitHub Copilot provider, OAuth, grant format, token exchange, refresh, and normal model transport.
107
+
108
+ The following is a historical architecture inventory, not a requirement to keep
109
+ every surface as a product feature; apply the confirmed scope above when deciding
110
+ which runtime registrations, UI, and settings remain active:
35
111
 
36
112
  1. A conditional authorization-service bootstrap plus Host controller that joins DSH authorization, credentials, and settings.
37
113
  2. A Client Models provider-card contribution with one shared account-state owner, Client-safe Remote descriptors and a nested plugin-owned model-preferences disclosure; embed in an existing configured canonical row, suppress its separate footer controller, and retain footer/old-Core section fallback when no such row is mounted.
@@ -92,6 +168,17 @@ See `src/compaction-replay.ts` and `docs/manual-compaction-recovery.md` (#349).
92
168
 
93
169
  ## Approved multi-account ownership extension (#297)
94
170
 
171
+ The explicit #470 enhancement permits managed-account switching alongside
172
+ independently configured native Copilot. Keep native UI and label the managed
173
+ route `GitHub Copilot (multi-account)`; do not mirror grants, intercept native
174
+ credentials, redirect native requests or change native selections. Missing
175
+ managed registration and incomplete evidence remain blockers. Reuse native
176
+ canonical quota/search isolation; do not revive retired Auto or routing UI.
177
+ Disposal removes only plugin registrations. Plugin-model selections and explicit
178
+ `web.searchProvider=github-copilot-hosted` need user-selected replacements before
179
+ uninstall; missing configured Web backends return `WEB_PROVIDER_CONFIGURED_MISSING`,
180
+ not automatic fallback. No automatic Settings/history migration or sign-out.
181
+
95
182
  Login environments (#424) use only pinned native pi-ai OAuth for GitHub.com and
96
183
  validated single-label `tenant.ghe.com` Enterprise Cloud hosts. Preserve host
97
184
  binding through identity, duplicate checks, reauthorization and native refresh/
@@ -425,7 +512,7 @@ The release CI matrix targets only exact official `0.2.1-rc.3` on Windows and Li
425
512
  | Last-success timestamp (alpha.7, #97) | Show `snapshot.discoveredAt` once beside count outside Manage: English relative text, full LOCAL date/time/zone tooltip and accessible semantic `time`; missing/invalid/no account hides it, future uses absolute text. Pending/error retains last success, successful refresh replaces it and sign-out clears it. One mounted 60s display-only timer makes no RPC/status/discovery calls and is disposed with timestamp/unmount; cache/discovery lifecycle unchanged |
426
513
  | Definitive `UNKNOWN_MODEL` | One bounded metadata refresh, never message replay or automatic model switching; generic HTTP/network errors are not guessed to be unknown models |
427
514
  | README screenshot | `copilot-search-routing.png` shows the current built plugin-detail routing card with synthetic providers in an isolated browser fixture. It proves only the current presentation surface, not live credentials, provider availability, search success or Desktop activation. |
428
- | Host attach/restart | Reconciles the stored profile; search proofs stay lazy and do not start at attach |
515
+ | Host attach/restart | Does not repair or rewrite the stored native profile; search proofs stay lazy and do not start at attach |
429
516
  | Background credential/reset notifications | Invalidate evidence and clear Client state with read-only status; no forced discovery on every token event; next Models open/use ensures metadata |
430
517
  | Eligible model/search request | May resolve/refresh credentials and run bounded capability proof; changes during proof must fail closed rather than reuse another account's proof |
431
518
  | Release install | Writes a named user profile; installed on disk is not loaded in the running Host |
package/CHANGELOG.md CHANGED
@@ -1,5 +1,48 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.6.dsh.0.2.2.rc.3 (prepared)
4
+
5
+ - Permit managed multi-account switching alongside independently configured native Copilot, retaining credential/turn isolation and the native interface (#470).
6
+ - Label managed models `GitHub Copilot (multi-account)` and preserve native configuration, credentials and selected models on disposal.
7
+ - Clarify that plugin-model and configured plugin-search selections require explicit replacements before uninstall; no automatic fallback or settings rewrite.
8
+
9
+ ## 0.1.0-alpha.5.dsh.0.2.2.rc.3 (prepared)
10
+
11
+ - Show the native Credits account identity only after verifying the canonical OAuth grant and quota belong together; keep quota available when identity is unavailable.
12
+ - Use scoped Node and system certificate trust for the existing GitHub identity lookup without weakening TLS verification.
13
+
14
+ ## 0.1.0-alpha.4.dsh.0.2.2.rc.3 (prepared)
15
+
16
+ - Remove the hosted-search aside from the managed account-model summary and hide retired Auto descriptions when no historical diagnostic data exists. Historical Auto data remains available and is identified before JSON sharing, including its possible model IDs (#467).
17
+ - Preserve existing settings, diagnostic evidence, quota and compatibility; no live profile, history or account is changed.
18
+ - Target DSH 0.2.2-rc.3; publication and live Desktop activation remain separate from this source change.
19
+
20
+ ## 0.1.0-alpha.3.dsh.0.2.2.rc.3 (prepared)
21
+
22
+ - Extend reviewer-only temperature omission to qualified DSH native `github-copilot` Responses calls, preserving ordinary Chat and native verdict/permission ownership (#460).
23
+ - Add optional canonical-account Copilot hosted search through the existing native Web registry, with one bounded proof and one final query, cancellation and configuration/credential invalidation (#461).
24
+ - Preserve native settings, selected backends, accounts and histories. No live installation, restart or supplier acceptance is implied.
25
+
26
+ ## 0.1.0-alpha.2.dsh.0.2.2.rc.3 (prepared)
27
+
28
+ - Explain the native provider's canonical OAuth binding and the existing additional-account coexistence limit, while retaining the visible account panel outside the native Add draft (#458).
29
+ - Bind native-route quota to the canonical OAuth record rather than the plugin-selected account, and show an explicit unavailable state when native credential or endpoint attribution cannot be proven.
30
+ - Keep native quota and context-incident diagnostics available without optional managed-route Remotes, and stop automatically modifying native provider settings at startup or sign-in.
31
+ - Exercise native Copilot subagent selection and synthetic concurrent requests with the plugin absent, enabled and disposed.
32
+ - The native route still uses its own catalog; account-discovered models apply to `github-copilot-preview`. Copilot-hosted search, native Auto-review sampling compatibility and native per-Session multi-account routing remain incomplete.
33
+ - Live OAuth, provider calls, billing attribution and Desktop activation remain unverified.
34
+
35
+ ## 0.1.0-alpha.1.dsh.0.2.2.rc.3 (prepared)
36
+
37
+ - Begin narrowing the product to account-authorized Copilot models through DSH's published native adapter. Plugin-owned Auto and parent-follow routing and hosted-search composition are retired in the candidate; preserve account quota and review other enhancements before removing only demonstrably unnecessary functionality.
38
+ - Hide inactive Auto and parent-follow settings and remove the obsolete Auto high-cost marking control without changing saved preferences; retain legacy settings and Remote for compatibility.
39
+ - Preserve historical account, model and incomplete-Usage evidence separately from retired Auto selection UI; never reconstruct account history or replace native Usage.
40
+ - Label retired Auto and parent-follow documentation as historical and omit the obsolete Auto UI mockup from the package.
41
+ - Require account-metadata-driven native subagent model selection and actual child invocation, including supported Thinking and concurrent/account-bound request checks; synthetic exact-source fixtures passed on Windows and Linux, but do not establish live supplier or Desktop behavior.
42
+ - Target DSH ownership of parent/child relationships, inheritance and scheduling; legacy dedicated-role orchestration still requires safe retirement.
43
+ - Remove HydraFusion/Max from scope. No additional login, Core changes, model-name routing rules, silent provider substitution, publication, profile installation, or Desktop restart is included.
44
+ - Target official DSH 0.2.2-rc.3. Required Windows/Linux CI, pnpm-lock alignment, publication, profile installation, and loaded-runtime compatibility remain unverified.
45
+
3
46
  ## 0.1.0-alpha.5.dsh.0.2.1.rc.3 (prepared)
4
47
 
5
48
  - Replace the stale rc.2 Desktop lifecycle heading with version-neutral guidance. Recommend a full exit and restart only when the native plugin manager reports `restart-required`; do not repeatedly toggle an Off plugin when the manager reports only pending service dependencies.
package/CONTRIBUTING.md CHANGED
@@ -33,6 +33,10 @@ Core inspection is read-only. Isolated tests may use unchanged pinned Core artif
33
33
 
34
34
  Generated `lib/` output, archives, `.env`, tokens, local credentials, machine state and production screenshots with real authorization codes must not be committed. Use synthetic fixtures for screenshots and report staged UI honestly.
35
35
 
36
+ The project disables pnpm's minimum package publication age. Newly published
37
+ dependencies can therefore be installed immediately; lockfile integrity and
38
+ the required CI and release checks still apply.
39
+
36
40
  ## Task acceptance pilot
37
41
 
38
42
  Define requirement IDs, expected behavior, verification methods and non-goals