dsh-github-copilot 0.4.0-alpha.69 → 0.4.0-alpha.70
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 +6 -0
- package/README.md +12 -7
- package/README.zh.md +12 -7
- package/deployment-baseline.json +1 -1
- package/docs/automatic-model-routing.md +5 -0
- package/docs/image-input-compatibility.md +93 -0
- package/lib/index.js +23 -3
- package/lib/types/image-input-admission.d.ts +5 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0-alpha.70 (prepared)
|
|
4
|
+
|
|
5
|
+
- Require image-capable Auto candidates for retained historical user/tool images after text-only continuations; honor native image offload markers (#236).
|
|
6
|
+
- Validate actual native-projected image MIME against explicit account format evidence before managed dispatch, with request-local diagnostics and no image rewriting, model switch or additional retry.
|
|
7
|
+
- Document why durable attachment formats and filenames cannot prove outgoing MIME, and retain the original service-side rejection as unverified rather than declaring Grok text-only.
|
|
8
|
+
|
|
3
9
|
## 0.4.0-alpha.69 (prepared)
|
|
4
10
|
|
|
5
11
|
- Add an explicit, opt-in manual compaction engine for compressible already-oversized managed Copilot histories. It uses a bounded public summary hook and native transactional replacement without changing the default compaction service. Include account-proof and failure boundaries in the recovery design.
|
package/README.md
CHANGED
|
@@ -11,6 +11,11 @@ A focused DSH companion for GitHub Copilot sign-in, account-aware model profiles
|
|
|
11
11
|
|
|
12
12
|
## Current experience
|
|
13
13
|
|
|
14
|
+
Auto checks historical user/tool image blocks as well as the latest message.
|
|
15
|
+
Managed requests reject an explicitly incompatible projected image MIME before
|
|
16
|
+
network dispatch; omitted account MIME lists remain unverified, not guessed.
|
|
17
|
+
Core still owns image conversion and history. See [image compatibility limits](./docs/image-input-compatibility.md).
|
|
18
|
+
|
|
14
19
|
- **Account and models:** sign in, inspect account-discovered models, refresh metadata, and manage the account from the native GitHub Copilot row under **Settings → Models**. **Manage → Model preferences** can exclude exact models from both the managed picker and Auto without changing Core's flat picker.
|
|
15
20
|
- **Search routing:** choose the primary and fallback search providers under **Plugins → dsh-github-copilot → Details**. The page intentionally exposes only those user-facing choices; protocol probes, timeouts, allowlists, and transport switches are not presented as routine UI. It also keeps the rc.2 lifecycle warning visible before disable/remove/upgrade actions. If the updated routed service is not active yet, the card reports **Restart required** instead of presenting a broken form.
|
|
16
21
|
- **Usage:** eligible Copilot sessions get an optional **Credits** control beside the composer, with provider-reported billing-cycle data and explicit unavailable/stale states. The quota request alone combines Node default and OS trust roots without disabling certificate verification or relying on Desktop launcher environment inheritance.
|
|
@@ -98,7 +103,7 @@ The Host reads GitHub's internal quota endpoint using the existing canonical OAu
|
|
|
98
103
|
|
|
99
104
|
## Install and sign in
|
|
100
105
|
|
|
101
|
-
The commands below target the package version `0.4.0-alpha.
|
|
106
|
+
The commands below target the package version `0.4.0-alpha.70`. Versioned URLs describe the intended release artifacts, not proof that publication or local activation has completed; use them only once that Release and its checksums are available. Install into the profile you use (replace `web` when targeting another profile):
|
|
102
107
|
|
|
103
108
|
Before installing/updating, unpack the **checksum-verified** archive into a temporary directory and run its read-only composition preflight (replace all paths with absolute paths for the intended profile):
|
|
104
109
|
|
|
@@ -111,10 +116,10 @@ Include any launcher patch files with repeated `--patch /absolute/file` argument
|
|
|
111
116
|
For a standalone named profile only, the supported CLI command is:
|
|
112
117
|
|
|
113
118
|
```sh
|
|
114
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
119
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.70/dsh-github-copilot-0.4.0-alpha.70.tgz
|
|
115
120
|
```
|
|
116
121
|
|
|
117
|
-
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.
|
|
122
|
+
For Desktop profiles, use Desktop's native package manager with `dsh-github-copilot@0.4.0-alpha.70` after the same preflight and only when registry access is permitted. Desktop reserves its `desktop` profile from CLI management. If registry access is blocked or unavailable, stop; the documented [controlled offline CLI procedure](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles) is not a Desktop workaround.
|
|
118
123
|
|
|
119
124
|
Then open the Models UI listed above, find **GitHub Copilot**, select **Sign in**, and complete the GitHub device-code flow. Plugin installation changes the selected profile; activation follows that profile's normal reload/restart policy.
|
|
120
125
|
|
|
@@ -165,7 +170,7 @@ Agents should treat the browser authorization as a human handoff, not as a token
|
|
|
165
170
|
5. Confirm **Signed in** and inspect the automatic discovery result before asking the user to choose a model. Already-signed-in Models opening ensures missing/stale metadata automatically; fresh ready cache makes no request. Use visible **Retry** for errors or **Manage → Refresh models** for an intentional forced update, not routine setup. Status alone does not discover, and login, metadata and successful model calls remain separate evidence.
|
|
166
171
|
6. Use **Sign out** only when the user explicitly asks to disconnect the account. It deletes the Copilot credential record but preserves route settings.
|
|
167
172
|
|
|
168
|
-
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.
|
|
173
|
+
GitHub Releases and npm are the default distribution channels for each new version, using the same verified tarball. Pin the version and verify the evidence for the channel used: Release `SHA256SUMS`, and npm `dist.integrity` when installing from npm. Install into Desktop profiles only through Desktop's native package manager; the reserved `desktop` profile is not managed by the DSH CLI. After npm publication is verified, the native manager accepts `dsh-github-copilot@0.4.0-alpha.70`, not a URL or file. Controlled offline CLI maintenance is documented for standalone named profiles only, never Desktop-managed profiles. Follow the mandatory search-composition preflight, backup, single-writer and post-install checks; do not bypass a corporate registry ban, disable TLS verification or restart without separate approval. See [distribution and publication requirements](./docs/npm-distribution.md).
|
|
169
174
|
|
|
170
175
|
**Desktop package-update and Web-lifecycle boundaries:** the native manager's `restart-required` result for an in-place installed-package upgrade is authoritative and distinct from plugin-bundle removal/re-add behavior. Any disable, removal, or upgrade involving service recomposition (`cordis.patch.yml`, such as the isolated routed web search layer) may leave dependent entries pending until Desktop is fully exited and cold-restarted. If the native manager reports only entries such as `pending (waiting for service: web)` while this plugin already shows **Off**, the requested disabled state has been persisted; cold-restart Desktop instead of repeatedly toggling or reinstalling the plugin. Other errors are not covered by this guidance and must still be investigated.
|
|
171
176
|
|
|
@@ -440,8 +445,8 @@ Report the published Release URL, version, tag/commit and verified asset SHA-256
|
|
|
440
445
|
`package.json` declares public npm distribution. A release tag must equal `v${package.json.version}`. Versions use standard SemVer prerelease labels (`alpha`, `beta`, or `rc`), each with its matching npm dist-tag; only stable versions use `latest`. The Release workflow performs the frozen install and complete verification gate, packs once (or recovers the original archive on retry), verifies `SHA256SUMS`, publishes the immutable GitHub Release and then publishes those same bytes to npm through OIDC. Either channel failing means delivery is incomplete. First package creation needs an authorized maintainer; staging requires an existing package and is not a first-package bootstrap. Historical releases are not republished.
|
|
441
446
|
|
|
442
447
|
```sh
|
|
443
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
444
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
448
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.70/dsh-github-copilot-0.4.0-alpha.70.tgz
|
|
449
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.70/SHA256SUMS
|
|
445
450
|
sha256sum --check SHA256SUMS
|
|
446
451
|
```
|
|
447
452
|
|
|
@@ -449,7 +454,7 @@ PowerShell can verify the same two downloaded files with:
|
|
|
449
454
|
|
|
450
455
|
```powershell
|
|
451
456
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
452
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
457
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.70.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
453
458
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
454
459
|
```
|
|
455
460
|
|
package/README.zh.md
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
## 当前体验
|
|
13
13
|
|
|
14
|
+
Auto 会检查历史用户消息和工具结果中的图片块,不再只看最新一句话。
|
|
15
|
+
托管请求在原生图片转换后检查实际 MIME;若与账号明确公布的格式不兼容,
|
|
16
|
+
会在发送前报告具体错误。账号未公布的格式不作猜测,图片转换和历史仍由
|
|
17
|
+
Core 管理。详见[图片兼容性与限制](./docs/image-input-compatibility.md)。
|
|
18
|
+
|
|
14
19
|
- **账号与模型:**在 **设置 → 模型** 的原生 GitHub Copilot 行内完成登录、查看账号发现模型、刷新元数据及账号管理。可在 **Manage → Model preferences** 中按精确 ID 排除模型,使其同时退出托管 picker 与 Auto 候选池;Core 原生 picker 仍保持平铺。
|
|
15
20
|
- **搜索路由:**在 **插件 → dsh-github-copilot → 详情**选择主搜索 Provider 与兜底 Provider。页面只保留用户真正需要的两项选择,不再把协议探测、超时、白名单或传输开关作为日常配置暴露;同时会在停用/移除/升级前常驻显示 rc.2 生命周期提示。更新后的路由服务尚未激活时,卡片会明确显示 **需要重启生效(Restart required)**,而不是继续展示无法使用的表单。
|
|
16
21
|
- **用量:**符合条件的 Copilot 会话会在输入框旁显示可选的 **Credits / 额度** 控件,展示供应方明确返回的计费周期数据,并如实区分不可用与历史快照。仅额度请求组合 Node 默认证书与系统信任根,无需依赖 Desktop launcher 的环境变量继承,且保持 TLS 验签。
|
|
@@ -20,7 +25,7 @@
|
|
|
20
25
|
|
|
21
26
|
截图来自当前构建 Client 的隔离浏览器 fixture,使用合成 Provider。它只证明已发布配置界面的形态,不证明真实凭据、账号权限、搜索成功或当前 Desktop 已加载。
|
|
22
27
|
|
|
23
|
-
> 当前文档与安装命令对应版本 `0.4.0-alpha.
|
|
28
|
+
> 当前文档与安装命令对应版本 `0.4.0-alpha.70`。源码、发布制品、已安装版本和实际加载运行时需分别确认;本地升级和中断会话的重启仍需用户批准。
|
|
24
29
|
|
|
25
30
|
Web search 路由现在优先显示在插件详情页;宿主不支持详情页插槽时才回退到 **设置 → 模型**或独立 Web search section。搜索子 Fiber 仍独立等待 Remote,不影响账号控件和既有搜索安全检查。
|
|
26
31
|
|
|
@@ -113,10 +118,10 @@ node package/scripts/check-search-composition.mjs --profile-dir /absolute/profil
|
|
|
113
118
|
仅对独立的具名 profile,获准且网络可用时,可通过受支持的 CLI 命令安装:
|
|
114
119
|
|
|
115
120
|
```sh
|
|
116
|
-
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
121
|
+
dsh plugin --profile web add https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.70/dsh-github-copilot-0.4.0-alpha.70.tgz
|
|
117
122
|
```
|
|
118
123
|
|
|
119
|
-
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.
|
|
124
|
+
Desktop profile 请在完成同样的预检后,使用 Desktop 原生包管理器安装 `dsh-github-copilot@0.4.0-alpha.70`。Desktop 保留 `desktop` profile,CLI 不负责管理。若 registry 被公司封禁或不可用,不要更换网络绕行或使用离线 CLI;请停止。[受控离线 CLI 流程](./docs/npm-distribution.md#controlled-offline-cli-maintenance-for-standalone-profiles)仅适用于独立具名 profile,不适用于 Desktop。
|
|
120
125
|
|
|
121
126
|
随后打开上表对应的 Models UI,找到 **GitHub Copilot**,点击 **Sign in** 并完成 GitHub device-code 流程。安装会修改指定 profile;是否立即激活取决于该 profile 的常规 reload/restart 策略。
|
|
122
127
|
|
|
@@ -167,7 +172,7 @@ Agent 应把浏览器授权视为需要用户完成的 handoff,而不是自行
|
|
|
167
172
|
5. 确认 **Signed in** 并检查自动发现结果,再请用户选择模型。已登录时打开 Models 会自动确保缺失/过期元数据,新鲜 ready 缓存不发请求。错误可使用 **Retry**,有意强制更新时使用 **Manage → Refresh models**,不作为常规设置步骤。状态读取本身不发现;登录、元数据与真实调用成功是独立证据。
|
|
168
173
|
6. 只有用户明确要求断开账号时才使用 **Sign out**;它会删除 Copilot credential record,但保留 route settings。
|
|
169
174
|
|
|
170
|
-
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.
|
|
175
|
+
每个新版本默认同时分发到 GitHub Releases 和 npm,两个渠道使用同一份已验证 tarball。应固定版本并核对所用渠道的证据:Release 的 `SHA256SUMS`;从 npm 安装时另核对 `dist.integrity`。Desktop profile 只能通过原生 Desktop 包管理器安装;获准且 registry 可用时输入 `dsh-github-copilot@0.4.0-alpha.70`,不是 URL 或本地文件。Desktop 保留 `desktop` profile,不能通过 DSH CLI 管理。受控离线 CLI 维护仅适用于独立具名 profile,不得作为 Desktop 安装绕行方案。[双渠道发布与 OIDC 要求](./docs/npm-distribution.md)保持不变。
|
|
171
176
|
|
|
172
177
|
**Desktop package 更新与 Web 生命周期边界:**原生 manager 对已安装 package 原位升级返回的 `restart-required` 是权威结果,与移除/重加 plugin bundle 的行为是两个不同问题。涉及服务重编排补丁(`cordis.patch.yml`,如本插件所采用的隔离路由 Web 搜索层)的停用、移除或升级,可能让依赖条目保持 pending,直到完全退出并冷重启 Desktop。若原生 manager 只报告类似 `pending (waiting for service: web)` 的条目,同时本插件已经显示 **Off**,说明请求的停用状态已经落盘;请冷重启 Desktop,不要反复切换或重装插件。其它错误不属于此提示范围,仍需单独排查。
|
|
173
178
|
|
|
@@ -451,8 +456,8 @@ node scripts/agent.mjs attribution "DeepSeek Harness (DSH)"
|
|
|
451
456
|
`package.json` 声明公开 npm 分发。Release tag 必须严格等于 `v${package.json.version}`。预发布使用 `alpha`、`beta` 或 `rc` 及对应 npm dist-tag,只有稳定版使用 `latest`。Release workflow 执行 frozen install 和完整门禁,只打包一次(重试恢复原始归档),验证 `SHA256SUMS`,发布不可变 GitHub Release,再通过 OIDC 将同一份字节发布到 npm。任一渠道失败都表示交付未完成。首次建包须由获准环境中的维护者完成;staging 要求包已存在,不能代替首次建包。不会批量补发历史版本。
|
|
452
457
|
|
|
453
458
|
```sh
|
|
454
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
455
|
-
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.
|
|
459
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.70/dsh-github-copilot-0.4.0-alpha.70.tgz
|
|
460
|
+
curl -LO https://github.com/cloga/dsh-github-copilot/releases/download/v0.4.0-alpha.70/SHA256SUMS
|
|
456
461
|
sha256sum --check SHA256SUMS
|
|
457
462
|
```
|
|
458
463
|
|
|
@@ -460,7 +465,7 @@ PowerShell 可以对已下载的同一组文件执行:
|
|
|
460
465
|
|
|
461
466
|
```powershell
|
|
462
467
|
$expected = (Get-Content .\SHA256SUMS).Split()[0]
|
|
463
|
-
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.
|
|
468
|
+
$actual = (Get-FileHash .\dsh-github-copilot-0.4.0-alpha.70.tgz -Algorithm SHA256).Hash.ToLowerInvariant()
|
|
464
469
|
if ($actual -cne $expected) { throw 'Release checksum mismatch' }
|
|
465
470
|
```
|
|
466
471
|
|
package/deployment-baseline.json
CHANGED
|
@@ -24,6 +24,11 @@ A Goal does not become one indefinitely frozen Auto decision. Each automatic con
|
|
|
24
24
|
|
|
25
25
|
## Routing policy and input fit
|
|
26
26
|
|
|
27
|
+
Image capability requirements cover all entered message content, including historical
|
|
28
|
+
user and tool images, not only the latest user text. Actual projected MIME admission
|
|
29
|
+
uses explicit account format evidence after native conversion; filenames and durable
|
|
30
|
+
MIME are not wire-format proof. See [image compatibility and limits](./image-input-compatibility.md).
|
|
31
|
+
|
|
27
32
|
The account `/models` catalog is authoritative for entitlement and hard capabilities: protocol, context and output limits, image input, tool support, reasoning efforts, and server policy. Unknown or incomplete capability metadata fails closed.
|
|
28
33
|
|
|
29
34
|
The catalog does not provide trustworthy quality, latency, price, or global-health rankings. The routing policy therefore does **not** infer model quality from a marketing name, model-ID prefix, provider order, or token price. It does not claim to reproduce GitHub's private Auto algorithm.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Image input compatibility investigation and implementation
|
|
2
|
+
|
|
3
|
+
Tracking: [#236](https://github.com/cloga/dsh-github-copilot/issues/236).
|
|
4
|
+
Baseline: official DSH / Windows Desktop 0.2.0-rc.2. Plugin-only.
|
|
5
|
+
|
|
6
|
+
## Evidence and limits
|
|
7
|
+
|
|
8
|
+
A failed Auto continuation selected a vision-capable model and received an
|
|
9
|
+
image-media-type validation error. Read-only local inspection found historical
|
|
10
|
+
`read_image` tool results, including genuine WebP attachments whose display
|
|
11
|
+
names ended in `.png`. No conversation bodies, attachment bytes, account data or
|
|
12
|
+
opaque replay references are included here.
|
|
13
|
+
|
|
14
|
+
This does not establish that the model lacks vision, that WebP is universally
|
|
15
|
+
unsupported, or that the historical attachment's encoding was sent unchanged.
|
|
16
|
+
[AWS's Grok 4.7 model card](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-xai-grok-4-7.html)
|
|
17
|
+
documents image input, but is not evidence of GitHub Copilot endpoint format
|
|
18
|
+
acceptance. Do not exclude a model by name to conceal this error.
|
|
19
|
+
|
|
20
|
+
Two distinct gaps were identified:
|
|
21
|
+
|
|
22
|
+
1. Auto classified image requirements from only the latest user message.
|
|
23
|
+
Historical user and tool image blocks were missed after a text-only continuation.
|
|
24
|
+
2. Account discovery retains `visionMediaTypes`, but dispatch did not check
|
|
25
|
+
the native projected image MIME against that explicit account evidence.
|
|
26
|
+
|
|
27
|
+
Official rc.2 `llm-pi-ai/src/context.ts` prepares request images through the public
|
|
28
|
+
attachment service before provider dispatch. `attachment-local/src/request-image.ts`
|
|
29
|
+
can re-encode them. Source filename, durable attachment MIME, and projected
|
|
30
|
+
request MIME are therefore different evidence layers.
|
|
31
|
+
|
|
32
|
+
## Implementation plan and delivered code
|
|
33
|
+
|
|
34
|
+
1. Add regressions for historical user/tool images followed by text-only
|
|
35
|
+
continuation, all three Auto preferences, and no eligible vision model.
|
|
36
|
+
2. Scan typed content blocks in all messages supplied to Auto by the existing
|
|
37
|
+
pre-step hook. Keep latest-user text complexity, account eligibility and
|
|
38
|
+
turn-frozen selection. Do not recursively interpret tool arguments, file
|
|
39
|
+
names or textual offload placeholders as image blocks. Honor Core's explicit
|
|
40
|
+
`offloaded: true` marker, which projects the image to text rather than bytes.
|
|
41
|
+
3. At the existing account-bound `inspectRequest` hook, validate the native
|
|
42
|
+
transcript's actual image `mimeType` after Core projection and before wire.
|
|
43
|
+
Restore failures as request-local `INVALID_REQUEST` errors:
|
|
44
|
+
`COPILOT_IMAGE_INPUT_UNSUPPORTED`, `COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE`,
|
|
45
|
+
or `COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED`.
|
|
46
|
+
4. Honor explicit account MIME restrictions. If the account omits its MIME list,
|
|
47
|
+
preserve existing vision behavior; absence is neither proof of universal
|
|
48
|
+
format support nor permission to invent an allowlist.
|
|
49
|
+
5. Cover a synthetic native projection that changes durable WebP into PNG:
|
|
50
|
+
advertised PNG is admitted; JPEG-only evidence rejects before model fetch.
|
|
51
|
+
Keep original attachments unchanged.
|
|
52
|
+
|
|
53
|
+
These changes apply to historical image eligibility at the next Auto decision
|
|
54
|
+
and actual projected MIME admission for both fixed and Auto managed requests.
|
|
55
|
+
They do not introduce image conversion, history repair, model-name rules,
|
|
56
|
+
same-turn reselection, fallback wires, retry loops, or Core patches.
|
|
57
|
+
|
|
58
|
+
## Deferred capability and acceptance
|
|
59
|
+
|
|
60
|
+
Do not implement Auto MIME filtering from durable attachments: that can reject
|
|
61
|
+
a model even when native projection produces a format it accepts. Exact-format
|
|
62
|
+
candidate selection or conversion requires a public, candidate-specific
|
|
63
|
+
projection contract and its own tests. The current fix diagnoses explicit
|
|
64
|
+
incompatibility; it does not rescue every image request.
|
|
65
|
+
|
|
66
|
+
The original service-side 400 is not proven fixed. Confirm its account-advertised
|
|
67
|
+
limits and exact outgoing MIME without recording image bytes or credentials
|
|
68
|
+
before attributing its root cause. If advertised compatibility and actual bytes
|
|
69
|
+
agree but the endpoint rejects them, preserve the native error rather than
|
|
70
|
+
fabricating a capability correction.
|
|
71
|
+
|
|
72
|
+
## Validation status
|
|
73
|
+
|
|
74
|
+
- A pre-fix Node regression reproduced `requiresImage: false` for a historical
|
|
75
|
+
tool image followed by a text-only continuation.
|
|
76
|
+
- Focused Auto/admission tests: 23 passed with pinned Vitest 3.2.7 and isolated
|
|
77
|
+
unchanged rc.2 public message helper source. This is supplemental evidence,
|
|
78
|
+
not the complete native integration/full gate.
|
|
79
|
+
- Strict targeted TypeScript check passed:
|
|
80
|
+
`node node_modules\typescript\bin\tsc --noEmit --strict --skipLibCheck --target es2023 --module nodenext --moduleResolution nodenext --allowImportingTsExtensions src\auto-model-routing.ts src\image-input-admission.ts`.
|
|
81
|
+
- `pnpm install --frozen-lockfile --ignore-scripts --fetch-retries=0 --fetch-timeout=20000`
|
|
82
|
+
failed: the configured enterprise registry returned HTTP 404 for
|
|
83
|
+
`@deepseek-ai/dsh-util-crypto@0.2.0-rc.2`. Full local validation is blocked.
|
|
84
|
+
- [CI run 36966798814](https://github.com/cloga/dsh-github-copilot/actions/runs/36966798814)
|
|
85
|
+
passed on Windows and Linux using unchanged official rc.2 dependencies:
|
|
86
|
+
the published-adapter fixture, tagged-source native runtime, full `pnpm verify`,
|
|
87
|
+
`pnpm pack --pack-destination artifacts`, and exact tarball verification.
|
|
88
|
+
The full gate includes 1990 passing Vitest tests (2 expected skips) and
|
|
89
|
+
310 passing tooling tests. Native MIME admission preserves Core's streamed
|
|
90
|
+
`finish(error)` contract and sends zero model requests for the mismatch case.
|
|
91
|
+
- This authorized CI path mitigates the local registry blocker without changing
|
|
92
|
+
dependencies or bypassing local registry policy. Publication and live
|
|
93
|
+
acceptance remain separate; no installed or published fix is claimed here.
|
package/lib/index.js
CHANGED
|
@@ -1648,7 +1648,7 @@ let GitHubCopilotUsageController = (() => {
|
|
|
1648
1648
|
//#endregion
|
|
1649
1649
|
//#region package.json
|
|
1650
1650
|
var name$1 = "dsh-github-copilot";
|
|
1651
|
-
var version = "0.4.0-alpha.
|
|
1651
|
+
var version = "0.4.0-alpha.70";
|
|
1652
1652
|
//#endregion
|
|
1653
1653
|
//#region lib/types/probe.js
|
|
1654
1654
|
/**
|
|
@@ -6416,11 +6416,10 @@ function latestUserContent(messages) {
|
|
|
6416
6416
|
}
|
|
6417
6417
|
function classifyAutoModelTurn(messages) {
|
|
6418
6418
|
let text = "";
|
|
6419
|
-
|
|
6419
|
+
const requiresImage = messages.some((message) => record$1(message) && Array.isArray(message.content) && message.content.some((block) => record$1(block) && block.type === "image" && block.offloaded !== true));
|
|
6420
6420
|
for (const block of latestUserContent(messages)) {
|
|
6421
6421
|
if (!record$1(block)) continue;
|
|
6422
6422
|
if (block.type === "text" && typeof block.text === "string") text += `${block.text}\n`;
|
|
6423
|
-
if (block.type === "image") requiresImage = true;
|
|
6424
6423
|
}
|
|
6425
6424
|
const codeFenceCount = text.match(/```/gu)?.length ?? 0;
|
|
6426
6425
|
const textLength = text.trim().length;
|
|
@@ -7097,6 +7096,22 @@ function installAutoModelRouting(ctx, dependencies) {
|
|
|
7097
7096
|
};
|
|
7098
7097
|
}
|
|
7099
7098
|
//#endregion
|
|
7099
|
+
//#region lib/types/image-input-admission.js
|
|
7100
|
+
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
7101
|
+
function imageInputFailure(model, messages) {
|
|
7102
|
+
for (const message of messages) {
|
|
7103
|
+
if (typeof message !== "object" || message === null || !("content" in message) || !Array.isArray(message.content)) continue;
|
|
7104
|
+
const content = message.content;
|
|
7105
|
+
for (const block of content) {
|
|
7106
|
+
if (typeof block !== "object" || block === null || !("type" in block) || block.type !== "image") continue;
|
|
7107
|
+
if (!model.input.includes("image")) return "COPILOT_IMAGE_INPUT_UNSUPPORTED";
|
|
7108
|
+
if (!("mimeType" in block) || typeof block.mimeType !== "string" || !/^image\/[a-z0-9!#$%&'*+.^_`|~-]+$/iu.test(block.mimeType)) return "COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE";
|
|
7109
|
+
const allowed = model.evidence.visionMediaTypes;
|
|
7110
|
+
if (allowed !== void 0 && !allowed.includes(block.mimeType.toLowerCase())) return "COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED";
|
|
7111
|
+
}
|
|
7112
|
+
}
|
|
7113
|
+
}
|
|
7114
|
+
//#endregion
|
|
7100
7115
|
//#region lib/types/preview-route.js
|
|
7101
7116
|
function failure(code, category = "AUTH") {
|
|
7102
7117
|
return new LlmError(code, category);
|
|
@@ -7492,6 +7507,11 @@ var PreviewAdapter = class extends PiAiAdapter {
|
|
|
7492
7507
|
let wireAbort;
|
|
7493
7508
|
const inspectRequest = (_model, context, nativeOptions) => {
|
|
7494
7509
|
if (signal.aborted) throw abortFailure(signal);
|
|
7510
|
+
const imageFailure = imageInputFailure(lease.descriptor, context.messages);
|
|
7511
|
+
if (imageFailure !== void 0) {
|
|
7512
|
+
requestFailure = new LlmError(imageFailure, "INVALID_REQUEST");
|
|
7513
|
+
throw requestFailure;
|
|
7514
|
+
}
|
|
7495
7515
|
const calculated = calculateRequestBudget(lease.descriptor, nativeOptions?.maxTokens, policy);
|
|
7496
7516
|
if (!calculated.ok) {
|
|
7497
7517
|
requestFailure = budgetFailure(calculated);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AccountModelDescriptor } from './account-model-catalog.ts';
|
|
2
|
+
export type ImageInputFailure = 'COPILOT_IMAGE_INPUT_UNSUPPORTED' | 'COPILOT_IMAGE_MEDIA_TYPE_UNAVAILABLE' | 'COPILOT_IMAGE_MEDIA_TYPE_UNSUPPORTED';
|
|
3
|
+
/** Inspect native projected images, never infer wire formats from durable filenames. */
|
|
4
|
+
export declare function imageInputFailure(model: AccountModelDescriptor, messages: readonly unknown[]): ImageInputFailure | undefined;
|
|
5
|
+
//# 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.0-alpha.
|
|
4
|
+
"version": "0.4.0-alpha.70",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"docs/manual-compaction-recovery.md",
|
|
67
67
|
"docs/copilot-usage.md",
|
|
68
68
|
"docs/automatic-model-routing.md",
|
|
69
|
+
"docs/image-input-compatibility.md",
|
|
69
70
|
"output/auto-model-mockup/index.html",
|
|
70
71
|
"docs/images/dual-model-provenance.json",
|
|
71
72
|
"scripts/check-search-composition.mjs",
|