dsh-grok-provider 0.1.3 → 0.1.5
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 +19 -0
- package/CONTRIBUTING.md +5 -4
- package/README.en.md +23 -16
- package/README.md +23 -16
- package/SECURITY.md +3 -3
- package/dist/client/client.js +3 -2
- package/dist/host/index.mjs +5 -36
- package/dist/internal/account-dashboard.mjs +27 -1
- package/dist/internal/grok-adapter.mjs +81 -38
- package/dist/internal/llm-error.mjs +61 -0
- package/dist/internal/model-catalog.mjs +14 -1
- package/dist/internal/provider-runtime.mjs +53 -11
- package/dist/internal/responses-request-compiler.mjs +682 -0
- package/dist/internal/responses-request.mjs +365 -51
- package/docs/01-product-requirements.md +12 -1
- package/docs/03-security-threat-model.md +25 -21
- package/docs/04-harness-contract.md +9 -2
- package/docs/05-test-plan.md +15 -5
- package/docs/06-release-plan.md +20 -16
- package/docs/07-decision-gate.md +5 -1
- package/docs/09-implementation-status.md +37 -7
- package/docs/10-release-checklist.md +38 -5
- package/docs/11-capability-roadmap.md +125 -0
- package/docs/12-upstream-image-input-evidence.md +94 -0
- package/docs/README.md +12 -5
- package/docs/adr/0002-v0.1-scope.md +4 -4
- package/docs/adr/0006-account-dashboard.md +7 -5
- package/docs/adr/0008-image-input-request-compiler.md +107 -0
- package/docs/releases/v0.1.4.md +89 -0
- package/docs/releases/v0.1.5.md +53 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5 - 2026-08-28
|
|
4
|
+
|
|
5
|
+
- Bind Trusted Publisher runs to the exact stable tag ref and peeled commit, require one non-draft/non-prerelease GitHub Release asset with the exact package filename, and pin the publishing runtime to Node.js `24.19.0`.
|
|
6
|
+
- Project model input modalities into the account dashboard so exact `grok-4.6` visibly advertises image input while text-only models do not.
|
|
7
|
+
- Make provider installation transactional: partial authentication and adapter registrations are rolled back when a later installation step fails, while successful disposal remains idempotent and best-effort.
|
|
8
|
+
- Correct release-state and streaming-deadline documentation without changing authentication, endpoints, image compilation, or Responses wire behavior.
|
|
9
|
+
- Keep Web/X Search, image generation, URL downloads, API-key mode, and new SSE event handling outside this maintenance release.
|
|
10
|
+
|
|
11
|
+
## 0.1.4 - 2026-08-28
|
|
12
|
+
|
|
13
|
+
- Add an asynchronous Responses request compiler for bounded jpeg/png image input from the optional Harness attachment store.
|
|
14
|
+
- Preserve the exact `0.1.3` text request path when no image is present; compile ordered user and tool-result image content only before transport starts.
|
|
15
|
+
- Advertise image input only for exact `grok-4.6`; `grok-4.5` and all other models remain text-only.
|
|
16
|
+
- Enforce per-image bytes, pixels, dimensions, image count, aggregate derived bytes, a 20,000-block image-compilation budget, one-level tool-result nesting, MIME magic, cancellation, and a final 16 MiB JSON limit with deterministic oldest-first offloading.
|
|
17
|
+
- Keep `prompt_cache_key`, Web/X Search, image generation, URL downloads, new SSE events, authentication, and endpoint changes out of this release.
|
|
18
|
+
- Verify exact `grok-4.6` against the fixed CLI Chat Proxy with red and blue fixtures in both user-image and tool-result-image positions; all four streams returned HTTP 200 SSE completion and passed the normalized whole-response color assertion.
|
|
19
|
+
- Fail closed on `grok-4.5` image input after its controlled red-fixture Proxy response proved semantically unreliable; keep `grok-4.5` and every other model text-only.
|
|
20
|
+
- Fix image requests to `detail:"high"` following the official xAI Responses image example; retain real Harness `0.1.1-rc.2` attachment-local/LlmRuntime isolation as a final candidate revalidation gate.
|
|
21
|
+
|
|
3
22
|
## 0.1.3 - 2026-08-27
|
|
4
23
|
|
|
5
24
|
- Fix existing Harness conversations failing immediately after switching from Ark to Grok when an earlier tool-call ID contains Ark's `|` delimiter.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
## 变更流程
|
|
18
18
|
|
|
19
|
-
1. 阅读 [`docs/README.md`](docs/README.md) 和与改动相关的 ADR。
|
|
20
|
-
2.
|
|
21
|
-
3. 认证、凭据、固定 endpoint、模型协议或发布边界变化时,先更新 ADR
|
|
19
|
+
1. 阅读 [`docs/README.md`](docs/README.md)、[能力路线图](docs/11-capability-roadmap.md) 和与改动相关的 ADR。
|
|
20
|
+
2. 先写或更新测试,保持变更范围单一。内容类型必须落在当前版本切片内,不得把搜索或生图并进图片输入版本。
|
|
21
|
+
3. 认证、凭据、固定 endpoint、模型协议或发布边界变化时,先更新 ADR、威胁模型和测试计划。公开协议可以驱动隔离原型,但新内容类型在对外声明、合并发布基线或制作候选包前必须完成固定 CLI Chat Proxy 的脱敏 spike。
|
|
22
22
|
4. 同步维护 `README.md` 与 `README.en.md` 的用户可见信息。
|
|
23
23
|
5. 运行验证:
|
|
24
24
|
|
|
@@ -42,6 +42,7 @@ npm run pack:check
|
|
|
42
42
|
|
|
43
43
|
## 设计原则
|
|
44
44
|
|
|
45
|
+
- 内容类型按 [`docs/11-capability-roadmap.md`](docs/11-capability-roadmap.md) 分版本引入,不把未排期能力混进当前切片。
|
|
45
46
|
- 模型能力来自动态目录,不通过隐藏未知模型制造“全部支持”的假象。
|
|
46
47
|
- Renderer、RPC 与错误信息不接触凭据或身份数据。
|
|
47
48
|
- 只允许固定官方网络目标,拒绝用户配置任意 base URL 和认证重定向。
|
|
@@ -50,4 +51,4 @@ npm run pack:check
|
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
53
|
-
English summary: include exact versions, a minimal reproduction, and redacted diagnostics in bug reports. Never post credentials or personal data. Keep PRs focused, add tests first, update design/security documents for boundary changes, keep both READMEs synchronized, and run `npm test` plus `npm run pack:check` before submission.
|
|
54
|
+
English summary: include exact versions, a minimal reproduction, and redacted diagnostics in bug reports. Never post credentials or personal data. Keep PRs focused, add tests first, follow the capability roadmap so content-type slices stay on their assigned versions, update design/security documents for boundary changes, keep both READMEs synchronized, and run `npm test` plus `npm run pack:check` before submission.
|
package/README.en.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Use an already authenticated official Grok Build account from DeepSeek Harness, with dynamic model discovery, streaming reasoning, tool calls, and an account quota/model capability dashboard.
|
|
6
6
|
|
|
7
|
-
> Unofficial community project; not affiliated with xAI or DeepSeek Harness. The current
|
|
7
|
+
> Unofficial community project; not affiliated with xAI or DeepSeek Harness. The current source version is `0.1.5`; the published stable version is whatever the npm Registry currently assigns to `latest`. The project no longer publishes prereleases; stable defects are fixed in a new incremented stable version.
|
|
8
8
|
|
|
9
9
|
## What it provides
|
|
10
10
|
|
|
@@ -14,6 +14,7 @@ Use an already authenticated official Grok Build account from DeepSeek Harness,
|
|
|
14
14
|
| Credentials | Reuses official CLI session state without creating a second token store |
|
|
15
15
|
| Models | Discovers every model visible to the account at runtime; no static model allowlist |
|
|
16
16
|
| Conversations | Streaming Responses text, reasoning, encrypted reasoning replay, usage, and finish reasons |
|
|
17
|
+
| Images | Only exact `grok-4.6` accepts bounded JPEG/PNG images from Harness attachments; `grok-4.5` and all other models remain text-only |
|
|
17
18
|
| Tools | Returns function calls to the Harness permission layer; the provider never executes tools |
|
|
18
19
|
| Account dashboard | Login status, weekly/monthly quota, reset time, dynamic model capabilities and reasoning efforts |
|
|
19
20
|
| Surfaces | Bilingual Web settings and a closed `/grok` TUI command set |
|
|
@@ -38,10 +39,10 @@ The official CLI opens a browser on first use. The provider supports only the of
|
|
|
38
39
|
|
|
39
40
|
### 2. Install the provider
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
After `0.1.5` is published, install that exact version from npm:
|
|
42
43
|
|
|
43
44
|
```sh
|
|
44
|
-
dsh plugin --profile web add dsh-grok-provider@0.1.
|
|
45
|
+
dsh plugin --profile web add dsh-grok-provider@0.1.5
|
|
45
46
|
dsh web
|
|
46
47
|
```
|
|
47
48
|
|
|
@@ -62,7 +63,7 @@ The Web settings page shows:
|
|
|
62
63
|
|
|
63
64
|
- login state and sign-in, cancel, and logout actions;
|
|
64
65
|
- used/remaining quota and the real billing-period reset time;
|
|
65
|
-
- account-visible models, context windows, reasoning efforts, streaming and tool capabilities.
|
|
66
|
+
- account-visible models, context windows, reasoning efforts, and image-input, streaming, and tool capabilities.
|
|
66
67
|
|
|
67
68
|
When protobuf-backed billing includes a complete weekly/monthly period but omits a zero-valued percentage, the page restores “0% used / 100% remaining.” Other incomplete responses remain unknown.
|
|
68
69
|
|
|
@@ -111,26 +112,28 @@ Uninstalling the provider does not remove the official Grok CLI or directly modi
|
|
|
111
112
|
|
|
112
113
|
## Sources and discovery
|
|
113
114
|
|
|
114
|
-
-
|
|
115
|
-
- GitHub release and integrity values: [v0.1.
|
|
115
|
+
- npm `0.1.5` page (available after publication): [dsh-grok-provider@0.1.5](https://www.npmjs.com/package/dsh-grok-provider/v/0.1.5)
|
|
116
|
+
- GitHub `0.1.5` release and integrity values (available after publication): [v0.1.5](https://github.com/yoshino-xiao7/dsh-grok-provider/releases/tag/v0.1.5)
|
|
116
117
|
- GitHub community discovery: the repository carries the DeepSeek Harness-recommended `dsh-plugin` and `dsh` topics
|
|
117
|
-
- YukiRyou managed source: [deepseek-yukiryou-plugin-catalog](https://github.com/yoshino-xiao7/deepseek-yukiryou-plugin-catalog),
|
|
118
|
+
- YukiRyou managed source: [deepseek-yukiryou-plugin-catalog](https://github.com/yoshino-xiao7/deepseek-yukiryou-plugin-catalog), still pinned to the real-device-accepted `dsh-grok-provider@0.1.0` and marking only `darwin-arm64`
|
|
118
119
|
|
|
119
|
-
Directory inclusion is not an endorsement by xAI or DeepSeek Harness.
|
|
120
|
+
Directory inclusion is not an endorsement by xAI or DeepSeek Harness. [Listing PR #3415](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/3415) has added the project to the public `awesome-dsh-plugin` `model` category. That directory is repository-level discovery and carries no exact npm-version or platform-acceptance claim.
|
|
120
121
|
|
|
121
122
|
## Compatibility and scope
|
|
122
123
|
|
|
123
|
-
| Item | `0.1.
|
|
124
|
+
| Item | `0.1.5` status |
|
|
124
125
|
| --- | --- |
|
|
125
126
|
| DeepSeek Harness | Exact support for `0.1.1-rc.2` |
|
|
126
127
|
| Node.js | `>=24.19.0` |
|
|
127
128
|
| macOS arm64 | Real-network and isolated Harness acceptance completed |
|
|
128
|
-
| Windows x64 | Code and Windows CI supported; no independent real-device acceptance
|
|
129
|
+
| Windows x64 | Code and Windows CI supported; the current `0.1.5` candidate adds no independent real-device acceptance |
|
|
129
130
|
| macOS x64 / Linux | Unsupported |
|
|
130
131
|
| Grok CLI | No full-version lock; official path, `login --oauth` capability, and production OIDC credential contract are enforced |
|
|
131
132
|
| Models | Every account catalog model whose backend has a strict codec in this release |
|
|
132
133
|
|
|
133
|
-
|
|
134
|
+
`0.1.5` preserves the `0.1.4` image boundary: image input is enabled only for exact `grok-4.6`, while `grok-4.5` and every other dynamically discovered model remain text-only. The account dashboard projects capability badges from that same catalog, so only image-capable models show “Image input.” Images must be verified JPEG/PNG projections from the Harness attachment service. Ordinary user content and images nested one level inside a tool result are supported, with `detail:"high"` fixed to the official xAI Responses image example; URLs, filesystem paths, file IDs, and caller-supplied data URLs are rejected.
|
|
135
|
+
|
|
136
|
+
Each projected image is limited to 4 MiB, 16,777,216 pixels, and 8192px per side. A request retains at most eight images and 8 MiB of projected image bytes. When a limit is exceeded, the globally oldest images are offloaded to Harness text placeholders; the final JSON remains capped at 16 MiB. Web/X Search, image generation, arbitrary downloads, API-key mode, multiple accounts, enterprise OIDC, ACP, and Headless agent wrapping remain out of scope; see the [capability roadmap](docs/11-capability-roadmap.md).
|
|
134
137
|
|
|
135
138
|
## How it works
|
|
136
139
|
|
|
@@ -147,7 +150,7 @@ dsh-grok-provider Host
|
|
|
147
150
|
xAI Grok Build
|
|
148
151
|
```
|
|
149
152
|
|
|
150
|
-
Model IDs come from the runtime catalog rather than a hardcoded list. If an account exposes a new backend that cannot be mapped safely, discovery fails closed instead of hiding the model and claiming complete support.
|
|
153
|
+
Model IDs come from the runtime catalog rather than a hardcoded list. Image modality is enabled only for exact model IDs backed by separate protocol and live evidence. If an account exposes a new backend that cannot be mapped safely, discovery fails closed instead of hiding the model and claiming complete support.
|
|
151
154
|
|
|
152
155
|
## Security and privacy
|
|
153
156
|
|
|
@@ -156,7 +159,7 @@ Model IDs come from the runtime catalog rather than a hardcoded list. If an acco
|
|
|
156
159
|
- The Host must perform a bounded read of the official `auth.json`, whose raw file may contain a refresh token. The parser does not use, cache, or persist that refresh token; it retains only validation metadata and a short-lived access-token lease.
|
|
157
160
|
- The provider does not implement a refresh grant. Near expiry it may invoke one bounded official `grok models`, then reread and revalidate the official credential file.
|
|
158
161
|
- Login subprocesses use fixed argv, a scrubbed environment, output limits, deadlines, cancellation, and no shell.
|
|
159
|
-
- Prompts
|
|
162
|
+
- Prompts, tool results, and image projections selected for a request are sent to the xAI Grok Build service; the provider itself does not log that content, source images, or projected bytes.
|
|
160
163
|
|
|
161
164
|
See the full [threat model](docs/03-security-threat-model.md). For vulnerabilities, read the [security policy](SECURITY.md) and never post tokens, `auth.json`, personal data, or full diagnostic logs in a public issue.
|
|
162
165
|
|
|
@@ -180,7 +183,7 @@ A protobuf-omitted zero is restored only with a complete typed period. In every
|
|
|
180
183
|
|
|
181
184
|
### An existing conversation fails immediately after switching from another model to Grok
|
|
182
185
|
|
|
183
|
-
Versions through `0.1.2` could not convert some third-party tool-call histories containing special characters, notably `|` in Ark call IDs. Update to `0.1.3
|
|
186
|
+
Versions through `0.1.2` could not convert some third-party tool-call histories containing special characters, notably `|` in Ark call IDs. Update to `0.1.3` or later; it preserves call/result correlation while safely mapping incompatible historical IDs before sending the request to Grok.
|
|
184
187
|
|
|
185
188
|
### Does Windows work?
|
|
186
189
|
|
|
@@ -202,6 +205,7 @@ Project map:
|
|
|
202
205
|
- [`docs/04-harness-contract.md`](docs/04-harness-contract.md): Harness integration contract;
|
|
203
206
|
- [`docs/05-test-plan.md`](docs/05-test-plan.md): platform, security, and release gates;
|
|
204
207
|
- [`docs/09-implementation-status.md`](docs/09-implementation-status.md): implementation and acceptance status;
|
|
208
|
+
- [`docs/11-capability-roadmap.md`](docs/11-capability-roadmap.md): content-type sequence from `0.1.4`;
|
|
205
209
|
- [`CHANGELOG.md`](CHANGELOG.md): version history.
|
|
206
210
|
|
|
207
211
|
Read the [contributing guide](CONTRIBUTING.md) before filing an issue or PR. Changes to authentication, transport, credential formats, or release boundaries must update the relevant ADR/threat model before implementation and tests.
|
|
@@ -215,10 +219,13 @@ Read the [contributing guide](CONTRIBUTING.md) before filing an issue or PR. Cha
|
|
|
215
219
|
- [x] Publish the `0.1.1` documentation and release-process correction
|
|
216
220
|
- [x] Publish the `0.1.2` Windows CLI compatibility correction
|
|
217
221
|
- [x] Publish the `0.1.3` cross-provider tool-history compatibility correction
|
|
222
|
+
- [x] Publish `0.1.4`: image input only for exact `grok-4.6`; red/blue user/tool-result Proxy gates and final Harness attachment revalidation passed, while `grok-4.5` fails closed as text-only
|
|
223
|
+
- [ ] Publish `0.1.5`: maintenance for release binding, dashboard capability badges, and transactional Provider Runtime installation (development, PR, and dual-platform CI are complete)
|
|
224
|
+
- [ ] Later independent slice: opt-in, default-off Web Search / X Search
|
|
225
|
+
- [ ] A subsequent slice: opt-in image generation (inline results only, committed through Harness attachments)
|
|
218
226
|
- [ ] Complete independent Windows x64 acceptance and publish a later stable fix if needed
|
|
219
|
-
- [ ] Evaluate additional content types and platforms only against verified Harness/xAI contracts
|
|
220
227
|
|
|
221
|
-
The roadmap is not a compatibility promise;
|
|
228
|
+
Slice details, gates, and permanent non-goals are in the [capability roadmap](docs/11-capability-roadmap.md). The roadmap is not a compatibility promise; each capability needs its own ADR and security gates. `prompt_cache_key` is not bundled with image input. Arbitrary URL downloads and API-key mode stay out of scope.
|
|
222
229
|
|
|
223
230
|
## License
|
|
224
231
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
让 DeepSeek Harness 使用你已登录的官方 Grok Build 账号:动态模型发现、流式推理、工具调用,以及账号额度与模型能力面板。
|
|
6
6
|
|
|
7
|
-
> 非官方社区项目,与 xAI 或 DeepSeek Harness
|
|
7
|
+
> 非官方社区项目,与 xAI 或 DeepSeek Harness 官方无隶属关系。当前源码版本为 `0.1.5`;npm 已发布稳定版本以 Registry 的 `latest` 标签为准。项目不再发行预发行版;正式版缺陷通过新的递增稳定版本修复。
|
|
8
8
|
|
|
9
9
|
## 它解决什么问题
|
|
10
10
|
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| 凭据 | 复用官方 CLI 的登录状态;插件不创建第二份 token 存储 |
|
|
15
15
|
| 模型 | 运行时读取账号可见的全部 Grok Build 模型,不维护静态模型白名单 |
|
|
16
16
|
| 对话 | Responses 流式文本、reasoning、加密 reasoning replay、usage 与 finish reason |
|
|
17
|
+
| 图片 | 仅精确 `grok-4.6` 接收 Harness attachment 中有界的 JPEG/PNG 图片;`grok-4.5` 与其他模型保持 text-only |
|
|
17
18
|
| 工具 | 将 function call 交回 Harness 权限层;Provider 本身不执行工具 |
|
|
18
19
|
| 账户面板 | 登录状态、每周/月额度、重置时间、动态模型能力与 reasoning 档位 |
|
|
19
20
|
| 界面 | Web 设置页中英文切换;TUI 提供闭合的 `/grok` 命令 |
|
|
@@ -38,10 +39,10 @@ grok models
|
|
|
38
39
|
|
|
39
40
|
### 2. 安装 Provider
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
`0.1.5` 发布后,从 npm 安装该精确版本:
|
|
42
43
|
|
|
43
44
|
```sh
|
|
44
|
-
dsh plugin --profile web add dsh-grok-provider@0.1.
|
|
45
|
+
dsh plugin --profile web add dsh-grok-provider@0.1.5
|
|
45
46
|
dsh web
|
|
46
47
|
```
|
|
47
48
|
|
|
@@ -62,7 +63,7 @@ Web 设置页展示:
|
|
|
62
63
|
|
|
63
64
|
- 当前登录状态及登录、取消、退出操作;
|
|
64
65
|
- 已使用/剩余额度和真实周期重置时间;
|
|
65
|
-
- 当前账号可见模型、上下文窗口、reasoning
|
|
66
|
+
- 当前账号可见模型、上下文窗口、reasoning 档位,以及图片输入、streaming 与 tool capability。
|
|
66
67
|
|
|
67
68
|
当 protobuf-backed billing 返回完整的 weekly/monthly 周期但省略零值百分比时,页面会恢复为“已使用 0% / 剩余 100%”;其他不完整响应保持未知,不伪造额度。
|
|
68
69
|
|
|
@@ -111,26 +112,28 @@ dsh web
|
|
|
111
112
|
|
|
112
113
|
## 项目来源与发现
|
|
113
114
|
|
|
114
|
-
- npm
|
|
115
|
-
- GitHub
|
|
115
|
+
- npm `0.1.5` 页面(发布后可用):[dsh-grok-provider@0.1.5](https://www.npmjs.com/package/dsh-grok-provider/v/0.1.5)
|
|
116
|
+
- GitHub `0.1.5` 发行版与校验值(发布后可用):[v0.1.5](https://github.com/yoshino-xiao7/dsh-grok-provider/releases/tag/v0.1.5)
|
|
116
117
|
- GitHub 社区发现:仓库已添加 DeepSeek Harness 官方推荐的 `dsh-plugin` 与 `dsh` Topics
|
|
117
|
-
- YukiRyou 受管来源:[deepseek-yukiryou-plugin-catalog](https://github.com/yoshino-xiao7/deepseek-yukiryou-plugin-catalog)
|
|
118
|
+
- YukiRyou 受管来源:[deepseek-yukiryou-plugin-catalog](https://github.com/yoshino-xiao7/deepseek-yukiryou-plugin-catalog),当前仍锁定已完成真机验收的 `dsh-grok-provider@0.1.0`,且只标记 `darwin-arm64`
|
|
118
119
|
|
|
119
|
-
出现在目录中不代表 xAI 或 DeepSeek Harness
|
|
120
|
+
出现在目录中不代表 xAI 或 DeepSeek Harness 官方背书。项目已通过[收录 PR #3415](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/3415) 进入公共 `awesome-dsh-plugin` 的 `model` 分类;该目录是仓库级发现入口,不承载精确 npm 版本或平台验收声明。
|
|
120
121
|
|
|
121
122
|
## 兼容性与范围
|
|
122
123
|
|
|
123
|
-
| 项目 | `0.1.
|
|
124
|
+
| 项目 | `0.1.5` 状态 |
|
|
124
125
|
| --- | --- |
|
|
125
126
|
| DeepSeek Harness | 精确支持 `0.1.1-rc.2` |
|
|
126
127
|
| Node.js | `>=24.19.0` |
|
|
127
128
|
| macOS arm64 | 已完成真实网络与隔离 Harness 验收 |
|
|
128
|
-
| Windows x64 | 代码与 Windows CI
|
|
129
|
+
| Windows x64 | 代码与 Windows CI 支持;当前 `0.1.5` 候选未新增独立真机验收 |
|
|
129
130
|
| macOS x64 / Linux | 不支持 |
|
|
130
131
|
| Grok CLI | 不锁完整版本;严格校验官方路径、`login --oauth` 能力与生产 OIDC 凭据契约 |
|
|
131
132
|
| 模型 | 当前账号目录中 backend 已被严格 codec 支持的全部模型 |
|
|
132
133
|
|
|
133
|
-
|
|
134
|
+
`0.1.5` 沿用 `0.1.4` 的图片边界:只为精确的 `grok-4.6` 开启图片输入;`grok-4.5` 与其他动态发现的模型继续按 text-only 处理。账户面板从同一模型目录投影能力标签,因此只有图片模型显示“图片输入”。图片只能来自 Harness attachment service 的已验证 JPEG/PNG 投影,支持普通用户内容和一层工具结果中的图片,并按 xAI 官方 Responses 图片示例固定使用 `detail:"high"`;不接受 URL、文件路径、file ID 或调用方预制的 data URL。
|
|
135
|
+
|
|
136
|
+
每张投影图片最多 4 MiB、16,777,216 像素且任一边不超过 8192px;每次请求最多保留 8 张、投影字节合计最多 8 MiB。超限时按全局最旧优先移除图片并保留 Harness 的文本占位,最终 JSON 仍受 16 MiB 上限约束。Web/X Search、图片生成、任意文件下载、API Key 模式、多账号、企业 OIDC、ACP 与 Headless agent 封装仍不在本版本范围内;后续切片见[能力路线图](docs/11-capability-roadmap.md)。
|
|
134
137
|
|
|
135
138
|
## 工作原理
|
|
136
139
|
|
|
@@ -147,7 +150,7 @@ dsh-grok-provider Host
|
|
|
147
150
|
xAI Grok Build
|
|
148
151
|
```
|
|
149
152
|
|
|
150
|
-
模型 ID
|
|
153
|
+
模型 ID 来自运行时目录,不是硬编码列表;图片 modality 则只对有独立协议与真机证据的精确模型 ID 开启。如果账号出现当前版本无法安全映射的新 backend,发现过程会失败关闭,而不是隐藏模型后宣称“全部支持”。
|
|
151
154
|
|
|
152
155
|
## 安全与隐私
|
|
153
156
|
|
|
@@ -156,7 +159,7 @@ dsh-grok-provider Host
|
|
|
156
159
|
- Host 必须有界读取官方 `auth.json`,其原始文件可能包含 refresh token;解析器不使用、不缓存、不持久化 refresh token,只保留闭合校验所需元数据与短期 access-token lease。
|
|
157
160
|
- 插件不实现 refresh grant;凭据临近过期时,只能有界调用一次官方 `grok models`,再重新读取并验证官方文件。
|
|
158
161
|
- 登录子进程使用固定 argv、过滤后的环境、输出上限、deadline 与取消处理,不通过 shell 启动。
|
|
159
|
-
-
|
|
162
|
+
- 提示词、工具结果以及用户选择发送的图片投影会发往 xAI Grok Build 服务;插件本身不记录这些内容、原图或投影字节。
|
|
160
163
|
|
|
161
164
|
完整边界见[威胁模型](docs/03-security-threat-model.md)。发现安全问题时,请阅读[安全策略](SECURITY.md),不要在公开 Issue 中提交 token、`auth.json`、个人信息或完整诊断日志。
|
|
162
165
|
|
|
@@ -180,7 +183,7 @@ dsh-grok-provider Host
|
|
|
180
183
|
|
|
181
184
|
### 从其他模型切换到 Grok 后立即提示响应无效
|
|
182
185
|
|
|
183
|
-
`0.1.2` 及更早版本不能转换部分包含特殊字符的第三方工具调用历史,典型情况是 Ark 调用 ID 中的 `|`。请更新到 `0.1.3
|
|
186
|
+
`0.1.2` 及更早版本不能转换部分包含特殊字符的第三方工具调用历史,典型情况是 Ark 调用 ID 中的 `|`。请更新到 `0.1.3` 或更高版本;新版本会保持工具调用与结果的关联,并在发送给 Grok 前安全映射不兼容的历史 ID。
|
|
184
187
|
|
|
185
188
|
### Windows 能用吗
|
|
186
189
|
|
|
@@ -202,6 +205,7 @@ npm run pack:check
|
|
|
202
205
|
- [`docs/04-harness-contract.md`](docs/04-harness-contract.md):Harness 集成契约;
|
|
203
206
|
- [`docs/05-test-plan.md`](docs/05-test-plan.md):平台、安全与发行门禁;
|
|
204
207
|
- [`docs/09-implementation-status.md`](docs/09-implementation-status.md):实现与验收状态;
|
|
208
|
+
- [`docs/11-capability-roadmap.md`](docs/11-capability-roadmap.md):`0.1.4` 起的内容类型路线;
|
|
205
209
|
- [`CHANGELOG.md`](CHANGELOG.md):版本变化。
|
|
206
210
|
|
|
207
211
|
提交 Issue 或 PR 前请阅读[贡献指南](CONTRIBUTING.md)。认证、传输、凭据格式或发布边界的变化必须先更新对应 ADR/威胁模型,再开发和测试。
|
|
@@ -215,10 +219,13 @@ npm run pack:check
|
|
|
215
219
|
- [x] 发布 `0.1.1` 文档与发布流程修正版
|
|
216
220
|
- [x] 发布 `0.1.2` Windows CLI 兼容性修正版
|
|
217
221
|
- [x] 发布 `0.1.3` 跨 Provider 工具调用历史兼容性修正版
|
|
222
|
+
- [x] 发布 `0.1.4`:仅精确 `grok-4.6` 图片输入;user/tool-result 红蓝语义 Proxy 门禁与最终 Harness attachment 复验通过,`grok-4.5` 失败关闭为 text-only
|
|
223
|
+
- [ ] 发布 `0.1.5`:发布链路、账户面板能力标签与 Provider Runtime 安装回滚维护版(开发、PR 与双平台 CI 已完成)
|
|
224
|
+
- [ ] 后续独立切片:默认关闭、用户分别开启的 Web Search / X Search
|
|
225
|
+
- [ ] 再后续独立切片:默认关闭的图片生成(只收内联结果,提交 Harness attachment)
|
|
218
226
|
- [ ] 完成 Windows x64 独立真机验收并按需发布后续稳定修复版
|
|
219
|
-
- [ ] 根据已验证的 Harness/xAI 协议逐项评估更多内容类型和平台
|
|
220
227
|
|
|
221
|
-
|
|
228
|
+
完整切片、门禁与永久非目标见[能力路线图](docs/11-capability-roadmap.md)。路线图不是兼容性承诺;新增能力必须通过独立 ADR 与安全门禁。`prompt_cache_key` 不与图片输入捆绑;不引入任意 URL 下载或 API Key 模式。
|
|
222
229
|
|
|
223
230
|
## 许可证
|
|
224
231
|
|
package/SECURITY.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 支持范围
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
本安全策略对应源码版本 `0.1.5`;当前已发布稳定版本以 npm Registry 的 `latest` 标签为准。DeepSeek Harness、Node.js 与操作系统按发布线明确维护;Grok CLI 不使用完整版本字符串作为信任门禁,而是严格校验官方默认路径、命令能力、生产 OIDC 凭据契约和固定服务端协议。macOS arm64 已完成真实验收;Windows x64 有代码与 CI 覆盖。`0.1.5` 沿用 `0.1.4` 的图片边界:只为精确 `grok-4.6` 提供有界图片输入;`grok-4.5` 与所有其他模型保持 text-only,不改动认证、凭据、CLI subprocess 或 endpoint 边界。图片只能来自 Harness attachment service 的已验证 JPEG/PNG 投影,以 `detail:"high"` 发送,并受单图字节、像素、边长、数量、总字节与最终 JSON 上限约束;URL、路径、file ID 和调用方预制 data URL 都会被拒绝。项目不再发行预发行版,安全或兼容性缺陷使用新的递增稳定版本修复。
|
|
8
8
|
|
|
9
9
|
## 私下报告漏洞
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
- 已脱敏的请求/响应形状或错误码;
|
|
18
18
|
- 建议修复方向(如有)。
|
|
19
19
|
|
|
20
|
-
绝对不要发送真实 `auth.json`、access/refresh token、`user_id`、Cookie
|
|
20
|
+
绝对不要发送真实 `auth.json`、access/refresh token、`user_id`、Cookie、邮箱、姓名、完整提示词、工具参数、原图/投影图片字节或包含这些数据的诊断包。若秘密已暴露,请先通过官方 Grok CLI 注销/重新登录并按相应服务流程撤销凭据。
|
|
21
21
|
|
|
22
22
|
## 不属于漏洞的情况
|
|
23
23
|
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
English summary: GitHub Private vulnerability reporting is enabled and is the preferred reporting channel. If
|
|
35
|
+
English summary: GitHub Private vulnerability reporting is enabled and is the preferred reporting channel. Version `0.1.5` preserves the `0.1.4` bounded JPEG/PNG attachment boundary with `detail:"high"` only for exact `grok-4.6`; `grok-4.5` and all other models remain text-only. It accepts no URL, path, file ID, or caller-supplied data URL and does not change authentication or endpoints. If private reporting is unavailable, open only a detail-free contact issue. Never publish or send real credentials, identity data, prompts, tool arguments, cookies, source/projected image bytes, or unreviewed diagnostic archives. Include exact versions, platform, minimal reproduction conditions, impact, and redacted evidence.
|
package/dist/client/client.js
CHANGED
|
@@ -21,7 +21,7 @@ window.__ModuleLoader__.load({
|
|
|
21
21
|
usageUnknown: "上游未提供使用比例", quotaUnavailable: "暂时无法读取 Grok Build 额度。",
|
|
22
22
|
modelsTitle: "当前账号可用的模型", modelsDescription: "模型来自 Grok Build 动态目录;Harness 模型选择器会显示这里列出的全部模型。",
|
|
23
23
|
modelsUnavailable: "暂时无法读取模型目录。", noModels: "当前账号没有返回可用模型。",
|
|
24
|
-
context: "上下文", reasoning: "推理档位", defaultEffort: "默认", text: "文本输入", streaming: "流式输出", tools: "工具调用",
|
|
24
|
+
context: "上下文", reasoning: "推理档位", defaultEffort: "默认", text: "文本输入", image: "图片输入", streaming: "流式输出", tools: "工具调用",
|
|
25
25
|
lastUpdated: "数据更新时间",
|
|
26
26
|
},
|
|
27
27
|
en: {
|
|
@@ -38,7 +38,7 @@ window.__ModuleLoader__.load({
|
|
|
38
38
|
usageUnknown: "Usage percentage was not provided", quotaUnavailable: "Grok Build quota is temporarily unavailable.",
|
|
39
39
|
modelsTitle: "Models available to this account", modelsDescription: "Models come from the live Grok Build catalog; every model listed here remains visible in the Harness model selector.",
|
|
40
40
|
modelsUnavailable: "The model catalog is temporarily unavailable.", noModels: "This account returned no available models.",
|
|
41
|
-
context: "Context", reasoning: "Reasoning", defaultEffort: "default", text: "Text input", streaming: "Streaming", tools: "Tool calling",
|
|
41
|
+
context: "Context", reasoning: "Reasoning", defaultEffort: "default", text: "Text input", image: "Image input", streaming: "Streaming", tools: "Tool calling",
|
|
42
42
|
lastUpdated: "Updated",
|
|
43
43
|
},
|
|
44
44
|
}
|
|
@@ -158,6 +158,7 @@ window.__ModuleLoader__.load({
|
|
|
158
158
|
React.createElement("div", { className: "dsh-grok-badges" },
|
|
159
159
|
React.createElement("span", { className: "dsh-grok-badge", "data-accent": true }, `${t("context")} ${formatContext(model.contextWindow)}`),
|
|
160
160
|
model.capabilities?.textInput && React.createElement("span", { className: "dsh-grok-badge" }, t("text")),
|
|
161
|
+
model.capabilities?.imageInput && React.createElement("span", { className: "dsh-grok-badge" }, t("image")),
|
|
161
162
|
model.capabilities?.streaming && React.createElement("span", { className: "dsh-grok-badge" }, t("streaming")),
|
|
162
163
|
model.capabilities?.functionTools && React.createElement("span", { className: "dsh-grok-badge" }, t("tools"))),
|
|
163
164
|
effortText && React.createElement("div", { className: "dsh-grok-efforts" }, `${t("reasoning")}:${effortText}`))
|
package/dist/host/index.mjs
CHANGED
|
@@ -2,26 +2,22 @@ import os from "node:os"
|
|
|
2
2
|
import path from "node:path"
|
|
3
3
|
import { randomUUID } from "node:crypto"
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { attributionHeaders } from "@deepseek-ai/dsh-llm"
|
|
6
6
|
import Schema from "@deepseek-ai/schemastery"
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
CredentialFileTooLargeError,
|
|
10
9
|
GROK_PRODUCTION_OIDC_AUTH_CONTRACT,
|
|
11
10
|
UnsupportedCredentialError,
|
|
12
11
|
createCredentialSource,
|
|
13
12
|
} from "../internal/credential-source.mjs"
|
|
14
|
-
import { AuthModeUnavailableError } from "../internal/auth-registry.mjs"
|
|
15
13
|
import { createAccountDashboard } from "../internal/account-dashboard.mjs"
|
|
16
14
|
import { createAuthController } from "../internal/auth-controller.mjs"
|
|
17
15
|
import { createAuthRpcHandler } from "../internal/auth-rpc.mjs"
|
|
18
16
|
import { createGrokAdapter } from "../internal/grok-adapter.mjs"
|
|
19
17
|
import { createGrokCommandHandler } from "../internal/grok-command-handler.mjs"
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
createOfficialCredentialLoader,
|
|
24
|
-
} from "../internal/official-credential-loader.mjs"
|
|
18
|
+
import { createGrokTransport } from "../internal/grok-transport.mjs"
|
|
19
|
+
import { mapLlmError } from "../internal/llm-error.mjs"
|
|
20
|
+
import { createOfficialCredentialLoader } from "../internal/official-credential-loader.mjs"
|
|
25
21
|
import { createOfficialCliAuth } from "../internal/official-cli-auth.mjs"
|
|
26
22
|
import { createOfficialAuthDriver } from "../internal/official-auth-driver.mjs"
|
|
27
23
|
import { verifyOfficialCliExecutable } from "../internal/official-cli-verifier.mjs"
|
|
@@ -64,6 +60,7 @@ export function apply(ctx) {
|
|
|
64
60
|
}),
|
|
65
61
|
createAdapter: ({ getGeneration }) => createGrokAdapter({
|
|
66
62
|
getGeneration,
|
|
63
|
+
getAttachmentStore: () => ctx.get("attachments"),
|
|
67
64
|
mapError: mapLlmError,
|
|
68
65
|
}),
|
|
69
66
|
})
|
|
@@ -117,31 +114,3 @@ export function apply(ctx) {
|
|
|
117
114
|
|
|
118
115
|
ctx.effect(() => () => runtime.dispose(), "llm-grok runtime")
|
|
119
116
|
}
|
|
120
|
-
|
|
121
|
-
function mapLlmError(error) {
|
|
122
|
-
if (error instanceof LlmError) return error
|
|
123
|
-
if (error?.name === "AbortError") {
|
|
124
|
-
return new LlmError("The Grok Build request was cancelled", "ABORTED", { cause: error })
|
|
125
|
-
}
|
|
126
|
-
if (
|
|
127
|
-
error instanceof AuthModeUnavailableError ||
|
|
128
|
-
error instanceof UnsupportedCredentialError ||
|
|
129
|
-
error instanceof CredentialFileTooLargeError ||
|
|
130
|
-
error instanceof OfficialCredentialFileError ||
|
|
131
|
-
(error instanceof GrokTransportError && (error.status === 401 || error.status === 403))
|
|
132
|
-
) {
|
|
133
|
-
return new LlmError("Grok authentication is required", "AUTH", {
|
|
134
|
-
cause: error,
|
|
135
|
-
...(error.status === undefined ? {} : { status: error.status }),
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
if (error instanceof GrokTransportError) {
|
|
139
|
-
return new LlmError("The Grok Build request failed", error.status === 429 ? "RATE_LIMIT" : "PROVIDER_ERROR", {
|
|
140
|
-
cause: error,
|
|
141
|
-
...(error.status === undefined ? {} : { status: error.status }),
|
|
142
|
-
})
|
|
143
|
-
}
|
|
144
|
-
return new LlmError("The Grok provider rejected an invalid or unsupported response", "INVALID_RESPONSE", {
|
|
145
|
-
cause: error,
|
|
146
|
-
})
|
|
147
|
-
}
|
|
@@ -40,10 +40,36 @@ function projectModel(model) {
|
|
|
40
40
|
...(typeof model.description === "string" ? { description: model.description } : {}),
|
|
41
41
|
contextWindow: model.context.contextWindow,
|
|
42
42
|
...(model.reasoning === undefined ? {} : { reasoning: projectReasoning(model.reasoning) }),
|
|
43
|
-
capabilities:
|
|
43
|
+
capabilities: projectCapabilities(model.inputModalities),
|
|
44
44
|
})
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
function projectCapabilities(inputModalities) {
|
|
48
|
+
if (
|
|
49
|
+
!Array.isArray(inputModalities) ||
|
|
50
|
+
Object.getPrototypeOf(inputModalities) !== Array.prototype
|
|
51
|
+
) throw new TypeError("Invalid Grok dashboard input modalities")
|
|
52
|
+
const length = inputModalities.length
|
|
53
|
+
if (
|
|
54
|
+
length === 0 ||
|
|
55
|
+
length > 2 ||
|
|
56
|
+
Reflect.ownKeys(inputModalities).length !== length + 1
|
|
57
|
+
) throw new TypeError("Invalid Grok dashboard input modalities")
|
|
58
|
+
|
|
59
|
+
let textInput = false
|
|
60
|
+
let imageInput = false
|
|
61
|
+
for (let index = 0; index < length; index += 1) {
|
|
62
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputModalities, String(index))
|
|
63
|
+
if (descriptor === undefined || !("value" in descriptor)) {
|
|
64
|
+
throw new TypeError("Invalid Grok dashboard input modalities")
|
|
65
|
+
}
|
|
66
|
+
if (descriptor.value === "text" && !textInput) textInput = true
|
|
67
|
+
else if (descriptor.value === "image" && !imageInput) imageInput = true
|
|
68
|
+
else throw new TypeError("Invalid Grok dashboard input modalities")
|
|
69
|
+
}
|
|
70
|
+
return Object.freeze({ textInput, imageInput, streaming: true, functionTools: true })
|
|
71
|
+
}
|
|
72
|
+
|
|
47
73
|
function projectReasoning(reasoning) {
|
|
48
74
|
if (!isPlainObject(reasoning) || !Array.isArray(reasoning.efforts)) {
|
|
49
75
|
throw new TypeError("Invalid Grok dashboard reasoning capability")
|