dsh-reverse-engine 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +4 -1
- package/README.zh-CN.md +4 -1
- package/USAGE.md +327 -0
- package/client.js +156 -7
- package/docs/CONTRACT.md +1 -1
- package/docs/VERIFICATION.md +9 -7
- package/docs/images/usage/clients.png +0 -0
- package/docs/images/usage/logs.png +0 -0
- package/docs/images/usage/overview.webp +0 -0
- package/docs/images/usage/settings-advanced.png +0 -0
- package/docs/images/usage/settings-runtime.png +0 -0
- package/docs/images/usage/tools.png +0 -0
- package/docs/images/usage/workflows.png +0 -0
- package/lib/provider-guides.json +502 -0
- package/lib/service.js +4 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2 — 2026-12-04
|
|
4
|
+
|
|
5
|
+
- Add `USAGE.md`: a bilingual, screenshot-led walkthrough of every sidebar tab
|
|
6
|
+
(Overview, Tools, Clients, Workflows, Settings, Logs), the first-investigation
|
|
7
|
+
recipe, and common problems, with English and Simplified Chinese sections and
|
|
8
|
+
a language switch.
|
|
9
|
+
- Link the usage guide from both READMEs and include it in the npm package.
|
|
10
|
+
|
|
11
|
+
## 0.1.1 — 2026-12-04
|
|
12
|
+
|
|
13
|
+
- Fix primary button contrast: button ink now uses the theme's inverted label
|
|
14
|
+
token, so white-on-white buttons in the dark theme are readable.
|
|
15
|
+
- Fix page scrolling: the console fills the main panel and scrolls vertically,
|
|
16
|
+
so long Settings, Clients, and provider-guide content is reachable.
|
|
17
|
+
- Add an installation guide for every native engine (Ghidra, IDA, Hopper, Kuna)
|
|
18
|
+
with Windows, macOS, and Linux tabs, bilingual steps, copyable commands and
|
|
19
|
+
registration snippets, environment requirements, verification, and limits.
|
|
20
|
+
- Expose the guides from `GET /api/rea/providers` and cover them with 33 tests.
|
|
21
|
+
|
|
3
22
|
## 0.1.0 — 2026-12-04
|
|
4
23
|
|
|
5
24
|
- First release.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# dsh-reverse-engine
|
|
2
2
|
|
|
3
|
+
[Usage guide](USAGE.md) · [中文使用指南](USAGE.md#简体中文) · [Architecture](docs/ARCHITECTURE.md) · [HTTP contract](docs/CONTRACT.md)
|
|
4
|
+
|
|
3
5
|
REA (**Reverse Engineer Anything**) for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):
|
|
4
6
|
a sidebar console and an agent tool bridge for local reverse engineering.
|
|
5
7
|
|
|
@@ -8,7 +10,8 @@ The plugin owns one local [REA](https://github.com/morluto/rea) engine
|
|
|
8
10
|
|
|
9
11
|
- **Sidebar console** — engine and Node.js runtime status, the complete
|
|
10
12
|
274-tool catalog with a runnable JSON editor, REA's six guided workflows,
|
|
11
|
-
analysis-provider readiness
|
|
13
|
+
analysis-provider readiness with per-engine Windows/macOS/Linux installation
|
|
14
|
+
guides, and the live engine log.
|
|
12
15
|
- **DeepSeek Harness tools** — `rea_tools`, `rea_call`, `rea_status`,
|
|
13
16
|
`rea_workflow`, plus the 11 core REA tools under their canonical names
|
|
14
17
|
(`binary_session`, `open_binary`, `inspect_artifact`, `analyze_function`, …).
|
package/README.zh-CN.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# dsh-reverse-engine
|
|
2
2
|
|
|
3
|
+
[使用指南](USAGE.md#简体中文) · [English usage](USAGE.md#english) · [架构](docs/ARCHITECTURE.md) · [HTTP 接口](docs/CONTRACT.md)
|
|
4
|
+
|
|
3
5
|
把 [REA](https://github.com/morluto/rea)(Reverse Engineer Anything)接入
|
|
4
6
|
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):
|
|
5
7
|
侧边栏控制台 + Agent 工具桥,用于本机逆向分析。
|
|
@@ -7,7 +9,8 @@
|
|
|
7
9
|
插件拥有一个本地 REA 引擎(`rea-agents`,MIT 许可),并通过三种方式使用:
|
|
8
10
|
|
|
9
11
|
- **侧边栏控制台**:引擎与 Node.js 运行时状态、完整 274 个工具的目录与可执行
|
|
10
|
-
JSON 参数编辑、6
|
|
12
|
+
JSON 参数编辑、6 个引导式工作流、分析引擎就绪情况与 Windows/macOS/Linux
|
|
13
|
+
逐平台安装教程、实时日志。
|
|
11
14
|
- **DeepSeek Harness 工具**:`rea_tools`、`rea_call`、`rea_status`、
|
|
12
15
|
`rea_workflow`,以及 11 个核心 REA 工具的原名注册
|
|
13
16
|
(`binary_session`、`open_binary`、`inspect_artifact`、`analyze_function` 等)。
|
package/USAGE.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# dsh-reverse-engine usage guide
|
|
2
|
+
|
|
3
|
+
**English** · [简体中文](#简体中文) · [README](README.md) · [中文 README](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
This guide walks through every tab of the **Reverse engineering** panel and the
|
|
6
|
+
smallest workflow that produces real evidence. Screenshots were taken on
|
|
7
|
+
Windows in the dark theme; the layout follows the current theme.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## English
|
|
12
|
+
|
|
13
|
+
### Before you start
|
|
14
|
+
|
|
15
|
+
1. Install the bundle and enable it in **Plugins**.
|
|
16
|
+
2. Refresh the DSH window once (or restart the app), then open **Reverse
|
|
17
|
+
engineering** in the left sidebar. The label is localized: `Reverse
|
|
18
|
+
engineering` in English and `逆向工程` in Chinese.
|
|
19
|
+
3. Open **Overview** and confirm the engine card says **Running**. If it says
|
|
20
|
+
`runtime-missing`, install the runtime from this page or set the paths under
|
|
21
|
+
**Settings**. The engine needs Node.js 22.23.4+, 24.22.1+, or 26.12.1+; the
|
|
22
|
+
Node.js inside DSH Desktop is older on some releases, so the plugin prefers a
|
|
23
|
+
system Node.js and shows which one it found.
|
|
24
|
+
|
|
25
|
+
### 1. Overview
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
The overview is the health dashboard.
|
|
30
|
+
|
|
31
|
+
| Area | What it tells you | What you can do |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| Runtime cards | Engine state and REA version, tool count, Node.js version and path, registered/detected agent clients, skill state, current tool exposure and its schema cost | Use **Refresh** to re-read state; **Restart engine** to reload the REA process |
|
|
34
|
+
| Runtime details | `rea-agents` version and source (dependency, installed runtime, or custom path), data directory, and the exact MCP command other agents should launch | Copy the MCP command into another client |
|
|
35
|
+
| Analysis providers | Ghidra, Hopper, IDA, and Kuna readiness, with the precise reason and remediation | Select **Check** to probe; select **Installation guide** for the selected engine |
|
|
36
|
+
| Installation guide | Windows, macOS, and Linux tabs, bilingual steps, copyable commands, registration snippets, verification, and limits | Copy commands or the registration JSON; follow the official or REA documentation links |
|
|
37
|
+
| Recent calls | Last tool calls with status and duration | Use **Logs** for the full history |
|
|
38
|
+
| Engine log | Structured engine events and the latest messages | Use **Logs** for stderr and paged events |
|
|
39
|
+
|
|
40
|
+
A provider marked `unsupported_host` means REA does not support that engine on
|
|
41
|
+
this operating system (Hopper on Windows, for example). It is not a plugin bug;
|
|
42
|
+
use another provider. A guide is still available and explains the alternative.
|
|
43
|
+
|
|
44
|
+
### 2. Tools
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
This tab is the complete REA catalog: 274 operations, grouped into 19 families.
|
|
49
|
+
|
|
50
|
+
1. Search by tool name or description, or narrow the list with the family
|
|
51
|
+
selector. The counter under the selector shows how many tools match.
|
|
52
|
+
2. Select a tool. The right pane shows its description, risk hints, collapsible
|
|
53
|
+
input schema, and a JSON argument editor pre-filled with a schema-derived
|
|
54
|
+
sample.
|
|
55
|
+
3. Edit the JSON. Use **Fill example** to regenerate the sample, **Clear** to
|
|
56
|
+
start from `{}`, and **Run** to execute.
|
|
57
|
+
4. Read the result under **Execution result**. Canonical Evidence is returned as
|
|
58
|
+
structured content; copy it or page it later with `inspect_analysis_view`.
|
|
59
|
+
5. Use **Copy rea_call example** or **Copy CLI command** to reproduce the same
|
|
60
|
+
call from an agent or a terminal.
|
|
61
|
+
|
|
62
|
+
Cold native analysis can take minutes. Ghidra allows up to 330 seconds for its
|
|
63
|
+
first import by default; the button stays busy and the plugin keeps the call
|
|
64
|
+
alive up to the configured 450-second tool deadline.
|
|
65
|
+
|
|
66
|
+
Start with `binary_session` and `{}` to verify the engine without a target, then
|
|
67
|
+
open a target and move to `inspect_artifact`, `analyze_function`, or
|
|
68
|
+
`analyze_javascript_application`.
|
|
69
|
+
|
|
70
|
+
### 3. Clients
|
|
71
|
+
|
|
72
|
+

|
|
73
|
+
|
|
74
|
+
This tab registers the same local REA engine with agents from other vendors.
|
|
75
|
+
|
|
76
|
+
- **REA skill**: shows whether `reverse-engineer-anything` is installed and its
|
|
77
|
+
version. **Install / refresh skill** runs `rea setup --skill` and writes the
|
|
78
|
+
workflow under `~/.agents/skills` (or `$DSH_AGENTS_HOME/skills`).
|
|
79
|
+
- **Detect again** refreshes `rea doctor` state. **Register every detected
|
|
80
|
+
client** runs `rea setup --all-detected` and previews each client in turn.
|
|
81
|
+
- Each row shows the client id, registration state (`Not registered`, `Not
|
|
82
|
+
detected`, `Needs refresh`, `Invalid`), and the configuration path.
|
|
83
|
+
- **Preview changes** runs `rea setup --dry-run` and shows the exact plan,
|
|
84
|
+
including backup paths. **Register** applies `rea setup --client <id>`; REA
|
|
85
|
+
backs up and merges the file instead of replacing it.
|
|
86
|
+
- DeepSeek Harness is marked **Provided by this plugin**: its tools come from
|
|
87
|
+
this bundle directly, so an extra `mcp__rea__` registration would duplicate
|
|
88
|
+
the engine.
|
|
89
|
+
|
|
90
|
+
Only register clients you actually use. Each registration launches its own REA
|
|
91
|
+
process, and REA sessions are stateful.
|
|
92
|
+
|
|
93
|
+
### 4. Workflows
|
|
94
|
+
|
|
95
|
+

|
|
96
|
+
|
|
97
|
+
REA ships six guided investigation recipes: `investigate_feature`,
|
|
98
|
+
`compare_application_versions`, `verify_reconstruction`, `trace_crash`,
|
|
99
|
+
`audit_residual_unknowns`, and `prepare_bounded_process_capture`.
|
|
100
|
+
|
|
101
|
+
1. Pick a workflow on the left.
|
|
102
|
+
2. Read its description and declared arguments. Required arguments are marked
|
|
103
|
+
with `*`.
|
|
104
|
+
3. Enter the JSON arguments (for example `{"feature": "search"}`) and select
|
|
105
|
+
**Generate workflow**.
|
|
106
|
+
4. Copy the rendered Markdown into the session and follow it step by step.
|
|
107
|
+
|
|
108
|
+
The generated text is a plan, not an execution: it tells the agent which tools
|
|
109
|
+
to call and how to preserve Evidence and unknowns.
|
|
110
|
+
|
|
111
|
+
### 5. Settings
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+

|
|
116
|
+
|
|
117
|
+
- **Runtime paths**: `rea-agents` package path and Node.js executable. Leave both
|
|
118
|
+
empty to auto-detect the plugin dependency, the data-directory runtime, or a
|
|
119
|
+
global npm install. A custom path is useful for testing a specific release.
|
|
120
|
+
- **Tool exposure**:
|
|
121
|
+
- `Core tools (recommended)` registers 11 first-hop tools plus the four
|
|
122
|
+
dispatchers; every other operation stays reachable through `rea_tools` and
|
|
123
|
+
`rea_call`.
|
|
124
|
+
- `Selected families` registers every tool in the chosen families.
|
|
125
|
+
- `All 274 tools` puts the complete schema set into every request. It costs
|
|
126
|
+
roughly 100k tokens; use it only when the task needs broad native discovery.
|
|
127
|
+
- **Timeouts**: per tool call (default 450000 ms) and startup/catalog reads
|
|
128
|
+
(default 120000 ms).
|
|
129
|
+
- **Start the engine when the plugin loads**: turn it off to start manually from
|
|
130
|
+
Overview.
|
|
131
|
+
- **HTTP MCP endpoint**: for agents that cannot spawn a stdio child. It has no
|
|
132
|
+
authentication, listens on `127.0.0.1` by default, and serves one stateful
|
|
133
|
+
client at a time. Change the host only on a trusted network.
|
|
134
|
+
- **Analysis provider environment**: one `KEY=VALUE` per line. The allow-list
|
|
135
|
+
covers `REA_*`, `GHIDRA_INSTALL_DIR`, `HOPPER_LAUNCHER_PATH`, `JAVA_HOME`, and
|
|
136
|
+
provider path variables. These values are passed to the engine process.
|
|
137
|
+
- **Save** applies the settings; runtime or exposure changes restart or
|
|
138
|
+
re-register the engine tools.
|
|
139
|
+
|
|
140
|
+
### 6. Logs
|
|
141
|
+
|
|
142
|
+

|
|
143
|
+
|
|
144
|
+
- **Tool calls**: time, tool, status, and duration for recent MCP calls.
|
|
145
|
+
- **Engine events**: structured JSON log lines from the REA process, including
|
|
146
|
+
tool completion and status.
|
|
147
|
+
- **stderr**: raw engine stderr, useful when a provider fails before it can emit
|
|
148
|
+
a structured event.
|
|
149
|
+
- **Refresh** re-reads the buffer; **Copy logs** copies all three sections for a
|
|
150
|
+
bug report.
|
|
151
|
+
|
|
152
|
+
### A first investigation
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
1. Overview: confirm the engine is Running and the provider you want is available.
|
|
156
|
+
2. Tools: run binary_session with {} to verify the engine.
|
|
157
|
+
3. Tools: run open_binary with {"path": "D:\\apps\\example\\resources\\app.asar"}.
|
|
158
|
+
4. Tools: run inspect_artifact with {"path": "...", "detail": "summary"}.
|
|
159
|
+
5. Tools: filter for analyze_* or use rea_tools in an agent session.
|
|
160
|
+
6. Tools: run get_evidence_bundle or inspect_analysis_view to page the retained Evidence.
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Common problems
|
|
164
|
+
|
|
165
|
+
| Symptom | Fix |
|
|
166
|
+
|---|---|
|
|
167
|
+
| `runtime-missing` | Install the REA runtime from Overview, or set the package/Node path under Settings |
|
|
168
|
+
| `Node.js ... is not supported` | Point Settings → Node.js executable at a supported system Node.js |
|
|
169
|
+
| Engine stays `Starting` for a long time | Check Logs → stderr; the first Ghidra import can take minutes |
|
|
170
|
+
| A provider is `not_configured` | Open its Installation guide and set the required environment variables |
|
|
171
|
+
| A client register fails | Use Preview changes first; the plan names the target file and the backup |
|
|
172
|
+
| Sidebar entry is missing | Refresh the DSH window; the client bundle loads at boot |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 简体中文
|
|
177
|
+
|
|
178
|
+
### 开始之前
|
|
179
|
+
|
|
180
|
+
1. 在 **插件** 中安装并启用本 bundle。
|
|
181
|
+
2. 刷新一次 DSH 窗口(或重启应用),然后打开左侧边栏的 **逆向工程**。
|
|
182
|
+
英文界面显示为 `Reverse engineering`。
|
|
183
|
+
3. 打开 **概览**,确认引擎卡片显示 **运行中**。若显示 `runtime-missing`,
|
|
184
|
+
在该页安装运行时,或在 **设置** 中填写路径。REA 需要 Node.js 22.23.4+ /
|
|
185
|
+
24.22.1+ / 26.12.1+;DSH 桌面内置的 Node 版本可能偏低,所以插件优先使用
|
|
186
|
+
系统 Node.js,并显示实际使用的是哪一个。
|
|
187
|
+
|
|
188
|
+
### 1. 概览
|
|
189
|
+
|
|
190
|
+

|
|
191
|
+
|
|
192
|
+
概览页是健康状态面板。
|
|
193
|
+
|
|
194
|
+
| 区域 | 说明 | 可执行操作 |
|
|
195
|
+
|---|---|---|
|
|
196
|
+
| 运行时卡片 | 引擎状态与 REA 版本、工具数量、Node.js 版本与路径、已注册/已检测的 Agent 客户端、技能状态、当前工具暴露范围及其 schema 成本 | **刷新** 重新读取;**重启引擎** 重载 REA 进程 |
|
|
197
|
+
| 运行时详情 | `rea-agents` 版本与来源(依赖、已安装运行时或自定义路径)、数据目录、供其他 Agent 启动的完整 MCP 命令 | 复制 MCP 命令到其他客户端 |
|
|
198
|
+
| 分析引擎 | Ghidra、Hopper、IDA、Kuna 的就绪状态、具体原因与修复建议 | **检查** 重新探测;**安装教程** 查看对应引擎教程 |
|
|
199
|
+
| 安装教程 | Windows / macOS / Linux 页签,中英双语步骤、可复制命令、注册示例、验证方式与限制 | 复制命令或注册 JSON;打开官方或 REA 文档 |
|
|
200
|
+
| 最近调用 | 最近工具调用的状态与耗时 | 到 **日志** 查看完整记录 |
|
|
201
|
+
| 引擎日志 | 结构化引擎事件与最新消息 | 到 **日志** 查看 stderr 与分页事件 |
|
|
202
|
+
|
|
203
|
+
`unsupported_host` 表示 REA 在当前操作系统不支持该引擎(例如 Windows 上的
|
|
204
|
+
Hopper),不是插件故障,请改用其他引擎;安装教程里也给出了替代方案。
|
|
205
|
+
|
|
206
|
+
### 2. 工具
|
|
207
|
+
|
|
208
|
+

|
|
209
|
+
|
|
210
|
+
此页是完整的 REA 工具目录:274 个操作、19 个工具族。
|
|
211
|
+
|
|
212
|
+
1. 按工具名或描述搜索,或用工具族下拉框过滤;下方计数显示匹配数量。
|
|
213
|
+
2. 选择工具。右侧显示描述、风险提示、可展开的输入 schema,以及按 schema
|
|
214
|
+
生成的 JSON 参数示例。
|
|
215
|
+
3. 编辑 JSON。**填入示例** 重新生成示例,**清空** 从 `{}` 开始,**执行**
|
|
216
|
+
调用工具。
|
|
217
|
+
4. 在 **执行结果** 查看返回。规范 Evidence 以结构化内容返回,可复制,也可
|
|
218
|
+
之后用 `inspect_analysis_view` 分页读取。
|
|
219
|
+
5. **复制 rea_call 示例** 或 **复制 CLI 命令**,在 Agent 或终端中复现同一调用。
|
|
220
|
+
|
|
221
|
+
原生分析首次导入可能较慢。Ghidra 默认最长 330 秒;按钮会保持等待,插件按
|
|
222
|
+
配置的 450 秒工具超时保持调用。
|
|
223
|
+
|
|
224
|
+
建议先用 `binary_session` 和 `{}` 在不指定目标的情况下验证引擎,再打开目标,
|
|
225
|
+
使用 `inspect_artifact`、`analyze_function` 或 `analyze_javascript_application`。
|
|
226
|
+
|
|
227
|
+
### 3. 客户端
|
|
228
|
+
|
|
229
|
+

|
|
230
|
+
|
|
231
|
+
此页把同一个本地 REA 引擎注册到其他厂商的 Agent。
|
|
232
|
+
|
|
233
|
+
- **REA 技能**:显示 `reverse-engineer-anything` 是否安装及版本。
|
|
234
|
+
**安装 / 刷新技能** 执行 `rea setup --skill`,把工作流写入
|
|
235
|
+
`~/.agents/skills`(或 `$DSH_AGENTS_HOME/skills`)。
|
|
236
|
+
- **重新检测** 刷新 `rea doctor` 状态;**为已检测到的客户端注册** 执行
|
|
237
|
+
`rea setup --all-detected`,逐个预览并写入。
|
|
238
|
+
- 每行显示客户端 id、注册状态(`未注册` / `未检测到` / `需要刷新` /
|
|
239
|
+
`配置失效`)和配置文件路径。
|
|
240
|
+
- **预览变更** 执行 `rea setup --dry-run`,显示完整计划(含备份路径);
|
|
241
|
+
**注册** 执行 `rea setup --client <id>`,REA 会备份并合并配置,不会覆盖
|
|
242
|
+
其他设置。
|
|
243
|
+
- DeepSeek Harness 标记为 **本插件已提供**:它的工具由本 bundle 直接注册,
|
|
244
|
+
再加一个 `mcp__rea__` 注册会重复启动引擎。
|
|
245
|
+
|
|
246
|
+
只注册实际使用的客户端。每个注册都会启动自己的 REA 进程,而 REA 会话是
|
|
247
|
+
有状态的。
|
|
248
|
+
|
|
249
|
+
### 4. 工作流
|
|
250
|
+
|
|
251
|
+

|
|
252
|
+
|
|
253
|
+
REA 内置 6 个引导式调查流程:`investigate_feature`、
|
|
254
|
+
`compare_application_versions`、`verify_reconstruction`、`trace_crash`、
|
|
255
|
+
`audit_residual_unknowns`、`prepare_bounded_process_capture`。
|
|
256
|
+
|
|
257
|
+
1. 在左侧选择工作流。
|
|
258
|
+
2. 阅读描述与参数说明,必填参数标有 `*`。
|
|
259
|
+
3. 输入 JSON 参数(例如 `{"feature": "search"}`),点 **生成工作流**。
|
|
260
|
+
4. 把生成的 Markdown 复制到会话中,按步骤执行。
|
|
261
|
+
|
|
262
|
+
生成的内容是计划而非自动执行:它告诉 Agent 该调用哪些工具,以及如何保留
|
|
263
|
+
Evidence 与未知项。
|
|
264
|
+
|
|
265
|
+
### 5. 设置
|
|
266
|
+
|
|
267
|
+

|
|
268
|
+
|
|
269
|
+

|
|
270
|
+
|
|
271
|
+
- **运行时路径**:`rea-agents` 包路径与 Node.js 可执行文件。两项都留空时
|
|
272
|
+
自动查找插件依赖、数据目录运行时或全局 npm 安装。自定义路径适合测试
|
|
273
|
+
特定版本。
|
|
274
|
+
- **工具暴露**:
|
|
275
|
+
- `核心工具(推荐)` 直接注册 11 个首跳工具和 4 个调度工具,其余操作通过
|
|
276
|
+
`rea_tools` / `rea_call` 访问。
|
|
277
|
+
- `按工具族` 注册所选工具族中的全部工具。
|
|
278
|
+
- `全部 274 个工具` 会让全部 schema 进入每次请求,约消耗 10 万 tokens;
|
|
279
|
+
仅在确实需要广泛原生发现时使用。
|
|
280
|
+
- **超时**:单次工具调用(默认 450000 毫秒)与启动/目录读取
|
|
281
|
+
(默认 120000 毫秒)。
|
|
282
|
+
- **加载插件时自动启动引擎**:关闭后可手动在概览页启动。
|
|
283
|
+
- **HTTP MCP 端点**:供无法启动 stdio 子进程的 Agent 使用。端点无认证,
|
|
284
|
+
默认监听 `127.0.0.1`,一次只服务一个有状态客户端。仅在可信网络中修改
|
|
285
|
+
监听地址。
|
|
286
|
+
- **分析引擎环境变量**:每行 `KEY=VALUE`,只接受 `REA_*`、
|
|
287
|
+
`GHIDRA_INSTALL_DIR`、`HOPPER_LAUNCHER_PATH`、`JAVA_HOME` 及引擎路径变量。
|
|
288
|
+
这些值会传给引擎进程。
|
|
289
|
+
- **保存** 应用设置;运行时或暴露范围变化会重启引擎或重新注册工具。
|
|
290
|
+
|
|
291
|
+
### 6. 日志
|
|
292
|
+
|
|
293
|
+

|
|
294
|
+
|
|
295
|
+
- **调用记录**:最近 MCP 调用的时间、工具、状态与耗时。
|
|
296
|
+
- **引擎事件**:REA 进程的结构化 JSON 日志,包括工具完成与状态。
|
|
297
|
+
- **stderr**:原始引擎 stderr,适用于引擎在输出结构化事件前就失败的场景。
|
|
298
|
+
- **刷新** 重新读取缓冲区;**复制日志** 复制三部分内容用于反馈问题。
|
|
299
|
+
|
|
300
|
+
### 一次完整调查
|
|
301
|
+
|
|
302
|
+
```text
|
|
303
|
+
1. 概览:确认引擎“运行中”,目标分析引擎可用。
|
|
304
|
+
2. 工具:binary_session + {} 验证引擎。
|
|
305
|
+
3. 工具:open_binary,参数 {"path": "D:\\apps\\example\\resources\\app.asar"}。
|
|
306
|
+
4. 工具:inspect_artifact,参数 {"path": "...", "detail": "summary"}。
|
|
307
|
+
5. 工具:筛选 analyze_*,或在 Agent 会话中使用 rea_tools。
|
|
308
|
+
6. 工具:get_evidence_bundle 或 inspect_analysis_view 分页读取保留的 Evidence。
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### 常见问题
|
|
312
|
+
|
|
313
|
+
| 现象 | 处理 |
|
|
314
|
+
|---|---|
|
|
315
|
+
| `runtime-missing` | 在概览页安装 REA 运行时,或在设置中填写包/Node 路径 |
|
|
316
|
+
| `Node.js ... is not supported` | 把设置中的 Node.js 可执行文件指向受支持的系统 Node.js |
|
|
317
|
+
| 引擎长时间停在 `启动中` | 查看日志 → stderr;首次 Ghidra 导入可能需要数分钟 |
|
|
318
|
+
| 分析引擎为 `not_configured` | 打开对应安装教程,设置所需环境变量 |
|
|
319
|
+
| 客户端注册失败 | 先看“预览变更”,计划里会写明目标文件和备份路径 |
|
|
320
|
+
| 侧边栏没有入口 | 刷新 DSH 窗口;客户端 bundle 在启动时加载 |
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Related documents
|
|
325
|
+
|
|
326
|
+
- [README](README.md) · [中文 README](README.zh-CN.md)
|
|
327
|
+
- [Architecture](docs/ARCHITECTURE.md) · [HTTP and tool contract](docs/CONTRACT.md) · [Verification](docs/VERIFICATION.md)
|
package/client.js
CHANGED
|
@@ -67,6 +67,18 @@ window.__ModuleLoader__.load({
|
|
|
67
67
|
'overview.providers': '分析引擎',
|
|
68
68
|
'overview.providersHint': 'Ghidra、IDA、Hopper、Kuna 由用户自行安装配置;插件只读取就绪状态。',
|
|
69
69
|
'overview.providerEmpty': '点击「检查」读取当前分析引擎就绪情况。',
|
|
70
|
+
'providers.showGuide': '安装教程',
|
|
71
|
+
'providers.hideGuide': '收起教程',
|
|
72
|
+
'providers.guideTitle': '安装与配置教程',
|
|
73
|
+
'providers.steps': '安装步骤',
|
|
74
|
+
'providers.commands': '命令',
|
|
75
|
+
'providers.snippets': '配置示例',
|
|
76
|
+
'providers.verify': '验证',
|
|
77
|
+
'providers.notes': '说明与限制',
|
|
78
|
+
'providers.official': '官方网站',
|
|
79
|
+
'providers.docs': 'REA 文档',
|
|
80
|
+
'providers.env': '需要设置',
|
|
81
|
+
'providers.unsupported': '当前平台不支持该引擎,请按步骤中的替代方案操作。',
|
|
70
82
|
'overview.selected': '当前选择',
|
|
71
83
|
'overview.installRuntime': '安装 REA 运行时',
|
|
72
84
|
'overview.installHint': '当前没有找到 rea-agents 包。安装会把固定版本下载到插件数据目录。',
|
|
@@ -222,6 +234,18 @@ window.__ModuleLoader__.load({
|
|
|
222
234
|
'overview.providers': 'Analysis providers',
|
|
223
235
|
'overview.providersHint': 'Ghidra, IDA, Hopper, and Kuna are installed and configured by the user; the plugin only reports readiness.',
|
|
224
236
|
'overview.providerEmpty': 'Select Check to read the current provider readiness.',
|
|
237
|
+
'providers.showGuide': 'Installation guide',
|
|
238
|
+
'providers.hideGuide': 'Hide guide',
|
|
239
|
+
'providers.guideTitle': 'Install and configure',
|
|
240
|
+
'providers.steps': 'Steps',
|
|
241
|
+
'providers.commands': 'Commands',
|
|
242
|
+
'providers.snippets': 'Configuration',
|
|
243
|
+
'providers.verify': 'Verify',
|
|
244
|
+
'providers.notes': 'Notes and limits',
|
|
245
|
+
'providers.official': 'Official site',
|
|
246
|
+
'providers.docs': 'REA docs',
|
|
247
|
+
'providers.env': 'Environment',
|
|
248
|
+
'providers.unsupported': 'This engine is not supported on this platform; follow the alternative in the steps.',
|
|
225
249
|
'overview.selected': 'Selected',
|
|
226
250
|
'overview.installRuntime': 'Install REA runtime',
|
|
227
251
|
'overview.installHint': 'The rea-agents package was not found. Installing downloads the pinned release into the plugin data directory.',
|
|
@@ -323,7 +347,7 @@ window.__ModuleLoader__.load({
|
|
|
323
347
|
}
|
|
324
348
|
|
|
325
349
|
const CSS = `
|
|
326
|
-
.re-page {
|
|
350
|
+
.re-page { flex: 1 1 auto; height: 100%; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--dsh-frame-top-clearance, 48px) 32px 56px; box-sizing: border-box; color: var(--dsw-alias-label-primary); }
|
|
327
351
|
.re-inner { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; container-type: inline-size; }
|
|
328
352
|
.re-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
|
|
329
353
|
.re-titlebar { display: flex; align-items: center; gap: 12px; min-width: 0; }
|
|
@@ -346,8 +370,8 @@ window.__ModuleLoader__.load({
|
|
|
346
370
|
.re-btn { appearance: none; border: 0.5px solid var(--dsw-alias-border-l2); background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-primary); border-radius: 8px; padding: 7px 13px; font-size: 13px; line-height: 18px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
|
|
347
371
|
.re-btn:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-hover); }
|
|
348
372
|
.re-btn:disabled { opacity: .55; cursor: not-allowed; }
|
|
349
|
-
.re-btn-primary { background: var(--dsw-alias-button-primary-fill); border-color: transparent; color: var(--dsw-alias-label-
|
|
350
|
-
.re-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); }
|
|
373
|
+
.re-btn-primary { background: var(--dsw-alias-button-primary-fill); border-color: transparent; color: var(--dsw-alias-label-primary-inverted); font-weight: 600; }
|
|
374
|
+
.re-btn-primary:hover:not(:disabled) { background: var(--dsw-alias-button-primary-hover); color: var(--dsw-alias-label-primary-inverted); }
|
|
351
375
|
.re-btn-danger { color: var(--dsw-alias-state-error-primary); }
|
|
352
376
|
.re-btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
|
|
353
377
|
.re-btn-ghost { background: transparent; border-color: transparent; color: var(--dsw-alias-label-secondary); }
|
|
@@ -440,6 +464,30 @@ window.__ModuleLoader__.load({
|
|
|
440
464
|
.re-log-level[data-level="warn"] { color: var(--dsw-alias-state-warn-primary); }
|
|
441
465
|
.re-log-level { color: var(--dsw-alias-label-tertiary); }
|
|
442
466
|
.re-log-msg { min-width: 0; overflow-wrap: anywhere; color: var(--dsw-alias-label-secondary); }
|
|
467
|
+
.re-guide { margin-top: 10px; border: 0.5px solid var(--dsw-alias-border-l2); border-radius: 10px; background: var(--dsw-alias-bg-base); padding: 12px 14px; }
|
|
468
|
+
.re-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
|
|
469
|
+
.re-guide-title { font-size: 13px; font-weight: 600; }
|
|
470
|
+
.re-guide-req { margin: 4px 0 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-tertiary); }
|
|
471
|
+
.re-guide-tabs { display: flex; gap: 4px; margin: 10px 0 6px; flex-wrap: wrap; }
|
|
472
|
+
.re-guide-tab { appearance: none; border: 0.5px solid var(--dsw-alias-border-l2); background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-secondary); border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
|
|
473
|
+
.re-guide-tab[aria-selected="true"] { border-color: var(--dsw-alias-brand-primary); color: var(--dsw-alias-label-primary); font-weight: 600; }
|
|
474
|
+
.re-guide-section { margin-top: 10px; }
|
|
475
|
+
.re-guide-label { margin: 0 0 5px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }
|
|
476
|
+
.re-guide-list { margin: 0; padding-left: 20px; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }
|
|
477
|
+
.re-guide-list li { margin-bottom: 5px; }
|
|
478
|
+
.re-guide-notes { margin: 0; padding-left: 18px; font-size: 11px; line-height: 17px; color: var(--dsw-alias-label-tertiary); }
|
|
479
|
+
.re-cmd { border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 8px; margin-top: 6px; overflow: hidden; background: var(--dsw-alias-bg-layer-1); }
|
|
480
|
+
.re-cmd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 9px; background: var(--dsw-alias-bg-layer-2); font-size: 11px; color: var(--dsw-alias-label-tertiary); }
|
|
481
|
+
.re-cmd-body { margin: 0; padding: 8px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 17px; color: var(--dsw-alias-label-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
482
|
+
.re-link { color: var(--dsw-alias-link); text-decoration: none; font-size: 12px; }
|
|
483
|
+
.re-link:hover { text-decoration: underline; }
|
|
484
|
+
.re-guide-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
|
|
485
|
+
.re-provider-list { display: flex; flex-direction: column; margin-top: 6px; }
|
|
486
|
+
.re-provider-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 0.5px solid var(--dsw-alias-border-l1); }
|
|
487
|
+
.re-provider-main { min-width: 0; }
|
|
488
|
+
.re-provider-name { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
|
489
|
+
.re-provider-status { font-size: 11px; font-weight: 400; color: var(--dsw-alias-label-tertiary); }
|
|
490
|
+
.re-provider-actions { flex: none; }
|
|
443
491
|
.re-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--dsw-alias-label-caption); font-size: 11px; line-height: 16px; flex-wrap: wrap; }
|
|
444
492
|
.re-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
|
|
445
493
|
.re-skeleton { height: 180px; border-radius: 12px; background: var(--dsw-alias-bg-layer-2); animation: re-pulse 1.4s ease-in-out infinite; }
|
|
@@ -504,6 +552,24 @@ window.__ModuleLoader__.load({
|
|
|
504
552
|
return typeof value === 'number' ? value.toLocaleString() : '—'
|
|
505
553
|
}
|
|
506
554
|
|
|
555
|
+
function preferredLanguageIsChinese() {
|
|
556
|
+
const language = typeof navigator !== 'undefined' ? String(navigator.language ?? '') : ''
|
|
557
|
+
return /^zh/i.test(language)
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
function pickLocalized(value) {
|
|
561
|
+
if (value === null || value === undefined) return ''
|
|
562
|
+
if (typeof value === 'string') return value
|
|
563
|
+
return preferredLanguageIsChinese() ? (value.zh ?? value.en ?? '') : (value.en ?? value.zh ?? '')
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
function detectPlatform() {
|
|
567
|
+
const platform = typeof navigator !== 'undefined' ? String(navigator.platform ?? '') + ' ' + String(navigator.userAgent ?? '') : ''
|
|
568
|
+
if (/win/i.test(platform)) return 'windows'
|
|
569
|
+
if (/mac|darwin/i.test(platform)) return 'macos'
|
|
570
|
+
return 'linux'
|
|
571
|
+
}
|
|
572
|
+
|
|
507
573
|
function copyText(value) {
|
|
508
574
|
if (navigator.clipboard?.writeText) return navigator.clipboard.writeText(String(value))
|
|
509
575
|
const area = document.createElement('textarea')
|
|
@@ -655,12 +721,75 @@ window.__ModuleLoader__.load({
|
|
|
655
721
|
h('span', { className: 're-row-desc' }, props.tool.title || props.tool.description))
|
|
656
722
|
}
|
|
657
723
|
|
|
724
|
+
function ProviderGuide(props) {
|
|
725
|
+
const { t, toast, guide, platform, onPlatform } = props
|
|
726
|
+
const platforms = guide?.platforms ?? []
|
|
727
|
+
const active = platforms.find(item => item.id === platform) ?? platforms[0]
|
|
728
|
+
if (!active) return null
|
|
729
|
+
const copy = value => copyText(value).then(() => toast(t('action.copied'), 'success'))
|
|
730
|
+
const commandBlocks = (active.commands ?? []).map((command, index) => h('div', { key: 'cmd-' + index, className: 're-cmd' },
|
|
731
|
+
h('div', { className: 're-cmd-head' },
|
|
732
|
+
h('span', null, pickLocalized(command.label) || command.shell || ''),
|
|
733
|
+
h(Button, { small: true, variant: 'ghost', icon: 'copy', onClick: () => copy(command.text) }, t('action.copy'))),
|
|
734
|
+
h('pre', { className: 're-cmd-body' }, command.text)))
|
|
735
|
+
const snippetBlocks = (active.snippets ?? []).map((snippet, index) => h('div', { key: 'snippet-' + index, className: 're-cmd' },
|
|
736
|
+
h('div', { className: 're-cmd-head' },
|
|
737
|
+
h('span', null, pickLocalized(snippet.label) || snippet.language || ''),
|
|
738
|
+
h(Button, { small: true, variant: 'ghost', icon: 'copy', onClick: () => copy(snippet.text) }, t('action.copy'))),
|
|
739
|
+
h('pre', { className: 're-cmd-body' }, snippet.text)))
|
|
740
|
+
return h('div', { className: 're-guide' },
|
|
741
|
+
h('div', { className: 're-guide-head' },
|
|
742
|
+
h('div', { style: { minWidth: 0 } },
|
|
743
|
+
h('div', { className: 're-guide-title' }, t('providers.guideTitle')),
|
|
744
|
+
h('p', { className: 're-guide-req' }, pickLocalized(guide.requirements))),
|
|
745
|
+
h(Button, { small: true, variant: 'ghost', onClick: props.onClose }, t('action.close'))),
|
|
746
|
+
h('div', { className: 're-guide-tabs', role: 'tablist' },
|
|
747
|
+
platforms.map(item => h('button', {
|
|
748
|
+
key: item.id,
|
|
749
|
+
type: 'button',
|
|
750
|
+
role: 'tab',
|
|
751
|
+
className: 're-guide-tab',
|
|
752
|
+
'aria-selected': item.id === active.id,
|
|
753
|
+
onClick: () => onPlatform(item.id),
|
|
754
|
+
}, pickLocalized(item.label)))),
|
|
755
|
+
active.unsupported
|
|
756
|
+
? h(Notice, { level: 'warn' }, t('providers.unsupported'))
|
|
757
|
+
: null,
|
|
758
|
+
h('div', { className: 're-guide-section' },
|
|
759
|
+
h('p', { className: 're-guide-label' }, t('providers.steps')),
|
|
760
|
+
h('ol', { className: 're-guide-list' }, (active.steps ?? []).map((step, index) => h('li', { key: index }, pickLocalized(step))))),
|
|
761
|
+
commandBlocks.length
|
|
762
|
+
? h('div', { className: 're-guide-section' },
|
|
763
|
+
h('p', { className: 're-guide-label' }, t('providers.commands')),
|
|
764
|
+
commandBlocks)
|
|
765
|
+
: null,
|
|
766
|
+
snippetBlocks.length
|
|
767
|
+
? h('div', { className: 're-guide-section' },
|
|
768
|
+
h('p', { className: 're-guide-label' }, t('providers.snippets')),
|
|
769
|
+
snippetBlocks)
|
|
770
|
+
: null,
|
|
771
|
+
h('div', { className: 're-guide-section' },
|
|
772
|
+
h('p', { className: 're-guide-label' }, t('providers.verify')),
|
|
773
|
+
h('p', { className: 're-hint' }, pickLocalized(guide.verify))),
|
|
774
|
+
(active.notes ?? []).length
|
|
775
|
+
? h('div', { className: 're-guide-section' },
|
|
776
|
+
h('p', { className: 're-guide-label' }, t('providers.notes')),
|
|
777
|
+
h('ul', { className: 're-guide-notes' }, active.notes.map((note, index) => h('li', { key: index }, pickLocalized(note)))))
|
|
778
|
+
: null,
|
|
779
|
+
h('div', { className: 're-guide-links' },
|
|
780
|
+
guide.official ? h('a', { className: 're-link', href: guide.official, target: '_blank', rel: 'noreferrer' }, t('providers.official')) : null,
|
|
781
|
+
guide.docs ? h('a', { className: 're-link', href: guide.docs, target: '_blank', rel: 'noreferrer' }, t('providers.docs')) : null,
|
|
782
|
+
(guide.env ?? []).length ? h('span', { className: 're-hint' }, t('providers.env') + ': ' + guide.env.join(', ')) : null))
|
|
783
|
+
}
|
|
784
|
+
|
|
658
785
|
function Overview(props) {
|
|
659
786
|
const { t, state, onAction, onRefresh, onInstall, busy, toast } = props
|
|
660
787
|
const engine = state?.engine
|
|
661
788
|
const runtime = state?.runtime
|
|
662
789
|
const [providers, setProviders] = useState(null)
|
|
663
790
|
const [providerBusy, setProviderBusy] = useState(false)
|
|
791
|
+
const [guideOpen, setGuideOpen] = useState(null)
|
|
792
|
+
const [guidePlatform, setGuidePlatform] = useState(detectPlatform())
|
|
664
793
|
const loadProviders = useCallback(async () => {
|
|
665
794
|
setProviderBusy(true)
|
|
666
795
|
try {
|
|
@@ -752,9 +881,29 @@ window.__ModuleLoader__.load({
|
|
|
752
881
|
key: candidate.id,
|
|
753
882
|
tone: candidate.selected ? 'success' : candidate.status === 'available' ? 'success' : candidate.code === 'unsupported_host' ? 'idle' : 'warn',
|
|
754
883
|
}, candidate.name + (candidate.selected ? ' · ' + t('overview.selected') : '')))),
|
|
755
|
-
h('div',
|
|
756
|
-
|
|
757
|
-
h('div', { className: 're-
|
|
884
|
+
h('div', { className: 're-provider-list' }, (providers.candidates ?? []).map(candidate => {
|
|
885
|
+
const guide = providers.guides?.[candidate.id]
|
|
886
|
+
return h('div', { key: candidate.id, className: 're-provider-row' },
|
|
887
|
+
h('div', { className: 're-provider-main' },
|
|
888
|
+
h('div', { className: 're-provider-name' },
|
|
889
|
+
candidate.name,
|
|
890
|
+
h('span', { className: 're-provider-status' }, (candidate.status ?? '?') + (candidate.code ? ' · ' + candidate.code : ''))),
|
|
891
|
+
h('div', { className: 're-hint' }, candidate.reason ?? candidate.remediation ?? '')),
|
|
892
|
+
h('div', { className: 're-provider-actions' },
|
|
893
|
+
guide
|
|
894
|
+
? h(Button, { small: true, onClick: () => setGuideOpen(guideOpen === candidate.id ? null : candidate.id) }, guideOpen === candidate.id ? t('providers.hideGuide') : t('providers.showGuide'))
|
|
895
|
+
: null))
|
|
896
|
+
})),
|
|
897
|
+
guideOpen && providers.guides?.[guideOpen]
|
|
898
|
+
? h(ProviderGuide, {
|
|
899
|
+
t,
|
|
900
|
+
toast,
|
|
901
|
+
guide: providers.guides[guideOpen],
|
|
902
|
+
platform: guidePlatform,
|
|
903
|
+
onPlatform: setGuidePlatform,
|
|
904
|
+
onClose: () => setGuideOpen(null),
|
|
905
|
+
})
|
|
906
|
+
: null)
|
|
758
907
|
: h('p', { className: 're-hint' }, t('overview.providerEmpty'))),
|
|
759
908
|
h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(320px, 1fr))', gap: '14px' } },
|
|
760
909
|
h(Card, { title: t('overview.activity') },
|
|
@@ -1479,7 +1628,7 @@ window.__ModuleLoader__.load({
|
|
|
1479
1628
|
|
|
1480
1629
|
return {
|
|
1481
1630
|
inject: ['slots', 'locale'],
|
|
1482
|
-
__test: { App, Overview, ToolsTab, ClientsTab, WorkflowsTab, SettingsTab, LogsTab, sampleValue, ZH, EN },
|
|
1631
|
+
__test: { App, Overview, ProviderGuide, ToolsTab, ClientsTab, WorkflowsTab, SettingsTab, LogsTab, sampleValue, pickLocalized, ZH, EN },
|
|
1483
1632
|
apply(ctx) {
|
|
1484
1633
|
ctx.effect(function () {
|
|
1485
1634
|
return ctx.locale.register(NS, { zh: ZH, en: EN })
|
package/docs/CONTRACT.md
CHANGED
|
@@ -26,7 +26,7 @@ be objects. Every response is one envelope:
|
|
|
26
26
|
| POST | `/api/rea/prompt` | `{ name, arguments? }` | Rendered workflow `text`. |
|
|
27
27
|
| GET | `/api/rea/clients` | `refresh=1` | 43 clients with `state`, `detected`, `configPath`; skill status. |
|
|
28
28
|
| POST | `/api/rea/clients` | `{ action: "preview" \| "register", client }` or `{ action: "register-detected" }` | REA dry-run plan or setup result. |
|
|
29
|
-
| GET | `/api/rea/providers` | `refresh=1` | Provider candidates, selected provider, capability groups. |
|
|
29
|
+
| GET | `/api/rea/providers` | `refresh=1` | Provider candidates, selected provider, capability groups, and per-provider Windows/macOS/Linux installation guides. |
|
|
30
30
|
| GET | `/api/rea/doctor` | `refresh=1` | Summarized `rea doctor`: checks, skill, registrations, catalog. |
|
|
31
31
|
| GET | `/api/rea/cli` | `refresh=1` | 217 CLI commands parsed from `rea --llms`. |
|
|
32
32
|
| GET | `/api/rea/logs` | — | `activity`, structured `logs`, `stderr`, engine snapshot. |
|
package/docs/VERIFICATION.md
CHANGED
|
@@ -7,9 +7,9 @@ This release was exercised on Windows 11 with DeepSeek Harness Desktop
|
|
|
7
7
|
|
|
8
8
|
| Check | Result |
|
|
9
9
|
|---|---|
|
|
10
|
-
| `node --test tests/` |
|
|
11
|
-
| `node scripts/validate.mjs` | Package manifest, exports, locales, icon, catalog metadata, client list, and patch validated |
|
|
12
|
-
| `npm pack` |
|
|
10
|
+
| `node --test tests/` | 33 passing tests: engine handshake/catalog/call/timeout/cancel, settings, catalog search and exposure, JSON routes, Host registration, client module and dictionaries, provider-guide structure and rendering |
|
|
11
|
+
| `node scripts/validate.mjs` | Package manifest, exports, locales, icon, catalog metadata, client list, provider guides, and patch validated |
|
|
12
|
+
| `npm pack` | 27 files, about 70 kB tarball, no tests or scratch files |
|
|
13
13
|
| Packaged install | `npm install ./dsh-reverse-engine-0.1.0.tgz` in a clean consumer project installed 34 packages and resolved `rea-agents` 7.0.0 through the plugin's dependency |
|
|
14
14
|
| React + jsdom harness | Mounted the real client module with real React: Overview, Tools, Clients, Workflows, Settings, and Logs tabs render; a tool runs and shows its structured result |
|
|
15
15
|
|
|
@@ -36,12 +36,14 @@ This release was exercised on Windows 11 with DeepSeek Harness Desktop
|
|
|
36
36
|
the Desktop renderer fetches over its authenticated IPC bridge, and no headless
|
|
37
37
|
browser profile with that session was available. The client module was instead
|
|
38
38
|
rendered and interacted with under React + jsdom, and its slot registration
|
|
39
|
-
follows the documented `main` + `sidebar.panellist` contract.
|
|
40
|
-
|
|
41
|
-
the
|
|
39
|
+
follows the documented `main` + `sidebar.panellist` contract. The 0.1.1
|
|
40
|
+
button-ink and page-scroll fixes follow the theme's inverted-label and
|
|
41
|
+
flex-child contracts; refresh the Desktop window after installation and open
|
|
42
|
+
**Reverse engineering** to confirm the visual result.
|
|
42
43
|
- Ghidra, IDA, Hopper, and Kuna were not installed on this machine, so the
|
|
43
44
|
provider panel reports their real "unavailable" states but no native
|
|
44
|
-
decompilation was run.
|
|
45
|
+
decompilation was run. The installation guides were checked for the providers'
|
|
46
|
+
documented version, environment, and licensing constraints.
|
|
45
47
|
- No third-party agent client was reconfigured during verification; previews
|
|
46
48
|
were generated with `rea setup --dry-run` and checked, but registration was
|
|
47
49
|
left to the user from the Clients tab.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"updatedAt": "2026-12-04",
|
|
4
|
+
"providers": {
|
|
5
|
+
"ghidra": {
|
|
6
|
+
"official": "https://github.com/NationalSecurityAgency/ghidra/releases",
|
|
7
|
+
"docs": "https://github.com/morluto/rea/blob/main/docs/getting-started/installation.md#ghidra",
|
|
8
|
+
"requirements": {
|
|
9
|
+
"zh": "Ghidra 12.2 或更新版本;64 位完整 JDK 25 或更新版本;主机架构匹配的 native decompiler。Ghidra 12.1 不被接受。",
|
|
10
|
+
"en": "Ghidra 12.2 or newer; a 64-bit full JDK 25 or newer; a native decompiler matching the host architecture. Ghidra 12.1 is rejected."
|
|
11
|
+
},
|
|
12
|
+
"env": ["GHIDRA_INSTALL_DIR", "JAVA_HOME"],
|
|
13
|
+
"platforms": [
|
|
14
|
+
{
|
|
15
|
+
"id": "windows",
|
|
16
|
+
"label": { "zh": "Windows", "en": "Windows" },
|
|
17
|
+
"steps": [
|
|
18
|
+
{
|
|
19
|
+
"zh": "安装 64 位 JDK 25(推荐 Eclipse Temurin),并确认安装目录。Ghidra 12.2 要求 JDK 25,旧版 JDK 会被 doctor 拒绝。",
|
|
20
|
+
"en": "Install a 64-bit JDK 25 (Eclipse Temurin is recommended) and note its directory. Ghidra 12.2 requires JDK 25; older JDKs are rejected by doctor."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"zh": "从官方 Releases 下载 Ghidra 12.2+ 的 zip,解压到固定目录,例如 D:\\tools\\ghidra_12.2_PUBLIC。不要指向 zip 或上层目录。",
|
|
24
|
+
"en": "Download the Ghidra 12.2+ zip from the official releases page and extract it to a stable directory, for example D:\\tools\\ghidra_12.2_PUBLIC. Do not point at the zip or its parent."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"zh": "在插件「设置 → 分析引擎环境变量」加入下面两行并保存;或在 PowerShell 执行 setx 后重启 DeepSeek Harness。",
|
|
28
|
+
"en": "Add the two lines below under Settings → Analysis provider environment and save; or run setx in PowerShell and restart DeepSeek Harness."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"zh": "回到「概览 → 分析引擎」点「检查」。首次原生分析会由 REA 启动 analyzeHeadless,可能需要数分钟。",
|
|
32
|
+
"en": "Return to Overview → Analysis providers and select Check. The first native analysis starts analyzeHeadless and can take minutes."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"commands": [
|
|
36
|
+
{
|
|
37
|
+
"label": { "zh": "安装 Temurin 25(示例)", "en": "Install Temurin 25 (example)" },
|
|
38
|
+
"shell": "powershell",
|
|
39
|
+
"text": "winget install --id EclipseAdoptium.Temurin.25.JDK -e"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"label": { "zh": "写入环境变量(路径按实际安装修改)", "en": "Set environment variables (adjust paths)" },
|
|
43
|
+
"shell": "powershell",
|
|
44
|
+
"text": "setx JAVA_HOME \"C:\\Program Files\\Eclipse Adoptium\\jdk-25.0.1.8-hotspot\"\nsetx GHIDRA_INSTALL_DIR \"D:\\tools\\ghidra_12.2_PUBLIC\""
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"notes": [
|
|
48
|
+
{
|
|
49
|
+
"zh": "Windows P0 只读:可分析 PE x86 / x86-64 / ARMNT / ARM64,但不能写回函数名、注释或类型。",
|
|
50
|
+
"en": "Windows P0 is read-only: it analyzes PE x86 / x86-64 / ARMNT / ARM64 but cannot write function names, comments, or types."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"zh": "GHIDRA_INSTALL_DIR 必须指向包含 support\\analyzeHeadless.bat 的目录;JAVA_HOME 必须是 64 位完整 JDK。",
|
|
54
|
+
"en": "GHIDRA_INSTALL_DIR must contain support\\analyzeHeadless.bat; JAVA_HOME must be a 64-bit full JDK."
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "macos",
|
|
60
|
+
"label": { "zh": "macOS", "en": "macOS" },
|
|
61
|
+
"steps": [
|
|
62
|
+
{
|
|
63
|
+
"zh": "安装 JDK 25(可用 Homebrew Temurin cask),并让 JAVA_HOME 指向它。",
|
|
64
|
+
"en": "Install JDK 25 (the Homebrew Temurin cask works) and point JAVA_HOME at it."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"zh": "下载并解压 Ghidra 12.2+ 到 ~/tools/ghidra_12.2_PUBLIC,确认 support/analyzeHeadless 存在且可执行。",
|
|
68
|
+
"en": "Download and extract Ghidra 12.2+ to ~/tools/ghidra_12.2_PUBLIC and confirm support/analyzeHeadless exists and is executable."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"zh": "在「设置 → 分析引擎环境变量」加入 GHIDRA_INSTALL_DIR 与 JAVA_HOME,或写入 ~/.zshrc 后重启 DSH。",
|
|
72
|
+
"en": "Add GHIDRA_INSTALL_DIR and JAVA_HOME under Settings → Analysis provider environment, or add them to ~/.zshrc and restart DSH."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"zh": "在「分析引擎」点「检查」。若 macOS 阻止首次运行,请在系统设置中允许 Ghidra 的启动。",
|
|
76
|
+
"en": "Select Check under Analysis providers. If macOS blocks the first launch, allow Ghidra in System Settings."
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"commands": [
|
|
80
|
+
{
|
|
81
|
+
"label": { "zh": "安装 JDK 25", "en": "Install JDK 25" },
|
|
82
|
+
"shell": "bash",
|
|
83
|
+
"text": "brew install --cask temurin@25"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"label": { "zh": "配置环境变量", "en": "Configure environment" },
|
|
87
|
+
"shell": "bash",
|
|
88
|
+
"text": "export JAVA_HOME=$(/usr/libexec/java_home -v 25)\nexport GHIDRA_INSTALL_DIR=\"$HOME/tools/ghidra_12.2_PUBLIC\"\necho 'export GHIDRA_INSTALL_DIR=\"$HOME/tools/ghidra_12.2_PUBLIC\"' >> ~/.zshrc"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"notes": [
|
|
92
|
+
{
|
|
93
|
+
"zh": "Apple Silicon 必须使用 arm64 版 JDK 与 Ghidra native decompiler;通过 Rosetta 运行的 JDK 会被拒绝。",
|
|
94
|
+
"en": "Apple silicon needs an arm64 JDK and Ghidra native decompiler; a JDK running under Rosetta is rejected."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"zh": "REA 不会替你修改 Gatekeeper 隔离属性;首次运行被拦截时请手动放行。",
|
|
98
|
+
"en": "REA does not change Gatekeeper quarantine attributes; allow the app manually if the first launch is blocked."
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "linux",
|
|
104
|
+
"label": { "zh": "Linux", "en": "Linux" },
|
|
105
|
+
"steps": [
|
|
106
|
+
{
|
|
107
|
+
"zh": "安装 64 位 JDK 25。发行版仓库没有 25 时,使用 Adoptium Temurin 25 的 apt/yum 仓库。",
|
|
108
|
+
"en": "Install a 64-bit JDK 25. If the distribution does not package 25, use the Adoptium Temurin 25 apt/yum repository."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"zh": "下载并解压 Ghidra 12.2+ 到 ~/tools/ghidra_12.2_PUBLIC,确认 support/analyzeHeadless 可执行。",
|
|
112
|
+
"en": "Download and extract Ghidra 12.2+ to ~/tools/ghidra_12.2_PUBLIC and confirm support/analyzeHeadless is executable."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"zh": "在插件「设置 → 分析引擎环境变量」加入 GHIDRA_INSTALL_DIR 与 JAVA_HOME;保存后重启引擎。",
|
|
116
|
+
"en": "Add GHIDRA_INSTALL_DIR and JAVA_HOME under Settings → Analysis provider environment, save, and restart the engine."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"zh": "确认系统有 procps 的 ps(REA 用它校验进程归属),然后点「检查」。",
|
|
120
|
+
"en": "Make sure a procps-compatible ps is installed (REA uses it to verify process ownership), then select Check."
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"commands": [
|
|
124
|
+
{
|
|
125
|
+
"label": { "zh": "安装 JDK 与 procps(Debian/Ubuntu 示例)", "en": "Install JDK and procps (Debian/Ubuntu example)" },
|
|
126
|
+
"shell": "bash",
|
|
127
|
+
"text": "sudo apt update\nsudo apt install -y openjdk-25-jdk procps\n# 若仓库没有 openjdk-25-jdk,请按 Adoptium 官方说明添加 Temurin 25 源"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"label": { "zh": "解压并配置", "en": "Extract and configure" },
|
|
131
|
+
"shell": "bash",
|
|
132
|
+
"text": "mkdir -p \"$HOME/tools\"\nunzip ghidra_12.2_PUBLIC_*.zip -d \"$HOME/tools\"\nexport GHIDRA_INSTALL_DIR=\"$HOME/tools/ghidra_12.2_PUBLIC\"\nexport JAVA_HOME=/usr/lib/jvm/temurin-25-jdk-amd64"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"notes": [
|
|
136
|
+
{
|
|
137
|
+
"zh": "官方 Ghidra 发布包只带 Windows/Linux x64 的 native decompiler。Linux ARM64 需要按 Ghidra 的 native component 文档自行构建,否则 doctor 会报告 decompiler 缺失或不兼容。",
|
|
138
|
+
"en": "Official Ghidra archives ship native decompilers only for Windows and Linux x64. Linux ARM64 must build the native components as documented, or doctor reports them missing or incompatible."
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"verify": {
|
|
144
|
+
"zh": "保存后在控制台点「检查」,或运行:rea doctor --provider ghidra --json。状态应为 available,而不是 not_configured。",
|
|
145
|
+
"en": "After saving, select Check in the console or run: rea doctor --provider ghidra --json. The status should be available, not not_configured."
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"ida": {
|
|
149
|
+
"official": "https://hex-rays.com/ida-pro",
|
|
150
|
+
"docs": "https://github.com/morluto/rea/blob/main/docs/providers/ida-provider.md",
|
|
151
|
+
"requirements": {
|
|
152
|
+
"zh": "IDA Pro 或 IDA Free(需自备许可证),以及一个上游 IDA MCP 服务。REA 不安装、不激活、不授权 IDA。",
|
|
153
|
+
"en": "IDA Pro or IDA Free with your own license, plus an upstream IDA MCP server. REA does not install, activate, or license IDA."
|
|
154
|
+
},
|
|
155
|
+
"env": ["REA_IDA_MCP_CONFIG", "REA_ANALYSIS_PROVIDER"],
|
|
156
|
+
"platforms": [
|
|
157
|
+
{
|
|
158
|
+
"id": "windows",
|
|
159
|
+
"label": { "zh": "Windows", "en": "Windows" },
|
|
160
|
+
"steps": [
|
|
161
|
+
{
|
|
162
|
+
"zh": "安装并激活 IDA(Pro 或 Free),确认能打开目标数据库。",
|
|
163
|
+
"en": "Install and activate IDA (Pro or Free) and confirm it can open your target database."
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"zh": "选择上游 MCP:mrexodia/ida-pro-mcp(GUI attached 或 headless supervisor)、官方 HexRaysSA/ida-mcp(IDA 9.4+),或 IDA Free 的 ida-free-mcp。按其 README 安装并启动。",
|
|
167
|
+
"en": "Choose an upstream MCP: mrexodia/ida-pro-mcp (attached GUI or headless supervisor), the official HexRaysSA/ida-mcp (IDA 9.4+), or ida-free-mcp for IDA Free. Install and start it per its README."
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"zh": "把注册 JSON 保存到固定路径,例如 D:\\analysis\\ida-mcp.json。attached 模式必须写 \"protocol\": \"native\"。",
|
|
171
|
+
"en": "Save the registration JSON to a stable path, for example D:\\analysis\\ida-mcp.json. Attached mode must declare \"protocol\": \"native\"."
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"zh": "在「设置 → 分析引擎环境变量」加入 REA_IDA_MCP_CONFIG=...,可选 REA_ANALYSIS_PROVIDER=ida;保存并重启引擎后点「检查」。",
|
|
175
|
+
"en": "Add REA_IDA_MCP_CONFIG=... under Settings → Analysis provider environment, optionally REA_ANALYSIS_PROVIDER=ida, save, restart, then select Check."
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"commands": [
|
|
179
|
+
{
|
|
180
|
+
"label": { "zh": "设置环境变量(PowerShell)", "en": "Set environment (PowerShell)" },
|
|
181
|
+
"shell": "powershell",
|
|
182
|
+
"text": "$env:REA_IDA_MCP_CONFIG = 'D:\\analysis\\ida-mcp.json'\n$env:REA_ANALYSIS_PROVIDER = 'ida'"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"snippets": [
|
|
186
|
+
{
|
|
187
|
+
"label": { "zh": "attached GUI 注册示例", "en": "Attached GUI registration" },
|
|
188
|
+
"language": "json",
|
|
189
|
+
"text": "{\n \"mode\": \"attached\",\n \"protocol\": \"native\",\n \"url\": \"http://127.0.0.1:13337/mcp\"\n}"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"label": { "zh": "headless supervisor 注册示例", "en": "Headless supervisor registration" },
|
|
193
|
+
"language": "json",
|
|
194
|
+
"text": "{\n \"command\": \"idalib-mcp\",\n \"args\": [\"--stdio\", \"--max-workers\", \"1\"],\n \"mode\": \"headless\"\n}"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"notes": [
|
|
198
|
+
{
|
|
199
|
+
"zh": "headless 模式要求 mrexodia/ida-pro-mcp 的 database-supervisor API(idb_open / idb_list / idb_close);旧的 1.4 attached 协议已被拒绝。",
|
|
200
|
+
"en": "Headless mode requires the mrexodia/ida-pro-mcp database-supervisor API (idb_open / idb_list / idb_close); the old 1.4 attached protocol is rejected."
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"zh": "IDA Free 走独立的 ida-free-mcp 原生插件;该插件可能监听 0.0.0.0,请用防火墙限制访问。",
|
|
204
|
+
"en": "IDA Free uses the separate ida-free-mcp native plugin; it may listen on 0.0.0.0, so restrict access with the host firewall."
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"id": "macos",
|
|
210
|
+
"label": { "zh": "macOS", "en": "macOS" },
|
|
211
|
+
"steps": [
|
|
212
|
+
{
|
|
213
|
+
"zh": "安装并激活 IDA(Pro 或 Free)。",
|
|
214
|
+
"en": "Install and activate IDA (Pro or Free)."
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"zh": "按上游 README 安装所选 MCP(ida-pro-mcp、官方 Hex-Rays IDA MCP,或 ida-free-mcp),并确认它能在本机启动。",
|
|
218
|
+
"en": "Install the chosen MCP per its README (ida-pro-mcp, the official Hex-Rays IDA MCP, or ida-free-mcp) and confirm it starts on this machine."
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"zh": "保存注册 JSON 到绝对路径,例如 ~/analysis/ida-mcp.json;attached 模式同样需要 \"protocol\": \"native\"。",
|
|
222
|
+
"en": "Save the registration JSON to an absolute path, for example ~/analysis/ida-mcp.json; attached mode also needs \"protocol\": \"native\"."
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"zh": "在插件「设置 → 分析引擎环境变量」加入 REA_IDA_MCP_CONFIG,保存后重启引擎并「检查」。",
|
|
226
|
+
"en": "Add REA_IDA_MCP_CONFIG under Settings → Analysis provider environment, save, restart the engine, and select Check."
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"commands": [
|
|
230
|
+
{
|
|
231
|
+
"label": { "zh": "设置环境变量", "en": "Set environment" },
|
|
232
|
+
"shell": "bash",
|
|
233
|
+
"text": "export REA_IDA_MCP_CONFIG=\"$HOME/analysis/ida-mcp.json\"\nexport REA_ANALYSIS_PROVIDER=ida"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"snippets": [
|
|
237
|
+
{
|
|
238
|
+
"label": { "zh": "attached GUI 注册示例", "en": "Attached GUI registration" },
|
|
239
|
+
"language": "json",
|
|
240
|
+
"text": "{\n \"mode\": \"attached\",\n \"protocol\": \"native\",\n \"url\": \"http://127.0.0.1:13337/mcp\"\n}"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"label": { "zh": "官方 Hex-Rays 注册示例(IDA 9.4+)", "en": "Official Hex-Rays registration (IDA 9.4+)" },
|
|
244
|
+
"language": "json",
|
|
245
|
+
"text": "{\n \"command\": \"ida-mcp\",\n \"args\": [\"stdio\", \"--agent=rea\"],\n \"mode\": \"headless\",\n \"protocol\": \"hexrays\"\n}"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"notes": [
|
|
249
|
+
{
|
|
250
|
+
"zh": "官方 Hex-Rays 模式要求 IDA 9.4+、idalib、Python 3.11+,以及 PATH 上的 uv 与 git。",
|
|
251
|
+
"en": "Official Hex-Rays mode requires IDA 9.4+, idalib, Python 3.11+, and uv plus git on PATH."
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "linux",
|
|
257
|
+
"label": { "zh": "Linux", "en": "Linux" },
|
|
258
|
+
"steps": [
|
|
259
|
+
{
|
|
260
|
+
"zh": "安装并激活 IDA(Pro 或 Free),确认许可证与 GUI/idalib 可用。",
|
|
261
|
+
"en": "Install and activate IDA (Pro or Free) and confirm the license and GUI/idalib work."
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"zh": "按上游 README 安装所选 MCP;headless 模式需要 database-supervisor API 或官方 Hex-Rays 的 idalib。",
|
|
265
|
+
"en": "Install the chosen MCP per its README; headless mode needs the database-supervisor API or the official Hex-Rays idalib."
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"zh": "保存注册 JSON 到绝对路径,在插件环境变量中加入 REA_IDA_MCP_CONFIG,保存并重启引擎。",
|
|
269
|
+
"en": "Save the registration JSON to an absolute path, add REA_IDA_MCP_CONFIG to the plugin environment, save, and restart the engine."
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"zh": "点「检查」。REA 只读取上游服务状态,不会启动 IDA GUI 或修改数据库。",
|
|
273
|
+
"en": "Select Check. REA only reads upstream status; it does not launch the IDA GUI or modify a database."
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"commands": [
|
|
277
|
+
{
|
|
278
|
+
"label": { "zh": "设置环境变量", "en": "Set environment" },
|
|
279
|
+
"shell": "bash",
|
|
280
|
+
"text": "export REA_IDA_MCP_CONFIG=/absolute/path/to/ida-mcp.json\nexport REA_ANALYSIS_PROVIDER=ida"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"snippets": [
|
|
284
|
+
{
|
|
285
|
+
"label": { "zh": "headless supervisor 注册示例", "en": "Headless supervisor registration" },
|
|
286
|
+
"language": "json",
|
|
287
|
+
"text": "{\n \"command\": \"idalib-mcp\",\n \"args\": [\"--stdio\", \"--max-workers\", \"1\"],\n \"mode\": \"headless\",\n \"env\": { \"IDADIR\": \"/opt/ida\" }\n}"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"notes": [
|
|
291
|
+
{
|
|
292
|
+
"zh": "headless REA 与上游 supervisor 必须共享主机文件系统和路径语法;Windows supervisor 需要 Windows 上的 REA。",
|
|
293
|
+
"en": "Headless REA and the upstream supervisor must share the host filesystem and path syntax; a Windows supervisor needs REA on Windows."
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
"verify": {
|
|
299
|
+
"zh": "点「检查」,或运行 rea doctor --provider ida --json。doctor 会报告 registration 是否可读、上游是否可达。",
|
|
300
|
+
"en": "Select Check or run rea doctor --provider ida --json. Doctor reports whether the registration is readable and the upstream is reachable."
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"hopper": {
|
|
304
|
+
"official": "https://www.hopperapp.com/",
|
|
305
|
+
"docs": "https://github.com/morluto/rea/blob/main/docs/getting-started/installation.md#hopper",
|
|
306
|
+
"requirements": {
|
|
307
|
+
"zh": "Hopper 是独立商业软件,需要自备许可证(可使用 demo)。仅支持 macOS 与 Linux;Windows 不支持。",
|
|
308
|
+
"en": "Hopper is separate commercial software with its own license (a demo exists). macOS and Linux only; Windows is unsupported."
|
|
309
|
+
},
|
|
310
|
+
"env": ["HOPPER_LAUNCHER_PATH"],
|
|
311
|
+
"platforms": [
|
|
312
|
+
{
|
|
313
|
+
"id": "windows",
|
|
314
|
+
"label": { "zh": "Windows", "en": "Windows" },
|
|
315
|
+
"unsupported": true,
|
|
316
|
+
"steps": [
|
|
317
|
+
{
|
|
318
|
+
"zh": "REA 的 Hopper 集成不支持 Windows。请改用 Ghidra(Windows P0 只读)或 IDA。",
|
|
319
|
+
"en": "REA's Hopper integration does not support Windows. Use Ghidra (Windows P0, read-only) or IDA instead."
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"commands": [],
|
|
323
|
+
"notes": []
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"id": "macos",
|
|
327
|
+
"label": { "zh": "macOS", "en": "macOS" },
|
|
328
|
+
"steps": [
|
|
329
|
+
{
|
|
330
|
+
"zh": "安装 Hopper(官网下载或 Homebrew cask),首次启动时选择 demo 或激活许可证。",
|
|
331
|
+
"en": "Install Hopper (official download or Homebrew cask) and choose demo or activate your license on first launch."
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"zh": "REA 会自动发现标准安装位置;非标准位置时设置 HOPPER_LAUNCHER_PATH 指向应用内的 hopper 可执行文件。",
|
|
335
|
+
"en": "REA detects the standard installation; for a custom location set HOPPER_LAUNCHER_PATH to the hopper executable inside the app."
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"zh": "在插件环境变量中保存路径,重启引擎后点「检查」。",
|
|
339
|
+
"en": "Save the path in the plugin environment, restart the engine, and select Check."
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
"commands": [
|
|
343
|
+
{
|
|
344
|
+
"label": { "zh": "安装并配置", "en": "Install and configure" },
|
|
345
|
+
"shell": "bash",
|
|
346
|
+
"text": "brew install --cask hopper\nexport HOPPER_LAUNCHER_PATH=\"/Applications/Hopper Disassembler.app/Contents/MacOS/hopper\""
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"notes": [
|
|
350
|
+
{
|
|
351
|
+
"zh": "Hopper 需要图形会话;REA 会通过启动器创建文档,不会附加到已打开的文档。",
|
|
352
|
+
"en": "Hopper needs a GUI session; REA creates a document through the launcher and does not attach to an existing one."
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"id": "linux",
|
|
358
|
+
"label": { "zh": "Linux", "en": "Linux" },
|
|
359
|
+
"steps": [
|
|
360
|
+
{
|
|
361
|
+
"zh": "从官网下载 x86_64 的 .deb / .rpm / Arch 包并安装;官方 Linux 包只有 x86_64。",
|
|
362
|
+
"en": "Download the x86_64 .deb / .rpm / Arch package from the official site and install it; official Linux packages are x86_64 only."
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"zh": "确认 hopper 可执行文件路径;非标准位置时设置 HOPPER_LAUNCHER_PATH。",
|
|
366
|
+
"en": "Confirm the hopper executable path; set HOPPER_LAUNCHER_PATH if it is non-standard."
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"zh": "在插件环境变量中保存路径,重启引擎后点「检查」。",
|
|
370
|
+
"en": "Save the path in the plugin environment, restart the engine, and select Check."
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"commands": [
|
|
374
|
+
{
|
|
375
|
+
"label": { "zh": "Debian/Ubuntu 安装示例", "en": "Debian/Ubuntu install example" },
|
|
376
|
+
"shell": "bash",
|
|
377
|
+
"text": "sudo apt install ./hopper*.deb\nexport HOPPER_LAUNCHER_PATH=/usr/bin/hopper"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"notes": [
|
|
381
|
+
{
|
|
382
|
+
"zh": "Linux ARM64 没有官方 Hopper 包,请改用 Ghidra。",
|
|
383
|
+
"en": "There is no official Hopper package for Linux ARM64; use Ghidra instead."
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"verify": {
|
|
389
|
+
"zh": "点「检查」,或运行 rea doctor --provider hopper --json。Hopper 需要可用的图形会话。",
|
|
390
|
+
"en": "Select Check or run rea doctor --provider hopper --json. Hopper needs a usable GUI session."
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"kuna": {
|
|
394
|
+
"official": "https://github.com/Noelo-Lab/kuna",
|
|
395
|
+
"docs": "https://github.com/morluto/rea/blob/main/docs/kuna-provider.md",
|
|
396
|
+
"requirements": {
|
|
397
|
+
"zh": "Kuna 1.1000(REA 推荐并验证的版本),一个 kuna 可执行文件。REA 不下载、不安装、不更新 Kuna。",
|
|
398
|
+
"en": "Kuna 1.1000 (REA's recommended verified release), as a single kuna executable. REA does not download, install, or update Kuna."
|
|
399
|
+
},
|
|
400
|
+
"env": ["REA_KUNA_COMMAND", "KUNA_SPECS", "SLEIGHHOME"],
|
|
401
|
+
"platforms": [
|
|
402
|
+
{
|
|
403
|
+
"id": "windows",
|
|
404
|
+
"label": { "zh": "Windows", "en": "Windows" },
|
|
405
|
+
"steps": [
|
|
406
|
+
{
|
|
407
|
+
"zh": "按 Noelo-Lab/kuna 的上游 README 获取或构建 Kuna 1.1000,确认 kuna.exe --version 可用。",
|
|
408
|
+
"en": "Obtain or build Kuna 1.1000 per the Noelo-Lab/kuna README and confirm kuna.exe --version works."
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"zh": "在插件「设置 → 分析引擎环境变量」加入 REA_KUNA_COMMAND 指向 kuna.exe 的绝对路径。",
|
|
412
|
+
"en": "Add REA_KUNA_COMMAND with the absolute path to kuna.exe under Settings → Analysis provider environment."
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"zh": "保存并重启引擎,然后在「分析引擎」点「检查」。",
|
|
416
|
+
"en": "Save and restart the engine, then select Check under Analysis providers."
|
|
417
|
+
}
|
|
418
|
+
],
|
|
419
|
+
"commands": [
|
|
420
|
+
{
|
|
421
|
+
"label": { "zh": "设置路径", "en": "Set the path" },
|
|
422
|
+
"shell": "powershell",
|
|
423
|
+
"text": "setx REA_KUNA_COMMAND \"D:\\tools\\kuna\\kuna.exe\""
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
"notes": [
|
|
427
|
+
{
|
|
428
|
+
"zh": "源码构建的 Kuna 还需要 KUNA_SPECS 或 SLEIGHHOME;发布版通常自带规格。",
|
|
429
|
+
"en": "A source-built Kuna also needs KUNA_SPECS or SLEIGHHOME; release builds usually carry their specs."
|
|
430
|
+
}
|
|
431
|
+
]
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"id": "macos",
|
|
435
|
+
"label": { "zh": "macOS", "en": "macOS" },
|
|
436
|
+
"steps": [
|
|
437
|
+
{
|
|
438
|
+
"zh": "获取或构建 Kuna 1.1000,确认 kuna --version 可执行;REA 的 1.1000 实机验证在 macOS arm64 上完成。",
|
|
439
|
+
"en": "Obtain or build Kuna 1.1000 and confirm kuna --version runs; REA's 1.1000 real-provider checks ran on macOS arm64."
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"zh": "把绝对路径写入插件环境变量 REA_KUNA_COMMAND;源码构建时同时设置 KUNA_SPECS 或 SLEIGHHOME。",
|
|
443
|
+
"en": "Set the absolute path in the plugin environment as REA_KUNA_COMMAND; for a source build also set KUNA_SPECS or SLEIGHHOME."
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"zh": "保存、重启引擎并点「检查」。",
|
|
447
|
+
"en": "Save, restart the engine, and select Check."
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"commands": [
|
|
451
|
+
{
|
|
452
|
+
"label": { "zh": "设置路径", "en": "Set the path" },
|
|
453
|
+
"shell": "bash",
|
|
454
|
+
"text": "export REA_KUNA_COMMAND=\"$HOME/tools/kuna/kuna\"\n# 源码构建时按需设置:\n# export KUNA_SPECS=\"$HOME/tools/kuna/specs\""
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
"notes": [
|
|
458
|
+
{
|
|
459
|
+
"zh": "Kuna 是静态分析器,不执行目标;版本探针会报告未验证的发行版。",
|
|
460
|
+
"en": "Kuna is static and never executes the target; the version probe reports unverified releases."
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"id": "linux",
|
|
466
|
+
"label": { "zh": "Linux", "en": "Linux" },
|
|
467
|
+
"steps": [
|
|
468
|
+
{
|
|
469
|
+
"zh": "获取或构建 Kuna 1.1000,确认 kuna --version 可执行,并保证运行依赖完整。",
|
|
470
|
+
"en": "Obtain or build Kuna 1.1000, confirm kuna --version works, and make sure its runtime dependencies are present."
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"zh": "在插件环境变量中把 REA_KUNA_COMMAND 指向可执行文件的绝对路径。",
|
|
474
|
+
"en": "Point REA_KUNA_COMMAND at the absolute executable path in the plugin environment."
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"zh": "保存、重启引擎并点「检查」。",
|
|
478
|
+
"en": "Save, restart the engine, and select Check."
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"commands": [
|
|
482
|
+
{
|
|
483
|
+
"label": { "zh": "设置路径", "en": "Set the path" },
|
|
484
|
+
"shell": "bash",
|
|
485
|
+
"text": "export REA_KUNA_COMMAND=/opt/kuna/kuna\nexport KUNA_SPECS=/opt/kuna/specs"
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"notes": [
|
|
489
|
+
{
|
|
490
|
+
"zh": "REA 只接受可执行的常规文件;相对路径按 REA 工作目录解析。",
|
|
491
|
+
"en": "REA accepts only an executable regular file; relative paths resolve against REA's working directory."
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"verify": {
|
|
497
|
+
"zh": "点「检查」,或运行 rea doctor --provider kuna --json。可用时 installation 检查通过。",
|
|
498
|
+
"en": "Select Check or run rea doctor --provider kuna --json. The installation check passes when it is usable."
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
package/lib/service.js
CHANGED
|
@@ -12,9 +12,11 @@ import { HttpEndpoint, isLoopback } from './http-endpoint.js'
|
|
|
12
12
|
import { engineEnvironment, normalizeSettings } from './settings.js'
|
|
13
13
|
import { findNodeRuntime, findReaPackage, inspectRuntime, installReaPackage, mcpCommand, REA_REQUIREMENT, versionNotice } from './runtime.js'
|
|
14
14
|
import { ReaError, readJsonFile, runCommand, shortError, text } from './util.js'
|
|
15
|
+
import { readJsonFileSync } from './util.js'
|
|
15
16
|
|
|
16
17
|
const CLI_CACHE_MS = 5 * 60_000
|
|
17
18
|
const CAPABILITY_CACHE_MS = 60_000
|
|
19
|
+
const PROVIDER_GUIDES = readJsonFileSync(new URL('./provider-guides.json', import.meta.url), { version: 1, providers: {} })
|
|
18
20
|
|
|
19
21
|
export class ReaService {
|
|
20
22
|
#logger
|
|
@@ -395,6 +397,8 @@ export class ReaService {
|
|
|
395
397
|
})),
|
|
396
398
|
investigation: parsed.investigation ?? null,
|
|
397
399
|
server: parsed.server_identity ?? null,
|
|
400
|
+
guides: PROVIDER_GUIDES.providers ?? {},
|
|
401
|
+
guidesUpdatedAt: PROVIDER_GUIDES.updatedAt ?? null,
|
|
398
402
|
cached: false,
|
|
399
403
|
checkedAt: new Date().toISOString(),
|
|
400
404
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-reverse-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "REA reverse-engineering workspace for DeepSeek Harness: an agent-side tool bridge for 274 local analysis operations plus a sidebar console with engine status, a runnable tool catalog, and one-click MCP registration for 43 agent clients.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zmang-Tech",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"cordis.patch.yml",
|
|
56
56
|
"README.md",
|
|
57
57
|
"README.zh-CN.md",
|
|
58
|
+
"USAGE.md",
|
|
58
59
|
"CHANGELOG.md",
|
|
59
60
|
"LICENSE",
|
|
60
61
|
"NOTICE"
|