feat(session): add explicit provider registry and target binding

Introduce deterministic deep-provider discovery and immutable per-target routing while retaining disjoint artifact and native capability families.

Expose provider selection consistently through MCP, CLI, environment configuration, session status, prompt completion, typed diagnostics, and generated documentation. Preserve exact provider/profile provenance without request racing or transparent fallback.

Cover overlapping providers, ambiguity, rejection details, cancellation, restoration, package installation, and real Hopper target switching.
This commit is contained in:
N0zoM1z0
2026-07-15 22:13:48 +09:00
committed by N0zoM1z0
parent bd3cf964d6
commit 941d7101dd
174 changed files with 5370 additions and 648 deletions
@@ -2,24 +2,25 @@
- Status: Accepted
- Date: 2026-07-15
- Implementation status: Planned; this record does not claim Ghidra support is
shipped
- Implementation status: The provider registry, deterministic selection,
target binding, analysis-profile commitment, and snapshot/Evidence migration
are implemented. Ghidra support is not yet shipped.
## Context
REA currently composes the artifact, native macOS, and Hopper providers with
`CompositeProvider`. That class intentionally requires every operation to have
one route. Hopper and Ghidra will both implement the deep static-analysis
operation family, so putting both into the current composite would either fail
at construction or make array order an undeclared selection policy.
Before this decision, REA composed the artifact, native macOS, and Hopper
providers with `CompositeProvider`. That class intentionally requires every
operation to have one route. Hopper and Ghidra will both implement the deep
static-analysis operation family, so putting both into that composite would
either fail at construction or make array order an undeclared selection policy.
The active `BinarySession` also owns one composite client. `open_binary` has no
provider selector, and the domain `BinaryTarget` contains Hopper loader
arguments. Analysis snapshot v1 commits those loader arguments and each cached
entry's provider identity, but it does not commit the selected analysis engine,
engine version, or complete analysis configuration. Two analyses of the same
bytes can therefore disagree because of language, compiler, loader, analyzer,
or provider-version differences while appearing target-compatible.
The active `BinarySession` also owned one composite client. `open_binary` had no
provider selector, and the domain `BinaryTarget` contained Hopper loader
arguments. Analysis snapshot v1 committed those loader arguments and each
cached entry's provider identity, but it did not commit the selected analysis
engine, engine version, or complete analysis configuration. Two analyses of the
same bytes could therefore disagree because of language, compiler, loader,
analyzer, or provider-version differences while appearing target-compatible.
These constraints are embodied in the current
[`CompositeProvider`](../../src/application/CompositeProvider.ts),