Squash merge of https://github.com/morluto/rea/pull/2497. Co-authored-by: pablodiazjorge <pablodiazjorgegarcia@gmail.com>
26 KiB
Managed-code analysis
REA inspects .NET PE/CLI artifacts without loading or executing their code. It can identify an assembly, inspect metadata and CIL, compare members across builds, and connect declared native calls to supplied native-analysis evidence. CIL is Common Intermediate Language, the instruction format used by managed assemblies.
The seven shipped tools are:
| Task | MCP tool |
|---|---|
| Identify an artifact and its managed deployment form | inspect_managed_artifact |
| Inspect types, signatures, method bodies, calls, and field access | inspect_managed_members |
| List declared native calls and native implementation indicators | inspect_managed_native_boundaries |
| Compare members across builds and map build-local tokens | compare_managed_members |
| Check native call declarations against supplied export or function evidence | verify_managed_native_boundaries |
| Import decompiled code against verified static member identities | import_managed_reconstruction |
| Add managed findings to an application graph | project_managed_application_graph |
Each has a matching CLI command: replace underscores with hyphens and prefix
the name with rea, for example rea inspect-managed-artifact.
Native-body bridge mapping and managed runtime execution are outside the
current tool set.
The canonical tool inventory is the build-generated catalog.
Inspect an assembly
rea inspect-managed-artifact /absolute/path/Assembly.dll --json
rea inspect-managed-members /absolute/path/Assembly.dll --json
Use the artifact result to identify the assembly and its metadata coverage.
Member results retain build-local tokens, signatures, CIL bodies, and decoded
relationships. Use an exact reported full_name with --type when a focused
inspection is needed; see selected member inspection.
Compare separate builds with member comparison, preserving
their paths, digests, and selection scope.
Metadata overview and retained rows
The existing CLI and omitted/complete MCP detail return complete metadata
inventories. For identity and classification questions, select
inspect_managed_artifact with
{"path":"/absolute/path/Assembly.dll","detail":"summary"} on the first call.
This keeps the complete source in the session and returns a distinct linked
inspect_analysis_view overview with complete PE/CLI, classification and its
evidence, metadata status, module/MVID, assembly, frameworks, returned-row counts,
coverage/issues and limitations. No assembly is loaded or executed.