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:
+17
-1
@@ -6,7 +6,10 @@ describe("runtime configuration", () => {
|
||||
it("allows target-free startup and defaults to Hopper's documented launcher", () => {
|
||||
const empty = parseConfig({});
|
||||
expect(empty.ok).toBe(true);
|
||||
if (empty.ok) expect(empty.value.hopperTargetPath).toBeUndefined();
|
||||
if (empty.ok) {
|
||||
expect(empty.value.hopperTargetPath).toBeUndefined();
|
||||
expect(empty.value.analysisProvider).toBe("auto");
|
||||
}
|
||||
const result = parseConfig({ HOPPER_TARGET_PATH: "/usr/bin/true" });
|
||||
expect(result.ok).toBe(true);
|
||||
if (result.ok) {
|
||||
@@ -35,6 +38,19 @@ describe("runtime configuration", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("parses one shared provider selector and rejects unstable IDs", () => {
|
||||
expect(parseConfig({ REA_ANALYSIS_PROVIDER: "ghidra" })).toMatchObject({
|
||||
ok: true,
|
||||
value: { analysisProvider: "ghidra" },
|
||||
});
|
||||
expect(parseConfig({ REA_ANALYSIS_PROVIDER: "auto" })).toMatchObject({
|
||||
ok: true,
|
||||
value: { analysisProvider: "auto" },
|
||||
});
|
||||
for (const invalid of ["", "Auto", "ghidra_1", "ghidra "])
|
||||
expect(parseConfig({ REA_ANALYSIS_PROVIDER: invalid }).ok).toBe(false);
|
||||
});
|
||||
|
||||
it("builds a separate Electron endpoint and file-root ceiling", () => {
|
||||
const result = parseConfig({
|
||||
REA_ELECTRON_OBSERVE_ENABLED: "true",
|
||||
|
||||
Reference in New Issue
Block a user