Bind typed service creation, observed availability and retryable cleanup in one composition owner. Reuse selected CLI/MCP factories and canonical contract groups without copying provider operation inventories. Closes #8429. Refs #740. Validated paired real application workflows, actual local Codex CLI Terra/high use, complete Evidence and Unknown checkpoint parity, compiler-backed import boundaries, SDK schemas and final real mixed routing. Automated review findings were fixed at their producing owners. Existing exact-base CodeQL alerts are documented on the PR under the owner-authorized unrelated-check exception; no global alerts or security rules were changed. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
24 lines
909 B
TypeScript
24 lines
909 B
TypeScript
import type { ObjdumpSelection } from "../domain/reverseEngineering.js";
|
|
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
|
|
|
/** Build GNU objdump argv without invoking a shell or following DWARF links by default. */
|
|
export const objdumpCommand = (input: ObjdumpSelection): readonly string[] => {
|
|
if (input.operation === "architectures") return ["-i"];
|
|
const argumentsByOperation = {
|
|
file_headers: ["-f"],
|
|
section_headers: ["-h"],
|
|
symbols: ["-t"],
|
|
relocations: ["-r"],
|
|
dwarf: ["-W", input.follow_debug_links ? "-WK" : "-WN"],
|
|
disassemble:
|
|
input.operation === "disassemble" && input.symbol !== undefined
|
|
? [`--disassemble=${input.symbol}`]
|
|
: ["-d"],
|
|
disassemble_all: ["-D"],
|
|
} satisfies Record<typeof input.operation, readonly string[]>;
|
|
return [
|
|
...argumentsByOperation[input.operation],
|
|
absoluteCallerPath(input.path),
|
|
];
|
|
};
|