dsh-github-copilot 0.4.0-alpha.66 → 0.4.0-alpha.69
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 -2
- package/CHANGELOG.md +10 -0
- package/README.md +9 -9
- package/README.zh.md +9 -9
- package/deployment-baseline.json +26 -2
- package/docs/automatic-model-routing.md +15 -7
- package/docs/copilot-compaction.md +1 -1
- package/docs/images/parent-model-follow.png +0 -0
- package/docs/manual-compaction-recovery.md +46 -0
- package/lib/client.js +229 -1
- package/lib/client.js.map +1 -1
- package/lib/copilot-identity-DRZY_d2X.js +15 -0
- package/lib/index.js +72 -122
- package/lib/manual-compaction-recovery.js +159 -0
- package/lib/request-budget-DLY_aRq0.js +87 -0
- package/lib/routed-web.js +2 -1
- package/lib/{search-routing-BhrTbF-V.js → search-routing-jzNYveyK.js} +2 -15
- package/lib/types/auto-model-host.d.ts +1 -0
- package/lib/types/client.d.ts +5 -0
- package/lib/types/config.d.ts +6 -2
- package/lib/types/manual-compaction-recovery.d.ts +50 -0
- package/lib/types/parent-model-follow-card.d.ts +41 -0
- package/lib/types/parent-model-follow.d.ts +2 -1
- package/lib/types/preview-route.d.ts +8 -2
- package/lib/types/web-search-routing-card.d.ts +4 -0
- package/package.json +13 -1
package/AGENTS.md
CHANGED
|
@@ -42,7 +42,7 @@ This repository owns eleven narrow surfaces:
|
|
|
42
42
|
7. A bounded account-discovery route that supplies validated endpoint/capability metadata to the published native adapter, plus exact plugin-owned model exclusions enforced across its directory, Auto pools and direct admission, without maintaining model-ID routing rules or changing Core's catalog.
|
|
43
43
|
8. Optional, provider-scoped Chat presentation for completed empty reasoning disclosures; durable content and encrypted replay metadata remain Core-owned.
|
|
44
44
|
9. Compatibility-only policy restoration and request recovery for existing dedicated planner/executor Sessions. Model roles UI, settings writes and new dedicated roots are retired (#158); never reintroduce them or migrate histories implicitly.
|
|
45
|
-
10. Managed-route estimated input/output admission, optional exact-request pressure signalling through official compaction recovery, and supported low summary effort only when no effort is already resolved. See [compaction budgets](./docs/copilot-compaction.md). Preserve truthful capacities, requested output caps, native errors/replay and transaction ownership; no hidden history trimming, chunking, new retry loop, competing compaction service or automatic model switch.
|
|
45
|
+
10. Managed-route estimated input/output admission, optional exact-request pressure signalling through official compaction recovery, and supported low summary effort only when no effort is already resolved. See [compaction budgets](./docs/copilot-compaction.md). Preserve truthful capacities, requested output caps, native errors/replay and transaction ownership; no hidden history trimming, chunking, new retry loop, competing compaction service or automatic model switch. The separately selected, single-service [manual recovery engine](./docs/manual-compaction-recovery.md) may use bounded, explicit intermediate summaries through the public subclass hook; the preventive default never claims recovery of an already oversized manual summary.
|
|
46
46
|
11. Optional account quota reads and a session-scoped composer usage control through public credentials, strict Remotes and additive slots. Keep account billing-cycle credits separate from context tokens and session cost. Missing, pooled, legacy and stale data must retain their real semantics; never infer credits from token estimates or account deltas. See [quota boundaries](./docs/copilot-usage.md).
|
|
47
47
|
|
|
48
48
|
## Retired model-role compatibility boundary (#158)
|
|
@@ -236,7 +236,7 @@ Never say GPT-6/search works merely because settings, typecheck or a package imp
|
|
|
236
236
|
|
|
237
237
|
## Changing capabilities
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
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.
|
|
240
240
|
|
|
241
241
|
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.
|
|
242
242
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.69 (prepared)
|
|
4
|
+
|
|
5
|
+
- Add an explicit, opt-in manual compaction engine for compressible already-oversized managed Copilot histories. It uses a bounded public summary hook and native transactional replacement without changing the default compaction service. Include account-proof and failure boundaries in the recovery design.
|
|
6
|
+
|
|
7
|
+
## 0.4.0-alpha.68 (prepared)
|
|
8
|
+
|
|
9
|
+
- Add one **Follow parent model** control in plugin settings. Enable once for existing and new supported Copilot subagents and Team mates; no Session IDs or per-child setup (#234).
|
|
10
|
+
- Preserve active turns, child-owned manual selections and independent child Auto decisions. Keep legacy explicit bindings without hidden migration.
|
|
11
|
+
- Record requirements, implementation plan and a synthetic screenshot of the actual settings component; use narrow settings CAS and preserve unsaved search drafts.
|
|
12
|
+
|
|
3
13
|
## 0.4.0-alpha.66 (prepared)
|
|
4
14
|
|
|
5
15
|
- Add explicit native child/direct-parent model-follow bindings, disabled by default. Enrolled children follow fixed selections on their next turn or independently resolve the parent's Auto preference against their own context (#229).
|
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
98
98
|
|
|
99
99
|
## Install and sign in
|
|
100
100
|
|
|
101
|
-
The commands below target the package version `0.4.0-alpha.
|
|
101
|
+
The commands below target the package version `0.4.0-alpha.69`. 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):
|
|
102
102
|
|
|
103
103
|
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):
|
|
104
104
|
|
|
@@ -111,10 +111,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
111
111
|
For a standalone named profile only, the supported CLI command is:
|
|
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.69/dsh-github-copilot-0.4.0-alpha.69.tgz
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
117
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.69` 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.
|
|
118
118
|
|
|
119
119
|
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.
|
|
120
120
|
|
|
@@ -130,7 +130,7 @@ If preferences cannot be read, available account rows remain visible but read-on
|
|
|
130
130
|
|
|
131
131
|
### Auto model routing
|
|
132
132
|
|
|
133
|
-
**
|
|
133
|
+
**One setting for subagents:** in the plugin configuration page, turn on **Subagent models → Follow parent model** and Save. It applies to existing and new supported Copilot subagents and Team mates, without Session IDs or per-child setup. A fixed parent model takes effect on each child's next turn; Auto inherits the same preference but chooses using each child's own context. Running turns stay unchanged and child-owned manual selections still win. Default Off (`github-copilot.followParentModel: false`). Enabling replaces creation-time model choices; it never clears explicit child selection history. Legacy `parentModelFollow` bindings remain active independently and are not migrated. See [requirements, mockup and boundaries](./docs/parent-model-follow.md). Native Team creation labels are not rewritten.
|
|
134
134
|
|
|
135
135
|
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.
|
|
136
136
|
|
|
@@ -165,7 +165,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
165
165
|
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.
|
|
166
166
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
167
167
|
|
|
168
|
-
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.
|
|
168
|
+
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.69`, 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).
|
|
169
169
|
|
|
170
170
|
**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.
|
|
171
171
|
|
|
@@ -322,7 +322,7 @@ For a marked ordinary agent-loop request with a matching initiating Session and
|
|
|
322
322
|
|
|
323
323
|
Calls explicitly marked `purpose: 'compaction'` bypass the early-pressure signal and use the full hard budget. When no caller or adapter-resolved reasoning effort is present, `prefer-low` selects an advertised supported `minimal` or `low` effort; unsupported controls preserve provider defaults. An explicit or materialized effort wins. The requested summary output cap remains unchanged, preserving Core's auxiliary summary record; the plugin does not blindly raise/lower it or accept truncated output as a checkpoint. `enabled` remains a hosted-search switch, not a switch for this managed-route protection.
|
|
324
324
|
|
|
325
|
-
**Existing oversized history is not guaranteed recoverable.**
|
|
325
|
+
**Existing oversized history is not guaranteed recoverable.** The default manual compact still rejects an oversized summary before model transport. A separately selected [manual recovery engine](./docs/manual-compaction-recovery.md) can summarize compressible, balanced managed-Copilot history through bounded intermediate calls while Core retains the only durable transaction. It is opt-in as a **replacement**, not a second compaction service; merely installing the plugin does not activate it. Indivisible input, oversized fixed prefixes and truncated output fail without replacing history. No automatic model switch or hidden history deletion occurs.
|
|
326
326
|
|
|
327
327
|
## Copilot tool compatibility
|
|
328
328
|
|
|
@@ -440,8 +440,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
440
440
|
`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.
|
|
441
441
|
|
|
442
442
|
```sh
|
|
443
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
444
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
443
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.69/dsh-github-copilot-0.4.0-alpha.69.tgz
|
|
444
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.69/SHA256SUMS
|
|
445
445
|
sha256sum --check SHA256SUMS
|
|
446
446
|
```
|
|
447
447
|
|
|
@@ -449,7 +449,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
449
449
|
|
|
450
450
|
```powershell
|
|
451
451
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
452
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
452
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.69.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
453
453
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
454
454
|
```
|
|
455
455
|
|
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.69`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
24
24
|
|
|
25
25
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
26
26
|
|
|
@@ -113,10 +113,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
113
113
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
114
114
|
|
|
115
115
|
```sh
|
|
116
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
116
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.69/dsh-github-copilot-0.4.0-alpha.69.tgz
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
119
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.69`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
120
120
|
|
|
121
121
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
122
122
|
|
|
@@ -132,7 +132,7 @@ Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理
|
|
|
132
132
|
|
|
133
133
|
### Auto 模型路由
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
**子代理只需设置一次:** 在插件配置页打开 **Subagent models → Follow parent model** 并保存,即应用于已有和新创建的受支持 Copilot 子代理及 Team mate,无需填写 Session ID 或逐个登记。父会话为固定模型时,子会话从下一轮跟随;父会话为 Auto 时,继承相同偏好并按各自上下文独立选模。正在执行的轮次不变,子会话自己的手动选择仍优先。默认关闭(`github-copilot.followParentModel: false`)。开启意味着接管创建时保存的模型选择,但不清除子会话的显式选择历史。旧 `parentModelFollow` 绑定独立保留,不自动迁移。参见[需求、mockup 与边界](./docs/parent-model-follow.md)。原生 Team 的创建时模型标签不会被改写。
|
|
136
136
|
|
|
137
137
|
托管 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 仍保持平铺。
|
|
138
138
|
|
|
@@ -167,7 +167,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
167
167
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
168
168
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
169
169
|
|
|
170
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
170
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.69`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
171
171
|
|
|
172
172
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
|
|
173
173
|
|
|
@@ -325,7 +325,7 @@ Responses 解析器会保留公开的 `reasoning_summary_text`、`reasoning_text
|
|
|
325
325
|
|
|
326
326
|
`purpose: 'compaction'` 的摘要调用绕过提前压力阈值,只检查完整硬预算。没有调用方或适配器已解析的思考等级时,`prefer-low` 从已支持的能力中选择 `minimal` 或 `low`;没有此能力则保持供应方默认。显式或已解析的等级优先。摘要请求的输出上限不被偷偷改写,保持 Core 辅助摘要记录一致;也不会将截断输出当成成功 checkpoint。`enabled` 仍仅控制 hosted search。
|
|
327
327
|
|
|
328
|
-
|
|
328
|
+
**仍不保证救回所有已经超限的旧历史。** 默认手动 compact 仍会在模型发送前拒绝超限摘要。另有可单独选择的[手动恢复引擎](./docs/manual-compaction-recovery.md):仅对可分割且工具调用配对完整的托管 Copilot 历史进行有界中间摘要,最终持久事务仍由 Core 负责。它必须**替换**原有压缩服务而非并列安装;仅安装插件不会启用。不可分割的输入、过大的固定前缀或被截断的输出都不会替换历史;不会自动切换模型或偷偷删除历史。
|
|
329
329
|
|
|
330
330
|
## Copilot Tool 兼容
|
|
331
331
|
|
|
@@ -451,8 +451,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
451
451
|
`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 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
452
452
|
|
|
453
453
|
```sh
|
|
454
|
-
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.
|
|
454
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.69/dsh-github-copilot-0.4.0-alpha.69.tgz
|
|
455
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.69/SHA256SUMS
|
|
456
456
|
sha256sum --check SHA256SUMS
|
|
457
457
|
```
|
|
458
458
|
|
|
@@ -460,7 +460,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
460
460
|
|
|
461
461
|
```powershell
|
|
462
462
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
463
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
463
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.69.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
464
464
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
465
465
|
```
|
|
466
466
|
|
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.69"
|
|
12
12
|
},
|
|
13
13
|
"evidence": {
|
|
14
14
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -234,11 +234,15 @@
|
|
|
234
234
|
"@deepseek-ai/dsh-client-ui-renderer",
|
|
235
235
|
"@deepseek-ai/dsh-client-ui-settings-models",
|
|
236
236
|
"@deepseek-ai/dsh-client-ui-slots",
|
|
237
|
+
"@deepseek-ai/dsh-commands",
|
|
238
|
+
"@deepseek-ai/dsh-compaction",
|
|
239
|
+
"@deepseek-ai/dsh-compaction-basic",
|
|
237
240
|
"@deepseek-ai/dsh-credentials",
|
|
238
241
|
"@deepseek-ai/dsh-launch-environment",
|
|
239
242
|
"@deepseek-ai/dsh-llm",
|
|
240
243
|
"@deepseek-ai/dsh-llm-pi-ai",
|
|
241
244
|
"@deepseek-ai/dsh-scope",
|
|
245
|
+
"@deepseek-ai/dsh-session",
|
|
242
246
|
"@deepseek-ai/dsh-settings",
|
|
243
247
|
"@deepseek-ai/dsh-typert-protocol",
|
|
244
248
|
"@deepseek-ai/dsh-web",
|
|
@@ -441,6 +445,23 @@
|
|
|
441
445
|
{"file": "tests/preview-route.spec.ts", "name": "isolates concurrent chat success from a rejected compaction admission"}
|
|
442
446
|
]
|
|
443
447
|
},
|
|
448
|
+
{
|
|
449
|
+
"id": "opt-in-oversized-manual-compaction",
|
|
450
|
+
"required": true,
|
|
451
|
+
"evidenceScope": "synthetic-public-subclass-and-exact-tagged-source-no-live-inference",
|
|
452
|
+
"sourceMarkers": [
|
|
453
|
+
{"file": "src/manual-compaction-recovery.ts", "marker": "extends BasicCompactionEngine"},
|
|
454
|
+
{"file": "src/manual-compaction-recovery.ts", "marker": "COPILOT_MANUAL_RECOVERY_"},
|
|
455
|
+
{"file": "src/preview-route.ts", "marker": "recoveryLimits(modelId)"},
|
|
456
|
+
{"file": "docs/manual-compaction-recovery.md", "marker": "separately selected"}
|
|
457
|
+
],
|
|
458
|
+
"tests": [
|
|
459
|
+
{"file": "tests/manual-compaction-recovery.spec.ts", "name": "reduces an oversized balanced history with bounded complete calls and an unmarked aggregate audit"},
|
|
460
|
+
{"file": "tests/manual-compaction-recovery.spec.ts", "name": "rejects an indivisible span before dispatch and leaves recovery to native failure handling"},
|
|
461
|
+
{"file": "tests/manual-compaction-recovery.spec.ts", "name": "rejects unmatched tool calls before dispatch instead of splitting a call and result"},
|
|
462
|
+
{"file": "tests/fixtures/compaction-pressure-core.fixture.ts", "name": "recovers oversized manual history with one native transaction and honest multi-call audit"}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
444
465
|
{
|
|
445
466
|
"id": "account-driven-provider-metadata",
|
|
446
467
|
"required": true,
|
|
@@ -1000,6 +1021,8 @@
|
|
|
1000
1021
|
{"file": "src/auto-model-host.ts", "marker": "keep attribution out of the log"},
|
|
1001
1022
|
{"file": "src/parent-model-follow.ts", "marker": "resolveParentModel"},
|
|
1002
1023
|
{"file": "src/config.ts", "marker": "parentModelFollow"},
|
|
1024
|
+
{"file": "src/config.ts", "marker": "followParentModel"},
|
|
1025
|
+
{"file": "src/parent-model-follow-card.ts", "marker": "Follow parent model"},
|
|
1003
1026
|
{"file": "src/auto-model-host.ts", "marker": "COPILOT_AUTO_TOKEN_METER_UNAVAILABLE"},
|
|
1004
1027
|
{"file": "src/auto-model-presentation.ts", "marker": "conversation.chat.assistant-actions"},
|
|
1005
1028
|
{"file": "src/auto-model-presentation.ts", "marker": "turnModelProvenanceDefinition"},
|
|
@@ -1009,7 +1032,7 @@
|
|
|
1009
1032
|
{"file": "docs/automatic-model-routing.md", "marker": "plugin-only"}
|
|
1010
1033
|
],
|
|
1011
1034
|
"tests": [
|
|
1012
|
-
{"file": "tests/auto-model-host.spec.ts", "name": "follows fixed and Auto parents
|
|
1035
|
+
{"file": "tests/auto-model-host.spec.ts", "name": "follows fixed and Auto parents using %s without writing child selections"},
|
|
1013
1036
|
{"file": "tests/scripts/parent-model-follow.test.mjs", "name": "explicit same-model and different-model child selections both win"},
|
|
1014
1037
|
{"file": "tests/auto-model-routing.spec.ts", "name": "classifies only the latest user turn and selects a deterministic capacity tier"},
|
|
1015
1038
|
{"file": "tests/auto-model-routing.spec.ts", "name": "does not discard a complete Core assistant message when it contains reasoning"},
|
|
@@ -1086,6 +1109,7 @@
|
|
|
1086
1109
|
"./remote": [],
|
|
1087
1110
|
"./routed-web": ["default"],
|
|
1088
1111
|
"./web-delegate": ["name", "inject", "apply"],
|
|
1112
|
+
"./manual-compaction-recovery": ["CopilotManualRecoveryCompactionEngine", "summarizeOversizedManualInput"],
|
|
1089
1113
|
"./deployment-baseline.json": [],
|
|
1090
1114
|
"./package.json": []
|
|
1091
1115
|
}
|
|
@@ -142,7 +142,7 @@ General native subagent Auto inheritance is **not** in the base MVP.
|
|
|
142
142
|
|
|
143
143
|
In official DSH 0.2.0-rc.2, `TeamRoster.spawn` calls `ctx.subagents.startContinuable` without `request.agentOptions`. Core initializes the child from the parent's latest recorded request route, falling back to the parent's creation options before it has made a request, and records the resulting child options in its descriptor. This is creation-time inheritance, not a live link to the parent's selection. A recorded concrete route alone does not establish whether it came from an inherited selection or an explicit child override, and a resolved route does not prove the parent had no pending Auto intent. The plugin must not relabel a child route as Auto or write fabricated selection history.
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
With `followParentModel` off and no legacy `parentModelFollow` enrollment, the plugin preserves native child routing behavior:
|
|
146
146
|
|
|
147
147
|
- a child with an explicit model override uses that model;
|
|
148
148
|
- a new child or Team mate without an override starts with Core's parent-route snapshot and fallback behavior;
|
|
@@ -164,7 +164,7 @@ The desired behavior is for native subagents and Team mates to follow the master
|
|
|
164
164
|
|
|
165
165
|
This is a requested product direction, not current behavior. A native implementation would carry an explicit inheritance mode and parent/override provenance, then resolve the parent's current effective selection at the start of each new child turn. For Auto, the child must invoke its own per-turn Auto resolution against its own messages and capabilities. Explicit child selection remains authoritative. The resolver must use the live parent's selected/requested model state, not the global default, and must fail visibly when parent evidence is missing rather than guess from a stale concrete child route. The open [Core PR #95](https://github.com/cloga/deepseek-harness/pull/95) proposes creation-time route rules for new children; its design preserves existing children on later messages and does not establish per-turn parent-following or inherited Auto intent.
|
|
166
166
|
|
|
167
|
-
The plugin
|
|
167
|
+
The plugin uses public request-selection middleware for supported native `spawn` children. The profile-wide switch explicitly authorizes overriding creation-time snapshots without inferring their original intent; legacy per-child bindings remain compatible. This is opt-in policy, not a change to native defaults. Actual request routes remain authoritative; native Team labels are not rewritten.
|
|
168
168
|
|
|
169
169
|
### October 2 investigation: routing is possible; automatic enrollment is ambiguous
|
|
170
170
|
|
|
@@ -204,9 +204,16 @@ parent/child model IDs, inspecting only `Agent.options`, or treating a missing
|
|
|
204
204
|
child picker event as inheritance cannot implement the stated precedence for
|
|
205
205
|
every existing child. Request middleware does not recover the lost information.
|
|
206
206
|
|
|
207
|
-
###
|
|
207
|
+
### One-switch policy and legacy per-child bindings
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
The ordinary UI is now one profile-wide **Follow parent model** switch in the
|
|
210
|
+
plugin configuration page. See [requirements, design and mockup](parent-model-follow.md).
|
|
211
|
+
It defaults to Off and does not ask users to manage child IDs. Explicitly
|
|
212
|
+
enabling this broad policy authorizes replacing creation-time snapshots;
|
|
213
|
+
child-owned manual selection events still win. The per-child binding mechanism
|
|
214
|
+
below remains for alpha.66 compatibility, not as the ordinary user workflow.
|
|
215
|
+
|
|
216
|
+
**Legacy opt-in bindings; preserved independently of the broad switch.**
|
|
210
217
|
Do not silently enroll all existing children or treat a new setting as proof of
|
|
211
218
|
their original creation intent. `github-copilot.parentModelFollow` defaults to
|
|
212
219
|
an empty array. The standard plugin configuration accepts explicit bindings:
|
|
@@ -243,9 +250,10 @@ strict history reading/refolding, unavailable parents, normal model exclusions,
|
|
|
243
250
|
live binding changes and disposal. The native AgentLoop fixture reconstructs a
|
|
244
251
|
child from its own strict-reader-validated history and verifies the next turn;
|
|
245
252
|
it does not exercise disk-backed resume or the native Team orchestrator.
|
|
246
|
-
The
|
|
247
|
-
|
|
248
|
-
|
|
253
|
+
The native creation path cannot recover original equal-route override intent.
|
|
254
|
+
Legacy bindings authorize individual children; the new switch authorizes this
|
|
255
|
+
tradeoff once for the profile. Neither mechanism fabricates provenance or clears
|
|
256
|
+
child-owned selection events.
|
|
249
257
|
|
|
250
258
|
Local full validation is blocked: `pnpm exec vitest --version` triggered pnpm's
|
|
251
259
|
dependency reconciliation, which failed with HTTP 404 for
|
|
@@ -69,7 +69,7 @@ On official `0.2.0-rc.2`, the stock summarizer uses an explicitly configured sum
|
|
|
69
69
|
|
|
70
70
|
Official configuration already supports a separate summary route and output cap. Selecting a suitable authorized route/cap is an explicit deployment choice, not an automatic fallback. Increasing the output cap consumes combined-context headroom; decreasing it can reproduce the observed incomplete-checkpoint failure.
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
An explicit, separately selected recovery engine for compressible already-oversized **manual** summaries is specified in [manual compaction recovery](./manual-compaction-recovery.md). The default Basic engine and the preventive request guard remain unchanged. No hidden wire interceptor or automatic summary retry is used; the native summary event is unmarked when several real calls contributed to one checkpoint.
|
|
73
73
|
|
|
74
74
|
## Official-first evidence and retirement
|
|
75
75
|
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Oversized manual compaction recovery
|
|
2
|
+
|
|
3
|
+
Tracking: [#228](https://github.com/cloga/dsh-github-copilot/issues/228). Target: unchanged official DSH `0.2.0-rc.2` (`639ed015397290b3745d163aafe02ffee4aa3f84`). This document specifies a **separately selected** Host compaction engine; installing this plugin by itself does not replace a running Core engine.
|
|
4
|
+
|
|
5
|
+
## Requirements and failure boundary
|
|
6
|
+
|
|
7
|
+
An already oversized, compressible manual summary must be able to make progress without submitting the same over-budget prompt again. The motivating detached session had a roughly 508k estimated summary input versus a roughly 368k hard input budget with 65,536 reserved output tokens. The independent model prompt ceiling, not the output reservation alone, binds. The native one-shot summarizer sends the entire selected balanced span plus a directive, and the managed-route guard correctly refuses that input. The prior Auto meter repair prevents incorrect candidate selection; it does not shorten this summary.
|
|
8
|
+
|
|
9
|
+
Recovery must leave the original Session surface intact until a smaller *complete* checkpoint has been accepted by Core's native transaction. It must retain the system head, tool declarations and chronological content, never split a tool-call/result pair, honor cancellation and source changes, bound all provider calls, and preserve the actual summary route and output cap. If a fixed head or one indivisible unit cannot fit, an intermediate summary is truncated/empty, account proof expires, the history changes, or the call limit is exhausted, fail with a named diagnostic and no replacement. No live inference, credential changes, automatic model switch, history deletion or summary-success claim follows from a local test.
|
|
10
|
+
|
|
11
|
+
## Composition and algorithm
|
|
12
|
+
|
|
13
|
+
`CopilotManualRecoveryCompactionEngine` is an opt-in alternative to **one** official `BasicCompactionEngine` registration. Operators selecting it must replace (not mount alongside) their existing basic compaction service in the same Host scope; the default plugin registration never changes the service. It subclasses the published engine and calls `super.compactNow`: Core still owns idle maintenance, a single bracketed durable transaction, balanced range selection, checkpoint framing, source-stability/shrink checks, cancellation, failure classification, flush, and optional native pruning. The subclass hook runs recovery **only** inside an explicit manual call with an authenticated, current managed Copilot summary model. Automatic compaction and all other providers delegate to the stock hook unchanged. A pending model picker is not summary-route evidence: an explicit native summary target wins, then the latest committed header, then Agent options.
|
|
14
|
+
|
|
15
|
+
The plugin's account service supplies a current descriptor and a revocable proof without starting discovery or reading credentials into the Client. The summary budget uses `min(maxInputTokens, contextWindow - configuredOutputCap) - safetyTokens`; an additional 4096-token allowance covers Core's appended directive and estimation variance. Each candidate request is conservatively bounded by serialized UTF-8 size including system, tools, prior intermediate checkpoint and current messages. Native managed-route admission remains the final authority. A call that still exceeds that guard fails; it is never retried with a hidden wire rewrite.
|
|
16
|
+
|
|
17
|
+
The hook partitions the *original* span only at balanced boundaries, summarizes each part through `super.summarize`, and supplies the previous completed intermediate checkpoint as context for the next call. Thus the last completed summary contains all processed parts in chronological order. Default maximum: 16 calls (hard maximum 32); each carries the native cancellation signal and checks account proof before and after dispatch. The original surface is not modified between calls. Core checks for a smaller replacement and current source after the final result; any failure closes the native marker without a replacement. No background job starts this process.
|
|
18
|
+
|
|
19
|
+
**Audit:** each physical call goes through Core's public `llm.stream` seam with its actual route/cap. The final native summary event is intentionally *unmarked* (`llmStreamCall` absent), not a fabricated claim of one call. It records summed provider-reported usage only when **every** underlying call supplied usage; optional counters are included only if present on every call. The native event format has no per-call array or durable per-call transcript in a single summary event; do not infer individual request accounting from that aggregate. This is a real observability limit of the unchanged public contract.
|
|
20
|
+
|
|
21
|
+
This aggregate is not per-call attribution: it cannot reconstruct which intermediate request used which tokens, identify each physical response, or prove that native call-attribution consumers count every intermediate request. The plugin does not manufacture `llmStreamCall`, response IDs, or individual durable usage records to fill that gap. Reported aggregate provider usage and Core's native call-attribution/accounting are separate evidence layers.
|
|
22
|
+
|
|
23
|
+
## Native admission and historical usage evidence
|
|
24
|
+
|
|
25
|
+
The exact rc.2 `llm-pi-ai` public adapter converts both plain and replay-backed historical assistant messages with `emptyPiUsage()` and `timestamp: 0` (`replay.ts`); converted user messages, including new intermediate checkpoints, also have timestamp zero (`context.ts`). Therefore creating a checkpoint **does not** invalidate an old SDK usage anchor through a newer timestamp. On this pin, Core does not carry the historical assistant usage into the SDK context in the first place. Recovery neither clears that usage itself nor changes message timestamps, replay state, native conversion, the SDK estimator or the final managed guard. This behavior must be requalified when the Core/pi-ai pin changes.
|
|
26
|
+
|
|
27
|
+
The unchanged-Core fixture exercises the real managed adapter and its `inspectRequest` guard with a synthetic 27-turn history whose latest provider-reported input is 508,198 tokens. It first proves stock manual compaction fails the 12,000-token input bound without reaching the synthetic wire, then proves the opt-in engine commits one replacement through bounded calls. The captured SDK estimates include the complete native compaction directive, system policy and tool schemas, not a prompt with its final directive removed. Every dispatched estimate fits the hard limit; the 8,192 output cap is preserved, source events remain byte-identical, and every intermediate wire call observes the original surface generation. Estimator instrumentation calls the original SDK utility without altering its result. The fixture verifies zero carried usage anchors, aggregate usage and the deliberately absent single-call marker. Synthetic scaled-down input limits and transport establish native admission/transaction behavior, not provider-exact capacity or live Copilot success.
|
|
28
|
+
|
|
29
|
+
## Limitations and operational use
|
|
30
|
+
|
|
31
|
+
This path only helps histories with balanced boundaries and intermediate summaries that fit their model's input and output limits. One giant user/tool result, a huge fixed head/tool schema, an incomplete tool pair, provider truncation, or a final checkpoint that is not smaller remain explicit failures. Intermediate model summaries are lossy in the same sense as ordinary Core compaction; review important context before explicitly invoking manual compaction. The conservative UTF-8 bound may reject a request that a provider could accept. The algorithm does not claim provider-exact token measurement or repair of a damaged/unmatched pre-existing compaction bracket.
|
|
32
|
+
|
|
33
|
+
Select the exported `dsh-github-copilot/manual-compaction-recovery` Host class **instead of** the stock basic compaction plugin in a reviewed Host composition. For a composition that normally contains `- name: '@deepseek-ai/dsh-compaction-basic'`, remove that single row and use this row in the same scope:
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
- name: 'dsh-github-copilot/manual-compaction-recovery'
|
|
37
|
+
config:
|
|
38
|
+
auto: true
|
|
39
|
+
maxTokens: 65536 # example only: preserve the reviewed original cap
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Keep the existing BasicCompactionConfig, including any modelPolicies and actual maxTokens; configure a summary route deliberately if the last committed model cannot serve the summary. Do not enable two compaction services or modify a live profile without explicit approval. The normal plugin and all ordinary sessions remain usable without this replacement; the package export alone neither installs it nor changes an existing Session.
|
|
43
|
+
|
|
44
|
+
## Acceptance and retirement
|
|
45
|
+
|
|
46
|
+
Focused tests must exercise oversized balanced histories, native durable replacement and no replacement on cancellation, truncation, stale source or proof, irreducible units and bounded-call exhaustion. Verify the exact published Core source fixture, frozen install, full plugin gate and immutable package smoke before describing a deployable release. CI with synthetic transport proves no live Copilot availability. Retire this companion path only when official compaction safely handles independent prompt ceilings and multi-call/manual recovery with equivalent durable audit, lifecycle and transaction guarantees.
|