dsh-github-copilot 0.4.2-alpha.17 → 0.4.2-alpha.18.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 +11 -0
- package/README.md +7 -7
- package/README.zh.md +7 -7
- package/deployment-baseline.json +15 -1
- package/docs/image-input-compatibility.md +39 -19
- package/lib/client.js +1 -1
- package/lib/index.js +17 -9
- package/lib/types/image-input-admission.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2-alpha.18.dsh.0.2.0.rc.2 (prepared)
|
|
4
|
+
|
|
5
|
+
- Stop rejecting a valid native-projected image format solely because it is absent
|
|
6
|
+
from the supplier-advertised list. Log one fixed Host diagnostic per projected
|
|
7
|
+
request and let native transport/server adjudication proceed; retain invalid
|
|
8
|
+
MIME, non-vision, account, cancellation and capacity guards.
|
|
9
|
+
- No format-support claim, format-aware Auto, conversion, extra retry/switch or
|
|
10
|
+
history/Usage mutation. This is a prepared legacy rc.2 maintenance increment
|
|
11
|
+
with an exact-Core suffix, not a change to newer Core-specific release sequences.
|
|
12
|
+
- This entry does not imply local profile installation or loaded-runtime activation.
|
|
13
|
+
|
|
3
14
|
## 0.4.2-alpha.17 (prepared)
|
|
4
15
|
|
|
5
16
|
- 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.
|
|
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.18.dsh.0.2.0.rc.2`.** This rc.2 image-format mitigation 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.
|
|
134
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.18.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.18.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.
|
|
137
|
+
For **Desktop**, its native package manager accepts an exact npm spec, for example `dsh-github-copilot@0.4.2-alpha.18.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
|
|
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
|
|
|
@@ -326,14 +326,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
326
326
|
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
327
|
|
|
328
328
|
```sh
|
|
329
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
330
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
329
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.18.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.18.dsh.0.2.0.rc.2.tgz
|
|
330
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.18.dsh.0.2.0.rc.2/SHA256SUMS
|
|
331
331
|
sha256sum --check SHA256SUMS
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
```powershell
|
|
335
335
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
336
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
336
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.18.dsh.0.2.0.rc.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
337
337
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
338
338
|
```
|
|
339
339
|
|
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.
|
|
11
|
+
**稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);待发布维护预览版:`0.4.2-alpha.18.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.
|
|
116
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.18.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.18.dsh.0.2.0.rc.2.tgz
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
**Desktop** 原生包管理器接受精确 npm spec,例如发布后的 `dsh-github-copilot@0.4.2-alpha.
|
|
119
|
+
**Desktop** 原生包管理器接受精确 npm spec,例如发布后的 `dsh-github-copilot@0.4.2-alpha.18.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
|
-
|
|
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
|
|
|
@@ -305,14 +305,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
305
305
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
306
306
|
|
|
307
307
|
```sh
|
|
308
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
309
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
308
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.18.dsh.0.2.0.rc.2/dsh-github-copilot-0.4.2-alpha.18.dsh.0.2.0.rc.2.tgz
|
|
309
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.18.dsh.0.2.0.rc.2/SHA256SUMS
|
|
310
310
|
sha256sum --check SHA256SUMS
|
|
311
311
|
```
|
|
312
312
|
|
|
313
313
|
```powershell
|
|
314
314
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
315
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
315
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.18.dsh.0.2.0.rc.2.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
316
316
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
317
317
|
```
|
|
318
318
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.4.2-alpha.
|
|
11
|
+
"version": "0.4.2-alpha.18.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,
|
|
@@ -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
|
|
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
|
-
| `
|
|
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.
|
|
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
|
-
|
|
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.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
|
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
|
|
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
|
|
102
|
-
PNG/JPEG
|
|
103
|
-
|
|
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
|
-
|
|
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
|
@@ -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.
|
|
7557
|
+
var version = "0.4.2-alpha.18.dsh.0.2.0.rc.2";
|
|
7558
7558
|
//#endregion
|
|
7559
7559
|
//#region lib/types/diagnostics-client.js
|
|
7560
7560
|
let owner;
|
package/lib/index.js
CHANGED
|
@@ -582,7 +582,7 @@ const result$1 = strictRemoteCodec("dsh-github-copilot#DiagnosticsView", Diagnos
|
|
|
582
582
|
var package_default = {
|
|
583
583
|
name: "dsh-github-copilot",
|
|
584
584
|
description: "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
585
|
-
version: "0.4.2-alpha.
|
|
585
|
+
version: "0.4.2-alpha.18.dsh.0.2.0.rc.2",
|
|
586
586
|
releaseNotes: "CHANGELOG.md",
|
|
587
587
|
publishConfig: {
|
|
588
588
|
"access": "public",
|
|
@@ -13539,7 +13539,8 @@ function diagnosticMime(value) {
|
|
|
13539
13539
|
return typeof value === "string" && value.length <= 128 && imageMime.test(value) ? value.toLowerCase() : "unavailable";
|
|
13540
13540
|
}
|
|
13541
13541
|
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
13542
|
-
function imageInputFailure(model, messages) {
|
|
13542
|
+
function imageInputFailure(model, messages, observe) {
|
|
13543
|
+
let mismatchReported = false;
|
|
13543
13544
|
for (const [messageIndex, message] of messages.entries()) {
|
|
13544
13545
|
if (typeof message !== "object" || message === null || !("content" in message) || !Array.isArray(message.content)) continue;
|
|
13545
13546
|
const content = message.content;
|
|
@@ -13550,8 +13551,13 @@ function imageInputFailure(model, messages) {
|
|
|
13550
13551
|
let code;
|
|
13551
13552
|
if (!model.input.includes("image")) code = "COPILOT_IMAGE_INPUT_UNSUPPORTED";
|
|
13552
13553
|
else if (typeof mimeType !== "string" || !imageMime.test(mimeType)) code = "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE";
|
|
13553
|
-
else
|
|
13554
|
-
|
|
13554
|
+
else {
|
|
13555
|
+
if (!mismatchReported && allowed !== void 0 && !allowed.includes(mimeType.toLowerCase())) {
|
|
13556
|
+
mismatchReported = true;
|
|
13557
|
+
observe?.("COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED");
|
|
13558
|
+
}
|
|
13559
|
+
continue;
|
|
13560
|
+
}
|
|
13555
13561
|
const role = "role" in message && typeof message.role === "string" && [
|
|
13556
13562
|
"user",
|
|
13557
13563
|
"assistant",
|
|
@@ -13573,7 +13579,7 @@ function imageInputFailure(model, messages) {
|
|
|
13573
13579
|
return {
|
|
13574
13580
|
code,
|
|
13575
13581
|
diagnostic,
|
|
13576
|
-
message: `${code}: Request blocked before selected-model dispatch. ${code === "COPILOT_IMAGE_INPUT_UNSUPPORTED" ? "The selected model does not admit image input." :
|
|
13582
|
+
message: `${code}: Request blocked before selected-model dispatch. ${code === "COPILOT_IMAGE_INPUT_UNSUPPORTED" ? "The selected model does not admit image input." : "The native projected image MIME is missing or invalid; format compatibility cannot be verified."} History images also count, even on a text-only continuation. Auto checks general image capability, not candidate-specific projected formats. For a subsequent turn, explicitly choose a model whose advertised formats accept this projection, or start a separate text-only Session without the old images. If MIME is unavailable, report this diagnostic; filenames do not establish projected format. No automatic retry or model switch was performed. Projected transcript positions are zero-based, not durable history IDs. ${JSON.stringify(diagnostic)}`
|
|
13577
13583
|
};
|
|
13578
13584
|
}
|
|
13579
13585
|
}
|
|
@@ -13886,7 +13892,8 @@ var PreviewAdapter = class extends PiAiAdapter {
|
|
|
13886
13892
|
replayRecovery;
|
|
13887
13893
|
requestCheckpoint;
|
|
13888
13894
|
captureRequest;
|
|
13889
|
-
|
|
13895
|
+
imageDiagnostic;
|
|
13896
|
+
constructor(lifetime, optionsFor, discoverSnapshot, refreshRejected, requestBudgetSettings, accountModelSettings, classifierReasoningOff = false, replayRecovery, requestCheckpoint, captureRequest = () => void 0, imageDiagnostic) {
|
|
13890
13897
|
super(optionsFor());
|
|
13891
13898
|
this.lifetime = lifetime;
|
|
13892
13899
|
this.optionsFor = optionsFor;
|
|
@@ -13898,6 +13905,7 @@ var PreviewAdapter = class extends PiAiAdapter {
|
|
|
13898
13905
|
this.replayRecovery = replayRecovery;
|
|
13899
13906
|
this.requestCheckpoint = requestCheckpoint;
|
|
13900
13907
|
this.captureRequest = captureRequest;
|
|
13908
|
+
this.imageDiagnostic = imageDiagnostic;
|
|
13901
13909
|
}
|
|
13902
13910
|
async listModels(provider) {
|
|
13903
13911
|
owned(provider);
|
|
@@ -14062,7 +14070,7 @@ var PreviewAdapter = class extends PiAiAdapter {
|
|
|
14062
14070
|
const inspectRequest = (_model, context, nativeOptions) => {
|
|
14063
14071
|
owner.requestCheckpoint?.();
|
|
14064
14072
|
if (signal.aborted) throw abortFailure(signal);
|
|
14065
|
-
const imageFailure = imageInputFailure(lease.descriptor, context.messages);
|
|
14073
|
+
const imageFailure = imageInputFailure(lease.descriptor, context.messages, owner.imageDiagnostic);
|
|
14066
14074
|
if (imageFailure !== void 0) {
|
|
14067
14075
|
requestFailure = new LlmError(imageFailure.message, "INVALID_REQUEST");
|
|
14068
14076
|
throw requestFailure;
|
|
@@ -14443,7 +14451,7 @@ function createAccountRuntime(ctx, config, binding, exclusionTurns, replayRecove
|
|
|
14443
14451
|
};
|
|
14444
14452
|
};
|
|
14445
14453
|
return {
|
|
14446
|
-
adapter: new PreviewAdapter(lifetime, optionsFor, discoverSnapshot, refreshRejected, budgetSettings, cacheSettings, false, replayRecovery, void 0, (signal) => ctx.get("githubCopilotSessionAccounts")?.recordRequest(signal)),
|
|
14454
|
+
adapter: new PreviewAdapter(lifetime, optionsFor, discoverSnapshot, refreshRejected, budgetSettings, cacheSettings, false, replayRecovery, void 0, (signal) => ctx.get("githubCopilotSessionAccounts")?.recordRequest(signal), (code) => ctx.logger.warn(code)),
|
|
14447
14455
|
preview: {
|
|
14448
14456
|
getView,
|
|
14449
14457
|
refresh,
|
|
@@ -14545,7 +14553,7 @@ function createAccountRuntime(ctx, config, binding, exclusionTurns, replayRecove
|
|
|
14545
14553
|
});
|
|
14546
14554
|
const revision = lifetime.revision;
|
|
14547
14555
|
const classifierOptionsFor = (lease, hooks) => optionsFor(lease, hooks, true);
|
|
14548
|
-
const adapter = new PreviewAdapter(lifetime, classifierOptionsFor, discoverSnapshot, refreshRejected, budgetSettings, cacheSettings, true, void 0, checkpoint);
|
|
14556
|
+
const adapter = new PreviewAdapter(lifetime, classifierOptionsFor, discoverSnapshot, refreshRejected, budgetSettings, cacheSettings, true, void 0, checkpoint, void 0, (code) => ctx.logger.warn(code));
|
|
14549
14557
|
try {
|
|
14550
14558
|
const prepared = await adapter.prepareCall(GITHUB_COPILOT_PREVIEW_PROVIDER_ID, model.id, signal);
|
|
14551
14559
|
checkpoint?.();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AccountModelDescriptor } from './account-model-catalog.ts';
|
|
2
|
-
export type ImageInputFailureCode = 'COPILOT_IMAGE_INPUT_UNSUPPORTED' | 'COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE'
|
|
2
|
+
export type ImageInputFailureCode = 'COPILOT_IMAGE_INPUT_UNSUPPORTED' | 'COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE';
|
|
3
|
+
export type ImageInputDiagnosticCode = 'COPILOT_IMAGE_MEDIA_TYPE_UNADVERTISED';
|
|
3
4
|
export interface ImageInputFailure {
|
|
4
5
|
readonly code: ImageInputFailureCode;
|
|
5
6
|
readonly message: string;
|
|
@@ -16,5 +17,5 @@ export interface ImageInputFailure {
|
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
19
|
-
export declare function imageInputFailure(model: AccountModelDescriptor, messages: readonly unknown[]): ImageInputFailure | undefined;
|
|
20
|
+
export declare function imageInputFailure(model: AccountModelDescriptor, messages: readonly unknown[], observe?: (code: ImageInputDiagnosticCode) => void): ImageInputFailure | undefined;
|
|
20
21
|
//# sourceMappingURL=image-input-admission.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-github-copilot",
|
|
3
3
|
"description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
|
|
4
|
-
"version": "0.4.2-alpha.
|
|
4
|
+
"version": "0.4.2-alpha.18.dsh.0.2.0.rc.2",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|