← All researchTechnical report

Evidence-First Interfaces: Pairing REA with Vercel UI SDK

How a 229-tool reverse-engineering MCP server and a behavior-level UI SDK eliminate DOM scraping, expose typed evidence graphs, and cut agent token cost by 76%.

Abstract. Reverse engineering produces graphs of disassembly, memory reads, IPC hops, and residual unknowns. Static blog prose flattens that structure. By pairing REA’s evidence-backed analysis model[1]Evidence modelREA records every tool observation as an immutable Evidence record and tracks unresolved gaps as explicit residual unknowns rather than silent assumptions.github.com/morluto/rea with Vercel UI SDK’s accessible, agent-addressable primitives[2]Headless + Agent@ui-sdk/core separates focus, keyboard, and ARIA state from styling, and registers every control with createAgent() so agents drive the same UI as humans.github.com/vercel-labs/ui, every figure in this report becomes an inspectable instrument for both human readers and coding agents.

Case I: DX-Ball Sound-Panning Reconstruction

In the DX-Ball showcase[3]Showcase scopeCheckpoint 7 Oct 2026: 63 compiled x86 bytes matched across 3,205 oracle comparisons against the original DX-Ball 1.07 routine.rea.tools/showcase/dx-ball, REA traces the x86 DirectSound pan routine at 0x406409 through five evidence-backed steps: loading the ball’s horizontal coordinate, multiplying by 1.5625, subtracting 500.0, scaling, and truncating via __ftol. Step through the assembly and probe the live oracle below.

Figure 1 · Interactive Reconstruction

DX-Ball Sound-Panning: x86 Assembly to Verified C

3,205 / 3,205 oracle cases · 63 matching bytes
01. Recover the hidden stack input
The initial pseudocode emitted FUN_00406400(void), hiding the parameter. REA's instruction view exposes [EBP+0x8] loaded via FILD, and following caller 0x411f40 proves x = 20 + 30 * tile_x.
analyze_function: { "procedure": "0x406400" }
ev:dxball:fn:0x406400
x86 Disassembly (0x406409)REA Ghidra
10x406409: MOV EAX, dword ptr [EBP + 0x8]
20x40640c: MOV dword ptr [EBP - 0xc], EAX
30x40640f: FILD dword ptr [EBP - 0xc]
40x406415: FMUL double ptr [0x00420068]
50x40641e: FSUB double ptr [0x00420070]
60x406427: FMUL double ptr [0x004210a0]
70x406430: CALL 0x0041678c ; __ftol
80x40643e: RET
Reconstructed C (dxball_screen_pan)MSVC
1DxBallInt dxball_screen_pan(DxBallInt x) {
2 double pan = (double)x;
3 pan = pan * 1.5625;
4 pan = pan - 500.0;
5 pan = pan * dxball_pan_scale;
6 return (DxBallInt)pan;
7}
Interactive Oracle Probe: Ball X Positionx = 320px → pan = 0 (Center)
0 px (Left wall: -500)320 px (Center: 0)640 px (Right wall: +500)
Powered by a custom @ui-sdk/core primitive (EvidenceStepper) with roving focus and agent actions goTo, next, and previous, paired with @ui-sdk/react/slider. Use Left/Right arrow keys on the step bar.

Why Headless + Agent-Ready Matters

Vercel UI SDK separates interaction state, roving focus, and ARIA semantics from visual styling[4]Benchmark caveatReported 3-run medians measure the settings-screen agent bridge benchmark. Efficiency gains come from structured snapshot()/act() calls, not raw browser DOM scraping.github.com/vercel-labs/ui. Because every control registers with createAgent(), an agent can inspect and drive the exact same figures a human reader uses, cutting token consumption and tool calls compared to raw browser automation.

Figure 2 · Agent Bridge Benchmark

Browser-Only vs. UI SDK Agent Bridge (3-Run Medians)

Median total tokens in thousands across 3 runs (lower is better)
React76% fewer
Base UI + browser tools
291.7k
UI SDK Agent Bridge
69.5k
Vue60% fewer
Reka UI + browser tools
226.5k
UI SDK Agent Bridge
90.2k
Svelte64% fewer
Bits UI + browser tools
259.1k
UI SDK Agent Bridge
92.8k
Modeled after SID-2 Technical Report interactive charts. Controls use @ui-sdk/react/segmented-control and @ui-sdk/react/switch and are directly inspectable and actionable via the Agent Console.

Case II: Notion Desktop 7.6.1 Clipboard IPC Bridge

Static JavaScript analysis in REA does not require a native disassembler. Inspecting Notion Desktop’s app.asar[5]Provenance splitREA 4.1.0 located preload API and ipcMain ranges statically in app.asar; separate cached web-asset probes are explicitly marked as non-desktop captures.rea.tools/showcase/notion maps the full trust boundary from renderer preload wrappers to the sender-checked ipcMain.handle clipboard sink.

Figure 3 · Electron Trust Boundary

Notion Desktop 7.6.1 Clipboard Write IPC Chain

Channel: notion:clipboard:write
tab_browser_view/preload.js
preload.js:1:22764–22828
Renderer

The web editor calls window.__electronApi.clipboard.write(data) without touching Electron internals directly.

tab_browser_view/preload.jsSource
1const clipboardApi = {
2 write: invokerInMain("notion:clipboard:write"),
3};
4// Exposed through contextBridge as window.__electronApi.clipboard
REA Static ObservationRenderer
1api_key: "__electronApi"
2api_status: "dynamic"
3source: preload.js:1:22764–22828
Uses @ui-sdk/react/tabs to walk through each Electron boundary from renderer preload to the sender-checked ipcMain.handle sink.

Target Capability Matrix & Investigation Trace

REA routes each artifact to a specialized static reader, bring-your-own disassembler, or live runtime bridge[6]Engine boundaryJS/Electron, .NET, and archive inspections run without native engines; deep native decompilation requires a local Ghidra, Hopper, or Rizin backend.github.com/morluto/rea. Filter the target matrix by engine requirement and inspect the investigation waterfall below[7]Illustrative traceThe 940 ms waterfall below illustrates a typical 7-call DX-Ball session structure for interactive exploration; real timings vary by host and engine warm-up.sid.ai & architectlabs.com.

Figure 4 · Capability Matrix & Trace

REA Target Surface & Investigation Span Waterfall

Showing 10 of 10 target families
Target familyPrimary REA toolsPrerequisiteReturns
Native binaries (ELF / Mach-O / PE / DOS)open_binary → analyze_functionHopper, Ghidra, IDA Pro, or KunaPseudocode, assembly, callers, callees, strings, CFG, xrefs
Go & Rust cargo-auditable binariesinspect_go_binary / inspect_rust_binaryNone (built-in static parser)Compiler version, module graph, crate versions, build settings
CUDA/HIP code objects & GGUF / safetensorsinspect_gpu_code_objects / inspect_model_artifactNone (header & fatbin parser)Kernel parameters, PTX text, tensor declarations, header digests
Electron ASAR & bundled JavaScriptanalyze_javascript_applicationNode.js 22/24/26 (no native engine)Module graph, IPC boundaries, preload APIs, route tables, fuses
Live web apps & WebMCP pagescapture_browser_scenario → export_environment_bundleLoopback CDP Chrome-family browserDOM capture, scripts, WebMCP schemas, AgentEnv RL bundles
HAR, Fiddler SAZ, mitmproxy, qloginspect_web_network_captureSaved capture file (no live fetch)Requests, protobuf/gRPC payloads, source locations, stream stats
Android APKs, signatures & Flutterinspect_android_package / inspect_apk_signatureStatic for signatures/Flutter; JADX + JDK for JavaManifest, JADX decompilation, v1–v3.1 cert lineage, Dart hashes
.NET PE/CLI & Unity IL2CPP metadatainspect_managed_artifact / inspect_il2cpp_metadataNone (static metadata decoder)CIL hashes, P/Invoke maps, global-metadata.dat types & methods
Firmware, PCAPs & sigrok logic tracesinspect_firmware_regions / inspect_pcap_captureBinwalk/Unblob, TShark 4.x, or sigrok-cli on LinuxFirmware regions, DNS/TLS summaries, decoded bus annotations
SQLite + WAL, CPython .pyc & Erlang BEAMinspect_sqlite_database / inspect_python_pycNone (built-in static reader)Schema/rows, marshal code objects, BEAM atoms & export tables
Sample Investigation Trace (DX-Ball 940 ms Session)
Select any span row (or use Up/Down arrow keys) to inspect its phase notes.
rea: dx-ball investigation
open_binary(DXBALL.EXE)
analyze_function(0x406400)
analyze_function(0x411f40)
read_bytes(0x420068, 0x4210a0)
ui-sdk: agent.act(verify)
End-to-end: 940 ms total
session
Uses @ui-sdk/react/input, @ui-sdk/react/segmented-control, and @ui-sdk/react/waterfall (accessible treegrid timeline).

Notes & References

  1. Vercel Labs (2026). “Introducing UI SDK: A library of behaviors to build your components. Made for agents.” github.com/vercel-labs/ui
  2. REA Project (2026). “Reverse Engineer Anything: One MCP for reverse engineering across binaries, applications, and runtime behavior (v6.8.0, 229 tools).” github.com/morluto/rea
  3. REA Showcase (2026). “Rebuilding DX-Ball 1.07 from its executable: sound panning reconstruction & 3,205 oracle checks.” rea.tools/showcase/dx-ball
  4. REA Showcase (2026). “How Notion Desktop 7.6.1 copies text and HTML across its Electron preload/IPC bridge.” rea.tools/showcase/notion
  5. Editorial craft references: SID-2 Technical Report (three-column reading grid, inline figure toggles, margin sidenotes) and Architect Labs Frostbite (editorial left rail, serif display headlines, cobalt telemetry). sid.ai & architectlabs.com