dsh-coding-subscription-oauth 0.5.2 → 0.5.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/INSTALL.md +11 -11
  3. package/README.de.md +34 -9
  4. package/README.es.md +35 -9
  5. package/README.fr.md +35 -9
  6. package/README.ja.md +35 -9
  7. package/README.ko.md +35 -9
  8. package/README.md +34 -13
  9. package/README.pt-BR.md +35 -9
  10. package/README.ru.md +35 -9
  11. package/README.zh-CN.md +34 -13
  12. package/docs/02-architecture.md +4 -3
  13. package/docs/02-architecture.zh-CN.md +8 -3
  14. package/lib/adapter.d.ts.map +1 -1
  15. package/lib/alias-adapter.d.ts.map +1 -1
  16. package/lib/client.js +1 -1
  17. package/lib/client.js.map +4 -4
  18. package/lib/grok-errors.d.ts +13 -0
  19. package/lib/grok-errors.d.ts.map +1 -0
  20. package/lib/index.js +13 -3
  21. package/lib/index.js.map +3 -3
  22. package/media/settings_accounts.png +0 -0
  23. package/media/settings_capabilities.png +0 -0
  24. package/media/settings_gateway.png +0 -0
  25. package/media/settings_overview.png +0 -0
  26. package/package.json +2 -1
  27. package/src/adapter.ts +7 -2
  28. package/src/alias-adapter.ts +2 -1
  29. package/src/client/GrokBuildSettings.tsx +247 -1772
  30. package/src/client/api.ts +88 -0
  31. package/src/client/components/AboutTab.tsx +20 -0
  32. package/src/client/components/AccountsTab.tsx +224 -0
  33. package/src/client/components/CapabilitiesTab.tsx +214 -0
  34. package/src/client/components/CliPullPreview.tsx +107 -0
  35. package/src/client/components/GatewayTab.tsx +287 -0
  36. package/src/client/components/ProviderCard.tsx +322 -0
  37. package/src/client/components/SettingsTabs.tsx +65 -0
  38. package/src/client/constants.ts +206 -0
  39. package/src/client/display.ts +61 -0
  40. package/src/client/locales.ts +47 -15
  41. package/src/client/parsers.ts +386 -0
  42. package/src/client/styles.ts +180 -0
  43. package/src/client/types.ts +185 -0
  44. package/src/grok-errors.ts +24 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,26 @@ All notable changes to `dsh-coding-subscription-oauth` are documented here, foll
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## v0.5.4 - 2026-08-19
8
+
9
+ ### Changed
10
+
11
+ - Improve remote/headless Settings UX: prefer device-code CTAs on non-loopback hosts, collapse noisy per-card CLI-missing hints into one neutral tip, shorten Capabilities copy, move Antigravity onto Accounts, and enrich About with remote-login help plus plugin version.
12
+ - Load Gateway and Imagine status only when their tabs open; soft-fetch Capabilities when Codex is signed in so quota can still appear on Accounts.
13
+ - Split the Settings client into tab/components modules with display/parser Vitest coverage, and make `promote-release` resilient to overlay `EXDEV` renames.
14
+
15
+ ### Documentation
16
+
17
+ - Refresh Settings product screenshots under `media/` for the remote-host Accounts tip, device-code-first CTAs, quieter CLI-missing banner, Gateway loopback hint, and shortened Capabilities copy; keep the three-column README gallery (Accounts / Gateway / Capabilities).
18
+ - Record previously unreleased screenshot gallery work (Accounts / Gateway / Capabilities under `media/`, three-column README layout) in this release.
19
+
20
+ ## v0.5.3 - 2026-08-19
21
+
22
+ ### Changed
23
+
24
+ - Raise the default OAuth route retry policy to 5 stacked exponential delays (5 s → 10 s → 20 s → 40 s → 80 s, ~155 s total, 10% jitter).
25
+ - Remap xAI “at capacity / high demand / priority processing / overloaded” finish messages to `RATE_LIMIT` so harness retries run instead of failing as `PI_AI_ERROR` when upstream `error.code` is null.
26
+
7
27
  ## v0.5.2 - 2026-08-18
8
28
 
9
29
  ### Documentation
package/INSTALL.md CHANGED
@@ -3,20 +3,18 @@
3
3
  本仓库原名 **`dsh-grok-build`**。普通用户请使用已发布的 npm 版本:
4
4
 
5
5
  ```bash
6
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
6
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
7
7
  ```
8
8
 
9
9
  CLI 新命令是 `dsh-coding-oauth`(旧命令 `dsh-grok-build` 仍可用)。为兼容已有 profile,Cordis id 仍是 `llm-grok-build-oauth`,设置页 HTTP 路径仍是 `/plugins/dsh-grok-build/*`,凭据文件名不变。
10
10
 
11
- 第一次公开发布是 **`0.4.1`**。当前推荐 **`0.5.2`**:
11
+ 第一次公开发布是 **`0.4.1`**。当前推荐 **`0.5.4`**:
12
12
 
13
13
  ```bash
14
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
14
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
15
15
  dsh plugin --profile web update dsh-coding-subscription-oauth
16
16
  ```
17
17
 
18
- 旧 GitHub 地址会解析到同一条 `main`。
19
-
20
18
  ## 前置条件
21
19
 
22
20
  - DeepSeek Harness 0.1.0-rc.6+
@@ -28,7 +26,7 @@ dsh plugin --profile web update dsh-coding-subscription-oauth
28
26
 
29
27
  ```bash
30
28
  # 普通用户:当前 npm 发布版
31
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
29
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
32
30
 
33
31
  # 开发 / 备用:从 GitHub
34
32
  dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
@@ -51,7 +49,7 @@ gateway:
51
49
  port: 18080
52
50
  ```
53
51
 
54
- 或在 Settings → Coding OAuth → Local API gateway 打开。Bearer key 存在 `$DSH_HOME/.coding-oauth-gateway.json`。不要绑定 `0.0.0.0`。
52
+ 或在 Settings → Coding OAuth → Gateway 标签页打开。Bearer key 存在 `$DSH_HOME/.coding-oauth-gateway.json`。不要绑定 `0.0.0.0`。
55
53
 
56
54
  ## Antigravity 安全配置
57
55
 
@@ -98,7 +96,7 @@ Kimi Code 中国流量默认直连;只有 `proxyKimi: true` 才代理。
98
96
 
99
97
  ## 弹性重试
100
98
 
101
- OAuth access token 会在本地记录过期时间前 5 分钟主动刷新。服务端若仍以 401/403 拒绝一个本地尚未过期的令牌,插件会把凭据 `expires` 回写到过去,重试的 step 先刷新再发请求。瞬时故障(429/5xx/超时/网络)和 AUTH 默认最多重试 2 次(500 ms → 10 s10% jitter)。配额耗尽和 refresh token 失效不重试。
99
+ OAuth access token 会在本地记录过期时间前 5 分钟主动刷新。服务端若仍以 401/403 拒绝一个本地尚未过期的令牌,插件会把凭据 `expires` 回写到过去,重试的 step 先刷新再发请求。瞬时故障(429/5xx/超时/网络)和 AUTH 默认最多重试 5 次(5 s → 10 s → 20 s → 40 s → 80 s,约 155 s 叠加时常,10% jitter)。xAI「at capacity」等文案会重映射为 `RATE_LIMIT` 后再退避。配额耗尽和 refresh token 失效不重试。
102
100
 
103
101
  部署级覆盖(可选):
104
102
 
@@ -107,9 +105,9 @@ OAuth access token 会在本地记录过期时间前 5 分钟主动刷新。服
107
105
  config:
108
106
  retryPolicy:
109
107
  mode: normal
110
- maxRetries: 2
108
+ maxRetries: 5
111
109
  retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, AUTH]
112
- backoff: { initialDelayMs: 500, maxDelayMs: 10000, jitterRatio: 0.1 }
110
+ backoff: { initialDelayMs: 5000, maxDelayMs: 80000, jitterRatio: 0.1 }
113
111
  ```
114
112
 
115
113
  ## 登录
@@ -194,6 +192,8 @@ rm -f ~/.dsh/.grok-build-models.json ~/.dsh/.codex-oauth-models.json \
194
192
 
195
193
  ## 部署验收
196
194
 
195
+ 以下命令面向维护者,需要在源码 checkout 中运行;通过 npm 安装的用户无需执行。
196
+
197
197
  ```bash
198
198
  pnpm run verify:deployed
199
199
 
@@ -209,7 +209,7 @@ pnpm run smoke:deployed
209
209
 
210
210
  | 现象 | 处理 |
211
211
  |---|---|
212
- | 还在搜 / 装着 `dsh-grok-build` | 仓库已更名为 `dsh-coding-subscription-oauth`;旧 GitHub 地址仍跟踪同一条 `main`。新安装请用新名 |
212
+ | 还在搜 / 装着 `dsh-grok-build` | 仓库已更名为 `dsh-coding-subscription-oauth`;旧 GitHub 仓库已删除。请改用 npm 包或 `github:lninghaha/dsh-coding-subscription-oauth` |
213
213
  | Codex localhost callback 打不开 | 改用设备码,或把完整 redirect URL 粘贴回设置页 |
214
214
  | Claude localhost callback 在远端浏览器 | 把完整 redirect URL 粘贴回设置页 |
215
215
  | Kimi 401/403 | 重新登录并确认 Kimi Code 会员有效;不要改成 moonshot.cn OAuth |
package/README.de.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # 🔐 dsh-coding-subscription-oauth
6
6
 
7
- **v0.5.2 · früher `dsh-grok-build`
7
+ **v0.5.4 · früher `dsh-grok-build`
8
8
 
9
9
  **OAuth-Plugin für Coding-Abonnements für [DeepSeek Harness](https://github.com/deepseek-ai/dsh).** Melden Sie sich einmal mit den Abonnements an, die Sie bereits bezahlen, und nutzen Sie die Modelle aus den Einstellungen oder der CLI von dsh. **Keine Tokens in den Chat einfügen.**
10
10
 
@@ -20,11 +20,10 @@
20
20
  ## Namensänderung
21
21
 
22
22
  Zuerst **`dsh-grok-build`** (nur Grok Build). Jetzt SuperGrok / Codex / Kimi / Claude / Antigravity.
23
-
24
23
  | | Das verwenden | Funktioniert weiter |
25
24
  |---|---|---|
26
25
  | GitHub / `dsh plugin add` | [`dsh-coding-subscription-oauth`](https://github.com/lninghaha/dsh-coding-subscription-oauth) | `github:lninghaha/dsh-grok-build` (derselbe `main`) |
27
- | npm | `dsh-coding-subscription-oauth@0.5.2` (aktuelle Version) | Es gab kein altes npm-Paket |
26
+ | npm | `dsh-coding-subscription-oauth@0.5.4` (aktuelle Version) | Es gab kein altes npm-Paket |
28
27
  | CLI | `dsh-coding-oauth` | `dsh-grok-build` |
29
28
  | Cordis-Plugin-id | `llm-grok-build-oauth` | unverändert |
30
29
  | Settings-HTTP-API | `/plugins/dsh-grok-build/*` | unverändert |
@@ -36,8 +35,11 @@ Zuerst **`dsh-grok-build`** (nur Grok Build). Jetzt SuperGrok / Codex / Kimi / C
36
35
  - 🔑 **Lokales OAuth, ohne Key einzufügen** — in den Einstellungen oder der CLI autorisieren; Tokens gelangen nie in den Chat.
37
36
  - 🧩 **Ein Plugin, fünf Anbieter** — Grok Build, Codex, Kimi, Claude und Google Antigravity.
38
37
  - 🛡️ **Sicherheit by Design** — Zugangsdateien nur-eigentümer `0600`, atomares Schreiben, dateiübergreifende Prozesssperre.
39
- - ⚙️ **Dynamischer Katalog** — der Modellwähler listet genau die Anbieter, die Sie authentifiziert haben.
38
+ - ⚙️ **Dynamischer Katalog** — der Wähler listet nur authentifizierte Routen, gekennzeichnet mit `(OAuth)`, einschließlich `xhigh` von grok-4.6.
40
39
  - 🌐 **Proxy-bewusst** — nur geprüfte, vertrauenswürdige Abonnement-Domänen werden über den Proxy geleitet.
40
+ - 📥 **Manueller CLI-Pull** — die Einstellungen entdecken erlaubte offizielle Grok-/Codex-/Kimi-/Claude-CLI-OAuth-Dateien schreibgeschützt; nach Vorschau und Überschreibbestätigung ziehen Sie eine Einweg-Kopie.
41
+ - 🗂️ **Einstellungen mit Tabs** — Accounts, Gateway, Capabilities und About; Remote-Hosts bevorzugen Device-Code mit ruhigeren CLI-Missing-Hinweisen; angemeldete Karten bleiben eingeklappt, bis sie erweitert werden.
42
+ - 🎛️ **Optionale Funktionen, standardmäßig aus** — Codex-Suche, Nutzung/Kontingent, Bild erzeugen/bearbeiten, Fast und Grok Imagine wirken live beim Einschalten.
41
43
  - 🔌 **Opt-in lokales API-Gateway** — standardmäßig ausgeschalteter Loopback-Server, OpenAI-/Anthropic-kompatibel; für Ihre eigenen Werkzeuge, niemals ein öffentliches Relay.
42
44
 
43
45
  ## Integrationsprobleme, die dieses Plugin löst
@@ -71,7 +73,7 @@ Diese Suchbegriffe und DSH-Fehler führen meist hierher.
71
73
 
72
74
  ```bash
73
75
  # 1. Plugin in das Web-Profil installieren (aktuelle npm-Version)
74
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
76
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
75
77
 
76
78
  # 2. optional — Google Antigravity (gepinnte, geprüfte Version)
77
79
  dsh plugin --profile web add dsh-agy@0.1.2
@@ -85,9 +87,13 @@ Danach **Settings → Coding OAuth** öffnen und bei einem beliebigen Anbieter a
85
87
  ## 📚 Inhaltsverzeichnis
86
88
 
87
89
  - [Namensänderung](#namensänderung)
90
+ - [Funktionen](#-funktionen)
88
91
  - [Integrationsprobleme, die dieses Plugin löst](#integrationsprobleme-die-dieses-plugin-löst)
92
+ - [Unterstützte Anbieter](#unterstützte-anbieter)
93
+ - [Schnellstart](#-schnellstart)
89
94
  - [Installation](#installation)
90
95
  - [Einstellungsseite](#einstellungsseite)
96
+ - [Optionale Funktionen](#optionale-funktionen)
91
97
  - [Lokales API-Gateway](#lokales-api-gateway)
92
98
  - [CLI](#cli)
93
99
  - [Kimi in China](#kimi-in-china)
@@ -98,6 +104,7 @@ Danach **Settings → Coding OAuth** öffnen und bei einem beliebigen Anbieter a
98
104
  - [Technische Hinweise](#technische-hinweise)
99
105
  - [Compliance](#compliance)
100
106
  - [Dokumentation](#dokumentation)
107
+ - [Verwandt](#verwandt)
101
108
  - [Mitwirken](#mitwirken)
102
109
  - [Lizenz](#lizenz)
103
110
 
@@ -107,7 +114,7 @@ Erfordert DeepSeek Harness `0.1.0-rc.6+` und Node.js 22.19+. Vollständige Detai
107
114
 
108
115
  ```bash
109
116
  # aktuelle npm-Version (empfohlen)
110
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
117
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
111
118
 
112
119
  # Entwicklung/Alternativ: von GitHub
113
120
  dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
@@ -134,6 +141,24 @@ pnpm run smoke:deployed # echte Codex/Kimi-Tool-Calls + Replay des z
134
141
 
135
142
  **Settings → Coding OAuth** öffnen:
136
143
 
144
+
145
+ <table>
146
+ <tr>
147
+ <td align="center" valign="top" width="33%">
148
+ <a href="media/settings_accounts.png"><img src="media/settings_accounts.png" alt="Coding OAuth Accounts tab" width="280" /></a><br />
149
+ <sub>Accounts</sub>
150
+ </td>
151
+ <td align="center" valign="top" width="33%">
152
+ <a href="media/settings_gateway.png"><img src="media/settings_gateway.png" alt="Coding OAuth Gateway tab" width="280" /></a><br />
153
+ <sub>Gateway</sub>
154
+ </td>
155
+ <td align="center" valign="top" width="33%">
156
+ <a href="media/settings_capabilities.png"><img src="media/settings_capabilities.png" alt="Coding OAuth Capabilities tab" width="280" /></a><br />
157
+ <sub>Capabilities</sub>
158
+ </td>
159
+ </tr>
160
+ </table>
161
+
137
162
  | Anbieter | Methoden |
138
163
  |---|---|
139
164
  | Grok | Autorisierungscode · Gerätecode · Grok-CLI-Import · Modellauswahl |
@@ -201,16 +226,16 @@ Nur geprüfte Abonnement-Domänen werden proxied (xAI/Grok, OpenAI Codex, Claude
201
226
 
202
227
  OAuth-Zugriffstoken werden **fünf Minuten** vor dem gespeicherten Ablauf erneuert (pi-ai 0.84+). Lehnt der Upstream ein lokal noch gültiges Token mit 401/403 ab, setzt das Plugin das gespeicherte `expires` in die Vergangenheit; der wiederholte Step refresht zuerst und sendet dann erneut.
203
228
 
204
- Wiederholungen folgen der Harness-Retry-Policy: transiente Fehler (`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`) **und `AUTH`** werden mit exponentiellem Backoff wiederholt (2 Versuche, 500 ms → 10 s, 10 % Jitter). Quota-Erschöpfung und ein totes Refresh-Token werden **nicht** wiederholt. Überschreiben pro Deployment:
229
+ Wiederholungen folgen der Harness-Retry-Policy: transiente Fehler (`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`) **und `AUTH`** werden mit exponentiellem Backoff wiederholt (5 Versuche, 5 s → 10 s → 20 s → 40 s → 80 s (~155 s gestapelt), 10 % Jitter). Quota-Erschöpfung und ein totes Refresh-Token werden **nicht** wiederholt. Überschreiben pro Deployment:
205
230
 
206
231
  ```yaml
207
232
  - id: llm-grok-build-oauth
208
233
  config:
209
234
  retryPolicy:
210
235
  mode: normal
211
- maxRetries: 2
236
+ maxRetries: 5
212
237
  retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, AUTH]
213
- backoff: { initialDelayMs: 500, maxDelayMs: 10000, jitterRatio: 0.1 }
238
+ backoff: { initialDelayMs: 5000, maxDelayMs: 80000, jitterRatio: 0.1 }
214
239
  ```
215
240
 
216
241
  ## Zugangsdaten
package/README.es.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # 🔐 dsh-coding-subscription-oauth
6
6
 
7
- **v0.5.2 · antes `dsh-grok-build`
7
+ **v0.5.4 · antes `dsh-grok-build`
8
8
 
9
9
  **Plugin OAuth de suscripciones de codificación para [DeepSeek Harness](https://github.com/deepseek-ai/dsh).** Inicia sesión una vez con las suscripciones que ya pagas y luego usa sus modelos desde la página de configuración o la CLI de dsh. **Sin pegar tokens en el chat.**
10
10
 
@@ -24,7 +24,7 @@ Empezó como **`dsh-grok-build`** (solo Grok Build). Ahora cubre SuperGrok / Cod
24
24
  | | Usa esto | Sigue funcionando |
25
25
  |---|---|---|
26
26
  | GitHub / `dsh plugin add` | [`dsh-coding-subscription-oauth`](https://github.com/lninghaha/dsh-coding-subscription-oauth) | `github:lninghaha/dsh-grok-build` (el mismo `main`) |
27
- | npm | `dsh-coding-subscription-oauth@0.5.2` (versión actual) | No se publicó un paquete npm legado |
27
+ | npm | `dsh-coding-subscription-oauth@0.5.4` (versión actual) | No se publicó un paquete npm legado |
28
28
  | CLI | `dsh-coding-oauth` | `dsh-grok-build` |
29
29
  | Cordis plugin id | `llm-grok-build-oauth` | sin cambios |
30
30
  | API HTTP de ajustes | `/plugins/dsh-grok-build/*` | sin cambios |
@@ -36,14 +36,16 @@ Empezó como **`dsh-grok-build`** (solo Grok Build). Ahora cubre SuperGrok / Cod
36
36
  - 🔑 **OAuth local, sin pegar claves** — autoriza en la página de configuración o la CLI; los tokens nunca entran en el chat.
37
37
  - 🧩 **Un plugin, cinco proveedores** — Grok Build, Codex, Kimi, Claude y Google Antigravity.
38
38
  - 🛡️ **Seguro por diseño** — archivos de credenciales solo-propietario `0600`, escritura atómica, bloqueo de archivo entre procesos.
39
- - ⚙️ **Catálogo dinámico** — el selector de modelos lista exactamente los proveedores que autenticaste.
39
+ - ⚙️ **Catálogo dinámico** — el selector lista solo rutas autenticadas, etiquetadas con `(OAuth)`, incluido el `xhigh` de grok-4.6.
40
40
  - 🌐 **Consciente de proxy** — solo hace proxy de dominios de suscripción revisados y confiables.
41
+ - 📥 **CLI Pull manual** — la configuración descubre los archivos OAuth oficiales de los CLI Grok/Codex/Kimi/Claude permitidos, en modo solo lectura; extraes una copia unidireccional tras previsualizar y confirmar la sobrescritura.
42
+ - 🗂️ **Configuración en pestañas** — Accounts, Gateway, Capabilities y About; en hosts remotos se prioriza el device code y se reduce el ruido de CLI missing; las tarjetas conectadas permanecen contraídas hasta expandirlas.
43
+ - 🎛️ **Capacidades opcionales, desactivadas por defecto** — búsqueda de Codex, uso/cuota, generación/edición de imágenes, Fast y Grok Imagine se aplican en vivo al activarlas.
41
44
  - 🔌 **Gateway de API local opt-in** — servidor loopback compatible con OpenAI/Anthropic, desactivado por defecto; para tus propias herramientas, nunca un relé público.
42
45
 
43
46
  ## Problemas de integración que resuelve este plugin
44
47
 
45
48
  Estas búsquedas y errores de DSH suelen traer a la gente hasta aquí.
46
-
47
49
  | Buscaste / viste | Qué estaba roto | Qué hace el plugin |
48
50
  |---|---|---|
49
51
  | SuperGrok / X Premium en DSH, Grok Build vs `api.x.ai` | La ruta `xai` es la API de pago por uso. La suscripción de coding va a `cli-chat-proxy.grok.com` | Ruta `grok-build` + cabeceras fingerprint de la CLI (`X-XAI-Token-Auth`, etc.) para evitar un 403 silencioso |
@@ -71,7 +73,7 @@ Estas búsquedas y errores de DSH suelen traer a la gente hasta aquí.
71
73
 
72
74
  ```bash
73
75
  # 1. instala el plugin en el perfil web (versión actual de npm)
74
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
76
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
75
77
 
76
78
  # 2. opcional — Google Antigravity (versión fija revisada)
77
79
  dsh plugin --profile web add dsh-agy@0.1.2
@@ -85,9 +87,13 @@ Luego abre **Settings → Coding OAuth** e inicia sesión en cualquier proveedor
85
87
  ## 📚 Índice
86
88
 
87
89
  - [Cambio de nombre](#cambio-de-nombre)
90
+ - [Funciones](#-funciones)
88
91
  - [Problemas de integración que resuelve este plugin](#problemas-de-integración-que-resuelve-este-plugin)
92
+ - [Proveedores soportados](#proveedores-soportados)
93
+ - [Inicio rápido](#-inicio-rápido)
89
94
  - [Instalación](#instalación)
90
95
  - [Página de configuración](#página-de-configuración)
96
+ - [Capacidades opcionales](#capacidades-opcionales)
91
97
  - [Gateway de API local](#gateway-de-api-local)
92
98
  - [CLI](#cli)
93
99
  - [Kimi en China](#kimi-en-china)
@@ -98,6 +104,7 @@ Luego abre **Settings → Coding OAuth** e inicia sesión en cualquier proveedor
98
104
  - [Notas técnicas](#notas-técnicas)
99
105
  - [Cumplimiento](#cumplimiento)
100
106
  - [Documentación](#documentación)
107
+ - [Relacionados](#relacionados)
101
108
  - [Contribución](#contribución)
102
109
  - [Licencia](#licencia)
103
110
 
@@ -107,7 +114,7 @@ Requiere DeepSeek Harness `0.1.0-rc.6+` y Node.js 22.19+. Detalles completos en
107
114
 
108
115
  ```bash
109
116
  # versión actual de npm (recomendado)
110
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
117
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
111
118
 
112
119
  # desarrollo/alternativo: desde GitHub
113
120
  dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
@@ -134,6 +141,25 @@ pnpm run smoke:deployed # llamadas reales Codex/Kimi + replay del se
134
141
 
135
142
  Abre **Settings → Coding OAuth**:
136
143
 
144
+
145
+
146
+ <table>
147
+ <tr>
148
+ <td align="center" valign="top" width="33%">
149
+ <a href="media/settings_accounts.png"><img src="media/settings_accounts.png" alt="Coding OAuth Accounts tab" width="280" /></a><br />
150
+ <sub>Accounts</sub>
151
+ </td>
152
+ <td align="center" valign="top" width="33%">
153
+ <a href="media/settings_gateway.png"><img src="media/settings_gateway.png" alt="Coding OAuth Gateway tab" width="280" /></a><br />
154
+ <sub>Gateway</sub>
155
+ </td>
156
+ <td align="center" valign="top" width="33%">
157
+ <a href="media/settings_capabilities.png"><img src="media/settings_capabilities.png" alt="Coding OAuth Capabilities tab" width="280" /></a><br />
158
+ <sub>Capabilities</sub>
159
+ </td>
160
+ </tr>
161
+ </table>
162
+
137
163
  | Proveedor | Métodos |
138
164
  |---|---|
139
165
  | Grok | código de autorización · código de dispositivo · importación CLI de Grok · selección de modelos |
@@ -201,16 +227,16 @@ Solo se usan vía proxy los dominios de suscripción revisados (xAI/Grok, OpenAI
201
227
 
202
228
  Los tokens de acceso OAuth se renuevan **cinco minutos** antes del vencimiento almacenado (pi-ai 0.84+). Si el origen aún rechaza un token localmente válido con 401/403, el plugin retrocede el `expires` guardado y el step reintentado renueva el token antes de reenviar.
203
229
 
204
- Los reintentos siguen la política del harness: fallos transitorios (`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`) **y `AUTH`** se reintentan con backoff exponencial (2 reintentos, 500 ms → 10 s, 10% de jitter). El agotamiento de cuota y un refresh token muerto **no** se reintentan. Anulación por despliegue:
230
+ Los reintentos siguen la política del harness: fallos transitorios (`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`) **y `AUTH`** se reintentan con backoff exponencial (5 reintentos, 5 s → 10 s → 20 s → 40 s → 80 s (~155 s acumulados), 10% de jitter). El agotamiento de cuota y un refresh token muerto **no** se reintentan. Anulación por despliegue:
205
231
 
206
232
  ```yaml
207
233
  - id: llm-grok-build-oauth
208
234
  config:
209
235
  retryPolicy:
210
236
  mode: normal
211
- maxRetries: 2
237
+ maxRetries: 5
212
238
  retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, AUTH]
213
- backoff: { initialDelayMs: 500, maxDelayMs: 10000, jitterRatio: 0.1 }
239
+ backoff: { initialDelayMs: 5000, maxDelayMs: 80000, jitterRatio: 0.1 }
214
240
  ```
215
241
 
216
242
  ## Credenciales
package/README.fr.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # 🔐 dsh-coding-subscription-oauth
6
6
 
7
- **v0.5.2 · anciennement `dsh-grok-build`
7
+ **v0.5.4 · anciennement `dsh-grok-build`
8
8
 
9
9
  **Plugin OAuth pour abonnements de codage de [DeepSeek Harness](https://github.com/deepseek-ai/dsh).** Connectez-vous une fois avec les abonnements que vous payez déjà, puis utilisez leurs modèles depuis la page de configuration ou la CLI dsh. **Aucun token collé dans le chat.**
10
10
 
@@ -24,7 +24,7 @@ Le projet s'appelait **`dsh-grok-build`** (Grok Build uniquement). Il couvre mai
24
24
  | | Utiliser | Toujours valable |
25
25
  |---|---|---|
26
26
  | GitHub / `dsh plugin add` | [`dsh-coding-subscription-oauth`](https://github.com/lninghaha/dsh-coding-subscription-oauth) | `github:lninghaha/dsh-grok-build` (même `main`) |
27
- | npm | `dsh-coding-subscription-oauth@0.5.2` (version actuelle) | Aucun ancien paquet npm n'a été publié |
27
+ | npm | `dsh-coding-subscription-oauth@0.5.4` (version actuelle) | Aucun ancien paquet npm n'a été publié |
28
28
  | CLI | `dsh-coding-oauth` | `dsh-grok-build` |
29
29
  | Cordis plugin id | `llm-grok-build-oauth` | inchangé |
30
30
  | API HTTP des réglages | `/plugins/dsh-grok-build/*` | inchangé |
@@ -36,14 +36,16 @@ Le projet s'appelait **`dsh-grok-build`** (Grok Build uniquement). Il couvre mai
36
36
  - 🔑 **OAuth local, sans coller de clé** — autorisez dans la page de configuration ou la CLI ; les tokens n'entrent jamais dans le chat.
37
37
  - 🧩 **Un plugin, cinq fournisseurs** — Grok Build, Codex, Kimi, Claude et Google Antigravity.
38
38
  - 🛡️ **Sécurisé par conception** — fichiers d'identification propriétaire-seul `0600`, écriture atomique, verrou de fichier inter-processus.
39
- - ⚙️ **Catalogue dynamique** — le sélecteur de modèles liste exactement les fournisseurs que vous avez authentifiés.
39
+ - ⚙️ **Catalogue dynamique** — le sélecteur n'affiche que les routes authentifiées, étiquetées `(OAuth)`, y compris le `xhigh` de grok-4.6.
40
40
  - 🌐 **Conscient du proxy** — ne proxifie que les domaines d'abonnement examinés et de confiance.
41
+ - 📥 **CLI Pull manuel** — les paramètres découvrent en lecture seule les fichiers OAuth officiels des CLI Grok/Codex/Kimi/Claude autorisés ; vous récupérez une copie à sens unique après prévisualisation et confirmation d'écrasement.
42
+ - 🗂️ **Paramètres en onglets** — Accounts, Gateway, Capabilities et About ; les hôtes distants privilégient le device code avec moins de bruit CLI missing ; les cartes connectées restent repliées jusqu'à expansion.
43
+ - 🎛️ **Capacités optionnelles, désactivées par défaut** — recherche Codex, usage/quota, génération/édition d'images, Fast et Grok Imagine s'appliquent en direct dès leur activation.
41
44
  - 🔌 **Passerelle API locale opt-in** — serveur loopback compatible OpenAI/Anthropic, désactivé par défaut ; pour vos propres outils, jamais un relais public.
42
45
 
43
46
  ## Problèmes d'intégration que ce plugin résout
44
47
 
45
48
  Ce sont les recherches et erreurs DSH qui mènent le plus souvent ici.
46
-
47
49
  | Vous avez cherché / vu | Ce qui était cassé | Ce que fait le plugin |
48
50
  |---|---|---|
49
51
  | SuperGrok / X Premium dans DSH, Grok Build vs `api.x.ai` | La route `xai` est l'API à l'usage. L'abonnement coding passe par `cli-chat-proxy.grok.com` | Route `grok-build` + en-têtes d'empreinte CLI (`X-XAI-Token-Auth`, etc.) pour éviter un 403 silencieux |
@@ -71,7 +73,7 @@ Ce sont les recherches et erreurs DSH qui mènent le plus souvent ici.
71
73
 
72
74
  ```bash
73
75
  # 1. installez le plugin dans le profil web (version actuelle npm)
74
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
76
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
75
77
 
76
78
  # 2. optionnel — Google Antigravity (version épinglée examinée)
77
79
  dsh plugin --profile web add dsh-agy@0.1.2
@@ -85,9 +87,13 @@ Ensuite ouvrez **Settings → Coding OAuth** et connectez-vous à n'importe quel
85
87
  ## 📚 Sommaire
86
88
 
87
89
  - [Changement de nom](#changement-de-nom)
90
+ - [Fonctionnalités](#-fonctionnalités)
88
91
  - [Problèmes d'intégration que ce plugin résout](#problèmes-dintégration-que-ce-plugin-résout)
92
+ - [Fournisseurs pris en charge](#fournisseurs-pris-en-charge)
93
+ - [Démarrage rapide](#-démarrage-rapide)
89
94
  - [Installation](#installation)
90
95
  - [Page de configuration](#page-de-configuration)
96
+ - [Capacités optionnelles](#capacités-optionnelles)
91
97
  - [Passerelle API locale](#passerelle-api-locale)
92
98
  - [CLI](#cli)
93
99
  - [Kimi en Chine](#kimi-en-chine)
@@ -98,6 +104,7 @@ Ensuite ouvrez **Settings → Coding OAuth** et connectez-vous à n'importe quel
98
104
  - [Notes techniques](#notes-techniques)
99
105
  - [Conformité](#conformité)
100
106
  - [Documentation](#documentation)
107
+ - [Lié](#lié)
101
108
  - [Contribution](#contribution)
102
109
  - [Licence](#licence)
103
110
 
@@ -107,7 +114,7 @@ Nécessite DeepSeek Harness `0.1.0-rc.6+` et Node.js 22.19+. Détails complets d
107
114
 
108
115
  ```bash
109
116
  # version actuelle npm (recommandé)
110
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
117
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
111
118
 
112
119
  # développement/alternatif : depuis GitHub
113
120
  dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
@@ -134,6 +141,25 @@ pnpm run smoke:deployed # appels réels Codex/Kimi + rejeu du second
134
141
 
135
142
  Ouvrez **Settings → Coding OAuth** :
136
143
 
144
+
145
+
146
+ <table>
147
+ <tr>
148
+ <td align="center" valign="top" width="33%">
149
+ <a href="media/settings_accounts.png"><img src="media/settings_accounts.png" alt="Coding OAuth Accounts tab" width="280" /></a><br />
150
+ <sub>Accounts</sub>
151
+ </td>
152
+ <td align="center" valign="top" width="33%">
153
+ <a href="media/settings_gateway.png"><img src="media/settings_gateway.png" alt="Coding OAuth Gateway tab" width="280" /></a><br />
154
+ <sub>Gateway</sub>
155
+ </td>
156
+ <td align="center" valign="top" width="33%">
157
+ <a href="media/settings_capabilities.png"><img src="media/settings_capabilities.png" alt="Coding OAuth Capabilities tab" width="280" /></a><br />
158
+ <sub>Capabilities</sub>
159
+ </td>
160
+ </tr>
161
+ </table>
162
+
137
163
  | Fournisseur | Méthodes |
138
164
  |---|---|
139
165
  | Grok | code d'autorisation · code de dispositif · importation CLI Grok · sélection de modèles |
@@ -201,16 +227,16 @@ Seuls les domaines d'abonnement examinés sont proxifiés (xAI/Grok, OpenAI Code
201
227
 
202
228
  Les jetons d'accès OAuth sont renouvelés **cinq minutes** avant l'expiration enregistrée (pi-ai 0.84+). Si l'amont refuse encore un jeton localement valide avec 401/403, le plugin recule le `expires` stocké et l'étape relancée rafraîchit le jeton avant de renvoyer.
203
229
 
204
- Les nouvelles tentatives suivent la politique du harness : les pannes transitoires (`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`) **et `AUTH`** sont relancées avec un backoff exponentiel (2 essais, 500 ms → 10 s, jitter 10 %). L'épuisement de quota et un refresh token mort **ne** sont **pas** relancés. Surcharge par déploiement :
230
+ Les nouvelles tentatives suivent la politique du harness : les pannes transitoires (`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`) **et `AUTH`** sont relancées avec un backoff exponentiel (5 essais, 5 s → 10 s → 20 s → 40 s → 80 s (~155 s cumulés), jitter 10 %). L'épuisement de quota et un refresh token mort **ne** sont **pas** relancés. Surcharge par déploiement :
205
231
 
206
232
  ```yaml
207
233
  - id: llm-grok-build-oauth
208
234
  config:
209
235
  retryPolicy:
210
236
  mode: normal
211
- maxRetries: 2
237
+ maxRetries: 5
212
238
  retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, AUTH]
213
- backoff: { initialDelayMs: 500, maxDelayMs: 10000, jitterRatio: 0.1 }
239
+ backoff: { initialDelayMs: 5000, maxDelayMs: 80000, jitterRatio: 0.1 }
214
240
  ```
215
241
 
216
242
  ## Identifiants
package/README.ja.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # 🔐 dsh-coding-subscription-oauth
6
6
 
7
- **v0.5.2 · 旧名 `dsh-grok-build`
7
+ **v0.5.4 · 旧名 `dsh-grok-build`
8
8
 
9
9
  **DeepSeek Harness(dsh)のためのコーディングサブスクリプション OAuth プラグイン。** 支払い済みのサブスクリプションで一度きりのサインイン——その後は dsh の設定ページまたは CLI からそのモデルを使えます。**チャットにトークンを貼り付ける必要はありません。**
10
10
 
@@ -20,11 +20,10 @@
20
20
  ## 名称変更
21
21
 
22
22
  当初は Grok Build 専用で **`dsh-grok-build`** でした。現在は SuperGrok / Codex / Kimi / Claude / Antigravity のコーディングサブスク OAuth です。
23
-
24
23
  | | これを使う | 互換 |
25
24
  |---|---|---|
26
25
  | GitHub / `dsh plugin add` | [`dsh-coding-subscription-oauth`](https://github.com/lninghaha/dsh-coding-subscription-oauth) | `github:lninghaha/dsh-grok-build`(同じ `main`) |
27
- | npm | `dsh-coding-subscription-oauth@0.5.2`(現在のリリース) | 旧 npm パッケージは公開されていない |
26
+ | npm | `dsh-coding-subscription-oauth@0.5.4`(現在のリリース) | 旧 npm パッケージは公開されていない |
28
27
  | CLI | `dsh-coding-oauth` | `dsh-grok-build` |
29
28
  | Cordis プラグイン id | `llm-grok-build-oauth` | 変更なし |
30
29
  | 設定ページ HTTP API | `/plugins/dsh-grok-build/*` | 変更なし |
@@ -36,8 +35,11 @@
36
35
  - 🔑 **ローカル OAuth、キーの貼り付け不要** — 設定ページまたは CLI で認証します。トークンがチャットに入ることはありません。
37
36
  - 🧩 **1 つのプラグインで 5 つのプロバイダー** — Grok Build、Codex、Kimi、Claude、Google Antigravity。
38
37
  - 🛡️ **セキュリティ設計** — 認証情報ファイルはオーナー専用 `0600`、アトミック書き込み、クロスプロセスファイルロック。
39
- - ⚙️ **動的カタログ** — モデルセレクターには認証済みプロバイダーのみが表示されます。
38
+ - ⚙️ **動的カタログ** — セレクターには認証を完了したルートのみが `(OAuth)` ラベル付きで表示され、grok-4.6 の `xhigh` も含まれます。
40
39
  - 🌐 **プロキシ対応** — レビュー済みの信頼できるサブスクリプションドメインのみをプロキシします。
40
+ - 📥 **手動 CLI Pull** — 設定ページが許可リストにある公式 Grok/Codex/Kimi/Claude CLI の OAuth ファイルを読み取り専用で検出。プレビューと上書き確認の後、ワンウェイコピーを取り込みます。
41
+ - 🗂️ **タブ分けされた設定** — Accounts・Gateway・Capabilities・About。リモートホストではデバイスコード優先と CLI missing の静かな案内;サインイン済みカードは展開するまで折りたたまれます。
42
+ - 🎛️ **オプション機能(既定オフ)** — Codex の検索・使用量/クォータ・画像生成/編集・Fast、Grok Imagine はスイッチをオンにすると即時適用されます。
41
43
  - 🔌 **オプトインのローカル API ゲートウェイ** — 既定オフのループバック OpenAI/Anthropic 互換サーバー。自分のツール専用で、公開リレーではありません。
42
44
 
43
45
  ## このプラグインが解く接続の問題
@@ -71,7 +73,7 @@ DSH にコーディングサブスクを載せるとき、よく次の検索語
71
73
 
72
74
  ```bash
73
75
  # 1. web プロファイルにプラグインをインストール(現在の npm リリース)
74
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
76
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
75
77
 
76
78
  # 2. 任意 — Google Antigravity(レビュー済みの固定バージョン)
77
79
  dsh plugin --profile web add dsh-agy@0.1.2
@@ -85,9 +87,13 @@ systemctl --user restart dsh-web.service
85
87
  ## 📚 目次
86
88
 
87
89
  - [名称変更](#名称変更)
90
+ - [特徴](#-特徴)
88
91
  - [このプラグインが解く接続の問題](#このプラグインが解く接続の問題)
92
+ - [対応プロバイダー](#対応プロバイダー)
93
+ - [クイックスタート](#-クイックスタート)
89
94
  - [インストール](#インストール)
90
95
  - [設定ページ](#設定ページ)
96
+ - [オプション機能](#オプション機能)
91
97
  - [ローカル API ゲートウェイ](#ローカル-api-ゲートウェイ)
92
98
  - [CLI](#cli)
93
99
  - [中国での Kimi](#中国での-kimi)
@@ -98,6 +104,7 @@ systemctl --user restart dsh-web.service
98
104
  - [技術的な補足](#技術的な補足)
99
105
  - [コンプライアンス](#コンプライアンス)
100
106
  - [ドキュメント](#ドキュメント)
107
+ - [関連プロジェクト](#関連プロジェクト)
101
108
  - [コントリビュート](#コントリビュート)
102
109
  - [ライセンス](#ライセンス)
103
110
 
@@ -107,7 +114,7 @@ DeepSeek Harness `0.1.0-rc.6+` と Node.js 22.19+ が前提です。詳細は[
107
114
 
108
115
  ```bash
109
116
  # 現在の npm リリース(推奨)
110
- dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.2
117
+ dsh plugin --profile web add dsh-coding-subscription-oauth@0.5.4
111
118
 
112
119
  # 開発/代替:GitHub から
113
120
  dsh plugin --profile web add github:lninghaha/dsh-coding-subscription-oauth
@@ -134,6 +141,25 @@ pnpm run smoke:deployed # 実際の Codex/Kimi ツール呼び出し
134
141
 
135
142
  **Settings → Coding OAuth** を開きます:
136
143
 
144
+
145
+
146
+ <table>
147
+ <tr>
148
+ <td align="center" valign="top" width="33%">
149
+ <a href="media/settings_accounts.png"><img src="media/settings_accounts.png" alt="Coding OAuth Accounts tab" width="280" /></a><br />
150
+ <sub>Accounts</sub>
151
+ </td>
152
+ <td align="center" valign="top" width="33%">
153
+ <a href="media/settings_gateway.png"><img src="media/settings_gateway.png" alt="Coding OAuth Gateway tab" width="280" /></a><br />
154
+ <sub>Gateway</sub>
155
+ </td>
156
+ <td align="center" valign="top" width="33%">
157
+ <a href="media/settings_capabilities.png"><img src="media/settings_capabilities.png" alt="Coding OAuth Capabilities tab" width="280" /></a><br />
158
+ <sub>Capabilities</sub>
159
+ </td>
160
+ </tr>
161
+ </table>
162
+
137
163
  | プロバイダー | 方法 |
138
164
  |---|---|
139
165
  | Grok | 認証コード · デバイスコード · Grok CLI import · モデル選択 |
@@ -201,16 +227,16 @@ Kimi Code サブスクリプション OAuth は `https://auth.kimi.com` を、
201
227
 
202
228
  OAuth アクセストークンは記録された有効期限の **5 分前**に先行リフレッシュされます(pi-ai 0.84+)。上流がまだローカルでは有効なトークンを 401/403 で拒否した場合、プラグインは保存済み `expires` を過去に戻し、再試行ステップが先にリフレッシュしてから再送します。
203
229
 
204
- リクエスト再試行は harness の retry ポリシーです。一時障害(`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`)**および `AUTH`** は指数バックオフで再試行します(既定 2 回、500 ms → 10 s10% jitter)。クォータ枯渇と無効な refresh token は再試行しません。上書き例:
230
+ リクエスト再試行は harness の retry ポリシーです。一時障害(`RATE_LIMIT`/`SERVER`/`TIMEOUT`/`TRANSPORT`/`EMPTY_RESPONSE`)**および `AUTH`** は指数バックオフで再試行します(既定 5 回、5 s → 10 s → 20 s → 40 s → 80 s(約 155 s 累積)、10% jitter)。クォータ枯渇と無効な refresh token は再試行しません。上書き例:
205
231
 
206
232
  ```yaml
207
233
  - id: llm-grok-build-oauth
208
234
  config:
209
235
  retryPolicy:
210
236
  mode: normal
211
- maxRetries: 2
237
+ maxRetries: 5
212
238
  retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, AUTH]
213
- backoff: { initialDelayMs: 500, maxDelayMs: 10000, jitterRatio: 0.1 }
239
+ backoff: { initialDelayMs: 5000, maxDelayMs: 80000, jitterRatio: 0.1 }
214
240
  ```
215
241
 
216
242
  ## 認証情報