dsh-github-copilot 0.4.0-alpha.58 → 0.4.0-alpha.60
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.
- package/AGENTS.md +5 -5
- package/CHANGELOG.md +11 -0
- package/README.md +16 -14
- package/README.zh.md +16 -14
- package/deployment-baseline.json +3 -2
- package/docs/automatic-model-routing.md +5 -5
- package/docs/session-search-routing.md +8 -0
- package/lib/client.js +127 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +218 -41
- package/lib/remote.js +28 -0
- package/lib/routed-web.js +1 -1
- package/lib/{search-routing-CncYAO8_.js → search-routing-BhrTbF-V.js} +8 -1
- package/lib/types/authorization-controller.d.ts +14 -0
- package/lib/types/client.d.ts +1 -0
- package/lib/types/config.d.ts +16 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/model-exclusions.d.ts +7 -0
- package/lib/types/model-preferences-card.d.ts +9 -0
- package/lib/types/preview-route.d.ts +1 -1
- package/lib/types/remote.d.ts +19 -0
- package/lib/types/settings-reader.d.ts +5 -0
- package/package.json +6 -5
package/AGENTS.md
CHANGED
|
@@ -34,12 +34,12 @@ Use native DSH tools for goals, background jobs and scoped subagents. Use local
|
|
|
34
34
|
This repository owns eleven narrow surfaces:
|
|
35
35
|
|
|
36
36
|
1. A conditional authorization-service bootstrap plus Host controller that joins DSH authorization, credentials, and settings.
|
|
37
|
-
2. A Client Models provider-card contribution with one shared account-state owner
|
|
37
|
+
2. A Client Models provider-card contribution with one shared account-state owner, Client-safe Remote descriptors and a nested plugin-owned model-preferences disclosure; embed in an existing configured canonical row, suppress its separate footer controller, and retain footer/old-Core section fallback when no such row is mounted.
|
|
38
38
|
3. Strict JSON normalization of pi-ai's provider-owned Copilot OAuth grant.
|
|
39
39
|
4. Preserve intentional absence of `llm-pi-ai.providers.github-copilot`; reconcile only existing legacy profiles and verified ownership journals. Fresh installations use the single account-discovered route; existing profiles require explicit migration, never silent removal.
|
|
40
40
|
5. Direct provider-hosted search using the same Host-side credential lifecycle.
|
|
41
41
|
6. Provider-scoped tool-schema compatibility for Copilot payload behaviors; Core remains the tool and execution owner.
|
|
42
|
-
7. A bounded account-discovery route that supplies validated endpoint/capability metadata to the published native adapter, without maintaining model-ID routing rules or changing Core's catalog.
|
|
42
|
+
7. A bounded account-discovery route that supplies validated endpoint/capability metadata to the published native adapter, plus exact plugin-owned model exclusions enforced across its directory, Auto pools and direct admission, without maintaining model-ID routing rules or changing Core's catalog.
|
|
43
43
|
8. Optional, provider-scoped Chat presentation for completed empty reasoning disclosures; durable content and encrypted replay metadata remain Core-owned.
|
|
44
44
|
9. Compatibility-only policy restoration and request recovery for existing dedicated planner/executor Sessions. Model roles UI, settings writes and new dedicated roots are retired (#158); never reintroduce them or migrate histories implicitly.
|
|
45
45
|
10. Managed-route estimated input/output admission, optional exact-request pressure signalling through official compaction recovery, and supported low summary effort only when no effort is already resolved. See [compaction budgets](./docs/copilot-compaction.md). Preserve truthful capacities, requested output caps, native errors/replay and transaction ownership; no hidden history trimming, chunking, new retry loop, competing compaction service or automatic model switch. Preventive guards do not claim recovery of an already oversized manual summary.
|
|
@@ -47,7 +47,7 @@ This repository owns eleven narrow surfaces:
|
|
|
47
47
|
|
|
48
48
|
## Retired model-role compatibility boundary (#158)
|
|
49
49
|
|
|
50
|
-
`src/dual-model-host.ts`, `dual-model-types.ts` and `dual-model-remote.ts` retain compatibility for existing histories; see `docs/dual-model.md`. Do not restore the removed Client card or either Settings entry. `view` reports read-only retirement without discovery; `save` rejects; `create` can only recover a matching already-created request, never create a new root. The three strict Remote wire contracts and
|
|
50
|
+
`src/dual-model-host.ts`, `dual-model-types.ts` and `dual-model-remote.ts` retain compatibility for existing histories; see `docs/dual-model.md`. Do not restore the removed Client card or either Settings entry. `view` reports read-only retirement without discovery; `save` rejects; `create` can only recover a matching already-created request, never create a new root. The three strict Remote wire contracts and ten authorization/model-preference/migration descriptors retain their identities. Restore existing captured policy through the namespaced projection without deleting settings, converting history or changing routes/defaults. Unknown recovery evidence remains uncertain, not permission to create with another UUID. Existing dedicated tool restrictions remain workflow controls, not a sandbox against shell code. Ordinary Session/subagent behavior stays Core-owned; the pending native parent-model rules are separate work, not a new dependency or a shipped capability of this plugin.
|
|
51
51
|
|
|
52
52
|
Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1 baseline; the old v1 assumption was a plugin/test bug. Projection cache `stateVersion: 2` forces refolding, not history conversion. Unknown/v1/v2 or invalid child descriptors fail closed unmodified; review the original child's work and explicitly create a new child if needed, never relabel or fabricate a descriptor. Strict Remote codecs provide alpha.2 `create()` factories and retain the legacy `schema` bridge to the same strict parser, with no `src-json` downgrade.
|
|
53
53
|
|
|
@@ -108,7 +108,7 @@ Alpha.25 admits native `subagent/descriptor` v3, already v3 in the retained rc.1
|
|
|
108
108
|
|
|
109
109
|
- Use no-argument `githubCopilot.migrationStatus()` for fresh live-Agent evidence; generic `session/list` may be stale and plugin inventory alone has no loaded-version evidence. `src/migration-status.ts` reads public leaves synchronously and reports loaded build `plugin.name/version`, `protocolVersion: 1`, `observedAt`, capability flags and completeness flags. Missing/unknown/incomplete is not safe absence.
|
|
110
110
|
- Capabilities are `agentsList`, `sessionProjections`, `settingsCas`, `providerRegistry`, `defaultSelection`; `complete.sessions/defaultSelection/routes` describes evidence completeness, not migration approval. Effective selection uses pending projection, request-header config, then default only for genuinely empty Sessions with known projection state. Running `activeRequestSelection` is the latest recorded header, not proven in-flight LLM work. Native effective configuration and native/managed registration are separate flags.
|
|
111
|
-
- This read invokes no auth status/model discovery, credentials or network and mutates no settings/Sessions. No normal UI/global current-model/search card is added.
|
|
111
|
+
- This read invokes no auth status/model discovery, credentials or network and mutates no settings/Sessions. No normal UI/global current-model/search card is added. Nine ordinary authorization/model-preference Remotes retain their codec; the tenth migration Remote uses a separate strict `GitHubCopilotMigrationStatus` codec.
|
|
112
112
|
- `historyScope: live-agents-only` excludes cold stored histories. Require operator acknowledgement that older conversations may need a new explicit selection later. Loaded version/structural capability self-reports are not full Desktop/Core byte attestation or an atomic cross-namespace guarantee; recheck immediately before CAS.
|
|
113
113
|
- The planned `cloga/dsh-windows-ops` command `tools/migrate-copilot-managed-route.ps1` is separate config-only maintenance after release. V1 performs no automated Session/default writes, cold-history scan, plugin install, restart or full Desktop-baseline acceptance. Resolve selection blockers separately with explicit approval; never report this planned command or live migration as published/installed/completed without evidence.
|
|
114
114
|
|
|
@@ -144,7 +144,7 @@ These pins document compatibility evidence. They do not authorize creating anoth
|
|
|
144
144
|
- Route activation: the dormant `llm-pi-ai` mount observes the profile and registers the route.
|
|
145
145
|
- Client activation: package metadata injects DSH remotes and Models UI; `./client` mounts `./remote`.
|
|
146
146
|
- Provider headers: rc.1 validates configured headers through Fetch and reuses Host-owned headers during model discovery.
|
|
147
|
-
- Remote results: the
|
|
147
|
+
- Remote results: the nine ordinary authorization/model-preference methods retain the Zod v4 `GitHubCopilotAuthorizationView` strict codec required by rc.2 and accepted by rc.1. The tenth no-argument `migrationStatus()` method has a separate strict `GitHubCopilotMigrationStatus` codec; it does not change the ordinary auth contract.
|
|
148
148
|
|
|
149
149
|
When upgrading DSH or pi-ai, inspect the exact tagged public exports and update the baseline, compatibility guard, tests, and docs together. Apply the **official-first policy**: compare each customization's purpose against exact official source/contracts, classify complete/partial/unverified support, choose retain/migrate/retire, and record the remaining gap plus a concrete retirement trigger. Unverified parity is not evidence of absence. Prefer official behavior only after configuration/data migration, safety and runtime acceptance are reviewed; remove redundant paths and their obsolete tests without losing user-visible acceptance coverage. The current comparison is [official-first alpha.2](./docs/official-first-016-alpha2.md).
|
|
150
150
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.60 (prepared)
|
|
4
|
+
|
|
5
|
+
- Add exact account-model exclusions under **GitHub Copilot → Manage → Model preferences**, with local search, visible/excluded counts, explicit **Exclude/Restore** actions, and retained rows for excluded IDs temporarily absent from account metadata (#192).
|
|
6
|
+
- Remove excluded IDs from the managed picker, every Auto candidate pool, aggregate Auto modalities, hosted-search route facts, and request-budget admission. Stale picker or direct requests fail with `COPILOT_PREVIEW_MODEL_EXCLUDED`; Auto fails closed when no eligible model remains.
|
|
7
|
+
- Protect the current fixed managed selection using public default and live Session projection/request-header evidence. Exclusion writes use path-level settings CAS and never rewrite history, switch a Session, mutate the account grant, or change Core's flat picker layout.
|
|
8
|
+
|
|
9
|
+
## 0.4.0-alpha.59 (released)
|
|
10
|
+
|
|
11
|
+
- Fix unavailable Web search routing on official rc.2 by exposing the plugin's live routing fields through native Config projection (#216). Retain narrow CAS writes, separate legacy override reset, ordinary safety configuration and live snapshot consumption without remounting.
|
|
12
|
+
- Replace the manually populated settings test double with a disposable native Loader/ConfigEditor/SettingsForms fixture covering projection, save, conflict rejection and restart persistence.
|
|
13
|
+
|
|
3
14
|
## 0.4.0-alpha.58 (prepared)
|
|
4
15
|
|
|
5
16
|
- Add compact Auto preference and expandable recorded reasons after the native reply time through the public assistant-actions slot; explicit fixed selection shows Manual, absent evidence shows Selection unknown. Remove the separate Model details candidate and repeated model name; actual models stay in native Usage.
|
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@ A focused DSH companion for GitHub Copilot sign-in, account-aware model profiles
|
|
|
11
11
|
|
|
12
12
|
## Current experience
|
|
13
13
|
|
|
14
|
-
- **Account and models:** sign in, inspect account-discovered models, refresh metadata, and manage the account from the native GitHub Copilot row under **Settings → Models**.
|
|
15
|
-
- **Search routing:** choose the primary and fallback search providers under **Plugins → dsh-github-copilot → Details**. The page intentionally exposes only those user-facing choices; protocol probes, timeouts, allowlists, and transport switches are not presented as routine UI. It also keeps the rc.2 lifecycle warning visible before disable/remove/upgrade actions. If the updated routed service is not active yet, the card reports **Restart required** instead of presenting a broken form.
|
|
14
|
+
- **Account and models:** sign in, inspect account-discovered models, refresh metadata, and manage the account from the native GitHub Copilot row under **Settings → Models**. **Manage → Model preferences** can exclude exact models from both the managed picker and Auto without changing Core's flat picker.
|
|
15
|
+
- **Search routing:** choose the primary and fallback search providers under **Plugins → dsh-github-copilot → Details**. The page intentionally exposes only those user-facing choices; protocol probes, timeouts, allowlists, and transport switches are not presented as routine UI. It also keeps the rc.2 lifecycle warning visible before disable/remove/upgrade actions. If the updated routed service is not active yet, the card reports **Restart required** instead of presenting a broken form.
|
|
16
16
|
- **Usage:** eligible Copilot sessions get an optional **Credits** control beside the composer, with provider-reported billing-cycle data and explicit unavailable/stale states. The quota request alone combines Node default and OS trust roots without disabling certificate verification or relying on Desktop launcher environment inheritance.
|
|
17
17
|
- **Compatibility:** the plugin applies Copilot-only tool-schema, reasoning-presentation, request-budget, and account-model compatibility through published DSH APIs. It does not patch Core or maintain a second model catalog.
|
|
18
18
|
|
|
@@ -20,6 +20,8 @@ A focused DSH companion for GitHub Copilot sign-in, account-aware model profiles
|
|
|
20
20
|
|
|
21
21
|
The screenshot uses the current built Client with synthetic providers in an isolated browser fixture. It demonstrates the shipped configuration surface, not live credentials, account access, search success, or production Desktop activation.
|
|
22
22
|
|
|
23
|
+
On official rc.2, routing is exposed through native live `Config` fields, not a manually registered settings namespace. Saving updates the two routing leaves together without remounting the plugin or changing ordinary safety settings. A legacy search-model override is reset only by its separate explicit action.
|
|
24
|
+
|
|
23
25
|
## Compatibility baselines and qualification targets
|
|
24
26
|
|
|
25
27
|
| DSH surface | Exact source pin | Models UI seam |
|
|
@@ -96,7 +98,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
96
98
|
|
|
97
99
|
## Install and sign in
|
|
98
100
|
|
|
99
|
-
The commands below target the package version `0.4.0-alpha.
|
|
101
|
+
The commands below target the package version `0.4.0-alpha.60`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
|
|
100
102
|
|
|
101
103
|
Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
|
|
102
104
|
|
|
@@ -109,10 +111,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
109
111
|
For a standalone named profile only, the supported CLI command is:
|
|
110
112
|
|
|
111
113
|
```sh
|
|
112
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
114
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.60/dsh-github-copilot-0.4.0-alpha.60.tgz
|
|
113
115
|
```
|
|
114
116
|
|
|
115
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
117
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.60` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
|
|
116
118
|
|
|
117
119
|
Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in**, and complete the GitHub device-code flow. Plugin installation changes the selected profile; activation follows that profile's normal reload/restart policy.
|
|
118
120
|
|
|
@@ -122,11 +124,11 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
|
|
|
122
124
|
2. Select **Sign in with GitHub**. The authorization area expands automatically with a prominent one-time code, **Open GitHub verification page**, **Copy code**, and **Cancel sign-in**. No extra **Manage** click is needed. Recognized Desktop v1 hosts use their existing same-window external-navigation handoff to the system browser instead of a popup; web hosts retain a new tab. If nothing opens, select and copy the displayed verification address into your browser. The plugin cannot confirm that the system browser opened.
|
|
123
125
|
3. Copy the code, open the verification link, and complete authorization in your own GitHub browser session. Copy success/failure is announced accessibly; manual copying remains available. Never paste a GitHub token into DSH.
|
|
124
126
|
4. DSH polls only while authorization is in flight. Successful explicit **Start sign-in** (the **Sign in with GitHub** button), including a UI account switch, forces exactly one bounded discovery after immediate or polled success. The code and verification link clear, the automatic authorization area closes, and the account shows **Signed in** and **Manage**. Manually opened details stay open; cancellation clears the old code. Failures show only a safe stage diagnostic: `COPILOT_AUTHORIZATION_BEGIN_FAILED` means authorization did not complete; `COPILOT_ROUTE_REPAIR_FAILED` means authorization completed but local route repair failed. A failed begin can also show a fixed **latest observed milestone** (`AUTHORIZATION_REQUESTED`, `INTERACTION_PROMPT_OBSERVED`, or `INTERACTION_NOTICE_OBSERVED`). It reports only progress observed through the public interaction callbacks, not the failing operation or a credential commit. The latter route-repair code retains authentication and directs you to **Manage → Repair model configuration**. These codes and milestones do not explain or resolve the underlying sign-in failure; raw provider details are never displayed or logged.
|
|
125
|
-
5. Choose an accepted model under **GitHub Copilot** (stable route ID `github-copilot-preview`). Normal opening/use maintains metadata without requiring **Refresh models**. **Manage** contains
|
|
127
|
+
5. Choose an accepted model under **GitHub Copilot** (stable route ID `github-copilot-preview`). Normal opening/use maintains metadata without requiring **Refresh models**. **Manage** contains manual refresh, model details, **Model preferences**, and sign-out. Model preferences provide local search and explicit **Exclude/Restore** actions. Excluded exact IDs disappear from the managed picker and every Auto pool; temporarily absent excluded IDs remain restorable. The current fixed managed model is locked until another model is selected. No exclusion rewrites history, changes selection, or mutates account entitlement. Legacy configuration diagnostics and explicit repair remain available when needed, and the [migration guide](./docs/single-route-migration.md) remains in the documentation.
|
|
126
128
|
|
|
127
129
|
### Auto model routing
|
|
128
130
|
|
|
129
|
-
The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool. Before preference, routing evaluates input headroom against each candidate's hard input budget, filtering out candidates that cannot accommodate current messages. Soft preferences distribute across upper/lower/center candidate bands using deterministic in-memory seeds to avoid monopolizing a single top candidate across Sessions. If no candidate fits, Auto selects the largest input capacity model and triggers compaction pressure on compressible history. Auto resolves once per Core turn to a real model; every tool step, retry and automatic compaction recovery in that turn stays on that model, while a later Chat or Goal turn may choose again. Image turns require
|
|
131
|
+
The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficiency**, and **Auto · Intelligence** as flat virtual picker rows. They share one account-verified eligible pool after applying exact model exclusions. Before preference, routing evaluates input headroom against each candidate's hard input budget, filtering out candidates that cannot accommodate current messages. Soft preferences distribute across upper/lower/center candidate bands using deterministic in-memory seeds to avoid monopolizing a single top candidate across Sessions. If no candidate fits, Auto selects the largest input capacity model and triggers compaction pressure on compressible history; if exclusions leave no eligible model, Auto fails closed. Auto resolves once per Core turn to a real model; every tool step, retry and automatic compaction recovery in that turn stays on that model, while a later Chat or Goal turn may choose again. Image turns require a non-excluded account-verified image-capable candidate. New turns retain Core's actual model/usage details without adding unsafe plugin events. Search keeps its independent provider-owned model policy, and subagents / Team teammates continue to inherit Core's concrete route rather than being relabeled as Auto. See the [policy and mockup](./docs/automatic-model-routing.md). The nested management disclosure is plugin-owned; Core's picker remains flat.
|
|
130
132
|
|
|
131
133
|
Completed Copilot replies show **Auto (preference)** and an expandable recorded reason after native Usage/time, or **Manual** only with captured explicit fixed-selection evidence. Missing evidence shows **Selection unknown**, never a guess from today's picker. There is no repeated model name or separate Model details button: actual model display stays in native Usage, whose missing-route behavior is unchanged. New selection records are bounded and Host-local; restart, disposal or eviction loses them. Compatible historical Auto records remain readable. The public assistant-actions slot supports internal wrapping only, not changing the native fixed-height row.
|
|
132
134
|
|
|
@@ -155,11 +157,11 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
155
157
|
5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
|
|
156
158
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
157
159
|
|
|
158
|
-
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
160
|
+
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.60`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
|
|
161
|
+
|
|
162
|
+
**Desktop package-update and Web-lifecycle boundaries:** the native manager's `restart-required` result for an in-place installed-package upgrade is authoritative and distinct from plugin-bundle removal/re-add behavior. Any disable, removal, or upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) may leave dependent entries pending until Desktop is fully exited and cold-restarted. If the native manager reports only entries such as `pending (waiting for service: web)` while this plugin already shows **Off**, the requested disabled state has been persisted; cold-restart Desktop instead of repeatedly toggling or reinstalling the plugin. Other errors are not covered by this guidance and must still be investigated.
|
|
159
163
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
A pinned public Loader characterization records that, with the exact bundle IDs and an active provider, staged first-add can leave global `ctx.web` and an active consumer unavailable even after the routed row is enabled. A separate complete cold-loaded Web-routing composition works initially but loses global `ctx.web` and its consumer on removal and remains unavailable after re-add/reconciliation. An earlier temporary harness used alias IDs and no active provider, so its successful final add was not equivalent to the exact bundle fixture. These are synthetic Loader observations; the native warning above is operational evidence, not proof that every pending diagnostic is harmless or that restart recovery has been exercised by the fixture. Do not use bundle removal/re-add as a hot-upgrade workaround. See [the rc.2 lifecycle characterization and bounded public-API finding](./docs/web-lifecycle-rc2.md).
|
|
164
|
+
A pinned public Loader characterization records that, with the exact bundle IDs and an active provider, staged first-add can leave global `ctx.web` and an active consumer unavailable even after the routed row is enabled. A separate complete cold-loaded Web-routing composition works initially but loses global `ctx.web` and its consumer on removal and remains unavailable after re-add/reconciliation. An earlier temporary harness used alias IDs and no active provider, so its successful final add was not equivalent to the exact bundle fixture. These are synthetic Loader observations; the native warning above is operational evidence, not proof that every pending diagnostic is harmless or that restart recovery has been exercised by the fixture. Do not use bundle removal/re-add as a hot-upgrade workaround. See [the rc.2 lifecycle characterization and bounded public-API finding](./docs/web-lifecycle-rc2.md).
|
|
163
165
|
|
|
164
166
|
**Host TLS trust boundary:** this plugin adds system roots only to its quota request; it does not change Desktop process trust, sign-in, models, search or other requests. A correctly environmented Desktop launch previously restored quota, while a recovery launch without the inherited process variable caused it to regress despite HKCU retaining `NODE_USE_SYSTEM_CA=1`; normal relaunch restored it. The quota fix avoids this launcher dependency after an authorized upgrade and reload. No live Desktop profile, trust store or process is changed by the package alone.
|
|
165
167
|
|
|
@@ -428,8 +430,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
428
430
|
`package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
|
|
429
431
|
|
|
430
432
|
```sh
|
|
431
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
432
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
433
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.60/dsh-github-copilot-0.4.0-alpha.60.tgz
|
|
434
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.60/SHA256SUMS
|
|
433
435
|
sha256sum --check SHA256SUMS
|
|
434
436
|
```
|
|
435
437
|
|
|
@@ -437,7 +439,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
437
439
|
|
|
438
440
|
```powershell
|
|
439
441
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
440
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
442
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.60.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
441
443
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
442
444
|
```
|
|
443
445
|
|
package/README.zh.md
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
## 当前体验
|
|
13
13
|
|
|
14
|
-
- **账号与模型:**在 **设置 → 模型** 的原生 GitHub Copilot
|
|
15
|
-
- **搜索路由:**在 **插件 → dsh-github-copilot → 详情**选择主搜索 Provider 与兜底 Provider。页面只保留用户真正需要的两项选择,不再把协议探测、超时、白名单或传输开关作为日常配置暴露;同时会在停用/移除/升级前常驻显示 rc.2 生命周期提示。更新后的路由服务尚未激活时,卡片会明确显示 **需要重启生效(Restart required)**,而不是继续展示无法使用的表单。
|
|
14
|
+
- **账号与模型:**在 **设置 → 模型** 的原生 GitHub Copilot 行内完成登录、查看账号发现模型、刷新元数据及账号管理。可在 **Manage → Model preferences** 中按精确 ID 排除模型,使其同时退出托管 picker 与 Auto 候选池;Core 原生 picker 仍保持平铺。
|
|
15
|
+
- **搜索路由:**在 **插件 → dsh-github-copilot → 详情**选择主搜索 Provider 与兜底 Provider。页面只保留用户真正需要的两项选择,不再把协议探测、超时、白名单或传输开关作为日常配置暴露;同时会在停用/移除/升级前常驻显示 rc.2 生命周期提示。更新后的路由服务尚未激活时,卡片会明确显示 **需要重启生效(Restart required)**,而不是继续展示无法使用的表单。
|
|
16
16
|
- **用量:**符合条件的 Copilot 会话会在输入框旁显示可选的 **Credits / 额度** 控件,展示供应方明确返回的计费周期数据,并如实区分不可用与历史快照。仅额度请求组合 Node 默认证书与系统信任根,无需依赖 Desktop launcher 的环境变量继承,且保持 TLS 验签。
|
|
17
17
|
- **兼容处理:**插件通过 DSH 已发布公开接口提供 Copilot 专用 Tool Schema、Thinking 展示、请求预算及账号模型兼容,不修改 Core,也不维护第二套模型目录。
|
|
18
18
|
|
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
|
|
21
21
|
截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
|
|
22
22
|
|
|
23
|
-
> 当前文档与安装命令对应版本 `0.4.0-alpha.
|
|
23
|
+
> 当前文档与安装命令对应版本 `0.4.0-alpha.60`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
24
24
|
|
|
25
25
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
26
26
|
|
|
27
|
+
官方 rc.2 通过原生可实时修改的 `Config` 字段提供路由设置,而不是手工注册设置 namespace。保存会一次更新两个路由叶子,不重新挂载插件,也不修改普通安全设置。旧搜索模型覆盖值仍只能通过独立的显式操作重置。
|
|
28
|
+
|
|
27
29
|
## 兼容基线与待验收目标
|
|
28
30
|
|
|
29
31
|
| DSH 表面 | 精确源码 pin | Models UI 接口 |
|
|
@@ -111,10 +113,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
111
113
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
112
114
|
|
|
113
115
|
```sh
|
|
114
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
116
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.60/dsh-github-copilot-0.4.0-alpha.60.tgz
|
|
115
117
|
```
|
|
116
118
|
|
|
117
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
119
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.60`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
118
120
|
|
|
119
121
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
120
122
|
|
|
@@ -124,11 +126,11 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
|
|
|
124
126
|
2. 点击 **Sign in with GitHub** 后,验证码区域自动展开,提供醒目的一次性验证码、**Open GitHub verification page**、**Copy code** 和 **Cancel sign-in**。不需要再点一次 **Manage**。识别到 Desktop v1 宿主时,通过现有的同窗口外部导航处理交给系统浏览器,不依赖弹出窗口;网页版仍打开新标签页。如果没有打开,可选中并复制界面显示的验证网址到浏览器。插件无法确认系统浏览器是否已打开。
|
|
125
127
|
3. 复制验证码,打开验证链接,在自己的 GitHub 浏览器会话中完成授权。复制成功/失败均有可访问的反馈;手工复制仍可用。不要把 GitHub token 粘贴到 DSH。
|
|
126
128
|
4. DSH 只在授权进行中轮询。显式 **Start sign-in**(**Sign in with GitHub** 按钮,包括界面切换账号)成功后,无论立即返回还是轮询观察到成功,都只强制执行一次有界发现。验证码和验证链接清除,自动授权区域收起,账号显示 **Signed in、Manage**。手动打开的详情保持展开;取消清除旧验证码。失败仅显示安全的阶段诊断:`COPILOT_AUTHORIZATION_BEGIN_FAILED` 表示授权流程未完成;`COPILOT_ROUTE_REPAIR_FAILED` 表示授权已完成但本地路由修复失败。begin 失败还可以显示固定的“最近观察到的里程碑” (`AUTHORIZATION_REQUESTED`、`INTERACTION_PROMPT_OBSERVED` 或 `INTERACTION_NOTICE_OBSERVED`);它只表示公开 interaction callback 已观察到的进度,不代表失败操作或 credential commit。后者会保留认证,并提示前往 **Manage → Repair model configuration**。这些代码和里程碑不解释或解决底层登录失败,原始 provider 详情不会显示或记录。
|
|
127
|
-
5. 在 **GitHub Copilot** 分组选择接受的模型(稳定路由 ID 为 `github-copilot-preview`)。正常打开/使用会自动维护元数据,无需手动 **Refresh models**。**Manage**
|
|
129
|
+
5. 在 **GitHub Copilot** 分组选择接受的模型(稳定路由 ID 为 `github-copilot-preview`)。正常打开/使用会自动维护元数据,无需手动 **Refresh models**。**Manage** 内包含手动刷新、模型明细、**Model preferences** 与退出登录。模型偏好提供本地搜索和明确的 **Exclude/Restore** 操作;被排除的精确 ID 会退出托管 picker 与所有 Auto 候选,暂时不在账号元数据中的排除 ID 仍可恢复。当前固定托管模型在切换到其他模型前不可排除。排除不会改写历史、切换选择或修改账号权限。
|
|
128
130
|
|
|
129
131
|
### Auto 模型路由
|
|
130
132
|
|
|
131
|
-
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence
|
|
133
|
+
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档先应用精确模型排除,再共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure;若排除后没有任何合格模型,则 Auto 关闭式失败。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有未被排除且已验证的图片候选。新轮次保留 Core 的真实模型/用量信息,不追加不兼容的插件事件。搜索仍由独立策略管理;原生子代理与 Team 队友继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md)。嵌套管理折叠区由插件提供;Core picker 仍保持平铺。
|
|
132
134
|
|
|
133
135
|
已完成的 Copilot 回复在原生 Usage/时间后显示 **Auto(偏好)**,点信息按钮查看本轮记录的选择原因;只有捕获到明确固定选择才显示**手动**。缺记录显示**选择方式未知**,不借当前 picker 推断历史。不重复模型名、不另设 Model details 按钮:实际模型仍由原生 Usage 显示,其缺失归属行为未改变。新选择记录仅限当前 Host 内存且有容量上限,重启、释放 Agent 或淘汰后会丢失;兼容历史 Auto 记录仍可读取。公开 assistant-actions slot 只允许插件内部换行,不能改变原生固定高度尾栏。
|
|
134
136
|
|
|
@@ -157,11 +159,11 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
157
159
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
158
160
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
159
161
|
|
|
160
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
162
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.60`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
163
|
+
|
|
164
|
+
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
|
|
161
165
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
pinned public Loader characterization 记录了:使用 bundle 的精确 ID 且 provider 已激活时,分阶段首次添加可能在 routed row 启用后仍令全局 `ctx.web` 和 consumer 不可用;另一独立序列从完整冷加载且正常工作的 Web-routing composition 开始,移除后全局 `ctx.web` 与 consumer 不可用,重加/重试 reconciliation 仍未恢复。较早的临时 harness 使用别名 ID 且没有 active provider,因此其最终添加成功并不等同于精确 bundle fixture。这些是合成 Loader 观察;上述原生 warning 属于运行证据,不代表所有 pending 诊断都可忽略,也不代表 fixture 已证明重启恢复。不要用移除/重加 bundle 作为热升级绕行。详见 [rc.2 生命周期 characterization 与有限的 public API 结论](./docs/web-lifecycle-rc2.md)。
|
|
166
|
+
pinned public Loader characterization 记录了:使用 bundle 的精确 ID 且 provider 已激活时,分阶段首次添加可能在 routed row 启用后仍令全局 `ctx.web` 和 consumer 不可用;另一独立序列从完整冷加载且正常工作的 Web-routing composition 开始,移除后全局 `ctx.web` 与 consumer 不可用,重加/重试 reconciliation 仍未恢复。较早的临时 harness 使用别名 ID 且没有 active provider,因此其最终添加成功并不等同于精确 bundle fixture。这些是合成 Loader 观察;上述原生 warning 属于运行证据,不代表所有 pending 诊断都可忽略,也不代表 fixture 已证明重启恢复。不要用移除/重加 bundle 作为热升级绕行。详见 [rc.2 生命周期 characterization 与有限的 public API 结论](./docs/web-lifecycle-rc2.md)。
|
|
165
167
|
|
|
166
168
|
**Host TLS trust 边界:**本插件只为额度请求添加系统信任根,不修改 Desktop 进程级信任、登录、模型、搜索或其他请求。之前带有正确环境变量的 Desktop 启动让额度恢复;后续恢复脚本启动没有继承进程变量,尽管 HKCU 保留 `NODE_USE_SYSTEM_CA=1`,额度仍再次失败;正常手动启动后又恢复。更新后的插件在获准升级和重新加载后消除额度请求对该继承链的依赖;仅发布包不会修改当前 Desktop profile、trust store 或进程。
|
|
167
169
|
|
|
@@ -439,8 +441,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
439
441
|
`package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
440
442
|
|
|
441
443
|
```sh
|
|
442
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
443
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
444
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.60/dsh-github-copilot-0.4.0-alpha.60.tgz
|
|
445
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.60/SHA256SUMS
|
|
444
446
|
sha256sum --check SHA256SUMS
|
|
445
447
|
```
|
|
446
448
|
|
|
@@ -448,7 +450,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
448
450
|
|
|
449
451
|
```powershell
|
|
450
452
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
451
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
453
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.60.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
452
454
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
453
455
|
```
|
|
454
456
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.0-alpha.
|
|
11
|
+
"version": "0.4.0-alpha.60"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
},
|
|
253
253
|
"sharedPeerDependencies": {
|
|
254
254
|
"@deepseek-ai/dsh-authorization": "0.2.0-rc.2",
|
|
255
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
255
|
+
"@deepseek-ai/schemastery": "^3.18.4"
|
|
256
256
|
},
|
|
257
257
|
"clientExternals": {
|
|
258
258
|
"react": {
|
|
@@ -399,6 +399,7 @@
|
|
|
399
399
|
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "stale routing revisions fail CAS and preserve the last successful settings"},
|
|
400
400
|
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "hidden legacy searchModel and searchRouting share namespace revision and coordinate CAS"},
|
|
401
401
|
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "pinned generated Client mutate codecs accept routing ops and a flat namespace revision"},
|
|
402
|
+
{"file": "tests/scripts/search-settings-contract.test.mjs", "name": "native routing edits preserve ordinary config, reject invalid paths and persist across restart"},
|
|
402
403
|
{"file": "tests/inline/apply.spec.ts", "name": "automatically resolves account-owned Responses candidates for %s without a search model"},
|
|
403
404
|
{"file": "tests/inline/apply.spec.ts", "name": "bounds automatic proof to three eligible candidates in deterministic id order"},
|
|
404
405
|
{"file": "tests/inline/apply.spec.ts", "name": "does not discover or probe allowlist-excluded automatic search"}
|
|
@@ -195,14 +195,14 @@ Synthetic tests prove composition and contracts only. They do not prove a live a
|
|
|
195
195
|
- side-effect replay;
|
|
196
196
|
- automatic changes to existing Session selections, settings, or histories.
|
|
197
197
|
|
|
198
|
-
##
|
|
198
|
+
## Model exclusions and richer picker boundary
|
|
199
199
|
|
|
200
|
-
**Tracking:** [#192](https://github.com/cloga/dsh-github-copilot/issues/192). **Interactive proposal:** [`output/auto-model-mockup/tiers.html`](../output/auto-model-mockup/tiers.html). This is a local, synthetic UI exercise, not a claim of current Core picker behavior. The three virtual preferences
|
|
200
|
+
**Tracking:** [#192](https://github.com/cloga/dsh-github-copilot/issues/192). **Interactive proposal:** [`output/auto-model-mockup/tiers.html`](../output/auto-model-mockup/tiers.html). This is a local, synthetic UI exercise, not a claim of current Core picker behavior. The three virtual preferences, capacity matrix, and plugin-owned model exclusions are implemented. The mockup's nested Core picker is not.
|
|
201
201
|
|
|
202
202
|
The attached Copilot example uses one Auto switch with a nested Efficiency / Balance / Intelligence menu. The supported DSH model picker is owned by Core and receives a flat provider directory from `PreviewAdapter.listModels()`; the plugin's Models provider-card and bundle-config slots cannot restructure that picker. The plugin advertises three rows under **GitHub Copilot**, with the existing `auto` ID as Balance for previously selected Sessions and defaults. A nested switch like the screenshot requires a separately reviewed public Core UI seam and is not a dependency of the plugin-only preferences.
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
Exclusions are a separate **hard filter**, not a fourth preference. All three preferences share account entitlement and turn-required verified capabilities, then remove the exact IDs stored in `github-copilot.excludedModelIds`. The mockup uses illustrative capacity scores and simulated responses, not live evaluation of model quality, cost, or latency.
|
|
205
205
|
|
|
206
|
-
The model-management surface
|
|
206
|
+
The model-management surface is the nested **GitHub Copilot → Manage → Model preferences** disclosure in the plugin's own settings UI, not a replacement of Core's picker. It offers local search, visible/excluded counts, **Exclude** and **Restore**, a selected-model lock reason, and retained restore rows for exact IDs temporarily absent from current account metadata. Writes are revision-checked path mutations. The plugin does not mutate pi-ai's catalog, the account grant, Core settings, or another provider's models. Its advertised directory, every Auto candidate set, aggregate Auto modalities, hosted-search route facts and managed admission remove excluded IDs. A stale picker row or direct request fails with `COPILOT_PREVIEW_MODEL_EXCLUDED`. Existing Session history is never rewritten or silently moved. The current fixed managed model cannot be excluded until another model is selected. If exclusions leave no eligible candidate, Auto fails closed with `COPILOT_AUTO_NO_ELIGIBLE_MODEL`. Account change or unavailable metadata never re-enables or guesses models.
|
|
207
207
|
|
|
208
|
-
The native picker
|
|
208
|
+
The native picker still owns provider groups and text search. It remains flat: the three virtual rows are listed first and excluded Copilot models are omitted from the plugin-owned directory. Custom section headers inside a provider, nested Auto menus, hiding other providers' models, and replacing Core search/layout are **not** available through the current additive slots. Focused regressions cover directory refresh, selected-model exclusion, stale direct requests, concurrent settings conflicts, Auto/image eligibility and zero-candidate failures against unchanged pinned Core. The prototype's invented model capacity order and response remain illustrative only.
|
|
@@ -32,6 +32,14 @@ Legacy direct callers without the facade capture seam keep the historical `src/s
|
|
|
32
32
|
|
|
33
33
|
## Search directory and settings UI
|
|
34
34
|
|
|
35
|
+
Official rc.2 `SettingsForms` discovers active Loader entries and projects only volatile `Config` fields. There is no `settings.register()` or `installSettingsSection()` API. The plugin marks `searchRouting`, the hidden legacy `searchModel`, and the hidden restoration journal `temporaryRouteBackup` as volatile using Schemastery 3.18.4 or newer. The Host keeps their native references and reads a plain snapshot per operation; it must not reparse those snapshots through the live schema or freeze them at activation. Ordinary safety and transport fields remain ordinary configuration. Settings writes remain native, narrow, revision-checked profile edits.
|
|
36
|
+
|
|
37
|
+
The settings contract regression uses the real Loader, ConfigEditor and SettingsForms with a disposable profile and the plugin's actual Config, rather than a pre-registered in-memory namespace. It covers discovery, two-leaf writes, unchanged fiber identity, stale CAS rejection, invalid/non-live field rejection, explicit legacy override reset and persistence across a fresh boot. It does not exercise the Host SettingsController over a network Gateway or access live credentials.
|
|
38
|
+
|
|
39
|
+
Correction to the historical evidence below: the previous settings contract used a `MemorySettings` test double, not the real Settings service. It therefore could not detect missing Config projection. For #216, the updated contract passes against isolated unchanged Desktop rc.2 artifacts; the normal frozen development install is still blocked by missing rc.2 packages in the configured mirror. The development graph now uses Cordis 4.0.4 and a shared Schemastery 3.18.4 resolution: the old Settings peer selected 3.18.2, whose global declarations incorrectly merged with the live-field schema types. The lockfile was regenerated with pnpm on a GitHub runner, not patched dependency artifacts. Neither the supplemental run nor historical full-gate results replace required CI on the final revision.
|
|
40
|
+
|
|
41
|
+
The five source-native settings cases and 198 Config/inline Host tests also pass against the unchanged GitHub commit `639ed015397290b3745d163aafe02ffee4aa3f84`, using a supplemental public-export resolver and TypeScript 6.0.3 without compiling or editing Core. Generated Client codec cases remain published-artifact evidence, not source-mode cases. The source-mode no-emit check reports no plugin-file diagnostics but still has upstream/generated-Remote declaration errors, so it is not a clean full typecheck. The frozen source dependency closure currently stops at the configured mirror's missing `@smithy/signature-v4@5.7.4` tarball. These are bounded validation results, not publication or live Desktop acceptance.
|
|
42
|
+
|
|
35
43
|
Both selectors use `githubCopilotSearchRouting.providers()`, a separate strict Remote exposed through the public `TypertRemoteService` binding. Its catalog contains only fresh IDs from registrations observed by this facade, not Core private registry objects or hidden/direct-original registrations. The read invokes no `available()`, auth, discovery or search: availability is contextual and checked on actual use. A missing facade yields `supported: false`, not a static example list. Newly registered IDs appear on reload; removed saved entries remain visibly unavailable. Primary adds Auto; **Fallback provider** adds None while retaining the stored `defaultSearchProvider` key. The ordinary card has no model selector. Settings and routing Remote faces are captured once at UI registration: real pinned Cordis/Client Gateway namespace reads return fresh traced proxies, so looking them up in each render would change effect dependencies and reload drafts. Models remain provider internals, not additional search-provider entries.
|
|
36
44
|
|
|
37
45
|
Focused postbuild checks must run after `pnpm build`. `tests/search-provider-catalog.spec.ts` checks registration lifecycle, duplicate handling and read purity; `tests/scripts/search-provider-gateway.test.mjs` drives the real Connection Fetch/Gateway against the packaged search-catalog facade/controller. `tests/web-search-routing-card.spec.ts` covers both selectors, unavailable catalogs, one routing CAS without a model prerequisite, explicit separate override reset, safe conflict messages, legacy choices and stale generations. `tests/client-search-inject.spec.ts` mounts the actual Client callback with real React DOM and Cordis in jsdom, checking draft and pending-save continuity through parent rerenders for both footer and legacy section slots; its Remote transport remains synthetic. `tests/scripts/search-settings-contract.test.mjs` uses the real pinned Settings service with in-memory persistence and the unchanged generated Client codecs: two-leaf routing writes, stale CAS, writable hidden/empty legacy overrides and the flat returned namespace revision. It also mounts the real pinned Client Gateway/Remote descriptors to verify traced proxy identity, without RPC or streams. It does **not** execute the actual Host SettingsController write through Gateway. An isolated Edge reproduction with the old alpha.28 built card and actual registration callback, backed by synthetic fresh Remote getters, reproduced both a filled-model draft resetting on a parent render and a completed model write whose subsequent routing write was abandoned on a parent render. This establishes a reproducible plugin lifecycle defect, not a definitive diagnosis of the user's production runtime. The corrected built card passed the same isolated Edge rerender/save/reload flow without a model field or account-status RPC, plus explicit legacy override reset, safe CAS conflict recovery, read-only state, dark/light desktop and 375px mobile captures, and a 200% zoom overflow check. These fixtures are not live account, installed Desktop or paid model evidence. The final local `pnpm verify` passed with one test worker: 62 Vitest files, 1553 passing tests and 2 expected skips, 273 tooling tests, source/test typechecks, baseline checks, build and package smoke. An earlier unrestricted parallel run hit three import-time test timeouts; the unchanged tests passed with bounded concurrency, without extending timeouts or skipping assertions. Remote CI, release publication and loaded-runtime acceptance remain separate pending checks.
|
package/lib/client.js
CHANGED
|
@@ -5755,6 +5755,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5755
5755
|
discoveredAt: number().int().nonnegative().optional(),
|
|
5756
5756
|
error: string().optional()
|
|
5757
5757
|
}).strict().optional(),
|
|
5758
|
+
modelPreferences: object({
|
|
5759
|
+
state: _enum(["ready", "error"]),
|
|
5760
|
+
writable: boolean(),
|
|
5761
|
+
revision: number().int().nonnegative().max(Number.MAX_SAFE_INTEGER).optional(),
|
|
5762
|
+
excludedModelIds: array(string().min(1).max(512)).max(512),
|
|
5763
|
+
lockedModelIds: array(string().min(1).max(512)).max(512),
|
|
5764
|
+
unavailableExcludedModelIds: array(string().min(1).max(512)).max(512),
|
|
5765
|
+
error: _enum([
|
|
5766
|
+
"COPILOT_MODEL_PREFERENCES_UNAVAILABLE",
|
|
5767
|
+
"COPILOT_MODEL_EXCLUSION_SELECTED",
|
|
5768
|
+
"COPILOT_MODEL_EXCLUSION_CONFLICT",
|
|
5769
|
+
"COPILOT_MODEL_EXCLUSION_SAVE_FAILED"
|
|
5770
|
+
]).optional()
|
|
5771
|
+
}).strict().optional(),
|
|
5758
5772
|
route: object({
|
|
5759
5773
|
state: _enum([
|
|
5760
5774
|
"ready",
|
|
@@ -5843,6 +5857,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5843
5857
|
parameters: [],
|
|
5844
5858
|
result
|
|
5845
5859
|
})),
|
|
5860
|
+
...["excludeModel", "restoreModel"].map((method) => ({
|
|
5861
|
+
id: `dsh-github-copilot:githubCopilot.${method}`,
|
|
5862
|
+
service: "githubCopilotAuthorization",
|
|
5863
|
+
namespace: "githubCopilot",
|
|
5864
|
+
method,
|
|
5865
|
+
invocation: direct,
|
|
5866
|
+
parameters: [{
|
|
5867
|
+
name: "modelId",
|
|
5868
|
+
wire: "modelId",
|
|
5869
|
+
source: "json",
|
|
5870
|
+
codec: strictRemoteCodec("dsh-github-copilot#GitHubCopilotModelId", string().min(1).max(512))
|
|
5871
|
+
}],
|
|
5872
|
+
result
|
|
5873
|
+
})),
|
|
5846
5874
|
{
|
|
5847
5875
|
id: "dsh-github-copilot:githubCopilot.migrationStatus",
|
|
5848
5876
|
service: "githubCopilotAuthorization",
|
|
@@ -7787,6 +7815,99 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7787
7815
|
};
|
|
7788
7816
|
}
|
|
7789
7817
|
//#endregion
|
|
7818
|
+
//#region lib/types/model-preferences-card.js
|
|
7819
|
+
function GitHubCopilotModelPreferencesPanel(props) {
|
|
7820
|
+
const [query, setQuery] = (0, react.useState)("");
|
|
7821
|
+
const [preferences, setPreferences] = (0, react.useState)(props.preferences);
|
|
7822
|
+
const [busyModel, setBusyModel] = (0, react.useState)();
|
|
7823
|
+
const [error, setError] = (0, react.useState)();
|
|
7824
|
+
(0, react.useEffect)(() => {
|
|
7825
|
+
setPreferences(props.preferences);
|
|
7826
|
+
setError(void 0);
|
|
7827
|
+
}, [props.preferences]);
|
|
7828
|
+
const available = props.models?.models ?? [];
|
|
7829
|
+
if (preferences === void 0) return (0, react.createElement)("details", { "data-dsh-github-copilot-model-preferences": true }, (0, react.createElement)("summary", null, "Model preferences"), (0, react.createElement)("p", { role: "status" }, "Model exclusions are unavailable in this profile."));
|
|
7830
|
+
const excluded = new Set(preferences.excludedModelIds);
|
|
7831
|
+
const locked = new Set(preferences.lockedModelIds);
|
|
7832
|
+
const rows = [...available.map((model) => ({
|
|
7833
|
+
id: model.id,
|
|
7834
|
+
name: model.name,
|
|
7835
|
+
available: true
|
|
7836
|
+
})), ...preferences.unavailableExcludedModelIds.filter((id) => !available.some((model) => model.id === id)).map((id) => ({
|
|
7837
|
+
id,
|
|
7838
|
+
name: id,
|
|
7839
|
+
available: false
|
|
7840
|
+
}))];
|
|
7841
|
+
const needle = query.trim().toLocaleLowerCase();
|
|
7842
|
+
const filtered = rows.filter((model) => needle.length === 0 || model.id.toLocaleLowerCase().includes(needle) || model.name.toLocaleLowerCase().includes(needle));
|
|
7843
|
+
const visibleCount = available.filter((model) => !excluded.has(model.id)).length;
|
|
7844
|
+
const update = async (modelId, restore) => {
|
|
7845
|
+
if (busyModel !== void 0) return;
|
|
7846
|
+
setBusyModel(modelId);
|
|
7847
|
+
setError(void 0);
|
|
7848
|
+
try {
|
|
7849
|
+
const result = restore ? await props.remote.restoreModel(modelId) : await props.remote.excludeModel(modelId);
|
|
7850
|
+
if (!result.ok) {
|
|
7851
|
+
setError("COPILOT_MODEL_EXCLUSION_SAVE_FAILED");
|
|
7852
|
+
return;
|
|
7853
|
+
}
|
|
7854
|
+
const parsed = GitHubCopilotAuthorizationViewSchema.safeParse(result.value);
|
|
7855
|
+
if (!parsed.success || parsed.data.modelPreferences === void 0) {
|
|
7856
|
+
setError("COPILOT_MODEL_PREFERENCES_UNAVAILABLE");
|
|
7857
|
+
return;
|
|
7858
|
+
}
|
|
7859
|
+
setPreferences(parsed.data.modelPreferences);
|
|
7860
|
+
setError(parsed.data.modelPreferences.error);
|
|
7861
|
+
} catch {
|
|
7862
|
+
setError("COPILOT_MODEL_EXCLUSION_SAVE_FAILED");
|
|
7863
|
+
} finally {
|
|
7864
|
+
setBusyModel(void 0);
|
|
7865
|
+
}
|
|
7866
|
+
};
|
|
7867
|
+
return (0, react.createElement)("details", { "data-dsh-github-copilot-model-preferences": true }, (0, react.createElement)("summary", null, `Model preferences · ${visibleCount} visible · ${preferences.excludedModelIds.length} excluded`), (0, react.createElement)("p", { style: { fontSize: "13px" } }, "Excluded models disappear from the managed picker and are never considered by Auto. Restoring a model does not select it."), (0, react.createElement)("label", { style: {
|
|
7868
|
+
display: "grid",
|
|
7869
|
+
gap: "4px",
|
|
7870
|
+
fontSize: "13px"
|
|
7871
|
+
} }, "Search models", (0, react.createElement)("input", {
|
|
7872
|
+
type: "search",
|
|
7873
|
+
value: query,
|
|
7874
|
+
onChange: (event) => setQuery(event.currentTarget.value),
|
|
7875
|
+
placeholder: "Search by name or exact model ID",
|
|
7876
|
+
"data-dsh-github-copilot-model-search": true
|
|
7877
|
+
})), error === void 0 && preferences.error === void 0 ? null : (0, react.createElement)("p", {
|
|
7878
|
+
role: "alert",
|
|
7879
|
+
"data-dsh-github-copilot-model-preferences-error": true
|
|
7880
|
+
}, error ?? preferences.error), filtered.length === 0 ? (0, react.createElement)("p", { role: "status" }, "No models match this search.") : (0, react.createElement)("ul", { style: {
|
|
7881
|
+
listStyle: "none",
|
|
7882
|
+
padding: 0,
|
|
7883
|
+
display: "grid",
|
|
7884
|
+
gap: "8px"
|
|
7885
|
+
} }, filtered.map((model) => {
|
|
7886
|
+
const isExcluded = excluded.has(model.id);
|
|
7887
|
+
const isLocked = locked.has(model.id);
|
|
7888
|
+
const disabled = busyModel !== void 0 || !isExcluded && isLocked;
|
|
7889
|
+
return (0, react.createElement)("li", {
|
|
7890
|
+
key: model.id,
|
|
7891
|
+
style: {
|
|
7892
|
+
display: "flex",
|
|
7893
|
+
gap: "10px",
|
|
7894
|
+
alignItems: "center"
|
|
7895
|
+
}
|
|
7896
|
+
}, (0, react.createElement)("span", { style: {
|
|
7897
|
+
flex: 1,
|
|
7898
|
+
minWidth: 0,
|
|
7899
|
+
overflowWrap: "anywhere"
|
|
7900
|
+
} }, (0, react.createElement)("strong", null, model.name), (0, react.createElement)("br"), (0, react.createElement)("code", null, model.id), model.available ? null : (0, react.createElement)("span", null, " · Temporarily absent from account metadata"), !isExcluded && isLocked ? (0, react.createElement)("span", null, " · Select another model before excluding") : null), (0, react.createElement)("button", {
|
|
7901
|
+
type: "button",
|
|
7902
|
+
disabled,
|
|
7903
|
+
onClick: () => void update(model.id, isExcluded),
|
|
7904
|
+
title: !isExcluded && isLocked ? "Select another fixed model before excluding this one." : void 0,
|
|
7905
|
+
"data-dsh-github-copilot-model-action": isExcluded ? "restore" : "exclude",
|
|
7906
|
+
"data-model-id": model.id
|
|
7907
|
+
}, busyModel === model.id ? "Saving…" : isExcluded ? "Restore" : "Exclude"));
|
|
7908
|
+
})));
|
|
7909
|
+
}
|
|
7910
|
+
//#endregion
|
|
7790
7911
|
//#region lib/types/client.js
|
|
7791
7912
|
/**
|
|
7792
7913
|
* Browser companion for the Models provider-card slot.
|
|
@@ -8477,7 +8598,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8477
8598
|
}, (0, react.createElement)("p", { style: {
|
|
8478
8599
|
margin: "0 0 10px",
|
|
8479
8600
|
fontSize: "13px"
|
|
8480
|
-
} }, "Signing in here fetches your account models once. Opening this view refreshes missing or stale metadata when needed. No manual model definitions are needed. Refresh models updates account metadata; it does not verify a model call or change your selected model."), signedIn ? actionButton(refreshing ? "Refreshing models…" : "Refresh models", account.refreshModels, pendingAction, { "data-dsh-github-copilot-refresh-models": true }) : null,
|
|
8601
|
+
} }, "Signing in here fetches your account models once. Opening this view refreshes missing or stale metadata when needed. No manual model definitions are needed. Refresh models updates account metadata; it does not verify a model call or change your selected model."), signedIn ? actionButton(refreshing ? "Refreshing models…" : "Refresh models", account.refreshModels, pendingAction, { "data-dsh-github-copilot-refresh-models": true }) : null, signedIn ? (0, react.createElement)(GitHubCopilotModelPreferencesPanel, {
|
|
8602
|
+
remote: props.remote,
|
|
8603
|
+
models,
|
|
8604
|
+
preferences: view?.modelPreferences
|
|
8605
|
+
}) : null, models === void 0 ? (0, react.createElement)("p", { style: { fontSize: "13px" } }, "Account model metadata is not available yet.") : (0, react.createElement)(GitHubCopilotAccountModelsSummary, { snapshot: models }), routeStatusMessage(view) === void 0 ? null : (0, react.createElement)("p", { role: "status" }, routeStatusMessage(view)), view?.route?.state === "needs-repair" && signedIn ? actionButton("Repair model configuration", account.reconcile, pendingAction) : null, signedIn ? actionButton(state.operation === "signOut" ? "Signing out…" : "Sign out", account.signOut, pendingAction || view?.writable === false) : null, view?.writable === false ? (0, react.createElement)("p", { style: { fontSize: "13px" } }, "Credentials are read-only in this profile.") : null) : null);
|
|
8481
8606
|
}
|
|
8482
8607
|
/** Standalone footer presentation; registered Models seats use the shared surface coordinator. */
|
|
8483
8608
|
function GitHubCopilotPreviewFooter(props) {
|
|
@@ -8861,6 +8986,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
8861
8986
|
exports.GitHubCopilotAccountSurface = GitHubCopilotAccountSurface;
|
|
8862
8987
|
exports.GitHubCopilotAuthorizationNotice = GitHubCopilotAuthorizationNotice;
|
|
8863
8988
|
exports.GitHubCopilotCompactAccount = GitHubCopilotCompactAccount;
|
|
8989
|
+
exports.GitHubCopilotModelPreferencesPanel = GitHubCopilotModelPreferencesPanel;
|
|
8864
8990
|
exports.GitHubCopilotPreviewFooter = GitHubCopilotPreviewFooter;
|
|
8865
8991
|
exports.GitHubCopilotProviderCard = GitHubCopilotProviderCard;
|
|
8866
8992
|
exports.GitHubCopilotSettingsSection = GitHubCopilotSettingsSection;
|