Files
reverse-engineering-anything/src/application/binary/BinaryTargetSummary.ts
T
morluto ace4dbf36e fix(contracts): align live target classification with admitted facts
Share exact live target variants across open and session responses, preserving historical Evidence and snapshot admission. Consolidate equivalent ELF metadata aliases at their owner.
2026-10-27 06:53:47 +08:00

17 lines
627 B
TypeScript

import type { BinaryTarget } from "../../domain/binaryTargetTypes.js";
import { liveBinaryTargetSummarySchema } from "../../domain/liveBinaryTargetSummary.js";
/** Preserve the admitted target interpretation in public lifecycle results. */
export const binaryTargetSummary = (target: BinaryTarget) =>
liveBinaryTargetSummarySchema.parse({
path: target.path,
format: target.format,
kind: target.kind,
sha256: target.sha256,
architecture: target.architecture ?? null,
...(target.format === "raw-binary" || target.format === "gamecube-dol"
? { entry_point: target.entryPoint }
: {}),
});