dsh-reverse-engine 0.1.1 → 0.1.3

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3 — 2026-12-04
4
+
5
+ - Correct the Tools, Clients, and Workflows screenshot references in
6
+ `USAGE.md` so every embedded image resolves to a shipped file.
7
+ - Validate every `USAGE.md` image reference in `npm run check`.
8
+
9
+ ## 0.1.2 — 2026-12-04
10
+
11
+ - Add `USAGE.md`: a bilingual, screenshot-led walkthrough of every sidebar tab
12
+ (Overview, Tools, Clients, Workflows, Settings, Logs), the first-investigation
13
+ recipe, and common problems, with English and Simplified Chinese sections and
14
+ a language switch.
15
+ - Link the usage guide from both READMEs and include it in the npm package.
16
+
3
17
  ## 0.1.1 — 2026-12-04
4
18
 
5
19
  - Fix primary button contrast: button ink now uses the theme's inverted label
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
 
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 工具桥,用于本机逆向分析。
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
+ ![Overview tab](docs/images/usage/overview.webp)
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
+ ![Tools tab](docs/images/usage/tools.png)
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
+ ![Clients tab](docs/images/usage/clients.png)
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
+ ![Workflows tab](docs/images/usage/workflows.png)
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
+ ![Settings runtime](docs/images/usage/settings-runtime.png)
114
+
115
+ ![Settings advanced](docs/images/usage/settings-advanced.png)
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
+ ![Logs tab](docs/images/usage/logs.png)
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
+ ![概览页](docs/images/usage/overview.webp)
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
+ ![工具页](docs/images/usage/tools.png)
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
+ ![客户端页](docs/images/usage/clients.png)
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
+ ![工作流页](docs/images/usage/workflows.png)
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
+ ![设置页运行时](docs/images/usage/settings-runtime.png)
268
+
269
+ ![设置页高级项](docs/images/usage/settings-advanced.png)
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
+ ![日志页](docs/images/usage/logs.png)
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)
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-reverse-engine",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
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"