dsh-github-copilot 0.4.0-alpha.70 → 0.4.0-alpha.71
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/CHANGELOG.md +6 -0
- package/README.md +9 -7
- package/README.zh.md +9 -7
- package/deployment-baseline.json +5 -1
- package/docs/automatic-model-routing.md +6 -0
- package/lib/client.js +49 -17
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/types/auto-model-presentation.d.ts +5 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.71 (prepared)
|
|
4
|
+
|
|
5
|
+
- Decouple the Auto selection footer from optional conversation projections and wait for its exact Remote namespace (#238).
|
|
6
|
+
- Use native completed-turn evidence to show retained Auto/Manual records when projection data is unavailable; keep incomplete attribution explicit without guessing historical selections or changing native Usage.
|
|
7
|
+
- Cover cold/incremental native assembly and session-scoped rendering, projection failures, pending dependencies and invalid completion evidence. Live Desktop recovery still requires loaded-version verification.
|
|
8
|
+
|
|
3
9
|
## 0.4.0-alpha.70 (prepared)
|
|
4
10
|
|
|
5
11
|
- Require image-capable Auto candidates for retained historical user/tool images after text-only continuations; honor native image offload markers (#236).
|
package/README.md
CHANGED
|
@@ -103,7 +103,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
103
103
|
|
|
104
104
|
## Install and sign in
|
|
105
105
|
|
|
106
|
-
The commands below target the package version `0.4.0-alpha.
|
|
106
|
+
The commands below target the package version `0.4.0-alpha.71`. 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):
|
|
107
107
|
|
|
108
108
|
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):
|
|
109
109
|
|
|
@@ -116,10 +116,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
116
116
|
For a standalone named profile only, the supported CLI command is:
|
|
117
117
|
|
|
118
118
|
```sh
|
|
119
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
119
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.71/dsh-github-copilot-0.4.0-alpha.71.tgz
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
122
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.71` 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.
|
|
123
123
|
|
|
124
124
|
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.
|
|
125
125
|
|
|
@@ -141,6 +141,8 @@ The managed GitHub Copilot group includes **Auto · Balance**, **Auto · Efficie
|
|
|
141
141
|
|
|
142
142
|
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.
|
|
143
143
|
|
|
144
|
+
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.
|
|
145
|
+
|
|
144
146
|
Auto input fitting uses Core's native TokenMeter for every entered message, including reasoning and tool history, plus its current-surface/tool-envelope floor. Missing or invalid native measurement fails Auto explicitly rather than silently selecting from an undercount. This prevents the known estimation error but does not rescue history whose summary input already exceeds every eligible model's budget; see [compaction limits](./docs/copilot-compaction.md#existing-oversized-history-and-recovery-limits).
|
|
145
147
|
|
|
146
148
|
Alpha.63 fixes a missing footer on official Desktop by supporting its native ChatNodeStore rather than requiring a JavaScript Map. It does not change Auto selection or recover reasons already lost on Host restart.
|
|
@@ -170,7 +172,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
170
172
|
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.
|
|
171
173
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
172
174
|
|
|
173
|
-
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.
|
|
175
|
+
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.71`, 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).
|
|
174
176
|
|
|
175
177
|
**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.
|
|
176
178
|
|
|
@@ -445,8 +447,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
445
447
|
`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.
|
|
446
448
|
|
|
447
449
|
```sh
|
|
448
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
449
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
450
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.71/dsh-github-copilot-0.4.0-alpha.71.tgz
|
|
451
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.71/SHA256SUMS
|
|
450
452
|
sha256sum --check SHA256SUMS
|
|
451
453
|
```
|
|
452
454
|
|
|
@@ -454,7 +456,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
454
456
|
|
|
455
457
|
```powershell
|
|
456
458
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
457
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
459
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.71.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
458
460
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
459
461
|
```
|
|
460
462
|
|
package/README.zh.md
CHANGED
|
@@ -25,7 +25,7 @@ Core 管理。详见[图片兼容性与限制](./docs/image-input-compatibility.
|
|
|
25
25
|
|
|
26
26
|
截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
|
|
27
27
|
|
|
28
|
-
> 当前文档与安装命令对应版本 `0.4.0-alpha.
|
|
28
|
+
> 当前文档与安装命令对应版本 `0.4.0-alpha.71`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
29
29
|
|
|
30
30
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
31
31
|
|
|
@@ -118,10 +118,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
118
118
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
119
119
|
|
|
120
120
|
```sh
|
|
121
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
121
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.71/dsh-github-copilot-0.4.0-alpha.71.tgz
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
124
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.71`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
125
125
|
|
|
126
126
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
127
127
|
|
|
@@ -143,6 +143,8 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
|
|
|
143
143
|
|
|
144
144
|
已完成的 Copilot 回复在原生 Usage/时间后显示 **Auto(偏好)**,点信息按钮查看本轮记录的选择原因;只有捕获到明确固定选择才显示**手动**。缺记录显示**选择方式未知**,不借当前 picker 推断历史。不重复模型名、不另设 Model details 按钮:实际模型仍由原生 Usage 显示,其缺失归属行为未改变。新选择记录仅限当前 Host 内存且有容量上限,重启、释放 Agent 或淘汰后会丢失;兼容历史 Auto 记录仍可读取。公开 assistant-actions slot 只允许插件内部换行,不能改变原生固定高度尾栏。
|
|
145
145
|
|
|
146
|
+
选择标记独立于可选会话投影挂载。投影不可用时,原生已完成回合证据仍允许显示保留的 Auto/手动记录;归属证据不完整会在信息弹层中明确说明。这不会恢复丢失的选择记录,也不证明已安装的更新已在 Desktop 加载。
|
|
147
|
+
|
|
146
148
|
Auto 输入适配通过 Core 原生 TokenMeter 逐条估算消息,包含推理与工具历史,并保留原生当前上下文/工具定义测量值作为下限。缺失或无效的测量会明确报错,不再静默漏算后选模型。这能修复已知估算错误,但不能救回摘要输入已经超出所有合格模型预算的历史;详见[压缩恢复边界](./docs/copilot-compaction.md#existing-oversized-history-and-recovery-limits)。
|
|
147
149
|
|
|
148
150
|
Alpha.63 通过支持官方 Desktop 的原生 ChatNodeStore、移除必须为 JavaScript Map 的错误限制,修复尾栏不显示的问题。不改变 Auto 选择策略,也不能恢复 Host 重启后已丢失的选择原因。
|
|
@@ -172,7 +174,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
172
174
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
173
175
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
174
176
|
|
|
175
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
177
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.71`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
176
178
|
|
|
177
179
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
|
|
178
180
|
|
|
@@ -456,8 +458,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
456
458
|
`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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
457
459
|
|
|
458
460
|
```sh
|
|
459
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
460
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
461
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.71/dsh-github-copilot-0.4.0-alpha.71.tgz
|
|
462
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.71/SHA256SUMS
|
|
461
463
|
sha256sum --check SHA256SUMS
|
|
462
464
|
```
|
|
463
465
|
|
|
@@ -465,7 +467,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
465
467
|
|
|
466
468
|
```powershell
|
|
467
469
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
468
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
470
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.71.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
469
471
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
470
472
|
```
|
|
471
473
|
|
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.71"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -1025,6 +1025,7 @@
|
|
|
1025
1025
|
{"file": "src/parent-model-follow-card.ts", "marker": "Follow parent model"},
|
|
1026
1026
|
{"file": "src/auto-model-host.ts", "marker": "COPILOT_AUTO_TOKEN_METER_UNAVAILABLE"},
|
|
1027
1027
|
{"file": "src/auto-model-presentation.ts", "marker": "conversation.chat.assistant-actions"},
|
|
1028
|
+
{"file": "src/auto-model-presentation.ts", "marker": "installAutoModelProjections"},
|
|
1028
1029
|
{"file": "src/auto-model-presentation.ts", "marker": "turnModelProvenanceDefinition"},
|
|
1029
1030
|
{"file": "src/turn-model-provenance.ts", "marker": "assistant/message"},
|
|
1030
1031
|
{"file": "src/turn-selection-card.ts", "marker": "Selection unknown"},
|
|
@@ -1045,6 +1046,9 @@
|
|
|
1045
1046
|
{"file": "tests/auto-model-presentation.spec.ts", "name": "omits attribution when a compatible history contains no optional decision"},
|
|
1046
1047
|
{"file": "tests/turn-selection-card.spec.ts", "name": "reads exact completed turn evidence through %s and exposes reasons without repeating the model"},
|
|
1047
1048
|
{"file": "tests/turn-selection-card.spec.ts", "name": "diagnoses an unavailable node collection without reading another turn"},
|
|
1049
|
+
{"file": "tests/turn-selection-card.spec.ts", "name": "uses native completion independently of optional projections: $expected"},
|
|
1050
|
+
{"file": "tests/client.spec.ts", "name": "registers and disposes Auto actions while the optional conversation fiber remains pending"},
|
|
1051
|
+
{"file": "tests/fixtures/reasoning-presentation-core.fixture.ts", "name": "renders retained Auto evidence without optional projections through native %s and slots"},
|
|
1048
1052
|
{"file": "tests/turn-model-provenance.spec.ts", "name": "retains known models around zero-usage failed attempts without reading payloads"},
|
|
1049
1053
|
{"file": "tests/preview-route.spec.ts", "name": "publishes Auto as a virtual picker entry but refuses unresolved adapter dispatch"},
|
|
1050
1054
|
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "shrinks durable history and rebuilds the switched model request without sending the oversized original"}
|
|
@@ -109,6 +109,12 @@ Chat Auto does not own or alter the independent `github-copilot-hosted` search p
|
|
|
109
109
|
|
|
110
110
|
## Attribution and explanation
|
|
111
111
|
|
|
112
|
+
**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
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
Regression coverage includes absent/failed projections, exact Session/turn binding, stale responses, incomplete disclosure and pending Client dependencies. The existing exact-source UI fixture exercises native assistant/turn-tail assembly, cold replacement and incremental append, and the real session-scoped slot renderer without plugin projections. These are synthetic regressions, not proof of a newly loaded Desktop Client or live inference. No Core, history, settings, credentials, routing policy or native Usage changes are required.
|
|
117
|
+
|
|
112
118
|
**Desktop collection compatibility (alpha.63, #222):** the assistant-actions selector reads the public `snapshot.nodes.values()` iterable. Official ChatNodeStore returns an array; a JavaScript Map returns an iterator. Neither requires class identity checks or private-store access. Unsupported collections emit `COPILOT_TURN_SELECTION_CHAT_NODES_UNAVAILABLE` once and suppress the footer without reading another turn. This fixes the missing label/disclosure without changing selection policy or restoring lost Host-lifetime evidence.
|
|
113
119
|
|
|
114
120
|
**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.
|
package/lib/client.js
CHANGED
|
@@ -6454,7 +6454,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6454
6454
|
function iterable(value) {
|
|
6455
6455
|
return value !== null && typeof value === "object" && Symbol.iterator in value && typeof value[Symbol.iterator] === "function";
|
|
6456
6456
|
}
|
|
6457
|
-
function
|
|
6457
|
+
function findTail(snapshot, messageId, diagnostic) {
|
|
6458
6458
|
if (typeof messageId !== "string") return void 0;
|
|
6459
6459
|
if (!record$2(snapshot) || !record$2(snapshot.nodes) || typeof snapshot.nodes.values !== "function") {
|
|
6460
6460
|
diagnostic("COPILOT_TURN_SELECTION_CHAT_NODES_UNAVAILABLE");
|
|
@@ -6468,7 +6468,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6468
6468
|
for (const node of nodes) {
|
|
6469
6469
|
if (!record$2(node) || node.kind !== "turn-tail" || !record$2(node.data) || !record$2(node.data.closing)) continue;
|
|
6470
6470
|
const closing = node.data.closing;
|
|
6471
|
-
if (record$2(closing.finalNode) && closing.finalNode.messageId === messageId && record$2(node.location)) return node
|
|
6471
|
+
if (record$2(closing.finalNode) && closing.finalNode.messageId === messageId && record$2(node.location)) return node;
|
|
6472
6472
|
}
|
|
6473
6473
|
}
|
|
6474
6474
|
function Attribution(props) {
|
|
@@ -6509,8 +6509,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6509
6509
|
}
|
|
6510
6510
|
})?.value;
|
|
6511
6511
|
const evidence = isTurnModelProvenance(provenance) ? provenance : void 0;
|
|
6512
|
-
|
|
6513
|
-
|
|
6512
|
+
const native = record$2(props.tail) && record$2(props.tail.data) ? props.tail.data : void 0;
|
|
6513
|
+
const nativeCompleted = native?.turn === turn && sequence(native?.seq);
|
|
6514
|
+
if (evidence?.ended !== true && !nativeCompleted) return null;
|
|
6515
|
+
if (evidence === void 0) props.diagnostic("COPILOT_TURN_SELECTION_PROVENANCE_UNAVAILABLE");
|
|
6516
|
+
const nativeRoutes = nativeCompleted && record$2(native?.tokenUsage) && Array.isArray(native.tokenUsage.routes) ? native.tokenUsage.routes : [];
|
|
6517
|
+
if (!(evidence?.routes ?? nativeRoutes).some((route) => record$2(route) && (route.provider === "github-copilot-preview" || route.provider === "github-copilot") && typeof route.model === "string" && route.model.trim() !== "") && parsed === void 0 && live.mode === "unknown") return null;
|
|
6514
6518
|
const selection = live.mode !== "unknown" ? live : parsed?.preference ? {
|
|
6515
6519
|
mode: "auto",
|
|
6516
6520
|
preference: parsed.preference,
|
|
@@ -6521,9 +6525,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6521
6525
|
return react.createElement(TurnSelectionCard, {
|
|
6522
6526
|
selection,
|
|
6523
6527
|
locale: language,
|
|
6524
|
-
incomplete: evidence
|
|
6528
|
+
incomplete: evidence?.incomplete ?? true
|
|
6525
6529
|
});
|
|
6526
6530
|
}
|
|
6531
|
+
function installAutoModelProjections(capabilities) {
|
|
6532
|
+
if (!record$2(capabilities.uiConversation) || !record$2(capabilities.uiConversation.events) || typeof capabilities.uiConversation.events.register !== "function") {
|
|
6533
|
+
capabilities.diagnostic("COPILOT_AUTO_PROJECTIONS_UNAVAILABLE");
|
|
6534
|
+
return noop$1;
|
|
6535
|
+
}
|
|
6536
|
+
const events = capabilities.uiConversation.events;
|
|
6537
|
+
let removeDefinition = noop$1;
|
|
6538
|
+
let removeProvenance = noop$1;
|
|
6539
|
+
try {
|
|
6540
|
+
removeDefinition = events.register(autoModelAttributionDefinition);
|
|
6541
|
+
removeProvenance = events.register(turnModelProvenanceDefinition);
|
|
6542
|
+
} catch {
|
|
6543
|
+
removeProvenance();
|
|
6544
|
+
removeDefinition();
|
|
6545
|
+
capabilities.diagnostic("COPILOT_AUTO_PROJECTIONS_FAILED");
|
|
6546
|
+
return noop$1;
|
|
6547
|
+
}
|
|
6548
|
+
return () => {
|
|
6549
|
+
removeProvenance();
|
|
6550
|
+
removeDefinition();
|
|
6551
|
+
};
|
|
6552
|
+
}
|
|
6527
6553
|
function installAutoModelPresentation(capabilities) {
|
|
6528
6554
|
const diagnosed = /* @__PURE__ */ new Set();
|
|
6529
6555
|
const diagnostic = (code) => {
|
|
@@ -6537,12 +6563,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6537
6563
|
"spec",
|
|
6538
6564
|
"inject",
|
|
6539
6565
|
"register"
|
|
6540
|
-
].every((key) => typeof slotsCandidate[key] === "function")
|
|
6566
|
+
].every((key) => typeof slotsCandidate[key] === "function")) {
|
|
6541
6567
|
diagnostic("COPILOT_AUTO_PRESENTATION_UNAVAILABLE");
|
|
6542
6568
|
return noop$1;
|
|
6543
6569
|
}
|
|
6544
6570
|
const slots = slotsCandidate;
|
|
6545
|
-
const events = capabilities.uiConversation.events;
|
|
6546
6571
|
const face = record$2(capabilities.remote) ? capabilities.remote.githubCopilotTurnSelection : void 0;
|
|
6547
6572
|
const remote = record$2(face) && typeof face.get === "function" ? face : void 0;
|
|
6548
6573
|
const locale = record$2(capabilities.locale) && typeof capabilities.locale.getLocale === "function" && typeof capabilities.locale.subscribe === "function" ? capabilities.locale : void 0;
|
|
@@ -6553,23 +6578,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6553
6578
|
return null;
|
|
6554
6579
|
}
|
|
6555
6580
|
const useChat = props.useChat;
|
|
6556
|
-
const
|
|
6581
|
+
const tail = useChat((snapshot) => findTail(snapshot, props.messageId, diagnostic));
|
|
6582
|
+
const turn = record$2(tail) && record$2(tail.location) ? tail.location.turn : void 0;
|
|
6557
6583
|
if (!record$2(turn) || !sequence(turn.turn)) return null;
|
|
6558
6584
|
return react.createElement(Attribution, {
|
|
6559
6585
|
...props,
|
|
6560
6586
|
key: `${props.sessionId}:${turn.turn}`,
|
|
6561
6587
|
turn,
|
|
6588
|
+
tail,
|
|
6562
6589
|
remote,
|
|
6563
6590
|
locale,
|
|
6564
6591
|
diagnostic
|
|
6565
6592
|
});
|
|
6566
6593
|
}
|
|
6567
|
-
|
|
6568
|
-
|
|
6594
|
+
const removeProjections = capabilities.uiConversation === void 0 ? noop$1 : installAutoModelProjections({
|
|
6595
|
+
uiConversation: capabilities.uiConversation,
|
|
6596
|
+
diagnostic
|
|
6597
|
+
});
|
|
6569
6598
|
let removeInjection = noop$1;
|
|
6570
6599
|
try {
|
|
6571
|
-
removeDefinition = events.register(autoModelAttributionDefinition);
|
|
6572
|
-
removeProvenance = events.register(turnModelProvenanceDefinition);
|
|
6573
6600
|
removeInjection = slots.inject(SLOT, () => {
|
|
6574
6601
|
if (slots.spec(SLOT)?.kind !== "list" || slots.spec(SLOT)?.scope !== "session") {
|
|
6575
6602
|
diagnostic("COPILOT_AUTO_ACTIONS_SLOT_UNAVAILABLE");
|
|
@@ -6583,15 +6610,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6583
6610
|
});
|
|
6584
6611
|
} catch {
|
|
6585
6612
|
removeInjection();
|
|
6586
|
-
|
|
6587
|
-
removeDefinition();
|
|
6613
|
+
removeProjections();
|
|
6588
6614
|
diagnostic("COPILOT_AUTO_PRESENTATION_FAILED");
|
|
6589
6615
|
return noop$1;
|
|
6590
6616
|
}
|
|
6591
6617
|
return () => {
|
|
6592
6618
|
removeInjection();
|
|
6593
|
-
|
|
6594
|
-
removeDefinition();
|
|
6619
|
+
removeProjections();
|
|
6595
6620
|
};
|
|
6596
6621
|
}
|
|
6597
6622
|
//#endregion
|
|
@@ -9330,6 +9355,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9330
9355
|
"slots"
|
|
9331
9356
|
], registerSearchUi);
|
|
9332
9357
|
const usageUi = ctx.inject(["remote.githubCopilotUsage", "slots"], registerCopilotUsageUi);
|
|
9358
|
+
const autoUi = ctx.inject(["remote.githubCopilotTurnSelection", "slots"], (scope) => installAutoModelPresentation({
|
|
9359
|
+
slots: scope.slots,
|
|
9360
|
+
remote: scope.remote,
|
|
9361
|
+
locale: scope.get("locale"),
|
|
9362
|
+
diagnostic: (code) => scope.logger.warn(`[github-copilot] ${code}`)
|
|
9363
|
+
}));
|
|
9333
9364
|
const presentation = ctx.inject(["uiConversation", "slots"], (scope) => {
|
|
9334
9365
|
const capabilities = {
|
|
9335
9366
|
slots: scope.slots,
|
|
@@ -9339,7 +9370,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9339
9370
|
diagnostic: (code) => scope.logger.warn(`[github-copilot] ${code}`)
|
|
9340
9371
|
};
|
|
9341
9372
|
const reasoning = installReasoningPresentation(capabilities);
|
|
9342
|
-
const auto =
|
|
9373
|
+
const auto = installAutoModelProjections(capabilities);
|
|
9343
9374
|
return () => {
|
|
9344
9375
|
auto();
|
|
9345
9376
|
reasoning();
|
|
@@ -9347,6 +9378,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
9347
9378
|
});
|
|
9348
9379
|
return async () => {
|
|
9349
9380
|
await usageUi.dispose();
|
|
9381
|
+
await autoUi.dispose();
|
|
9350
9382
|
await presentation.dispose();
|
|
9351
9383
|
await searchUi.dispose();
|
|
9352
9384
|
await ui.dispose();
|