dsh-coding-subscription-oauth 0.6.2 → 0.6.4

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/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # 🔐 dsh-coding-subscription-oauth
6
6
 
7
- **v0.6.2** · 原名 `dsh-grok-build`
7
+ **v0.6.4** · 原名 `dsh-grok-build`
8
8
 
9
9
  **面向 [DeepSeek Harness](https://github.com/deepseek-ai/dsh) 的编码订阅 OAuth 插件。** 把 SuperGrok / X Premium(Grok Build)、ChatGPT Plus/Pro(Codex)、Kimi Code、Claude Pro/Max 和 Google Antigravity 接到 DSH——不必再开一份按量 API-key,**也不要把 token 粘贴进聊天。**
10
10
 
@@ -13,13 +13,13 @@
13
13
 
14
14
  *[English](README.md) · [中文版](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Português (BR)](README.pt-BR.md) · [Español](README.es.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Русский](README.ru.md)*
15
15
 
16
- </div>
17
-
18
- ---
19
-
20
- > **升级:** 按 [`INSTALL.md`](INSTALL.md) 的版本化步骤操作。`0.6.2` 包含严格 Cordis 注入启动修复并正式支持 DSH `0.1.1-rc.2`;保留 profile、配置和凭据文件,更新后再重启一次现有 DSH Web 进程。`dsh-coding-oauth-core@0.1.0` 仍是共享 npm 依赖,不是需要单独安装的 DSH 插件。
21
-
22
- ---
16
+ </div>
17
+
18
+ ---
19
+
20
+ > **升级:** 按 [`INSTALL.md`](INSTALL.md) 的版本化步骤操作。`0.6.4` 将共享 dispatcher runtime 固定为 `dsh-coding-oauth-core@0.1.1` 与 `undici@7.29.0`;无需迁移配置、凭据、数据或路由。Grok Imagine 保留显式 pinned dispatcher。`0.6.2` 及之后版本已包含严格 Cordis 注入启动修复并正式支持 DSH `0.1.1-rc.2`;保留 profile、配置和凭据文件,更新后再重启一次现有 DSH Web 进程。
21
+
22
+ ---
23
23
 
24
24
  ## 项目更名
25
25
 
@@ -27,7 +27,7 @@
27
27
 
28
28
  | | 请用这个 | 仍然可用 |
29
29
  |---|---|---|
30
- | npm(推荐) | 当前版本是 `0.6.2`:`dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.2` | 没有发布过旧 npm 包 |
30
+ | npm(推荐) | 当前版本是 `0.6.4`:`dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.4` | 没有发布过旧 npm 包 |
31
31
  | GitHub / 开发安装 | [`dsh-coding-subscription-oauth`](https://github.com/lninghaha/dsh-coding-subscription-oauth) | 旧仓库 `dsh-grok-build` 已删除 |
32
32
  | CLI | `dsh-coding-oauth` | `dsh-grok-build` |
33
33
  | Cordis 插件 id | `llm-grok-build-oauth` | 不变 |
@@ -44,7 +44,7 @@
44
44
  - 🌐 **代理感知** —— 只代理审核过的订阅域名;Kimi 中国流量默认直连。
45
45
  - 📥 **手动 CLI 拉取** —— 设置页只读发现白名单内的官方 Grok/Codex/Kimi/Claude CLI OAuth 文件;预览并确认覆盖后,单向拉取一份副本。
46
46
  - 🗂️ **分栏设置页** —— Accounts、Gateway、Capabilities、About;远程主机优先设备码登录并弱化 CLI 缺失提示;已登录供应商卡片默认收起,展开后再编辑。
47
- - 🎛️ **可选能力默认关闭** —— Codex 搜索、用量/配额、图像生成/编辑、Fast、Grok Imagine 打开后立即生效。
47
+ - 🎛️ **可选能力默认关闭** —— Codex 搜索、用量/配额、图像生成/编辑、Fast、Grok Imagine 打开后立即生效。另有默认关闭的开关,允许非 Codex 模型路由调用 Codex 图像工具,同时保留 Codex 登录、会话和附件归属检查。
48
48
  - 🔌 **可选本地 API 网关** —— 默认关闭的 loopback OpenAI/Anthropic 兼容服务,支持复制 base URL 和 Bearer key,只给你自己的工具用,不是公网中继。
49
49
 
50
50
  ## 本插件解决的接入问题
@@ -79,13 +79,13 @@
79
79
 
80
80
  ```bash
81
81
  # 1. 安装当前 npm 发布版到 web profile
82
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.2
82
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.4
83
83
 
84
84
  # 2. 可选 —— Google Antigravity(固定审核过的版本)
85
85
  dsh plugin --profile web add dsh-agy@0.1.2
86
86
 
87
- # 3. 使用本机实际配置的进程管理器重启现有 DSH Web 进程
88
- # 官方 `dsh web` 是启动 web profile 的 CLI 别名,不是服务单元名。
87
+ # 3. 使用本机实际配置的进程管理器重启现有 DSH Web 进程
88
+ # 官方 `dsh web` 是启动 web profile 的 CLI 别名,不是服务单元名。
89
89
  ```
90
90
 
91
91
  然后打开 **设置 → 编码 OAuth** 登录任一供应商即可。选择器会自动列出已认证的模型。
@@ -116,11 +116,11 @@ dsh plugin --profile web add dsh-agy@0.1.2
116
116
 
117
117
  ## 安装
118
118
 
119
- 需要 DeepSeek Harness `0.1.1-rc.2` 与 Node.js 22.19+。完整细节见[安装说明](INSTALL.md)。
119
+ 需要 DeepSeek Harness `0.1.1-rc.2` 与 Node.js 22.19+。完整细节见[安装说明](INSTALL.md)。
120
120
 
121
121
  ```bash
122
122
  # 当前 npm 版本
123
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.2
123
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.4
124
124
 
125
125
  # 开发 / 备用:从 GitHub 安装
126
126
  dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
@@ -129,7 +129,7 @@ dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
129
129
  # dsh plugin --profile web add ./dsh-coding-subscription-oauth
130
130
  ```
131
131
 
132
- 安装后重启现有 DSH Web 进程。维护者可在源码 checkout 中对实际部署做验证(npm 安装不包含这些脚本):
132
+ 安装后重启现有 DSH Web 进程。维护者可在源码 checkout 中对实际部署做验证(npm 安装不包含这些脚本):
133
133
 
134
134
  ```bash
135
135
  pnpm run verify:deployed # 核对真实 /api/llm.models 与 OAuth 状态
@@ -145,22 +145,22 @@ pnpm run smoke:deployed # 真实 Codex/Kimi tool-call + 第二个用
145
145
 
146
146
  ## 设置页
147
147
 
148
- 打开 **设置 → 编码 OAuth**。页面采用分段标签:**Accounts**、**Gateway**、**Capabilities**、**About**,并带有实时状态提示、语义化徽章与骨架屏加载。远程(非 loopback)主机上,Accounts 会优先设备码登录,并把嘈杂的 CLI 缺失提示收成一条;已登录供应商卡片默认折叠,展开后可搜索/筛选模型、查看配额进度条或使用 CLI 拉取;Gateway 提供 cURL / Python / IDE 快速配置片段,Capabilities 使用开关联动(含依赖项置灰)并显示 Imagine 状态。
149
-
150
- DSH Web 仍只绑定 loopback。远程 Settings 必须经 SSH 隧道,或经已完成属主认证的 HTTPS 反向代理。插件优先使用 DSH 原生 `ownerRequestPolicy`;fallback 同时要求真实可信 TCP peer、精确 HTTPS Origin/Host、同源 Fetch Metadata、代理注入的 owner proof,以及变更请求独立的 CSRF proof。`X-Forwarded-*` 不能授权,配置不完整会 fail closed。配置方法见 [INSTALL.md](INSTALL.md#安全访问远程-settings)。
148
+ 打开 **设置 → 编码 OAuth**。页面采用分段标签:**Accounts**、**Gateway**、**Capabilities**、**About**,并带有实时状态提示、语义化徽章与骨架屏加载。远程(非 loopback)主机上,Accounts 会优先设备码登录,并把嘈杂的 CLI 缺失提示收成一条;已登录供应商卡片默认折叠,展开后可搜索/筛选模型、查看配额进度条或使用 CLI 拉取;Gateway 提供 cURL / Python / IDE 快速配置片段,Capabilities 使用开关联动(含依赖项置灰)并显示 Imagine 状态。
149
+
150
+ DSH Web 仍只绑定 loopback。远程 Settings 必须经 SSH 隧道,或经已完成属主认证的 HTTPS 反向代理。插件优先使用 DSH 原生 `ownerRequestPolicy`;fallback 同时要求真实可信 TCP peer、精确 HTTPS Origin/Host、同源 Fetch Metadata、代理注入的 owner proof,以及变更请求独立的 CSRF proof。`X-Forwarded-*` 不能授权,配置不完整会 fail closed。配置方法见 [INSTALL.md](INSTALL.md#安全访问远程-settings)。
151
151
 
152
152
  <table>
153
153
  <tr>
154
154
  <td align="center" valign="top" width="33%">
155
- <a href="media/zh-CN/settings_accounts.png"><img src="media/zh-CN/settings_accounts.png" alt="编码 OAuth · Accounts 标签" width="280" /></a><br />
155
+ <a href="media/zh-CN/settings_accounts.png"><img src="media/zh-CN/settings_accounts.png" alt="编码 OAuth · Accounts 标签" width="280" /></a><br />
156
156
  <sub>Accounts</sub>
157
157
  </td>
158
158
  <td align="center" valign="top" width="33%">
159
- <a href="media/zh-CN/settings_gateway.png"><img src="media/zh-CN/settings_gateway.png" alt="编码 OAuth · Gateway 标签" width="280" /></a><br />
159
+ <a href="media/zh-CN/settings_gateway.png"><img src="media/zh-CN/settings_gateway.png" alt="编码 OAuth · Gateway 标签" width="280" /></a><br />
160
160
  <sub>Gateway</sub>
161
161
  </td>
162
162
  <td align="center" valign="top" width="33%">
163
- <a href="media/zh-CN/settings_capabilities.png"><img src="media/zh-CN/settings_capabilities.png" alt="编码 OAuth · Capabilities 标签" width="280" /></a><br />
163
+ <a href="media/zh-CN/settings_capabilities.png"><img src="media/zh-CN/settings_capabilities.png" alt="编码 OAuth · Capabilities 标签" width="280" /></a><br />
164
164
  <sub>Capabilities</sub>
165
165
  </td>
166
166
  </tr>
@@ -182,7 +182,7 @@ DSH 主机在远端时优先使用设备码。浏览器/PKCE 登录会打开供
182
182
 
183
183
  ## 可选能力
184
184
 
185
- 七项开关默认全部**关闭**,打开后**立即生效**(无需重启):`codexSearch`、`codexImages`、`codexImageEdits`、`codexUsage`、`codexFast`、`grokImagineImage`、`grokImagineVideo`。数值控制为 `searchResults`(1–20,默认 5)、`imageCount`(1–4,默认 1)、`videoArtifactTtlMs`(1 小时–7 天,默认 7 天;界面以 1–168 小时显示)。降低视频保留时间会立即缩短并清理已有产物;提高只影响之后生成的产物。管理员也可在插件配置的 `capabilities` 下提供不含秘密的 composition 默认值;`coding-subscription-oauth` 设置区中的用户值会覆盖这层 base,省略时所有开关仍保持关闭。
185
+ 八项开关默认全部**关闭**,打开后**立即生效**(无需重启):`codexSearch`、`codexImages`、`codexImageEdits`、`codexImagesAnyModel`、`codexUsage`、`codexFast`、`grokImagineImage`、`grokImagineVideo`。`codexImagesAnyModel` 仅放宽调用模型路由限制;仍要求已登录 Codex、开启 `codexImages`(编辑还需 edits 开关),并保留当前会话附件归属和编辑授权检查。数值控制为 `searchResults`(1–20,默认 5)、`imageCount`(1–4,默认 1)、`videoArtifactTtlMs`(1 小时–7 天,默认 7 天;界面以 1–168 小时显示)。降低视频保留时间会立即缩短并清理已有产物;提高只影响之后生成的产物。管理员也可在插件配置的 `capabilities` 下提供不含秘密的 composition 默认值;`coding-subscription-oauth` 设置区中的用户值会覆盖这层 base,省略时所有开关仍保持关闭。
186
186
 
187
187
  `codex-oauth-fast` 仅在**最新一次 live catalog** 标明至少有一个 `priority` 可用模型后才会出现。请求会发送 `service_tier: priority` 和路由提示。界面写的是 **已请求 Fast**,不保证延迟,也不保证上游会兑现。
188
188
 
@@ -1,30 +1,30 @@
1
- {
2
- "schemaVersion": 1,
3
- "coreAbi": "dsh-coding-oauth-core/v1",
4
- "verified": {
5
- "id": "dsh-0.1.1-rc.2",
6
- "dshVersion": "0.1.1-rc.2",
7
- "packages": {
8
- "@deepseek-ai/cordis": "4.0.1",
9
- "@deepseek-ai/dsh-atomic-write": "0.1.1-rc.2",
10
- "@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
11
- "@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
12
- "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
13
- "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
14
- "@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
15
- "@deepseek-ai/dsh-client-web": "0.1.1-rc.2",
16
- "@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
17
- "@deepseek-ai/dsh-home-paths": "0.1.1-rc.2",
18
- "@deepseek-ai/dsh-host-webserver": "0.1.1-rc.2",
19
- "@deepseek-ai/dsh-invariants": "0.1.1-rc.2",
20
- "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
21
- "@deepseek-ai/dsh-llm-pi-ai": "0.1.1-rc.2",
22
- "@deepseek-ai/dsh-tools": "0.1.1-rc.2",
23
- "@deepseek-ai/schemastery": "3.18.1",
24
- "@earendil-works/pi-ai": "0.84.2",
25
- "react": "18.3.1",
26
- "react-dom": "18.3.1"
27
- }
28
- },
29
- "candidates": []
30
- }
1
+ {
2
+ "schemaVersion": 1,
3
+ "coreAbi": "dsh-coding-oauth-core/v1",
4
+ "verified": {
5
+ "id": "dsh-0.1.1-rc.2",
6
+ "dshVersion": "0.1.1-rc.2",
7
+ "packages": {
8
+ "@deepseek-ai/cordis": "4.0.1",
9
+ "@deepseek-ai/dsh-atomic-write": "0.1.1-rc.2",
10
+ "@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
11
+ "@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
12
+ "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
13
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
14
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
15
+ "@deepseek-ai/dsh-client-web": "0.1.1-rc.2",
16
+ "@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
17
+ "@deepseek-ai/dsh-home-paths": "0.1.1-rc.2",
18
+ "@deepseek-ai/dsh-host-webserver": "0.1.1-rc.2",
19
+ "@deepseek-ai/dsh-invariants": "0.1.1-rc.2",
20
+ "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
21
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.1-rc.2",
22
+ "@deepseek-ai/dsh-tools": "0.1.1-rc.2",
23
+ "@deepseek-ai/schemastery": "3.18.1",
24
+ "@earendil-works/pi-ai": "0.84.2",
25
+ "react": "18.3.1",
26
+ "react-dom": "18.3.1"
27
+ }
28
+ },
29
+ "candidates": []
30
+ }
@@ -139,6 +139,23 @@ node scripts/release.mjs --pack
139
139
 
140
140
  > Publishing and remote Git writes are intentionally outside the script.
141
141
 
142
+ ### 4.1 Maintainer-run npm publish handoff
143
+
144
+ For every release candidate, the assistant must proactively hand the maintainer an exact PowerShell command before any registry write. The handoff must name the verified candidate `.tgz`, include its expected SHA-256, use the public npm registry, and include a post-publish `npm view` check. The assistant must not run `npm publish`, `npm login`, or copy npm credentials.
145
+
146
+ The maintainer runs the handoff command, reports the resulting published version and `latest` dist-tag, and only then does the assistant continue with registry verification, PR merge, annotated tag/GitHub Release work, and issue evidence replies. A failed or ambiguous publish keeps the release and issues open. The exact release gate still requires a clean tree, successful Docker verification, a maintainer decision, and explicit maintainer release approval; publishing an unverified or dirty candidate is prohibited.
147
+
148
+ The standard handoff shape is:
149
+
150
+ ```powershell
151
+ $candidate = ".\\output\\<package>-<version>.tgz"
152
+ if ((Get-FileHash $candidate -Algorithm SHA256).Hash -ne "<verified-sha256>") { throw "candidate hash mismatch" }
153
+ npm publish $candidate --access public --ignore-scripts --registry=https://registry.npmjs.org/
154
+ npm view <package>@<version> version dist-tags --json --registry=https://registry.npmjs.org/
155
+ ```
156
+
157
+ The assistant must not treat a local pack or a user-reported command start as a successful release; success requires the registry result to show the exact version and expected `latest` tag.
158
+
142
159
  ---
143
160
 
144
161
  ## 5. Keeping the Project Active
@@ -67,7 +67,7 @@ ctx.llm route
67
67
  - `capability-settings.ts`: default-off live flags and limits (search 1–20, image count 1–4, artifact TTL 1 h–7 d).
68
68
  - `capability-routes.ts`: secret-free capability snapshot plus optional Codex usage and Imagine credential-status routes.
69
69
  - `capability-runtime.ts`: live bind/unbind of search, tools, and the Fast route after a fresh priority catalog.
70
- - `capability-tools.ts`: optional Codex / Grok Imagine tool definitions; flags re-read at execute time.
70
+ - `capability-tools.ts`: optional Codex / Grok Imagine tool definitions; flags re-read at execute time. The default-off any-model image policy relaxes only the calling-route gate and retains Codex auth, session, attachment ownership, and edit authorization.
71
71
  - `codex-http.ts`: opt-in private `chatgpt.com/backend-api` client (HTTPS-only, first-party host).
72
72
  - `codex-search.ts` / `codex-usage.ts` / `codex-images.ts`: opt-in search, quota, and fixed `gpt-image-2` generate/edit (edits require current-session top-level attachment ownership).
73
73
  - `codex-model-capabilities.ts`: live Codex service-tier cache; fail-closed Fast eligibility; injects `service_tier: priority` and the routing hint.
@@ -76,8 +76,8 @@ ctx.llm route
76
76
  - `media-store.ts`: owner-private artifact store (256 MiB per-object and aggregate unique-byte hard caps, seven days).
77
77
  - `client/`: four native account cards, CLI Pull, capability switches, gateway controls, and the external Antigravity status card.
78
78
  - `proxy.ts`: process-wide undici dispatcher, but proxies only a reviewed domain whitelist.
79
- - `gateway*.ts`: opt-in isolated loopback OpenAI/Anthropic-compatible HTTP server (default off; independent of the DSH web port).
80
- - `dsh-host-adapter.ts` / `web-origin.ts`: isolate the changing DSH service surface and prefer a host-native `ownerRequestPolicy`; the fallback constrains loopback/SSH Host and Origin, while HTTPS proxy access jointly verifies the real peer, exact Origin/Host, Fetch Metadata, owner proof, and independent CSRF. A throwing or malformed host policy is denied without escaping the route boundary.
79
+ - `gateway*.ts`: opt-in isolated loopback OpenAI/Anthropic-compatible HTTP server (default off; independent of the DSH web port).
80
+ - `dsh-host-adapter.ts` / `web-origin.ts`: isolate the changing DSH service surface and prefer a host-native `ownerRequestPolicy`; the fallback constrains loopback/SSH Host and Origin, while HTTPS proxy access jointly verifies the real peer, exact Origin/Host, Fetch Metadata, owner proof, and independent CSRF. A throwing or malformed host policy is denied without escaping the route boundary.
81
81
 
82
82
  ## 4. Web API
83
83
 
@@ -108,11 +108,11 @@ PATCH /plugins/dsh-grok-build/gateway
108
108
  POST /plugins/dsh-grok-build/gateway/rotate
109
109
  ```
110
110
 
111
- Write endpoints take `provider: grok|codex|kimi|claude` in the body. Responses contain only status, authorization URL, device user code, model ids and a non-sensitive expiry; they never contain access/refresh tokens. JSON request bodies are capped at 64 KiB before parsing.
112
-
113
- Every Settings route shares `OwnerRequestPolicy`. `X-Forwarded-*` is forwarding metadata, never owner proof; a fallback policy missing any independent signal rejects remote requests. Status responses carry the server-derived `accessMode`, so the client does not infer SSH or proxy access from the hostname.
111
+ Write endpoints take `provider: grok|codex|kimi|claude` in the body. Responses contain only status, authorization URL, device user code, model ids and a non-sensitive expiry; they never contain access/refresh tokens. JSON request bodies are capped at 64 KiB before parsing.
114
112
 
115
- `/oauth/sources` is read-only discovery. Preview/commit is the explicit one-way Pull (tickets one-use, five minutes, max 32). Capability writes are secret-free compare-and-swap snapshots in the `coding-subscription-oauth` settings section and apply live. Seven flags default off; `searchResults` is 1–20 (default 5), `imageCount` is 1–4 (default 1), and `videoArtifactTtlMs` is 1 hour–7 days (default 7 days; UI 1–168 hours); decreases rewrite/clean existing expiries immediately, while increases affect only new artifacts. Imagine download routes are same-origin loopback GETs; they never return a signed upstream URL.
113
+ Every Settings route shares `OwnerRequestPolicy`. `X-Forwarded-*` is forwarding metadata, never owner proof; a fallback policy missing any independent signal rejects remote requests. Status responses carry the server-derived `accessMode`, so the client does not infer SSH or proxy access from the hostname.
114
+
115
+ `/oauth/sources` is read-only discovery. Preview/commit is the explicit one-way Pull (tickets one-use, five minutes, max 32). Capability writes are secret-free compare-and-swap snapshots in the `coding-subscription-oauth` settings section and apply live. Eight flags default off; `searchResults` is 1–20 (default 5), `imageCount` is 1–4 (default 1), and `videoArtifactTtlMs` is 1 hour–7 days (default 7 days; UI 1–168 hours); decreases rewrite/clean existing expiries immediately, while increases affect only new artifacts. Imagine download routes are same-origin loopback GETs; they never return a signed upstream URL.
116
116
 
117
117
  The legacy `/plugins/dsh-grok-build/auth/*` endpoints remain registered and reuse the same Grok controller.
118
118
 
@@ -122,7 +122,7 @@ This project does not replicate the private Google Antigravity protocol. The pro
122
122
 
123
123
  ## 6. Compatibility
124
124
 
125
- The canonical package and repository name is **`dsh-coding-subscription-oauth`**. The previous GitHub URL still resolves to the same `main`, so old `dsh plugin add github:lninghaha/dsh-grok-build` commands continue to install the renamed package. The first public npm/GitHub Release was **`0.4.1`**. The current release is **`0.6.2`** (`dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.2`), verified against DSH **`0.1.1-rc.2`**. GitHub and local tarball installs remain valid.
125
+ The canonical package and repository name is **`dsh-coding-subscription-oauth`**. The previous GitHub URL still resolves to the same `main`, so old `dsh plugin add github:lninghaha/dsh-grok-build` commands continue to install the renamed package. The first public npm/GitHub Release was **`0.4.1`**. The current release is **`0.6.4`** (`dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.4`), verified against DSH **`0.1.1-rc.2`**. GitHub and local tarball installs remain valid.
126
126
 
127
127
  Stable on-disk / in-process identifiers (do not rename without a migration):
128
128
 
@@ -133,6 +133,6 @@ Stable on-disk / in-process identifiers (do not rename without a migration):
133
133
  - CLI: `dsh-coding-oauth` (primary) and `dsh-grok-build` (alias)
134
134
  - LLM routes: `grok-build`, `codex-oauth`, `kimi-code-oauth`, `claude-code-oauth`; optional `codex-oauth-fast` (v0.4.0, advertised only when a fresh live catalog lists `priority`)
135
135
 
136
- New routes use the `*-oauth` alias and do not occupy `openai`, `xai` or `kimi-coding`. In v0.3.0 the `grok-build` fallback/default advances to `grok-4.6`; saved user defaults still win.
137
-
138
- Hub and this standalone participant pin the same `dsh-coding-oauth-core@0.1.0`. The core owns root-scoped owner election, reference-counted proxy policy, atomic registration helpers, provider/route/credential identifiers, the capability namespace, Gateway state filename, and all legacy/current management paths. Hub has priority while installed; this participant remains standby and resumes without renaming routes or resetting credentials after Hub unloads.
136
+ New routes use the `*-oauth` alias and do not occupy `openai`, `xai` or `kimi-coding`. In v0.3.0 the `grok-build` fallback/default advances to `grok-4.6`; saved user defaults still win.
137
+
138
+ Hub and this standalone participant pin the same `dsh-coding-oauth-core@0.1.1` and `undici@7.29.0`. The core owns root-scoped owner election, reference-counted proxy policy, atomic registration helpers, provider/route/credential identifiers, the capability namespace, Gateway state filename, and all legacy/current management paths. Hub has priority while installed; this participant remains standby and resumes without renaming routes or resetting credentials after Hub unloads. Grok Imagine keeps its explicit pinned dispatcher and does not use the shared proxy lease.
@@ -67,7 +67,7 @@ ctx.llm route
67
67
  - `capability-settings.ts`:默认关闭、立即生效的开关与限制(搜索 1–20、图像 1–4、产物 TTL 1 小时–7 天)。
68
68
  - `capability-routes.ts`:无密钥的能力快照,以及可选的 Codex 用量和 Imagine 凭据状态路由。
69
69
  - `capability-runtime.ts`:按 live 开关绑定/解绑搜索、工具,以及仅在最新 priority catalog 后发布 Fast 路由。
70
- - `capability-tools.ts`:可选 Codex / Grok Imagine 工具定义;执行时重新读取开关。
70
+ - `capability-tools.ts`:可选 Codex / Grok Imagine 工具定义;执行时重新读取开关。默认关闭的任意模型图像策略只放宽调用路由门禁,Codex 登录、会话、附件归属和编辑授权保持不变。
71
71
  - `codex-http.ts`:需打开的私有 `chatgpt.com/backend-api` 客户端(仅 HTTPS、仅第一方主机)。
72
72
  - `codex-search.ts` / `codex-usage.ts` / `codex-images.ts`:可选搜索、配额,以及固定 `gpt-image-2` 生成/编辑(编辑要求当前会话顶层附件所有权)。
73
73
  - `codex-model-capabilities.ts`:live Codex service-tier 缓存;Fast 资格失败关闭;注入 `service_tier: priority` 与路由提示。
@@ -76,8 +76,8 @@ ctx.llm route
76
76
  - `media-store.ts`:属主私有产物库(单件与唯一对象总量均硬限 256 MiB,最长七天)。
77
77
  - `client/`:四个原生账号卡片、CLI 拉取、能力开关、网关控制,以及外部 Antigravity 状态卡片。
78
78
  - `proxy.ts`:process-wide undici dispatcher,但只代理审核过的域名白名单。
79
- - `gateway*.ts`:可选的隔离 loopback OpenAI/Anthropic 兼容 HTTP 服务(默认关;独立于 DSH web 端口)。
80
- - `dsh-host-adapter.ts` / `web-origin.ts`:隔离可变 DSH 服务,并优先使用宿主 `ownerRequestPolicy`;fallback 对 loopback/SSH 做 Host/Origin 约束,对 HTTPS 反代同时核验真实 peer、精确 Origin/Host、Fetch Metadata、owner proof 与独立 CSRF。宿主策略抛错或返回畸形结果时安全拒绝,不让异常越过路由边界。
79
+ - `gateway*.ts`:可选的隔离 loopback OpenAI/Anthropic 兼容 HTTP 服务(默认关;独立于 DSH web 端口)。
80
+ - `dsh-host-adapter.ts` / `web-origin.ts`:隔离可变 DSH 服务,并优先使用宿主 `ownerRequestPolicy`;fallback 对 loopback/SSH 做 Host/Origin 约束,对 HTTPS 反代同时核验真实 peer、精确 Origin/Host、Fetch Metadata、owner proof 与独立 CSRF。宿主策略抛错或返回畸形结果时安全拒绝,不让异常越过路由边界。
81
81
 
82
82
  ## 4. Web API
83
83
 
@@ -108,11 +108,11 @@ PATCH /plugins/dsh-grok-build/gateway
108
108
  POST /plugins/dsh-grok-build/gateway/rotate
109
109
  ```
110
110
 
111
- 写接口请求体带 `provider: grok|codex|kimi|claude`。响应只包含状态、授权 URL、device user code、模型 id 和非敏感 expiry;绝不包含 access/refresh token。JSON 请求体在解析前限制为 64 KiB。
112
-
113
- 所有 Settings 路由共用 `OwnerRequestPolicy`。`X-Forwarded-*` 只属于转发元数据,不能成为属主证明;fallback 配置缺少任一独立信号时拒绝远程请求。状态响应携带经服务端判定的 `accessMode`,客户端不根据 hostname 猜测 SSH 或反代环境。
111
+ 写接口请求体带 `provider: grok|codex|kimi|claude`。响应只包含状态、授权 URL、device user code、模型 id 和非敏感 expiry;绝不包含 access/refresh token。JSON 请求体在解析前限制为 64 KiB。
114
112
 
115
- `/oauth/sources` 是只读发现。预览/提交是显式单向拉取(票据一次性、五分钟、最多 32 张)。能力写入位于 `coding-subscription-oauth` 设置区,是无密钥的 compare-and-swap 快照并立即生效。七项开关默认关闭;`searchResults` 1–20(默认 5),`imageCount` 为 1–4(默认 1),`videoArtifactTtlMs` 为 1 小时–7 天(默认 7 天;界面显示 1–168 小时);降低时立即改写/清理已有 expiry,提高只影响新产物。Imagine 下载路由是同源 loopback GET,从不返回上游签名 URL。
113
+ 所有 Settings 路由共用 `OwnerRequestPolicy`。`X-Forwarded-*` 只属于转发元数据,不能成为属主证明;fallback 配置缺少任一独立信号时拒绝远程请求。状态响应携带经服务端判定的 `accessMode`,客户端不根据 hostname 猜测 SSH 或反代环境。
114
+
115
+ `/oauth/sources` 是只读发现。预览/提交是显式单向拉取(票据一次性、五分钟、最多 32 张)。能力写入位于 `coding-subscription-oauth` 设置区,是无密钥的 compare-and-swap 快照并立即生效。八项开关默认关闭;`searchResults` 为 1–20(默认 5),`imageCount` 为 1–4(默认 1),`videoArtifactTtlMs` 为 1 小时–7 天(默认 7 天;界面显示 1–168 小时);降低时立即改写/清理已有 expiry,提高只影响新产物。Imagine 下载路由是同源 loopback GET,从不返回上游签名 URL。
116
116
 
117
117
  旧 `/plugins/dsh-grok-build/auth/*` 继续注册并复用同一个 Grok 控制器。
118
118
 
@@ -122,7 +122,7 @@ POST /plugins/dsh-grok-build/gateway/rotate
122
122
 
123
123
  ## 6. 兼容性
124
124
 
125
- 正式包名与仓库名是 **`dsh-coding-subscription-oauth`**。旧 GitHub 地址仍指向同一条 `main`,因此旧的 `dsh plugin add github:lninghaha/dsh-grok-build` 仍会安装更名后的包。第一次公开 npm / GitHub Release 是 **`0.4.1`**。当前版本是 **`0.6.2`**(`dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.2`),精确验证 DSH **`0.1.1-rc.2`**。GitHub 与本地 tarball 安装仍然有效。
125
+ 正式包名与仓库名是 **`dsh-coding-subscription-oauth`**。旧 GitHub 地址仍指向同一条 `main`,因此旧的 `dsh plugin add github:lninghaha/dsh-grok-build` 仍会安装更名后的包。第一次公开 npm / GitHub Release 是 **`0.4.1`**。当前版本是 **`0.6.4`**(`dsh plugin --profile web add dsh-coding-subscription-oauth@0.6.4`),精确验证 DSH **`0.1.1-rc.2`**。GitHub 与本地 tarball 安装仍然有效。
126
126
 
127
127
  以下标识保持稳定(无迁移方案前不要改名):
128
128
 
@@ -133,6 +133,6 @@ POST /plugins/dsh-grok-build/gateway/rotate
133
133
  - CLI:`dsh-coding-oauth`(主命令)与 `dsh-grok-build`(别名)
134
134
  - LLM 路由:`grok-build`、`codex-oauth`、`kimi-code-oauth`、`claude-code-oauth`;可选 `codex-oauth-fast`(v0.4.0,仅在最新 live catalog 列出 `priority` 后发布)
135
135
 
136
- 新 route 使用 `*-oauth` alias,不占用 `openai`、`xai`、`kimi-coding`。v0.3.0 将 `grok-build` fallback/default 更新为 `grok-4.6`,已有用户默认设置仍优先。
137
-
138
- Hub 与本独立 participant 精确依赖同一个 `dsh-coding-oauth-core@0.1.0`。核心统一管理 root-scoped owner 选举、引用计数代理策略、原子注册、provider/route/credential 标识、能力设置命名空间、Gateway 状态文件名,以及全部新旧管理路径。Hub 安装时优先成为 owner;Hub 卸载后本插件从 standby 自动接管,不改路由名,也不重置凭据。
136
+ 新 route 使用 `*-oauth` alias,不占用 `openai`、`xai`、`kimi-coding`。v0.3.0 将 `grok-build` fallback/default 更新为 `grok-4.6`,已有用户默认设置仍优先。
137
+
138
+ Hub 与本独立 participant 精确依赖同一个 `dsh-coding-oauth-core@0.1.1` 与 `undici@7.29.0`。核心统一管理 root-scoped owner 选举、引用计数代理策略、原子注册、provider/route/credential 标识、能力设置命名空间、Gateway 状态文件名,以及全部新旧管理路径。Hub 安装时优先成为 owner;Hub 卸载后本插件从 standby 自动接管,不改路由名,也不重置凭据。Grok Imagine 保留显式 pinned dispatcher,不使用共享 proxy lease。