dsh-github-copilot 0.1.0-alpha.2.dsh.0.2.1.rc.3 → 0.1.0-alpha.3.dsh.0.2.1.rc.3
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 +10 -0
- package/CHANGELOG.md +6 -0
- package/CONTRIBUTING.md +14 -0
- package/README.md +15 -5
- package/README.zh.md +13 -5
- package/deployment-baseline.json +2 -2
- package/docs/image-input-compatibility.md +49 -2
- package/lib/client.js +1 -1
- package/lib/index.js +37 -7
- package/lib/types/image-input-admission.d.ts +16 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -317,6 +317,16 @@ Desktop plugin upgrades do not necessarily reconcile profile-local copies of Hos
|
|
|
317
317
|
|
|
318
318
|
## Mechanical verification
|
|
319
319
|
|
|
320
|
+
For the opt-in task acceptance pilot, define observable requirements before
|
|
321
|
+
implementation and validate the clean candidate with
|
|
322
|
+
`node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
|
|
323
|
+
See [acceptance evidence](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md): exact commit/contract and
|
|
324
|
+
local file integrity are checked, not execution, environment truth, reviewer
|
|
325
|
+
independence or delivery permission. Keep reports outside Git and never upload
|
|
326
|
+
live diagnostics automatically. Failed, blocked and not-run requirements cannot
|
|
327
|
+
pass; new commits require new evidence. Existing review/CI/release gates remain
|
|
328
|
+
authoritative. This tooling does not activate agents or access live profiles.
|
|
329
|
+
|
|
320
330
|
Run from the repository root:
|
|
321
331
|
|
|
322
332
|
```sh
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.3.dsh.0.2.1.rc.3 (prepared)
|
|
4
|
+
|
|
5
|
+
- Explain projected-image admission failures through the standard native error path with bounded model, projected/allowed MIME, projected role/position and current build details (#426). Retain the existing fail-closed gate, explicit account restrictions and native projection ownership.
|
|
6
|
+
- Explain why historical images can block text-only continuations and offer explicit future-turn recovery choices. No automatic model switch, retry, image conversion/removal, history mutation or new diagnostic collector.
|
|
7
|
+
- Auto still checks general vision capability before candidate-specific projection is available. This change does not establish the original incident's model, image format, trigger block or loaded version, and does not claim live recovery. PR-only preparation does not authorize merge, publication, installation or restart.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.2.dsh.0.2.1.rc.3 (prepared)
|
|
4
10
|
|
|
5
11
|
- Bound account-management metadata and identity reads to fifteen seconds, provide metadata-only Retry after initial failure, and discard late results (#346). Account mutations retain their original locks and settlement; no Host cancellation or automatic retry.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -33,6 +33,20 @@ Core inspection is read-only. Isolated tests may use unchanged pinned Core artif
|
|
|
33
33
|
|
|
34
34
|
Generated `lib/` output, archives, `.env`, tokens, local credentials, machine state and production screenshots with real authorization codes must not be committed. Use synthetic fixtures for screenshots and report staged UI honestly.
|
|
35
35
|
|
|
36
|
+
## Task acceptance pilot
|
|
37
|
+
|
|
38
|
+
Define requirement IDs, expected behavior, verification methods and non-goals
|
|
39
|
+
before implementation. On the clean committed candidate, use
|
|
40
|
+
`node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
|
|
41
|
+
The [acceptance evidence guide](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md) defines the bounded
|
|
42
|
+
contract and report formats. Keep evidence outside Git, record exact commit and
|
|
43
|
+
contract/artifact hashes, and distinguish failed, blocked and not-run outcomes.
|
|
44
|
+
This verifies consistency only, not test execution, independent review or live
|
|
45
|
+
behavior; it never replaces required reviews or CI. Review artifacts before any
|
|
46
|
+
explicit sharing and do not upload raw live diagnostics. Subsequent commits need
|
|
47
|
+
fresh evidence. The current-Core PR-template target is mechanically checked
|
|
48
|
+
against package metadata without altering historical evidence.
|
|
49
|
+
|
|
36
50
|
## Release changes
|
|
37
51
|
|
|
38
52
|
GitHub Releases and npm are the default distribution channels for every new version, superseding the Release-only decision in #43 at the user's request. The public package uses the exact same verified tarball in both channels. No automatic npm opt-out is allowed. See [npm distribution](./docs/npm-distribution.md) for initial maintainer bootstrap, OIDC, retry recovery and organizational access requirements.
|
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
|
-
**Historical stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); pending DSH rc.3 update: `0.1.0-alpha.
|
|
11
|
+
**Historical stable release: [`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1); pending DSH rc.3 update: `0.1.0-alpha.3.dsh.0.2.1.rc.3`.** DSH `0.2.1-rc.3` is a prerelease. This plugin line is a compatibility candidate, not a production Core upgrade recommendation; Desktop artifacts/signatures are unverified. Each exact DSH Core version starts an independent plugin sequence at `0.1.0-alpha.1.dsh.<Core>`; same-Core fixes increment `alpha.N`. The suffix normalizes Core `0.2.1-rc.3` to `dsh.0.2.1.rc.3`, but compatibility is validated against explicit metadata, not guessed from the name. Existing published versions/tags remain unchanged. Published, installed and loaded states remain separate.
|
|
12
12
|
|
|
13
13
|
Select by **exact Core**, never global SemVer maximum or npm `latest`/`alpha`.
|
|
14
14
|
The read-only `node scripts/select-core-release.mjs 0.2.0-rc.2` command checks
|
|
@@ -160,7 +160,7 @@ Supply any launcher patches with repeated `--patch /absolute/file`. Require `sup
|
|
|
160
160
|
For a **standalone named profile**:
|
|
161
161
|
|
|
162
162
|
```sh
|
|
163
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
163
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.3.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.3.dsh.0.2.1.rc.3.tgz
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
The command above is a prepared-release example, usable only after publication and required CI qualification; it requires official DSH prerelease `0.2.1-rc.3`. **Do not install this candidate into production Desktop profiles.** Desktop artifacts/signatures and profile peer composition remain unverified; retain the existing compatible plugin on rc.2. The [historical rc.2 bundled-CLI qualification](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2) does not qualify rc.3, and a generic/global `dsh` shim is not equivalent. No installation or restart is authorized.
|
|
@@ -276,6 +276,8 @@ The same failure can include request-scoped native local body-write/header miles
|
|
|
276
276
|
|
|
277
277
|
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).
|
|
278
278
|
|
|
279
|
+
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.
|
|
280
|
+
|
|
279
281
|
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).
|
|
280
282
|
|
|
281
283
|
## Settings and troubleshooting
|
|
@@ -359,6 +361,14 @@ pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz
|
|
|
359
361
|
|
|
360
362
|
Agents start with `node scripts/agent.mjs describe --json`, `doctor --json` and `plan <task> --json`; plans are unexecuted arguments, not action approval. Follow [AGENTS.md](./AGENTS.md) for the full change/release policy. Important updates require protected merge and verified dual-channel publication; documentation-only work does not release by default. Profile installation, sign-out and session-interrupting restart need separate authorization.
|
|
361
363
|
|
|
364
|
+
The source-checkout [task acceptance pilot](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md) adds
|
|
365
|
+
`node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`.
|
|
366
|
+
It checks requirement coverage, the clean current commit, exact contract bytes
|
|
367
|
+
and local evidence hashes; failed, blocked and not-run outcomes remain distinct.
|
|
368
|
+
It does not attest execution, independent review, live behavior or delivery
|
|
369
|
+
permission. Keep evidence outside Git; no agents, uploads or profile changes are
|
|
370
|
+
started. Existing CI and release gates remain authoritative.
|
|
371
|
+
|
|
362
372
|
Commit attribution uses `Assisted-by` with the actual tool, never the model provider or an unverified collaborator identity.
|
|
363
373
|
|
|
364
374
|
## Release and checksum verification
|
|
@@ -366,14 +376,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
366
376
|
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.
|
|
367
377
|
|
|
368
378
|
```sh
|
|
369
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
370
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
379
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.3.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.3.dsh.0.2.1.rc.3.tgz
|
|
380
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.3.dsh.0.2.1.rc.3/SHA256SUMS
|
|
371
381
|
sha256sum --check SHA256SUMS
|
|
372
382
|
```
|
|
373
383
|
|
|
374
384
|
```powershell
|
|
375
385
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
376
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.
|
|
386
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.3.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
377
387
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
378
388
|
```
|
|
379
389
|
|
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);DSH rc.3 更新候选:`0.1.0-alpha.
|
|
11
|
+
**历史稳定版:[`0.4.1`](https://github.com/cloga/dsh-github-copilot/releases/tag/v0.4.1);DSH rc.3 更新候选:`0.1.0-alpha.3.dsh.0.2.1.rc.3`。** DSH `0.2.1-rc.3` 是预发布版本。本插件线是兼容性候选,不是生产 Core 升级建议;Desktop 制品/签名尚未核验。每个精确 DSH Core 版本都从独立插件序列 `0.1.0-alpha.1.dsh.<Core>` 开始;同一 Core 内修复递增 `alpha.N`。后缀将 Core `0.2.1-rc.3` 规范化为 `dsh.0.2.1.rc.3`,但兼容性仍须核对明确元数据,不能只猜版本名。既有已发布版本和 tag 不变。已发布、已安装、已加载仍是不同状态。
|
|
12
12
|
|
|
13
13
|
按**精确 Core**选版本,不按全局 SemVer 最大值或 npm `latest`/`alpha`。
|
|
14
14
|
只读命令 `node scripts/select-core-release.mjs 0.2.0-rc.2` 先读取
|
|
@@ -135,7 +135,7 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
135
135
|
**独立具名 profile**:
|
|
136
136
|
|
|
137
137
|
```sh
|
|
138
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
138
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.3.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.3.dsh.0.2.1.rc.3.tgz
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
上面的命令是准备发布的示例,仅在发布且所需 CI 通过后可用;目标是官方 DSH 预发布版 `0.2.1-rc.3`。**不要把此候选安装到生产 Desktop profile。** Desktop 制品/签名及 profile peer 组合仍未核验;rc.2 应保留现有兼容插件。[历史 rc.2 随附 CLI 核验](./docs/npm-distribution.md#desktop-bundled-cli-on-official-rc2)不代表 rc.3 验收;全局/普通 `dsh` shim 不等价。本次不授权安装或重启。
|
|
@@ -248,6 +248,8 @@ Copilot 搜索要求当前账号/协议证据及能力 proof。固定/fallba
|
|
|
248
248
|
|
|
249
249
|
HTTP/SSE liveness 默认区分 5 分钟字节 idle 和有界的 10 分钟助手输出静默,排除消费者工作;WebSocket/显式 `auto`仍仅使用原生路径。这不修复供应方 HTTP 408。图片按原生实际投影 MIME 证据准入;插件不负责转换,也不按文件名猜格式支持。[图片兼容](./docs/image-input-compatibility.md)。
|
|
250
250
|
|
|
251
|
+
图片准入错误会解释为何纯文本续聊也可能被历史图片阻断。原生错误包含有界的所选模型、投影/允许 MIME、投影角色/位置及当前插件构建版本,不含图片内容、URL 或路径。Auto 只检查通用图片能力,不能预先保证候选模型接受最终投影格式;最终门禁仍保守拒绝不兼容请求。可为后续轮次明确选择兼容模型,或另开不含旧图的纯文本 Session;不会自动换模型、移除图片或重试。这些诊断不能追溯补齐旧故障的证据。
|
|
252
|
+
|
|
251
253
|
原生 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)。
|
|
252
254
|
|
|
253
255
|
## 设置与排障
|
|
@@ -331,6 +333,12 @@ pnpm verify:tarball -- artifacts/dsh-github-copilot-<package-version>.tgz
|
|
|
331
333
|
|
|
332
334
|
Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <task> --json`开始;计划仅返回未执行 argv,不授权副作用。完整变更/发布政策见[AGENTS.md](./AGENTS.md)。重要更新必须经受保护合并与双渠道发布;纯文档默认不发包。Profile 安装、退出和中断会话的重启另需许可。
|
|
333
335
|
|
|
336
|
+
源码工作区的[任务验收试点](https://github.com/cloga/dsh-github-copilot/blob/main/docs/agent-acceptance.md)提供
|
|
337
|
+
`node scripts/agent.mjs accept --contract CONTRACT_FILE --report REPORT_FILE`。
|
|
338
|
+
它检查需求覆盖、当前干净提交、契约原始字节和本地证据哈希,并区分失败、受阻和未执行。
|
|
339
|
+
这不是测试执行、独立评审、真实运行或交付授权的证明。证据保留在 Git 之外;
|
|
340
|
+
该命令不会启动 agent、上传数据或修改 profile,现有 CI 和发布门禁仍是交付依据。
|
|
341
|
+
|
|
334
342
|
提交以 `Assisted-by` 标明实际使用的工具,不用模型供应商或未经核实的协作者身份。
|
|
335
343
|
|
|
336
344
|
## Release 与 checksum
|
|
@@ -338,14 +346,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
338
346
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
339
347
|
|
|
340
348
|
```sh
|
|
341
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
342
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.
|
|
349
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.3.dsh.0.2.1.rc.3/dsh-github-copilot-0.1.0-alpha.3.dsh.0.2.1.rc.3.tgz
|
|
350
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.1.0-alpha.3.dsh.0.2.1.rc.3/SHA256SUMS
|
|
343
351
|
sha256sum --check SHA256SUMS
|
|
344
352
|
```
|
|
345
353
|
|
|
346
354
|
```powershell
|
|
347
355
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
348
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.
|
|
356
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.1.0-alpha.3.dsh.0.2.1.rc.3.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
349
357
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
350
358
|
```
|
|
351
359
|
|
package/deployment-baseline.json
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
},
|
|
9
9
|
"package": {
|
|
10
10
|
"name": "dsh-github-copilot",
|
|
11
|
-
"version": "0.1.0-alpha.
|
|
11
|
+
"version": "0.1.0-alpha.3.dsh.0.2.1.rc.3"
|
|
12
12
|
},
|
|
13
13
|
"releaseLines": [
|
|
14
14
|
{ "core": "0.2.0-rc.2", "version": "0.4.2-alpha.15", "status": "published" },
|
|
15
15
|
{ "core": "0.2.1-alpha.4", "version": "0.4.2-alpha.16", "status": "published" },
|
|
16
16
|
{ "core": "0.2.1-alpha.5", "version": "0.1.0-alpha.2.dsh.0.2.1.alpha.5", "status": "published" },
|
|
17
|
-
{ "core": "0.2.1-rc.3", "version": "0.1.0-alpha.
|
|
17
|
+
{ "core": "0.2.1-rc.3", "version": "0.1.0-alpha.3.dsh.0.2.1.rc.3", "status": "pending" }
|
|
18
18
|
],
|
|
19
19
|
"evidence": {
|
|
20
20
|
"kind": "source-and-synthetic-test-inventory",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Image input compatibility
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Current source target: official DSH `0.2.1-rc.3`. Plugin-only. Historical
|
|
4
|
+
rc.2 delivery evidence below does not qualify the current source or a loaded
|
|
5
|
+
Desktop.
|
|
4
6
|
|
|
5
7
|
## Current behavior
|
|
6
8
|
|
|
@@ -27,6 +29,33 @@ not prove universal format acceptance. The plugin neither invents a list nor
|
|
|
27
29
|
converts images itself. Native error/finish behavior, historical attachments,
|
|
28
30
|
turn freezing and existing cancellation/retry policy stay unchanged.
|
|
29
31
|
|
|
32
|
+
### Admission error details
|
|
33
|
+
|
|
34
|
+
The standard native `INVALID_REQUEST` failure message retains the diagnostic
|
|
35
|
+
code and now explains why the request was blocked before selected-model wire
|
|
36
|
+
dispatch. It includes a bounded, content-free JSON diagnostic: selected real
|
|
37
|
+
model ID (safe identifiers only, otherwise `unavailable`), normalized projected
|
|
38
|
+
MIME (invalid/missing/overlong values become `unavailable`), up to eight explicit
|
|
39
|
+
allowed MIME types with total count and truncation flag, projected message/block
|
|
40
|
+
zero-based indices, allowlisted projected role, and this plugin build's version.
|
|
41
|
+
An absent allowed list is `null`, not an empty list or universal format proof.
|
|
42
|
+
These positions refer to the native projected transcript, not durable history
|
|
43
|
+
IDs or an attachment identity. Only the first rejected image is reported.
|
|
44
|
+
|
|
45
|
+
This uses the existing error/finish presentation, not a new Remote, collector,
|
|
46
|
+
diagnostic store, or history event. Image bytes, URLs, paths, prompt text and
|
|
47
|
+
credentials are never included. Native handling of failure messages is unchanged;
|
|
48
|
+
this is not a claim that native failures are never retained. The version describes
|
|
49
|
+
the build producing this error, not the plugin loaded during an earlier incident.
|
|
50
|
+
Earlier Auto assessment traffic, if any, is not a selected-model dispatch.
|
|
51
|
+
|
|
52
|
+
History images can cause this failure on a text-only continuation. The error
|
|
53
|
+
offers explicit next-turn choices: select a model whose current advertised formats
|
|
54
|
+
accept the projection, or start a separate text-only Session without those
|
|
55
|
+
historical images. Missing MIME needs investigation using the diagnostic, not
|
|
56
|
+
guessing from filenames. There is no automatic retry, model switch, image removal,
|
|
57
|
+
conversion, or history mutation.
|
|
58
|
+
|
|
30
59
|
## Evidence layers and recovery limits
|
|
31
60
|
|
|
32
61
|
Source filename, durable attachment MIME and outgoing projected MIME are
|
|
@@ -40,6 +69,13 @@ Auto filtering from durable MIME can reject a model whose native projection
|
|
|
40
69
|
would be accepted; candidate-specific projection would require another public
|
|
41
70
|
contract and reviewed tests.
|
|
42
71
|
|
|
72
|
+
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
|
+
|
|
43
79
|
The current fix diagnoses explicit incompatibility, not every provider 400.
|
|
44
80
|
When advertised restrictions and outgoing projection agree but the endpoint
|
|
45
81
|
rejects it, retain the native error. Do not invent capability corrections,
|
|
@@ -49,13 +85,24 @@ outgoing visibility through Core offload; it is not a supplier JSON threshold.
|
|
|
49
85
|
|
|
50
86
|
## Verification
|
|
51
87
|
|
|
88
|
+
`node --test tests/scripts/image-input-admission.test.mjs` exercises the real
|
|
89
|
+
TypeScript admission helper using Node's built-in runner: historical user/tool
|
|
90
|
+
projections, missing/invalid/unsupported formats, absent versus empty restrictions,
|
|
91
|
+
bounded redacted diagnostics, no private-content reads and no input mutation.
|
|
92
|
+
It does not exercise the native adapter or Client.
|
|
93
|
+
`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
|
|
95
|
+
explicit separation between Auto vision eligibility and final projected-format
|
|
96
|
+
admission. These require the unchanged pinned dependencies. Passing the
|
|
97
|
+
dependency-free helper tests is not a substitute for those integration gates.
|
|
98
|
+
|
|
52
99
|
Historical tool-image continuation first reproduced the old missed-image
|
|
53
100
|
requirement. Regressions now cover all Auto preferences, historical user/tool
|
|
54
101
|
images, no vision candidate and native WebP-to-PNG projection against explicit
|
|
55
102
|
PNG/JPEG restrictions. A mismatch emits native `finish(error)` with zero model
|
|
56
103
|
requests.
|
|
57
104
|
|
|
58
|
-
The [delivery CI](https://github.com/cloga/dsh-github-copilot/actions/runs/36966798814)
|
|
105
|
+
The historical [delivery CI](https://github.com/cloga/dsh-github-copilot/actions/runs/36966798814)
|
|
59
106
|
passed exact unchanged rc.2 Windows/Linux source and published-adapter fixtures,
|
|
60
107
|
full verification and archive gates. Local synthetic transport demonstrates
|
|
61
108
|
admission/ownership, not live endpoint acceptance or a particular Desktop's
|
package/lib/client.js
CHANGED
|
@@ -6338,7 +6338,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
6338
6338
|
};
|
|
6339
6339
|
//#endregion
|
|
6340
6340
|
//#region package.json
|
|
6341
|
-
var version = "0.1.0-alpha.
|
|
6341
|
+
var version = "0.1.0-alpha.3.dsh.0.2.1.rc.3";
|
|
6342
6342
|
//#endregion
|
|
6343
6343
|
//#region lib/types/diagnostics-client.js
|
|
6344
6344
|
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.1.0-alpha.
|
|
585
|
+
version: "0.1.0-alpha.3.dsh.0.2.1.rc.3",
|
|
586
586
|
releaseNotes: "CHANGELOG.md",
|
|
587
587
|
publishConfig: {
|
|
588
588
|
"access": "public",
|
|
@@ -13710,17 +13710,47 @@ function installAutoModelRouting(ctx, dependencies) {
|
|
|
13710
13710
|
}
|
|
13711
13711
|
//#endregion
|
|
13712
13712
|
//#region lib/types/image-input-admission.js
|
|
13713
|
+
const imageMime = /^image\/[a-z0-9!#$%&'*+.^_`|~-]+$/iu;
|
|
13714
|
+
function diagnosticMime(value) {
|
|
13715
|
+
return typeof value === "string" && value.length <= 128 && imageMime.test(value) ? value.toLowerCase() : "unavailable";
|
|
13716
|
+
}
|
|
13713
13717
|
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
13714
13718
|
function imageInputFailure(model, messages) {
|
|
13715
|
-
for (const message of messages) {
|
|
13719
|
+
for (const [messageIndex, message] of messages.entries()) {
|
|
13716
13720
|
if (typeof message !== "object" || message === null || !("content" in message) || !Array.isArray(message.content)) continue;
|
|
13717
13721
|
const content = message.content;
|
|
13718
|
-
for (const block of content) {
|
|
13722
|
+
for (const [blockIndex, block] of content.entries()) {
|
|
13719
13723
|
if (typeof block !== "object" || block === null || !("type" in block) || block.type !== "image") continue;
|
|
13720
|
-
|
|
13721
|
-
if (!("mimeType" in block) || typeof block.mimeType !== "string" || !/^image\/[a-z0-9!#$%&'*+.^_`|~-]+$/iu.test(block.mimeType)) return "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE";
|
|
13724
|
+
const mimeType = "mimeType" in block ? block.mimeType : void 0;
|
|
13722
13725
|
const allowed = model.evidence.visionMediaTypes;
|
|
13723
|
-
|
|
13726
|
+
let code;
|
|
13727
|
+
if (!model.input.includes("image")) code = "COPILOT_IMAGE_INPUT_UNSUPPORTED";
|
|
13728
|
+
else if (typeof mimeType !== "string" || !imageMime.test(mimeType)) code = "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE";
|
|
13729
|
+
else if (allowed !== void 0 && !allowed.includes(mimeType.toLowerCase())) code = "COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED";
|
|
13730
|
+
else continue;
|
|
13731
|
+
const role = "role" in message && typeof message.role === "string" && [
|
|
13732
|
+
"user",
|
|
13733
|
+
"assistant",
|
|
13734
|
+
"system",
|
|
13735
|
+
"tool",
|
|
13736
|
+
"toolResult"
|
|
13737
|
+
].includes(message.role) ? message.role : "unknown";
|
|
13738
|
+
const diagnostic = {
|
|
13739
|
+
model: model.id.length <= 200 && /^[a-z0-9][a-z0-9._:-]*$/iu.test(model.id) ? model.id : "unavailable",
|
|
13740
|
+
projectedMime: diagnosticMime(mimeType),
|
|
13741
|
+
allowedMimeTypes: allowed === void 0 ? null : allowed.slice(0, 8).map(diagnosticMime),
|
|
13742
|
+
allowedMimeTypeCount: allowed?.length ?? null,
|
|
13743
|
+
allowedMimeTypesTruncated: allowed !== void 0 && allowed.length > 8,
|
|
13744
|
+
messageIndex,
|
|
13745
|
+
blockIndex,
|
|
13746
|
+
role,
|
|
13747
|
+
pluginVersion: package_default.version
|
|
13748
|
+
};
|
|
13749
|
+
return {
|
|
13750
|
+
code,
|
|
13751
|
+
diagnostic,
|
|
13752
|
+
message: `${code}: Request blocked before selected-model dispatch. ${code === "COPILOT_IMAGE_INPUT_UNSUPPORTED" ? "The selected model does not admit image input." : code === "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE" ? "The native projected image MIME is missing or invalid; format compatibility cannot be verified." : "The native projected image MIME is outside the selected model's explicit account-advertised formats."} 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)}`
|
|
13753
|
+
};
|
|
13724
13754
|
}
|
|
13725
13755
|
}
|
|
13726
13756
|
}
|
|
@@ -14210,7 +14240,7 @@ var PreviewAdapter = class extends PiAiAdapter {
|
|
|
14210
14240
|
if (signal.aborted) throw abortFailure(signal);
|
|
14211
14241
|
const imageFailure = imageInputFailure(lease.descriptor, context.messages);
|
|
14212
14242
|
if (imageFailure !== void 0) {
|
|
14213
|
-
requestFailure = new LlmError(imageFailure, "INVALID_REQUEST");
|
|
14243
|
+
requestFailure = new LlmError(imageFailure.message, "INVALID_REQUEST");
|
|
14214
14244
|
throw requestFailure;
|
|
14215
14245
|
}
|
|
14216
14246
|
const calculated = calculateRequestBudget(lease.descriptor, nativeOptions?.maxTokens, policy);
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import type { AccountModelDescriptor } from './account-model-catalog.ts';
|
|
2
|
-
export type
|
|
2
|
+
export type ImageInputFailureCode = 'COPILOT_IMAGE_INPUT_UNSUPPORTED' | 'COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE' | 'COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED';
|
|
3
|
+
export interface ImageInputFailure {
|
|
4
|
+
readonly code: ImageInputFailureCode;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly diagnostic: {
|
|
7
|
+
readonly model: string;
|
|
8
|
+
readonly projectedMime: string;
|
|
9
|
+
readonly allowedMimeTypes: readonly string[] | null;
|
|
10
|
+
readonly allowedMimeTypeCount: number | null;
|
|
11
|
+
readonly allowedMimeTypesTruncated: boolean;
|
|
12
|
+
readonly messageIndex: number;
|
|
13
|
+
readonly blockIndex: number;
|
|
14
|
+
readonly role: string;
|
|
15
|
+
readonly pluginVersion: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
3
18
|
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
4
19
|
export declare function imageInputFailure(model: AccountModelDescriptor, messages: readonly unknown[]): ImageInputFailure | undefined;
|
|
5
20
|
//# 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.1.0-alpha.
|
|
4
|
+
"version": "0.1.0-alpha.3.dsh.0.2.1.rc.3",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|