Skip to content

Commit f11c213

Browse files
committed
Merge upstream main into feat-artifacts-esp-image
Upstream added Intel HEX and Motorola S-record inventories (morluto#7136) to the same format vocabularies, detection order and container lists as esp-image. Each list keeps both: intel-hex and srec first, then esp-image. Detection tries the HEX/S-record first record, then the 0xE9 ESP header; their signatures do not overlap. The graph and target tests keep both formats' cases.
2 parents 2527e6f + c369719 commit f11c213

333 files changed

Lines changed: 22095 additions & 124985 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/plugins/marketplace.json‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "rea",
3+
"interface": {
4+
"displayName": "REA"
5+
},
6+
"plugins": [
7+
{
8+
"name": "rea",
9+
"source": {
10+
"source": "npm",
11+
"package": "rea-agents",
12+
"version": "6.8.0"
13+
},
14+
"policy": {
15+
"installation": "AVAILABLE",
16+
"authentication": "ON_INSTALL"
17+
},
18+
"category": "Developer Tools"
19+
}
20+
]
21+
}

‎.agents/skills/reverse-engineer-anything/SKILL.md‎

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: reverse-engineer-anything
33
description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture. 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.
44
metadata:
5-
version: "50"
5+
version: "53"
66
---
77

88
# REA
@@ -17,6 +17,9 @@ readiness or provider commands.
1717

1818
Installing this skill supplies instructions; it does not register the REA MCP
1919
server, install analysis engines, or add tools to an already-running agent.
20+
The exception is a Claude Code or Codex plugin install: the plugin bundles
21+
this skill and registers its own `rea` server, outside the state that
22+
`rea setup` and `rea doctor` manage.
2023

2124
If REA tools are available and their registration is not known to be stale,
2225
proceed directly to the target. Do not run diagnostics or setup before every
@@ -37,37 +40,18 @@ repeat or known not to have started. If it may already have changed the
3740
target, or it fails again, tell the user and ask them to restart the MCP
3841
client. If REA could not start its connection, retry once, then tell the user
3942
and ask them to restart the MCP client. Do not retry a startup failure that
40-
returns the same unchanged result. Run `rea doctor` when REA could not start
43+
returns the same unchanged result. For plugin installs, follow
44+
[plugin recovery](references/connection-and-recovery.md#rea-installed-as-a-client-plugin).
45+
For setup-owned registrations, run `rea doctor` when REA could not start
4146
or tools stay missing after that restart. For `cleanup_incomplete`, a retryable
4247
capacity limit, or `configuration_invalid`, follow the recovery guide's ladder
4348
before asking for a restart. Read that guide before a second repair attempt.
4449

45-
1. Diagnose without changing REA or client configuration. `npx` may download
46-
the package and write to npm's cache. For Codex, run
47-
`npx -y rea-agents@latest doctor --client codex --json`. Substitute the current
48-
supported client: `claude_code`, `claude_desktop`, `codex`, `cursor`,
49-
`gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`, `copilot_cli`,
50-
`commandcode`, `vscode`, `grok_build`, `omp`, or `grok_bot`. `grok_bot` has no local
51-
file registration: doctor reports the Grok Bot chat step, and setup does not
52-
write `mcp.json`. If the client is unknown, use `doctor --json` and
53-
inspect its registration results before choosing a setup scope.
54-
2. Distinguish the reason. Missing, malformed, or stale registration needs a
55-
scoped configuration repair. An aligned registration with no tools in the
56-
active session needs a restart/reconnection; doctor cannot prove that the
57-
current agent has connected. A missing provider affects only tasks requiring
58-
that provider: static JavaScript inspection needs neither Hopper nor Ghidra,
59-
and Android inspection has separate bring-your-own JADX/Java prerequisites.
60-
3. For a configuration repair, prepare the read-only plan:
61-
`npx -y rea-agents@latest setup --client codex --dry-run --json`.
62-
Use the current client's ID, show its exact proposed paths, backups, and
63-
changes, and obtain approval before setup writes configuration or installs
64-
Hopper. Setup normally installs the matching bundled skill too; include that
65-
replacement in the reviewed plan. After approval, apply the same scope with
66-
`npx -y rea-agents@latest setup --client codex --yes`. Add `--install-hopper`
67-
only if that separate installation was needed and explicitly approved.
68-
4. Restart/reconnect the affected agent. Verify that REA tools actually appear
69-
in the session, then resume the original investigation. If they remain
70-
absent, inspect the client's MCP launch error rather than repeating setup.
50+
Choose the installation owner before repairing registration. Plugin installs use
51+
[plugin recovery](references/connection-and-recovery.md#rea-installed-as-a-client-plugin);
52+
only setup-owned registrations use the guide's
53+
[registration repair plan](references/connection-and-recovery.md#repair-registration-when-needed).
54+
A plugin-only doctor result of `missing` does not call for `rea setup`.
7155

7256
REA setup never installs or upgrades Node.js, npm, Homebrew, Java, Ghidra, IDA,
7357
JADX, Kuna, Binwalk, or Unblob. Use existing prerequisites; do not install unrelated
@@ -86,7 +70,7 @@ returns the Evidence record directly. This fallback does not establish that
8670
MCP is configured. Native CLI tasks still require their selected engine.
8771
Prefer an existing `rea` CLI. When none is installed and REA package acquisition
8872
is within the authorized scope, use `npx -y rea-agents@latest` in its place.
89-
Configuration repair starts with a read-only setup plan; show paths, backups and
73+
For setup-owned registration, configuration repair starts with a read-only setup plan; show paths, backups and
9074
skill replacement before applying authorized changes. Preserve existing approval
9175
and target-execution boundaries.
9276

‎.agents/skills/reverse-engineer-anything/references/android-applications.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ own APK path and explicit selectors; do not open a native session first.
1313
Choose an `overload_index` from the class inventory when methods are ambiguous
1414
instead of guessing.
1515

16+
For JNI implementations, discover `inspect_android_jni_bindings`. Select raw
17+
DEX class/method identities and optional descriptors, ABI or logical library
18+
paths. Prefer `detail: "summary"`; complete Evidence remains retained and
19+
`android-jni` views page declarations, libraries, candidates or binding rows
20+
with exact fields. Global native-pair ambiguity survives class selection.
21+
Preserve slot/relocation provenance and source coverage: matched means observed
22+
candidate presence; partial scans do not establish uniqueness or absence.
23+
This reads DEX/ELF bytes without loading the APK into the decompiler or executing
24+
target code. Runtime registration and loading remain unknown. See the
25+
[JNI guide](https://github.com/morluto/rea/blob/main/docs/android-analysis.md#link-native-declarations-to-jni-candidates).
26+
1627
For an R8/ProGuard release build with its `mapping.txt`, pass the absolute
1728
`mapping_path` to `inspect_android_class` or `inspect_android_method`. Prefer
1829
`detail: "summary"` to receive normalized symbols or the selected body without

‎.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ does not establish which server an approval wildcard covers. See
1717

1818
| Observation | Meaning and next step |
1919
| --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20-
| No REA tools in the active session | Inspect registration with `rea doctor --client codex --json`. A skill installation alone does not register MCP. |
20+
| No REA tools in the active session | If REA was installed as a client plugin, follow the plugin section below. Otherwise inspect registration with `rea doctor --client codex --json`. A skill installation alone does not register MCP. |
2121
| Missing, malformed or stale registration | Prepare a scoped setup plan; apply only authorized changes with backups. |
2222
| 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. |
2323
| MCP connection dropped or REA could not start | If the connection drops, retry that call once only when it is safe to repeat or known not to have started. If it may already have changed the target, or the same failure returns, tell the user REA's connection failed and ask them to restart the MCP client. If REA could not start its connection, retry once, then tell the user and ask them to restart the MCP client. Do not retry a startup failure that returns the same unchanged result. Run `rea doctor` when REA could not start or tools stay missing after restart. Doctor cannot restore a live connection by itself. |
@@ -116,6 +116,32 @@ is not a recommendation to change it. Do not invent a setting. Host memory and
116116
- `invalid_request`: correct the reported fields from the current schema. Do
117117
not repeat the unchanged call.
118118

119+
## REA installed as a client plugin
120+
121+
A Claude Code or Codex plugin owns its `rea` server and this skill. Doctor's
122+
`--client` and `--skill` checks and `rea setup` read and write only
123+
setup-owned state, so for a plugin-only install they report `missing`, and
124+
applying setup would add a second `rea` server. If this skill was loaded from
125+
a plugin, or the client lists a `rea` plugin, do not prepare a setup plan for
126+
missing tools. Instead:
127+
128+
- Check that the plugin is installed and enabled with the client's own
129+
listing: `claude plugin list` and `/mcp` in Claude Code, `codex plugin list`
130+
in Codex.
131+
- Restart or reconnect the client, then read its launch error for the `rea`
132+
server if tools are still absent. The plugin starts its bundled runtime; a missing build or version mismatch
133+
requires a reinstall, or a fresh build when developing from source.
134+
- Check analysis engines through the connected server's
135+
`binary_session.result.tool_availability`. `rea doctor --provider <id> --json`
136+
from a shell reports that shell's environment, which can differ from the
137+
environment the client gave the plugin server. If you still run it through
138+
the package runner, use the version pinned in the plugin manifest's server
139+
entry (`rea-agents@<version>`), not `@latest`, so it matches the server the
140+
plugin starts.
141+
142+
Use the setup repair below only when the user wants a setup-owned registration
143+
instead of the plugin, and remove or disable the plugin first.
144+
119145
## Repair registration when needed
120146

121147
For Codex:

‎.agents/skills/reverse-engineer-anything/references/environments.md‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ again if a hint names a gap, then writes the bundle with
2323
- Map the application first with `inspect_web_page` (and `capture_web_screenshot`
2424
when layout matters): the login form's locators, and the API calls behind the
2525
pages that list and edit the entities the user asked about.
26+
- `inspect_web_page` cannot sign in. To see pages behind sign-in, run a short
27+
`capture_browser_scenario` that signs in and opens them, with
28+
`"capture": {"after_each_step": ["accessibility"]}` (`"dom"` for markup).
29+
Read a step's tree with `inspect_analysis_view`, `view: {kind:
30+
"browser-scenario", collection: "text", step_index, artifact:
31+
"accessibility", offset: 0, limit: 2048}`, paging with `offset`. Capture
32+
options are only `after_each_step`, `at_end`, `events`, `network` and
33+
`limits`.
2634

2735
## Record a session an environment can learn writes from
2836

@@ -124,8 +132,10 @@ client with it. Match `wait_for` locators to exactly one element.
124132
as a secret reference), submit, then `wait_for` an element only a signed-in
125133
user sees.
126134
2. Read with `request` steps: each collection the environment needs, twice
127-
before any write, so fields that change on their own show up; one item of
128-
each.
135+
before any write, so fields that change on their own show up; then each
136+
object a list shows by id, up to ten per collection. An object known only
137+
from a list that leaves out fields its own read shows cannot be read by id
138+
or updated in the environment.
129139
3. Write the way the application's UI does: fill its forms and click its
130140
buttons, so each request carries the fields the UI sends, including ones
131141
the server would otherwise derive. Give the click or key press that submits
@@ -145,8 +155,17 @@ client with it. Match `wait_for` locators to exactly one element.
145155
read 2, list; never several writes before their reads.
146156
4. Leave more than a second between a create and its first edit
147157
(`wait_for_timeout` with `duration_ms: 1100`).
148-
5. Update both objects and read each back; delete both and read each back
149-
(expect 404) and the list.
158+
5. Update both objects and read each back, changing the fields a person
159+
would change (a name, an email address, a status, a due date) rather than
160+
only a description: a served update accepts only the members a recorded
161+
update stored. Delete both and read each back (expect 404, or the object
162+
marked deleted) and the list.
163+
6. Vary what the two creates send, however you write them: the first every
164+
field the application takes, the second only what a person must give (its
165+
title or name), with the other fields left out or empty. A served create
166+
requires each member both creates filled in and lets a caller leave out one
167+
a create left out or sent empty, so an agent that names only a title is not
168+
refused for fields it had no reason to set.
150169

151170
About `request` steps:
152171

@@ -226,7 +245,7 @@ withheld with its hint:
226245
| `no-call` | Re-record once with a write that succeeds. |
227246
| `side-effect` | Stop: the application changes other entities. |
228247
| `contradicted` | Stop: a later read disagrees with the modelled effect. |
229-
| `body-unusable` | Stop: the body is not a JSON object. |
248+
| `body-unusable` | Re-record a UI write once with `request` steps (its body was not exposed); else stop. |
230249

231250
Use new scratch names on each attempt, and delete what an earlier attempt
232251
created before recording again (through the UI, or a `request` step with the

‎.claude-plugin/marketplace.json‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3+
"name": "rea",
4+
"description": "Reverse engineer anything with agents, from app behavior down to native binaries.",
5+
"owner": {
6+
"name": "morluto",
7+
"url": "https://github.com/morluto"
8+
},
9+
"plugins": [
10+
{
11+
"name": "rea",
12+
"description": "Reverse engineer anything from your terminal or agent with one CLI and MCP server.",
13+
"source": {
14+
"source": "npm",
15+
"package": "rea-agents",
16+
"version": "6.8.0"
17+
},
18+
"category": "development"
19+
}
20+
]
21+
}

‎.claude-plugin/plugin.json‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "rea",
3+
"version": "6.8.0",
4+
"description": "Reverse engineer anything from your terminal or agent with one CLI and MCP server.",
5+
"author": {
6+
"name": "morluto",
7+
"url": "https://github.com/morluto"
8+
},
9+
"homepage": "https://rea.tools/",
10+
"repository": "https://github.com/morluto/rea",
11+
"license": "MIT",
12+
"keywords": [
13+
"reverse-engineering",
14+
"binary-analysis",
15+
"decompiler",
16+
"mcp-server"
17+
],
18+
"skills": "./skills",
19+
"mcpServers": {
20+
"rea": {
21+
"command": "node",
22+
"args": [
23+
"${CLAUDE_PLUGIN_ROOT}/scripts/plugin-mcp-launcher.mjs",
24+
"6.8.0"
25+
]
26+
}
27+
}
28+
}

‎.codex-plugin/mcp.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"mcpServers": {
3+
"rea": {
4+
"command": "node",
5+
"args": [
6+
"./scripts/plugin-mcp-launcher.mjs",
7+
"6.8.0"
8+
],
9+
"cwd": ".",
10+
"startup_timeout_sec": 30
11+
}
12+
}
13+
}

‎.codex-plugin/plugin.json‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "rea",
3+
"version": "6.8.0",
4+
"description": "Reverse engineer anything from your terminal or agent with one CLI and MCP server.",
5+
"author": {
6+
"name": "morluto",
7+
"url": "https://github.com/morluto"
8+
},
9+
"homepage": "https://rea.tools/",
10+
"repository": "https://github.com/morluto/rea",
11+
"license": "MIT",
12+
"keywords": [
13+
"reverse-engineering",
14+
"binary-analysis",
15+
"decompiler",
16+
"mcp-server"
17+
],
18+
"skills": "./skills",
19+
"mcpServers": "./.codex-plugin/mcp.json",
20+
"interface": {
21+
"displayName": "REA",
22+
"shortDescription": "Reverse engineer anything with agents",
23+
"longDescription": "Use REA to explain shipped behavior from native binaries, managed assemblies, Electron and JavaScript bundles, packages, firmware, and browser targets, with evidence that separates observations from inferences.",
24+
"developerName": "morluto",
25+
"category": "Developer Tools",
26+
"capabilities": [
27+
"Interactive",
28+
"Read",
29+
"Write"
30+
],
31+
"websiteURL": "https://rea.tools/",
32+
"defaultPrompt": [
33+
"Use REA to explain how this binary implements a feature.",
34+
"Use REA to compare two versions of this application.",
35+
"Use REA to recover the sources from this JavaScript bundle."
36+
]
37+
}
38+
}

0 commit comments

Comments
 (0)