/** Compare artifact inventories through the same source owners and workflow as MCP. */
exportconstregisterArtifactComparisonCommand=(
cli: CliInstance,
logger: Logger,
):void=>{
constname=CLI_COMMANDS.compareArtifacts;
cli.command(name,{
description:
'Compare two artifact inventories named as {left, right}: complete Evidence or {kind:"evidence-file",path,evidence_id?}. A one-shot command retains no session Evidence for retained-evidence references.',
args: z.object({
inputJson: z.string().describe("Inline workflow JSON or JSON file path"),
}),
run:({args})=>
withCommandCancellation((signal)=>
logCliCommand(logger,name,async()=>{
constinput=awaitparseCliJsonInput(
args.inputJson,
OPERATION,
signal,
);
if(!input.ok)returninput.error;
// Evidence-file paths are resolved against the operator's working directory.