dsh-codex-plus
Manifest valid# Codex (ChatGPT Plus/Pro) Subscription Access for DSH: Displays 5-hour and weekly quotas, reset time, and reset voucher, with support for one-click reset; automatically connects subscription models to the model selector when reading quota; automatically renews the access token before expiration. No API key required. Codex (ChatGPT Plus/Pro) subscription for DSH: quota panel with one-click reset, subscription model routing, and token upkeep.
dsh-codex-plus
用途:把你本机已经登录的 Codex(ChatGPT Plus/Pro)订阅接入 DeepSeek Harness。 它显示 5 小时窗口与一周窗口的剩余额度、重置时间与剩余重置券数量,支持选择并消耗指定重置券来重置额度; 读取额度时自动把订阅线路注册进 DSH,使 Codex 模型出现在模型选择器中;并在 access token 到期前 自动续期。无需填写任何 API key,使用的是你本机 Codex 登录已有的凭证。
平台支持说明:当前版本仅支持 Linux。Windows 版本尚未适配,需要额外适配后方可使用。
中文更新记录:CHANGELOG.zh.md
English: use your Codex (ChatGPT Plus/Pro) subscription inside DeepSeek Harness
用途
- 看得见订阅额度 —— 侧边栏
Codex胶囊与面板显示两个窗口的剩余额度与重置券; - 能用订阅的模型 —— 读额度时自动注册
openai-codex路由,模型出现在模型选择器; - 能指定重置券 —— 面板逐张列出可用券并单选,按钮只消耗所选券,重置 5 小时 + 一周窗口;
- 凭证自动续期 —— token 剩余不足 24 小时时自动续期并原子写回。
中文详解(功能明细、面板路由、安装与配置、安全边界)见 README.zh.md。
English
Use your Codex (ChatGPT Plus/Pro) subscription inside DeepSeek Harness.
It reads the quota of the Codex account you are already signed in to on this machine, shows it in the UI, exposes the subscription's models to DSH's model picker, and can spend a specifically selected rate-limit reset credit.
What it does
Quota panel
- A
Codexchip in the sidebar footer: remaining 5-hour window, remaining weekly window, and how many reset credits are left (collapses to the percentage when the sidebar is in rail mode). - Click it for a panel with both windows (used %, reset time) and every reset credit with its expiry date.
- Selected-credit reset spends the reset credit selected with the radio control and resets the 5-hour + weekly windows.
The button is disabled when no credit is available, and the outcome is reported
(
reset/nothingToReset/noCredit/alreadyRedeemed). This consumes a real credit and cannot be undone.
Model routing
Reading the quota also registers the subscription route in the llm-pi-ai settings namespace,
so the Codex models appear in DSH's model picker:
llm-pi-ai:
providers:
openai-codex:
apiKeyEnv: OPENAI_CODEX_API_KEY
displayName: Codex (ChatGPT Plus/Pro)
baseURL: https://chatgpt.com/backend-api
Only that provider entry is replaced through settingsController.mutate(). No fixed settings-file path is assumed, and every other provider remains untouched. The profile declares the complete eight-model catalog, including gpt-6-luna and gpt-6-sol.
Token upkeep
The access token is refreshed against auth.openai.com when it has less than 24 hours left,
and the rotated access_token / refresh_token / id_token triple is written back to
auth.json atomically with mode 0600. The current access token is stored in DSH's
credential store under the reference name above, so settings.yaml never holds a secret.
Panel transport
The browser half talks to the host half over this plugin's own same-origin routes —
GET /codex-plus/status, POST /codex-plus/sync, POST /codex-plus/reset (JSON body: { "creditId": "…" }) — which the DSH web
server already protects with its browser-session policy. No new RPC channel and no token in the
page are involved.
Delegation tool
codex hands a self-contained task to the local Codex agent and returns its final answer —
useful for a second opinion, a fresh-context review, or an independent subtask.
| Tool | Purpose |
|---|---|
codex | Run a task through codex exec and return the answer |
codex_quota | Read the quota and re-sync the provider route |
codex_models_sync | Refresh the token and re-register the models now |
codexprobe | Diagnostics: resolved CLI, Codex home, cached catalog, quota read |
Requirements
- Linux only. Windows is not supported yet and requires additional adaptation.
- A Codex CLI on this machine that is already signed in with a ChatGPT account
(
codex login); its login lives in<codexHome>/auth.json. - The CLI is looked up in
DSH_CODEX_BIN, then/usr/lib/chatgpt/resources/codex,/usr/local/bin/codex,/usr/bin/codex,~/.codex/bin/codex,~/.local/bin/codex. - The Codex home is
DSH_CODEX_HOME, else~/.codex. - Node 20 or newer. No Python, no extra npm dependency.
Install
dsh plugin --profile web add dsh-codex-plus
Then restart the profile and refresh the page. Switch the conversation's model to Codex (ChatGPT Plus/Pro) to use the subscription for that session.
Configuration
All keys are optional.
- id: codex-plus
name: 'dsh-codex-plus'
config:
codexBin: /usr/local/bin/codex # explicit CLI path
codexHome: ~/.codex # explicit CODEX_HOME
workspace: /path/to/workspace # shell sandbox root (default: process cwd)
providerRoute: openai-codex # pi-ai catalog route to configure
providerDisplayName: Codex (ChatGPT Plus/Pro)
credentialRef: OPENAI_CODEX_API_KEY # credential-store reference name
syncProviders: true # set false to skip the settings write entirely
sandboxPolicy: true # false disables the workspace-write policy
Set syncProviders: false if you only want the quota panel and would rather wire the
provider yourself.
Security
- No credentials are bundled, and none are logged. The plugin reads the token your own
Codex login already wrote to
auth.json. - The token value goes to DSH's credential store;
settings.yamlonly carries the reference nameOPENAI_CODEX_API_KEY. auth.jsonis only ever written with the refreshed triple, atomically, at mode0600.- The reset action requires an explicit confirmation argument and an available credit.
- The panel routes are readable by any caller that already holds a valid DSH web session (they are behind the same browser-session policy as the rest of the web UI); they expose the quota, the plan type, and the account email, not the token.
codex execruns with the sandbox you pass to thecodextool (read-onlyby default). Note that running Codex inside a sandbox that already blocks user namespaces can make Codex's own workspace-write sandbox fail;danger-full-accessthen defers to DSH's own sandbox, which is the safer pairing.
Licence
MIT
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.4 | — | — |
Comments
Loading…
Similar plugins
by yequ172672
DSH 插件:直接复用 Codex CLI 本地登录订阅凭证,在 DeepSeek Harness 中使用 ChatGPT 订阅模型,无需 API Key | DSH plugin: reuse your Codex CLI local subscription login to use ChatGPT subscription models in DeepSeek Harness, no API
★ 20
↓ 45/wk
NOASSERTION
JavaScript
Oct 7, 2026
dsh plugin --profile web add dsh-llm-codexby WSL043
把 ChatGPT / Codex 订阅接入 DeepSeek Harness:OAuth、模型、额度、搜索和图片生成,无需 API Key 或 Codex CLI。
★ 158
MIT
JavaScript
Oct 11, 2026
dsh plugin --profile web add dsh-codex-subscriptionby Player-MINEPIG
在 dsh(DeepSeek Harness)里使用你的 ChatGPT / Codex 订阅。插件通过 OpenAI Codex 的 OAuth 流程登录 ChatGPT 账号,把订阅额度暴露成 dsh 的 `codex-oauth` 模型提供方。
★ 8
MIT
JavaScript
Aug 16, 2026
dsh plugin --profile web add dsh-llm-codex-oauthby liancha22
DSH 插件|拼图模式:把项目拆成主文档 + 若干模块文档,AI 主动提问把不确定项变成已定项,用五维算项目健康性。一个会话可同时绑多个项目,面板有绑定切换条;项目分小 / 中 / 大三档,条目上限随档位放宽或收紧;主文档第五节 `## 工作流` 是标准化流水线(一条 = 一个 ### 名字块 + 有序步骤),命中触发词自动注入。**重复思考熔断**:同一工具连续 3 次同样参数调用即注入提示,把绕圈的模型推出去。文档格式 v7;与 dsh-infinite-gen-5 同装时按契约共存。
★ 4
MIT
JavaScript
Oct 9, 2026
dsh plugin --profile web add dsh-puzzle-modeby Kr-ATG
DSH 对话流增强插件(零 DSH 源码改动,纯插件注入)。回合呈现:思考 chip(实时走秒 + 实时文字滚动)· 工具调用聚合 chip · 对话流卡片(步骤卡/总结卡)· 共享活动抽屉。正文增强:proto-tabs 可交互卡片 · diagram 流程图围栏 · 本地 HTML 内嵌预览(识别正文里的 .html 路径,host 读文件 + 同目录资源,iframe 沙箱隔离,高度自适应,
★ 3
JavaScript
Sep 22, 2026
dsh plugin --profile web add dsh-chat-flowby heartmove
一个 DSH 网页插件,Codex 式侧边聊天的强化版本: 在右侧面板提供按主会话隔离的独立聊天,具备 Codex 式的智能体能力——继承主会话的 工具集、模型、思考难度与权限预设,能感知所在工作目录;选中对话内容即可提问,AI 回复 也能带回主会话(直接带回或摘要后带回,写入草稿或注入为折叠提示行)。 在 Codex 式能力之上,它额外支持:当主会话的智能体弹出问题弹框向你提问时,可以 把问题
★ 12
↓ 370/wk
MIT
TypeScript
Aug 16, 2026
dsh plugin --profile web add dsh-side-chat-plus