返回目录
模型与 MCP 插件

dsh-codex-advisor

Awenforever/dsh-codex-advisor

Persistent Codex advisor threads callable from DSH sessions (Codex app-server bridge).

Stars
0
Forks
0
Issues
0
更新
5 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:Awenforever/dsh-codex-advisor

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-codex-advisor

A persistent Codex advisor for DeepSeek Harness (DSH).

One DSH session can keep several labeled Codex threads. Continue a thread for the same objective, or start another for a different aspect or model class. Codex runs through the official codex app-server protocol under your existing ChatGPT/Codex login, so it uses your Codex quota rather than a separate API key.

Current release: 0.10.0. Tested with DSH Desktop 0.2.1-rc.5 on Windows 11 and Codex CLI 0.166.0-alpha.5.1. See Compatibility.

What you get

  • Six native tools: codex_ask, codex_poll, codex_cancel, codex_status, codex_history, codex_reset.
  • A Codex trail tab with thread rail, Markdown Ask/Answer blocks, activity, and a per-turn model · effort footnote.
  • A compact Codex Advisor card with the active thread, latest ask/answer, status light, and model/effort. Its mark is filled and lightly stroked: this asset is a thin ribbon outline, and stroke-only rendering at sidebar size antialiases into a grey smudge.
  • Panel layout via dsh-panel-dock (optional, strongly recommended). With the dock installed, the card is a real panel: it defaults to the left sidebar, the dock owns its geometry, and the panel can move to the right column, split, float, and remember its position across reloads.
  • Brand-mark switcher: the card's own brand mark is the switch — ChatGPT glyph at rest, panel glyph while the card is hovered or focused — so no extra header control is added and the trailing status/model cluster keeps its space. With the dock installed, a click calls dock.toggleSide('codex-advisor') and the glyph follows dock.getSide(...).
  • Without the dock the card stays in the left sidebar and places itself bottom-up above any existing footer cards; it never negotiates with another panel. Clicking the brand mark explains that moving needs dsh-panel-dock and offers a one-click install (or cancel). Nothing is installed silently.
  • Split-pane aware: the sidebar card follows the focused pane; a pane-owned view keeps its own sessionId, and shared split containers/toolbars do not steal focus. Focus switching only reads snapshots — it never calls codex_ask or writes thread/state. Tested against the latest dsh-multiview (0.1.20); older split-view versions are not supported.
  • Theme-aware UI: surfaces, Ask/Answer tints, status colors, errors, and the update modal use DSH semantic tokens and follow DSH light/dark automatically. There is no separate theme toggle.
  • State and thread bindings survive DSH restarts.
  • Explicit source/model/effort provenance on every tool result.

Requirements

  • DSH Desktop 0.2.1-rc.5 or newer in the 0.2.x line. The plugin is currently developed and tested on Windows 11.
  • Codex CLI with app-server --stdio support and a logged-in ChatGPT/Codex account. The CLI is not bundled with this plugin.
  • Available Codex quota for real turns. A quota error is returned as a tool error with the reset time when the service provides one.
  • Node.js >=22 (the DSH desktop runtime already provides it).

The plugin is not affiliated with OpenAI or DeepSeek. It uses your existing Codex login and quota.

Install

DSH Desktop

Install the release tarball through DSH's plugin manager:

https://github.com/Awenforever/dsh-codex-advisor/archive/refs/tags/v0.10.0.tar.gz

After installation, add/keep the codex-advisor bundle and restart DSH if the Host requests it. A client-bundle change may require a full DSH quit/reopen or a page reload; the Codex tab and sidebar card appear after the client bundle is reloaded.

Strongly recommended: install dsh-panel-dock as well. Without it the card still renders in the left sidebar, but it cannot move to the right column. The card's brand switch offers a one-click install when the dock is missing.

Web / CLI profile

dsh plugin --profile <profile> add https://github.com/Awenforever/dsh-codex-advisor/archive/refs/tags/v0.10.0.tar.gz

Then restart that DSH profile. For the app-managed desktop profile, use the app's plugin manager instead of editing the profile by hand.

Updates

The version badge checks the latest non-prerelease GitHub release. On DSH builds that expose an official pluginUpdates service, the modal can install automatically.

Current DSH 0.2.1-rc.5 does not expose that service. The official pluginManager can install a bundle but does not provide an in-place upgrade API, so this release deliberately presents a manual update path:

  1. Click the version badge to check for a newer release.
  2. Use Open release for notes.
  3. Install the new release tarball through DSH's plugin manager.
  4. Quit and reopen DSH, or reload the client bundle, so the UI and Host versions match.

There is no fake one-click install button when the host cannot support it.

Tools

Tool Purpose
codex_ask Send a request to the active, labeled, or new thread (thread, thread_id, new_thread, label, model, effort, purpose).
codex_poll Collect a running or finished turn.
codex_cancel Interrupt the current turn.
codex_status App-server connection, threads, active thread, quota, and last error.
codex_history Read a thread's turns, answers, commands, files, and provenance.
codex_reset Start a new labeled thread without deleting old threads.

Routing is deterministic: the caller chooses a purpose, and the plugin maps it to a model family and effort. It does not infer the purpose from message text or length. A thread's model is pinned at creation; effort can change per turn.

Purpose Model family Effort When to use
architecture astra max Hard architecture, irreversible tradeoffs
plan astra high Implementation strategy and sequencing
review sol max Independent correctness/security/design review
accept astra high Final acceptance of completed work
implement sol medium Multi-file implementation with integration risk
debug sol medium Root-cause investigation of a failing system
explore terra high Open-ended reconnaissance/options; no production writes
general terra medium Default fallback when no narrower intent fits
verify luna max Bounded tests, CI, reproduction; Luna is floored at max
routine luna max Mechanical, high-certainty, low-blast-radius work; Luna is floored at max

The policy stores a family, not a frozen version. On new-thread creation the plugin reads model/list from the Codex app-server and selects the newest visible version in that family; if a future gpt-6.1-luna appears, routine/verify use it automatically. Static names are fallbacks when the catalog is unavailable. An exact model id pins that exact version; a family alias (for example luna) resolves to its newest visible version.

Panel layout: optional dsh-panel-dock

Panel geometry is not owned by this plugin. The supported layout owner is dsh-panel-dock, which takes over the conversation's main slot and gives every registered panel a real column, split view, float/dock and remembered position.

  • When window.__dshPanelDock is present, this plugin registers define({ id: 'codex-advisor', side: 'left', height: 'auto' }) and renders a single root element with the dock's props spread onto it and style last. The card draws its own border/radius/shadow/background; the dock adds no chrome.
  • When it is absent, the card falls back to the left sidebar. The fallback reads layout only — it never tags or rewrites host ancestors — and places itself above any footer cards already there (bottom-up). The brand switch then opens the install dialog instead of pretending it can move.
  • The install dialog is explicit: it names dsh-panel-dock, explains that side switching needs it, offers one-click install through the Host plugin manager, and allows cancel. Manual install is always available from the same dialog.

The optional dependency is deliberate: DSH itself has no plugin seat for the right column, and a plugin that hand-measures the column becomes locale- and layout-sensitive. dsh-panel-dock is the supported way to get a real panel. Install it for the best experience; this plugin never requires it to render the card.

Configuration

All fields are optional. Set them in the codex-advisor bundle config.

Field Default Notes
enabled true
codexCommand "" Absolute Codex executable. Empty auto-discovers %LOCALAPPDATA%\OpenAI\Codex\bin\*\codex.exe, then PATH, then @openai/codex. Set this explicitly on non-Windows systems.
codexArgv null Full argv override for wrappers/tests.
codexArgs [] Extra args after app-server --stdio.
model "" Fallback model for new threads; a family alias resolves to the latest visible version.
reasoningEffort "" Fallback effort for new/continued turns.
modelCatalogTtlMs 300000 Cache for model/list; refreshed on new-thread routing.
sandbox workspace-write read-only for advice-only use.
approvalPolicy never Interactive approvals are auto-declined.
defaultWaitSeconds / maxWaitSeconds 180 / 1800 codex_ask wait behavior.
idleRecycleMs 600000 Close an idle app-server process; 0 disables.
maxThreads 100 Bound-session eviction limit.
digestBytes 4096 Recovery digest budget.
stateDir "" "" uses $DSH_HOME/codex-advisor.
quotaCheckTtlMs 60000 Rate-limit cache.
env {} Extra child environment.

Security and privacy

  • Codex runs as a stdio child process; this plugin opens no listening port.
  • Credentials remain in your Codex profile (~/.codex); the plugin does not read or copy auth.json.
  • The default sandbox is workspace-write, which allows the advisor to modify the session working directory. Use sandbox: read-only for advice-only use, and review activity.files / activity.commands.
  • Interactive approvals are declined automatically; declined requests are counted in activity.declined.
  • State is stored under $DSH_HOME/codex-advisor/{state.json,events.ndjson}. It may contain recent prompt/answer digests for recovery; set digestBytes: 0 to disable digests. Uninstalling does not delete the state directory.
  • Network access: GitHub API for release checks, and whatever the Codex CLI itself uses for your account. No telemetry is sent by this plugin.

Compatibility and limitations

  • Windows 11 / DSH Desktop 0.2.1-rc.5 is the primary tested target. The Codex auto-discovery path is Windows-specific; other systems must set codexCommand.
  • Split-pane focus is tested against the latest dsh-multiview only (0.1.20 at this release, on DSH 0.2.2-rc.1). This plugin does not carry per-version shims for older split-view plugins: if a split-view release changes its focus semantics, the supported target moves to that newer release rather than adding backward compatibility. If you use an older dsh-multiview, focus following is unsupported and may stick to the last-mounted pane.
  • Codex app-server is an experimental interface. A thread has one writer; if Codex Desktop holds the thread, the bridge reports CODEX_THREAD_BUSY.
  • Quota and account model availability are controlled by Codex, not this plugin.
  • Markdown rendering covers headings, lists, code fences, inline code, emphasis, links, blockquotes, and rules. Tables, images, and raw HTML are not rendered as HTML.
  • Historical turns created before per-turn provenance existed may not show an effort footnote.
  • Client bundle updates can require a DSH page reload or a full quit/reopen.

Development

node --check index.js
node --check client.js
node --test --test-force-exit test/jsonrpc.test.mjs test/store.test.mjs test/codex.test.mjs test/manager.test.mjs test/manifest.test.mjs test/update.test.mjs test/client.test.mjs
node test/harness/host-level.mjs
node test/harness/failure-level.mjs
npm pack --dry-run

Tests use a fake app-server and do not require a Codex login or quota.

License

MIT. See LICENSE.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。