HuaimaoCy/dsh-codex-chatgpt ↗★ 0

dsh-codex-chatgpt

接入本地Codex桌面应用的ChatGPT模型 适合已安装Codex桌面端并希望在DSH中使用其模型的人群。

包名
dsh-codex-chatgpt
兼容性
待验证
版本
0.1.1
最近更新
2026年9月26日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HuaimaoCy/dsh-codex-chatgpt

Configuration

All keys are optional; the defaults below are what cordis.patch.yml ships and what CONFIG_DEFAULTS in src/config.js encodes. approvalPolicy, sandbox, turnTimeoutMs and startupTimeoutMs are validated and rejected at load when invalid.

KeyDefaultMeaning
providercodex-chatgptProvider route key registered on ctx.llm. Non-empty string.
providerNameChatGPT (Codex)Display name shown in the model picker. Non-empty string.
codexExecutable'' (auto-detect)Absolute path to the Codex executable. Resolution order: configured value → DSH_CODEX_EXECUTABLE env var → newest build under %LOCALAPPDATA%\OpenAI\Codex\bin\\codex.exe.
codexHome'' → ~/.dsh/codex-chatgptPrivate CODEX_HOME. Must not be ~/.codex; the desktop app holds that directory's sqlite state runtime exclusively.
authSource'' → ~/.codexDirectory the ChatGPT credential (auth.json) is copied from. Also the directory codex_desktop_sessions reads session_index.jsonl from.
cwd'' → process.cwd()Workspace passed to thread/start and used as the child's working directory. Resolved to an absolute path.
approvalPolicyneverOne of never, on-request, on-failure, untrusted.
sandboxread-onlyOne of read-only, workspace-write, danger-full-access.
reasoningEffort'' (inherit)Default effort for a turn when the DSH request does not name one. Empty means "inherit the model's own default". A per-request effort always wins.
baseInstructionsnullFallback system prompt for a thread when the request carries none. null means Codex uses its own agent system prompt.
turnTimeoutMs900000 (15 min)Hard ceiling for one Codex turn. Positive finite number.
startupTimeoutMs120000 (2 min)Ceiling for the handshake, for thread/start, and for each individual protocol request such as turn/start and model/list. Positive finite number.
ephemeralThreadstrueWhen true, thread/start is asked for an ephemeral thread, keeping DSH-driven conversations out of the app's shared thread history. Any value other than exactly false resolves to true.
environmentIdnullOptional app-server environment selector, passed to thread/start only when it is a non-empty string.
httpTransporttrueWhen true, the private CODEX_HOME's config.toml declares a provider with supports_websockets = false, so Codex goes straight to HTTPS and skips the 115-second WebSocket prewarm wait that used to precede the first turn of every session. When false the file is written empty, restoring upstream behaviour. Must be a boolean.

The system prompt

A request's system text is taken from options.system first, then from a leading system message. It becomes the Codex thread's baseInstructions, which replaces Codex's own agent system prompt for that thread. When the request carries no system text, baseInstructions from the config is used instead; when that is null or empty, nothing is sent and Codex applies its own prompt.

Because the system text is part of the thread's identity, changing the DSH system prompt invalidates the cached thread and forces a new one.