dsh-github-copilot 0.4.0-alpha.75 → 0.4.0-alpha.76
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 +7 -0
- package/CHANGELOG.md +6 -0
- package/README.md +8 -8
- package/README.zh.md +8 -8
- package/deployment-baseline.json +2 -1
- package/docs/automatic-model-routing.md +24 -0
- package/lib/client.js +32 -12
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/remote.js +0 -4
- package/lib/types/turn-selection-card.d.ts +3 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -238,6 +238,13 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
|
|
|
238
238
|
|
|
239
239
|
## Changing capabilities
|
|
240
240
|
|
|
241
|
+
Selection footer Remote calls carry an explicit viewed Session ID and turn.
|
|
242
|
+
Do not add an automatic Client `scope` projection: rc.2 prefers the scoped
|
|
243
|
+
variant and removes the ID argument, breaking the footer's two-argument call.
|
|
244
|
+
Retain native Host agent lookup/access checks and strict codecs. Failed reads
|
|
245
|
+
must remain distinct from successfully read missing evidence; Retry reads the
|
|
246
|
+
same turn only and never replays inference. See #249.
|
|
247
|
+
|
|
241
248
|
Parent-model following uses the profile-wide `github-copilot.followParentModel` switch (default false), with a single control in the plugin-detail page (#234). Never require per-session enrollment for the ordinary experience. Preserve legacy `parentModelFollow` bindings independently, including when the broad switch is off. `src/parent-model-follow.ts` and the Auto Host integration use public projections and per-turn scoped routing, never descriptor/history/default writes. Child-owned explicit selections win; enabling authorizes replacement of creation-time route snapshots, not removal of later picker history. Only supported native spawn children and managed Copilot parents participate; roots, other providers, fork descriptors and historical dedicated policies remain native. Missing eligible parent evidence fails explicitly. Settings changes preserve admitted turns, and Client saves use one path-level CAS without credentials/discovery. See `docs/parent-model-follow.md` for requirements/mockup and `docs/automatic-model-routing.md` for exact-source evidence.
|
|
242
249
|
|
|
243
250
|
Model preferences must survive the Client's owned-field projection before strict decoding. `excludedModelIds` is a hidden volatile Config leaf, read via `readInlineConfig`; exercise native SettingsForms CAS, fiber preservation and restart persistence, not only map-backed settings mocks. Missing preference/selection evidence leaves model rows read-only with named diagnostics and status-only Retry. Unknown exclusion state is not an empty exclusion set. Discovery diagnostics stay in a separate Manage disclosure.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.76 (prepared)
|
|
4
|
+
|
|
5
|
+
- Fix fresh master/lead Auto footer reads rejected by the native Client gateway when an ambient agent context reduced the explicit two-argument call to one (#249). Preserve native Host lookup and strict codecs; do not substitute the ambient Session.
|
|
6
|
+
- Distinguish failed selection reads from successfully read missing evidence. Add a bounded, explicit same-turn Retry without rerunning inference or leaking raw errors.
|
|
7
|
+
- Reproduce the old descriptor failure and verify bound/unbound calls through the unchanged pinned Client gateway.
|
|
8
|
+
|
|
3
9
|
## 0.4.0-alpha.75 (prepared)
|
|
4
10
|
|
|
5
11
|
- Add safe, actionable managed `COPILOT_REQUEST_BODY_TIMEOUT` guidance for the exact observed HTTP 408 request-body timeout, including final JSON UTF-8 bytes when observable (#246).
|
package/README.md
CHANGED
|
@@ -106,7 +106,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
106
106
|
|
|
107
107
|
## Install and sign in
|
|
108
108
|
|
|
109
|
-
The commands below target the package version `0.4.0-alpha.
|
|
109
|
+
The commands below target the package version `0.4.0-alpha.76`. 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):
|
|
110
110
|
|
|
111
111
|
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):
|
|
112
112
|
|
|
@@ -119,10 +119,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
119
119
|
For a standalone named profile only, the supported CLI command is:
|
|
120
120
|
|
|
121
121
|
```sh
|
|
122
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
122
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.76/dsh-github-copilot-0.4.0-alpha.76.tgz
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
125
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.76` 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.
|
|
126
126
|
|
|
127
127
|
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.
|
|
128
128
|
|
|
@@ -142,7 +142,7 @@ If preferences cannot be read, available account rows remain visible but read-on
|
|
|
142
142
|
|
|
143
143
|
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. Today, native subagents and Team teammates initialize from the parent's latest recorded request route (or creation options before its first request); this is not a live link, and a route snapshot does not prove Auto intent. The requested per-child-turn inheritance behavior and Core/plugin boundary are documented in the [policy](./docs/automatic-model-routing.md#requested-parent-to-child-selection-inheritance). The nested management disclosure is plugin-owned; Core's picker remains flat.
|
|
144
144
|
|
|
145
|
-
Completed Copilot replies show **Auto (preference)** and an expandable recorded reason after native Usage/time, or **Manual** only with captured explicit fixed-selection evidence.
|
|
145
|
+
Completed Copilot replies show **Auto (preference)** and an expandable recorded reason after native Usage/time, or **Manual** only with captured explicit fixed-selection evidence. A successful read with no retained evidence shows **Selection unknown**, never a guess from today's picker. Failed reads instead show **Selection unavailable → Retry**; retry only reads the same turn's record, not another model request. Explicit Session/turn arguments remain stable inside a session-bound Chat, avoiding the former native gateway argument-count failure on fresh master/lead replies. 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.
|
|
146
146
|
|
|
147
147
|
The selection footer mounts independently of optional conversation projections. Native completed-turn evidence lets retained Auto/Manual records remain visible if those projections are unavailable; incomplete attribution stays explicit in the information disclosure. This does not restore lost selection records or prove that an installed update is loaded in Desktop.
|
|
148
148
|
|
|
@@ -175,7 +175,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
175
175
|
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.
|
|
176
176
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
177
177
|
|
|
178
|
-
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.
|
|
178
|
+
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.76`, 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).
|
|
179
179
|
|
|
180
180
|
**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.
|
|
181
181
|
|
|
@@ -452,8 +452,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
452
452
|
`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.
|
|
453
453
|
|
|
454
454
|
```sh
|
|
455
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
456
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
455
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.76/dsh-github-copilot-0.4.0-alpha.76.tgz
|
|
456
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.76/SHA256SUMS
|
|
457
457
|
sha256sum --check SHA256SUMS
|
|
458
458
|
```
|
|
459
459
|
|
|
@@ -461,7 +461,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
461
461
|
|
|
462
462
|
```powershell
|
|
463
463
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
464
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
464
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.76.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
465
465
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
466
466
|
```
|
|
467
467
|
|
package/README.zh.md
CHANGED
|
@@ -26,7 +26,7 @@ Core 管理。详见[图片兼容性与限制](./docs/image-input-compatibility.
|
|
|
26
26
|
|
|
27
27
|
截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
|
|
28
28
|
|
|
29
|
-
> 当前文档与安装命令对应版本 `0.4.0-alpha.
|
|
29
|
+
> 当前文档与安装命令对应版本 `0.4.0-alpha.76`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
30
30
|
|
|
31
31
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
32
32
|
|
|
@@ -121,10 +121,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
121
121
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
122
122
|
|
|
123
123
|
```sh
|
|
124
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
124
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.76/dsh-github-copilot-0.4.0-alpha.76.tgz
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
127
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.76`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
128
128
|
|
|
129
129
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
130
130
|
|
|
@@ -144,7 +144,7 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
|
|
|
144
144
|
|
|
145
145
|
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档先应用精确模型排除,再共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure;若排除后没有任何合格模型,则 Auto 关闭式失败。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有未被排除且已验证的图片候选。新轮次保留 Core 的真实模型/用量信息,不追加不兼容的插件事件。搜索仍由独立策略管理。目前原生子代理与 Team 队友会以 master 最近记录的请求 route 初始化(master 尚未发出请求时回退到创建配置);这不是随 master 后续选择自动变化的动态关联,route 快照也不能证明 Auto 意图已继承。每轮跟随 master 固定模型、或让子代理按自身上下文独立执行 Auto 的目标行为及 Core/插件边界,见[设计记录](./docs/automatic-model-routing.md#requested-parent-to-child-selection-inheritance)。嵌套管理折叠区由插件提供;Core picker 仍保持平铺。
|
|
146
146
|
|
|
147
|
-
已完成的 Copilot 回复在原生 Usage/时间后显示 **Auto
|
|
147
|
+
已完成的 Copilot 回复在原生 Usage/时间后显示 **Auto(偏好)**,点信息按钮查看本轮记录的选择原因;只有捕获到明确固定选择才显示**手动**。成功读取但没有保留记录时显示**选择方式未知**,不借当前 picker 推断历史。读取失败则显示**选择记录读取失败 → 重试**;重试只重新读取同一轮记录,不重新调用模型。显式会话 ID/轮次参数不再被 Chat 的自动会话绑定缩减,修复新 master/lead 回复遭遇原生网关参数数量错误的问题。不重复模型名、不另设 Model details 按钮:实际模型仍由原生 Usage 显示,其缺失归属行为未改变。新选择记录仅限当前 Host 内存且有容量上限,重启、释放 Agent 或淘汰后会丢失;兼容历史 Auto 记录仍可读取。公开 assistant-actions slot 只允许插件内部换行,不能改变原生固定高度尾栏。
|
|
148
148
|
|
|
149
149
|
选择标记独立于可选会话投影挂载。投影不可用时,原生已完成回合证据仍允许显示保留的 Auto/手动记录;归属证据不完整会在信息弹层中明确说明。这不会恢复丢失的选择记录,也不证明已安装的更新已在 Desktop 加载。
|
|
150
150
|
|
|
@@ -177,7 +177,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
177
177
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
178
178
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
179
179
|
|
|
180
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
180
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.76`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
181
181
|
|
|
182
182
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
|
|
183
183
|
|
|
@@ -463,8 +463,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
463
463
|
`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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
464
464
|
|
|
465
465
|
```sh
|
|
466
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
467
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
466
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.76/dsh-github-copilot-0.4.0-alpha.76.tgz
|
|
467
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.76/SHA256SUMS
|
|
468
468
|
sha256sum --check SHA256SUMS
|
|
469
469
|
```
|
|
470
470
|
|
|
@@ -472,7 +472,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
472
472
|
|
|
473
473
|
```powershell
|
|
474
474
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
475
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
475
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.76.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
476
476
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
477
477
|
```
|
|
478
478
|
|
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.76"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -1058,6 +1058,7 @@
|
|
|
1058
1058
|
{"file": "src/turn-model-provenance.ts", "marker": "assistant/message"},
|
|
1059
1059
|
{"file": "src/turn-selection-card.ts", "marker": "Selection unknown"},
|
|
1060
1060
|
{"file": "src/turn-selection-remote.ts", "marker": "lookup: 'agent'"},
|
|
1061
|
+
{"file": "src/turn-selection-card.ts", "marker": "Selection unavailable"},
|
|
1061
1062
|
{"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
|
|
1062
1063
|
],
|
|
1063
1064
|
"tests": [
|
|
@@ -109,6 +109,30 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
|
|
|
109
109
|
|
|
110
110
|
## Attribution and explanation
|
|
111
111
|
|
|
112
|
+
**Fresh master/lead selection reads (alpha.76, #249):** the footer explicitly
|
|
113
|
+
calls `get(viewedSessionId, turn)`. Its old Remote descriptor also declared an
|
|
114
|
+
automatic `agent` scope projection. The unchanged rc.2 Client gateway prefers
|
|
115
|
+
that projection when a Client context has an agent identity, removes the ID
|
|
116
|
+
parameter from its expected arguments, and rejects this two-argument call with
|
|
117
|
+
`expected 1 argument(s), got 2` before sending RPC. Existing root-context mocks
|
|
118
|
+
did not exercise this behavior. This is a reproducible new-reply display failure,
|
|
119
|
+
not evidence of missing historical decisions or an Auto routing failure.
|
|
120
|
+
|
|
121
|
+
The descriptor now exposes only the direct two-argument Client call. Its native
|
|
122
|
+
Host `agent` lookup, strict Session ID/turn/result codecs and method identity
|
|
123
|
+
are unchanged. The viewed Session is never replaced by an ambient current
|
|
124
|
+
Session. Native gateway regression runs the old descriptor to reproduce the
|
|
125
|
+
rejection, then checks the fixed descriptor with both bound and unbound contexts.
|
|
126
|
+
Host access checks are not bypassed: native child lookup restrictions remain a
|
|
127
|
+
separate limitation, not the explanation for the reported master/lead case.
|
|
128
|
+
|
|
129
|
+
Pending reads show **Loading selection…**; failed or invalid reads show
|
|
130
|
+
**Selection unavailable** and an explicit **Retry**. Retry reads the same
|
|
131
|
+
Session/turn, does not rerun inference, and never exposes a raw error response.
|
|
132
|
+
Only a successful read with no retained decision shows **Selection unknown**.
|
|
133
|
+
Compatible historical attribution can still supply an independently known Auto
|
|
134
|
+
decision. This change does not persist decisions or recover evicted evidence.
|
|
135
|
+
|
|
112
136
|
**Completed-turn fallback (alpha.71, #238):** a new Desktop Session was observed without the Auto label despite alpha.70 reporting all three components running. That status does not attest every optional Client dependency fiber. The reproducible defect is that the actions entry waited for `uiConversation` registration, and then required its optional provenance projection even when the Host retained the exact turn's selection. The original live Client trigger has not been established from console evidence.
|
|
113
137
|
|
|
114
138
|
The actions entry now waits only for the selection Remote namespace and public slots. Historical attribution/provenance definitions register independently. A native `turn-tail` matching the displayed closing message, turn and valid completion sequence is independent completion evidence: a retained Auto/Manual selection can render without the optional projection. Native `tokenUsage.routes` can establish Copilot ownership for **Selection unknown** when projection data is absent. Missing projection evidence remains visibly incomplete; it never becomes guessed Manual, a guessed preference, or a reconstructed historical selection. Invalid/mismatched completion stays hidden. Projection failure cannot unregister the independent actions entry.
|
package/lib/client.js
CHANGED
|
@@ -5676,10 +5676,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
5676
5676
|
service: "githubCopilotTurnSelection",
|
|
5677
5677
|
method: "get",
|
|
5678
5678
|
invocation: { kind: "direct" },
|
|
5679
|
-
scope: {
|
|
5680
|
-
context: "agent",
|
|
5681
|
-
wire: "agentId"
|
|
5682
|
-
},
|
|
5683
5679
|
parameters: [{
|
|
5684
5680
|
name: "agent",
|
|
5685
5681
|
wire: "agentId",
|
|
@@ -6244,7 +6240,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6244
6240
|
};
|
|
6245
6241
|
//#endregion
|
|
6246
6242
|
//#region lib/types/turn-selection-card.js
|
|
6247
|
-
function TurnSelectionCard({ selection, locale = "en", incomplete = false }) {
|
|
6243
|
+
function TurnSelectionCard({ selection, locale = "en", incomplete = false, readState = "ready", retry }) {
|
|
6248
6244
|
const zh = locale.startsWith("zh");
|
|
6249
6245
|
const id = (0, react.useId)();
|
|
6250
6246
|
const [open, setOpen] = (0, react.useState)(false);
|
|
@@ -6320,7 +6316,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6320
6316
|
maxWidth: "100%",
|
|
6321
6317
|
fontSize: "var(--dsh-content-font-size-secondary, 13px)",
|
|
6322
6318
|
color: "var(--dsw-alias-label-tertiary, GrayText)"
|
|
6323
|
-
} }, (0, react.createElement)("span", {
|
|
6319
|
+
} }, (0, react.createElement)("span", {
|
|
6320
|
+
role: readState === "ready" ? void 0 : "status",
|
|
6321
|
+
title: readState === "ready" && selection.mode === "unknown" ? zh ? "本轮选择记录未保留;不从当前选择推断历史。" : "No retained selection evidence; the current picker is not historical evidence." : void 0
|
|
6322
|
+
}, readState === "loading" ? zh ? "正在读取选择记录…" : "Loading selection…" : readState === "failed" ? zh ? "选择记录读取失败" : "Selection unavailable" : label), readState === "failed" && retry ? (0, react.createElement)("button", {
|
|
6323
|
+
type: "button",
|
|
6324
|
+
style: button,
|
|
6325
|
+
onClick: retry
|
|
6326
|
+
}, zh ? "重试" : "Retry") : null, readState === "ready" && (selection.mode === "auto" || incomplete) ? (0, react.createElement)("button", {
|
|
6324
6327
|
ref: trigger,
|
|
6325
6328
|
type: "button",
|
|
6326
6329
|
style: {
|
|
@@ -6478,19 +6481,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6478
6481
|
}
|
|
6479
6482
|
function Attribution(props) {
|
|
6480
6483
|
const [live, setLive] = react.useState({ mode: "unknown" });
|
|
6484
|
+
const [readState, setReadState] = react.useState("loading");
|
|
6485
|
+
const [readAttempt, setReadAttempt] = react.useState(0);
|
|
6481
6486
|
const turn = record$3(props.turn) && sequence(props.turn.turn) ? props.turn.turn : void 0;
|
|
6482
6487
|
const sessionId = typeof props.sessionId === "string" ? props.sessionId : void 0;
|
|
6483
6488
|
react.useEffect(() => {
|
|
6484
6489
|
setLive({ mode: "unknown" });
|
|
6485
|
-
if (turn === void 0 || sessionId === void 0 || props.remote === void 0)
|
|
6490
|
+
if (turn === void 0 || sessionId === void 0 || props.remote === void 0) {
|
|
6491
|
+
setReadState("failed");
|
|
6492
|
+
return;
|
|
6493
|
+
}
|
|
6494
|
+
setReadState("loading");
|
|
6486
6495
|
let active = true;
|
|
6487
6496
|
props.remote.get(sessionId, turn).then((result) => {
|
|
6488
6497
|
if (!active) return;
|
|
6489
6498
|
const parsed = result.ok ? TurnSelectionSchema.safeParse(result.value) : void 0;
|
|
6490
|
-
if (parsed?.success)
|
|
6491
|
-
|
|
6499
|
+
if (parsed?.success) {
|
|
6500
|
+
setLive(parsed.data);
|
|
6501
|
+
setReadState("ready");
|
|
6502
|
+
} else {
|
|
6503
|
+
setReadState("failed");
|
|
6504
|
+
props.diagnostic("COPILOT_TURN_SELECTION_READ_FAILED");
|
|
6505
|
+
}
|
|
6492
6506
|
}, () => {
|
|
6493
|
-
if (active)
|
|
6507
|
+
if (active) {
|
|
6508
|
+
setReadState("failed");
|
|
6509
|
+
props.diagnostic("COPILOT_TURN_SELECTION_READ_FAILED");
|
|
6510
|
+
}
|
|
6494
6511
|
});
|
|
6495
6512
|
return () => {
|
|
6496
6513
|
active = false;
|
|
@@ -6499,7 +6516,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6499
6516
|
props.remote,
|
|
6500
6517
|
sessionId,
|
|
6501
6518
|
turn,
|
|
6502
|
-
props.diagnostic
|
|
6519
|
+
props.diagnostic,
|
|
6520
|
+
readAttempt
|
|
6503
6521
|
]);
|
|
6504
6522
|
const language = react.useSyncExternalStore(props.locale ? (listener) => props.locale.subscribe(listener) : () => noop$2, () => props.locale?.getLocale().active ?? "en", () => "en");
|
|
6505
6523
|
const source = sourceOf(props, AUTO_MODEL_ATTRIBUTION_KEY, props.diagnostic);
|
|
@@ -6530,7 +6548,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6530
6548
|
return react.createElement(TurnSelectionCard, {
|
|
6531
6549
|
selection,
|
|
6532
6550
|
locale: language,
|
|
6533
|
-
incomplete: evidence?.incomplete ?? true
|
|
6551
|
+
incomplete: evidence?.incomplete ?? true,
|
|
6552
|
+
readState: selection.mode === "unknown" ? readState : "ready",
|
|
6553
|
+
retry: props.remote === void 0 ? void 0 : () => setReadAttempt((value) => value + 1)
|
|
6534
6554
|
});
|
|
6535
6555
|
}
|
|
6536
6556
|
function installAutoModelProjections(capabilities) {
|