dsh-grok-provider 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.en.md +12 -11
- package/README.md +12 -11
- package/SECURITY.md +1 -1
- package/dist/client/client.js +2 -2
- package/dist/host/index.mjs +3 -3
- package/dist/internal/credential-source.mjs +1 -1
- package/dist/internal/official-cli-auth.mjs +33 -4
- package/docs/03-security-threat-model.md +5 -4
- package/docs/05-test-plan.md +6 -4
- package/docs/06-release-plan.md +8 -4
- package/docs/09-implementation-status.md +15 -4
- package/docs/10-release-checklist.md +24 -2
- package/docs/README.md +8 -5
- package/docs/adr/0005-official-cli-only-authentication.md +1 -0
- package/docs/adr/0007-capability-based-cli-compatibility.md +41 -0
- package/docs/releases/v0.1.2-rc.1.md +41 -0
- package/docs/releases/v0.1.2.md +55 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2 - 2026-08-26
|
|
4
|
+
|
|
5
|
+
- Fix Windows browser sign-in for official Grok Build CLI `0.2.82`, which `0.1.1` rejected before invoking `login --oauth`.
|
|
6
|
+
- Replace the complete CLI-version allowlist with bounded version diagnostics plus a `login --help` capability probe for the independent `--oauth` option.
|
|
7
|
+
- Keep the security boundary closed: official default path and executable checks, fixed argv, scrubbed environment, no plugin shell, post-login production OIDC credential validation, and pinned Grok Build endpoints remain mandatory.
|
|
8
|
+
- Add regression coverage for the real Windows `0.2.82` output shape, compatible unknown versions, missing OAuth capability, and malformed version output.
|
|
9
|
+
- Document Windows x64 as code- and CI-supported without claiming independent real-device acceptance; publish later stable fixes for any discovered defect.
|
|
10
|
+
- Adopt stable-only releases: future defects are resolved by incrementing the stable version instead of publishing prereleases.
|
|
11
|
+
|
|
3
12
|
## 0.1.1 - 2026-08-26
|
|
4
13
|
|
|
5
14
|
- Correct post-release status across the Simplified Chinese and English READMEs, security policy, and maintainer documentation.
|
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 version is `0.1.
|
|
7
|
+
> Unofficial community project; not affiliated with xAI or DeepSeek Harness. The current stable version is `0.1.2`. 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
|
|
|
@@ -25,7 +25,7 @@ Use an already authenticated official Grok Build account from DeepSeek Harness,
|
|
|
25
25
|
- DeepSeek Harness `0.1.1-rc.2`
|
|
26
26
|
- Node.js `24.19.0` or newer
|
|
27
27
|
- macOS arm64 or Windows x64
|
|
28
|
-
- Official Grok Build CLI `
|
|
28
|
+
- Official Grok Build CLI with `login --oauth` support and the default Grok home
|
|
29
29
|
|
|
30
30
|
Install the CLI from the [official Grok Build documentation](https://docs.x.ai/build/overview), then verify:
|
|
31
31
|
|
|
@@ -41,7 +41,7 @@ The official CLI opens a browser on first use. The provider supports only the of
|
|
|
41
41
|
Install the published exact version from npm:
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
|
-
dsh plugin --profile web add dsh-grok-provider@0.1.
|
|
44
|
+
dsh plugin --profile web add dsh-grok-provider@0.1.2
|
|
45
45
|
dsh web
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -97,8 +97,8 @@ Uninstalling the provider does not remove the official Grok CLI or directly modi
|
|
|
97
97
|
|
|
98
98
|
## Sources and discovery
|
|
99
99
|
|
|
100
|
-
- Exact npm version: [dsh-grok-provider@0.1.
|
|
101
|
-
- GitHub release and integrity values: [v0.1.
|
|
100
|
+
- Exact npm version: [dsh-grok-provider@0.1.2](https://www.npmjs.com/package/dsh-grok-provider/v/0.1.2)
|
|
101
|
+
- GitHub release and integrity values: [v0.1.2](https://github.com/yoshino-xiao7/dsh-grok-provider/releases/tag/v0.1.2)
|
|
102
102
|
- GitHub community discovery: the repository carries the DeepSeek Harness-recommended `dsh-plugin` and `dsh` topics
|
|
103
103
|
- YukiRyou managed source: [deepseek-yukiryou-plugin-catalog](https://github.com/yoshino-xiao7/deepseek-yukiryou-plugin-catalog), following the exact verified stable version and currently marking only verified macOS arm64
|
|
104
104
|
|
|
@@ -106,14 +106,14 @@ Directory inclusion is not an endorsement by xAI or DeepSeek Harness. The public
|
|
|
106
106
|
|
|
107
107
|
## Compatibility and scope
|
|
108
108
|
|
|
109
|
-
| Item | `0.1.
|
|
109
|
+
| Item | `0.1.2` status |
|
|
110
110
|
| --- | --- |
|
|
111
111
|
| DeepSeek Harness | Exact support for `0.1.1-rc.2` |
|
|
112
112
|
| Node.js | `>=24.19.0` |
|
|
113
113
|
| macOS arm64 | Real-network and isolated Harness acceptance completed |
|
|
114
|
-
| Windows x64 | Code
|
|
114
|
+
| Windows x64 | Code and Windows CI supported; no independent real-device acceptance completed for this release |
|
|
115
115
|
| macOS x64 / Linux | Unsupported |
|
|
116
|
-
| Grok CLI |
|
|
116
|
+
| Grok CLI | No full-version lock; official path, `login --oauth` capability, and production OIDC credential contract are enforced |
|
|
117
117
|
| Models | Every account catalog model whose backend has a strict codec in this release |
|
|
118
118
|
|
|
119
119
|
The initial release excludes image input, Web/X Search, arbitrary downloads, API-key mode, multiple accounts, enterprise OIDC, ACP, and Headless agent wrapping. See the complete [product requirements](docs/01-product-requirements.md).
|
|
@@ -154,7 +154,7 @@ Confirm the official CLI is in its default location and run `grok --version`. Th
|
|
|
154
154
|
|
|
155
155
|
### The page asks you to sign in again
|
|
156
156
|
|
|
157
|
-
Use the settings button or run `grok login --oauth` in a terminal.
|
|
157
|
+
Use the settings button or run `grok login --oauth` in a terminal. The provider does not lock the complete CLI version, but fails closed when the path, `--oauth` capability, or production OIDC credential contract does not match.
|
|
158
158
|
|
|
159
159
|
### A model is missing
|
|
160
160
|
|
|
@@ -166,7 +166,7 @@ A protobuf-omitted zero is restored only with a complete typed period. In every
|
|
|
166
166
|
|
|
167
167
|
### Does Windows work?
|
|
168
168
|
|
|
169
|
-
Windows x64 code and
|
|
169
|
+
Windows x64 code and CI coverage are present. The repository owner chose to publish `0.1.2` without making independent real-device acceptance a blocker. Any Windows defect found in the stable release will be fixed in a new incremented stable version.
|
|
170
170
|
|
|
171
171
|
## Development
|
|
172
172
|
|
|
@@ -195,7 +195,8 @@ Read the [contributing guide](CONTRIBUTING.md) before filing an issue or PR. Cha
|
|
|
195
195
|
- [x] Publish `0.1.0` and verify Registry integrity/provenance
|
|
196
196
|
- [x] Configure npm Trusted Publisher, revoke the initial token, and add `dsh-plugin` discovery plus the YukiRyou catalog entry
|
|
197
197
|
- [x] Publish the `0.1.1` documentation and release-process correction
|
|
198
|
-
- [
|
|
198
|
+
- [x] Publish the `0.1.2` Windows CLI compatibility correction
|
|
199
|
+
- [ ] Complete independent Windows x64 acceptance and publish a later stable fix if needed
|
|
199
200
|
- [ ] Evaluate additional content types and platforms only against verified Harness/xAI contracts
|
|
200
201
|
|
|
201
202
|
The roadmap is not a compatibility promise; every new capability must pass the documented design and security gates.
|
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.2`。项目不再发行预发行版;正式版缺陷通过新的递增稳定版本修复。
|
|
8
8
|
|
|
9
9
|
## 它解决什么问题
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- DeepSeek Harness `0.1.1-rc.2`
|
|
26
26
|
- Node.js `24.19.0` 或更高版本
|
|
27
27
|
- macOS arm64 或 Windows x64
|
|
28
|
-
- 官方 Grok Build CLI `
|
|
28
|
+
- 官方 Grok Build CLI(支持 `login --oauth`,并使用官方默认 Grok home)
|
|
29
29
|
|
|
30
30
|
请从 [Grok Build 官方文档](https://docs.x.ai/build/overview) 安装 CLI,并先确认:
|
|
31
31
|
|
|
@@ -41,7 +41,7 @@ grok models
|
|
|
41
41
|
从 npm 安装已发布的精确版本:
|
|
42
42
|
|
|
43
43
|
```sh
|
|
44
|
-
dsh plugin --profile web add dsh-grok-provider@0.1.
|
|
44
|
+
dsh plugin --profile web add dsh-grok-provider@0.1.2
|
|
45
45
|
dsh web
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -97,8 +97,8 @@ dsh web
|
|
|
97
97
|
|
|
98
98
|
## 项目来源与发现
|
|
99
99
|
|
|
100
|
-
- npm 精确版本:[dsh-grok-provider@0.1.
|
|
101
|
-
- GitHub 发行版与校验值:[v0.1.
|
|
100
|
+
- npm 精确版本:[dsh-grok-provider@0.1.2](https://www.npmjs.com/package/dsh-grok-provider/v/0.1.2)
|
|
101
|
+
- GitHub 发行版与校验值:[v0.1.2](https://github.com/yoshino-xiao7/dsh-grok-provider/releases/tag/v0.1.2)
|
|
102
102
|
- GitHub 社区发现:仓库已添加 DeepSeek Harness 官方推荐的 `dsh-plugin` 与 `dsh` Topics
|
|
103
103
|
- YukiRyou 受管来源:[deepseek-yukiryou-plugin-catalog](https://github.com/yoshino-xiao7/deepseek-yukiryou-plugin-catalog),跟随已验证的精确稳定版本,当前只标记已验证的 macOS arm64
|
|
104
104
|
|
|
@@ -106,14 +106,14 @@ dsh web
|
|
|
106
106
|
|
|
107
107
|
## 兼容性与范围
|
|
108
108
|
|
|
109
|
-
| 项目 | `0.1.
|
|
109
|
+
| 项目 | `0.1.2` 状态 |
|
|
110
110
|
| --- | --- |
|
|
111
111
|
| DeepSeek Harness | 精确支持 `0.1.1-rc.2` |
|
|
112
112
|
| Node.js | `>=24.19.0` |
|
|
113
113
|
| macOS arm64 | 已完成真实网络与隔离 Harness 验收 |
|
|
114
|
-
| Windows x64 |
|
|
114
|
+
| Windows x64 | 代码与 Windows CI 支持;本次正式发布未完成独立真机验收 |
|
|
115
115
|
| macOS x64 / Linux | 不支持 |
|
|
116
|
-
| Grok CLI |
|
|
116
|
+
| Grok CLI | 不锁完整版本;严格校验官方路径、`login --oauth` 能力与生产 OIDC 凭据契约 |
|
|
117
117
|
| 模型 | 当前账号目录中 backend 已被严格 codec 支持的全部模型 |
|
|
118
118
|
|
|
119
119
|
首版不包含图片输入、Web/X Search、任意文件下载、API Key 模式、多账号、企业 OIDC、ACP 或 Headless agent 封装。完整范围见[产品需求](docs/01-product-requirements.md)。
|
|
@@ -154,7 +154,7 @@ dsh-grok-provider Host
|
|
|
154
154
|
|
|
155
155
|
### 页面要求重新登录
|
|
156
156
|
|
|
157
|
-
在设置页点击登录,或先在终端运行 `grok login --oauth
|
|
157
|
+
在设置页点击登录,或先在终端运行 `grok login --oauth`。插件不锁完整 CLI 版本,但路径、`--oauth` 能力或生产 OIDC 凭据契约不匹配时会失败关闭。
|
|
158
158
|
|
|
159
159
|
### 没有看到某个模型
|
|
160
160
|
|
|
@@ -166,7 +166,7 @@ dsh-grok-provider Host
|
|
|
166
166
|
|
|
167
167
|
### Windows 能用吗
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
代码和 Windows CI 覆盖 Windows x64;仓库所有者决定直接发布 `0.1.2`,未把独立真机验收作为阻断项。如果正式版出现 Windows 问题,将通过新的递增稳定版本修复。
|
|
170
170
|
|
|
171
171
|
## 开发
|
|
172
172
|
|
|
@@ -195,7 +195,8 @@ npm run pack:check
|
|
|
195
195
|
- [x] 发布 `0.1.0` 并完成 Registry/provenance 回读
|
|
196
196
|
- [x] 配置 npm Trusted Publisher、撤销首发 Token,并加入 `dsh-plugin` Topic 与 YukiRyou catalog
|
|
197
197
|
- [x] 发布 `0.1.1` 文档与发布流程修正版
|
|
198
|
-
- [
|
|
198
|
+
- [x] 发布 `0.1.2` Windows CLI 兼容性修正版
|
|
199
|
+
- [ ] 完成 Windows x64 独立真机验收并按需发布后续稳定修复版
|
|
199
200
|
- [ ] 根据已验证的 Harness/xAI 协议逐项评估更多内容类型和平台
|
|
200
201
|
|
|
201
202
|
路线图不是兼容性承诺;新增能力必须通过文档决策与安全门禁。
|
package/SECURITY.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 支持范围
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
当前稳定版本为 `0.1.2`。DeepSeek Harness、Node.js 与操作系统按发布线明确维护;Grok CLI 不使用完整版本字符串作为信任门禁,而是严格校验官方默认路径、命令能力、生产 OIDC 凭据契约和固定服务端协议。macOS arm64 已完成真实验收;Windows x64 有代码与 CI 覆盖,但 `0.1.2` 未完成独立真机验收。项目不再发行预发行版,安全或兼容性缺陷使用新的递增稳定版本修复。
|
|
8
8
|
|
|
9
9
|
## 私下报告漏洞
|
|
10
10
|
|
package/dist/client/client.js
CHANGED
|
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
ready: "已登录", notReady: "未登录", driverMissing: "官方 CLI 登录能力不可用",
|
|
15
15
|
running: "登录进行中", succeeded: "登录成功", failed: "登录失败", cancelled: "登录已取消",
|
|
16
16
|
login: "通过浏览器登录", cancel: "取消登录", logout: "退出登录", confirmLogout: "再次点击确认退出",
|
|
17
|
-
officialBody: "登录与凭据刷新由本机官方 Grok CLI
|
|
17
|
+
officialBody: "登录与凭据刷新由本机官方 Grok CLI 完成。重新登录会替换共享会话,退出会清除共享会话,并影响使用同一 Grok 凭据的其他应用。",
|
|
18
18
|
usage: "使用额度", grokBuild: "Grok Build", refresh: "刷新", refreshing: "刷新中…",
|
|
19
19
|
weekly: "每周额度", monthly: "每月额度", currentPeriod: "当前额度周期",
|
|
20
20
|
remaining: "剩余", used: "已使用", resetTime: "重置时间", resetUnknown: "上游未提供重置时间",
|
|
@@ -31,7 +31,7 @@ window.__ModuleLoader__.load({
|
|
|
31
31
|
ready: "Signed in", notReady: "Signed out", driverMissing: "Official CLI sign-in unavailable",
|
|
32
32
|
running: "Sign-in in progress", succeeded: "Signed in", failed: "Sign-in failed", cancelled: "Sign-in cancelled",
|
|
33
33
|
login: "Sign in with browser", cancel: "Cancel sign-in", logout: "Sign out", confirmLogout: "Click again to confirm sign-out",
|
|
34
|
-
officialBody: "The official local Grok CLI owns sign-in and credential refresh. Signing out
|
|
34
|
+
officialBody: "The official local Grok CLI owns sign-in and credential refresh. Signing in replaces the shared session; signing out clears it, affecting other apps that share the same Grok credential.",
|
|
35
35
|
usage: "Usage quota", grokBuild: "Grok Build", refresh: "Refresh", refreshing: "Refreshing…",
|
|
36
36
|
weekly: "Weekly quota", monthly: "Monthly quota", currentPeriod: "Current quota period",
|
|
37
37
|
remaining: "remaining", used: "Used", resetTime: "Resets", resetUnknown: "Reset time was not provided",
|
package/dist/host/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import Schema from "@deepseek-ai/schemastery"
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
CredentialFileTooLargeError,
|
|
10
|
-
|
|
10
|
+
GROK_PRODUCTION_OIDC_AUTH_CONTRACT,
|
|
11
11
|
UnsupportedCredentialError,
|
|
12
12
|
createCredentialSource,
|
|
13
13
|
} from "../internal/credential-source.mjs"
|
|
@@ -35,13 +35,13 @@ export const Config = Schema.object({})
|
|
|
35
35
|
export function apply(ctx) {
|
|
36
36
|
const platform = process.platform
|
|
37
37
|
if (platform !== "darwin" && platform !== "win32") {
|
|
38
|
-
throw new TypeError("dsh-grok-provider supports macOS and Windows
|
|
38
|
+
throw new TypeError("dsh-grok-provider supports macOS and Windows")
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const homeDir = os.homedir()
|
|
42
42
|
let refreshOfficialCredential
|
|
43
43
|
const officialSource = createCredentialSource({
|
|
44
|
-
contract:
|
|
44
|
+
contract: GROK_PRODUCTION_OIDC_AUTH_CONTRACT,
|
|
45
45
|
load: createOfficialCredentialLoader({
|
|
46
46
|
authPath: path.join(homeDir, ".grok", "auth.json"),
|
|
47
47
|
platform,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const CLIENT_ID = "b1a00492-073a-47ea-816f-4c329264a828"
|
|
2
2
|
const EXPIRY_SKEW_MS = 5 * 60 * 1000
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const GROK_PRODUCTION_OIDC_AUTH_CONTRACT = Object.freeze({
|
|
5
5
|
authMode: "oidc",
|
|
6
6
|
clientId: CLIENT_ID,
|
|
7
7
|
issuer: "https://auth.x.ai",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from "node:path"
|
|
2
2
|
|
|
3
|
-
const EXPECTED_VERSION = "grok 1.0.5 (5115b46bc909)"
|
|
4
3
|
const GRACE_MS = 5_000
|
|
5
4
|
const DEFAULT_VERSION_TIMEOUT_MS = 10 * 1000
|
|
6
5
|
const DEFAULT_LOGIN_TIMEOUT_MS = 5 * 60 * 1000
|
|
@@ -46,7 +45,7 @@ export function createOfficialCliAuth({
|
|
|
46
45
|
const candidate = pathApi.join(grokHome, "bin", platform === "win32" ? "grok.exe" : "grok")
|
|
47
46
|
const cliEnvironment = buildCliEnvironment(platform, homeDir)
|
|
48
47
|
|
|
49
|
-
const runAction = async (argvTail, callerSignal, timeoutMs) => {
|
|
48
|
+
const runAction = async (argvTail, callerSignal, timeoutMs, requiredCapability) => {
|
|
50
49
|
let preparationDeadline = createDeadline(callerSignal, versionTimeoutMs)
|
|
51
50
|
let actionDeadline
|
|
52
51
|
let resolved
|
|
@@ -62,10 +61,23 @@ export function createOfficialCliAuth({
|
|
|
62
61
|
signal: preparationDeadline.signal,
|
|
63
62
|
env: cliEnvironment,
|
|
64
63
|
})
|
|
65
|
-
if (version.stdout
|
|
64
|
+
if (!isGrokVersionOutput(version.stdout) || version.stderr.length !== 0) {
|
|
66
65
|
throw new OfficialCliAuthError()
|
|
67
66
|
}
|
|
68
67
|
|
|
68
|
+
if (requiredCapability) {
|
|
69
|
+
const help = await runCollected(subprocess, {
|
|
70
|
+
argv: [resolved, ...requiredCapability.helpArgv],
|
|
71
|
+
cwd: grokHome,
|
|
72
|
+
maxBytes: 16 * 1024,
|
|
73
|
+
signal: preparationDeadline.signal,
|
|
74
|
+
env: cliEnvironment,
|
|
75
|
+
})
|
|
76
|
+
if (help.stderr.length !== 0 || !hasCliOption(help.stdout, requiredCapability.option)) {
|
|
77
|
+
throw new OfficialCliAuthError()
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
69
81
|
preparationDeadline.dispose()
|
|
70
82
|
preparationDeadline = undefined
|
|
71
83
|
actionDeadline = createDeadline(callerSignal, timeoutMs)
|
|
@@ -92,7 +104,10 @@ export function createOfficialCliAuth({
|
|
|
92
104
|
|
|
93
105
|
return Object.freeze({
|
|
94
106
|
login({ signal } = {}) {
|
|
95
|
-
return runAction(["login", "--oauth"], signal, loginTimeoutMs
|
|
107
|
+
return runAction(["login", "--oauth"], signal, loginTimeoutMs, {
|
|
108
|
+
helpArgv: ["login", "--help"],
|
|
109
|
+
option: "--oauth",
|
|
110
|
+
})
|
|
96
111
|
},
|
|
97
112
|
logout({ signal } = {}) {
|
|
98
113
|
return runAction(["logout"], signal, logoutTimeoutMs)
|
|
@@ -103,6 +118,20 @@ export function createOfficialCliAuth({
|
|
|
103
118
|
})
|
|
104
119
|
}
|
|
105
120
|
|
|
121
|
+
function isGrokVersionOutput(output) {
|
|
122
|
+
return typeof output === "string" && /^grok [^\r\n]+$/u.test(output.trim())
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function hasCliOption(output, expectedOption) {
|
|
126
|
+
if (typeof output !== "string" || typeof expectedOption !== "string") return false
|
|
127
|
+
return output.split(/\r?\n/u).some((line) => {
|
|
128
|
+
const trimmed = line.trimStart()
|
|
129
|
+
if (!trimmed.startsWith("-")) return false
|
|
130
|
+
const optionColumn = trimmed.split(/\s{2,}/u, 1)[0]
|
|
131
|
+
return optionColumn.split(/[\s,]+/u).includes(expectedOption)
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
|
|
106
135
|
function createDeadline(callerSignal, timeoutMs) {
|
|
107
136
|
const controller = new AbortController()
|
|
108
137
|
const abortFromCaller = () => controller.abort(callerSignal.reason)
|
|
@@ -17,7 +17,7 @@ Web renderer / TUI
|
|
|
17
17
|
▼
|
|
18
18
|
Host AuthCoordinator
|
|
19
19
|
├─ OfficialGrokLoginBridge
|
|
20
|
-
│ └─ path/
|
|
20
|
+
│ └─ path/capability-constrained ~/.grok/bin/grok[.exe] login --oauth
|
|
21
21
|
│ ├─ 标准配置:系统浏览器与 xAI OAuth
|
|
22
22
|
│ ├─ 有效配置也可能选择 external helper / devbox / 企业 OIDC
|
|
23
23
|
│ ├─ CLI 自己的代理、托管配置同步与遥测
|
|
@@ -56,7 +56,7 @@ Host AuthCoordinator
|
|
|
56
56
|
| billing 响应或 credential metadata 越界进入 renderer | 身份、订阅或凭据泄漏 | Host 严格抽取百分比、周期与模型 capability;拒绝/忽略 identity、balance、history、headers、URL 和原始响应 | P0 |
|
|
57
57
|
| token 到期被误标为额度重置 | 错误产品决策、误导用户 | 重置时间只接受 billing period end;credential `expires_at` 不进入 dashboard DTO | P0 |
|
|
58
58
|
| 凭据轮换期间读到半写文件 | 认证失败或旧 token 重放 | 只接受完整 JSON;短退避重读;不写回;已发送请求不自动重放 | P1 |
|
|
59
|
-
| CLI
|
|
59
|
+
| CLI 更新改变命令或凭据格式 | 静默错误 | 登录前重查 realpath/identity;版本只作有界诊断;探测 `login --help` 的独立 `--oauth` 选项;登录后重验生产 OIDC 凭据契约与固定服务端 codec;CLI 自身更新行为属于 vendor boundary | P1 |
|
|
60
60
|
| 未授权复用官方/第三方 OAuth Client ID | 客户端冒充、封禁或条款违约 | 包中不存在独立 OAuth client;只调用官方 CLI 的公开登录命令 | P0 |
|
|
61
61
|
| 恶意 device-flow URI/code | 用户被引向钓鱼站或 token 被劫持 | discovery 与 device/token/revoke endpoint 全部固定;verification URI 只允许 `https://auth.x.ai` 精确路径;device_code 永不进入 renderer | P0 |
|
|
62
62
|
| 凭据 generation/账号目录混用 | 把请求发到错误账号 | 每次 prepare 冻结 auth generation;catalog、lease、logout、401 都绑定同一 generation;禁止 silent fallback | P0 |
|
|
@@ -80,6 +80,7 @@ macOS 官方默认路径可能是 symlink;验证时允许 symlink,但 `realp
|
|
|
80
80
|
| 用户动作 | 可执行参数 | 说明 |
|
|
81
81
|
|---|---|---|
|
|
82
82
|
| 检查版本 | `--version` | 10 秒、16 KiB 输出上限 |
|
|
83
|
+
| 探测浏览器登录 | `login --help` | 只确认独立 `--oauth` 选项,不执行登录 |
|
|
83
84
|
| 浏览器登录 | `login --oauth` | 标准配置下官方 CLI 打开浏览器并处理 callback |
|
|
84
85
|
| 退出 | `logout` | 官方 CLI 删除自己的凭据 |
|
|
85
86
|
|
|
@@ -104,7 +105,7 @@ macOS 官方默认路径可能是 symlink;验证时允许 symlink,但 `realp
|
|
|
104
105
|
|
|
105
106
|
官方 loopback 登录可能先清除旧 credential,取消/失败也可能使共享会话失效;成功后 CLI 还可能同步 managed config 或发送其自身已启用的遥测。插件无法撤销这些官方副作用。登录前 UI 必须提示,`logout` 必须经前台用户确认,且会影响所有共享同一 `GROK_HOME` 的应用。
|
|
106
107
|
|
|
107
|
-
“插件不自动更新”只约束本插件;官方 CLI 自身的更新检查/替换仍属于 vendor boundary
|
|
108
|
+
“插件不自动更新”只约束本插件;官方 CLI 自身的更新检查/替换仍属于 vendor boundary。版本输出仅用于有界诊断,不能充当信任证明。每次动作仍重新解析 executable identity;登录还必须通过命令能力探测,并在完成后重新验证生产 OIDC 凭据契约。任何检查失败都不得回退到 PATH、其他命令、shell 或非生产凭据。
|
|
108
109
|
|
|
109
110
|
### 状态机
|
|
110
111
|
|
|
@@ -144,7 +145,7 @@ type PublicAuthStatus = {
|
|
|
144
145
|
- `1.0.5` 的真实 `auth.json` 同时包含 refresh token。Host 对文件的有界读取会短暂接触包含它的原始字节;实现不得缓存、使用、记录或写回 refresh token,解析后只保留闭合校验元数据与短期 access-token lease。该约束缩短暴露窗口但不构成进程级隔离。
|
|
145
146
|
- 文件路径只由 OS home、官方 `GROK_HOME` 约定和 Host 环境解析;UI 不可选择路径。
|
|
146
147
|
- 读取前后检查文件元数据,降低替换竞态;解析失败时不保留部分值。
|
|
147
|
-
- 生产 OIDC schema
|
|
148
|
+
- 生产 OIDC schema 候选筛选必须契约化:顶层对象有界且只有一个候选;map key 等于规范化 issuer 与 client ID 组合;`auth_mode === "oidc"`;issuer 精确等于 xAI 生产 issuer;scope、client ID、access token 和 `expires_at` 关系闭合。拒绝 external、api_key、web_login、legacy scope、企业 issuer、多候选和未知关键模式。安全关键字段的变更必须重新评审;不影响既有语义的附加字段可以忽略。
|
|
148
149
|
- 上述 metadata 未签名,官方源码也只把 auth mode/issuer 当 provenance/debug hint;它不是密码学 trust assertion。插件在信任官方 CLI 与当前用户凭据目录的前提下做本地失败关闭,真实 bearer 最终由固定 xAI Proxy 服务端验证。
|
|
149
150
|
- access token 只在 Host 内存使用;缓存采用短生命周期并可显式清空。Host 有界读取完整 JSON 时原始 buffer/string 可能瞬时包含 refresh token;解析器不提取、不缓存、不使用、不返回、不记录、不写回该字段,且 JavaScript 内存不承诺可靠清零。
|
|
150
151
|
- 解析 `expires_at` 并使用固定 skew 在发送前拒绝过期/将过期凭据。只有 issuer、client ID、scope 与 schema 全部匹配而时间失效时,才 single-flight 启动固定 `grok models`;OAuth refresh 状态机和文件写回仍由官方 CLI 完成。刷新后必须重新读取并完整校验,只重试一次。
|
package/docs/05-test-plan.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
- 所有本地模拟服务使用随机 loopback 端口,不访问真实第三方。
|
|
8
8
|
- 真实账号 smoke 只在发布候选上人工执行,记录脱敏结果。
|
|
9
9
|
- `0.1.0` 发布前必须通过 macOS arm64 真机与 macOS/Windows 自动化矩阵;Windows x64 首次真机验证在发布后对 Registry 精确版本执行,验证前对外标注“代码支持、真机未验证”。
|
|
10
|
-
- `0.1.1` 及后续版本不要求每次重复真机验证;自动化矩阵、契约测试、干净安装和 tarball
|
|
10
|
+
- `0.1.1` 及后续版本不要求每次重复真机验证;自动化矩阵、契约测试、干净安装和 tarball 校验是常规发版门禁。认证流程、平台 subprocess seam 或安全契约发生变化的版本仍须做对应平台的定向真机验证。
|
|
11
11
|
|
|
12
12
|
## 2. Gate 0:方案确认
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
- macOS 在标准 Grok 配置下从 Harness Host 启动 `grok login --oauth`,默认浏览器成功打开。
|
|
23
23
|
- Windows 在标准 Grok 配置下从 Harness Host 启动 `grok.exe login --oauth`,默认浏览器成功打开。
|
|
24
24
|
- 插件到 CLI 的 `ctx.subprocess` argv 不经 shell,不需要用户另开 Terminal/PowerShell;不声称官方 CLI 及其后代端到端无 shell。
|
|
25
|
-
-
|
|
25
|
+
- 记录验收所用 Grok CLI 版本、官方 tag/commit 与可用的 `SOURCE_REV`;版本只用于复现和诊断。兼容性由可执行文件、命令能力、生产 OIDC 凭据契约与固定服务端 codec 共同决定,不以完整版本字符串作为 allowlist。
|
|
26
26
|
- 标准配置成功后凭据由官方 CLI 管理;验证“已有会话→重新登录取消/失败”可能清除旧会话、成功后的 managed-config sync,以及 logout 会影响共享 `GROK_HOME` 的其他应用。
|
|
27
27
|
- 取消、5 分钟超时、CLI 非零退出和 Harness 卸载都会终止并等待 Harness seam 可观察的受管进程树;单独记录官方 CLI 主动脱离的后代和系统浏览器。
|
|
28
28
|
- stdout/stderr 不进入 UI、session log 或普通日志。
|
|
@@ -54,7 +54,9 @@
|
|
|
54
54
|
- Windows reparse point、目录、设备文件和非 `.exe` 候选失败。
|
|
55
55
|
- 相对或 UI/RPC 提供的 `GROK_HOME` 失败;只接受 Host 启动时冻结的绝对值。
|
|
56
56
|
- workspace/PATH 中的假 `grok` 不会被选中。
|
|
57
|
-
- `--version`
|
|
57
|
+
- `--version` 超时、超限、非零退出、stderr 非空或非单行 `grok ...` 输出失败;合法的未知版本输出不得仅因版本号不同而失败。
|
|
58
|
+
- 登录前 `login --help` 必须成功并包含独立 `--oauth` 选项;缺失、畸形、超时、超限或非零退出时不得启动 `login --oauth`。
|
|
59
|
+
- 覆盖 macOS `grok 1.0.5 (5115b46bc909)` 与 Windows `grok 0.2.82 (6d0b07d2de) [stable]` 的真实输出形状,并断言两者都能在能力存在时进入固定登录 argv。
|
|
58
60
|
- 登录期间 symlink/文件 identity/version 改变,或官方 CLI 自更新到未测试版本时失败关闭;不把 vendor updater 误记成插件下载安装。
|
|
59
61
|
- 路径/owner/version 检查不得在 UI 中宣称已密码学证明 publisher;从非官方安装入口取得的候选不在支持范围。
|
|
60
62
|
|
|
@@ -221,4 +223,4 @@ Web 与 TUI 分别验证:
|
|
|
221
223
|
- Windows x64 自动化平台测试通过,且 README、release notes 和 marketplace 元数据在首次真机验证前明确披露“代码支持、真机未验证”。
|
|
222
224
|
- npm 回读的 SHA-512 与本地发布 tarball 一致。
|
|
223
225
|
|
|
224
|
-
`0.1.0` 发布后必须完成一次 Windows x64 Registry 精确版本的 production inspector、浏览器登录、聊天与工具调用 smoke,并记录结果。`0.1.1` 及后续版本以 CI
|
|
226
|
+
`0.1.0` 发布后必须完成一次 Windows x64 Registry 精确版本的 production inspector、浏览器登录、聊天与工具调用 smoke,并记录结果。`0.1.1` 及后续版本以 CI/契约/安装/制品校验为常规门禁;认证流程、Harness subprocess seam 或平台安全策略发生变化时必须定向真机验证。`0.1.2` 正在修复 Windows 登录门禁,须从候选包完成 Windows 浏览器登录、凭据复验、模型刷新和最小对话后才能获得发布授权。
|
package/docs/06-release-plan.md
CHANGED
|
@@ -128,7 +128,7 @@ patch 路径必须为不含 `..`、绝对路径、反斜线或 NUL 的相对 `.y
|
|
|
128
128
|
|
|
129
129
|
## 7. Git 与版本
|
|
130
130
|
|
|
131
|
-
- `0.1.0` 历史开发分支:`yukiryou/v0.1.0
|
|
131
|
+
- `0.1.0` 历史开发分支:`yukiryou/v0.1.0`;当前版本分支:`yukiryou/v0.1.2`。
|
|
132
132
|
- `package.json`、CHANGELOG、release notes、Git tag 和 tarball 必须使用同一个精确候选版本。
|
|
133
133
|
- 发布提交必须干净且可复现。
|
|
134
134
|
- tag 使用 `v<major>.<minor>.<patch>`,只在发布提交确定后创建。
|
|
@@ -137,6 +137,10 @@ patch 路径必须为不含 `..`、绝对路径、反斜线或 NUL 的相对 `.y
|
|
|
137
137
|
|
|
138
138
|
`0.1.0` 发布后,后续版本从已发布基线 `yukiryou/main` 创建 `yukiryou/v<next-version>`。普通开发、文档、测试和发布准备都停留在版本分支;只有仓库所有者明确开始该版本发布时才合并回发布基线并创建不可变 tag。
|
|
139
139
|
|
|
140
|
+
### 7.1 预发行版本政策
|
|
141
|
+
|
|
142
|
+
`0.1.2-rc.1` 是一次历史预发行尝试。仓库所有者决定从稳定 `0.1.2` 起不再发行新的预发行版本;已发布 RC 保留为不可变历史记录,不覆盖、不删除,也不作为后续开发基线。正式版发现缺陷时直接创建下一递增稳定版本分支并按完整发布门禁修复。
|
|
143
|
+
|
|
140
144
|
## 8. 发布方式
|
|
141
145
|
|
|
142
146
|
优先从公开 GitHub 仓库的 GitHub-hosted runner 使用 npm provenance 发布。
|
|
@@ -145,9 +149,9 @@ patch 路径必须为不含 `..`、绝对路径、反斜线或 NUL 的相对 `.y
|
|
|
145
149
|
|
|
146
150
|
CI 使用的官方 GitHub Actions 必须固定到已核对的完整 commit SHA;不得依赖可移动 major tag 作为发布门禁实现。
|
|
147
151
|
|
|
148
|
-
|
|
152
|
+
长期发布工作流只接受严格稳定 tag `v<major>.<minor>.<patch>` 和对应 GitHub Release tarball 的 base64 SHA-512。工作流必须:
|
|
149
153
|
|
|
150
|
-
1. 从 tag
|
|
154
|
+
1. 从 tag 派生版本和唯一产物名;不接受 prerelease、build metadata、路径字符、自由格式文件名或调用者指定 dist-tag。
|
|
151
155
|
2. 只下载对应 GitHub Release 的 `dsh-grok-provider-<version>.tgz`。
|
|
152
156
|
3. 在发布前核对输入 SHA-512,以及 tarball 内的 name、version 和 canonical repository。
|
|
153
157
|
4. 使用 Node 24、固定 npm CLI 版本、GitHub-hosted Ubuntu runner、`environment: npm` 和 `id-token: write`。
|
|
@@ -185,7 +189,7 @@ scoped 包首次公开发布必须保留 `--access public`。
|
|
|
185
189
|
npm 发布不会自动成为受管可安装项。`0.1.0` 当前发现状态:
|
|
186
190
|
|
|
187
191
|
- GitHub 仓库已添加 DeepSeek Harness 官方推荐的 `dsh-plugin` 与 `dsh` Topics,可被 Topic 驱动来源发现。
|
|
188
|
-
- YukiRyou curated catalog 已加入精确 `dsh-grok-provider@0.1.0`,只标记完成真实验收的 `darwin-arm64
|
|
192
|
+
- YukiRyou curated catalog 已加入精确 `dsh-grok-provider@0.1.0`,只标记完成真实验收的 `darwin-arm64`。`0.1.1` 是文档与发布流程修正版,按仓库所有者决定不重复真机;catalog schema 又只允许精确版本 `installed` 语义,因此条目保持 `0.1.0`,不把制品校验或模块加载冒充受管 Harness 真机安装。
|
|
189
193
|
- 公共 `awesome-dsh-plugin` curated 目录要求仓库创建满 1 天且至少 10 个提交;提交数已满足,需在年龄门槛满足后提交外部 PR。
|
|
190
194
|
- Windows x64 仍需对 Registry 精确 `0.1.0` 完成首次 production inspector、安装、重启、浏览器登录、聊天、工具调用和重新认证;完成前保持“代码支持、真机未验证”。
|
|
191
195
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
# 当前实现与发布状态
|
|
2
2
|
|
|
3
|
+
稳定 `0.1.2` 已获得直接发布授权。仓库所有者决定不再发行预发行版,正式版缺陷通过新的递增稳定版本修复。Windows x64 有代码与 CI 覆盖,但独立真机验收不再阻断 `0.1.2`,该限制在 README 与 Release 中公开披露。
|
|
4
|
+
|
|
3
5
|
状态日期:2026-08-26
|
|
4
|
-
当前发布线:`dsh-grok-provider@0.1.
|
|
5
|
-
|
|
6
|
+
当前发布线:`dsh-grok-provider@0.1.2`
|
|
7
|
+
下一版本分支:发布后创建 `yukiryou/v0.1.3`
|
|
6
8
|
|
|
7
9
|
## 已实现
|
|
8
10
|
|
|
9
11
|
- 原创 Host provider、固定 Grok Build transport、动态账号模型目录和严格 Responses SSE codec。
|
|
10
12
|
- 文本、reasoning、usage、`stop|tool-calls|max-tokens`、函数调用/结果、多轮历史和加密 reasoning replay。
|
|
11
|
-
- 官方 CLI
|
|
13
|
+
- 官方 CLI 单路径:固定默认路径、版本仅作有界诊断、登录能力探测、受控 cwd/环境、固定 argv、无 shell spawn、10 秒准备期限、5 分钟登录期限、2 分钟退出期限、整棵进程树取消与异步卸载等待;`grok login --oauth` 负责打开浏览器和持久化 token,CLI 退出 0 后插件再次校验生产 OIDC credential schema。
|
|
12
14
|
- 包中不存在独立 OAuth client identity、device flow、插件实现的 refresh/revoke、Harness credential grant 或模式选择接口;过期 access token 只通过 single-flight、30 秒有界的官方 CLI `models` 命令续期,插件不提取 refresh token、不执行 refresh grant、不写凭据文件。ADR-0003 已由 ADR-0005 取代。
|
|
13
15
|
- Web:Harness settings section、中文/英文、loopback-only RPC、登录状态轮询、陈旧 session 防护、取消和二次退出确认;新增参考 Harness 信息层级的账户卡、真实 billing 周期/重置时间和动态模型 capability 卡。完整类型化周期可恢复 proto3 省略的零使用率,其他缺失百分比仍显示未知;renderer 不接触 token 或 identity。
|
|
14
16
|
- TUI:闭合 `/grok status|login|cancel|logout` grammar,`recordInput:false`,不输出 CLI 原文或 token。
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
|
|
17
19
|
## 已验证
|
|
18
20
|
|
|
19
|
-
- Node 完整构建/测试通过:
|
|
21
|
+
- Node 完整构建/测试通过:60 项,58 pass、0 fail、2 项 Windows-only 在 macOS 按预期跳过并由 CI matrix 承接。
|
|
20
22
|
- `npm audit --omit=dev`:0 vulnerability。
|
|
21
23
|
- 新认证接口的本地候选已安装到隔离的 Harness `0.1.1-rc.2` TUI/Web profile。真实 TUI 的缺失凭据 `unavailable`、`/grok login` 浏览器跳转、官方 CLI 登录成功和有效凭据 `ready` 均通过。真实 Web 的 client bundle 发现、Grok 设置页、登录启动/取消、Host 重启和临时 profile 卸载均通过;rc.2 scanner 所需的 `./package.json` 导出已加入回归测试。
|
|
22
24
|
- Web/TUI 的 `available` 现在实际验证官方 credential contract,不再把 credential source 已注册误报为 ready;缺失凭据的真机 Web/TUI 双向验证通过。
|
|
@@ -50,3 +52,12 @@
|
|
|
50
52
|
Windows x64 真机不再是 `0.1.0` 预发布阻断项。首次发布后必须从 Registry 安装精确 `0.1.0`,完成官方安装物 Authenticode/hash、浏览器登录、取消/超时/卸载、动态全部模型、聊天、reasoning replay、工具调用和 production inspector;完成前对 Windows 保持“代码支持、真机未验证”标识。`0.1.1` 及后续版本不要求重复真机验证,以两平台 CI、契约测试、干净安装和制品校验作为常规门禁。
|
|
51
53
|
|
|
52
54
|
仓库所有者已于 2026-08-26 明确授权发布精确 `dsh-grok-provider@0.1.1`。该版本只修正发布事实与长期发布流程,不改变运行时协议或能力边界。
|
|
55
|
+
|
|
56
|
+
## `0.1.1` 发布结果
|
|
57
|
+
|
|
58
|
+
- 受保护 PR #3 合并后的 release commit 为 `a973828bcdd906836b68018f7592e73f769f9c3e`,`v0.1.1` 精确指向该 commit。
|
|
59
|
+
- GitHub Release 采用中文在前、英文在后且正文不重复版本标题,只附加唯一 `dsh-grok-provider-0.1.1.tgz`。
|
|
60
|
+
- 正式 tarball 为 48 个文件、93,992 bytes;SHA-256 为 `9bcd2362af369ace69763cfed11d843d9574a43b134c7e194e589750ba4081c7`,npm SRI 为 `sha512-O2Rh21NBZkqwXu7iUWKi8OwKzZaOHZ5sB0+Ny0w9VYgxXzVRXWHtsPfqmz4EpY6Cn8kSBsiJ3jVOJT/UQpEFKw==`。
|
|
61
|
+
- Trusted Publisher OIDC workflow run `32936282879` 发布成功;npm `latest` 指向 `0.1.1`,provenance 绑定 canonical repository、`release.yml`、`yukiryou/main` 与上述 release commit。
|
|
62
|
+
- Registry 重新下载文件与本地/GitHub Release 候选逐字节一致;9 个 Registry 签名与 1 个 provenance attestation 验证通过;npm 页面 README 已回读为 `0.1.1` 最终公开状态。
|
|
63
|
+
- YukiRyou catalog 仍精确保留已完成受管 Harness 真机安装的 `0.1.0`。其 schema 不允许把仅完成完整性、provenance、Node 24 干净安装和模块加载的 `0.1.1` 标成 `installed`;遵循“不重复真机验证”决定,因此不做虚假升级。
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
本文件是每个 npm 版本的强制发布门禁。准备者必须从版本分支逐项完成并保存证据;未全部关闭前不得合并发布基线、创建最终 tag、发布 GitHub Release 或执行 `npm publish`。发布还需要仓库所有者明确授权,检查表全绿本身不构成发布授权。
|
|
4
4
|
|
|
5
|
+
`0.1.2-rc.1` 是历史上唯一一次预发行尝试。从稳定 `0.1.2` 起不再发行预发行版本;正式版缺陷通过新的递增稳定版本修复。下列稳定版完整合并门禁适用于所有后续发布。
|
|
6
|
+
|
|
5
7
|
## 每版发布前
|
|
6
8
|
|
|
7
9
|
- [ ] 冻结精确稳定版本,并同步 `package.json`、CHANGELOG、中英文 README、release notes 和候选文件名。
|
|
@@ -47,7 +49,27 @@
|
|
|
47
49
|
- [x] 本地完整测试 57 项通过(55 pass、2 项 Windows-only 按预期跳过),`npm audit --omit=dev` 为 0 vulnerability,GitHub macOS/Windows CI 均通过。
|
|
48
50
|
- [x] 从提交 `d35bda3402db5b16edd83d81420f1068006254a8` 生成预审 tarball;48 个文件、93,652 bytes,SHA-256 `bdaf7c32a22afd74e1c526e07c91f441942fedab3e0d34c01134fedda6e323b9`,SRI `sha512-ENpeVSsHDiByG6Cf03pl1j4eRHAsYQkrwU4sVAMct4D2aFXoZoFTivP0ZpwaM1tzD0NdXlPzlLdtlSd0F48wCw==`;同一文件在全新临时目录完成 peer 安装、manifest 回读与 Host 模块加载。
|
|
49
51
|
- [x] 仓库所有者于 2026-08-26 明确授权发布精确 `dsh-grok-provider@0.1.1`;README/状态页已切换为最终公开事实,CHANGELOG 日期已冻结。
|
|
50
|
-
- [
|
|
51
|
-
- [
|
|
52
|
+
- [x] 从最终 release commit `a973828bcdd906836b68018f7592e73f769f9c3e` 生成并验收唯一发布 tarball;预审 tarball 未进入 Release。正式制品 48 个文件、93,992 bytes,SHA-256 `9bcd2362af369ace69763cfed11d843d9574a43b134c7e194e589750ba4081c7`,SRI `sha512-O2Rh21NBZkqwXu7iUWKi8OwKzZaOHZ5sB0+Ny0w9VYgxXzVRXWHtsPfqmz4EpY6Cn8kSBsiJ3jVOJT/UQpEFKw==`。
|
|
53
|
+
- [x] GitHub Release、Trusted Publisher OIDC npm 发布、Registry 逐字节回读、签名与 provenance 验证全部完成;npm `latest` 指向 `0.1.1`。
|
|
52
54
|
|
|
53
55
|
English summary: every release must close documentation, security, tests, deterministic artifact, bilingual release notes, OIDC identity, integrity, and post-publish readback gates before publication. A green checklist never replaces explicit owner approval.
|
|
56
|
+
|
|
57
|
+
## `0.1.2-rc.1` 预发行记录
|
|
58
|
+
|
|
59
|
+
- [x] 使用版本分支 `yukiryou/v0.1.2`,不提前合并稳定基线。
|
|
60
|
+
- [x] Windows `0.2.82` 回归、macOS/Windows CI、生产依赖审计与 dry-run 打包通过。
|
|
61
|
+
- [x] 仓库所有者明确授权发布精确 `dsh-grok-provider@0.1.2-rc.1` 到 npm `next`;未授权稳定 `0.1.2`。
|
|
62
|
+
- [x] 从提交 `6e6201734cab1d8b7d4aa88535b3a3e7e02376ea` 冻结唯一预发行 tarball并附加到 GitHub prerelease:51 个文件、99,559 bytes,SHA-256 `b47d3de72ddb718159d0ede5d2a3e0e1c91b09900134bb48951d82cb93ac489e`,SRI `sha512-NpmuJYvsqnpaupChDfwumOZ69ikwXc8pg/CZqnbGJwpVFy/Y05/QT9q99pj33ON5u8sp1pm0uAzGmC1Db8Qg6Q==`。
|
|
63
|
+
- [x] Trusted Publisher run `32956881639` 从不可变 `v0.1.2-rc.1` 标签发布成功;Registry 回读确认 `next=0.1.2-rc.1`、`latest=0.1.1`,重新下载文件逐字节一致,1 个 Registry 签名与 1 个 provenance attestation 验证通过。
|
|
64
|
+
- [ ] Windows x64 从 npm 精确预发行版本完成浏览器登录、凭据复验、模型刷新与最小对话。
|
|
65
|
+
|
|
66
|
+
仓库所有者随后终止预发行验收路线并授权直接发布稳定 `0.1.2`;上述未完成项保留为历史事实,不转写为已验收。
|
|
67
|
+
|
|
68
|
+
## `0.1.2` 发布记录
|
|
69
|
+
|
|
70
|
+
- [x] 仓库所有者明确授权直接发布精确稳定 `dsh-grok-provider@0.1.2`,Windows 独立真机验收不再作为阻断项。
|
|
71
|
+
- [x] 仓库所有者决定以后不再发行预发行版;正式版缺陷使用新的递增稳定版本修复。
|
|
72
|
+
- [x] 中英文 README、正式 Release 说明、安全状态和发布政策已同步,并公开披露 Windows 独立真机尚未完成。
|
|
73
|
+
- [x] 稳定 manifest、稳定版专用 Trusted Publisher workflow、完整测试、审计与双平台 CI 通过;CI run `32980619235` 的 macOS 14 与 Windows 2022 job 均成功。
|
|
74
|
+
- [ ] 版本分支经 PR 合并 `yukiryou/main`,从 release commit 冻结唯一稳定 tarball与不可变 `v0.1.2` tag。
|
|
75
|
+
- [ ] GitHub Release、npm `latest`、Registry 逐字节回读、签名与 provenance 验证完成。
|
package/docs/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Grok Build Provider 文档索引
|
|
2
2
|
|
|
3
|
-
-
|
|
4
|
-
-
|
|
5
|
-
-
|
|
3
|
+
- 状态:**稳定版 `0.1.2`:Windows Grok CLI 兼容性修正**
|
|
4
|
+
- 当前稳定版本:`0.1.2`
|
|
5
|
+
- 下一版本分支:发布后创建 `yukiryou/v0.1.3`
|
|
6
6
|
- 兼容基线:DeepSeek Harness `0.1.1-rc.2`
|
|
7
7
|
- 目标平台:macOS arm64、Windows x64
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
首版采用单一认证路线:插件发起官方 Grok Build CLI 浏览器登录并复用由官方 CLI 持久化的会话。插件不注册独立 OAuth client,也不持久化第二份 token。
|
|
14
14
|
|
|
15
15
|
1. 用户在 Harness 设置页点击“使用 Grok 登录”,或在 TUI 输入 `/grok login`。
|
|
16
|
-
2. 插件 Host 通过 Harness `ctx.subprocess` 以固定 argv
|
|
16
|
+
2. 插件 Host 通过 Harness `ctx.subprocess` 以固定 argv 启动经路径、能力与凭据契约约束的 Grok CLI 候选;该启动层不经过 shell。标准配置下由官方 CLI 完成系统浏览器、OAuth、loopback callback 和凭据写入。
|
|
17
17
|
3. 插件只读官方凭据文件并接受绑定 schema;token 不进入 renderer、settings、RPC、本插件日志或 workspace。
|
|
18
18
|
4. 模型目录只请求固定 `GET /v1/models`;推理按目录中经过验证的 `api_backend` 选择闭合 endpoint。当前真实模型都走固定 `POST /v1/responses`;拒绝重定向和自定义 endpoint。
|
|
19
19
|
5. 模型目录从固定 `/v1/models` 动态发现账号当前可用的全部 Grok Build 模型;本机当前快照为 `grok-4.6` 与 `grok-4.5`。
|
|
@@ -38,16 +38,19 @@
|
|
|
38
38
|
- [当前实现与发布状态](./09-implementation-status.md)
|
|
39
39
|
- [逐版发布检查表](./10-release-checklist.md)
|
|
40
40
|
- [v0.1.1 中英双语发行说明](./releases/v0.1.1.md)
|
|
41
|
+
- [v0.1.2 中英双语发行说明](./releases/v0.1.2.md)
|
|
42
|
+
- [v0.1.2-rc.1 中英双语预发行说明](./releases/v0.1.2-rc.1.md)
|
|
41
43
|
- [ADR-0001:认证与传输路线](./adr/0001-auth-and-transport-route.md)
|
|
42
44
|
- [ADR-0002:首版能力边界](./adr/0002-v0.1-scope.md)
|
|
43
45
|
- [ADR-0003:已被取代的双认证设计](./adr/0003-dual-authentication.md)
|
|
44
46
|
- [ADR-0004:动态全模型目录](./adr/0004-dynamic-model-catalog.md)
|
|
45
47
|
- [ADR-0005:官方 CLI 单一认证路径](./adr/0005-official-cli-only-authentication.md)
|
|
46
48
|
- [ADR-0006:账户额度与模型能力面板](./adr/0006-account-dashboard.md)
|
|
49
|
+
- [ADR-0007:以能力与凭据契约判断 CLI 兼容性](./adr/0007-capability-based-cli-compatibility.md)
|
|
47
50
|
|
|
48
51
|
## 开发门禁
|
|
49
52
|
|
|
50
|
-
`0.1.
|
|
53
|
+
`0.1.2-rc.1` 是唯一一次预发行尝试。仓库所有者决定直接发布稳定 `0.1.2`,以后不再发行预发行版;正式版缺陷通过新的递增稳定版本修复。Windows 独立真机验收不阻断本次发布,但其未完成状态必须公开披露。后续版本仍须先完成[逐版发布检查表](./10-release-checklist.md),再由仓库所有者明确授权发布。
|
|
51
54
|
|
|
52
55
|
## 官方依据
|
|
53
56
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# ADR-0007:以能力与凭据契约判断 Grok CLI 兼容性
|
|
2
|
+
|
|
3
|
+
- 状态:Accepted
|
|
4
|
+
- 日期:2026-08-26
|
|
5
|
+
- 修订:ADR-0005 中“精确版本约束”的部分;官方 CLI 单一路线保持不变
|
|
6
|
+
|
|
7
|
+
## 背景
|
|
8
|
+
|
|
9
|
+
`0.1.1` 在每次认证动作前把 `grok --version` 的完整输出与
|
|
10
|
+
`grok 1.0.5 (5115b46bc909)` 做逐字匹配。Windows 真机安装的官方 Grok Build CLI
|
|
11
|
+
`0.2.82` 能正常执行 `grok login --oauth`,但插件在版本检查阶段提前失败,浏览器因此不会打开。
|
|
12
|
+
|
|
13
|
+
完整版本字符串只能说明一个构建标识,不能证明命令能力、凭据来源或服务端协议兼容性。把它作为唯一门禁还会让官方 CLI 的兼容更新无条件破坏登录。
|
|
14
|
+
|
|
15
|
+
## 决定
|
|
16
|
+
|
|
17
|
+
从 `0.1.2` 起,不再维护 Grok CLI 完整版本 allowlist。认证模块保留小接口
|
|
18
|
+
`login`、`logout`、`refresh`,并在内部完成以下检查:
|
|
19
|
+
|
|
20
|
+
1. 只解析官方默认 `~/.grok/bin/grok` 或 `%USERPROFILE%\.grok\bin\grok.exe`;继续校验绝对路径、realpath、普通文件、所有者/目录包含关系和 Windows reparse point。
|
|
21
|
+
2. `grok --version` 必须在期限与输出上限内成功,并返回单行、可安全显示为诊断信息的 `grok ...` 文本;版本值不再决定兼容性。
|
|
22
|
+
3. 登录前执行固定的 `grok login --help` 能力探测;只有成功返回独立的 `--oauth` 选项后,才允许执行固定 argv `grok login --oauth`。
|
|
23
|
+
4. 所有命令继续通过 Harness subprocess seam、绝对 argv、固定 cwd、过滤环境、无插件显式 shell、输出上限、deadline 与进程树等待执行。插件不解析或转发 OAuth URL。
|
|
24
|
+
5. CLI 退出成功不等于登录成功。认证 driver 必须重新读取官方凭据,并只接受 xAI 生产 issuer、官方 public client、`oidc` 模式、有效 access token/expiry 和无歧义候选。API key、external provider、企业 OIDC、自定义 endpoint 与不完整记录继续失败关闭。
|
|
25
|
+
6. 模型、额度与推理仍由固定 HTTPS origin/path 及严格响应 codec 校验。未知 CLI 版本不能放宽这些网络约束。
|
|
26
|
+
|
|
27
|
+
`logout` 与 `models` 保持固定命令;未知版本若不支持它们,会以非零退出安全失败,不回退到其他命令或 shell。未来若命令语义发生变化,新增相应能力探测和契约测试,而不是恢复完整版本硬锁。
|
|
28
|
+
|
|
29
|
+
## 安全含义
|
|
30
|
+
|
|
31
|
+
- “不固定版本”不等于信任 PATH 中任意 `grok`,也不等于接受任意 OAuth 凭据;可执行文件、命令能力、凭据契约和固定服务端校验缺一不可。
|
|
32
|
+
- `login --help` 是兼容性探测,不是发布者或签名证明。用户仍须从 xAI 官方渠道安装 CLI。
|
|
33
|
+
- 官方 `grok login` 会重新认证并替换共享缓存会话,`grok logout` 会清除该会话;这会影响共用同一 Grok home 的其他应用。UI 必须在登录和退出前披露该副作用。
|
|
34
|
+
- 新字段可在不改变已验证语义时被忽略;认证模式、issuer、client、候选唯一性、token 与 expiry 等安全关键字段必须继续闭合校验。
|
|
35
|
+
|
|
36
|
+
## 发布门禁
|
|
37
|
+
|
|
38
|
+
- 自动化测试必须覆盖 macOS `1.0.5` 与 Windows `0.2.82` 的真实版本输出形状。
|
|
39
|
+
- 必须覆盖:能力存在时进入 `login --oauth`;能力缺失、版本输出畸形、命令超时/超限/非零退出时不进入登录动作。
|
|
40
|
+
- `0.1.2` 改动 Windows 登录安全路径,因此发布前需要 Windows x64 真机从候选包完成浏览器登录、凭据复验、模型刷新与一次最小对话。未经仓库所有者验收和明确发布授权,不得发布 npm 版本。
|
|
41
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
## 中文
|
|
2
|
+
|
|
3
|
+
这是 Windows 登录修复的公开验收预发行版。它发布到 npm `next`,不会替代稳定版 `0.1.1`。
|
|
4
|
+
|
|
5
|
+
### 主要变化
|
|
6
|
+
|
|
7
|
+
- 修复 Windows 官方 Grok Build CLI `0.2.82` 在打开浏览器前被完整版本硬锁拒绝的问题。
|
|
8
|
+
- 登录前通过固定 `grok login --help` 探测独立的 `--oauth` 能力,再执行固定 `grok login --oauth`。
|
|
9
|
+
- 保留官方默认路径、可执行文件身份、过滤环境、无插件显式 shell、输出/deadline 上限和进程树等待。
|
|
10
|
+
- CLI 成功退出后仍严格复验 xAI 生产 OIDC 凭据;API key、external provider、企业 OIDC、自定义 endpoint 和歧义记录继续失败关闭。
|
|
11
|
+
- Windows `0.2.82`、macOS 既有路径、能力缺失和畸形输出均有自动化回归覆盖。
|
|
12
|
+
|
|
13
|
+
### 安装与验收
|
|
14
|
+
|
|
15
|
+
```powershell
|
|
16
|
+
npx --yes @deepseek-ai/dsh plugin --profile web add dsh-grok-provider@0.1.2-rc.1
|
|
17
|
+
npx --yes @deepseek-ai/dsh web
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
也可以在已有桌面端插件安装入口中输入精确版本 `dsh-grok-provider@0.1.2-rc.1`。请验证浏览器登录、登录状态、模型刷新和一次最小对话。验收成功后仍会另行准备并授权稳定 `0.1.2`。
|
|
21
|
+
|
|
22
|
+
## English
|
|
23
|
+
|
|
24
|
+
This is the public Windows acceptance prerelease for the login fix. It is published under npm `next` and does not replace stable `0.1.1`.
|
|
25
|
+
|
|
26
|
+
### Highlights
|
|
27
|
+
|
|
28
|
+
- Fix the official Windows Grok Build CLI `0.2.82` being rejected by a complete-version lock before the browser could open.
|
|
29
|
+
- Probe the independent `--oauth` capability with fixed `grok login --help`, then invoke fixed `grok login --oauth`.
|
|
30
|
+
- Preserve official-default-path and executable-identity checks, scrubbed environment, no plugin-explicit shell, output/deadline bounds, and managed process-tree waiting.
|
|
31
|
+
- After a zero exit, strictly revalidate the xAI production OIDC credential. API keys, external providers, enterprise OIDC, custom endpoints, and ambiguous records remain fail-closed.
|
|
32
|
+
- Add automated regressions for Windows `0.2.82`, the existing macOS path, missing capability, and malformed output.
|
|
33
|
+
|
|
34
|
+
### Install and accept
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
npx --yes @deepseek-ai/dsh plugin --profile web add dsh-grok-provider@0.1.2-rc.1
|
|
38
|
+
npx --yes @deepseek-ai/dsh web
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
You can also enter the exact `dsh-grok-provider@0.1.2-rc.1` version in an existing desktop plugin installer. Validate browser sign-in, authenticated status, model refresh, and one minimal chat. Stable `0.1.2` will still be prepared and authorized separately after acceptance.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
## 中文
|
|
2
|
+
|
|
3
|
+
`0.1.2` 修复 Windows 上官方 Grok Build CLI 已安装且可独立登录,但 Provider 在打开浏览器前立即显示“登录失败”的问题。
|
|
4
|
+
|
|
5
|
+
### 主要变化
|
|
6
|
+
|
|
7
|
+
- 删除对完整输出 `grok 1.0.5 (5115b46bc909)` 的硬编码登录门禁;Windows 官方 CLI `0.2.82` 不再仅因版本号不同被拒绝。
|
|
8
|
+
- 登录前以固定 `grok login --help` 探测独立的 `--oauth` 能力,通过后才运行固定 argv `grok login --oauth`。
|
|
9
|
+
- 保留官方默认路径、可执行文件身份、过滤环境、无插件显式 shell、输出与时间上限、进程树等待等安全控制。
|
|
10
|
+
- CLI 返回成功后仍必须重新读取并严格验证 xAI 生产 OIDC 凭据;API key、external provider、企业 OIDC、自定义 endpoint 和歧义记录继续失败关闭。
|
|
11
|
+
- 新增 Windows `0.2.82` 真实版本输出、能力缺失、畸形输出与 macOS 既有路径的回归测试。
|
|
12
|
+
|
|
13
|
+
### 兼容性
|
|
14
|
+
|
|
15
|
+
- DeepSeek Harness:`0.1.1-rc.2`
|
|
16
|
+
- Grok Build CLI:不锁完整版本;必须来自官方默认 Grok home、提供 `login --oauth`,并产生受支持的生产 OIDC 凭据
|
|
17
|
+
- macOS arm64:保留既有验收基线
|
|
18
|
+
- Windows x64:代码与 Windows CI 支持;本次正式发布未完成独立真机验收,发现问题将通过新的递增稳定版本修复
|
|
19
|
+
|
|
20
|
+
### 安装
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
dsh plugin --profile web add dsh-grok-provider@0.1.2
|
|
24
|
+
dsh web
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
项目不再发行预发行版;正式版本出现缺陷时,将发布新的递增稳定版本。
|
|
28
|
+
|
|
29
|
+
## English
|
|
30
|
+
|
|
31
|
+
`0.1.2` fixes a Windows failure where the official Grok Build CLI was installed and could sign in directly, but the provider reported “Sign-in failed” before opening the browser.
|
|
32
|
+
|
|
33
|
+
### Highlights
|
|
34
|
+
|
|
35
|
+
- Remove the hardcoded login gate for the complete `grok 1.0.5 (5115b46bc909)` output. The official Windows CLI `0.2.82` is no longer rejected solely because its version differs.
|
|
36
|
+
- Probe the independent `--oauth` capability with fixed `grok login --help` before invoking fixed argv `grok login --oauth`.
|
|
37
|
+
- Preserve official-default-path and executable-identity checks, scrubbed environment, no plugin-explicit shell, output/deadline bounds, and managed process-tree waiting.
|
|
38
|
+
- After a zero exit, reread and strictly validate the xAI production OIDC credential. API keys, external providers, enterprise OIDC, custom endpoints, and ambiguous records remain fail-closed.
|
|
39
|
+
- Add regressions for the real Windows `0.2.82` version shape, missing capability, malformed output, and the existing macOS path.
|
|
40
|
+
|
|
41
|
+
### Compatibility
|
|
42
|
+
|
|
43
|
+
- DeepSeek Harness: `0.1.1-rc.2`
|
|
44
|
+
- Grok Build CLI: no full-version lock; it must use the official default Grok home, provide `login --oauth`, and produce the supported production OIDC credential
|
|
45
|
+
- macOS arm64: existing acceptance baseline retained
|
|
46
|
+
- Windows x64: code and Windows CI supported; this stable release has not completed independent real-device acceptance, and any issue will be fixed in a new incremented stable version
|
|
47
|
+
|
|
48
|
+
### Install
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
dsh plugin --profile web add dsh-grok-provider@0.1.2
|
|
52
|
+
dsh web
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The project no longer publishes prereleases. Defects in a stable version will be fixed in a new incremented stable release.
|