Files
reverse-engineering-anything/src/application/binary/BinaryTargetSummary.ts
T
morluto e09d6273a1 fix(native): preserve caller-selected paths in binary sessions (#12102)
* fix(mcp): preserve caller-selected binary session paths

* test(mcp): verify caller paths across snapshot replay

* test(mcp): separate session alias and snapshot replay coverage

* fix(evidence): preserve selected paths across binary workflows

* fix(evidence): retain authentication admission for caller aliases
2026-11-18 18:27:29 -05:00

26 lines
941 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,
...(target.callerInputPath === undefined
? {}
: { caller_input_path: target.callerInputPath }),
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 }
: {}),
...(target.format === "esp-flash-image"
? {
flash_offset: target.espFlash.flashOffset,
partition_table_offset: target.espFlash.partitionTableOffset,
}
: {}),
});