* fix(hopper): report unavailable procedure body coverage * refactor!: simplify runtime tools and remove replay engines Keep direct inspection, capture, and comparison tools. Bind handlers to named contracts and let agents compose experiments with commands and local fixture servers. BREAKING CHANGE: Remove controlled replay, Node characterization, finite replay-machine, managed runtime planning, and redundant string-tracing tools. Retire process replay, shims, reactive scenarios, custom checkpoints, and active browser replay and origin-scope inputs.
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import { Cli, z } from "incur";
|
|
|
|
import {
|
|
captureProcessScenarioFile,
|
|
compareProcessEvidenceFiles,
|
|
} from "./application/ProcessCli.js";
|
|
import { logCliCommand } from "./cliLogging.js";
|
|
import type { Logger } from "./logger.js";
|
|
import { CLI_COMMANDS } from "./cliCommandNames.js";
|
|
|
|
/** Register direct process capture and comparison commands. */
|
|
export const registerProcessCommands = (
|
|
cli: ReturnType<typeof Cli.create>,
|
|
logger: Logger,
|
|
environment: Readonly<Record<string, string | undefined>> = process.env,
|
|
): void => {
|
|
cli.command(CLI_COMMANDS.captureProcess, {
|
|
description: "Capture one caller-selected process scenario",
|
|
args: z.object({ scenario: z.string().describe("Scenario JSON path") }),
|
|
run: ({ args }) =>
|
|
logCliCommand(logger, "capture-process", () =>
|
|
captureProcessScenarioFile(args.scenario, environment),
|
|
),
|
|
});
|
|
cli.command(CLI_COMMANDS.compareProcessCaptures, {
|
|
description: "Compare two process capture Evidence JSON files",
|
|
args: z.object({
|
|
left: z.string().describe("Left capture Evidence JSON path"),
|
|
right: z.string().describe("Right capture Evidence JSON path"),
|
|
traceSpec: z
|
|
.string()
|
|
.optional()
|
|
.describe("Optional partial-order or finite-trace specification path"),
|
|
}),
|
|
run: ({ args }) =>
|
|
logCliCommand(logger, "compare-process-captures", () =>
|
|
compareProcessEvidenceFiles(args.left, args.right, args.traceSpec),
|
|
),
|
|
});
|
|
};
|