mirror of
https://github.com/morluto/rea
synced 2026-10-27 06:33:32 -04:00
ed933d1893
* feat(native): add UI and dispatch investigation workflows * feat(ghidra): support macOS host validation * docs: update native investigation capabilities * feat(artifacts): decode compiled Interface Builder archives * feat(ghidra): expose bounded p-code value flow * test(ghidra): split host and cross-format verification * fix(verify): follow complete result contracts * refactor: remove unused authorization and schema helpers * refactor: remove unused evidence result alias * fix(ghidra): report jump-table evidence precisely * fix(verify): align browser scenario fixture schema * fix(setup): compare parsed client config structurally * test(ghidra): verify AArch64 jump-table mappings * fix(ghidra): recover AArch64 byte jump tables * test(artifacts): verify compiled interface builder archives * feat(native): trace UI actions through handlers * fix(tests): update native trace and shutdown fixtures * fix(verification): diagnose browser scenario failures * fix(browser): wrap scenario snapshots in capture state * fix(native): bind and bound investigation workflows * fix(artifacts): preserve bounded interface builder evidence * fix(ghidra): enforce admitted hosts and preflight tools * fix(native): preserve trace cancellation and bounds * test(application): expect bound analysis target evidence * fix(native): preserve investigation bounds and cancellation * fix(application): preserve bundle and unresolved trace evidence * style(test): format artifact subject fixture
61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
import { json, run, runWithStatus } from "./lib/verify-package-core.mjs";
|
|
|
|
const REQUIRED_HELP_COMMANDS = [
|
|
"setup",
|
|
"upgrade",
|
|
"inspect-artifact",
|
|
"extract-artifact",
|
|
"import-reference-source",
|
|
"list-browser-targets",
|
|
"inspect-web-page",
|
|
"analyze-javascript-application",
|
|
"compare",
|
|
];
|
|
|
|
const REQUIRED_LLM_TOPICS = [
|
|
"decompile",
|
|
"function",
|
|
"search",
|
|
"inspect",
|
|
"xrefs",
|
|
"trace",
|
|
"capabilities",
|
|
"providers",
|
|
"inspect-artifact",
|
|
"list-browser-targets",
|
|
"inspect-web-page",
|
|
"analyze-javascript-application",
|
|
];
|
|
|
|
/** Validate --help, --llms, and doctor output and determine host setup support. */
|
|
export async function verifyPackageDiscovery({ cli, environment }) {
|
|
const help = await run(cli, ["--help"], environment);
|
|
const llms = await run(cli, ["--llms"], environment);
|
|
const doctorExecution = await runWithStatus(
|
|
cli,
|
|
["doctor", "--json"],
|
|
environment,
|
|
);
|
|
const doctor = json(doctorExecution.stdout);
|
|
const supportedSetupHost =
|
|
doctor.checks?.find(({ name }) => name === "host")?.ok === true;
|
|
const expectedDoctorHealth = doctor.checks?.every(({ ok }) => ok) === true;
|
|
const missingHelp = REQUIRED_HELP_COMMANDS.filter(
|
|
(command) => !help.includes(command),
|
|
);
|
|
const missingLlms = REQUIRED_LLM_TOPICS.filter(
|
|
(topic) => !llms.includes(topic),
|
|
);
|
|
if (
|
|
missingHelp.length !== 0 ||
|
|
missingLlms.length !== 0 ||
|
|
doctor.healthy !== expectedDoctorHealth ||
|
|
doctorExecution.status !== (expectedDoctorHealth ? 0 : 1) ||
|
|
doctor.checks?.find(({ name }) => name === "hopper")?.ok !== true
|
|
)
|
|
throw new Error(
|
|
`packaged CLI discovery or doctor failed: ${JSON.stringify({ helpSetup: help.includes("setup"), llmsDecompile: llms.includes("decompile"), doctor })}`,
|
|
);
|
|
return { supportedSetupHost };
|
|
}
|