dsh-github-copilot 0.4.0-alpha.53 → 0.4.0-alpha.54
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 +2 -0
- package/CHANGELOG.md +5 -0
- package/README.md +10 -8
- package/README.zh.md +10 -8
- package/deployment-baseline.json +3 -2
- package/docs/automatic-model-routing.md +27 -3
- package/lib/index.js +3 -20
- package/package.json +3 -1
package/AGENTS.md
CHANGED
|
@@ -234,6 +234,8 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
|
|
|
234
234
|
|
|
235
235
|
## Changing capabilities
|
|
236
236
|
|
|
237
|
+
Auto history compatibility (alpha.54, #204): official rc.2 `Session.append()` has no public ignorable-envelope option. Do not emit optional `github-copilot/auto-model-decision` events or borrow another event type; retain native real-model provenance and durable Auto selection without a new attribution footer. `scripts/repair-auto-model-history.mjs` is explicit source-checkout maintenance, not a runtime hook: strict pinned official v4 validation, check-only by default, optional detached repaired copy plus byte-exact backup. It never replaces live history. Applying a copy requires separately approved stopped writers and a fresh source-hash check. See `docs/automatic-model-routing.md`.
|
|
238
|
+
|
|
237
239
|
1. Identify the owning seam using `agent-contract.json`; do not duplicate an upstream owner.
|
|
238
240
|
2. Add or update focused tests before changing deployment claims.
|
|
239
241
|
3. Update both READMEs when user behavior, setup, migration, or boundaries change.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.54 (prepared)
|
|
4
|
+
|
|
5
|
+
- Stop writing optional Auto attribution events that official DSH 0.2.0-rc.2 cannot mark ignorable, preventing subsequent Session history reads from failing (#204). Auto routing, durable virtual selection, and Core's actual model provenance are unchanged; new turns omit the plugin-specific attribution footer.
|
|
6
|
+
- Add an explicit source-checkout recovery command using the unchanged official v4 codec. It validates a detached repaired copy and preserves a byte-exact original backup, without replacing live histories or restarting Desktop.
|
|
7
|
+
|
|
3
8
|
## 0.4.0-alpha.53 (prepared)
|
|
4
9
|
|
|
5
10
|
- Fix Auto model concentration and context budget overflow by evaluating input fit as a hard routing condition before preference and distributing soft preferences across candidate bands with deterministic turn seeding (#199).
|
package/README.md
CHANGED
|
@@ -96,7 +96,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
96
96
|
|
|
97
97
|
## Install and sign in
|
|
98
98
|
|
|
99
|
-
The commands below target the package version `0.4.0-alpha.
|
|
99
|
+
The commands below target the package version `0.4.0-alpha.54`. 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
100
|
|
|
101
101
|
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
102
|
|
|
@@ -109,10 +109,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
109
109
|
For a standalone named profile only, the supported CLI command is:
|
|
110
110
|
|
|
111
111
|
```sh
|
|
112
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
112
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.54/dsh-github-copilot-0.4.0-alpha.54.tgz
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
115
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.54` 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
116
|
|
|
117
117
|
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
118
|
|
|
@@ -126,7 +126,9 @@ Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in*
|
|
|
126
126
|
|
|
127
127
|
### Auto model routing
|
|
128
128
|
|
|
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 an account-verified image-capable candidate.
|
|
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 an account-verified image-capable candidate. New turns retain Core's actual model/usage details but omit the plugin-specific Auto explanation footer: official rc.2 cannot safely append the optional plugin event. Compatible historical attribution remains visible. 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); model exclusions and a nested picker are still proposals.
|
|
130
|
+
|
|
131
|
+
**History loading error mentioning `github-copilot/auto-model-decision`:** alpha.54 prevents new incompatible events; upgrading or restarting does not repair existing logs. The [explicit recovery command](./docs/automatic-model-routing.md#recovering-affected-histories) validates a detached copy with the official codec and retains an exact original backup. Applying it to a live Session requires separate approval and stopped writers; no automatic history migration occurs.
|
|
130
132
|
|
|
131
133
|
When a virtual Auto preference is inherited as the default in a new Session, the first resolved request records that exact preference as the Session's durable selection while its request header still records the real model. Later turns retain the preference instead of locking to that header; explicitly selecting a real model switches to the fixed route. The existing `auto` ID remains Balance. Existing Sessions with a concrete recorded choice are not migrated by a change to the global default.
|
|
132
134
|
|
|
@@ -149,7 +151,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
149
151
|
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.
|
|
150
152
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
151
153
|
|
|
152
|
-
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.
|
|
154
|
+
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.54`, 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).
|
|
153
155
|
|
|
154
156
|
**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 plugin upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) cannot rebind active consumers via hot reload; Desktop must be fully exited and cold-restarted to take effect. 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, not native Desktop manager coverage or proof of restart recovery. Do not use bundle removal/re-add as a hot-upgrade workaround; follow the manager's upgrade result and separately authorized restart requirements. See [the rc.2 lifecycle characterization and bounded public-API finding](https://github.com/cloga/dsh-github-copilot/blob/main/docs/web-lifecycle-rc2.md).
|
|
155
157
|
|
|
@@ -420,8 +422,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
420
422
|
`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.
|
|
421
423
|
|
|
422
424
|
```sh
|
|
423
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
424
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
425
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.54/dsh-github-copilot-0.4.0-alpha.54.tgz
|
|
426
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.54/SHA256SUMS
|
|
425
427
|
sha256sum --check SHA256SUMS
|
|
426
428
|
```
|
|
427
429
|
|
|
@@ -429,7 +431,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
429
431
|
|
|
430
432
|
```powershell
|
|
431
433
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
432
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
434
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.54.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
433
435
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
434
436
|
```
|
|
435
437
|
|
package/README.zh.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
|
|
22
22
|
|
|
23
|
-
> 当前文档与安装命令对应版本 `0.4.0-alpha.
|
|
23
|
+
> 当前文档与安装命令对应版本 `0.4.0-alpha.54`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
24
24
|
|
|
25
25
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
26
26
|
|
|
@@ -111,10 +111,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
111
111
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
112
112
|
|
|
113
113
|
```sh
|
|
114
|
-
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.54/dsh-github-copilot-0.4.0-alpha.54.tgz
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
117
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.54`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
118
118
|
|
|
119
119
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
120
120
|
|
|
@@ -128,7 +128,9 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
|
|
|
128
128
|
|
|
129
129
|
### Auto 模型路由
|
|
130
130
|
|
|
131
|
-
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact
|
|
131
|
+
托管 GitHub Copilot 分组提供三个平铺的虚拟选择:**Auto · Balance**(均衡)、**Auto · Efficiency**(效率)和 **Auto · Intelligence**(智能)。三档共用当前账号验证过的合格模型池。在应用偏好前,路由会根据候选模型的硬输入预算计算输入余量,剔除无法容纳当前消息的候选。软偏好通过确定性内存种子在候选区间(上段/下段/中段)内分布,避免单一顶配模型跨 Session 被垄断。若所有候选均超限,Auto 会选择输入容量最大的模型并对可压缩历史触发 compaction pressure。Auto 在每个 Core turn 只解析一次;同轮工具步骤、重试和自动 compact 恢复使用同一真实模型,新轮次可重新选择。图片轮次必须有验证过的图片候选。新轮次保留 Core 的真实模型/用量信息,但暂不生成插件专属的 Auto 原因提示:官方 rc.2 无法安全追加这类可选插件事件;兼容历史中的归因仍保留显示。搜索仍由独立策略管理;原生子代理与 Team 队友继承 Core 的具体模型,不被重新标为 Auto。详见[策略与 mockup](./docs/automatic-model-routing.md);模型排除与嵌套菜单仍只是提案。
|
|
132
|
+
|
|
133
|
+
**历史加载报错包含 `github-copilot/auto-model-decision`:**alpha.54 阻止新问题事件写入,但升级或重启不会修复已有日志。[显式恢复命令](./docs/automatic-model-routing.md#recovering-affected-histories)使用官方 codec 校验独立修复副本,同时保存原始字节备份。替换实际 Session 日志必须另行批准并先停止所有写入者;插件不会自动迁移历史。
|
|
132
134
|
|
|
133
135
|
新 Session 继承任一默认 Auto 偏好时,首次解析请求会把准确的虚拟偏好记录为该 Session 的持久选择,请求头仍记录实际模型。后续轮次继续保留该偏好,而不会固定到请求头;显式选择真实模型才切换到固定路由。旧 `auto` ID 保持均衡档。全局默认值变化不会迁移已有具体模型记录的 Session。
|
|
134
136
|
|
|
@@ -151,7 +153,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
151
153
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
152
154
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
153
155
|
|
|
154
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
156
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.54`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
155
157
|
|
|
156
158
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。任何包含服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的插件升级均无法通过热重载重新绑定活动组件与 consumer,必须退出应用并冷重启 Desktop 才能完全生效。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 观察,不是原生 Desktop manager 覆盖,也不证明重启后恢复。不要用移除/重加 bundle 作为热升级绕行;遵循 manager 的升级结果及另行批准的重启要求。详见 [rc.2 生命周期 characterization 与有限的 public API 结论](https://github.com/cloga/dsh-github-copilot/blob/main/docs/web-lifecycle-rc2.md)。
|
|
157
159
|
|
|
@@ -431,8 +433,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
431
433
|
`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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
432
434
|
|
|
433
435
|
```sh
|
|
434
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
435
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
436
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.54/dsh-github-copilot-0.4.0-alpha.54.tgz
|
|
437
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.54/SHA256SUMS
|
|
436
438
|
sha256sum --check SHA256SUMS
|
|
437
439
|
```
|
|
438
440
|
|
|
@@ -440,7 +442,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
440
442
|
|
|
441
443
|
```powershell
|
|
442
444
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
443
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
445
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.54.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
444
446
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
445
447
|
```
|
|
446
448
|
|
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.54"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -988,7 +988,7 @@
|
|
|
988
988
|
"required": true,
|
|
989
989
|
"sourceMarkers": [
|
|
990
990
|
{"file": "src/preview-route.ts", "marker": "GITHUB_COPILOT_AUTO_MODEL_ID"},
|
|
991
|
-
{"file": "src/auto-model-host.ts", "marker": "
|
|
991
|
+
{"file": "src/auto-model-host.ts", "marker": "keep attribution out of the log"},
|
|
992
992
|
{"file": "src/auto-model-presentation.ts", "marker": "conversation.chat.turnTail"},
|
|
993
993
|
{"file": "src/auto-model-presentation.ts", "marker": "data-time-hover-root"},
|
|
994
994
|
{"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
|
|
@@ -999,6 +999,7 @@
|
|
|
999
999
|
{"file": "tests/auto-model-host.spec.ts", "name": "resolves after downstream model selection and freezes one decision per turn"},
|
|
1000
1000
|
{"file": "tests/auto-model-host.spec.ts", "name": "replaces Core virtual-Auto switch guidance with the resolved real route"},
|
|
1001
1001
|
{"file": "tests/auto-model-presentation.spec.ts", "name": "folds a durable decision into turn-scoped credential-free attribution"},
|
|
1002
|
+
{"file": "tests/auto-model-presentation.spec.ts", "name": "omits attribution when a compatible history contains no optional decision"},
|
|
1002
1003
|
{"file": "tests/auto-model-presentation.spec.ts", "name": "places Auto attribution after the settled clock and reveals it only on hover"},
|
|
1003
1004
|
{"file": "tests/preview-route.spec.ts", "name": "publishes Auto as a virtual picker entry but refuses unresolved adapter dispatch"},
|
|
1004
1005
|
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "shrinks durable history and rebuilds the switched model request without sending the oversized original"}
|
|
@@ -67,7 +67,7 @@ To avoid monopolizing a single top candidate (such as Grok 4.7) across all turns
|
|
|
67
67
|
|
|
68
68
|
These are **capacity preferences**, not measured quality, speed, price, or inference-cost preferences. They cannot promise that Intelligence is smarter or Efficiency faster or cheaper. The actual request-budget and compaction checks still apply after selection; no cost or speed metadata is fabricated.
|
|
69
69
|
|
|
70
|
-
The exact virtual preference stays in the Session's pending selection across turns, while each real request header and transport record the chosen account model.
|
|
70
|
+
The exact virtual preference stays in the Session's pending selection across turns, while each real request header and transport record the chosen account model. Switching to a real model ends automatic routing for subsequent turns. New turns no longer write a separate decision event; compatible historical events without a preference field remain Balance for display.
|
|
71
71
|
|
|
72
72
|
## Images
|
|
73
73
|
|
|
@@ -104,6 +104,10 @@ 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 the plugin-specific Auto footer. 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 attribution only when a supported public informational-event or equivalent storage seam has proven cold-read compatibility.
|
|
108
|
+
|
|
109
|
+
The following presentation remains available for compatible historical decision events; absence of such an event produces no plugin attribution or guessed explanation.
|
|
110
|
+
|
|
107
111
|
Core already places route and usage details at the end of a completed turn. The MVP follows that interaction pattern rather than adding provider/model tags above the answer.
|
|
108
112
|
|
|
109
113
|
For a completed Auto response, the attribution sits on the same footer row as Core's usage and clock, after the end time. It stays hidden until the message is hovered or focused, matching that chrome. It is not a separate line above the answer. The turn-tail display is:
|
|
@@ -121,7 +125,27 @@ The `?` opens a compact explanation using normalized facts such as:
|
|
|
121
125
|
- number of eligible account models;
|
|
122
126
|
- number of models that can fit turn context (when restricted by input headroom).
|
|
123
127
|
|
|
124
|
-
|
|
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.
|
|
129
|
+
|
|
130
|
+
### Recovering affected histories
|
|
131
|
+
|
|
132
|
+
Upgrading prevents new incompatible events but does **not** rewrite existing logs. Repeated restarts cannot repair a stored missing marker.
|
|
133
|
+
|
|
134
|
+
From a source checkout of this version, with Node 24 LTS and the pinned dependencies installed using `pnpm install --frozen-lockfile`, run:
|
|
135
|
+
|
|
136
|
+
```powershell
|
|
137
|
+
# Read-only validation; prints counts, affected sequence numbers and hashes, never conversation content.
|
|
138
|
+
node scripts\repair-auto-model-history.mjs 'C:\absolute\path\session.v4.jsonl.zstd'
|
|
139
|
+
|
|
140
|
+
# Optional: create a NEW private recovery directory outside the live Session directory.
|
|
141
|
+
node scripts\repair-auto-model-history.mjs 'C:\absolute\path\session.v4.jsonl.zstd' --write-copy 'C:\private\new-recovery-directory'
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
This is an explicit offline maintenance utility, not an installed plugin hook. It reads all concatenated zstd frames, uses the exact published official `0.2.0-rc.2` format catalog for strict whole-history validation, and adds only `ignorable: true` to recognized Auto decision envelopes. It preserves type, sequence, time, data and all other rows. Unknown required events, invalid decisions, torn tails, invalid relationships, non-v4 input and compressed/decoded inputs over 128 MiB fail closed. It never repairs or drops other errors.
|
|
145
|
+
|
|
146
|
+
Copy mode creates `original.session.v4.jsonl.zstd` (byte-exact backup), `session.v4.jsonl.zstd` (validated repaired copy), and `repair.json` (SHA-256 receipt). It refuses existing destinations and never writes the source. Keep the directory private: both logs contain conversation history. A check/copy can become stale if an active writer appends later.
|
|
147
|
+
|
|
148
|
+
**Applying a copy requires separate operator approval:** first stop all writers for that Session, verify the fixed plugin will load before resuming, and recheck the live log against `originalSha256`. If it changed, regenerate and validate a fresh copy. Preserve the backup, replace only the exact affected log, verify its hash against `repairedSha256`, then use the normal official history reader to reopen it. Do not replay business requests as a test. If recovery fails, stop writers before restoring the exact original backup. Neither this utility nor the plugin installs itself, replaces a live file, restarts Desktop, clears credentials, or automatically migrates histories.
|
|
125
149
|
|
|
126
150
|
## Subagents and Agent Teams
|
|
127
151
|
|
|
@@ -166,7 +190,7 @@ The implementation is accepted only when unchanged official Core contract tests
|
|
|
166
190
|
6. image admission and real candidate filtering agree, including the no-image-candidate failure.
|
|
167
191
|
7. choosing a smaller-context model can trigger the existing local pressure signal, Core compaction, and same-model retry without sending the oversized request.
|
|
168
192
|
8. hosted search remains independent and never receives the virtual Auto ID as a transport model.
|
|
169
|
-
9.
|
|
193
|
+
9. no new unknown required attribution event is written; compatible historical attribution is retained, while missing decision events produce no guessed footer.
|
|
170
194
|
10. input fit check filters out candidates with insufficient hard input headroom before soft preference.
|
|
171
195
|
11. soft preferences distribute across upper/lower/center candidate bands without monopolizing one top model.
|
|
172
196
|
12. no Core file, dependency artifact, private registry, shared model catalog, or live history is modified.
|
package/lib/index.js
CHANGED
|
@@ -1622,7 +1622,7 @@ let GitHubCopilotUsageController = (() => {
|
|
|
1622
1622
|
//#endregion
|
|
1623
1623
|
//#region package.json
|
|
1624
1624
|
var name$1 = "dsh-github-copilot";
|
|
1625
|
-
var version = "0.4.0-alpha.
|
|
1625
|
+
var version = "0.4.0-alpha.54";
|
|
1626
1626
|
//#endregion
|
|
1627
1627
|
//#region lib/types/probe.js
|
|
1628
1628
|
/**
|
|
@@ -6404,9 +6404,6 @@ function actualNotice(agent, model) {
|
|
|
6404
6404
|
}
|
|
6405
6405
|
});
|
|
6406
6406
|
}
|
|
6407
|
-
function appendAutoModelDecision(agent, event) {
|
|
6408
|
-
Reflect.apply(agent.session.append, agent.session, ["github-copilot/auto-model-decision", event]);
|
|
6409
|
-
}
|
|
6410
6407
|
/** Resolve virtual Auto once per Core turn before request/header persistence. */
|
|
6411
6408
|
function installAutoModelRouting(ctx, dependencies) {
|
|
6412
6409
|
const captured = /* @__PURE__ */ new WeakMap();
|
|
@@ -6428,7 +6425,7 @@ function installAutoModelRouting(ctx, dependencies) {
|
|
|
6428
6425
|
}
|
|
6429
6426
|
};
|
|
6430
6427
|
}, { prepend: true });
|
|
6431
|
-
const removePreStep = agent.ctx.on("agent/pre-step", async ({ messages, turn,
|
|
6428
|
+
const removePreStep = agent.ctx.on("agent/pre-step", async ({ messages, turn, signal }, next) => {
|
|
6432
6429
|
const result = await next();
|
|
6433
6430
|
const entered = result.kind === "enter" ? result.messages : messages;
|
|
6434
6431
|
captured.set(agent, {
|
|
@@ -6475,7 +6472,7 @@ function installAutoModelRouting(ctx, dependencies) {
|
|
|
6475
6472
|
captured.delete(agent);
|
|
6476
6473
|
routed.delete(agent);
|
|
6477
6474
|
});
|
|
6478
|
-
const removeRequest = ctx.on("agent/request", async ({ agent, turn,
|
|
6475
|
+
const removeRequest = ctx.on("agent/request", async ({ agent, turn, signal }, next) => {
|
|
6479
6476
|
const resolved = await next();
|
|
6480
6477
|
const pending = pendingAuto(ctx, agent);
|
|
6481
6478
|
const virtualPreference = resolved.provider === "github-copilot-preview" ? autoModelPreference(resolved.model) : void 0;
|
|
@@ -6511,20 +6508,6 @@ function installAutoModelRouting(ctx, dependencies) {
|
|
|
6511
6508
|
model: resolved.model
|
|
6512
6509
|
}]);
|
|
6513
6510
|
}
|
|
6514
|
-
appendAutoModelDecision(agent, {
|
|
6515
|
-
turn,
|
|
6516
|
-
step,
|
|
6517
|
-
provider: GITHUB_COPILOT_PREVIEW_PROVIDER_ID,
|
|
6518
|
-
model: state.decision.model.id,
|
|
6519
|
-
preference: state.decision.preference,
|
|
6520
|
-
taskClass: state.decision.taskClass,
|
|
6521
|
-
reason: state.decision.reason,
|
|
6522
|
-
candidateCount: state.decision.candidateCount,
|
|
6523
|
-
fittingCandidateCount: state.decision.fittingCandidateCount,
|
|
6524
|
-
estimatedInputTokens: state.decision.estimatedInputTokens,
|
|
6525
|
-
selectedInputBudget: state.decision.selectedInputBudget,
|
|
6526
|
-
inputFitDiagnostic: state.decision.inputFitDiagnostic
|
|
6527
|
-
});
|
|
6528
6511
|
state.recorded = true;
|
|
6529
6512
|
}
|
|
6530
6513
|
return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-github-copilot",
|
|
3
3
|
"description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
4
|
-
"version": "0.4.0-alpha.
|
|
4
|
+
"version": "0.4.0-alpha.54",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -149,6 +149,8 @@
|
|
|
149
149
|
"@deepseek-ai/dsh-llm": "0.2.0-rc.2",
|
|
150
150
|
"@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
|
|
151
151
|
"@deepseek-ai/dsh-scope": "0.2.0-rc.2",
|
|
152
|
+
"@deepseek-ai/dsh-session": "0.2.0-rc.2",
|
|
153
|
+
"@deepseek-ai/dsh-session-format-catalog": "0.2.0-rc.2",
|
|
152
154
|
"@deepseek-ai/dsh-settings": "0.2.0-rc.2",
|
|
153
155
|
"@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
|
|
154
156
|
"@deepseek-ai/dsh-tool-web": "0.2.0-rc.2",
|