跳过主要内容
C

dsh-rea

chrischjh/dsh-rea

把 rea-agents 的 MCP 服务器经支持版本 Node 的启动器接入 DSH,新增约 274 个 mcp__rea__* 工具、reverse-engineer-anything skill、就绪自检与更新兼容检查。

安装

dsh plugin --profile web add github:chrischjh/dsh-rea

README

dsh-rea

REA — Reverse Engineer Anything — for DeepSeek Harness. This bundle bridges REA's stdio MCP server into DSH, ships its reverse-engineer-anything skill, and adds a read-only readiness check.

REA answers questions about shipped artifacts — a native binary, an Electron/JavaScript bundle, a .NET assembly, an APK, firmware, a recorded web session — by inspecting them locally and returning code plus evidence. It is not a source-repository tool; ordinary source analysis needs no REA.

Install

In DeepSeek Harness: 设置 → 插件 → 安装,填入 @chrischjh/dsh-rea、 GitHub spec github:chrischjh/dsh-rea,或直接选择本地目录。安装会写入两个补丁行:本包 + @deepseek-ai/dsh-mcp-client 桥接行; 重启 DSH 后 mcp__rea__* 工具出现在每个会话里。

市场发布要求、CI 与发布流程见 CHANGELOG 与 .github/workflows/。

What it adds

ContributionRowNotes
mcp__rea__* tools (~274)dsh-rea-mcp (macOS/Linux), dsh-rea-mcp-windowsfull MCP catalog bridged through @deepseek-ai/dsh-mcp-client; each row is disabled on the other platform, so serverName: rea is claimed exactly once
reverse-engineer-anything skilldsh-reavendored verbatim from rea-agents@6.10.1, pinned by skills.lock.json
workflow prompt sectiondsh-rea"shipped artifact ⇒ skill + tools, not recall"
rea_status tooldsh-reaself-check: skill + lock drift, bridged tools, launcher runtime plan, rea doctor providers, REA's own rea mcp doctor adapter check, duplicate registrations
rea_update_check tooldsh-realatest published REA vs this bundle's contract, with a compatible / incompatible / unknown verdict
detail-page paneldsh-reaboth reports behind buttons in Plugins → dsh-rea (/rea/status, /rea/update-check)

The two rows switch independently: disabling dsh-rea-mcp keeps the skill, the prompt guidance and the readiness report, and no MCP tools or process.

Requirements

  • REA, installed globally or cached by npx: npm install -g rea-agents@6.10.1 (or run npx rea-agents@6.10.1 --version once).
  • Node.js 22.23.4+, 24.22.1+ or 26.12.1+ for REA itself. This is REA's own floor; DSH's embedded Node (24.21.0 in DSH 0.2.2-rc.5) is below it, and so is any older node on PATH.
  • A deep-analysis provider only for native pseudocode: an existing Hopper, Ghidra, IDA or Kuna installation. Static JavaScript/.NET, artifact, application and session tools work without one. This bundle installs no engine and no other software — REA's own rule, and ours.

Why a bootstrap and a launcher

The patch contains no machine-specific paths (it ships to the plugin market), and the loader only applies !!js expressions to row metadata — not to this row's config — so command must be a literal that works on any machine. No such literal exists (/usr/bin/env is POSIX-only; node resolves from a PATH a Finder-launched macOS app does not have), which is why the two platform rows exist. On macOS/Linux the row runs /bin/sh -c with a bootstrap that finds any Node ≥ 18 (PATH, Homebrew, /usr/local, /usr/bin, nvm) and the bundle's own launcher under ~/.dsh/profiles/*/node_modules/dsh-rea/bin/; on Windows the row runs node -e with a JS bootstrap doing the same search under %USERPROFILE%\.dsh\profiles. The bootstrap then runs bin/launcher.mjs, which:

  1. runs on any Node ≥ 18 (it only does filesystem and process work),
  2. finds a release REA accepts — REA_NODE, then PATH, then Homebrew kegs, nvm/fnm/volta/asdf roots, DSH's own portable runtimes, and the standard installer directories,
  3. finds a rea-agents install — REA_ENTRY, the selected Node's prefix, global npm/bun/pnpm roots, then the npx cache,
  4. execs <node> <rea.mjs> mcp and proxies stdio byte-for-byte,
  5. prints the exact stop reason to stderr when either step fails.

MCP over stdio is newline-delimited JSON, so a transparent proxy is protocol-correct; the launcher writes nothing to stdout itself.

Configuration

The row environment is the whole knob panel; add keys to the env of the active platform row (dsh-rea-mcp on macOS/Linux, dsh-rea-mcp-windows on Windows) in $DSH_HOME/cordis.patch.yml (a later layer replaces config wholesale, so restate every field you keep).

VariableEffect
REA_NODEAbsolute Node.js executable to use. An unsupported choice is reported, not silently replaced.
REA_ENTRYAbsolute <rea-agents>/scripts/rea.mjs; overrides discovery.
REA_MCP_TOOL_FAMILIESAdvertise fewer tool families, e.g. direct,session,javascript-runtime,application. Trims ~70 KB of schemas from every request.
REA_MCP_TOOL_CATALOG_PROFILEfull (default) or hot-cold. Keep full on DSH 0.2.x: REA documents that a tool discovered after tools/list refresh was not offered on the next model request on this harness generation.
REA_LOG_LEVELREA's stderr verbosity (forwarded to the Host log).

Defaults set by the patch: toolCallTimeoutMs: 450000 (REA's own 330-second Ghidra startup plus 120 seconds of headroom), startupTimeoutMs: 30000, failOnStartupError: false.

Self-check (rea_status)

Ask the agent to call rea_status, or open Plugins → dsh-rea → REA self-check & updates and press Run self-check. Both report the same facts:

  • whether the reverse-engineer-anything skill is registered, discovery completed, and the vendored files still match skills.lock.json;
  • how many mcp__rea__* tools DSH currently has registered;
  • the Node release and REA install the launcher would use;
  • is the MCP server actually running: REA's own rea mcp doctor — adapter startup, protocol, tool/prompt inventory against the build-time catalog, and one real target-free request — plus rea doctor for providers and catalog;
  • a duplicate rea registration if rea setup --client dsh wrote one.

Healthy means every one of those facts is good, not just that files exist.

Update and compatibility check (rea_update_check)

Check updates fetches the latest manifest from registry.npmjs.org (one small request; no download, no install) and judges it against this bundle's contract:

  1. Node requirement — the release's engines.node range is evaluated against every Node release found on this machine (a newer REA may accept releases the installed one rejects);
  2. skill pin — the vendored skill's pinned release vs the latest; stale is an advisory with the exact scripts/sync-skill.mjs command, not a blocker;
  3. installed vs latest — update available or current.

The verdict is compatible, incompatible (only for real blockers, such as a Node requirement nothing here satisfies), or unknown — used when the registry is unreachable or a range clause cannot be evaluated. Facts that cannot be verified without downloading the release (entry path, doctor subcommands) are stated as assumptions to re-verify with rea_status, never silently assumed.

rea_status is not a repair

The report is read-only by design: repairing an MCP row mutates the profile, and DSH asks for an explicit user action before that. The fixes it prints are the ones a human should take — install a supported Node, install REA, remove a duplicate row, restart the row in Plugins.

About the two MCP rows

dsh-rea-mcp and dsh-rea-mcp-windows carry the identical connection for the two platforms; the disabled: !!js process.platform … predicate keeps exactly one active per machine. They are separate rows so the platform choice survives without machine-specific paths in a market-distributed patch. Non-default DSH_HOME locations are not searched by the bootstrap: add REA_ENTRY to the active row's env in that case.

Do not also run rea setup --client dsh

REA's setup writes its own rea-mcp row into $DSH_HOME/cordis.patch.yml with serverName: rea. Two rows cannot own one server name: the later one fails to load. Use this bundle or REA's setup, not both. rea_status reports the collision with the offending row id and path.

Limits

  • The tool catalog is large by nature. Narrow it with REA_MCP_TOOL_FAMILIES when a session does not need every family.
  • Native analysis inherits every REA provider constraint (licensing, startup time, platform support). See REA's supported targets.
  • Tool results carry target content. REA marks untrusted results and its server instructions repeat the rule; DSH shows the same text unchanged.
  • The skill is a pinned copy. A newer rea-agents may describe capabilities this copy does not; run node scripts/sync-skill.mjs <rea-agents> to refresh it.

Layout

index.js              Host: skills, prompt section, rea_status, /rea/status
client.js             Plugins detail-page section (zh/en)
lib/discovery.js      Node + REA install discovery, launcher plan
lib/install-paths.js  per-platform install locations
lib/skills.js         vendored skill registration + DSH addendum
lib/status.js         readiness collection and rendering
lib/registration-scan.js  duplicate `serverName: rea` detection
lib/tool.js           rea_status definition and output schema
lib/doctor.js         `rea doctor --json` run + projection
lib/registration-scan.js  duplicate `serverName: rea` detection
skills/               vendored reverse-engineer-anything (byte-identical)
skills.lock.json      sha256 of every vendored file + upstream version
scripts/sync-skill.mjs  re-vendor from an installed rea-agents
docs/rea-research.md  research findings and design rationale
tests/                node --test suites

Development

node --test tests/*.test.js     # 36 tests, no network, no REA required
/bin/sh -c 'exec "$(command -v node || echo /opt/homebrew/bin/node)" bin/launcher.mjs --check'  # the POSIX row's bootstrap, verbatim
npm pack --dry-run              # tarball contents
node bin/launcher.mjs --check   # the launcher's plan as JSON

License

MIT. skills/reverse-engineer-anything/ is vendored from rea-agents@6.10.1 (MIT); see NOTICE. REA is a separate project — see its disclaimer before analyzing software you do not own or are not authorized to examine.

相关插件