@dsh-plus/agent-preset-rea 0.0.0-stage → 0.1.1
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/lib/client.js +1197 -0
- package/lib/index.d.ts +431 -0
- package/lib/index.js +1224 -0
- package/package.json +61 -3
- package/skills/reverse-engineer-anything/LICENSE +21 -0
- package/skills/reverse-engineer-anything/SKILL.md +342 -0
- package/skills/reverse-engineer-anything/references/android-applications.md +34 -0
- package/skills/reverse-engineer-anything/references/connection-and-recovery.md +127 -0
- package/skills/reverse-engineer-anything/references/evidence-workflows.md +71 -0
- package/skills/reverse-engineer-anything/references/javascript-applications.md +175 -0
- package/skills/reverse-engineer-anything/references/native-and-artifacts.md +277 -0
- package/skills/reverse-engineer-anything/references/runtime-observation.md +78 -0
- package/src/client/api.ts +76 -0
- package/src/client/card.tsx +145 -0
- package/src/client/client.ts +51 -0
- package/src/client/draft.ts +55 -0
- package/src/client/i18n.ts +134 -0
- package/src/client/install.tsx +274 -0
- package/src/client/styles.ts +57 -0
- package/src/config.ts +121 -0
- package/src/definition.ts +245 -0
- package/src/dto.ts +87 -0
- package/src/exec.ts +155 -0
- package/src/index.ts +186 -0
- package/src/jobs.ts +145 -0
- package/src/manager.ts +419 -0
- package/src/mcp.ts +83 -0
- package/src/ns.ts +9 -0
- package/src/prompt.ts +25 -0
- package/src/registration.ts +86 -0
- package/src/routes.ts +181 -0
- package/src/skill.ts +34 -0
- package/README.md +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/agent-preset-rea",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "dsh-plus service + UI plugin: 注册逆向工程 agent preset(id=rea)——官方 standard 全量行镜像 + 预设作用域的 REA MCP 客户端(mcp__rea__*)、随包 REA 官方 skill、提示词卡片与 REA/skill 的受管安装更新",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"default": "./lib/client.js"
|
|
15
|
+
},
|
|
16
|
+
"./src/*": "./src/*",
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"lib",
|
|
21
|
+
"src",
|
|
22
|
+
"skills"
|
|
23
|
+
],
|
|
24
|
+
"dsh": {
|
|
25
|
+
"client": {
|
|
26
|
+
"inject": [
|
|
27
|
+
"@deepseek-ai/dsh-client-locale",
|
|
28
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
29
|
+
"@deepseek-ai/dsh-api-remotes"
|
|
30
|
+
],
|
|
31
|
+
"platform": "web"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@dsh-plus/shared": "0.1.40"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@deepseek-ai/cordis": "^4.0.5-alpha.2",
|
|
39
|
+
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.1-alpha.3",
|
|
40
|
+
"@deepseek-ai/schemastery": "^3.18.5-alpha.2"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@deepseek-ai/cordis": "4.0.5-alpha.2",
|
|
44
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.3",
|
|
46
|
+
"@deepseek-ai/schemastery": "3.18.5-alpha.2",
|
|
47
|
+
"@types/react": "~18.3.31",
|
|
48
|
+
"react": "^18.2.0",
|
|
49
|
+
"yaml": "^2.9.0"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/A-G-guy/dsh-plus.git",
|
|
58
|
+
"directory": "packages/agent-preset-rea"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsdown",
|
|
62
|
+
"watch": "tsdown --watch"
|
|
63
|
+
}
|
|
6
64
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 morluto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reverse-engineer-anything
|
|
3
|
+
description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
|
|
4
|
+
metadata:
|
|
5
|
+
version: "42"
|
|
6
|
+
tool_count: 207
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# REA
|
|
10
|
+
|
|
11
|
+
Use REA when a claim depends on a shipped binary or package, decompilation,
|
|
12
|
+
passive application runtime evidence, or comparison with
|
|
13
|
+
behavior not established by available source. For ordinary analysis of a
|
|
14
|
+
complete source repository, use normal repository tools and do not run REA
|
|
15
|
+
readiness or provider commands.
|
|
16
|
+
|
|
17
|
+
## Connect only when needed
|
|
18
|
+
|
|
19
|
+
Installing this skill supplies instructions; it does not register the REA MCP
|
|
20
|
+
server, install analysis engines, or add tools to an already-running agent.
|
|
21
|
+
|
|
22
|
+
If REA tools are available and their registration is not known to be stale,
|
|
23
|
+
proceed directly to the target. Do not run diagnostics or setup before every
|
|
24
|
+
investigation. Use the connected server's actual tool list and input schemas;
|
|
25
|
+
a skill installed from repository main may describe capabilities absent from
|
|
26
|
+
an older npm release. Keep complete inline Evidence when that server does not
|
|
27
|
+
advertise retained references.
|
|
28
|
+
|
|
29
|
+
If tools are absent, a call is blocked by the client, or a required provider is
|
|
30
|
+
unavailable, read [connection and recovery](references/connection-and-recovery.md).
|
|
31
|
+
Diagnose the observed blocker, continue useful supported work, and resume the
|
|
32
|
+
original task after repair. Client approval, shell PATH, registration and engine
|
|
33
|
+
availability have different remedies; avoid repeating setup for all of them.
|
|
34
|
+
|
|
35
|
+
1. Diagnose without changing REA or client configuration. `npx` may download
|
|
36
|
+
the package and write to npm's cache. For Codex, run
|
|
37
|
+
`npx -y rea-agents@6.5.0 doctor --client codex --json`. Substitute the current
|
|
38
|
+
supported client: `claude_code`, `claude_desktop`, `codex`, `cursor`,
|
|
39
|
+
`gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`, `copilot_cli`,
|
|
40
|
+
`commandcode`, `vscode`, `grok_build`, `omp`, or `grok_bot`. `grok_bot` has no local
|
|
41
|
+
file registration: doctor reports the Grok Bot chat step, and setup does not
|
|
42
|
+
write `mcp.json`. If the client is unknown, use `doctor --json` and
|
|
43
|
+
inspect its registration results before choosing a setup scope.
|
|
44
|
+
2. Distinguish the reason. Missing, malformed, or stale registration needs a
|
|
45
|
+
scoped configuration repair. An aligned registration with no tools in the
|
|
46
|
+
active session needs a restart/reconnection; doctor cannot prove that the
|
|
47
|
+
current agent has connected. A missing provider affects only tasks requiring
|
|
48
|
+
that provider: static JavaScript inspection needs neither Hopper nor Ghidra,
|
|
49
|
+
and Android inspection has separate bring-your-own JADX/Java prerequisites.
|
|
50
|
+
3. For a configuration repair, prepare the read-only plan:
|
|
51
|
+
`npx -y rea-agents@6.5.0 setup --client codex --dry-run --json`.
|
|
52
|
+
Use the current client's ID, show its exact proposed paths, backups, and
|
|
53
|
+
changes, and obtain approval before setup writes configuration or installs
|
|
54
|
+
Hopper. Setup normally installs the matching bundled skill too; include that
|
|
55
|
+
replacement in the reviewed plan. After approval, apply the same scope with
|
|
56
|
+
`npx -y rea-agents@6.5.0 setup --client codex --yes`. Add `--install-hopper`
|
|
57
|
+
only if that separate installation was needed and explicitly approved.
|
|
58
|
+
4. Restart/reconnect the affected agent. Verify that REA tools actually appear
|
|
59
|
+
in the session, then resume the original investigation. If they remain
|
|
60
|
+
absent, inspect the client's MCP launch error rather than repeating setup.
|
|
61
|
+
|
|
62
|
+
REA setup never installs or upgrades Node.js, npm, Homebrew, Java, Ghidra, IDA,
|
|
63
|
+
JADX, Binwalk, or Unblob. Use existing prerequisites; do not install unrelated
|
|
64
|
+
software to repair
|
|
65
|
+
MCP registration. For an unsupported client, use manual stdio registration
|
|
66
|
+
with a version-pinned `rea-agents` package or continue through the CLI.
|
|
67
|
+
|
|
68
|
+
A concrete CLI fallback for an operator-supplied JavaScript tree or ASAR is:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx -y rea-agents@6.5.0 analyze-javascript-application /absolute/path/to/app --json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
No MCP registration or native engine is required. Read the returned Evidence,
|
|
75
|
+
graph, limitations, and unknowns with the same care as an MCP result; the CLI
|
|
76
|
+
returns the Evidence record directly. This fallback does not establish that
|
|
77
|
+
MCP is configured. Native CLI tasks still require their selected engine.
|
|
78
|
+
Prefer an existing `rea` CLI. When none is installed and REA package acquisition
|
|
79
|
+
is within the authorized scope, use `npx -y rea-agents@6.5.0` in its place.
|
|
80
|
+
Configuration repair starts with a read-only setup plan; show paths, backups and
|
|
81
|
+
skill replacement before applying authorized changes. Preserve existing approval
|
|
82
|
+
and target-execution boundaries. REA setup never installs or upgrades unrelated
|
|
83
|
+
software, including Node.js, npm, Homebrew, Java, Ghidra, IDA, JADX, Binwalk or Unblob.
|
|
84
|
+
|
|
85
|
+
## Route the target first
|
|
86
|
+
|
|
87
|
+
Choose the first tool from the target the user supplied. Use `open_binary` for
|
|
88
|
+
active-target native or archive workflows; target-free tools take their own
|
|
89
|
+
explicit path or endpoint and do not need it.
|
|
90
|
+
|
|
91
|
+
- ASAR or extracted JavaScript/Electron tree:
|
|
92
|
+
`analyze_javascript_application`.
|
|
93
|
+
- Archive/package member inventory (ZIP/APK/IPA/MSIX/AppX or DMG):
|
|
94
|
+
`open_binary` with the supplied local path; use `inspect_artifact` when its
|
|
95
|
+
graph and findings help answer the question.
|
|
96
|
+
- Android APK code, classes, methods, or incoming references:
|
|
97
|
+
`inspect_android_package`, then focused Android tools when advertised.
|
|
98
|
+
Archive member inventory still uses the archive route above.
|
|
99
|
+
- Managed PE/CLI assembly: `inspect_managed_artifact`.
|
|
100
|
+
- Firmware image: `inspect_firmware_regions` when advertised. Use
|
|
101
|
+
`extract_firmware` when extraction is requested, with a caller-selected new
|
|
102
|
+
absolute output directory. These tools use caller-supplied Binwalk/Unblob on
|
|
103
|
+
Linux; see the [firmware guide](https://github.com/morluto/rea/blob/main/docs/firmware-analysis.md).
|
|
104
|
+
- .NET NativeAOT PE/ELF: native Ghidra analysis. Native code can yield pseudocode;
|
|
105
|
+
consult the NativeAOT workflow in `references/native-and-artifacts.md` for
|
|
106
|
+
optional metadata recovery and its supported host/layout boundary.
|
|
107
|
+
- User-owned browser page already open: `list_browser_targets`.
|
|
108
|
+
- Browser action the agent must perform (click, type, navigate):
|
|
109
|
+
`capture_browser_scenario` with declared actions. See
|
|
110
|
+
[runtime observation](references/runtime-observation.md) for connect/launch
|
|
111
|
+
and the focused follow-up browser tools.
|
|
112
|
+
- Fiddler Everywhere traffic or a native `.saz` capture: read the
|
|
113
|
+
[Fiddler workflow](references/runtime-observation.md#fiddler-everywhere-traffic-debugging).
|
|
114
|
+
Inspect saved SAZ with `inspect_web_network_capture` and `format: "saz"`;
|
|
115
|
+
connect Everywhere's separate MCP server for live traffic.
|
|
116
|
+
- Retained HAR/SAZ/native mitmproxy/aioquic qlog capture: `inspect_web_network_capture`. Select
|
|
117
|
+
original record ordinals when useful; inspect producer fields and byte/number
|
|
118
|
+
sidecars without fetching recorded URLs or claiming live attribution. See
|
|
119
|
+
[historical captures](https://github.com/morluto/rea/blob/main/docs/web-network-captures.md) for the exact upstream
|
|
120
|
+
profile and credential exclusions. Qlog support starts with aioquic 1.5.0
|
|
121
|
+
JSON 0.3; stream coverage and endpoint loss declarations do not recover bodies
|
|
122
|
+
or establish network loss. Prefer detail summary, then kind qlog trace/stream
|
|
123
|
+
pages; select one trace, stream ID and direction for contribution/range pages.
|
|
124
|
+
Facts retain all-recorded-events-before-selection scope. Other qlog layouts
|
|
125
|
+
and PCAP correlation are unsupported.
|
|
126
|
+
- User-owned Electron runtime already open: `list_electron_targets`. Before an electron-main Inspector attempt, check packaged fuses with `inspect_electron_fuses`; disabled `EnableNodeCliInspectArguments` means the app ignores `--inspect`.
|
|
127
|
+
- Packet-field discovery: `inspect_packet_fields` searches installed protocols
|
|
128
|
+
and field names/types before choosing fields for `inspect_packet_capture`.
|
|
129
|
+
Query/page the relevant records; registrations do not establish observed traffic.
|
|
130
|
+
- Recorded packet captures: `inspect_packet_capture` with selected TShark fields,
|
|
131
|
+
display filters and decode-as rules. Requires Linux, util-linux prlimit and `REA_TSHARK_COMMAND`; see
|
|
132
|
+
[capture guide](https://github.com/morluto/rea/blob/main/docs/packet-captures.md).
|
|
133
|
+
Packet limits count input packets before filtering. Output defaults to 50 matching
|
|
134
|
+
frames; use `match_offset` / `match_limit` for later pages, or explicit null
|
|
135
|
+
limit for complete matching output. Preserve the source digest across pages.
|
|
136
|
+
This does not perform live capture.
|
|
137
|
+
For address/DNS/SNI/protocol summaries use `inspect_pcap_capture` with MCP
|
|
138
|
+
detail summary, then retained kind pcap pages. Requires Wireshark 4.x tshark
|
|
139
|
+
and capinfos, with Linux prlimit or Windows Job Objects; see
|
|
140
|
+
[packet summaries](https://github.com/morluto/rea/blob/main/docs/pcap-analysis.md).
|
|
141
|
+
Select an exact DNS question for address pages; page exhaustion does not prove
|
|
142
|
+
network completeness. This reads recordings and does not acquire traffic.
|
|
143
|
+
- Decoder discovery: `inspect_signal_decoders` searches installed decoder IDs
|
|
144
|
+
or selected decoder help, including channels and options. Query and page the
|
|
145
|
+
relevant details before choosing settings; this does not scan hardware.
|
|
146
|
+
- Recorded logic/signal traces: `decode_signal_recording` with explicit decoder,
|
|
147
|
+
channel and protocol settings. On Linux with util-linux prlimit, supply sigrok-cli 0.7.2 through
|
|
148
|
+
`REA_SIGROK_COMMAND`; see [recording guide](https://github.com/morluto/rea/blob/main/docs/signal-recordings.md).
|
|
149
|
+
Output defaults to 50 literal lines; select annotation classes and page with
|
|
150
|
+
`line_offset` / `line_limit`, or explicit null for all remaining output.
|
|
151
|
+
Window counts are display lines, not annotations or samples. Preserve source digests across pages.
|
|
152
|
+
This reads existing files; it does not acquire hardware signals.
|
|
153
|
+
- Explicit local WebAssembly artifact: `inspect_wasm_artifact`. Supply WABT 1.0.42
|
|
154
|
+
through `REA_WABT_BIN_DIRECTORY`; retain exact byte/tool identity and decoded WAT.
|
|
155
|
+
Select JavaScript glue and candidate paths explicitly and preserve URL/path
|
|
156
|
+
ambiguity. No implicit fetch or target execution; WAT is not original source.
|
|
157
|
+
See the [WASM guide](https://github.com/morluto/rea/blob/main/docs/wasm-artifacts.md).
|
|
158
|
+
- Explicit local EVM bytecode carrier: `inspect_evm_interface` with caller-selected
|
|
159
|
+
`raw` or `hex` encoding. Preserve carrier/decoded digests and treat selectors,
|
|
160
|
+
argument strings and mutability as inferred candidates; this performs no chain
|
|
161
|
+
lookup or target execution. For the complete inferred interface without hex or
|
|
162
|
+
duplicate stdout, discover support and select `detail: "summary"`; complete
|
|
163
|
+
Evidence stays retained under its original identity. Use the returned
|
|
164
|
+
`parent_evidence_id` for exact function or `bytecode_hex`/stdout/stderr pages.
|
|
165
|
+
Candidate coverage does not establish interface completeness. See the
|
|
166
|
+
[EVM bytecode guide](https://github.com/morluto/rea/blob/main/docs/evm-bytecode.md).
|
|
167
|
+
- Embedded Go compiler, module or build-setting metadata: `inspect_go_binary`
|
|
168
|
+
with the explicit local file. This built-in target-free inspection requires no
|
|
169
|
+
Go installation or disassembler. Preserve raw module bytes and source ranges;
|
|
170
|
+
absent metadata does not prove a binary is not Go, and unparsed text records
|
|
171
|
+
remain explicit. See the
|
|
172
|
+
[Go binary guide](https://github.com/morluto/rea/blob/main/docs/go-binaries.md).
|
|
173
|
+
- Embedded cargo-auditable Rust dependency metadata: `inspect_rust_binary`
|
|
174
|
+
with the explicit local ELF, PE, or thin Mach-O file. This built-in
|
|
175
|
+
target-free inspection requires no Rust installation or disassembler. Preserve
|
|
176
|
+
package order, dependency indices, and the section file range. A missing
|
|
177
|
+
`.dep-v0` section is null metadata, not proof the binary has no dependencies.
|
|
178
|
+
A rustc commit hash is an inference from a read-only `/rustc/<40-hex>/` path.
|
|
179
|
+
See the
|
|
180
|
+
[Rust binary guide](https://github.com/morluto/rea/blob/main/docs/rust-binaries.md).
|
|
181
|
+
|
|
182
|
+
- Explicit local SQLite database snapshot: `inspect_sqlite_database`. Inspect
|
|
183
|
+
with Node.js 24.x >=24.15 or 26+ providing native SQLite limits. Read schema
|
|
184
|
+
first (compact inventory by default), or select an exact ordinary table
|
|
185
|
+
and `columns` when rows are needed. Defaults are selected-table schema and
|
|
186
|
+
20 rows; request `schema_scope: "database"` for the complete stored schema. Preserve both database and existing sibling WAL identity; row samples
|
|
187
|
+
report truncation and have unspecified order. Use a quiescent snapshot rather
|
|
188
|
+
than assuming a live database/WAL pair was copied atomically. See the
|
|
189
|
+
[SQLite guide](https://github.com/morluto/rea/blob/main/docs/sqlite-databases.md).
|
|
190
|
+
- Explicit Linux ELF file for offline layout, symbols, relocations or static
|
|
191
|
+
mitigation evidence: `inspect_binary_layout`. This target-free operation uses
|
|
192
|
+
caller-supplied pwntools without opening a disassembler database. Preserve its
|
|
193
|
+
raw locations and inference/coverage limits; see the
|
|
194
|
+
[offline binary guide](https://github.com/morluto/rea/blob/main/docs/binary-diagnostics.md).
|
|
195
|
+
- Supplied Linux x86-64 ELF core: `inspect_recorded_crash`. Read every recorded
|
|
196
|
+
thread, raw note and source-bound register without opening a live target.
|
|
197
|
+
Historical PIDs do not select live processes. Request `include_debugger_context`
|
|
198
|
+
only when core-only mapping candidates help; see the
|
|
199
|
+
[recorded crash guide](https://github.com/morluto/rea/blob/main/docs/recorded-crashes.md).
|
|
200
|
+
- PE resource type/name/language trees and static icon group references:
|
|
201
|
+
`inspect_pe_resources` with an explicit path. This portable operation requires
|
|
202
|
+
no active target or engine; opaque payloads retain file ranges and SHA-256.
|
|
203
|
+
- Native executable, library, or analysis database: `open_binary`, then
|
|
204
|
+
use focused analysis tools directly; call `binary_overview` when metadata or
|
|
205
|
+
inventory context is useful and available from the selected provider.
|
|
206
|
+
|
|
207
|
+
For an existing IDA MCP configuration, use `open_binary` with the original
|
|
208
|
+
input binary and `provider_id: "ida"`; do not pass an `.idb` or `.i64` database.
|
|
209
|
+
The legacy attached profile binds the already-open GUI input by SHA-256 and
|
|
210
|
+
leaves its database open. The modern headless profile creates and closes an
|
|
211
|
+
owned private database without saving. Installation and registration reuse
|
|
212
|
+
[mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp); see the
|
|
213
|
+
[IDA provider guide](https://github.com/morluto/rea/blob/main/docs/ida-provider.md).
|
|
214
|
+
Proceed directly to `analyze_function`, pseudocode, or function/string searches
|
|
215
|
+
after opening; IDA does not supply `binary_overview`. Consult session availability
|
|
216
|
+
when composing broader workflows. Modern direct callers and unsupported dossier
|
|
217
|
+
facets remain unknown; live IDA results are not replayed from snapshots.
|
|
218
|
+
|
|
219
|
+
If the user says only "my app" without a name, path, or target already selected
|
|
220
|
+
for this task, ask which app before searching for artifacts. Paths in unrelated
|
|
221
|
+
saved reports and nearby test fixtures do not select the user's target. Resolve
|
|
222
|
+
an actual human-readable app name to one clear installed artifact when possible;
|
|
223
|
+
ask when matches are ambiguous. Never choose an example app on the user's behalf.
|
|
224
|
+
|
|
225
|
+
In a target-free session, use `open_binary` to bind any archive/package or
|
|
226
|
+
native target whose analysis tool operates on the active target. Do not call an
|
|
227
|
+
unadvertised tool; inspect `binary_session` with `{}` and its
|
|
228
|
+
`result.tool_availability` for availability reasons and remediation. Expand each
|
|
229
|
+
group's `names` into entries, inheriting the inventory-level client requirements
|
|
230
|
+
unless the group overrides them. In its closed effect and annotation vocabularies,
|
|
231
|
+
listed flags are true and omitted known flags are false. The grouped name union
|
|
232
|
+
is the complete tool inventory; use `tools/list` for canonical tool schemas.
|
|
233
|
+
Provider candidate facts describe possible providers, while top-level session
|
|
234
|
+
capabilities describe the current route and `analysis_provider_binding` names the
|
|
235
|
+
selected provider. Do not treat those scopes as interchangeable.
|
|
236
|
+
|
|
237
|
+
## Work summary-first
|
|
238
|
+
|
|
239
|
+
Start with the default result and use its inline Evidence and graph context.
|
|
240
|
+
For a JavaScript application or ELF layout whose size is unknown or large,
|
|
241
|
+
call `analyze_javascript_application` or `inspect_binary_layout` with
|
|
242
|
+
`"detail": "summary"`, then inspect the retained `parent_evidence_id` with
|
|
243
|
+
`inspect_analysis_view`.
|
|
244
|
+
Page module identities and select the returned `node_id` before requesting an
|
|
245
|
+
item; a single file path can represent several graph roles. Do not repeat an
|
|
246
|
+
identical analysis or rejected call without a changed input or resolved blocker.
|
|
247
|
+
Recheck session state when a lifecycle change makes that status useful.
|
|
248
|
+
Make a focused follow-up only when the
|
|
249
|
+
returned result leaves a specific question unanswered.
|
|
250
|
+
|
|
251
|
+
If MCP reports `resource_constraint` with `details.resource: "transport"`, call
|
|
252
|
+
`inspect_analysis_view` with its reported same-session Evidence reference for a
|
|
253
|
+
summary, one section/module, or a stable page. Use `trace_application_feature`
|
|
254
|
+
once a seed is known, or call `export_evidence_bundle` to write the complete
|
|
255
|
+
session to a selected path. The analysis remains complete in the ledger; avoid
|
|
256
|
+
repeating it merely to request the same oversized response. Complete CLI JSON
|
|
257
|
+
output also streams without a single MCP frame.
|
|
258
|
+
|
|
259
|
+
When the retained parent ID is unknown, use `get_evidence_bundle` with
|
|
260
|
+
`detail: "summary"` and exact filters for operation, target SHA-256,
|
|
261
|
+
analysis-profile digest or canonical procedure address. Select its returned
|
|
262
|
+
Evidence ID for the next view instead of requesting the complete bundle.
|
|
263
|
+
`retention: "complete-record"` means the whole record is stored; native
|
|
264
|
+
value-flow truncation and unknown metadata remain separate. For an exported
|
|
265
|
+
portable bundle, use `rea inspect-evidence-bundle` with JSON containing `path`,
|
|
266
|
+
`detail: "summary"` and the same `filters`. Reading that file still requires
|
|
267
|
+
validating its full contents within the local memory budget.
|
|
268
|
+
|
|
269
|
+
A client can also truncate a successful tool result without a REA transport
|
|
270
|
+
error. Treat that preview as incomplete; use the retained parent ID for smaller
|
|
271
|
+
views or export when the full record is needed. Do not parse the preview as
|
|
272
|
+
canonical JSON or repeat the producer. For JavaScript, read the
|
|
273
|
+
[module-view and trace recipes](references/javascript-applications.md) before
|
|
274
|
+
drilling into a large graph; a broad bidirectional trace can expand unrelated
|
|
275
|
+
containment relationships even after summary analysis.
|
|
276
|
+
|
|
277
|
+
Every conclusion must distinguish observations, inferences, and unknowns. Cite
|
|
278
|
+
Evidence IDs, preserve limitations and incomplete coverage, and never imply
|
|
279
|
+
that static analysis observed execution. Runtime requests execute the declared
|
|
280
|
+
target and lifecycle; do not broaden the target or action beyond those fields.
|
|
281
|
+
|
|
282
|
+
Within the user's requested investigation, call available analysis tools
|
|
283
|
+
directly. REA does not require permission grants or per-call approval flags.
|
|
284
|
+
The agent client can independently require approval. Follow the declared request
|
|
285
|
+
scope and the host's actual access requirements; use the recovery guide for an
|
|
286
|
+
observed client-policy rejection.
|
|
287
|
+
|
|
288
|
+
## Plan broader investigations
|
|
289
|
+
|
|
290
|
+
For requests that span multiple features or subsystems, use a staged workflow:
|
|
291
|
+
|
|
292
|
+
1. Turn the request into a checklist of questions and the evidence each answer
|
|
293
|
+
needs. Resolve target identity and constraints from the conversation and
|
|
294
|
+
workspace before asking for information again.
|
|
295
|
+
2. Inspect the current REA session, artifact identity, saved analysis database,
|
|
296
|
+
bookmarks, and prior evidence. Reuse matching state; do not open duplicate
|
|
297
|
+
sessions or repeat identical analysis.
|
|
298
|
+
3. Start with the smallest useful overview or inventory. Follow each question
|
|
299
|
+
from its entry point through relevant data and state changes to its result.
|
|
300
|
+
Batch related operations around a specific hypothesis, then expand only when
|
|
301
|
+
the returned evidence leaves a concrete gap.
|
|
302
|
+
4. Inspect relevant packaged resources and configuration alongside code when
|
|
303
|
+
they affect the question. Use format-aware inventory and parsers; do not
|
|
304
|
+
infer behavior from filenames, strings, or layout alone.
|
|
305
|
+
5. Corroborate a conclusion with the evidence type it requires. Use runtime
|
|
306
|
+
observation only when static evidence cannot answer the question and the
|
|
307
|
+
required host runtime and OS access are available. For JavaScript behavior,
|
|
308
|
+
run probes against the actual app through the available browser, Electron,
|
|
309
|
+
or process capture workflow.
|
|
310
|
+
6. Decompose work into independent questions. When parallel workers are
|
|
311
|
+
available and the questions do not depend on one another, assign distinct
|
|
312
|
+
scopes, point workers to existing evidence, and ask them to return sources,
|
|
313
|
+
conclusions, and unresolved gaps. Otherwise, work sequentially.
|
|
314
|
+
7. Keep a concise finding ledger linking each conclusion to Evidence IDs,
|
|
315
|
+
confidence/evidence type, search boundary, and remaining unknowns. Update
|
|
316
|
+
the shared index or investigation report so later passes can reuse results.
|
|
317
|
+
|
|
318
|
+
Before finishing, revisit the original checklist. Mark each question as
|
|
319
|
+
answered, partially answered, or unresolved based on its evidence; keep
|
|
320
|
+
bounded negative searches bounded, and do not describe a broad investigation
|
|
321
|
+
as complete while required questions remain open.
|
|
322
|
+
|
|
323
|
+
## Read only the relevant guide
|
|
324
|
+
|
|
325
|
+
- Native binaries, managed assemblies, archives, and extraction:
|
|
326
|
+
[references/native-and-artifacts.md](references/native-and-artifacts.md)
|
|
327
|
+
- ASARs, extracted JavaScript, feature tracing, and version comparison:
|
|
328
|
+
[references/javascript-applications.md](references/javascript-applications.md)
|
|
329
|
+
- Android APK declarations, classes, methods, and static references:
|
|
330
|
+
[references/android-applications.md](references/android-applications.md)
|
|
331
|
+
- Browser/Electron observation (passive and scenario) and static/runtime
|
|
332
|
+
reconciliation:
|
|
333
|
+
[references/runtime-observation.md](references/runtime-observation.md)
|
|
334
|
+
- Evidence paging, comparisons, residual unknowns, and verification:
|
|
335
|
+
[references/evidence-workflows.md](references/evidence-workflows.md)
|
|
336
|
+
|
|
337
|
+
## Finish the task
|
|
338
|
+
|
|
339
|
+
Explain findings in plain language and tie them to returned evidence. When the
|
|
340
|
+
user asks to build something, use normal coding tools and separate observed
|
|
341
|
+
behavior from design choices. Close an opened native session with
|
|
342
|
+
`close_binary` when the investigation is complete.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Android application artifacts
|
|
2
|
+
|
|
3
|
+
Use the connected server's advertised Android tools. Repository main and npm
|
|
4
|
+
4.1.0 include this family. A skill installation alone cannot add it to an
|
|
5
|
+
older server.
|
|
6
|
+
|
|
7
|
+
Start with `inspect_android_package` on the caller's APK path for package
|
|
8
|
+
identity, manifest declarations, coverage, and inline Evidence. Use
|
|
9
|
+
`search_android_classes` to find candidates, `inspect_android_class` for one
|
|
10
|
+
class's members, `inspect_android_method` for decompilation, and
|
|
11
|
+
`trace_android_references` for incoming static references. Each call takes its
|
|
12
|
+
own APK path and explicit selectors; do not open a native session first.
|
|
13
|
+
Choose an `overload_index` from the class inventory when methods are ambiguous
|
|
14
|
+
instead of guessing.
|
|
15
|
+
|
|
16
|
+
The provider requires a separately supplied headless JADX MCP JAR 0.7.1 and
|
|
17
|
+
Java 17 or newer. `REA_JADX_MCP_JAR` selects the absolute JAR path; `JAVA_HOME`
|
|
18
|
+
can select Java. REA setup does not install or configure that JAR, and doctor
|
|
19
|
+
provider scopes cover Hopper/Ghidra rather than JADX. Use existing tools and
|
|
20
|
+
report missing prerequisites for the Android task specifically.
|
|
21
|
+
|
|
22
|
+
Linux and macOS use the POSIX owned-process boundary. Windows x64 requires the
|
|
23
|
+
matching bundled native controls and uses an owned Job Object with bidirectional
|
|
24
|
+
stdio. A full JDK, including `jdk.compiler`, is required on every host; Windows
|
|
25
|
+
`JAVA_HOME` selects `bin\java.exe`. Consult the Android guide for actual host
|
|
26
|
+
verification coverage. Calls use one worker and provider deadlines; optional
|
|
27
|
+
`REA_JADX_HEAP_MIB` selects the JVM heap. The APK is never launched,
|
|
28
|
+
and no emulator is required.
|
|
29
|
+
|
|
30
|
+
Manifest entries and decompiled text are static observations, not execution or
|
|
31
|
+
policy enforcement. Incoming references are recovered static relationships;
|
|
32
|
+
reflection, dynamic loading, and unresolved calls remain unknown. Preserve
|
|
33
|
+
artifact digests, locations, diagnostics, and incomplete coverage. For archive
|
|
34
|
+
members rather than code analysis, use `open_binary` and `inspect_artifact`.
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Connection and task recovery
|
|
2
|
+
|
|
3
|
+
Read this guide only for an observed connection, command, approval or provider
|
|
4
|
+
blocker. Keep the user's target and question in view. Explain what prevented the
|
|
5
|
+
operation and the next useful step; after repair, continue the investigation.
|
|
6
|
+
|
|
7
|
+
Commands below use an installed `rea`. If none is available, use the package
|
|
8
|
+
invocation in `SKILL.md` when acquiring REA is authorized. Follow the connected
|
|
9
|
+
server's schemas and the installed CLI's help rather than assuming repository
|
|
10
|
+
main and an older release expose the same arguments.
|
|
11
|
+
|
|
12
|
+
## Choose the remedy from the observed failure
|
|
13
|
+
|
|
14
|
+
| Observation | Meaning and next step |
|
|
15
|
+
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| No REA tools in the active session | Inspect registration with `rea doctor --client codex --json`. A skill installation alone does not register MCP. |
|
|
17
|
+
| Missing, malformed or stale registration | Prepare a scoped setup plan; apply only authorized changes with backups. |
|
|
18
|
+
| Aligned registration, but no connected tools | Restart/reconnect the client. Doctor checks registration; it cannot establish the current agent's connection. Inspect the client's launch error if reconnection fails. |
|
|
19
|
+
| `MCP tool call requires approval, but approval policy is never` | Codex rejected the call before REA executed it. Do not install an engine or repeat setup to solve this client-policy decision. See the approval section below. |
|
|
20
|
+
| REA returns `provider_unavailable` or an unavailable tool entry | Read that operation's provider diagnostics or `binary_session.result.tool_availability`. Expand each group's tool names and inherit the shared client requirements unless overridden. Use the operation's availability, reason, and remediation; a complete tool catalog does not imply every operation is available. |
|
|
21
|
+
| `rea` is missing in a child shell, or Node is incompatible | Inspect the actual shell PATH and launcher/runtime. A prefix installation may be absent from a login shell's PATH; this does not establish a broken MCP registration. |
|
|
22
|
+
|
|
23
|
+
If the client cannot launch its shell/sandbox helper or read the installed skill,
|
|
24
|
+
inspect its launch diagnostic. For example, Codex can refuse helper aliases when
|
|
25
|
+
CODEX_HOME is under `/tmp`; use an authorized profile outside the OS temporary
|
|
26
|
+
directory. REA setup cannot repair the client's executor. Preserve the sandbox
|
|
27
|
+
instead of silently disabling it to make an analysis command work.
|
|
28
|
+
|
|
29
|
+
Static JavaScript and ordinary ZIP inventory need neither Hopper nor Ghidra.
|
|
30
|
+
HAR inspection is offline and does not require a live browser. Native
|
|
31
|
+
decompilation, Android analysis and firmware extraction have their own
|
|
32
|
+
bring-your-own prerequisites. Use supported inventory/static evidence when it
|
|
33
|
+
answers part of the question, and name the unavailable evidence separately.
|
|
34
|
+
Do not substitute another target. Label observations from ordinary shell tools
|
|
35
|
+
as such; only actual REA output supplies REA Evidence.
|
|
36
|
+
|
|
37
|
+
## Repair registration when needed
|
|
38
|
+
|
|
39
|
+
For Codex:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
rea doctor --client codex --json
|
|
43
|
+
rea setup --client codex --dry-run --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use the current supported client's ID: `claude_code`, `claude_desktop`, `codex`,
|
|
47
|
+
`cursor`, `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`,
|
|
48
|
+
`copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `trae`, `grok_build`, `omp`, `pi`,
|
|
49
|
+
`hermes`, `qoder`, `droid`, `zcode`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a
|
|
50
|
+
scope. `grok_bot` uses a chat registration step rather than local `mcp.json`.
|
|
51
|
+
For unsupported clients, use version-pinned manual stdio registration or CLI.
|
|
52
|
+
|
|
53
|
+
Show the plan's exact paths, backups, changes and bundled-skill replacement.
|
|
54
|
+
Obtain approval for writes when that concrete scope is not already authorized,
|
|
55
|
+
then apply the same scope with `rea setup --client codex --yes`. Add
|
|
56
|
+
`--install-hopper` only when separately needed and explicitly approved. Do not
|
|
57
|
+
install or upgrade unrelated prerequisites. Restart/reconnect, verify tools
|
|
58
|
+
actually appear, and resume the original task. If they remain absent, inspect
|
|
59
|
+
the launch failure rather than looping through setup.
|
|
60
|
+
|
|
61
|
+
## Codex tool approval is separate from REA readiness
|
|
62
|
+
|
|
63
|
+
REA tools have no permission-grant handshake. Codex can still require approval
|
|
64
|
+
because an operation creates owned resources, launches a helper or has cleanup
|
|
65
|
+
effects. An advertised tool or successful doctor result does not override that
|
|
66
|
+
client policy. `workspace-write` alone does not resolve an MCP approval
|
|
67
|
+
rejection, and `approval_policy = "never"` does not mean every MCP tool is
|
|
68
|
+
preapproved.
|
|
69
|
+
|
|
70
|
+
When interactive approval is available, use the client's approval flow for the
|
|
71
|
+
requested operation. In an unattended run, continue through an authorized CLI
|
|
72
|
+
workflow if the execution environment permits it, or report the blocked
|
|
73
|
+
operation and the approval needed to proceed. Do not retry the same rejected
|
|
74
|
+
call, silently broaden approvals, or rewrite MCP effects as read-only.
|
|
75
|
+
|
|
76
|
+
For an operator who explicitly wants to preapprove named operations in a
|
|
77
|
+
disposable Codex profile, current Codex supports per-tool configuration. For
|
|
78
|
+
example, opening and closing an analysis session can be scoped independently:
|
|
79
|
+
|
|
80
|
+
```toml
|
|
81
|
+
[mcp_servers.rea.tools.open_binary]
|
|
82
|
+
approval_mode = "approve"
|
|
83
|
+
|
|
84
|
+
[mcp_servers.rea.tools.close_binary]
|
|
85
|
+
approval_mode = "approve"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Use the actual server ID and only the operations whose effects were approved;
|
|
89
|
+
this example does not approve inspection, extraction or runtime execution.
|
|
90
|
+
Show the proposed config edit and preserve unrelated entries and backups before
|
|
91
|
+
writing. Managed policy can constrain client settings. Consult the
|
|
92
|
+
[Codex configuration reference](https://learn.chatgpt.com/docs/config-file/config-reference)
|
|
93
|
+
for the installed client's supported settings. This is an optional recovery
|
|
94
|
+
choice, not a prerequisite for every REA task.
|
|
95
|
+
|
|
96
|
+
## Continue through an installed CLI
|
|
97
|
+
|
|
98
|
+
Check the command environment only if the launcher fails:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
command -v rea
|
|
102
|
+
command -v node
|
|
103
|
+
node --version
|
|
104
|
+
rea --version
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Use the public launcher at its known installation path with a supported existing
|
|
108
|
+
Node on PATH when the child shell loses a prefix installation. Avoid internal
|
|
109
|
+
`dist/cli.js` entrypoints or global toolchain changes. MCP may have its own valid
|
|
110
|
+
launcher even when a shell cannot resolve `rea`.
|
|
111
|
+
|
|
112
|
+
For a user-supplied JavaScript tree or ASAR, select output files in the authorized
|
|
113
|
+
workspace and save complete Evidence before reading a view:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
rea analyze-javascript-application /absolute/path/to/app --json > app-evidence.json
|
|
117
|
+
jq -c '{source: {kind: "inline", evidence: .}, view: {kind: "summary"}}' app-evidence.json > app-view.json
|
|
118
|
+
rea inspect-analysis-view app-view.json
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
These commands do not register MCP or install an analysis engine. CLI JavaScript
|
|
122
|
+
JSON is complete and can be very large; redirect it rather than loading it into
|
|
123
|
+
context. Use an existing JSON processor if `jq` is absent, without installing
|
|
124
|
+
one just for this recipe. Inspect a module page or item using the same inline
|
|
125
|
+
source and the [JavaScript recipes](javascript-applications.md). Preserve graph
|
|
126
|
+
coverage, limitations and unknowns. Native CLI analysis still requires its
|
|
127
|
+
selected engine, and all CLI operations retain the host's execution permissions.
|