dsh-codex-subscription 0.2.8

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 ADDED
@@ -0,0 +1,150 @@
1
+ # Agent installation guide
2
+
3
+ Use this guide when a user asks an Agent to install, update, verify, or remove
4
+ `dsh-codex-subscription`.
5
+
6
+ ## Safety
7
+
8
+ - Confirm the target DSH profile; use `web` only when it is the user's target.
9
+ - Use the pinned `v0.2.8` release assets for a first install, never a moving branch.
10
+ - Never print OAuth credentials, account IDs, authorization callbacks, or the
11
+ credential store.
12
+ - Do not start, stop, or restart DSH without explicit permission.
13
+ - Preserve the DSH profile, unrelated plugins, and stored OAuth credentials.
14
+ Signing out requires explicit permission.
15
+ - Do not delete any DSH profile during install, update, verification, or uninstall.
16
+
17
+ ## Detect the installation
18
+
19
+ On Windows, first run `Get-Command dsh-codex -ErrorAction SilentlyContinue`.
20
+ When it exists, use `dsh-codex update` or `dsh-codex uninstall` instead of
21
+ downloading the manager again.
22
+
23
+ On Windows, prefer the release manager below. It supports both a normal DSH
24
+ installation and DSH-Portable. It discovers a running portable instance, the
25
+ current folder and its parents, the default installed location, and common
26
+ Downloads or Desktop locations.
27
+
28
+ Do not require a DSH-Portable user to install system Node.js or pnpm. The manager
29
+ uses the portable runtime, sets its isolated `DSH_HOME`, and keeps its verified
30
+ pnpm tool and store inside the portable data directory. A successful first install
31
+ adds only the per-user `dsh-codex` command directory to PATH; it never modifies
32
+ the machine PATH.
33
+
34
+ If automatic discovery fails, locate the portable root with read-only checks and
35
+ pass it explicitly as `-PortableRoot`. A valid root contains both:
36
+
37
+ ```text
38
+ runtime\node\node.exe
39
+ app\node_modules\@deepseek-ai\dsh\lib\bin.js
40
+ ```
41
+
42
+ Before changing anything on an unfamiliar Windows computer, confirm that
43
+ `powershell.exe` starts, note `$PSVersionTable.PSVersion`, and check
44
+ `Get-Command curl.exe,dsh,node -ErrorAction SilentlyContinue`. Missing system
45
+ Node.js or pnpm is normal for DSH-Portable and is not a reason to install either.
46
+ If more than one DSH installation is present, stop automatic discovery and ask
47
+ the user which installation is the target.
48
+
49
+ ## Windows manager
50
+
51
+ Download the fixed release asset to a visible file, then invoke the requested action:
52
+
53
+ ```powershell
54
+ curl.exe -fL https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex.ps1 -o "$env:TEMP\dsh-codex.ps1"
55
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex.ps1" Install
56
+ ```
57
+
58
+ If `curl.exe` is unavailable, download the same pinned asset without executing
59
+ remote text in memory:
60
+
61
+ ```powershell
62
+ Invoke-WebRequest -UseBasicParsing -Uri 'https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex.ps1' -OutFile "$env:TEMP\dsh-codex.ps1"
63
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex.ps1" Install
64
+ ```
65
+
66
+ The process-scoped `Bypass` is for this child process only; do not change the
67
+ machine or user execution policy.
68
+
69
+ For a custom portable location:
70
+
71
+ ```powershell
72
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex.ps1" Install -PortableRoot 'C:\path\to\DSH-Portable'
73
+ ```
74
+
75
+ After a successful first install, use these commands in a new PowerShell window:
76
+
77
+ ```powershell
78
+ dsh-codex update
79
+ dsh-codex uninstall
80
+ ```
81
+
82
+ `dsh-codex update` resolves the latest immutable GitHub Release and verifies the
83
+ downloaded manager with its SHA-256 asset before running it. If `Get-Command
84
+ dsh-codex` does not find the command on an older installation, download the pinned
85
+ manager above and invoke `Update` once; that also installs the command. The manager
86
+ verifies the package list and composed config. It never restarts DSH and never
87
+ deletes a profile. Uninstall removes the manager command but preserves the DSH
88
+ profile and saved login.
89
+
90
+ ## Existing DSH CLI
91
+
92
+ When `dsh`, Node.js, and pnpm are already available, install the fixed package
93
+ asset directly:
94
+
95
+ ```sh
96
+ dsh plugin --profile web add https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex-subscription.tgz
97
+ ```
98
+
99
+ Update by running the same `add` command again. When migrating from v0.2.1 by
100
+ hand, remove `@wsl043/dsh-codex-subscription` only after the new package passes
101
+ verification. The Windows manager performs this migration automatically and
102
+ preserves the stored login. Uninstall the current package with:
103
+
104
+ ```sh
105
+ dsh plugin --profile web remove dsh-codex-subscription
106
+ ```
107
+
108
+ ## Verify
109
+
110
+ For the existing CLI path, run:
111
+
112
+ ```sh
113
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
114
+ dsh --profile web --dump-config
115
+ ```
116
+
117
+ Success requires:
118
+
119
+ 1. The requested package version appears once.
120
+ 2. `codex-subscription` appears once in the composed config after install
121
+ or update, and is absent after uninstall.
122
+ 3. No unrelated profile or plugin changed.
123
+ 4. A running DSH process was not restarted by the operation.
124
+
125
+ Do not treat `dsh plugin --profile web peers check` as the completion test.
126
+ If the user authorizes a live check, restart DSH manually, open
127
+ **Settings -> Codex**, and verify the page loads. Confirm that Web
128
+ search offers both **DSH default** and **Codex subscription**, and that the Beta
129
+ composer quota switch starts off. Weekly-only usage is valid; Spark remains a
130
+ separate bucket. Do not run a quota-consuming model turn unless the user
131
+ explicitly asks.
132
+
133
+ ## Failure handling
134
+
135
+ If `dsh-codex` is not found immediately after a successful install, start a new
136
+ PowerShell window and run `Get-Command dsh-codex`. If it is still missing, check
137
+ the current user's PATH and
138
+ `$env:LOCALAPPDATA\Programs\dsh-codex\dsh-codex.cmd`; do not edit the machine
139
+ PATH. The full command path may be used for verification while the shell refresh
140
+ is pending.
141
+
142
+ If download fails, distinguish DNS, proxy, TLS/certificate, HTTP status, and
143
+ checksum failures. Never disable certificate validation or skip a checksum. If
144
+ `MachinePolicy` or `UserPolicy` blocks the child process, report the applicable
145
+ `Get-ExecutionPolicy -List` result and stop; do not change organization policy.
146
+
147
+ On any failure, report the sanitized command error, DSH version, selected
148
+ profile, requested release, installation mode, what changed, cleanup status, and
149
+ what remains unverified. Do not patch DSH, switch to another paid route, wipe
150
+ credentials, delete a profile, or claim success from a partial check.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WSL043
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,180 @@
1
+ # DSH Codex Subscription
2
+
3
+ [![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
+ [![License: MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
5
+ [![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)
6
+
7
+ [简体中文](README.md)
8
+
9
+ Sign in to ChatGPT and use a Codex subscription directly in DeepSeek Harness.
10
+ No OpenAI API key or Codex CLI installation is required. DSH conversations,
11
+ tools, permissions, search choice, and quota stay in one place.
12
+
13
+ [Agent install](#let-an-agent-install-it-recommended) · [Windows install](#manual-windows-install) · [Update or uninstall](#update-and-uninstall)
14
+
15
+ ![Codex subscription settings in DeepSeek Harness](docs/assets/settings-en.png)
16
+
17
+ Settings shows sign-in, search source, and the separate standard Codex and Spark
18
+ quota returned by the service.
19
+
20
+ If this helps, open the [GitHub repository](https://github.com/WSL043/dsh-codex-subscription) and click **Star** in the upper-right corner so more DSH users can find it.
21
+
22
+ ## What it does
23
+
24
+ - Uses your ChatGPT / Codex subscription directly inside DSH, with no OpenAI API key or Codex CLI required;
25
+ - Signs in to ChatGPT from Settings and keeps credentials on the host;
26
+ - Switches between DSH's default search and Codex subscription search;
27
+ - Shows the quota, reset time, and freshness actually returned by the backend;
28
+ - Can show the selected Codex model's remaining quota before the model name (Beta, off by default);
29
+ - Keeps Codex-Spark, Credits, and other independent limits separate;
30
+ - Fails visibly when subscription routing is unavailable instead of silently using another paid route.
31
+
32
+ ## Prepare DSH
33
+
34
+ This plugin supports DeepSeek Harness `0.1.0-rc.6` and requires a ChatGPT account
35
+ that currently has Codex access.
36
+
37
+ - Do not want to configure Node.js? Use the [community DSH-Portable package](https://github.com/WSL043/DSH-Portable).
38
+ - Prefer the official route? Follow the [DeepSeek Harness run guide](https://github.com/deepseek-ai/deepseek-harness#run).
39
+
40
+ If DSH already opens normally, continue with the plugin installation below.
41
+
42
+ ## Install
43
+
44
+ ### Let an Agent install it (recommended)
45
+
46
+ Send the following URL directly to your Agent. The guide contains install,
47
+ update, uninstall, and verification steps. It preserves the DSH profile and
48
+ sign-in and never restarts DSH without permission:
49
+
50
+ [Open the Agent installation guide](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)
51
+
52
+ ```text
53
+ https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md
54
+ ```
55
+
56
+ ### Manual Windows install
57
+
58
+ Open PowerShell and paste these two lines in order. They support both a normal DSH install
59
+ and DSH-Portable. Portable users do not need a system Node.js or pnpm.
60
+
61
+ ```powershell
62
+ curl.exe -fL https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex.ps1 -o "$env:TEMP\dsh-codex.ps1"
63
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex.ps1" Install
64
+ ```
65
+
66
+ `Bypass` applies only to this child process and does not change the system
67
+ PowerShell execution policy.
68
+
69
+ The commands support both a normal DSH installation and DSH-Portable. Portable
70
+ users do not need a separate Node.js or pnpm installation, and no administrator
71
+ access is required. The installer finds DSH, verifies the result, and adds the
72
+ per-user `dsh-codex` command. It does not change the system execution policy or
73
+ restart DSH on its own.
74
+
75
+ If the portable folder was renamed or moved, start the intended DSH-Portable copy
76
+ once and install again. Restart DSH manually after installation.
77
+
78
+ <details>
79
+ <summary>macOS, Linux, or an existing <code>dsh</code> command</summary>
80
+
81
+ ```sh
82
+ dsh plugin --profile web add https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex-subscription.tgz
83
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
84
+ dsh --profile web --dump-config
85
+ ```
86
+
87
+ The plugin list should contain one `dsh-codex-subscription`, and the config should
88
+ contain one `codex-subscription` entry.
89
+
90
+ </details>
91
+
92
+ ## Sign in and use
93
+
94
+ 1. Open **Settings -> Codex** in DSH.
95
+ 2. Sign in with a ChatGPT account that has Codex access.
96
+ 3. Choose DSH default search or Codex subscription search.
97
+ 4. Choose a Codex model from the model selector.
98
+
99
+ Codex subscription search reuses the same ChatGPT sign-in and does not need an
100
+ OpenAI API key. Changing the search source does not change the conversation
101
+ model, and a failed source never silently falls back to another paid service.
102
+ Existing DSH search remains the default after an upgrade; opt in to Codex
103
+ subscription search when wanted.
104
+
105
+ ## How quota is shown
106
+
107
+ ![Codex quota inside the composer](docs/assets/composer-quota-en.png)
108
+
109
+ - Settings always shows the detailed quota returned by the backend. The compact percentage is Beta and off by default;
110
+ - When enabled, it appears inside the composer before the model name and only while a Codex model is selected;
111
+ - Standard Codex models use the lowest remaining standard Codex window, avoiding an overly optimistic number;
112
+ - A selected Spark model uses the separate Spark quota returned by the backend;
113
+ - Only windows actually returned by the backend are shown; there is no hard-coded “5-hour + weekly” layout;
114
+ - If the account currently reports only weekly usage, no 5-hour window is invented; it appears automatically if the backend restores it;
115
+ - Independent Codex-Spark limits are not merged into standard Codex quota;
116
+ - Credits and monthly spending caps appear only when the account or workspace actually returns them;
117
+ - Percentages describe usage status, not billing amounts or billing guarantees.
118
+
119
+ ## Update and uninstall
120
+
121
+ Windows installer users only need these short commands:
122
+
123
+ | Action | PowerShell command |
124
+ | --- | --- |
125
+ | Update | `dsh-codex update` |
126
+ | Uninstall | `dsh-codex uninstall` |
127
+
128
+ Update verifies the latest Release manager script with SHA-256. Uninstall removes
129
+ the plugin and `dsh-codex` command while preserving the DSH profile, unrelated
130
+ plugins, and saved sign-in. If an older installation has no short command, run
131
+ the two Windows first-install commands above once.
132
+
133
+ <details>
134
+ <summary>Update or uninstall with an existing <code>dsh</code> command</summary>
135
+
136
+ Update and verify:
137
+
138
+ ```sh
139
+ dsh plugin --profile web add https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex-subscription.tgz
140
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
141
+ dsh --profile web --dump-config
142
+ ```
143
+
144
+ Uninstall:
145
+
146
+ ```sh
147
+ dsh plugin --profile web remove dsh-codex-subscription
148
+ ```
149
+
150
+ When updating manually from v0.2.1, remove the old package name only after the new
151
+ package installs successfully:
152
+
153
+ ```sh
154
+ dsh plugin --profile web remove @wsl043/dsh-codex-subscription
155
+ ```
156
+
157
+ </details>
158
+
159
+ If DSH is running, restart it manually after installation or update.
160
+
161
+ ## Troubleshooting
162
+
163
+ - If `dsh-codex` is not found after installation, close and reopen PowerShell;
164
+ - If DSH-Portable is not found, start the intended portable copy once and retry;
165
+ - If `curl.exe` is missing, more than one DSH is present, or the command still
166
+ fails, send the Agent guide URL above to an Agent. Do not change the machine
167
+ PATH or execution policy, and do not delete a profile to force an install.
168
+
169
+ ## Boundaries and support
170
+
171
+ - This package connects a ChatGPT subscription; it does not create an OpenAI API key;
172
+ - The ChatGPT Codex backend and DeepSeek Harness can change independently;
173
+ - This is a community project with no affiliation or endorsement from DeepSeek or OpenAI.
174
+
175
+ Use [GitHub Issues](https://github.com/WSL043/dsh-codex-subscription/issues) for
176
+ project feedback. For general DSH plugin discussion, visit
177
+ [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions).
178
+ Read [SECURITY.md](SECURITY.md) before reporting sensitive issues.
179
+
180
+ [MIT](LICENSE)
package/README.md ADDED
@@ -0,0 +1,166 @@
1
+ # DSH Codex Subscription
2
+
3
+ [![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
+ [![License: MIT](https://img.shields.io/badge/license-MIT-111111.svg)](LICENSE)
5
+ [![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)
6
+
7
+ [English](README.en.md)
8
+
9
+ 在 DeepSeek Harness 中直接登录 ChatGPT 并使用 Codex 订阅,不需要 OpenAI API Key,
10
+ 也不依赖 Codex CLI。保留 DSH 原有的会话、工具和权限,还能切换联网搜索来源并查看额度。
11
+
12
+ [交给 Agent 安装](#交给-agent推荐) · [Windows 手动安装](#windows-手动安装) · [更新与卸载](#更新与卸载)
13
+
14
+ ![DeepSeek Harness 的 Codex 订阅设置](docs/assets/settings.png)
15
+
16
+ 设置页会显示登录状态、搜索来源,以及服务端实际返回的普通 Codex 与 Spark 独立额度。
17
+
18
+ 如果它帮到了你,欢迎在 [GitHub 仓库](https://github.com/WSL043/dsh-codex-subscription)的右上角点一下 **Star**,也方便其他 DSH 用户发现。
19
+
20
+ ## 能做什么
21
+
22
+ - 在 DSH 中直接使用 ChatGPT / Codex 订阅,不需要 OpenAI API Key 或 Codex CLI;
23
+ - 在设置页登录 ChatGPT,凭据保留在本机;
24
+ - 可在 DSH 默认搜索与 Codex 订阅搜索之间切换;
25
+ - 展示服务端实际返回的额度、重置时间和更新时间;
26
+ - 可在模型名称左侧显示当前 Codex 模型的剩余额度(Beta,默认关闭);
27
+ - 单独显示 Codex-Spark、Credits 等独立额度,不把它们混在一起;
28
+ - 订阅路由不可用时明确报错,不会静默切换到其他付费路由。
29
+
30
+ ## 准备 DSH
31
+
32
+ 本插件适配 DeepSeek Harness `0.1.0-rc.6`,还需要一个当前具有 Codex 使用资格的
33
+ ChatGPT 账户。
34
+
35
+ - 不想配置 Node.js:使用 [DSH-Portable(社区便携包)](https://github.com/WSL043/DSH-Portable);
36
+ - 想按官方方式运行:查看 [DeepSeek Harness 官方说明](https://github.com/deepseek-ai/deepseek-harness#run)。
37
+
38
+ 已经能正常打开 DSH 的用户可以直接继续安装插件。
39
+
40
+ ## 安装
41
+
42
+ ### 交给 Agent(推荐)
43
+
44
+ 把下面的链接直接发给 Agent。文档包含安装、更新、卸载和验收步骤;Agent 不应删除
45
+ DSH profile、登录信息或擅自重启 DSH。
46
+
47
+ [打开 Agent 安装文档](https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md)
48
+
49
+ ```text
50
+ https://raw.githubusercontent.com/WSL043/dsh-codex-subscription/main/AGENTS.md
51
+ ```
52
+
53
+ ### Windows 手动安装
54
+
55
+ 打开 PowerShell,依次粘贴下面两行:
56
+
57
+ ```powershell
58
+ curl.exe -fL https://github.com/WSL043/dsh-codex-subscription/releases/latest/download/dsh-codex.ps1 -o "$env:TEMP\dsh-codex.ps1"
59
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\dsh-codex.ps1" Install
60
+ ```
61
+
62
+ 普通安装版和 DSH-Portable 都能使用。便携版不需要另装 Node.js 或 pnpm,整个过程不需要
63
+ 管理员权限。安装器会自动寻找 DSH、验证安装结果,并添加当前用户的 `dsh-codex` 命令;
64
+ 它不会修改系统执行策略或擅自重启 DSH。
65
+
66
+ 如果便携文件夹改过名字或位置,先启动一次正确的 DSH-Portable,再执行安装。完成后手动
67
+ 重启 DSH,让插件生效。
68
+
69
+ <details>
70
+ <summary>macOS、Linux,或已有 <code>dsh</code> 命令</summary>
71
+
72
+ ```sh
73
+ dsh plugin --profile web add https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex-subscription.tgz
74
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
75
+ dsh --profile web --dump-config
76
+ ```
77
+
78
+ 安装列表中应只有一个 `dsh-codex-subscription`,配置中应只有一个
79
+ `codex-subscription` 条目。
80
+
81
+ </details>
82
+
83
+ ## 登录与使用
84
+
85
+ 1. 打开 DSH 的 **设置 -> Codex 订阅**;
86
+ 2. 登录具有 Codex 使用资格的 ChatGPT 账户;
87
+ 3. 选择使用 DSH 默认搜索,或使用 Codex 订阅搜索;
88
+ 4. 在模型选择器中选择 Codex 模型。
89
+
90
+ Codex 订阅搜索复用同一份 ChatGPT 登录,不需要 OpenAI API Key。切换搜索来源不会改变
91
+ 当前对话模型,也不会在失败时自动改走另一个付费服务。升级后默认保留 DSH 原有搜索,
92
+ 需要使用 Codex 订阅搜索时再主动切换。
93
+
94
+ ## 额度如何显示
95
+
96
+ ![输入框内的 Codex 剩余额度](docs/assets/composer-quota-en.png)
97
+
98
+ - 设置页始终展示服务端返回的详细额度;快捷百分比是 Beta 功能,默认关闭;
99
+ - 开启后,百分比会显示在输入框内、模型名称左侧,只在选择 Codex 模型时出现;
100
+ - 普通 Codex 模型取标准 Codex 窗口中剩余最少的一项,避免给出过于乐观的数字;
101
+ - 选择 Spark 模型时,快捷百分比使用服务端返回的 Spark 独立额度;
102
+ - 只显示服务端实际返回的窗口,不写死“5 小时 + 每周”;
103
+ - 当前只有每周额度时不虚构 5 小时窗口,以后服务端恢复时会自动显示;
104
+ - Codex-Spark 等独立额度不会与普通 Codex 额度合并;
105
+ - Credits 和月度消费上限仅在账户或工作区真实返回时显示;
106
+ - 百分比表示使用状态,不是账单金额或计费承诺。
107
+
108
+ ## 更新与卸载
109
+
110
+ Windows 安装器用户只需要两条短命令:
111
+
112
+ | 操作 | PowerShell 命令 |
113
+ | --- | --- |
114
+ | 更新 | `dsh-codex update` |
115
+ | 卸载 | `dsh-codex uninstall` |
116
+
117
+ 更新会校验最新 Release 管理脚本的 SHA-256。卸载会移除插件和 `dsh-codex` 命令,但保留
118
+ DSH profile、其他插件和已保存的登录信息。旧版本如果还没有短命令,重新执行一次上面的
119
+ Windows 首次安装命令即可。
120
+
121
+ <details>
122
+ <summary>使用现有 <code>dsh</code> 命令更新或卸载</summary>
123
+
124
+ 更新并检查:
125
+
126
+ ```sh
127
+ dsh plugin --profile web add https://github.com/WSL043/dsh-codex-subscription/releases/download/v0.2.8/dsh-codex-subscription.tgz
128
+ dsh plugin --profile web list dsh-codex-subscription --depth 0
129
+ dsh --profile web --dump-config
130
+ ```
131
+
132
+ 卸载:
133
+
134
+ ```sh
135
+ dsh plugin --profile web remove dsh-codex-subscription
136
+ ```
137
+
138
+ 从 v0.2.1 手动更新时,确认新包安装成功后再移除旧包名:
139
+
140
+ ```sh
141
+ dsh plugin --profile web remove @wsl043/dsh-codex-subscription
142
+ ```
143
+
144
+ </details>
145
+
146
+ 如果 DSH 正在运行,安装或更新后请手动重启。
147
+
148
+ ## 常见问题
149
+
150
+ - 找不到 `dsh-codex`:关闭并重新打开 PowerShell;
151
+ - 找不到 DSH-Portable:先启动一次正确的便携版,再重新安装;
152
+ - 没有 `curl.exe`、检测到多个 DSH,或仍然失败:把 Agent 文档链接发给 Agent,
153
+ 不要自行修改系统 PATH、执行策略或删除 profile。
154
+
155
+ ## 边界与支持
156
+
157
+ - 本项目接入 ChatGPT 订阅,不会把订阅转换成 OpenAI API Key;
158
+ - ChatGPT Codex 后端和 DeepSeek Harness 都可能变化,兼容性以当前发布说明为准;
159
+ - 本项目为社区项目,与 DeepSeek、OpenAI 无隶属或背书关系。
160
+
161
+ 本项目的问题反馈请使用 [GitHub Issues](https://github.com/WSL043/dsh-codex-subscription/issues);
162
+ DSH 插件相关交流也可以前往
163
+ [DeepSeek Harness Discussions](https://github.com/deepseek-ai/deepseek-harness/discussions)。
164
+ 敏感问题请先阅读 [SECURITY.md](SECURITY.md)。
165
+
166
+ [MIT](LICENSE)
package/SECURITY.md ADDED
@@ -0,0 +1,32 @@
1
+ # Security policy
2
+
3
+ ## Supported version
4
+
5
+ Security fixes are applied to the latest tagged release. DeepSeek Harness is a developer preview, so compatibility fixes may require upgrading both DSH and this bundle.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Use a private GitHub security advisory at:
10
+
11
+ https://github.com/WSL043/dsh-codex-subscription/security/advisories/new
12
+
13
+ Do not open a public issue containing access tokens, refresh tokens, account identifiers, callback URLs with authorization codes, raw DSH credential data, or private prompts. Include the affected version, operating system, DSH version, a minimal reproduction, and impact. Replace all credentials with unmistakably fake placeholders.
14
+
15
+ ## Trust boundary
16
+
17
+ - The plugin runs with the privileges of the DSH host process.
18
+ - OAuth credentials remain in DSH's host credential service.
19
+ - The browser settings client can call only a loopback-authorized, redacted RPC surface.
20
+ - Login links are restricted to the HTTPS `auth.openai.com` origin before they are returned or opened.
21
+ - Usage requests are host-side, use a bounded timeout, refuse redirects, and return parsed quota projections rather than provider payloads.
22
+ - Cache telemetry stores no prompts, responses, session IDs, tokens, account IDs, or returned fingerprint hashes. Its per-session state is bounded and process-local.
23
+ - The bundle defines no API-key or cross-provider fallback.
24
+
25
+ Installing any DSH plugin grants its host code access to the services named in its composition. Review the tag or commit you install. Prefer a tagged version or a full commit hash over a moving branch.
26
+
27
+ ## Out of scope
28
+
29
+ - availability or policy changes in ChatGPT, Codex, OpenAI OAuth, or DeepSeek Harness
30
+ - compromised host machines or compromised DSH installations
31
+ - secrets deliberately pasted into prompts, logs, issues, or screenshots
32
+ - provider billing or quota disputes
@@ -0,0 +1,12 @@
1
+ # Third-party notices
2
+
3
+ This project depends on software distributed under its own terms. The dependency lockfile records the exact resolved graph used for the release.
4
+
5
+ | Project | Role | License | Source |
6
+ | --- | --- | --- | --- |
7
+ | DeepSeek Harness packages | Plugin host, client slots, credential and LLM interfaces | MIT | https://github.com/deepseek-ai/deepseek-harness |
8
+ | `@earendil-works/pi-ai` 0.82.1 | OpenAI Codex OAuth, model catalog, Responses transport, and WebSocket continuation | MIT | https://github.com/earendil-works/pi |
9
+ | React | DSH settings component runtime | MIT | https://github.com/facebook/react |
10
+ | tsdown | Development-time bundler | MIT | https://github.com/rolldown/tsdown |
11
+
12
+ No third-party project endorses this community plugin. See each installed package for its complete license text and transitive dependency notices.
@@ -0,0 +1,6 @@
1
+ # One plugin owns the provider route, selectable subscription search,
2
+ # host-only account RPC, and settings surface. It leaves DSH's model and
3
+ # persistent web configuration untouched.
4
+ - insert:
5
+ - id: codex-subscription
6
+ name: 'dsh-codex-subscription'
Binary file
Binary file