wuanthony397-hash/dsh-codex-peer ↗★ 1

dsh-codex-peer

实现DSH代理与本地Codex CLI协同 适合需要将本地Codex工作流与DSH会话深度整合、落盘留痕的开发者。

套件
dsh-codex-peer
相容性
待驗證
版本
0.3.4
授權
MIT
最近更新
2026年10月9日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wuanthony397-hash/dsh-codex-peer

Configuration

Configuration lives in the profile's cordis.patch.yml. The tools have no hardcoded paths, models, or policies. A patch row replaces the whole config block of that id, so state it completely:

- insert:
    - id: codex-peer
      name: 'dsh-codex-peer'
      config:
        defaultMode: implement
        requireApproval: mutating
        model: ''                 # empty = Codex's own default from config.toml
        runTimeoutMs: 3600000
FieldDefaultMeaning
codexPath''Explicit Codex executable. Highest-priority discovery candidate.
codexHome''CODEX_HOME for the child (Codex's own state root, including auth.json). Empty = inherit.
stateDir''Where runs and the ledger live. Empty = $DSH_HOME/codex-peer.
model''codex exec -m override. Empty = Codex's configured default.
defaultModeaskMode for codex_ask calls that omit mode.
defaultSandbox''Sandbox for calls that omit sandbox; empty derives it from the mode (implement → workspace-write, otherwise read-only).
requireApprovalmutatingmutating: ask before a run that may write. always: ask before every peer call. never: no gate. A codex_plan call is always asked for once unless never.
callTimeoutMs600000How long a foreground call waits before it is promoted to a background job.
runTimeoutMs1800000Hard ceiling for one Codex run; the process tree is terminated when it is hit.
maxAnswerBytes120000Answer budget returned to the model; the full message stays in answer.md.
progressKeepLines400Progress lines kept in memory for job_output and failure notes.
terminateGraceMs5000Termination grace (managed seam SIGTERM→SIGKILL window; tree-kill window for a direct launch).
extraArgs[]Extra arguments appended to every codex exec invocation.
promptPreamble''Replaces the built-in peer-contract preamble that is prepended to every prompt.
planFile''Optional repository-relative path for a markdown mirror of the work list, for example .codex-peer/PLAN.md. Empty writes no file, because tasks.json in the state directory stays the single source of truth.
routingRulesthe shipped routing tableArray of {when, owner, reason}; when is a lower-case word or phrase matched against a task's title, tags and scope, first match wins.
defaultOwnerdshOwner when no routing rule matches.
maxCodexRunsPerTask5How many Codex runs one task may spend before a task-scoped run is refused. Raise it per task with codex_task action:set-budget.
maxCodexTokensPerTask2000000How many Codex tokens one task may spend before a task-scoped run is refused; 0 disables the token ceiling.
approvePerTasktrueWith true, approving a plan covers that task's mutating Codex runs, so they are not asked one by one. false restores per-run asking.
workspaceDir (new).codex-peerPath, relative to the run's working directory, where the readable mirror is written (see Where everything is written). An empty string disables the workspace mirror entirely.

The routing table is plain data (routingRules): each {when, owner, reason} matches a lower-case word or phrase against a task's title, tags and scope, first match wins. The shipped rules send bulk/rename/migrate/review/audit/second-opinion/survey/summarize/draft to codex, and debug/interactive/plugin/install/verify/integration/decision to dsh, each with a one-line reason. defaultOwner (default dsh) takes whatever no rule matches.