Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix: reuse validators for identical output schemas

Peter1887e1120e91
diff --git a/scripts/lib/real-ghidra-boundaries.mjs b/scripts/lib/real-ghidra-boundaries.mjs
index 0a59c5fae..849815b84 100644
--- a/scripts/lib/real-ghidra-boundaries.mjs
+++ b/scripts/lib/real-ghidra-boundaries.mjs
@@ -40,7 +40,11 @@ export async function verifyGhidraBoundaries(
ajv.validateSchema(tool[key]),
`${tool.name} ${key}: ${JSON.stringify(ajv.errors)}`,
);
- validators.set(tool.name, ajv.compile(tool.outputSchema));
+ validators.set(
+ tool.name,
+ (tool.outputSchema?.$id && ajv.getSchema(tool.outputSchema.$id)) ||
+ ajv.compile(tool.outputSchema),
+ );
}
let successfulCalls = 0;
let rejectedCalls = 0;