dsh-codex-subscription 1.0.4 → 1.0.6

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.md CHANGED
@@ -1,96 +1,85 @@
1
1
  # DSH Codex Subscription
2
2
 
3
+ <div align="center">
4
+
5
+ **把 ChatGPT / Codex 订阅直接接入 DeepSeek Harness**
6
+
7
+ 在 DeepSeek Harness 中直接登录 ChatGPT 并使用 Codex 订阅。无需 OpenAI API Key,也不依赖 Codex CLI;
8
+ 模型、搜索、额度和图片生成都留在 DSH 里。
9
+
3
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)
4
- [![npm version](https://img.shields.io/npm/v/dsh-codex-subscription?logo=npm&label=npm)](https://www.npmjs.com/package/dsh-codex-subscription)
5
- [![License: MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
6
- [![GitHub stars](https://img.shields.io/github/stars/WSL043/dsh-codex-subscription?style=flat&logo=github&label=stars)](https://github.com/WSL043/dsh-codex-subscription/stargazers)
11
+ [![npm](https://img.shields.io/npm/v/dsh-codex-subscription?logo=npm&label=npm)](https://www.npmjs.com/package/dsh-codex-subscription)
12
+ [![MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
13
+ [![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)
7
14
 
8
- [English](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.en.md)
15
+ [交给 Agent 安装](#交给-agent推荐) · [Windows 安装](#windows-手动安装) · [更新与卸载](#更新与卸载) · [English](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.en.md)
9
16
 
10
- 在 DeepSeek Harness 中直接登录 ChatGPT 并使用 Codex 订阅,不需要 OpenAI API Key,
11
- 也不依赖 Codex CLI。保留 DSH 原有的会话、工具和权限,还能生成图片、切换联网搜索来源并查看额度。
17
+ </div>
12
18
 
13
- [交给 Agent 安装](#交给-agent推荐) · [Windows 手动安装](#windows-手动安装) · [更新与卸载](#更新与卸载) · [English](#english)
19
+ <p align="center">
20
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/readme-hero.webp" width="900" alt="Codex 订阅直接用在 DSH:订阅模型、联网搜索、实时额度和图片生成">
21
+ </p>
14
22
 
15
- ![DeepSeek Harness 的 Codex 订阅设置](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/settings.png)
23
+ ## 核心优势
16
24
 
17
- 设置页会显示登录状态、搜索来源,以及服务端实际返回的普通 Codex Spark 独立额度。
25
+ | 能力 | 用户得到什么 |
26
+ | --- | --- |
27
+ | **Codex 图片生成** | 在 DSH 对话里直接描述画面,生成结果会显示在当前会话中 |
28
+ | **订阅模型直连** | 登录 ChatGPT 后直接使用 Codex,不需要 OpenAI API Key 或 Codex CLI |
29
+ | **订阅搜索** | 可在 DSH 默认搜索与 Codex 订阅搜索之间明确切换 |
30
+ | **额度可见** | 普通 Codex、Spark 等服务端实际返回的额度分开显示 |
18
31
 
19
- 如果它帮到了你,欢迎在 [GitHub 仓库](https://github.com/WSL043/dsh-codex-subscription)的右上角点一下 **Star**,也方便其他 DSH 用户发现。
32
+ 这些能力共用同一份本机 ChatGPT 登录。订阅路由失败时会明确报错,不会静默切换到其他付费路由。
20
33
 
21
- ## 能做什么
34
+ ## 实际界面
22
35
 
23
- - 在 DSH 中直接使用 ChatGPT / Codex 订阅,不需要 OpenAI API Key 或 Codex CLI;
24
- - 在设置页登录 ChatGPT,凭据保留在本机;
25
- - 支持 Codex 图片生成,结果直接显示在 DSH 会话中;
26
- - 可在 DSH 默认搜索与 Codex 订阅搜索之间切换;
27
- - 展示服务端实际返回的额度、重置时间和更新时间;
28
- - 可在模型名称左侧显示当前 Codex 模型的剩余额度(Beta,默认关闭);
29
- - 单独显示 Codex-Spark、Credits 等独立额度,不把它们混在一起;
30
- - 订阅路由不可用时明确报错,不会静默切换到其他付费路由。
36
+ <p align="center">
37
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/settings-focus.png" width="820" alt="DeepSeek Harness 中的 Codex 订阅设置">
38
+ </p>
39
+
40
+ <details>
41
+ <summary>查看完整设置界面</summary>
42
+
43
+ ![DeepSeek Harness 的完整 Codex 订阅设置](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/settings.png)
44
+
45
+ </details>
31
46
 
32
47
  ## 准备 DSH
33
48
 
34
- 本插件适配 DeepSeek Harness `0.1.0-rc.6`、`0.1.0-rc.7` 与 `0.1.0-rc.8`,还需要一个当前具有 Codex 使用资格的
35
- ChatGPT 账户。
49
+ 本插件适配 DeepSeek Harness `0.1.0-rc.6`、`0.1.0-rc.7` 与 `0.1.0-rc.8`,并需要一个当前具有 Codex 使用资格的 ChatGPT 账户。
36
50
 
37
51
  - 不想配置 Node.js:使用 [DSH-Portable(社区便携包)](https://github.com/WSL043/DSH-Portable);
38
52
  - 想按官方方式运行:查看 [DeepSeek Harness 官方说明](https://github.com/deepseek-ai/deepseek-harness#run)。
39
53
 
40
- 已经能正常打开 DSH 的用户可以直接继续安装插件。
41
-
42
54
  ## 安装
43
55
 
44
56
  ### 交给 Agent(推荐)
45
57
 
46
- 把下面的链接直接发给 Agent。文档包含安装、更新、卸载和验收步骤;Agent 不应删除
47
- DSH profile、登录信息或擅自重启 DSH。
58
+ 把这个链接直接发给 Agent
48
59
 
49
- [打开 Agent 安装文档](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)
60
+ **[Agent 安装、更新与卸载文档](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)**
50
61
 
51
62
  ```text
52
63
  https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md
53
64
  ```
54
65
 
66
+ Agent 文档包含安装、更新、卸载和验收步骤,并要求保留 DSH profile、登录信息和其他插件。
67
+
55
68
  ### Windows 手动安装
56
69
 
57
70
  打开 PowerShell,只需要复制这一行:
58
71
 
59
72
  ```powershell
60
- curl.exe -fL https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex-setup.ps1 -o "$env:TEMP\dsh-codex-setup.ps1"; if ($LASTEXITCODE -eq 0) { powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex-setup.ps1" }
61
- ```
62
-
63
- 安装助手会先让你选择 **中文(简体)** 或 **English**,然后自动寻找 DSH:
64
-
65
- - 只找到一个 DSH:直接显示目标并继续;
66
- - 找到多个 DSH:显示编号、状态和路径,让你输入编号选择,不再直接抛英文报错;
67
- - 没有安装过插件:明确显示 **安装**;
68
- - 已经安装当前版或旧版插件:明确显示 **更新**,旧包会按原有安全迁移流程处理;
69
- - 成功后只提示结果和需要手动重启 DSH,不会擅自重启程序。
70
-
71
- 普通安装版和 DSH-Portable 都能使用。便携版不需要另装 Node.js 或 pnpm,整个过程不需要
72
- 管理员权限。安装助手下载核心管理脚本后会校验 Release 提供的 SHA-256,再交给原有管理器
73
- 执行安装、更新、验证和 PATH 处理。
74
-
75
- <details>
76
- <summary>非交互安装 / 兼容旧方式</summary>
77
-
78
- 需要脚本化安装、Agent 操作,或想明确指定 `Install` 时,仍然可以使用原来的核心管理器:
79
-
80
- ```powershell
81
- curl.exe -fL https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex.ps1 -o "$env:TEMP\dsh-codex.ps1"
82
- powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex.ps1" Install
73
+ irm 'https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex-setup.ps1' | iex
83
74
  ```
84
75
 
85
- 如果有多个 DSH-Portable,也可以继续显式传入 `-PortableRoot`。这个入口保持非交互,适合自动化。
86
-
87
- </details>
88
-
89
- 如果便携文件夹改过名字或位置,先启动一次正确的 DSH-Portable,再执行安装。完成后手动
90
- 重启 DSH,让插件生效。
76
+ 这个轻量助手只在当前目录、系统命令和常见的
77
+ [DSH-Portable](https://github.com/WSL043/DSH-Portable) 位置查找 DSH,然后调用一次官方
78
+ `plugin add`。它不会递归扫盘、安装 pnpm、创建常驻命令、保存 profile 快照或重复下载插件。
79
+ 无需管理员权限,也不会擅自重启 DSH。
91
80
 
92
81
  <details>
93
- <summary>macOS、Linux,或已有 <code>dsh</code> 命令</summary>
82
+ <summary>macOS、Linux,或已有 <code>dsh</code> 命令(通用安装)</summary>
94
83
 
95
84
  ```sh
96
85
  dsh plugin --profile web add dsh-codex-subscription
@@ -103,64 +92,48 @@ dsh --profile web --dump-config
103
92
 
104
93
  </details>
105
94
 
106
- ## 登录与使用
95
+ 安装完成后手动重启 DSH,然后:
107
96
 
108
- 1. 打开 DSH 的 **设置 -> Codex 订阅**;
97
+ 1. 打开 **设置 -> Codex 订阅**;
109
98
  2. 登录具有 Codex 使用资格的 ChatGPT 账户;
110
- 3. 选择使用 DSH 默认搜索,或使用 Codex 订阅搜索;
99
+ 3. 选择搜索来源;
111
100
  4. 在模型选择器中选择 Codex 模型。
112
101
 
113
- 需要图片时直接描述想要的画面,Agent 会调用 Codex 图片生成并在会话中显示结果。
102
+ ## 功能
114
103
 
115
- Codex 订阅搜索复用同一份 ChatGPT 登录,不需要 OpenAI API Key。切换搜索来源不会改变
116
- 当前对话模型,也不会在失败时自动改走另一个付费服务。升级后默认保留 DSH 原有搜索,
117
- 需要使用 Codex 订阅搜索时再主动切换。
104
+ - ChatGPT OAuth 登录,凭据保留在本机;
105
+ - Codex 模型和图片生成直接出现在 DSH 会话中;
106
+ - DSH 默认搜索与 Codex 订阅搜索可随时切换;
107
+ - 设置页显示服务端返回的额度、重置时间和更新时间;
108
+ - 普通 Codex、Codex-Spark、Credits 等独立额度分开显示;
109
+ - 输入框可显示当前 Codex 模型的剩余额度(Beta,默认关闭);
110
+ - 订阅路由不可用时明确报错,不会静默切换到其他付费路由。
118
111
 
119
- ## 额度如何显示
112
+ ### 输入框额度
120
113
 
121
- ![输入框内的 Codex 剩余额度](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/composer-quota-en.png)
114
+ <p align="center">
115
+ <img src="https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/docs/assets/composer-quota-en.png" width="800" alt="输入框内的 Codex 剩余额度">
116
+ </p>
122
117
 
123
- - 设置页始终展示服务端返回的详细额度;快捷百分比是 Beta 功能,默认关闭;
124
- - 开启后,百分比会显示在输入框内、模型名称左侧,只在选择 Codex 模型时出现;
125
- - 普通 Codex 模型取标准 Codex 窗口中剩余最少的一项,避免给出过于乐观的数字;
126
- - 选择 Spark 模型时,快捷百分比使用服务端返回的 Spark 独立额度;
127
- - 只显示服务端实际返回的窗口,不写死“5 小时 + 每周”;
128
- - 当前只有每周额度时不虚构 5 小时窗口,以后服务端恢复时会自动显示;
129
- - Codex-Spark 等独立额度不会与普通 Codex 额度合并;
130
- - Credits 和月度消费上限仅在账户或工作区真实返回时显示;
131
- - 百分比表示使用状态,不是账单金额或计费承诺。
118
+ 快捷百分比只在选择 Codex 模型时显示。普通 Codex 使用服务端返回窗口中剩余最少的一项,
119
+ Spark 使用独立额度。插件不会写死“5 小时 + 每周”,也不会虚构服务端没有返回的 Credits 或消费上限。
132
120
 
133
121
  ## 更新与卸载
134
122
 
135
- Windows 安装器用户只需要两条短命令:
136
-
137
- | 操作 | PowerShell 命令 |
138
- | --- | --- |
139
- | 更新 | `dsh-codex update` |
140
- | 卸载 | `dsh-codex uninstall` |
141
-
142
- 更新会校验最新 Release 管理脚本的 SHA-256。卸载会移除插件和 `dsh-codex` 命令,但保留
143
- DSH profile、其他插件和已保存的登录信息。旧版本如果还没有短命令,重新执行一次上面的
144
- Windows 首次安装命令即可;安装助手检测到已有插件时会自动显示并执行“更新”。
123
+ Windows 用户重新运行上面的单行助手即可更新。卸载使用 DSH 官方命令;两种操作都保留
124
+ DSH profile、其他插件和登录信息。
145
125
 
146
126
  <details>
147
127
  <summary>使用现有 <code>dsh</code> 命令更新或卸载</summary>
148
128
 
149
- 更新并检查:
150
-
151
129
  ```sh
152
130
  dsh plugin --profile web update dsh-codex-subscription
153
131
  dsh plugin --profile web list dsh-codex-subscription --depth 0
154
132
  dsh --profile web --dump-config
155
- ```
156
-
157
- 卸载:
158
-
159
- ```sh
160
133
  dsh plugin --profile web remove dsh-codex-subscription
161
134
  ```
162
135
 
163
- 从 v0.2.1 手动更新时,确认新包安装成功后再移除旧包名:
136
+ 从 v0.2.1 手动迁移时,确认新包安装成功后再移除旧包名:
164
137
 
165
138
  ```sh
166
139
  dsh plugin --profile web remove @wsl043/dsh-codex-subscription
@@ -168,50 +141,22 @@ dsh plugin --profile web remove @wsl043/dsh-codex-subscription
168
141
 
169
142
  </details>
170
143
 
171
- 如果 DSH 正在运行,安装或更新后请手动重启。
144
+ DSH-Portable 在其目录中把上述 `dsh` 换成 `.\dsh.exe`。
172
145
 
173
146
  ## 常见问题
174
147
 
175
- - 找不到 `dsh-codex`:关闭并重新打开 PowerShell;
176
- - 找不到 DSH-Portable:先启动一次正确的便携版,再重新安装;
177
- - 检测到多个 DSH:新版安装助手会列出编号和路径,选你准备使用的那个即可;
178
- - 没有 `curl.exe` 或仍然失败:把 Agent 文档链接发给 Agent,不要自行修改系统 PATH、执行策略或删除 profile。
148
+ - **找不到 DSH-Portable**:进入它的目录后重新执行安装命令,或直接运行 `.\dsh.exe plugin --profile web add dsh-codex-subscription`;
149
+ - **电脑上有多个 DSH**:进入要使用的那个 DSH-Portable 目录再运行助手;
150
+ - **安装仍然失败**:把上面的 Agent 文档链接发给 Agent,不要删除 profile 或随意修改系统 PATH。
179
151
 
180
152
  ## 边界与支持
181
153
 
182
- - 本项目接入 ChatGPT 订阅,不会把订阅转换成 OpenAI API Key;
183
- - ChatGPT Codex 后端和 DeepSeek Harness 都可能变化,兼容性以当前发布说明为准;
184
- - 本项目为社区项目,与 DeepSeek、OpenAI 无隶属或背书关系。
154
+ ChatGPT Codex 后端和 DSH 可能独立变化;本项目为社区项目,与 DeepSeek、OpenAI 无隶属或背书关系。
185
155
 
186
156
  本项目的问题反馈请使用 [GitHub Issues](https://github.com/WSL043/dsh-codex-subscription/issues);
187
- DSH 插件相关交流也可以前往
188
- [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions)。
157
+ DSH 插件交流可前往 [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions)。
189
158
  敏感问题请先阅读 [SECURITY.md](SECURITY.md)。
190
159
 
191
- ## English
192
-
193
- Use your ChatGPT / Codex subscription directly in DeepSeek Harness without an
194
- OpenAI API key or Codex CLI. The plugin supports Codex image generation, lets
195
- you choose DSH or Codex subscription search, and shows the quota returned by the
196
- service.
197
-
198
- **Agent install:** send this
199
- [installation guide](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)
200
- to your Agent.
201
-
202
- **Windows install:** open PowerShell and run this one line:
203
-
204
- ```powershell
205
- curl.exe -fL https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex-setup.ps1 -o "$env:TEMP\dsh-codex-setup.ps1"; if ($LASTEXITCODE -eq 0) { powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex-setup.ps1" }
206
- ```
207
-
208
- The setup asks for Chinese or English first, turns multiple DSH copies into a
209
- numbered choice, and automatically shows **Install** or **Update** based on the
210
- selected DSH. DSH-Portable is supported without a separate Node.js or pnpm
211
- installation. After the first install, use `dsh-codex update` to update and
212
- `dsh-codex uninstall` to remove it. Open **Settings -> Codex**, sign in with a
213
- ChatGPT account that has Codex access, choose a search source, and select a Codex
214
- model. For full usage and troubleshooting, see the
215
- [English documentation](https://github.com/WSL043/dsh-codex-subscription/blob/main/README.en.md).
160
+ 如果这个项目对你有帮助,[点一下 Star](https://github.com/WSL043/dsh-codex-subscription/stargazers) 可以让更多 DSH 用户发现它。
216
161
 
217
162
  [MIT](LICENSE)
Binary file
package/lib/index.js CHANGED
@@ -463,7 +463,7 @@ function openaiCodexSubscriptionProvider() {
463
463
  })
464
464
  });
465
465
  }
466
- const USER_AGENT = `dsh-codex-subscription/1.0.4`;
466
+ const USER_AGENT = `dsh-codex-subscription/1.0.6`;
467
467
  //#endregion
468
468
  //#region src/codex-search.js
469
469
  const CODEX_SEARCH_PROVIDER_ID = "codex-subscription";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "packageManager": "pnpm@11.19.0",
5
5
  "description": "ChatGPT and Codex subscriptions for DeepSeek Harness with OAuth login, image generation, quota, and subscription web search",
6
6
  "type": "module",
@@ -17,7 +17,6 @@
17
17
  "README.md",
18
18
  "README.en.md",
19
19
  "AGENTS.md",
20
- "dsh-codex.ps1",
21
20
  "LICENSE",
22
21
  "SECURITY.md",
23
22
  "THIRD_PARTY_NOTICES.md",