dsh-github-copilot 0.4.2-alpha.17 → 0.4.2-alpha.19.dsh.0.2.0.rc.2

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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.2-alpha.19.dsh.0.2.0.rc.2 (prepared)
4
+
5
+ - Restore the explicit visible-history recovery entry when opening an original
6
+ scheduled Session after its managed replay-scope failure, including cold
7
+ Host startup, expired temporary fingerprints and a changed picker (#433).
8
+ - Refold only fixed terminal failure evidence through official rc.2's public
9
+ Session projection; ignore inherited failures and clear on a later turn.
10
+ Preserve explicit loss disclosure and persistent policy CAS, independent of
11
+ temporary diagnostic reads. Never reconstruct account origin or request
12
+ fingerprints, rewrite history, automatically enable loss or rerun a task.
13
+ - Keep the exact official DSH `0.2.0-rc.2` dependency graph and pi-ai `0.87.1`.
14
+ Publication does not install the plugin or restart a local Desktop.
15
+
16
+ ## 0.4.2-alpha.18.dsh.0.2.0.rc.2 (prepared)
17
+
18
+ - Stop rejecting a valid native-projected image format solely because it is absent
19
+ from the supplier-advertised list. Log one fixed Host diagnostic per projected
20
+ request and let native transport/server adjudication proceed; retain invalid
21
+ MIME, non-vision, account, cancellation and capacity guards.
22
+ - No format-support claim, format-aware Auto, conversion, extra retry/switch or
23
+ history/Usage mutation. This is a prepared legacy rc.2 maintenance increment
24
+ with an exact-Core suffix, not a change to newer Core-specific release sequences.
25
+ - This entry does not imply local profile installation or loaded-runtime activation.
26
+
3
27
  ## 0.4.2-alpha.17 (prepared)
4
28
 
5
29
  - Backport #426's bounded projected-image admission diagnostics to official DSH
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  GitHub Copilot account discovery, contextual Auto routing and hosted search for DSH. The plugin reuses DSH's published native adapter, retaining a profile-wide account default with independent Session next-turn choices; it does not patch Core or maintain a second model catalog.
10
10
 
11
- **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared maintenance prerelease: `0.4.2-alpha.17`.** This rc.2 diagnostic backport is not yet published; its versioned Release commands below apply only after publication. `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
11
+ **Stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); prepared maintenance prerelease: `0.4.2-alpha.19.dsh.0.2.0.rc.2`.** This rc.2 cold-open replay-recovery fix is not yet published; its versioned Release commands below apply only after publication. This legacy maintenance increment preserves increasing SemVer and identifies its exact Core; it does not change newer Core-specific release sequences. `0.4.2-alpha.1` was not published: its release preflight failed, and its immutable tag will not be reused. Supported host: official DSH / Windows Desktop `0.2.0-rc.2`. The stable version is also published on npm's `latest` dist-tag; prereleases remain on their channel tags. Stability-channel promotion does not expand the qualified host baseline or prove live account, model, search or Desktop health. Earlier DSH pins are historical evidence, not supported installation targets. Published, installed in a profile and loaded by a running Host are separate states.
12
12
 
13
13
  **Native refresh protection:** 0.4.1 introduced preservation of already-dispatched HTTP streams across proven plugin-owned refresh with unchanged account, endpoint and entitlements. Versions through 0.4.2-alpha.13 still missed this proof across real Cordis traced service faces; 0.4.2-alpha.14 fixes that identity mismatch. Subsequent requests use freshly validated auth and metadata. Unknown/external credential notifications, revocation, cancellation and provider rejections remain explicit—not a promise of invisible recovery or automatic retry. See [the refresh boundary](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385).
14
14
 
@@ -131,10 +131,10 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
131
131
  For a **standalone named profile**:
132
132
 
133
133
  ```sh
134
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.17/dsh-github-copilot-0.4.2-alpha.17.tgz
134
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.19.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.19.dsh.0.2.0.rc.2.tgz
135
135
  ```
136
136
 
137
- For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.17` after publication; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
137
+ For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.19.dsh.0.2.0.rc.2` after publication; stable versions publish on npm's `latest` dist-tag and prereleases on their channel tags. The official rc.2 **Desktop-bundled CLI** also supports reserved-profile plugin management; a global/generic `dsh` shim is not equivalent. Qualify the installed entry before use. See [Desktop CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) and the distinct [standalone offline procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles). Neither path authorizes registry-policy bypass, peer patches or configuration deletion.
138
138
 
139
139
  After an approved reload/restart:
140
140
 
@@ -239,7 +239,7 @@ The same failure can include request-scoped native local body-write/header miles
239
239
 
240
240
  HTTP/SSE liveness separates five-minute byte idle from bounded ten-minute assistant-output silence by default. Consumer work is excluded; WebSocket/explicit `auto` stays native-only. This does not cure supplier HTTP 408s. Images are admitted against actual native-projected MIME evidence; the plugin does not own conversion or infer format support from filenames. [Image compatibility](./docs/image-input-compatibility.md).
241
241
 
242
- Image admission errors explain historical-image failures even on text-only continuations. The native error includes bounded selected-model, projected/allowed MIME, projected role/position and current plugin-build details, without image content, URLs or paths. Auto checks general vision capability, not candidate-specific projected formats; the final gate remains fail-closed. Explicitly choose a compatible model for a subsequent turn or start a separate text-only Session; nothing is automatically switched, removed or retried. These diagnostics cannot reconstruct an earlier incident.
242
+ Image admission still rejects non-vision models and missing/invalid projected image MIME. A valid image MIME outside the supplier's advertised list no longer blocks the request: declarations alone do not prove endpoint rejection. The Host logs only `COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED`, at most once per projected request, then delegates to the native request and server without adding retries, conversion or model switching. Auto still checks general vision capability, not candidate-specific formats. This mitigation does not establish WebP support for any model; native failures and all account, cancellation and capacity guards remain unchanged.
243
243
 
244
244
  Native rc.2 Auto authorization review requests `temperature: 0`. The plugin now automatically omits it **only for the authenticated official Auto reviewer root on account-discovered managed OpenAI Responses**; no switch is needed. Concurrent ordinary Chat, even on the same Session/model, retains its temperature. Public Loader callback identity and same-profile package ownership authenticate the caller; unknown identity, aliases, descendants, other protocols/providers and canonical Core-owned Copilot remain native, with bounded diagnostics for unqualified reviewer scope. No capability is inferred from `supports.thinking`. Frozen inputs, native account/cancellation guards, strict verdicts and fail-closed tool denial remain intact; no retries, permission changes or settings migration occur. The independent legacy `github-copilot.responsesOmitTemperature` override remains default `false`; explicit `true` still omits temperature from **all** managed Responses requests, not just review. See [public scope and qualification limits](./docs/auto-review-sampling.md).
245
245
 
@@ -286,6 +286,8 @@ The Credits account panel shows the current account and **Switch account**. Its
286
286
 
287
287
  The name “New Session” describes default inheritance, not a one-message feature: an enabled Session policy is frozen at admission for each subsequent managed Copilot turn and also governs that Session's managed native compaction summaries. For an existing eligible Session, select the managed Copilot model, open the composer **Credits/usage** pill, expand **Visible-history continuation**, then choose **On** in **Session policy**. This control appears only for an open Session using the managed account-discovered route; it is not shown for the canonical/native route. The loss disclosure is shown before the choice. Enabling is explicit consent to omit prior encrypted reasoning and embedded summaries, even on the same account; hidden details may be lost, while visible messages, tool relations and source history remain. The policy persists across account switches and restarts until changed. It takes effect on the next turn; an already admitted turn keeps its captured policy. With continuation off, switching to a different account offers persistent enable, keep off or cancel—there is no next-turn-only choice. `/copilot-compact visible-history` is a separate one-time operation through the selected recovery engine, not the persistent Session setting. Neither path auto-sends/retries or cures quota/context limits; exact replay failures use the same persistent Session policy and require a separate native retry. The pinned Core lacks a public Models deep link, so Chat omits the nonfunctional management entry.
288
288
 
289
+ If a scheduled/background task ends with the exact managed replay-scope error, open its **original Session**: Replay recovery remains available after Host restart, temporary fingerprint expiry or a changed picker. A strict public Session projection retains only fixed failure classification and bounded turn/sequence/route evidence, not account origin or old request authorization. Copied/forked failures are ignored; a later native turn clears the historical notice. Explicit enable still discloses hidden-reasoning loss and saves only the existing persistent Session policy. It does not rerun the task: check partial results and side effects before choosing a separate retry to avoid duplicate actions.
290
+
289
291
  Context evidence and Replay recovery use compact, centered notices bounded by the native composer width. Model/item counts and status refresh live in collapsed technical details; loss consent remains explicit. Context sampling warns only for a concrete incident, can be dismissed for that Session/incident, and never asserts the native meter's current value; native statistics stay unchanged. Switching accounts does not make old encrypted reasoning portable. The concise scope error points to explicit recovery or a new conversation; bounded, sanitized dispatch counts stay in Host diagnostics, not the main error. **Authorized** means permission is ready, not that a message was sent or recovery succeeded.
290
292
 
291
293
  ## Ownership and further reading
@@ -326,14 +328,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
326
328
  GitHub Releases and npm distribute the same original verified tarball. Pin a version; verify Release SHA-256 or npm `dist.integrity`. Never repack an immutable release or move/reuse its tag.
327
329
 
328
330
  ```sh
329
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.17/dsh-github-copilot-0.4.2-alpha.17.tgz
330
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.17/SHA256SUMS
331
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.19.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.19.dsh.0.2.0.rc.2.tgz
332
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.19.dsh.0.2.0.rc.2/SHA256SUMS
331
333
  sha256sum --check SHA256SUMS
332
334
  ```
333
335
 
334
336
  ```powershell
335
337
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
336
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.17.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
338
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.19.dsh.0.2.0.rc.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
337
339
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
338
340
  ```
339
341
 
package/README.zh.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  为 DSH 提供 GitHub Copilot 账号模型发现、上下文 Auto 选模和 hosted search。插件复用 DSH 公开的原生适配器,保留 profile 全局默认账号,并支持 Session 后续 turn 指定独立账号;不修改 Core,也不维护第二套模型目录。
10
10
 
11
- **稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布维护预览版:`0.4.2-alpha.17`。** 此 rc.2 诊断回移尚未发布,下方版本化 Release 命令仅在发布后适用。`0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
11
+ **稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布维护预览版:`0.4.2-alpha.19.dsh.0.2.0.rc.2`。** 此 rc.2 冷开回放恢复修复尚未发布,下方版本化 Release 命令仅在发布后适用。这是旧维护线的递增版本,以后缀标明精确 Core,不改变较新 Core 的独立版本序列。`0.4.2-alpha.1` 的发布预检失败,因此未发布;其不可变 tag 不会复用。支持宿主:官方 DSH / Windows Desktop `0.2.0-rc.2`。稳定版也发布到 npm 的 `latest` dist-tag;预发布版本仍使用各自渠道 tag。稳定渠道不扩大已验证的宿主基线,也不证明实时账号、模型、搜索或 Desktop 健康状态。较早 DSH pin 仅是历史证据,不是当前安装目标。已发布、已安装到 profile、已被运行中的 Host 加载,是三个不同状态。
12
12
 
13
13
  **原生刷新保护:**0.4.1 引入了窄范围保护:仅在插件拥有的原生刷新被精确验证,且账号、端点与权限连续时,保留已发出的 HTTP 流。但截至 0.4.2-alpha.13,真实 Cordis 服务代理身份不一致仍会导致保护证据匹配失败;0.4.2-alpha.14 修复此问题。后续请求重新验证认证与模型元数据。未知/外部凭据通知、撤销、取消与供应商拒绝仍明确报错,不承诺所有刷新无感,也不自动重试。参见[刷新边界](./docs/copilot-accounts.md#native-oauth-refresh-and-dispatched-requests-385)。
14
14
 
@@ -113,10 +113,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
113
113
  **独立具名 profile**:
114
114
 
115
115
  ```sh
116
- dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.17/dsh-github-copilot-0.4.2-alpha.17.tgz
116
+ dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.19.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.19.dsh.0.2.0.rc.2.tgz
117
117
  ```
118
118
 
119
- **Desktop** 原生包管理器接受精确 npm spec,例如发布后的 `dsh-github-copilot@0.4.2-alpha.17`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
119
+ **Desktop** 原生包管理器接受精确 npm spec,例如发布后的 `dsh-github-copilot@0.4.2-alpha.19.dsh.0.2.0.rc.2`;稳定版发布到 npm `latest` dist-tag,预发布版使用对应渠道 tag。官方 rc.2 **Desktop 随附的专属 CLI**也支持管理保留 profile;全局/普通 `dsh` shim 不等价。使用前核验实际安装入口,参见[Desktop CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)及独立的[具名 profile 离线流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)。两种路径都不授权绕过包源政策、修改 peer 或删除配置。
120
120
 
121
121
  经批准 reload/restart 后:
122
122
 
@@ -218,7 +218,7 @@ Copilot 搜索要求当前账号/协议证据及能力 proof。固定/fallba
218
218
 
219
219
  HTTP/SSE liveness 默认区分 5 分钟字节 idle 和有界的 10 分钟助手输出静默,排除消费者工作;WebSocket/显式 `auto`仍仅使用原生路径。这不修复供应方 HTTP 408。图片按原生实际投影 MIME 证据准入;插件不负责转换,也不按文件名猜格式支持。[图片兼容](./docs/image-input-compatibility.md)。
220
220
 
221
- 图片准入错误会解释为何纯文本续聊也可能被历史图片阻断。原生错误包含有界的所选模型、投影/允许 MIME、投影角色/位置及当前插件构建版本,不含图片内容、URL 或路径。Auto 只检查通用图片能力,不能预先保证候选模型接受最终投影格式;最终门禁仍保守拒绝不兼容请求。可为后续轮次明确选择兼容模型,或另开不含旧图的纯文本 Session;不会自动换模型、移除图片或重试。这些诊断不能追溯补齐旧故障的证据。
221
+ 图片准入仍拒绝非视觉模型以及缺失/无效的投影图片 MIME。有效图片 MIME 不在供应商声明列表中时不再阻断请求:声明本身不能证明端点会拒绝。Host 每个投影请求最多记录一次固定码 `COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED`,随后交给原生请求和服务端裁决,不新增重试、转换或换模型。Auto 仍只检查通用视觉能力,不保证候选模型接受具体格式。此缓解不证明任何模型支持 WebP;原生错误及账户、取消、容量门禁保持不变。
222
222
 
223
223
  原生 rc.2 Auto 授权审查以 `temperature: 0` 请求模型。插件现在**仅对身份已验证的官方 Auto reviewer 根上下文、账号发现的托管 OpenAI Responses 请求自动省略此参数**,无需开启开关。同一 Session/模型的并发普通 Chat 仍保留 temperature。身份由公开 Loader 回调与同 profile 包归属共同验证;未知身份、别名、子上下文、其它协议/供应方以及 Core 所有的 canonical Copilot 保持原生行为,未验证的 reviewer 范围只报告有界诊断。不会从 `supports.thinking` 推断兼容性。冻结输入、账号/取消约束、严格 verdict 和失败关闭的工具拒绝保持不变;没有重试、权限变更或设置迁移。独立的旧兼容覆盖项 `github-copilot.responsesOmitTemperature` 仍默认 `false`;显式 `true` 才影响**所有**托管 Responses 请求,不限于 review。参见[公开范围与验证限制](./docs/auto-review-sampling.md)。
224
224
 
@@ -265,6 +265,8 @@ Credits 账号面板显示当前账号和 **切换**,下拉菜单只列已有
265
265
 
266
266
  “New Session”说的是默认继承对象,并非只处理第一条消息:启用的 Session policy 会在每个后续托管 Copilot turn 准入时冻结,并同样控制该 Session 的托管原生压缩摘要。为已有且符合条件的 Session 开启时,选择托管 Copilot 模型,点击输入框的 **Credits/usage** 控件,展开 **Visible-history continuation**,再于 **Session policy** 选择 **On**。此控件只出现在仍打开且使用托管账号发现路由的 Session;canonical/native 路由不显示。选择前可见有损说明。开启即明确同意省略旧加密推理及内嵌摘要,同账号也适用;隐藏细节可能丢失,可见消息、工具关系和原历史保留。该策略跨账号切换与重启持久保留,直到更改;从下一 turn 生效,已准入 turn 保持原先冻结的策略。关闭时切换到不同账号会提供持续开启、保持关闭或取消,没有仅下一轮模式。`/copilot-compact visible-history` 是通过已选恢复引擎执行的另一种一次性操作,不等同于持久 Session 设置。两者都不会自动发送/重试,也不解决额度或上下文超限;精确回放失败仍使用同一个持久策略,用户另行点击原生重试。当前 Core 没有公开 Models 直达 API,Chat 不展示不可用的管理入口。
267
267
 
268
+ 定时/后台任务以精确的托管 replay-scope 错误结束后,请打开**原 Session**:即使 Host 已重启、临时请求指纹过期或 picker 改变,仍可看到回放恢复入口。严格公开 Session projection 只保留固定失败分类及有界 turn/序号/路由证据,不恢复账号来源或旧请求授权。忽略复制/fork 的失败,下一原生 turn 开始时清除历史提示。显式开启仍先说明隐藏推理损失,只保存既有持久 Session 策略,不重新执行任务;另行重试前请核对部分结果和副作用,避免重复执行。
269
+
268
270
  上下文证据与回放恢复以紧凑、居中提示显示在输入框上方,宽度遵循原生输入框。模型、项数和状态刷新收进默认折叠的技术详情;有损恢复仍需明确确认。上下文采样只在明确事件时告警,可按 Session/事件关闭,且不会断言原生仪表当前值;原生统计不变。切换账号不会让旧加密推理自动变得可跨账号使用。简短 scope 错误指向显式恢复或新会话;有界、脱敏的请求结构计数留在 Host 诊断中,不挤占主错误。**已授权**只表示授权已准备好,不表示消息已发送或恢复已成功。
269
271
 
270
272
  ## 所有权与深入阅读
@@ -305,14 +307,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
305
307
  GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
306
308
 
307
309
  ```sh
308
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.17/dsh-github-copilot-0.4.2-alpha.17.tgz
309
- curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.17/SHA256SUMS
310
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.19.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.19.dsh.0.2.0.rc.2.tgz
311
+ curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.19.dsh.0.2.0.rc.2/SHA256SUMS
310
312
  sha256sum --check SHA256SUMS
311
313
  ```
312
314
 
313
315
  ```powershell
314
316
  $expected = (Get-Content .\SHA256SUMS).Split()[0]
315
- $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.17.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
317
+ $actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.19.dsh.0.2.0.rc.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
316
318
  if ($actual -cne $expected) { throw 'Release checksum mismatch' }
317
319
  ```
318
320
 
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "package": {
10
10
  "name": "dsh-github-copilot",
11
- "version": "0.4.2-alpha.17"
11
+ "version": "0.4.2-alpha.19.dsh.0.2.0.rc.2"
12
12
  },
13
13
  "evidence": {
14
14
  "kind": "source-and-synthetic-test-inventory",
@@ -655,6 +655,20 @@
655
655
  {"file": "tests/preview-route.spec.ts", "name": "binds explicit summary capacity proof to its Agent rather than the current default"}
656
656
  ]
657
657
  },
658
+ {
659
+ "id": "image-format-declaration-mitigation",
660
+ "required": true,
661
+ "activation": "native-projected-image-inspection",
662
+ "sourceMarkers": [
663
+ {"file": "src/image-input-admission.ts", "marker": "COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED"},
664
+ {"file": "src/image-input-admission.ts", "marker": "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE"},
665
+ {"file": "src/preview-route.ts", "marker": "owner.imageDiagnostic"}
666
+ ],
667
+ "tests": [
668
+ {"file": "tests/preview-route.spec.ts", "name": "delegates projected image formats with independent structural validation: $role / $mode"},
669
+ {"file": "tests/auto-model-routing.spec.ts", "name": "delegates format mismatch after Auto selects for historical %s images"}
670
+ ]
671
+ },
658
672
  {
659
673
  "id": "account-driven-provider-metadata",
660
674
  "required": true,
@@ -887,6 +901,7 @@
887
901
  {"file": "src/replay-recovery.ts", "marker": "class ReplayRecoveryStore"},
888
902
  {"file": "src/replay-recovery-host.ts", "marker": "extends TypertRemoteService"},
889
903
  {"file": "src/replay-recovery-host.ts", "marker": "COPILOT_REPLAY_RECOVERY_TURN_ACTIVE"},
904
+ {"file": "src/replay-recovery-evidence.ts", "marker": "githubCopilotReplayRecoveryEvidence"},
890
905
  {"file": "src/replay-recovery-remote.ts", "marker": "githubCopilotReplayRecovery.setEnabled"},
891
906
  {"file": "src/replay-recovery-remote.ts", "marker": "githubCopilotReplayRecovery.authorize"},
892
907
  {"file": "src/replay-recovery-ui.ts", "marker": "recovery: true"},
@@ -899,6 +914,8 @@
899
914
  {"file": "tests/replay-recovery.spec.ts", "name": "admits only the next matching native turn, including its steps and retries"},
900
915
  {"file": "tests/replay-recovery-ui.spec.ts", "name": "enables only persistent Session continuation after loss disclosure, without legacy authorization or sending"},
901
916
  {"file": "tests/replay-recovery-ui.spec.ts", "name": "is absent normally, reads on settled turns without polling and resets dismissal only for new evidence"},
917
+ {"file": "tests/replay-recovery-ui.spec.ts", "name": "keeps explicit recovery reachable after reopening a failed scheduled Session without Host fingerprints"},
918
+ {"file": "tests/replay-recovery-evidence.spec.ts", "name": "cold-folds the native rc.2 saved failure and removes only its public projection registration"},
902
919
  {"file": "tests/preview-route.spec.ts", "name": "offers exact failed replay only to its initiating session and recovers after explicit confirmation"},
903
920
  {"file": "tests/fixtures/remote-core.fixture.ts", "name": "binds explicit replay recovery through native Client and %s Host gateways"}
904
921
  ]
@@ -1,7 +1,7 @@
1
1
  # Image input compatibility
2
2
 
3
3
  Target: official DSH / Windows Desktop `0.2.0-rc.2`. Plugin-only. This
4
- maintenance-line backport of #426 preserves the rc.2 dependency graph; it
4
+ maintenance-line backport of #426 and #430 format mitigation preserve the rc.2 dependency graph; they
5
5
  does not install or require the separate alpha.5 Core baseline.
6
6
 
7
7
  ## Current behavior
@@ -22,16 +22,22 @@ hook checks the native transcript's **projected MIME** before wire dispatch:
22
22
  |---|---|
23
23
  | `COPILOT_IMAGE_INPUT_UNSUPPORTED` | Current account model does not admit image input |
24
24
  | `COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE` | Actual projected MIME evidence is unavailable |
25
- | `COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED` | Explicit account MIME restrictions reject that projection |
25
+ | `COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED` | Nonblocking Host diagnostic: valid projected MIME is absent from the explicit advertised list |
26
26
 
27
27
  Omitted account MIME lists preserve existing verified vision behavior but do
28
28
  not prove universal format acceptance. The plugin neither invents a list nor
29
- converts images itself. Native error/finish behavior, historical attachments,
29
+ converts images itself. An explicit advertised list, including an empty list,
30
+ is not proof that the endpoint rejects an unlisted valid image format.
31
+ The plugin reports only the fixed `COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED` code
32
+ through the existing Host logger, at most once per projected request, and
33
+ delegates to the native request and server. This is not a Client notice, stored
34
+ diagnostic population or evidence of format support. Native error/finish behavior, historical attachments,
30
35
  turn freezing and existing cancellation/retry policy stay unchanged.
31
36
 
32
37
  ### Admission error details
33
38
 
34
- The standard native `INVALID_REQUEST` failure message retains the diagnostic
39
+ For non-vision input or missing/invalid projected MIME, the standard native
40
+ `INVALID_REQUEST` failure message retains the diagnostic
35
41
  code and now explains why the request was blocked before selected-model wire
36
42
  dispatch. It includes a bounded, content-free JSON diagnostic: selected real
37
43
  model ID (safe identifiers only, otherwise `unavailable`), normalized projected
@@ -41,6 +47,7 @@ zero-based indices, allowlisted projected role, and this plugin build's version.
41
47
  An absent allowed list is `null`, not an empty list or universal format proof.
42
48
  These positions refer to the native projected transcript, not durable history
43
49
  IDs or an attachment identity. Only the first rejected image is reported.
50
+ Advertised-format mismatches do not produce this failure or its metadata.
44
51
 
45
52
  This uses the existing error/finish presentation, not a new Remote, collector,
46
53
  diagnostic store, or history event. Image bytes, URLs, paths, prompt text and
@@ -70,15 +77,26 @@ would be accepted; candidate-specific projection would require another public
70
77
  contract and reviewed tests.
71
78
 
72
79
  Auto currently filters general image capability, not the final candidate-specific
73
- projected MIME. A vision-eligible selection may therefore still fail the final
74
- format gate. This diagnostic improvement does not close that capability gap.
75
- The current public seam used here receives projection only in `inspectRequest`,
76
- after model selection. Do not pre-project candidates through private APIs or
77
- replace this fail-closed gate with inferred durable-format filtering.
78
-
79
- The current fix diagnoses explicit incompatibility, not every provider 400.
80
- When advertised restrictions and outgoing projection agree but the endpoint
81
- rejects it, retain the native error. Do not invent capability corrections,
80
+ projected MIME. The public seam used here receives projection only in
81
+ `inspectRequest`, after model selection. Exact rc.2 `prepareCall()` captures
82
+ model/config metadata and a stream capability, not a projected transcript.
83
+ Native image preparation occurs during stream consumption after auth resolution;
84
+ the public attachment target exposes dimensions and byte budget, not an output
85
+ format selector or a reusable prepared-transcript handoff. Do not duplicate that
86
+ projection or infer outgoing formats from durable MIME.
87
+
88
+ The user-approved #430 mitigation removes only the advertised-format mismatch
89
+ veto; it does not require preselection projection, implement format-aware Auto,
90
+ or prove that Grok or any Copilot endpoint supports WebP. xAI's documentation
91
+ lists JPEG/PNG, but that declaration and a local precheck failure are not a live
92
+ Copilot endpoint rejection. The request now reaches the unchanged native path
93
+ once; existing native retry policy remains its owner, with no plugin-added retry.
94
+ Missing/invalid MIME, non-vision input, account/proof, cancellation and capacity
95
+ checks remain independent. Unlisted formats may still be rejected by the server.
96
+
97
+ The mitigation removes an overly strict local format veto, not every provider 400.
98
+ Whether or not advertised formats and outgoing projection agree, an endpoint
99
+ rejection retains the native error. Do not invent capability corrections,
82
100
  reselect mid-turn, add a fallback wire or replay the request automatically.
83
101
  An explicit smaller [native image budget](./copilot-compaction.md) changes
84
102
  outgoing visibility through Core offload; it is not a supplier JSON threshold.
@@ -87,25 +105,27 @@ outgoing visibility through Core offload; it is not a supplier JSON threshold.
87
105
 
88
106
  `node --test tests/scripts/image-input-admission.test.mjs` exercises the real
89
107
  TypeScript admission helper using Node's built-in runner: historical user/tool
90
- projections, missing/invalid/unsupported formats, absent versus empty restrictions,
108
+ projections, missing/invalid MIME, nonblocking unadvertised formats, absent versus empty lists,
91
109
  bounded redacted diagnostics, no private-content reads and no input mutation.
92
110
  It does not exercise the native adapter or Client.
93
111
  `tests/preview-route.spec.ts` covers the native failure/finish surface and no
94
- selected-model wire on rejection; `tests/auto-model-routing.spec.ts` preserves the
112
+ selected-model wire on structural rejection and single native delegation on format
113
+ mismatch; `tests/auto-model-routing.spec.ts` preserves the
95
114
  explicit separation between Auto vision eligibility and final projected-format
96
115
  admission. These require the unchanged pinned dependencies. Passing the
97
116
  dependency-free helper tests is not a substitute for those integration gates.
98
117
 
99
118
  Historical tool-image continuation first reproduced the old missed-image
100
119
  requirement. Regressions now cover all Auto preferences, historical user/tool
101
- images, no vision candidate and native WebP-to-PNG projection against explicit
102
- PNG/JPEG restrictions. A mismatch emits native `finish(error)` with zero model
103
- requests.
120
+ images, no vision candidate and native PNG-to-WebP projection against explicit
121
+ PNG/JPEG declarations. A mismatch now delegates without a plugin veto; a native server rejection retains
122
+ its native failure. Synthetic regressions cover accepted and unadvertised formats,
123
+ one dispatch, and unchanged historical input, not live endpoint acceptance.
104
124
 
105
125
  The historical [delivery CI](https://github.com/cloga/dsh-github-copilot/actions/runs/36966798814)
106
126
  passed exact unchanged rc.2 Windows/Linux source and published-adapter fixtures,
107
127
  full verification and archive gates for the earlier implementation, not this
108
- diagnostic backport. The alpha.5 fix's CI is not rc.2 qualification either.
128
+ mitigation. The alpha.5 fix's CI is not rc.2 qualification either.
109
129
  Local synthetic transport demonstrates
110
130
  admission/ownership, not live endpoint acceptance or a particular Desktop's
111
131
  loaded version. The original [investigation #236](https://github.com/cloga/dsh-github-copilot/issues/236)
package/lib/client.js CHANGED
@@ -6480,7 +6480,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6480
6480
  ]);
6481
6481
  //#endregion
6482
6482
  //#region lib/types/turn-request-models.js
6483
- const count$2 = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
6483
+ const count$3 = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
6484
6484
  const RequestedModelsSchema = object({
6485
6485
  routes: array(object({
6486
6486
  provider: string().trim().min(1).max(1024),
@@ -6488,11 +6488,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6488
6488
  }).strict()).max(32),
6489
6489
  incomplete: boolean()
6490
6490
  }).strict();
6491
- const row$1 = RequestedModelsSchema.extend({ turn: count$2 }).strict();
6491
+ const row$1 = RequestedModelsSchema.extend({ turn: count$3 }).strict();
6492
6492
  object({
6493
6493
  active: object({
6494
- turn: count$2,
6495
- step: count$2.nullable()
6494
+ turn: count$3,
6495
+ step: count$3.nullable()
6496
6496
  }).strict().nullable(),
6497
6497
  turns: array(row$1).max(128)
6498
6498
  }).strict();
@@ -7554,7 +7554,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7554
7554
  };
7555
7555
  //#endregion
7556
7556
  //#region package.json
7557
- var version = "0.4.2-alpha.17";
7557
+ var version = "0.4.2-alpha.19.dsh.0.2.0.rc.2";
7558
7558
  //#endregion
7559
7559
  //#region lib/types/diagnostics-client.js
7560
7560
  let owner;
@@ -8706,14 +8706,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8706
8706
  function record$5(value) {
8707
8707
  return typeof value === "object" && value !== null && !Array.isArray(value);
8708
8708
  }
8709
- function count$1(value) {
8709
+ function count$2(value) {
8710
8710
  return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
8711
8711
  }
8712
8712
  function isTurnUsageEvidence(value) {
8713
- return record$5(value) && typeof value.ended === "boolean" && typeof value.hasStart === "boolean" && count$1(value.localPreDispatchBlocks) && count$1(value.unreportedAttempts) && (value.requestBodyTimeouts === void 0 || count$1(value.requestBodyTimeouts) && value.requestBodyTimeouts <= value.unreportedAttempts) && (value.timeoutDetails === void 0 || Array.isArray(value.timeoutDetails) && value.timeoutDetails.length <= 8 && count$1(value.requestBodyTimeouts) && value.timeoutDetails.length <= value.requestBodyTimeouts && value.timeoutDetails.every((detail) => record$5(detail) && typeof detail.recovered === "boolean" && (detail.step === void 0 || count$1(detail.step)) && (detail.seq === void 0 || count$1(detail.seq)) && (!detail.recovered || count$1(detail.step) && count$1(detail.seq))));
8713
+ return record$5(value) && typeof value.ended === "boolean" && typeof value.hasStart === "boolean" && count$2(value.localPreDispatchBlocks) && count$2(value.unreportedAttempts) && (value.requestBodyTimeouts === void 0 || count$2(value.requestBodyTimeouts) && value.requestBodyTimeouts <= value.unreportedAttempts) && (value.timeoutDetails === void 0 || Array.isArray(value.timeoutDetails) && value.timeoutDetails.length <= 8 && count$2(value.requestBodyTimeouts) && value.timeoutDetails.length <= value.requestBodyTimeouts && value.timeoutDetails.every((detail) => record$5(detail) && typeof detail.recovered === "boolean" && (detail.step === void 0 || count$2(detail.step)) && (detail.seq === void 0 || count$2(detail.seq)) && (!detail.recovered || count$2(detail.step) && count$2(detail.seq))));
8714
8714
  }
8715
8715
  function coordinates(event) {
8716
- if (!record$5(event) || typeof event.type !== "string" || !record$5(event.data) || !count$1(event.data.turn) || ![
8716
+ if (!record$5(event) || typeof event.type !== "string" || !record$5(event.data) || !count$2(event.data.turn) || ![
8717
8717
  "turn/start",
8718
8718
  "turn/end",
8719
8719
  "step/start",
@@ -8728,7 +8728,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8728
8728
  turn: event.data.turn,
8729
8729
  type: event.type,
8730
8730
  data: event.data,
8731
- ...count$1(event.seq) ? { seq: event.seq } : {}
8731
+ ...count$2(event.seq) ? { seq: event.seq } : {}
8732
8732
  };
8733
8733
  }
8734
8734
  function finishReason(data) {
@@ -8760,7 +8760,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8760
8760
  const match = /^Copilot local estimated input budget exceeded \((\d+) estimated tokens > (\d+) budget tokens\); requesting stock compaction before provider dispatch\.$/.exec(failure.message);
8761
8761
  if (!match) return false;
8762
8762
  const estimate = Number(match[1]), budget = Number(match[2]);
8763
- return count$1(estimate) && count$1(budget) && budget > 0 && estimate > budget;
8763
+ return count$2(estimate) && count$2(budget) && budget > 0 && estimate > budget;
8764
8764
  }
8765
8765
  function fold(state, event) {
8766
8766
  const parsed = coordinates(event);
@@ -8778,7 +8778,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8778
8778
  let pending = state?.pending;
8779
8779
  if (pending !== void 0) {
8780
8780
  const same = parsed.data.step === pending.step && parsed.seq !== void 0 && parsed.seq > pending.seq;
8781
- if (same && parsed.seq !== void 0 && parsed.type === "llm/retry" && pending.phase === "failed" && typeof parsed.data.retryId === "string" && parsed.data.retryId.length > 0 && parsed.data.retryId.length <= 256 && count$1(parsed.data.retry) && parsed.data.retry > 0) pending = {
8781
+ if (same && parsed.seq !== void 0 && parsed.type === "llm/retry" && pending.phase === "failed" && typeof parsed.data.retryId === "string" && parsed.data.retryId.length > 0 && parsed.data.retryId.length <= 256 && count$2(parsed.data.retry) && parsed.data.retry > 0) pending = {
8782
8782
  ...pending,
8783
8783
  seq: parsed.seq,
8784
8784
  phase: "scheduled",
@@ -8801,11 +8801,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8801
8801
  if (timeout && (details?.length ?? 0) < 8) {
8802
8802
  const index = details?.length ?? 0;
8803
8803
  details = [...details ?? [], {
8804
- ...count$1(parsed.data.step) ? { step: parsed.data.step } : {},
8804
+ ...count$2(parsed.data.step) ? { step: parsed.data.step } : {},
8805
8805
  ...parsed.seq !== void 0 ? { seq: parsed.seq } : {},
8806
8806
  recovered: false
8807
8807
  }];
8808
- if (parsed.type === "assistant/attempt" && count$1(parsed.data.step) && parsed.seq !== void 0) pending = {
8808
+ if (parsed.type === "assistant/attempt" && count$2(parsed.data.step) && parsed.seq !== void 0) pending = {
8809
8809
  index,
8810
8810
  step: parsed.data.step,
8811
8811
  seq: parsed.seq,
@@ -8829,7 +8829,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8829
8829
  }
8830
8830
  /** Native completed-tail evidence gates the notice; native totals are never replaced. */
8831
8831
  function turnUsageDiagnostic(turn, tail, evidence, copilot) {
8832
- if (!count$1(turn) || !record$5(tail) || tail.turn !== turn || !count$1(tail.seq) || tail.tokenUsage !== void 0) return void 0;
8832
+ if (!count$2(turn) || !record$5(tail) || tail.turn !== turn || !count$2(tail.seq) || tail.tokenUsage !== void 0) return void 0;
8833
8833
  const parsed = isTurnUsageEvidence(evidence) && evidence.ended ? evidence : void 0;
8834
8834
  if (!copilot && (parsed?.localPreDispatchBlocks ?? 0) === 0) return void 0;
8835
8835
  return {
@@ -12518,28 +12518,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12518
12518
  //#endregion
12519
12519
  //#region lib/types/context-evidence.js
12520
12520
  const COPILOT_CONTEXT_EVIDENCE = "githubCopilotContextEvidence";
12521
- const count = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
12521
+ const count$1 = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
12522
12522
  const routeSchema = object({
12523
12523
  provider: string().min(1),
12524
12524
  model: string().min(1)
12525
12525
  }).strict();
12526
12526
  const sampleSchema = object({
12527
- tokens: count,
12528
- seq: count,
12527
+ tokens: count$1,
12528
+ seq: count$1,
12529
12529
  route: routeSchema
12530
12530
  }).strict();
12531
12531
  const incidentSchema = object({
12532
12532
  kind: _enum(["failed-zero", "invalid-sample"]),
12533
- seq: count
12533
+ seq: count$1
12534
12534
  }).strict();
12535
12535
  const stepSchema = object({
12536
- turn: count,
12537
- step: count
12536
+ turn: count$1,
12537
+ step: count$1
12538
12538
  }).strict();
12539
12539
  const compactionSchema = object({
12540
12540
  id: string().min(1).max(256),
12541
- startSeq: count,
12542
- endSeq: count.nullable(),
12541
+ startSeq: count$1,
12542
+ endSeq: count$1.nullable(),
12543
12543
  state: _enum([
12544
12544
  "running",
12545
12545
  "completed",
@@ -12547,7 +12547,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12547
12547
  "unknown"
12548
12548
  ]),
12549
12549
  checkpoint: boolean(),
12550
- headerSeq: count.nullable(),
12550
+ headerSeq: count$1.nullable(),
12551
12551
  requestRoute: routeSchema.nullable(),
12552
12552
  step: stepSchema.nullable(),
12553
12553
  request: _enum([
@@ -12576,12 +12576,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12576
12576
  activeStep: stepSchema.nullable().optional()
12577
12577
  }).strict();
12578
12578
  object({
12579
- inputTokens: count,
12580
- outputTokens: count,
12581
- cacheReadTokens: count.optional(),
12582
- cacheWriteTokens: count.optional(),
12583
- totalTokens: count.optional(),
12584
- reasoningTokens: count.optional()
12579
+ inputTokens: count$1,
12580
+ outputTokens: count$1,
12581
+ cacheReadTokens: count$1.optional(),
12582
+ cacheWriteTokens: count$1.optional(),
12583
+ totalTokens: count$1.optional(),
12584
+ reasoningTokens: count$1.optional()
12585
12585
  });
12586
12586
  //#endregion
12587
12587
  //#region lib/types/compaction-continuation-ui.js
@@ -13006,12 +13006,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13006
13006
  };
13007
13007
  }
13008
13008
  //#endregion
13009
+ //#region lib/types/replay-recovery-evidence.js
13010
+ const REPLAY_RECOVERY_EVIDENCE = "githubCopilotReplayRecoveryEvidence";
13011
+ const count = number().int().min(0).max(Number.MAX_SAFE_INTEGER);
13012
+ const ReplayRecoveryEvidenceSchema = object({
13013
+ inherited: count,
13014
+ turn: count.nullable(),
13015
+ managed: boolean(),
13016
+ failureSeq: count.nullable()
13017
+ }).strict();
13018
+ //#endregion
13009
13019
  //#region lib/types/replay-recovery-ui.js
13010
13020
  const noop = () => {};
13011
13021
  function record(value) {
13012
13022
  return value !== null && typeof value === "object" && !Array.isArray(value);
13013
13023
  }
13014
- function ReplayRecoveryCard({ sessionId, remote, continuation, locale = "en", running = false, refreshKey = "" }) {
13024
+ function ReplayRecoveryCard({ sessionId, remote, continuation, locale = "en", running = false, refreshKey = "", failureKey }) {
13015
13025
  const zh = locale.startsWith("zh");
13016
13026
  const [view, setView] = (0, react.useState)();
13017
13027
  const [busy, setBusy] = (0, react.useState)(false);
@@ -13081,8 +13091,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13081
13091
  const button = composerNoticeButtonStyle;
13082
13092
  const disabled = busy || running;
13083
13093
  const evidence = view && view.state !== "unavailable" ? view : void 0;
13084
- if (!error && !evidence && !hadEvidence) return null;
13085
- if (!error && evidence && dismissed === evidence.revision) return (0, react.createElement)("button", {
13094
+ const noticeKey = failureKey ?? evidence?.revision;
13095
+ if (!error && !noticeKey && !hadEvidence) return null;
13096
+ if (noticeKey && dismissed === noticeKey) return (0, react.createElement)("button", {
13086
13097
  type: "button",
13087
13098
  style: {
13088
13099
  ...button,
@@ -13105,17 +13116,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13105
13116
  color: "var(--dsw-alias-label-primary, CanvasText)",
13106
13117
  fontWeight: 600
13107
13118
  }
13108
- }, evidence ? zh ? "旧推理回放被拒绝" : "Old reasoning replay was rejected" : zh ? "回放恢复" : "Replay recovery"), error ? (0, react.createElement)("p", {
13119
+ }, noticeKey ? zh ? "旧推理回放被拒绝" : "Old reasoning replay was rejected" : zh ? "回放恢复" : "Replay recovery"), error ? (0, react.createElement)("p", {
13109
13120
  role: "alert",
13110
13121
  style: composerNoticeParagraphStyle
13111
- }, zh ? "无法读取或更改恢复状态。请等当前轮结束后重新读取;旧确认可能已过期。" : "Recovery could not be read or changed. Wait for the active turn to end and read again; the prior confirmation may have expired.") : null, view?.state === "unavailable" ? (0, react.createElement)("p", { style: composerNoticeParagraphStyle }, zh ? "失败证据已失效,没有当前可用的失败诊断。此状态不改变本 Session 的降级续聊策略。" : "Failure evidence expired; no current failure diagnostics are available. This does not change the Session continuation policy.") : null, evidence ? (0, react.createElement)("div", null, (0, react.createElement)(SessionContinuationCard, {
13112
- key: evidence.revision,
13122
+ }, zh ? "无法读取或更改恢复状态。请等当前轮结束后重新读取;旧确认可能已过期。" : "Recovery could not be read or changed. Wait for the active turn to end and read again; the prior confirmation may have expired.") : null, view?.state === "unavailable" ? (0, react.createElement)("p", { style: composerNoticeParagraphStyle }, failureKey ? zh ? "原会话记录了回放拒绝;当前请求指纹不可用。这里只提供本 Session 的显式降级策略,不恢复旧请求授权。" : "The original Session recorded a replay rejection; current request fingerprints are unavailable. Only the explicit Session continuation policy is offered, not authorization for the old request." : zh ? "失败证据已失效,没有当前可用的失败诊断。此状态不改变本 Session 的降级续聊策略。" : "Failure evidence expired; no current failure diagnostics are available. This does not change the Session continuation policy.") : null, noticeKey ? (0, react.createElement)("div", null, (0, react.createElement)("p", { style: composerNoticeParagraphStyle }, zh ? "定时任务失败后,请打开原 Session,在此选择恢复策略。开启不会重新运行任务;重试前请先核对是否已有部分结果,避免重复执行。" : "After a scheduled task fails, open the original Session to choose recovery here. Enabling does not rerun the task; check for partial results before retrying to avoid duplicate actions."), (0, react.createElement)(SessionContinuationCard, {
13123
+ key: noticeKey,
13113
13124
  sessionId,
13114
13125
  remote: continuation,
13115
13126
  locale,
13116
- running: running || busy,
13127
+ running,
13117
13128
  recovery: true,
13118
- onCancel: () => setDismissed(evidence.revision)
13129
+ onCancel: () => setDismissed(noticeKey)
13119
13130
  })) : null, running ? (0, react.createElement)("p", {
13120
13131
  role: "status",
13121
13132
  style: composerNoticeParagraphStyle
@@ -13141,18 +13152,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13141
13152
  function Surface({ runtime, remote, continuation, locale }) {
13142
13153
  const valid = runtime.useSession((value) => record(value) && value.sessionId === runtime.sessionId && value.removed === false && value.openState === "open");
13143
13154
  const selected = runtime.useProjection("modelSelection");
13155
+ const historical = ReplayRecoveryEvidenceSchema.safeParse(runtime.useProjection(REPLAY_RECOVERY_EVIDENCE));
13156
+ const failureKey = historical.success && historical.data.failureSeq !== null ? `turn-end:${historical.data.failureSeq}` : void 0;
13144
13157
  const running = runtime.useSession((value) => !record(value) || value.running !== false);
13145
13158
  const lastError = runtime.useSession((value) => record(value) && typeof value.lastAgentError === "string" ? value.lastAgentError : "");
13146
13159
  const language = (0, react.useSyncExternalStore)((listener) => locale?.subscribe(listener) ?? noop, () => locale?.getLocale().active ?? "en", () => "en");
13147
- if (!valid || !record(selected) || !record(selected.next) || selected.next.provider !== "github-copilot-preview") return null;
13160
+ if (!valid || !failureKey && (!record(selected) || !record(selected.next) || selected.next.provider !== "github-copilot-preview")) return null;
13148
13161
  return (0, react.createElement)("div", null, (0, react.createElement)(ReplayRecoveryCard, {
13149
- key: JSON.stringify([runtime.sessionId, selected.next.model]),
13162
+ key: runtime.sessionId,
13150
13163
  sessionId: runtime.sessionId,
13151
13164
  remote,
13152
13165
  continuation,
13153
13166
  locale: language,
13154
13167
  running,
13155
- refreshKey: lastError
13168
+ refreshKey: JSON.stringify([lastError, failureKey]),
13169
+ failureKey
13156
13170
  }));
13157
13171
  }
13158
13172
  function registerReplayRecoveryUi(ctx) {