Reverse engineer anything with agents, from app behavior down to native binaries.
TypeScript agent-skillsai-agentsbinary-analysisclaude-codeclicodexcordisdecompilerdeveloper-toolsdshdsh-pluginghidrahopperllmmcpmodel-context-protocolreareverse-engineeringstatic-analysistouhou
refactor(ghidra): derive reference facts from shared schema
morluto3966c92c71fe
diff --git a/src/domain/hopperValues.ts b/src/domain/hopperValues.tsindex 30fe47c4f..51bd70660 100644--- a/src/domain/hopperValues.ts+++ b/src/domain/hopperValues.ts@@ -250,7 +250,7 @@ export const functionInstructionWindowSchema = z}).strict();-const availableReferenceKindSchema = z+export const availableReferenceKindSchema = z.object({available: z.literal(true),provenance: z.string().min(1),diff --git a/src/ghidra/GhidraFunctionValues.ts b/src/ghidra/GhidraFunctionValues.tsindex 4d2a8dc2f..e787a3b34 100644--- a/src/ghidra/GhidraFunctionValues.ts+++ b/src/ghidra/GhidraFunctionValues.ts@@ -18,6 +18,7 @@ import {functionBodyEntryAgrees,functionInstructionWindowSchema,functionDossierSchema,+ availableReferenceKindSchema,type FunctionDossier,} from "../domain/hopperValues.js";import {@@ -139,26 +140,10 @@ const localVariable = zprovenance: z.literal("ghidra-function-database"),}).strict();-const referenceKind = z- .object({- available: z.literal(true),- provenance: z.literal("ghidra-reference-manager"),- type: z.string().min(1),- flow: z.boolean(),- call: z.boolean(),- jump: z.boolean(),- data: z.boolean(),- read: z.boolean(),- write: z.boolean(),- indirect: z.boolean(),- computed: z.boolean(),- conditional: z.boolean(),- terminal: z.boolean(),- primary: z.boolean(),- operand_index: z.number().int(),- external: z.boolean(),- })- .strict();+const referenceKind = availableReferenceKindSchema.safeExtend({+ provenance: z.literal("ghidra-reference-manager"),+ type: z.string().min(1),+});const referenceEdge = z.object({source_address: ghidraCanonicalAddressSchema,