dsh-codex-subscription 1.11.1 → 1.11.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/AGENTS.md CHANGED
@@ -6,7 +6,7 @@ Use this guide when a user asks an Agent to install, update, verify, or remove
6
6
  ## Safety
7
7
 
8
8
  - Confirm the target DSH installation and profile. Use `web` only when it is the user's target.
9
- - Use the exact `1.11.1` package below; do not install a moving branch.
9
+ - Use the exact `1.11.2` package below; do not install a moving branch.
10
10
  - Never print OAuth credentials, account IDs, authorization callbacks, or credential-store contents.
11
11
  - Preserve the DSH profile, unrelated plugins, sessions, and saved sign-in.
12
12
  - Do not start, stop, or restart DSH without explicit permission.
@@ -34,13 +34,13 @@ For an official DSH installation run through npm, keep the complete `npx` prefix
34
34
  run command does not create a global `dsh` command:
35
35
 
36
36
  ```sh
37
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add dsh-codex-subscription@1.11.1
37
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add dsh-codex-subscription@1.11.2
38
38
  ```
39
39
 
40
40
  With an existing global `dsh` command:
41
41
 
42
42
  ```sh
43
- dsh plugin --profile web add dsh-codex-subscription@1.11.1
43
+ dsh plugin --profile web add dsh-codex-subscription@1.11.2
44
44
  ```
45
45
 
46
46
  Use the same `add` command to update or repair. This is the complete package-changing operation.
@@ -58,7 +58,7 @@ dsh --profile web --dump-config
58
58
 
59
59
  For the official npm route, run the same checks with `npx -y @deepseek-ai/dsh@0.1.1-rc.2` in place of `dsh`.
60
60
 
61
- 1. `dsh-codex-subscription` version `1.11.1` appears exactly once.
61
+ 1. `dsh-codex-subscription` version `1.11.2` appears exactly once.
62
62
  2. `codex-subscription` appears exactly once in the composed config.
63
63
  3. No unrelated plugin or profile was changed and DSH was not restarted.
64
64
 
package/README.en.md ADDED
@@ -0,0 +1,232 @@
1
+ <div align="center">
2
+
3
+ # DSH Codex Subscription
4
+
5
+ [简体中文](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.md) · **English**
6
+
7
+ **Use your ChatGPT / Codex subscription directly in DeepSeek Harness**
8
+
9
+ No OpenAI API key or Codex CLI. Models, search, quota, and image generation stay inside DSH.
10
+
11
+ [![CI](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml/badge.svg)](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml)
12
+ [![npm](https://img.shields.io/npm/v/dsh-codex-subscription?logo=npm&label=npm)](https://www.npmjs.com/package/dsh-codex-subscription)
13
+ [![total npm downloads](https://img.shields.io/npm/dt/dsh-codex-subscription?logo=npm&label=total%20downloads)](https://www.npmjs.com/package/dsh-codex-subscription)
14
+ [![MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
15
+ [![Star](https://img.shields.io/github/stars/WSL043/dsh-codex-subscription?style=flat&logo=github&label=Star)](https://github.com/WSL043/dsh-codex-subscription/stargazers)
16
+
17
+ [Three-step start](#three-step-start) · [Install](#install) · [Contribute](CONTRIBUTING.md) · [Update and uninstall](#update-and-uninstall)
18
+
19
+ </div>
20
+
21
+ <p align="center">
22
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/readme-hero-en.webp" width="900" alt="Your Codex subscription inside DSH: models, web search, quota and safe reset, image generation, and Fast mode">
23
+ </p>
24
+
25
+ ## Three-step start
26
+
27
+ 1. **Install the plugin.** Run the standard DSH bundle command:
28
+
29
+ ```sh
30
+ dsh plugin --profile web add dsh-codex-subscription
31
+ ```
32
+
33
+ 2. **Sign in.** Restart DSH yourself, open **Settings -> Codex**, and choose browser sign-in. No Codex CLI and no pasted token are required.
34
+ 3. **Use Codex.** Select a Codex model. Quota, subscription search, image generation, and Fast mode remain inside DSH.
35
+
36
+ DSH-Portable exposes the same standard plugin command, so the command above also applies there. See below for the complete official npm, Agent, update, and uninstall routes.
37
+
38
+ ## Why this plugin
39
+
40
+ | Capability | What you get |
41
+ | --- | --- |
42
+ | **Subscription models** | Sign in to ChatGPT and use Codex without an OpenAI API key or Codex CLI |
43
+ | **Recoverable and diagnosable** | Sign-in state reconciles automatically; Settings can create a support report without credentials or account identifiers |
44
+ | **Visible quota** | Keep backend-provided standard Codex, Spark, and other limits separate |
45
+ | **Composer quota** | Choose a compact percentage, progress bar, or no inline quota display |
46
+ | **Safe quota reset** | See the next expiry and deliberately try a reset with a cooldown and acknowledgement |
47
+ | **Subscription search** | Explicitly route search globally through DSH default search or the signed-in Codex subscription |
48
+ | **Codex image generation and editing (Beta)** | Generate without references, or explicitly edit one selected image; preview, zoom, annotate regions, download the original, and continue in the same composer |
49
+ | **Fast mode** | Switch between Standard and Fast directly in the composer |
50
+ | **Model-aware context** | Keep catalog defaults, use each model's supported extended window, or enter a full numeric token limit for each model |
51
+ | **Headless runs** | Use the same signed-in Codex provider for one-shot DSH tasks that print their answer and exit |
52
+
53
+ These capabilities reuse the same local ChatGPT sign-in. Subscription routing failures stay visible and never silently switch to another paid route.
54
+
55
+ ## Product screen
56
+
57
+ <p align="center">
58
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/context-settings-en.png" width="820" alt="Current Codex subscription settings in DeepSeek Harness with search, model-aware context, composer quota, and support diagnostics">
59
+ </p>
60
+
61
+ Captured from the installed official DeepSeek Harness `0.1.1-rc.2` product with the current plugin build.
62
+
63
+ ## Prepare DSH
64
+
65
+ This plugin supports the latest DeepSeek Harness release recorded in its package metadata and requires a ChatGPT account that currently has Codex access.
66
+
67
+ - Do not want to configure Node.js? Use [DSH-Portable](https://github.com/WSL043/DSH-Portable), a community portable desktop distribution for Windows, macOS, and Linux.
68
+ - Prefer the official route? Follow the [DeepSeek Harness run guide](https://github.com/deepseek-ai/deepseek-harness#run).
69
+
70
+ ## Install
71
+
72
+ ### Standard DSH command
73
+
74
+ ```sh
75
+ dsh plugin --profile web add dsh-codex-subscription
76
+ ```
77
+
78
+ DSH owns target selection, profile locking, dependency resolution, and bundle activation; this is the plugin's only installation path.
79
+
80
+ ### Headless
81
+
82
+ After signing in and selecting a Codex model in Web once, install the same plugin in DSH's standard Headless profile:
83
+
84
+ ```sh
85
+ dsh plugin --profile headless add dsh-codex-subscription
86
+ dsh --profile headless "Reply with only the word: ok"
87
+ ```
88
+
89
+ ### Let an Agent install it
90
+
91
+ Send this link directly to your Agent:
92
+
93
+ **[Agent install, update, and uninstall guide](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)**
94
+
95
+ ```text
96
+ https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md
97
+ ```
98
+
99
+ The guide includes verification steps and tells the Agent to preserve the DSH profile, sign-in, and other plugins.
100
+
101
+ <details>
102
+ <summary>Official npm route (Node.js installed)</summary>
103
+
104
+ The official `npx @deepseek-ai/dsh web` command does not create a global `dsh` command. Keep the full `npx` prefix when installing the plugin:
105
+
106
+ ```sh
107
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add dsh-codex-subscription
108
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web list dsh-codex-subscription --depth 0
109
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 --profile web --dump-config
110
+ ```
111
+
112
+ </details>
113
+
114
+ <details>
115
+ <summary>An existing <code>dsh</code> command</summary>
116
+
117
+ ```sh
118
+ dsh plugin --profile web add dsh-codex-subscription
119
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
120
+ dsh --profile web --dump-config
121
+ ```
122
+
123
+ The plugin list should contain one `dsh-codex-subscription`, and the config should contain one `codex-subscription` entry.
124
+
125
+ </details>
126
+
127
+ Restart DSH manually after installation, then:
128
+
129
+ 1. Open **Settings -> Codex**.
130
+ 2. Sign in with a ChatGPT account that has Codex access.
131
+ 3. Choose a search source.
132
+ 4. Select a Codex model.
133
+
134
+ ## Features
135
+
136
+ - ChatGPT OAuth sign-in with credentials kept on the host;
137
+ - Codex models and Beta image generation/editing directly inside DSH conversations;
138
+ - A clear global choice between DSH default search and Codex subscription search; it applies to every model and session rather than following the selected model;
139
+ - Actual backend-provided quota, reset time, and freshness;
140
+ - Separate standard Codex, Codex-Spark, Credits, and other independent limits;
141
+ - Visible quota-reset count and earliest expiry, with deliberate early redemption, layered confirmation, and no automatic retry;
142
+ - Optional percentage, progress bar, or Beta runway estimate for the selected Codex model (off by default);
143
+ - Standard or Fast mode for supported Codex models directly in the composer;
144
+ - Standard, Extended, and per-model Custom context windows; Custom accepts a full numeric token count, stays within each audited model capacity, and feeds DSH's native agent compaction policy;
145
+ - A copyable support report and direct feedback link in Settings; the report includes bounded request stages, HTTP/transport classes, elapsed ranges, and route source types while excluding OAuth credentials, account identifiers, proxy addresses, and authorization timestamps;
146
+ - Visible errors when subscription routing is unavailable, with no silent paid fallback.
147
+
148
+ The plugin can follow an existing HTTPS proxy from the process environment or operating-system proxy settings for official OpenAI and ChatGPT requests. It does not provide a proxy, relay, node list, or system-proxy configuration.
149
+
150
+ ### Composer quota
151
+
152
+ <p align="center">
153
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/composer-quota-en.png" width="800" alt="Codex quota inside the composer">
154
+ </p>
155
+
156
+ Choose Off, Percent, Progress bar, or Beta Runway in Settings. The compact display appears only for a selected Codex model. Runway is opt-in and estimates the current pace only from official remaining-percentage observations kept in local runtime memory; it stays quiet with insufficient evidence and recalibrates after a reset, account change, or disable.
157
+ Standard Codex uses the lowest remaining window returned by the service; Spark uses its independent quota. The plugin does not hard-code a
158
+ “5-hour + weekly” layout or invent Credits and spending caps that the service did not return.
159
+
160
+ ### Safe quota reset
161
+
162
+ If ChatGPT reports an available quota reset, Settings shows its count and earliest disclosed expiry in a compact row.
163
+ You may deliberately try it before a quota reaches 100%, which is useful for a reset nearing expiry. ChatGPT still
164
+ decides whether a window needs resetting and may return **nothing to reset** without spending the reset. The final
165
+ action requires an acknowledgement checkbox and five-second cooldown. Cancel never consumes a reset, rapid repeated
166
+ clicks are single-flight, and an uncertain network result is never retried automatically.
167
+
168
+ ### Image generation and editing (Beta)
169
+
170
+ When `dsh-image-viewer` is installed, generated images delegate to its unified preview first. The subscription viewer is only a fallback when that service is absent or declines the request, so the two plugins never compete for the same entry point. Image Viewer owns zoom, pan, fit, preview downloads, and region notes; this plugin owns Codex image generation/editing, exact-original authorization, and the continue-editing handoff.
171
+ Both paths expose dimensions and numbered region notes. The standard **Download** action retrieves the permission- and integrity-checked exact original by default; only legacy sessions without an exact original fall back to the conversation preview.
172
+ Press **Enter** to save and collapse a region note; use **Shift+Enter** for a new line. Notes remain available when the
173
+ same image is reopened during the current DSH page session.
174
+ **Continue editing in composer** attaches exactly the image you opened and writes the region notes into the draft without
175
+ sending it. A new image request does not silently include earlier images. GPT Image 2 can take longer than a normal text
176
+ turn, and detailed text, exact composition, or repeated-character consistency may still need another pass.
177
+
178
+ <p align="center">
179
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/image-preview-annotations-en.png" width="800" alt="Generated image, region note, and continue editing inside the DSH Image Viewer">
180
+ </p>
181
+
182
+ The exact bytes returned by GPT Image are stored separately under the current DSH home because DSH may normalize the conversation preview for display and later model input. Original files are integrity-checked and available only to the creating session or a fork that inherited that image result; forks created earlier and unrelated sessions are denied. Raw image bytes are never placed in the session log. Uninstalling the plugin does not delete already generated originals.
183
+
184
+ ### Composer speed
185
+
186
+ With a supported Codex model selected, open the composer's model menu to choose Standard or Fast.
187
+ Standard adds no icon; only Fast shows a lightning icon before the model name. Spark does not show the speed entry. Fast mode increases speed and uses more Credits;
188
+ see the [OpenAI Codex Speed documentation](https://learn.chatgpt.com/docs/agent-configuration/speed) for the current rules.
189
+
190
+ ## Update and uninstall
191
+
192
+ Use the same DSH plugin lifecycle to update, verify, or uninstall:
193
+
194
+ ```sh
195
+ dsh plugin --profile web update dsh-codex-subscription
196
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
197
+ dsh --profile web --dump-config
198
+ dsh plugin --profile web remove dsh-codex-subscription
199
+ ```
200
+
201
+ These operations preserve the DSH profile, other plugins, and saved sign-in.
202
+
203
+ <details>
204
+ <summary>Official npm fallback</summary>
205
+
206
+ ```sh
207
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web update dsh-codex-subscription
208
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web list dsh-codex-subscription --depth 0
209
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 --profile web --dump-config
210
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web remove dsh-codex-subscription
211
+ ```
212
+
213
+ </details>
214
+
215
+ ## Troubleshooting
216
+
217
+ - **`dsh` is not recognized:** the official npm route does not create a global `dsh` command; use the complete `npx -y @deepseek-ai/dsh@0.1.1-rc.2 ...` command above;
218
+ - **More than one DSH exists:** run the standard command from the intended DSH environment so that product selects the corresponding profile;
219
+ - **Setup still fails:** send the Agent guide above to an Agent. Do not delete the profile or change the system PATH to force an install.
220
+ - **Need to report a problem:** generate a **Support diagnostics** report at the bottom of Settings, then open the [bug report form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml). The report includes the OS/runtime, bounded sign-in phase, and safe request-failure categories, but excludes credentials, account identifiers, proxy addresses, raw responses, and full logs. Paste it into the required diagnostics field; never attach sign-in URLs, authorization codes, or browser callback addresses.
221
+
222
+ The ChatGPT Codex backend and DSH can change independently. This community project is not affiliated with or endorsed by DeepSeek or OpenAI.
223
+
224
+ Use the [bug report form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml) for project feedback.
225
+ Use the [feature request form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=feature-request.yml) for focused product suggestions.
226
+ Focused fixes and compatibility improvements are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
227
+ For DSH plugin discussion, visit [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions).
228
+ Read [SECURITY.md](SECURITY.md) before reporting sensitive issues.
229
+
230
+ If this project is useful, the [Star button](https://github.com/WSL043/dsh-codex-subscription/stargazers) helps more DSH users find it.
231
+
232
+ [简体中文](README.md) · [MIT](LICENSE)
package/README.md CHANGED
@@ -1,95 +1,108 @@
1
+ # DSH Codex Subscription
2
+
1
3
  <div align="center">
2
4
 
3
- # DSH Codex Subscription
5
+ **简体中文** · [English](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.en.md)
4
6
 
5
- **Use your ChatGPT / Codex subscription directly in DeepSeek Harness**
7
+ **把 ChatGPT / Codex 订阅直接接入 DeepSeek Harness**
6
8
 
7
- No OpenAI API key or Codex CLI. Models, search, quota, and image generation stay inside DSH.
9
+ DeepSeek Harness 中直接登录 ChatGPT 并使用 Codex 订阅。无需 OpenAI API Key,也不依赖 Codex CLI;
10
+ 模型、搜索、额度和图片生成都留在 DSH 里。
8
11
 
9
12
  [![CI](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml/badge.svg)](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml)
10
13
  [![npm](https://img.shields.io/npm/v/dsh-codex-subscription?logo=npm&label=npm)](https://www.npmjs.com/package/dsh-codex-subscription)
11
- [![total npm downloads](https://img.shields.io/npm/dt/dsh-codex-subscription?logo=npm&label=total%20downloads)](https://www.npmjs.com/package/dsh-codex-subscription)
14
+ [![npm 总下载量](https://img.shields.io/npm/dt/dsh-codex-subscription?logo=npm&label=%E6%80%BB%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://www.npmjs.com/package/dsh-codex-subscription)
12
15
  [![MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
13
16
  [![Star](https://img.shields.io/github/stars/WSL043/dsh-codex-subscription?style=flat&logo=github&label=Star)](https://github.com/WSL043/dsh-codex-subscription/stargazers)
14
17
 
15
- [Three-step start](#three-step-start) · [Install](#install) · [Contribute](CONTRIBUTING.md) · [Update and uninstall](#update-and-uninstall) · [简体中文](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.zh-CN.md)
18
+ [三步开始](#三步开始) · [安装](#安装) · [参与贡献](CONTRIBUTING.md) · [更新与卸载](#更新与卸载)
16
19
 
17
20
  </div>
18
21
 
19
22
  <p align="center">
20
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/readme-hero-en.webp" width="900" alt="Your Codex subscription inside DSH: models, web search, quota and safe reset, image generation, and Fast mode">
23
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/readme-hero.webp" width="900" alt="Codex 订阅直接用在 DSH:订阅模型、联网搜索、额度与安全重置、图片生成和高速模式">
21
24
  </p>
22
25
 
23
- ## Three-step start
26
+ ## 三步开始
24
27
 
25
- 1. **Install the plugin.** Run the standard DSH bundle command:
28
+ 1. **安装插件**:直接运行 DSH 标准 bundle 命令:
26
29
 
27
30
  ```sh
28
31
  dsh plugin --profile web add dsh-codex-subscription
29
32
  ```
30
33
 
31
- 2. **Sign in.** Restart DSH yourself, open **Settings -> Codex**, and choose browser sign-in. No Codex CLI and no pasted token are required.
32
- 3. **Use Codex.** Select a Codex model. Quota, subscription search, image generation, and Fast mode remain inside DSH.
34
+ 2. **登录订阅**:手动重启 DSH,打开 **设置 -> Codex 订阅**,点击浏览器登录。无需 Codex CLI,也不要粘贴 token
35
+ 3. **开始使用**:在模型选择器中选择 Codex;额度、订阅搜索、图片生成和高速模式都在 DSH 内使用。
33
36
 
34
- DSH-Portable exposes the same standard plugin command, so the command above also applies there. See below for the complete official npm, Agent, update, and uninstall routes.
37
+ DSH-Portable 也提供相同的标准插件命令,因此同样使用上面的命令。完整的官方 npmAgent 安装、更新和卸载方式见下文。
35
38
 
36
- ## Why this plugin
39
+ ## 核心优势
37
40
 
38
- | Capability | What you get |
41
+ | 能力 | 用户得到什么 |
39
42
  | --- | --- |
40
- | **Subscription models** | Sign in to ChatGPT and use Codex without an OpenAI API key or Codex CLI |
41
- | **Recoverable and diagnosable** | Sign-in state reconciles automatically; Settings can create a support report without credentials or account identifiers |
42
- | **Visible quota** | Keep backend-provided standard Codex, Spark, and other limits separate |
43
- | **Composer quota** | Choose a compact percentage, progress bar, or no inline quota display |
44
- | **Safe quota reset** | See the next expiry and deliberately try a reset with a cooldown and acknowledgement |
45
- | **Subscription search** | Explicitly route search globally through DSH default search or the signed-in Codex subscription |
46
- | **Codex image generation and editing (Beta)** | Generate without references, or explicitly edit one selected image; preview, zoom, annotate regions, download the original, and continue in the same composer |
47
- | **Fast mode** | Switch between Standard and Fast directly in the composer |
48
- | **Model-aware context** | Keep catalog defaults, use each model's supported extended window, or enter a full numeric token limit for each model |
43
+ | **订阅模型直连** | 登录 ChatGPT 后直接使用 Codex,不需要 OpenAI API Key Codex CLI |
44
+ | **可恢复、可诊断** | 登录状态会自动对账;设置页可生成不含凭据和账号标识的支持报告 |
45
+ | **额度可见** | 普通 CodexSpark 等服务端实际返回的额度分开显示 |
46
+ | **输入框额度** | 可选择紧凑百分比、进度条或完全关闭输入框额度显示 |
47
+ | **安全额度重置** | 直接查看最早到期时间,并通过冷静期和知情确认主动尝试重置 |
48
+ | **订阅搜索** | 可将全部模型的搜索明确路由到 DSH 默认搜索或已登录的 Codex 订阅 |
49
+ | **Codex 图片生成与编辑(Beta)** | 可无参考图全新生成,也可明确选择会话图片继续编辑;支持预览、缩放、区域备注、下载原图并衔接回当前输入框 |
50
+ | **高速模式** | 直接在输入框切换标准或高速,无需离开当前会话 |
51
+ | **模型感知上下文** | 可保留目录默认值、按模型启用扩展窗口,或为每个模型填写完整数字 Token 上限 |
52
+ | **Headless 任务** | 使用同一份已登录的 Codex Provider 运行一次性 DSH 任务,输出答案后自动退出 |
49
53
 
50
- These capabilities reuse the same local ChatGPT sign-in. Subscription routing failures stay visible and never silently switch to another paid route.
54
+ 这些能力共用同一份本机 ChatGPT 登录。订阅路由失败时会明确报错,不会静默切换到其他付费路由。
51
55
 
52
- ## Product screen
56
+ ## 实际界面
53
57
 
54
58
  <p align="center">
55
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/context-settings-en.png" width="820" alt="Current Codex subscription settings in DeepSeek Harness with search, model-aware context, composer quota, and support diagnostics">
59
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/context-settings.png" width="820" alt="当前 DeepSeek Harness Codex 订阅设置,包含搜索来源、模型感知上下文、输入框额度和支持诊断">
56
60
  </p>
57
61
 
58
- Captured from the installed official DeepSeek Harness `0.1.1-rc.2` product with the current plugin build.
62
+ 图片来自已安装的官方 DeepSeek Harness `0.1.1-rc.2` 与当前插件构建。
59
63
 
60
- ## Prepare DSH
64
+ ## 准备 DSH
61
65
 
62
- This plugin supports the latest DeepSeek Harness release recorded in its package metadata and requires a ChatGPT account that currently has Codex access.
66
+ 本插件支持软件包元数据中记录的最新版 DeepSeek Harness,并需要一个当前具有 Codex 使用资格的 ChatGPT 账户。
63
67
 
64
- - Do not want to configure Node.js? Use [DSH-Portable](https://github.com/WSL043/DSH-Portable), a community portable desktop distribution for Windows, macOS, and Linux.
65
- - Prefer the official route? Follow the [DeepSeek Harness run guide](https://github.com/deepseek-ai/deepseek-harness#run).
68
+ - 不想配置 Node.js:使用 [DSH-Portable](https://github.com/WSL043/DSH-Portable)。这是面向 WindowsmacOS Linux 的社区便携桌面分发;
69
+ - 想按官方方式运行:查看 [DeepSeek Harness 官方说明](https://github.com/deepseek-ai/deepseek-harness#run)
66
70
 
67
- ## Install
71
+ ## 安装
68
72
 
69
- ### Standard DSH command
73
+ ### DSH 标准命令
70
74
 
71
75
  ```sh
72
76
  dsh plugin --profile web add dsh-codex-subscription
73
77
  ```
74
78
 
75
- DSH owns target selection, profile locking, dependency resolution, and bundle activation; this is the plugin's only installation path.
79
+ 目标选择、profile 锁、依赖解析和 bundle 激活均由 DSH 负责;这是插件唯一的安装路径。
76
80
 
77
- ### Let an Agent install it
81
+ ### Headless
78
82
 
79
- Send this link directly to your Agent:
83
+ 先在 Web 中完成登录并选择一次 Codex 模型,再把同一个插件安装到 DSH 的标准 Headless profile:
80
84
 
81
- **[Agent install, update, and uninstall guide](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)**
85
+ ```sh
86
+ dsh plugin --profile headless add dsh-codex-subscription
87
+ dsh --profile headless "只回复:ok"
88
+ ```
89
+
90
+ ### 交给 Agent
91
+
92
+ 把这个链接直接发给 Agent:
93
+
94
+ **[Agent 安装、更新与卸载文档](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)**
82
95
 
83
96
  ```text
84
97
  https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md
85
98
  ```
86
99
 
87
- The guide includes verification steps and tells the Agent to preserve the DSH profile, sign-in, and other plugins.
100
+ Agent 文档包含安装、更新、卸载和验收步骤,并要求保留 DSH profile、登录信息和其他插件。
88
101
 
89
102
  <details>
90
- <summary>Official npm route (Node.js installed)</summary>
103
+ <summary>官方 npm 方式(已安装 Node.js)</summary>
91
104
 
92
- The official `npx @deepseek-ai/dsh web` command does not create a global `dsh` command. Keep the full `npx` prefix when installing the plugin:
105
+ 官方的 `npx @deepseek-ai/dsh web` 不会创建全局 `dsh` 命令,因此安装插件时也要保留完整的 `npx` 前缀:
93
106
 
94
107
  ```sh
95
108
  npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add dsh-codex-subscription
@@ -100,7 +113,7 @@ npx -y @deepseek-ai/dsh@0.1.1-rc.2 --profile web --dump-config
100
113
  </details>
101
114
 
102
115
  <details>
103
- <summary>An existing <code>dsh</code> command</summary>
116
+ <summary>已经能运行 <code>dsh</code></summary>
104
117
 
105
118
  ```sh
106
119
  dsh plugin --profile web add dsh-codex-subscription
@@ -108,76 +121,71 @@ dsh plugin --profile web list dsh-codex-subscription --depth 0
108
121
  dsh --profile web --dump-config
109
122
  ```
110
123
 
111
- The plugin list should contain one `dsh-codex-subscription`, and the config should contain one `codex-subscription` entry.
124
+ 安装列表中应只有一个 `dsh-codex-subscription`,配置中应只有一个 `codex-subscription` 条目。
112
125
 
113
126
  </details>
114
127
 
115
- Restart DSH manually after installation, then:
128
+ 安装完成后手动重启 DSH,然后:
116
129
 
117
- 1. Open **Settings -> Codex**.
118
- 2. Sign in with a ChatGPT account that has Codex access.
119
- 3. Choose a search source.
120
- 4. Select a Codex model.
130
+ 1. 打开 **设置 -> Codex 订阅**;
131
+ 2. 登录具有 Codex 使用资格的 ChatGPT 账户;
132
+ 3. 选择搜索来源;
133
+ 4. 在模型选择器中选择 Codex 模型。
121
134
 
122
- ## Features
135
+ ## 功能
123
136
 
124
- - ChatGPT OAuth sign-in with credentials kept on the host;
125
- - Codex models and Beta image generation/editing directly inside DSH conversations;
126
- - A clear global choice between DSH default search and Codex subscription search; it applies to every model and session rather than following the selected model;
127
- - Actual backend-provided quota, reset time, and freshness;
128
- - Separate standard Codex, Codex-Spark, Credits, and other independent limits;
129
- - Visible quota-reset count and earliest expiry, with deliberate early redemption, layered confirmation, and no automatic retry;
130
- - Optional percentage, progress bar, or Beta runway estimate for the selected Codex model (off by default);
131
- - Standard or Fast mode for supported Codex models directly in the composer;
132
- - Standard, Extended, and per-model Custom context windows; Custom accepts a full numeric token count, stays within each audited model capacity, and feeds DSH's native agent compaction policy;
133
- - A copyable support report and direct feedback link in Settings; the report includes bounded request stages, HTTP/transport classes, elapsed ranges, and route source types while excluding OAuth credentials, account identifiers, proxy addresses, and authorization timestamps;
134
- - Visible errors when subscription routing is unavailable, with no silent paid fallback.
137
+ - ChatGPT OAuth 登录,凭据保留在本机;
138
+ - Codex 模型和 Beta 图片生成与编辑直接出现在 DSH 会话中;
139
+ - 搜索来源是全局设置,可在 DSH 默认搜索与 Codex 订阅搜索之间切换;它对所有模型和会话生效,不会随当前模型自动切换;
140
+ - 设置页显示服务端返回的额度、重置时间和更新时间;
141
+ - 普通 CodexCodex-SparkCredits 等独立额度分开显示;
142
+ - 显示重置卡数量与最早到期时间,也允许在额度未完全用尽时主动尝试,并经过分层确认且不会自动重试;
143
+ - 输入框可用百分比、进度条或可选的 Beta 续航预测显示当前 Codex 模型的剩余额度(默认关闭);
144
+ - 输入框可为支持的 Codex 模型切换标准或高速模式;
145
+ - 上下文窗口提供标准、扩展和逐模型自定义;自定义直接填写完整 Token 数值,并在已审核的模型容量内交给 DSH 原生 Agent 压缩策略处理;
146
+ - 设置页可生成并复制无敏感信息的支持诊断,并直接打开反馈入口;报告包含有限的请求阶段、HTTP/网络分类、耗时区间和路由来源类型,但不包含 OAuth 凭据、账号标识、代理地址或授权时间;
147
+ - 订阅路由不可用时明确报错,不会静默切换到其他付费路由。
135
148
 
136
- The plugin can follow an existing HTTPS proxy from the process environment or operating-system proxy settings for official OpenAI and ChatGPT requests. It does not provide a proxy, relay, node list, or system-proxy configuration.
149
+ 对于 OpenAI ChatGPT 官方请求,插件可以沿用进程环境或操作系统中已有的 HTTPS 代理。插件本身不提供代理、转发服务、节点列表,也不会修改系统代理设置。
137
150
 
138
- ### Composer quota
151
+ ### 输入框额度
139
152
 
140
153
  <p align="center">
141
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/composer-quota-en.png" width="800" alt="Codex quota inside the composer">
154
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/composer-quota.png" width="800" alt="中文 DSH 输入框内的 Codex 剩余额度进度条">
142
155
  </p>
143
156
 
144
- Choose Off, Percent, Progress bar, or Beta Runway in Settings. The compact display appears only for a selected Codex model. Runway is opt-in and estimates the current pace only from official remaining-percentage observations kept in local runtime memory; it stays quiet with insufficient evidence and recalibrates after a reset, account change, or disable.
145
- Standard Codex uses the lowest remaining window returned by the service; Spark uses its independent quota. The plugin does not hard-code a
146
- “5-hour + weekly” layout or invent Credits and spending caps that the service did not return.
157
+ 可在设置中选择关闭、百分比、进度条或 Beta 续航预测;紧凑额度只在选择 Codex 模型时显示。续航预测仅在用户主动选择后,根据本机运行内存中观察到的官方剩余百分比估算当前消耗速度;样本不足时保持安静,额度重置、登录变化或关闭功能后会重新校准。普通 Codex 使用服务端返回窗口中剩余最少的一项,
158
+ Spark 使用独立额度。插件不会写死“5 小时 + 每周”,也不会虚构服务端没有返回的 Credits 或消费上限。
147
159
 
148
- ### Safe quota reset
160
+ ### 安全使用额度重置
149
161
 
150
- If ChatGPT reports an available quota reset, Settings shows its count and earliest disclosed expiry in a compact row.
151
- You may deliberately try it before a quota reaches 100%, which is useful for a reset nearing expiry. ChatGPT still
152
- decides whether a window needs resetting and may return **nothing to reset** without spending the reset. The final
153
- action requires an acknowledgement checkbox and five-second cooldown. Cancel never consumes a reset, rapid repeated
154
- clicks are single-flight, and an uncertain network result is never retried automatically.
162
+ ChatGPT 返回可用重置卡时,设置页会用紧凑的一行显示数量和服务端提供的最早到期时间。即使额度尚未到 100%,
163
+ 也可以主动尝试使用,适合重置卡即将过期的情况;是否需要重置仍由 ChatGPT 判断,服务端可能返回“当前无需重置”且不扣次数。
164
+ 最终操作需要勾选知情确认并等待 5 秒。取消不会消耗,快速连续点击只允许一次请求,网络结果不确定时也不会自动重试。
155
165
 
156
- ### Image generation and editing (Beta)
166
+ ### 图片生成与编辑(Beta
157
167
 
158
- When `dsh-image-viewer` is installed, generated images delegate to its unified preview first. The subscription viewer is only a fallback when that service is absent or declines the request, so the two plugins never compete for the same entry point. Image Viewer owns zoom, pan, fit, preview downloads, and region notes; this plugin owns Codex image generation/editing, exact-original authorization, and the continue-editing handoff.
159
- Both paths expose dimensions and numbered region notes. The standard **Download** action retrieves the permission- and integrity-checked exact original by default; only legacy sessions without an exact original fall back to the conversation preview.
160
- Press **Enter** to save and collapse a region note; use **Shift+Enter** for a new line. Notes remain available when the
161
- same image is reopened during the current DSH page session.
162
- **Continue editing in composer** attaches exactly the image you opened and writes the region notes into the draft without
163
- sending it. A new image request does not silently include earlier images. GPT Image 2 can take longer than a normal text
164
- turn, and detailed text, exact composition, or repeated-character consistency may still need another pass.
168
+ 如果安装了 `dsh-image-viewer`,生成图片会优先交给它统一预览;订阅插件自己的查看器仅在该服务不存在或拒绝打开时兜底,不会与图片查看器争抢入口。图片查看器负责缩放、拖动、适合窗口、会话预览下载和区域备注,订阅插件只负责 Codex 图片生成/编辑、精确原图权限和“继续编辑”交接。
169
+ 两条路径都支持查看尺寸和编号区域备注;标准“下载”按钮默认获取经过权限与完整性校验的精确原图,只有旧会话没有精确原图时才下载会话预览图。
170
+ Enter 保存并收起当前备注,Shift+Enter 可以换行;在当前 DSH 页面会话内重新打开同一张图片时,备注仍会保留。
171
+ 点击“在输入框中继续编辑”时,只会附上当前打开的这一张图,并把部位标注写入草稿,不会自动发送。
172
+ 新的图片请求不会静默带入历史图片。GPT Image 2 的耗时可能明显长于文本回复,复杂文字、精确构图和连续角色一致性也可能需要再次调整。
165
173
 
166
174
  <p align="center">
167
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/image-preview-annotations-en.png" width="800" alt="Generated image, region note, and continue editing inside the DSH Image Viewer">
175
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/image-preview-annotations.png" width="800" alt="DSH 图片查看器中的生成图、区域备注和继续编辑">
168
176
  </p>
169
177
 
170
- The exact bytes returned by GPT Image are stored separately under the current DSH home because DSH may normalize the conversation preview for display and later model input. Original files are integrity-checked and available only to the creating session or a fork that inherited that image result; forks created earlier and unrelated sessions are denied. Raw image bytes are never placed in the session log. Uninstalling the plugin does not delete already generated originals.
178
+ GPT Image 返回的精确字节会单独保存在当前 DSH 主目录中,因为 DSH 可能为会话展示和后续模型输入规范化预览图。原图下载前会校验完整性,只允许创建会话或确实继承了该图片结果的 Fork 会话访问;提前创建的 Fork 和无关会话会被拒绝。原图字节不会写入会话日志,卸载插件也不会删除已经生成的原图。
171
179
 
172
- ### Composer speed
180
+ ### 输入框速度
173
181
 
174
- With a supported Codex model selected, open the composer's model menu to choose Standard or Fast.
175
- Standard adds no icon; only Fast shows a lightning icon before the model name. Spark does not show the speed entry. Fast mode increases speed and uses more Credits;
176
- see the [OpenAI Codex Speed documentation](https://learn.chatgpt.com/docs/agent-configuration/speed) for the current rules.
182
+ 选择支持的 Codex 模型后,可在输入框的模型菜单中切换标准与高速。标准模式不增加图标,
183
+ 只有高速模式会在模型名称左侧显示闪电;Spark 不显示速度入口。高速模式会提高速度,也会消耗更多 Credits;具体规则见
184
+ [OpenAI Codex Speed 文档](https://learn.chatgpt.com/docs/agent-configuration/speed)
177
185
 
178
- ## Update and uninstall
186
+ ## 更新与卸载
179
187
 
180
- Use the same DSH plugin lifecycle to update, verify, or uninstall:
188
+ 更新、校验和卸载继续使用同一套 DSH 插件生命周期:
181
189
 
182
190
  ```sh
183
191
  dsh plugin --profile web update dsh-codex-subscription
@@ -186,10 +194,10 @@ dsh --profile web --dump-config
186
194
  dsh plugin --profile web remove dsh-codex-subscription
187
195
  ```
188
196
 
189
- These operations preserve the DSH profile, other plugins, and saved sign-in.
197
+ 这些操作会保留 DSH profile、其他插件和登录信息。
190
198
 
191
199
  <details>
192
- <summary>Official npm fallback</summary>
200
+ <summary>官方 npm 备用方式</summary>
193
201
 
194
202
  ```sh
195
203
  npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web update dsh-codex-subscription
@@ -200,21 +208,23 @@ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web remove dsh-codex-subscri
200
208
 
201
209
  </details>
202
210
 
203
- ## Troubleshooting
211
+ ## 常见问题
212
+
213
+ - **`dsh` 无法识别**:官方 npm 方式本来就不会创建全局 `dsh` 命令,请使用上面的完整 `npx -y @deepseek-ai/dsh@0.1.1-rc.2 ...` 命令;
214
+ - **电脑上有多个 DSH**:请从目标 DSH 环境运行标准命令,由该产品自身选择对应 profile;
215
+ - **安装仍然失败**:把上面的 Agent 文档链接发给 Agent,不要删除 profile 或随意修改系统 PATH。
216
+ - **需要提交问题**:在设置页底部生成“支持诊断”,然后打开[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml)。报告包含系统/运行时、有限的登录阶段和安全的请求失败分类,但不含凭据、账号标识、代理地址、原始响应或完整日志;请粘贴到必填诊断栏,且不要附上登录链接、授权码或浏览器回调地址。
204
217
 
205
- - **`dsh` is not recognized:** the official npm route does not create a global `dsh` command; use the complete `npx -y @deepseek-ai/dsh@0.1.1-rc.2 ...` command above;
206
- - **More than one DSH exists:** run the standard command from the intended DSH environment so that product selects the corresponding profile;
207
- - **Setup still fails:** send the Agent guide above to an Agent. Do not delete the profile or change the system PATH to force an install.
208
- - **Need to report a problem:** generate a **Support diagnostics** report at the bottom of Settings, then open the [bug report form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml). The report includes the OS/runtime, bounded sign-in phase, and safe request-failure categories, but excludes credentials, account identifiers, proxy addresses, raw responses, and full logs. Paste it into the required diagnostics field; never attach sign-in URLs, authorization codes, or browser callback addresses.
218
+ ## 边界与支持
209
219
 
210
- The ChatGPT Codex backend and DSH can change independently. This community project is not affiliated with or endorsed by DeepSeek or OpenAI.
220
+ ChatGPT Codex 后端和 DSH 可能独立变化;本项目为社区项目,与 DeepSeek、OpenAI 无隶属或背书关系。
211
221
 
212
- Use the [bug report form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml) for project feedback.
213
- Use the [feature request form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=feature-request.yml) for focused product suggestions.
214
- Focused fixes and compatibility improvements are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).
215
- For DSH plugin discussion, visit [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions).
216
- Read [SECURITY.md](SECURITY.md) before reporting sensitive issues.
222
+ 本项目的问题反馈请使用[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml)
223
+ 明确的产品建议请使用[功能建议表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=feature-request.yml)
224
+ 欢迎提交聚焦的修复和兼容性改进,具体要求见 [CONTRIBUTING.md](CONTRIBUTING.md)
225
+ DSH 插件交流可前往 [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions)
226
+ 敏感问题请先阅读 [SECURITY.md](SECURITY.md)
217
227
 
218
- If this project is useful, the [Star button](https://github.com/WSL043/dsh-codex-subscription/stargazers) helps more DSH users find it.
228
+ 如果这个项目对你有帮助,[点一下 Star](https://github.com/WSL043/dsh-codex-subscription/stargazers) 可以让更多 DSH 用户发现它。
219
229
 
220
- [简体中文](README.zh-CN.md) · [MIT](LICENSE)
230
+ [MIT](LICENSE)
package/README.zh-CN.md CHANGED
@@ -1,218 +1,16 @@
1
1
  # DSH Codex Subscription
2
2
 
3
- <div align="center">
3
+ 本项目现在默认使用简体中文 README:
4
4
 
5
- **把 ChatGPT / Codex 订阅直接接入 DeepSeek Harness**
5
+ - [打开完整中文说明](README.md)
6
+ - [Open the complete English README](README.en.md)
6
7
 
7
- DeepSeek Harness 中直接登录 ChatGPT 并使用 Codex 订阅。无需 OpenAI API Key,也不依赖 Codex CLI;
8
- 模型、搜索、额度和图片生成都留在 DSH 里。
8
+ 旧的 `README.zh-CN.md` 地址会继续保留,已有书签和外部链接无需修改。
9
9
 
10
- [![CI](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml/badge.svg)](https://github.com/WSL043/dsh-codex-subscription/actions/workflows/ci.yml)
11
- [![npm](https://img.shields.io/npm/v/dsh-codex-subscription?logo=npm&label=npm)](https://www.npmjs.com/package/dsh-codex-subscription)
12
- [![npm 总下载量](https://img.shields.io/npm/dt/dsh-codex-subscription?logo=npm&label=%E6%80%BB%E4%B8%8B%E8%BD%BD%E9%87%8F)](https://www.npmjs.com/package/dsh-codex-subscription)
13
- [![MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
14
- [![Star](https://img.shields.io/github/stars/WSL043/dsh-codex-subscription?style=flat&logo=github&label=Star)](https://github.com/WSL043/dsh-codex-subscription/stargazers)
10
+ 安装:
15
11
 
16
- [三步开始](#三步开始) · [安装](#安装) · [参与贡献](CONTRIBUTING.md) · [更新与卸载](#更新与卸载) · [English](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.md)
17
-
18
- </div>
19
-
20
- <p align="center">
21
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/readme-hero.webp" width="900" alt="Codex 订阅直接用在 DSH:订阅模型、联网搜索、额度与安全重置、图片生成和高速模式">
22
- </p>
23
-
24
- ## 三步开始
25
-
26
- 1. **安装插件**:直接运行 DSH 标准 bundle 命令:
27
-
28
- ```sh
29
- dsh plugin --profile web add dsh-codex-subscription
30
- ```
31
-
32
- 2. **登录订阅**:手动重启 DSH,打开 **设置 -> Codex 订阅**,点击浏览器登录。无需 Codex CLI,也不要粘贴 token。
33
- 3. **开始使用**:在模型选择器中选择 Codex;额度、订阅搜索、图片生成和高速模式都在 DSH 内使用。
34
-
35
- DSH-Portable 也提供相同的标准插件命令,因此同样使用上面的命令。完整的官方 npm、Agent 安装、更新和卸载方式见下文。
36
-
37
- ## 核心优势
38
-
39
- | 能力 | 用户得到什么 |
40
- | --- | --- |
41
- | **订阅模型直连** | 登录 ChatGPT 后直接使用 Codex,不需要 OpenAI API Key 或 Codex CLI |
42
- | **可恢复、可诊断** | 登录状态会自动对账;设置页可生成不含凭据和账号标识的支持报告 |
43
- | **额度可见** | 普通 Codex、Spark 等服务端实际返回的额度分开显示 |
44
- | **输入框额度** | 可选择紧凑百分比、进度条或完全关闭输入框额度显示 |
45
- | **安全额度重置** | 直接查看最早到期时间,并通过冷静期和知情确认主动尝试重置 |
46
- | **订阅搜索** | 可将全部模型的搜索明确路由到 DSH 默认搜索或已登录的 Codex 订阅 |
47
- | **Codex 图片生成与编辑(Beta)** | 可无参考图全新生成,也可明确选择会话图片继续编辑;支持预览、缩放、区域备注、下载原图并衔接回当前输入框 |
48
- | **高速模式** | 直接在输入框切换标准或高速,无需离开当前会话 |
49
- | **模型感知上下文** | 可保留目录默认值、按模型启用扩展窗口,或为每个模型填写完整数字 Token 上限 |
50
-
51
- 这些能力共用同一份本机 ChatGPT 登录。订阅路由失败时会明确报错,不会静默切换到其他付费路由。
52
-
53
- ## 实际界面
54
-
55
- <p align="center">
56
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/context-settings.png" width="820" alt="当前 DeepSeek Harness Codex 订阅设置,包含搜索来源、模型感知上下文、输入框额度和支持诊断">
57
- </p>
58
-
59
- 图片来自已安装的官方 DeepSeek Harness `0.1.1-rc.2` 与当前插件构建。
60
-
61
- ## 准备 DSH
62
-
63
- 本插件支持软件包元数据中记录的最新版 DeepSeek Harness,并需要一个当前具有 Codex 使用资格的 ChatGPT 账户。
64
-
65
- - 不想配置 Node.js:使用 [DSH-Portable](https://github.com/WSL043/DSH-Portable)。这是面向 Windows、macOS 和 Linux 的社区便携桌面分发;
66
- - 想按官方方式运行:查看 [DeepSeek Harness 官方说明](https://github.com/deepseek-ai/deepseek-harness#run)。
67
-
68
- ## 安装
69
-
70
- ### DSH 标准命令
71
-
72
- ```sh
73
- dsh plugin --profile web add dsh-codex-subscription
74
- ```
75
-
76
- 目标选择、profile 锁、依赖解析和 bundle 激活均由 DSH 负责;这是插件唯一的安装路径。
77
-
78
- ### 交给 Agent
79
-
80
- 把这个链接直接发给 Agent:
81
-
82
- **[Agent 安装、更新与卸载文档](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)**
83
-
84
- ```text
85
- https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md
86
- ```
87
-
88
- Agent 文档包含安装、更新、卸载和验收步骤,并要求保留 DSH profile、登录信息和其他插件。
89
-
90
- <details>
91
- <summary>官方 npm 方式(已安装 Node.js)</summary>
92
-
93
- 官方的 `npx @deepseek-ai/dsh web` 不会创建全局 `dsh` 命令,因此安装插件时也要保留完整的 `npx` 前缀:
94
-
95
- ```sh
96
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add dsh-codex-subscription
97
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web list dsh-codex-subscription --depth 0
98
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 --profile web --dump-config
99
- ```
100
-
101
- </details>
102
-
103
- <details>
104
- <summary>已经能运行 <code>dsh</code></summary>
105
-
106
- ```sh
12
+ ```powershell
107
13
  dsh plugin --profile web add dsh-codex-subscription
108
- dsh plugin --profile web list dsh-codex-subscription --depth 0
109
- dsh --profile web --dump-config
110
- ```
111
-
112
- 安装列表中应只有一个 `dsh-codex-subscription`,配置中应只有一个 `codex-subscription` 条目。
113
-
114
- </details>
115
-
116
- 安装完成后手动重启 DSH,然后:
117
-
118
- 1. 打开 **设置 -> Codex 订阅**;
119
- 2. 登录具有 Codex 使用资格的 ChatGPT 账户;
120
- 3. 选择搜索来源;
121
- 4. 在模型选择器中选择 Codex 模型。
122
-
123
- ## 功能
124
-
125
- - ChatGPT OAuth 登录,凭据保留在本机;
126
- - Codex 模型和 Beta 图片生成与编辑直接出现在 DSH 会话中;
127
- - 搜索来源是全局设置,可在 DSH 默认搜索与 Codex 订阅搜索之间切换;它对所有模型和会话生效,不会随当前模型自动切换;
128
- - 设置页显示服务端返回的额度、重置时间和更新时间;
129
- - 普通 Codex、Codex-Spark、Credits 等独立额度分开显示;
130
- - 显示重置卡数量与最早到期时间,也允许在额度未完全用尽时主动尝试,并经过分层确认且不会自动重试;
131
- - 输入框可用百分比、进度条或可选的 Beta 续航预测显示当前 Codex 模型的剩余额度(默认关闭);
132
- - 输入框可为支持的 Codex 模型切换标准或高速模式;
133
- - 上下文窗口提供标准、扩展和逐模型自定义;自定义直接填写完整 Token 数值,并在已审核的模型容量内交给 DSH 原生 Agent 压缩策略处理;
134
- - 设置页可生成并复制无敏感信息的支持诊断,并直接打开反馈入口;报告包含有限的请求阶段、HTTP/网络分类、耗时区间和路由来源类型,但不包含 OAuth 凭据、账号标识、代理地址或授权时间;
135
- - 订阅路由不可用时明确报错,不会静默切换到其他付费路由。
136
-
137
- 对于 OpenAI 与 ChatGPT 官方请求,插件可以沿用进程环境或操作系统中已有的 HTTPS 代理。插件本身不提供代理、转发服务、节点列表,也不会修改系统代理设置。
138
-
139
- ### 输入框额度
140
-
141
- <p align="center">
142
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/composer-quota.png" width="800" alt="中文 DSH 输入框内的 Codex 剩余额度进度条">
143
- </p>
144
-
145
- 可在设置中选择关闭、百分比、进度条或 Beta 续航预测;紧凑额度只在选择 Codex 模型时显示。续航预测仅在用户主动选择后,根据本机运行内存中观察到的官方剩余百分比估算当前消耗速度;样本不足时保持安静,额度重置、登录变化或关闭功能后会重新校准。普通 Codex 使用服务端返回窗口中剩余最少的一项,
146
- Spark 使用独立额度。插件不会写死“5 小时 + 每周”,也不会虚构服务端没有返回的 Credits 或消费上限。
147
-
148
- ### 安全使用额度重置
149
-
150
- ChatGPT 返回可用重置卡时,设置页会用紧凑的一行显示数量和服务端提供的最早到期时间。即使额度尚未到 100%,
151
- 也可以主动尝试使用,适合重置卡即将过期的情况;是否需要重置仍由 ChatGPT 判断,服务端可能返回“当前无需重置”且不扣次数。
152
- 最终操作需要勾选知情确认并等待 5 秒。取消不会消耗,快速连续点击只允许一次请求,网络结果不确定时也不会自动重试。
153
-
154
- ### 图片生成与编辑(Beta)
155
-
156
- 如果安装了 `dsh-image-viewer`,生成图片会优先交给它统一预览;订阅插件自己的查看器仅在该服务不存在或拒绝打开时兜底,不会与图片查看器争抢入口。图片查看器负责缩放、拖动、适合窗口、会话预览下载和区域备注,订阅插件只负责 Codex 图片生成/编辑、精确原图权限和“继续编辑”交接。
157
- 两条路径都支持查看尺寸和编号区域备注;标准“下载”按钮默认获取经过权限与完整性校验的精确原图,只有旧会话没有精确原图时才下载会话预览图。
158
- 按 Enter 保存并收起当前备注,Shift+Enter 可以换行;在当前 DSH 页面会话内重新打开同一张图片时,备注仍会保留。
159
- 点击“在输入框中继续编辑”时,只会附上当前打开的这一张图,并把部位标注写入草稿,不会自动发送。
160
- 新的图片请求不会静默带入历史图片。GPT Image 2 的耗时可能明显长于文本回复,复杂文字、精确构图和连续角色一致性也可能需要再次调整。
161
-
162
- <p align="center">
163
- <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/image-preview-annotations.png" width="800" alt="DSH 图片查看器中的生成图、区域备注和继续编辑">
164
- </p>
165
-
166
- GPT Image 返回的精确字节会单独保存在当前 DSH 主目录中,因为 DSH 可能为会话展示和后续模型输入规范化预览图。原图下载前会校验完整性,只允许创建会话或确实继承了该图片结果的 Fork 会话访问;提前创建的 Fork 和无关会话会被拒绝。原图字节不会写入会话日志,卸载插件也不会删除已经生成的原图。
167
-
168
- ### 输入框速度
169
-
170
- 选择支持的 Codex 模型后,可在输入框的模型菜单中切换标准与高速。标准模式不增加图标,
171
- 只有高速模式会在模型名称左侧显示闪电;Spark 不显示速度入口。高速模式会提高速度,也会消耗更多 Credits;具体规则见
172
- [OpenAI Codex Speed 文档](https://learn.chatgpt.com/docs/agent-configuration/speed)。
173
-
174
- ## 更新与卸载
175
-
176
- 更新、校验和卸载继续使用同一套 DSH 插件生命周期:
177
-
178
- ```sh
179
- dsh plugin --profile web update dsh-codex-subscription
180
- dsh plugin --profile web list dsh-codex-subscription --depth 0
181
- dsh --profile web --dump-config
182
- dsh plugin --profile web remove dsh-codex-subscription
183
14
  ```
184
15
 
185
- 这些操作会保留 DSH profile、其他插件和登录信息。
186
-
187
- <details>
188
- <summary>官方 npm 备用方式</summary>
189
-
190
- ```sh
191
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web update dsh-codex-subscription
192
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web list dsh-codex-subscription --depth 0
193
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 --profile web --dump-config
194
- npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web remove dsh-codex-subscription
195
- ```
196
-
197
- </details>
198
-
199
- ## 常见问题
200
-
201
- - **`dsh` 无法识别**:官方 npm 方式本来就不会创建全局 `dsh` 命令,请使用上面的完整 `npx -y @deepseek-ai/dsh@0.1.1-rc.2 ...` 命令;
202
- - **电脑上有多个 DSH**:请从目标 DSH 环境运行标准命令,由该产品自身选择对应 profile;
203
- - **安装仍然失败**:把上面的 Agent 文档链接发给 Agent,不要删除 profile 或随意修改系统 PATH。
204
- - **需要提交问题**:在设置页底部生成“支持诊断”,然后打开[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml)。报告包含系统/运行时、有限的登录阶段和安全的请求失败分类,但不含凭据、账号标识、代理地址、原始响应或完整日志;请粘贴到必填诊断栏,且不要附上登录链接、授权码或浏览器回调地址。
205
-
206
- ## 边界与支持
207
-
208
- ChatGPT Codex 后端和 DSH 可能独立变化;本项目为社区项目,与 DeepSeek、OpenAI 无隶属或背书关系。
209
-
210
- 本项目的问题反馈请使用[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml);
211
- 明确的产品建议请使用[功能建议表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=feature-request.yml);
212
- 欢迎提交聚焦的修复和兼容性改进,具体要求见 [CONTRIBUTING.md](CONTRIBUTING.md);
213
- DSH 插件交流可前往 [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions)。
214
- 敏感问题请先阅读 [SECURITY.md](SECURITY.md)。
215
-
216
- 如果这个项目对你有帮助,[点一下 Star](https://github.com/WSL043/dsh-codex-subscription/stargazers) 可以让更多 DSH 用户发现它。
217
-
218
- [MIT](LICENSE)
16
+ 遇到问题请使用[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml)。
@@ -6,5 +6,8 @@
6
6
  "0.1.0-rc.8",
7
7
  "0.1.1-rc.1",
8
8
  "0.1.1-rc.2"
9
+ ],
10
+ "previews": [
11
+ "0.1.2-alpha.2"
9
12
  ]
10
13
  }
package/lib/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { credentialRef } from "@deepseek-ai/dsh-credentials";
2
2
  import { LlmError, createUserMessage } from "@deepseek-ai/dsh-llm";
3
3
  import { PiAiAdapter } from "@deepseek-ai/dsh-llm-pi-ai";
4
- import { settingsNamespace } from "@deepseek-ai/dsh-settings";
5
4
  import z from "@deepseek-ai/schemastery";
6
5
  import { execFile, spawn } from "node:child_process";
7
6
  import { request } from "node:https";
@@ -936,7 +935,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
936
935
  }
937
936
  //#endregion
938
937
  //#region src/version.js
939
- const PACKAGE_VERSION = "1.11.1";
938
+ const PACKAGE_VERSION = "1.11.2";
940
939
  const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
941
940
  //#endregion
942
941
  //#region src/model-catalog.js
@@ -2586,7 +2585,7 @@ function createSearchProviderSwitcher(loader) {
2586
2585
  });
2587
2586
  }
2588
2587
  function apply(ctx) {
2589
- const settings = ctx.settings.register(settingsNamespace(SETTINGS_NAMESPACE), z.object({
2588
+ const settings = ctx.settings.register(SETTINGS_NAMESPACE, z.object({
2590
2589
  [QUICK_QUOTA_MODE_FIELD]: z.union([
2591
2590
  "off",
2592
2591
  QUICK_QUOTA_MODE_PERCENT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -14,6 +14,7 @@
14
14
  "lib/*.js",
15
15
  "cordis.patch.yml",
16
16
  "README.md",
17
+ "README.en.md",
17
18
  "README.zh-CN.md",
18
19
  "DIRECTORY.md",
19
20
  "AGENTS.md",
@@ -75,23 +76,23 @@
75
76
  "node": "^22.19.0 || >=24.0.0"
76
77
  },
77
78
  "peerDependencies": {
78
- "@deepseek-ai/cordis": "4.0.1",
79
- "@deepseek-ai/dsh-api-remotes": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
80
- "@deepseek-ai/dsh-client-connection": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
81
- "@deepseek-ai/dsh-client-locale": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
82
- "@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
83
- "@deepseek-ai/dsh-client-ui-conversation": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
84
- "@deepseek-ai/dsh-client-ui-model-selection": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
85
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
86
- "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
87
- "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
88
- "@deepseek-ai/dsh-client-ui-tool": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
89
- "@deepseek-ai/dsh-credentials": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
90
- "@deepseek-ai/dsh-llm": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
91
- "@deepseek-ai/dsh-llm-pi-ai": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
92
- "@deepseek-ai/dsh-settings": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
93
- "@deepseek-ai/dsh-tools": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
94
- "@deepseek-ai/dsh-web": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2",
79
+ "@deepseek-ai/cordis": "4.0.1 || 4.0.2",
80
+ "@deepseek-ai/dsh-api-remotes": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
81
+ "@deepseek-ai/dsh-client-connection": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
82
+ "@deepseek-ai/dsh-client-locale": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
83
+ "@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
84
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
85
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
86
+ "@deepseek-ai/dsh-client-ui-primitives": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
87
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
88
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
89
+ "@deepseek-ai/dsh-client-ui-tool": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
90
+ "@deepseek-ai/dsh-credentials": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
91
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
92
+ "@deepseek-ai/dsh-llm-pi-ai": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
93
+ "@deepseek-ai/dsh-settings": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
94
+ "@deepseek-ai/dsh-tools": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
95
+ "@deepseek-ai/dsh-web": "0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-alpha.2",
95
96
  "@deepseek-ai/schemastery": "3.18.1",
96
97
  "@earendil-works/pi-ai": "0.82.1",
97
98
  "react": "^18.2.0",