dsh-github-copilot 0.4.0-alpha.57 → 0.4.0-alpha.58
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 +258 -253
- package/README.md +440 -438
- package/README.zh.md +451 -449
- package/deployment-baseline.json +1074 -1070
- package/docs/automatic-model-routing.md +5 -20
- package/docs/model-compatibility-acceptance.md +1 -0
- package/lib/client.js +462 -67
- package/lib/client.js.map +1 -1
- package/lib/index.js +92 -9
- package/lib/remote.js +55 -3
- package/lib/types/auto-model-host.d.ts +9 -0
- package/lib/types/auto-model-presentation.d.ts +2 -2
- package/lib/types/preview-provider.d.ts +8 -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 +1 -1
|
@@ -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
|
|