dsh-github-copilot 0.4.0-alpha.57 → 0.4.0-alpha.59
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 +3 -1
- package/CHANGELOG.md +263 -253
- package/README.md +446 -442
- package/README.zh.md +457 -453
- package/deployment-baseline.json +1075 -1070
- package/docs/automatic-model-routing.md +5 -20
- package/docs/model-compatibility-acceptance.md +1 -0
- package/docs/session-search-routing.md +8 -0
- package/lib/client.js +462 -67
- package/lib/client.js.map +1 -1
- package/lib/index.js +116 -41
- package/lib/remote.js +55 -3
- package/lib/routed-web.js +1 -1
- package/lib/{search-routing-CncYAO8_.js → search-routing-BhrTbF-V.js} +8 -1
- package/lib/types/auto-model-host.d.ts +9 -0
- package/lib/types/auto-model-presentation.d.ts +2 -2
- package/lib/types/config.d.ts +14 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/preview-provider.d.ts +8 -0
- package/lib/types/settings-reader.d.ts +5 -0
- package/lib/types/turn-model-provenance.d.ts +45 -0
- package/lib/types/turn-selection-card.d.ts +8 -0
- package/lib/types/turn-selection-remote.d.ts +13 -0
- package/lib/types/turn-selection.d.ts +42 -0
- package/package.json +6 -5
|
@@ -37,7 +37,7 @@ Before applying soft preferences, routing checks whether each candidate can acco
|
|
|
37
37
|
3. **Headroom filtering:** Candidates with insufficient headroom (`estimatedInputTokens > hardInputLimit`) are filtered out. If one or more fitting candidates exist, soft preference selects among the `fitting` subset.
|
|
38
38
|
4. **No-fit and compaction recovery:** If no candidate can fit the current messages:
|
|
39
39
|
- Auto selects the candidate with the **largest input capacity** to give Core compaction maximum headroom.
|
|
40
|
-
-
|
|
40
|
+
- Its in-memory routing decision includes a structured diagnostic (not a new durable event):
|
|
41
41
|
- `fixed-content-cannot-fit`: the latest user turn alone exceeds maximum capacity and cannot be compacted away.
|
|
42
42
|
- `compaction-unavailable`: compaction is disabled or has zero retries configured.
|
|
43
43
|
- `attempted-but-still-oversized`: a compaction summary already exists in history and the turn remains oversized.
|
|
@@ -104,28 +104,13 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
|
|
|
104
104
|
|
|
105
105
|
## Attribution and explanation
|
|
106
106
|
|
|
107
|
-
**Compatibility fix (alpha.54):** new turns omit
|
|
107
|
+
**Compatibility fix (alpha.54):** new turns omit plugin-specific Auto decision events. Official `0.2.0-rc.2` cannot set an `ignorable` envelope through public `Session.append()`, and its reader rejects unknown required plugin events. The plugin therefore stops writing `github-copilot/auto-model-decision` rather than patching Core, mutating event objects, or borrowing an unrelated event type. Core's actual model/usage provenance and Auto routing remain unchanged. Restore new decision recording only when a supported public informational-event or equivalent storage seam has proven cold-read compatibility.
|
|
108
108
|
|
|
109
|
-
The
|
|
109
|
+
Completed Copilot replies show **Auto (preference)** with an information button, **Manual** with captured explicit fixed-selection evidence, or **Selection unknown** when that evidence is absent. The public `conversation.chat.assistant-actions` slot places the plugin's own flex item after native Usage/time using `order: 1`. There is no separate Model details entry or repeated model name. The native parent is a fixed-height, non-wrapping row: the plugin can shrink/wrap its own item but cannot promise whole-row wrapping, and does not modify native ancestors. A turn without a closing message has no assistant-actions anchor.
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
New Auto decisions and matching explicit fixed selections are captured at dispatch in a bounded in-memory store (64 Agents, 128 turns per Agent, first decision per turn). `githubCopilotTurnSelection.get` uses Core's native agent scope and lookup, with its existing Session resolution and ownership checks, rather than a plugin-owned arbitrary-session metadata endpoint. The lookup can use normal Core resume semantics; it is not a new access-control system. The Client reads once for the exact displayed Session/turn, cancels stale responses and never polls. Agent disposal, plugin disposal, eviction or Host restart removes evidence; no new Session event is emitted. Compatible historical Auto events can supply a recorded preference and reason; omitted historical preference is not guessed.
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```text
|
|
116
|
-
[actions] [usage] [time] Auto · <actual model> ?
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
The `?` opens a compact explanation using normalized facts such as:
|
|
120
|
-
|
|
121
|
-
- short text turn;
|
|
122
|
-
- standard turn;
|
|
123
|
-
- large structured turn;
|
|
124
|
-
- image capability required;
|
|
125
|
-
- number of eligible account models;
|
|
126
|
-
- number of models that can fit turn context (when restricted by input headroom).
|
|
127
|
-
|
|
128
|
-
Earlier releases recorded a credential-free `github-copilot/auto-model-decision` Session event before Core persisted the real request header. Historical attribution is derived from that durable decision, never from the current picker or a later catalog snapshot. Raw prompts, credentials, provider response bodies, and guessed prices are never disclosed.
|
|
113
|
+
The expandable explanation reports only the actual routing classification, capacity preference and eligible/fitting counts. It is selection evidence, **not proof of execution**. Absence of Auto evidence never implies Manual, and today's picker/request header never fills a historical gap. Native Usage remains the only model/usage display; its existing all-or-nothing missing-route behavior is not fixed here. A metadata-only projection flags incomplete attempts/history without duplicating or allocating tokens. The disclosure never reads message content, replay data or credentials.
|
|
129
114
|
|
|
130
115
|
### Recovering affected histories
|
|
131
116
|
|
|
@@ -28,6 +28,7 @@ Follow the [plugin-only boundary](../AGENTS.md#plugin-only-implementation-bounda
|
|
|
28
28
|
- 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.
|
|
29
29
|
- 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.
|
|
30
30
|
- 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.
|
|
31
|
+
- 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.
|
|
31
32
|
|
|
32
33
|
## Delivery and local acceptance
|
|
33
34
|
|
|
@@ -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.
|