dsh-reverse-engine 0.0.0-stage → 0.1.0
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 +17 -0
- package/LICENSE +201 -0
- package/NOTICE +49 -0
- package/README.md +124 -2
- package/README.zh-CN.md +108 -0
- package/client.js +1509 -0
- package/cordis.patch.yml +6 -0
- package/docs/ARCHITECTURE.md +114 -0
- package/docs/CONTRACT.md +91 -0
- package/docs/VERIFICATION.md +55 -0
- package/icon.svg +23 -0
- package/index.js +218 -0
- package/lib/catalog.js +123 -0
- package/lib/clients.js +206 -0
- package/lib/engine.js +488 -0
- package/lib/http-endpoint.js +153 -0
- package/lib/rea-catalog.json +671 -0
- package/lib/rea-clients.json +177 -0
- package/lib/routes.js +212 -0
- package/lib/runtime.js +299 -0
- package/lib/service.js +454 -0
- package/lib/settings.js +165 -0
- package/lib/tools.js +245 -0
- package/lib/util.js +312 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +77 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 — 2026-12-04
|
|
4
|
+
|
|
5
|
+
- First release.
|
|
6
|
+
- Host bridge that owns one local REA engine (`rea-agents` 7.0.0) over its MCP
|
|
7
|
+
stdio protocol, with serialized calls, cancellation, timeouts, restart, and a
|
|
8
|
+
bounded stderr/event ring buffer.
|
|
9
|
+
- Sidebar console: engine and runtime status, searchable 274-tool catalog with a
|
|
10
|
+
runnable JSON editor, 43-client registration preview/apply, six guided
|
|
11
|
+
workflows, provider readiness, settings, and logs.
|
|
12
|
+
- Agent tools: `rea_tools`, `rea_call`, `rea_status`, `rea_workflow`, plus the 11
|
|
13
|
+
core REA tools registered under their canonical names.
|
|
14
|
+
- One-click runtime install fallback for linked checkouts, skill install/refresh
|
|
15
|
+
through `rea setup --skill`, and an optional loopback HTTP MCP endpoint.
|
|
16
|
+
- Localized English and Simplified Chinese UI, original sidebar icon, CI, and
|
|
17
|
+
release packaging.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
dsh-reverse-engine
|
|
2
|
+
Copyright 2026 Zmang-Tech
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
4
|
+
|
|
5
|
+
This product integrates with REA, an independently developed project
|
|
6
|
+
distributed under the MIT License:
|
|
7
|
+
|
|
8
|
+
REA — Reverse Engineer Anything
|
|
9
|
+
https://github.com/morluto/rea
|
|
10
|
+
Copyright (c) 2026 morluto
|
|
11
|
+
|
|
12
|
+
The plugin does not vendor or modify REA source code. It declares the published
|
|
13
|
+
`rea-agents` npm package as a runtime dependency, resolves it at runtime, and
|
|
14
|
+
communicates with its public MCP stdio protocol. It also asks that package to
|
|
15
|
+
install its bundled `reverse-engineer-anything` skill when the user explicitly
|
|
16
|
+
requests it, and to write per-client MCP registrations on request.
|
|
17
|
+
|
|
18
|
+
REA's MIT license text:
|
|
19
|
+
|
|
20
|
+
MIT License
|
|
21
|
+
|
|
22
|
+
Copyright (c) 2026 morluto
|
|
23
|
+
|
|
24
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
25
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
26
|
+
in the Software without restriction, including without limitation the rights
|
|
27
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
28
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
29
|
+
furnished to do so, subject to the following conditions:
|
|
30
|
+
|
|
31
|
+
The above copyright notice and this permission notice shall be included in all
|
|
32
|
+
copies or substantial portions of the Software.
|
|
33
|
+
|
|
34
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
35
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
36
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
37
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
38
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
39
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
40
|
+
SOFTWARE.
|
|
41
|
+
|
|
42
|
+
The catalog metadata in lib/rea-catalog.json (tool-to-family names and counts)
|
|
43
|
+
was generated from the installed `rea-agents` 7.0.0 package to group live tools
|
|
44
|
+
in the console. The supported-client list in lib/rea-clients.json was generated
|
|
45
|
+
from REA's public documentation table. Both are data derived from the public
|
|
46
|
+
package and are refreshed when the pinned dependency changes.
|
|
47
|
+
|
|
48
|
+
DeepSeek Harness is a separate product; this plugin uses its documented bundle,
|
|
49
|
+
tool, route, and client-slot extension points and does not include Harness code.
|
package/README.md
CHANGED
|
@@ -1,3 +1,125 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-reverse-engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
REA (**Reverse Engineer Anything**) for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):
|
|
4
|
+
a sidebar console and an agent tool bridge for local reverse engineering.
|
|
5
|
+
|
|
6
|
+
The plugin owns one local [REA](https://github.com/morluto/rea) engine
|
|
7
|
+
(`rea-agents`, MIT) and exposes it three ways:
|
|
8
|
+
|
|
9
|
+
- **Sidebar console** — engine and Node.js runtime status, the complete
|
|
10
|
+
274-tool catalog with a runnable JSON editor, REA's six guided workflows,
|
|
11
|
+
analysis-provider readiness, and the live engine log.
|
|
12
|
+
- **DeepSeek Harness tools** — `rea_tools`, `rea_call`, `rea_status`,
|
|
13
|
+
`rea_workflow`, plus the 11 core REA tools under their canonical names
|
|
14
|
+
(`binary_session`, `open_binary`, `inspect_artifact`, `analyze_function`, …).
|
|
15
|
+
- **Other agent clients** — preview and apply `rea setup` for 43 clients such
|
|
16
|
+
as Claude Code, Codex, Cursor, Gemini CLI, Qwen Code, OpenCode, Windsurf,
|
|
17
|
+
Cline, Zed, Kimi, and Goose. An optional HTTP MCP endpoint covers agents that
|
|
18
|
+
cannot spawn a stdio child.
|
|
19
|
+
|
|
20
|
+
Targets and results stay on the machine. The plugin never uploads a target or
|
|
21
|
+
an analysis result.
|
|
22
|
+
|
|
23
|
+
## Why it exists
|
|
24
|
+
|
|
25
|
+
REA ships a CLI, an MCP server, and per-client setup. This plugin adds the part
|
|
26
|
+
DeepSeek Harness users need: a native sidebar workspace, model-facing tools that
|
|
27
|
+
fit the Harness tool budget, and one place to see whether the engine, the Node.js
|
|
28
|
+
runtime, the skill, and the analysis providers are actually ready.
|
|
29
|
+
|
|
30
|
+
The plugin is an independent integration. It does not copy or modify REA source;
|
|
31
|
+
it resolves the published `rea-agents` package at runtime and speaks its public
|
|
32
|
+
MCP protocol. See [NOTICE](NOTICE).
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
| Requirement | Notes |
|
|
37
|
+
|---|---|
|
|
38
|
+
| DeepSeek Harness | A Web profile with the sidebar, tools, and connection services. |
|
|
39
|
+
| Node.js 22.23.4+, 24.22.1+, or 26.12.1+ | REA's supported range. The Node.js embedded in DSH Desktop is older on some releases, so the plugin prefers a system Node.js and shows the one it found in the console. |
|
|
40
|
+
| REA engine | Installed automatically as the plugin dependency. If the plugin is linked from a local checkout, use **Install REA runtime** in the console. |
|
|
41
|
+
| Native analysis engine (optional) | Ghidra 12.x, IDA with an MCP adapter, Hopper (macOS/Linux), or Kuna. Bring your own; the plugin only reports readiness. Static JavaScript/Electron analysis and most artifact inspection need no native engine. |
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# From npm (once published)
|
|
47
|
+
# Plugins → Add plugin → Install from npm → dsh-reverse-engine
|
|
48
|
+
|
|
49
|
+
# Local checkout
|
|
50
|
+
# Plugins → Add plugin → choose this directory
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Enable the bundle, open a new session, and use the **Reverse engineering** entry
|
|
54
|
+
in the left sidebar.
|
|
55
|
+
|
|
56
|
+
## Use
|
|
57
|
+
|
|
58
|
+
### From the sidebar
|
|
59
|
+
|
|
60
|
+
- **Overview** — engine state, REA and Node.js versions, tool count, exposure
|
|
61
|
+
size, skill state, provider readiness, recent calls, and the engine log.
|
|
62
|
+
- **Tools** — search 274 operations by name, description, or family. Edit the
|
|
63
|
+
JSON arguments (a sample is generated from the tool schema), run it, and copy
|
|
64
|
+
the equivalent `rea_call` or CLI command.
|
|
65
|
+
- **Clients** — register the same engine with another vendor's agent. Every
|
|
66
|
+
write shows REA's dry-run plan first; REA backs up and merges the existing
|
|
67
|
+
configuration.
|
|
68
|
+
- **Workflows** — render REA's guided investigation prompts.
|
|
69
|
+
- **Settings** — runtime paths, tool exposure, timeouts, HTTP endpoint, and
|
|
70
|
+
provider environment variables.
|
|
71
|
+
- **Logs** — tool calls, structured engine events, and stderr.
|
|
72
|
+
|
|
73
|
+
### From an agent
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
Use REA to explain how this packaged app implements feature search.
|
|
77
|
+
The target is D:\apps\example\resources\app.asar.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The model searches with `rea_tools`, then calls `rea_call` or a cached core
|
|
81
|
+
tool. The shipped `reverse-engineer-anything` skill supplies the investigation
|
|
82
|
+
method and Evidence rules.
|
|
83
|
+
|
|
84
|
+
### Tool exposure
|
|
85
|
+
|
|
86
|
+
| Mode | Registers | Typical schema cost |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `core` (default) | 11 core tools + 3 dispatchers | about 6k tokens |
|
|
89
|
+
| `families` | Every tool in the selected families | depends on the selection |
|
|
90
|
+
| `all` | All 274 tools | about 100k tokens |
|
|
91
|
+
|
|
92
|
+
`rea_tools` and `rea_call` reach every operation in every mode.
|
|
93
|
+
|
|
94
|
+
## Security and limits
|
|
95
|
+
|
|
96
|
+
- REA runs locally. Native analysis may launch Ghidra, IDA, Hopper, debuggers,
|
|
97
|
+
or Frida against the target the user names; those side effects belong to REA
|
|
98
|
+
and are reported by its Evidence.
|
|
99
|
+
- The HTTP MCP endpoint has no authentication. It listens on `127.0.0.1` by
|
|
100
|
+
default and serves one stateful client at a time; only bind it elsewhere on a
|
|
101
|
+
trusted network.
|
|
102
|
+
- Installing a client registration edits that client's configuration file.
|
|
103
|
+
Preview first; REA creates a backup.
|
|
104
|
+
- The plugin does not install Node.js, Ghidra, IDA, Hopper, Kuna, Java, or
|
|
105
|
+
platform SDKs.
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm install # pulls the pinned rea-agents dependency
|
|
111
|
+
npm run check # metadata validation + tests
|
|
112
|
+
node --test tests/*.test.mjs
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The Host half is plain ESM (`index.js`, `lib/`). The Client half is a
|
|
116
|
+
`window.__ModuleLoader__` factory (`client.js`) with no build step. See
|
|
117
|
+
[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the runtime bridge,
|
|
118
|
+
[docs/CONTRACT.md](docs/CONTRACT.md) for the HTTP API, and
|
|
119
|
+
[docs/VERIFICATION.md](docs/VERIFICATION.md) for what was exercised in this
|
|
120
|
+
release.
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
Apache-2.0. REA is MIT-licensed and is used as an external dependency; see
|
|
125
|
+
[NOTICE](NOTICE).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# dsh-reverse-engine
|
|
2
|
+
|
|
3
|
+
把 [REA](https://github.com/morluto/rea)(Reverse Engineer Anything)接入
|
|
4
|
+
[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness):
|
|
5
|
+
侧边栏控制台 + Agent 工具桥,用于本机逆向分析。
|
|
6
|
+
|
|
7
|
+
插件拥有一个本地 REA 引擎(`rea-agents`,MIT 许可),并通过三种方式使用:
|
|
8
|
+
|
|
9
|
+
- **侧边栏控制台**:引擎与 Node.js 运行时状态、完整 274 个工具的目录与可执行
|
|
10
|
+
JSON 参数编辑、6 个引导式工作流、分析引擎就绪情况、实时日志。
|
|
11
|
+
- **DeepSeek Harness 工具**:`rea_tools`、`rea_call`、`rea_status`、
|
|
12
|
+
`rea_workflow`,以及 11 个核心 REA 工具的原名注册
|
|
13
|
+
(`binary_session`、`open_binary`、`inspect_artifact`、`analyze_function` 等)。
|
|
14
|
+
- **其他厂商 Agent**:为 Claude Code、Codex、Cursor、Gemini CLI、Qwen Code、
|
|
15
|
+
OpenCode、Windsurf、Cline、Zed、Kimi、Goose 等 43 个客户端预览并写入
|
|
16
|
+
`rea setup` 注册;另有可选 HTTP MCP 端点,供无法启动 stdio 子进程的 Agent 使用。
|
|
17
|
+
|
|
18
|
+
目标文件和分析结果都留在本机,插件不会上传。
|
|
19
|
+
|
|
20
|
+
## 为什么需要它
|
|
21
|
+
|
|
22
|
+
REA 自带 CLI、MCP 服务和逐客户端 setup。本插件补齐 DeepSeek Harness 场景:
|
|
23
|
+
原生侧边栏工作区、符合 Harness 工具预算的模型工具,以及一个集中查看引擎、
|
|
24
|
+
Node.js、技能与分析引擎是否就绪的地方。
|
|
25
|
+
|
|
26
|
+
本插件是独立集成,不复制、不修改 REA 源码;运行时解析官方发布的
|
|
27
|
+
`rea-agents` 包并按其公开 MCP 协议通信。见 [NOTICE](NOTICE)。
|
|
28
|
+
|
|
29
|
+
## 环境要求
|
|
30
|
+
|
|
31
|
+
| 要求 | 说明 |
|
|
32
|
+
|---|---|
|
|
33
|
+
| DeepSeek Harness | 带侧边栏、工具和 connection 服务的 Web profile。 |
|
|
34
|
+
| Node.js 22.23.4+ / 24.22.1+ / 26.12.1+ | REA 支持的版本范围。DSH 桌面内置的 Node 版本可能偏低,插件会优先使用系统 Node.js,并在控制台显示实际使用的版本。 |
|
|
35
|
+
| REA 引擎 | 作为插件依赖自动安装。若以本地目录方式链接安装,请使用控制台的「安装 REA 运行时」。 |
|
|
36
|
+
| 原生分析引擎(可选) | Ghidra 12.x、带 MCP 适配器的 IDA、Hopper(macOS/Linux)或 Kuna。需用户自行安装,插件只报告就绪状态。静态 JavaScript/Electron 分析与多数制品检查不需要原生引擎。 |
|
|
37
|
+
|
|
38
|
+
## 安装
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# npm(发布后)
|
|
42
|
+
# Plugins → Add plugin → Install from npm → dsh-reverse-engine
|
|
43
|
+
|
|
44
|
+
# 本地目录
|
|
45
|
+
# Plugins → Add plugin → 选择本目录
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
启用 bundle,新建会话,在左侧边栏打开「逆向工程」。
|
|
49
|
+
|
|
50
|
+
## 使用
|
|
51
|
+
|
|
52
|
+
### 侧边栏
|
|
53
|
+
|
|
54
|
+
- **概览**:引擎状态、REA/Node.js 版本、工具数量、暴露的 schema 体积、技能状态、
|
|
55
|
+
分析引擎就绪情况、最近调用和日志。
|
|
56
|
+
- **工具**:按名称、描述或工具族搜索 274 个操作;根据 schema 生成参数示例,
|
|
57
|
+
编辑 JSON 并执行,复制等价的 `rea_call` 或 CLI 命令。
|
|
58
|
+
- **客户端**:把同一个引擎注册到其他厂商 Agent。写入前先展示 REA 的 dry-run
|
|
59
|
+
计划;REA 会备份并合并现有配置。
|
|
60
|
+
- **工作流**:渲染 REA 内置的引导式调查流程。
|
|
61
|
+
- **设置**:运行时路径、工具暴露范围、超时、HTTP 端点、分析引擎环境变量。
|
|
62
|
+
- **日志**:调用记录、结构化引擎事件与 stderr。
|
|
63
|
+
|
|
64
|
+
### 在 Agent 中使用
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
用 REA 分析这个应用的功能搜索是怎么实现的,目标在
|
|
68
|
+
D:\apps\example\resources\app.asar。
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
模型先用 `rea_tools` 搜索,再调用 `rea_call` 或已注册的核心工具。
|
|
72
|
+
`reverse-engineer-anything` 技能提供调查方法和 Evidence 规则。
|
|
73
|
+
|
|
74
|
+
### 工具暴露
|
|
75
|
+
|
|
76
|
+
| 模式 | 注册内容 | schema 约占用 |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `core`(默认) | 11 个核心工具 + 3 个调度工具 | 约 6k tokens |
|
|
79
|
+
| `families` | 所选工具族中的全部工具 | 取决于选择 |
|
|
80
|
+
| `all` | 全部 274 个工具 | 约 100k tokens |
|
|
81
|
+
|
|
82
|
+
任何模式下都可以通过 `rea_tools` 和 `rea_call` 访问全部操作。
|
|
83
|
+
|
|
84
|
+
## 安全与限制
|
|
85
|
+
|
|
86
|
+
- REA 在本机运行。原生分析可能启动 Ghidra、IDA、Hopper、调试器或 Frida
|
|
87
|
+
操作用户指定的目标;这些副作用属于 REA,并由其 Evidence 报告。
|
|
88
|
+
- HTTP MCP 端点没有认证,默认只监听 `127.0.0.1`,一次服务一个有状态客户端;
|
|
89
|
+
仅在可信网络中绑定其他地址。
|
|
90
|
+
- 注册客户端会修改该客户端的配置文件,请先预览;REA 会创建备份。
|
|
91
|
+
- 插件不会安装 Node.js、Ghidra、IDA、Hopper、Kuna、Java 或平台 SDK。
|
|
92
|
+
|
|
93
|
+
## 开发
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm install # 安装固定版本的 rea-agents 依赖
|
|
97
|
+
npm run check # 元数据校验 + 测试
|
|
98
|
+
node --test tests/*.test.mjs
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Host 半部分是普通 ESM(`index.js`、`lib/`);Client 半部分是
|
|
102
|
+
`window.__ModuleLoader__` 工厂(`client.js`),无需构建。运行时桥见
|
|
103
|
+
[docs/ARCHITECTURE.md](docs/ARCHITECTURE.md),HTTP API 见
|
|
104
|
+
[docs/CONTRACT.md](docs/CONTRACT.md)。
|
|
105
|
+
|
|
106
|
+
## 许可
|
|
107
|
+
|
|
108
|
+
Apache-2.0。REA 使用 MIT 许可,作为外部依赖使用;见 [NOTICE](NOTICE)。
|