dsh-github-copilot 0.4.2-alpha.15 → 0.4.2-alpha.17
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 +15 -0
- package/README.md +8 -6
- package/README.zh.md +8 -6
- package/deployment-baseline.json +1 -1
- package/docs/image-input-compatibility.md +52 -3
- package/docs/npm-distribution.md +15 -0
- 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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.2-alpha.17 (prepared)
|
|
4
|
+
|
|
5
|
+
- Backport #426's bounded projected-image admission diagnostics to official DSH
|
|
6
|
+
`0.2.0-rc.2`, retaining pi-ai `0.87.1` and the unchanged Core dependency graph.
|
|
7
|
+
- Explain historical-image failures on text-only continuations through the
|
|
8
|
+
existing native `INVALID_REQUEST` finish, with safe model/MIME/position/build
|
|
9
|
+
evidence. Preserve fail-closed admission, history and no automatic switch or
|
|
10
|
+
retry. Auto's general vision eligibility does not guarantee projected MIME fit.
|
|
11
|
+
- Prepared for a separately authorized local Desktop installation; this entry
|
|
12
|
+
does not claim publication, a Core upgrade, loaded-runtime activation or live
|
|
13
|
+
model recovery.
|
|
14
|
+
- Enable exact rc.2 maintenance push delivery through the unchanged full
|
|
15
|
+
compatibility matrix and original-archive GitHub/npm OIDC pipeline; arbitrary
|
|
16
|
+
maintenance refs and non-rc.2 archives remain rejected.
|
|
17
|
+
|
|
3
18
|
## 0.4.2-alpha.15 (prepared)
|
|
4
19
|
|
|
5
20
|
- Plan selected compaction recovery in public native token-meter units rather than comparing UTF-8 bytes directly with token budgets (#418). This prevents false indivisible rejection of long balanced tool spans that fit the planning budget.
|
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 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.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.
|
|
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.17/dsh-github-copilot-0.4.2-alpha.17.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.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.
|
|
138
138
|
|
|
139
139
|
After an approved reload/restart:
|
|
140
140
|
|
|
@@ -239,6 +239,8 @@ 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.
|
|
243
|
+
|
|
242
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).
|
|
243
245
|
|
|
244
246
|
## Settings and troubleshooting
|
|
@@ -324,14 +326,14 @@ Commit attribution uses `Assisted-by` with the actual tool, never the model prov
|
|
|
324
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.
|
|
325
327
|
|
|
326
328
|
```sh
|
|
327
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
328
|
-
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.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
|
|
329
331
|
sha256sum --check SHA256SUMS
|
|
330
332
|
```
|
|
331
333
|
|
|
332
334
|
```powershell
|
|
333
335
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
334
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
336
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.17.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
335
337
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
336
338
|
```
|
|
337
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)
|
|
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 加载,是三个不同状态。
|
|
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.17/dsh-github-copilot-0.4.2-alpha.17.tgz
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
**Desktop** 原生包管理器接受精确 npm spec
|
|
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 或删除配置。
|
|
120
120
|
|
|
121
121
|
经批准 reload/restart 后:
|
|
122
122
|
|
|
@@ -218,6 +218,8 @@ 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;不会自动换模型、移除图片或重试。这些诊断不能追溯补齐旧故障的证据。
|
|
222
|
+
|
|
221
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)。
|
|
222
224
|
|
|
223
225
|
## 设置与排障
|
|
@@ -303,14 +305,14 @@ Agent 从 `node scripts/agent.mjs describe --json`、`doctor --json`及`plan <ta
|
|
|
303
305
|
GitHub Releases 和 npm 分发同一原始已校验 tarball。固定版本并核验 Release SHA-256 或 npm `dist.integrity`;不重打包不可变 Release、不移动/复用 tag。
|
|
304
306
|
|
|
305
307
|
```sh
|
|
306
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.2-alpha.
|
|
307
|
-
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.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
|
|
308
310
|
sha256sum --check SHA256SUMS
|
|
309
311
|
```
|
|
310
312
|
|
|
311
313
|
```powershell
|
|
312
314
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
313
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.
|
|
315
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.2-alpha.17.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
314
316
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
315
317
|
```
|
|
316
318
|
|
package/deployment-baseline.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Image input compatibility
|
|
2
2
|
|
|
3
|
-
Target: official DSH / Windows Desktop `0.2.0-rc.2`. Plugin-only.
|
|
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
|
|
5
|
+
does not install or require the separate alpha.5 Core baseline.
|
|
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,15 +85,28 @@ 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
|
-
full verification and archive gates
|
|
107
|
+
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.
|
|
109
|
+
Local synthetic transport demonstrates
|
|
61
110
|
admission/ownership, not live endpoint acceptance or a particular Desktop's
|
|
62
111
|
loaded version. The original [investigation #236](https://github.com/cloga/dsh-github-copilot/issues/236)
|
|
63
112
|
retains the bounded observation and delivery evidence; old local registry
|
package/docs/npm-distribution.md
CHANGED
|
@@ -16,6 +16,21 @@ Versions align package, deployment baseline, both README URLs and annotated tag.
|
|
|
16
16
|
Channel is `alpha`, `beta`, `rc` or stable `latest`; never silently rename a
|
|
17
17
|
package, move/reuse tags, repack immutable assets or publish placeholders.
|
|
18
18
|
|
|
19
|
+
The rc.2 maintenance checkout also admits push CI on the exact
|
|
20
|
+
`maintenance/dsh-0.2.0-rc.2` branch. It retains the complete Windows/Linux
|
|
21
|
+
tagged-source and published-artifact rc.2 matrix, release-ready gate, original
|
|
22
|
+
archive recovery, shared release concurrency and OIDC-only dual publication.
|
|
23
|
+
The npm entry additionally checks the archive's exact rc.2 adapter and pi-ai
|
|
24
|
+
`0.87.1` baseline. Other maintenance branches, tags, PR events and forks are
|
|
25
|
+
not publication contexts. This does not modify the separate alpha.5 main line.
|
|
26
|
+
|
|
27
|
+
The isolated published-artifact fixture retains exact DSH rc.2 and plugin SDK
|
|
28
|
+
pins but permits Cordis loader patches in the official `~1.0.5` peer range.
|
|
29
|
+
Hard-pinning `1.0.5` conflicts with the now-published Cordis `4.0.5` family
|
|
30
|
+
requiring loader `~1.0.6`. The fixture still installs unchanged public artifacts
|
|
31
|
+
with strict peer validation; it does not override transitive dependencies,
|
|
32
|
+
change the plugin lockfile or qualify a different Core release.
|
|
33
|
+
|
|
19
34
|
## Trusted publishing
|
|
20
35
|
|
|
21
36
|
[npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) requires npm
|
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.17";
|
|
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.17",
|
|
586
586
|
releaseNotes: "CHANGELOG.md",
|
|
587
587
|
publishConfig: {
|
|
588
588
|
"access": "public",
|
|
@@ -13534,17 +13534,47 @@ function installAutoModelRouting(ctx, dependencies) {
|
|
|
13534
13534
|
}
|
|
13535
13535
|
//#endregion
|
|
13536
13536
|
//#region lib/types/image-input-admission.js
|
|
13537
|
+
const imageMime = /^image\/[a-z0-9!#$%&'*+.^_`|~-]+$/iu;
|
|
13538
|
+
function diagnosticMime(value) {
|
|
13539
|
+
return typeof value === "string" && value.length <= 128 && imageMime.test(value) ? value.toLowerCase() : "unavailable";
|
|
13540
|
+
}
|
|
13537
13541
|
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
13538
13542
|
function imageInputFailure(model, messages) {
|
|
13539
|
-
for (const message of messages) {
|
|
13543
|
+
for (const [messageIndex, message] of messages.entries()) {
|
|
13540
13544
|
if (typeof message !== "object" || message === null || !("content" in message) || !Array.isArray(message.content)) continue;
|
|
13541
13545
|
const content = message.content;
|
|
13542
|
-
for (const block of content) {
|
|
13546
|
+
for (const [blockIndex, block] of content.entries()) {
|
|
13543
13547
|
if (typeof block !== "object" || block === null || !("type" in block) || block.type !== "image") continue;
|
|
13544
|
-
|
|
13545
|
-
if (!("mimeType" in block) || typeof block.mimeType !== "string" || !/^image\/[a-z0-9!#$%&'*+.^_`|~-]+$/iu.test(block.mimeType)) return "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE";
|
|
13548
|
+
const mimeType = "mimeType" in block ? block.mimeType : void 0;
|
|
13546
13549
|
const allowed = model.evidence.visionMediaTypes;
|
|
13547
|
-
|
|
13550
|
+
let code;
|
|
13551
|
+
if (!model.input.includes("image")) code = "COPILOT_IMAGE_INPUT_UNSUPPORTED";
|
|
13552
|
+
else if (typeof mimeType !== "string" || !imageMime.test(mimeType)) code = "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE";
|
|
13553
|
+
else if (allowed !== void 0 && !allowed.includes(mimeType.toLowerCase())) code = "COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED";
|
|
13554
|
+
else continue;
|
|
13555
|
+
const role = "role" in message && typeof message.role === "string" && [
|
|
13556
|
+
"user",
|
|
13557
|
+
"assistant",
|
|
13558
|
+
"system",
|
|
13559
|
+
"tool",
|
|
13560
|
+
"toolResult"
|
|
13561
|
+
].includes(message.role) ? message.role : "unknown";
|
|
13562
|
+
const diagnostic = {
|
|
13563
|
+
model: model.id.length <= 200 && /^[a-z0-9][a-z0-9._:-]*$/iu.test(model.id) ? model.id : "unavailable",
|
|
13564
|
+
projectedMime: diagnosticMime(mimeType),
|
|
13565
|
+
allowedMimeTypes: allowed === void 0 ? null : allowed.slice(0, 8).map(diagnosticMime),
|
|
13566
|
+
allowedMimeTypeCount: allowed?.length ?? null,
|
|
13567
|
+
allowedMimeTypesTruncated: allowed !== void 0 && allowed.length > 8,
|
|
13568
|
+
messageIndex,
|
|
13569
|
+
blockIndex,
|
|
13570
|
+
role,
|
|
13571
|
+
pluginVersion: package_default.version
|
|
13572
|
+
};
|
|
13573
|
+
return {
|
|
13574
|
+
code,
|
|
13575
|
+
diagnostic,
|
|
13576
|
+
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)}`
|
|
13577
|
+
};
|
|
13548
13578
|
}
|
|
13549
13579
|
}
|
|
13550
13580
|
}
|
|
@@ -14034,7 +14064,7 @@ var PreviewAdapter = class extends PiAiAdapter {
|
|
|
14034
14064
|
if (signal.aborted) throw abortFailure(signal);
|
|
14035
14065
|
const imageFailure = imageInputFailure(lease.descriptor, context.messages);
|
|
14036
14066
|
if (imageFailure !== void 0) {
|
|
14037
|
-
requestFailure = new LlmError(imageFailure, "INVALID_REQUEST");
|
|
14067
|
+
requestFailure = new LlmError(imageFailure.message, "INVALID_REQUEST");
|
|
14038
14068
|
throw requestFailure;
|
|
14039
14069
|
}
|
|
14040
14070
|
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.4.2-alpha.
|
|
4
|
+
"version": "0.4.2-alpha.17",
|
|
5
5
|
"releaseNotes": "CHANGELOG.md",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|