refactor!: simplify runtime tools and remove replay engines (#572)

* 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.
This commit is contained in:
morluto
2026-10-05 21:15:04 +08:00
committed by GitHub
parent c6d3bdf597
commit e07b81649e
258 changed files with 1193 additions and 22444 deletions
+1 -45
View File
@@ -7,21 +7,13 @@ import {
import { logCliCommand } from "./cliLogging.js";
import type { Logger } from "./logger.js";
import { CLI_COMMANDS } from "./cliCommandNames.js";
import { parseCliJsonInput } from "./cliJsonInput.js";
import {
replayMachineRunInputSchema,
runReplayMachine,
} from "./domain/replayMachineRun.js";
import { AnalysisInputError, projectAnalysisError } from "./domain/errors.js";
import { projectInputIssues } from "./domain/inputIssueProjection.js";
/** Register process capture one-shot commands through shared application services. */
/** 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 => {
registerReplayMachineCommand(cli, logger);
cli.command(CLI_COMMANDS.captureProcess, {
description: "Capture one caller-selected process scenario",
args: z.object({ scenario: z.string().describe("Scenario JSON path") }),
@@ -46,39 +38,3 @@ export const registerProcessCommands = (
),
});
};
const registerReplayMachineCommand = (
cli: ReturnType<typeof Cli.create>,
logger: Logger,
): void => {
cli.command(CLI_COMMANDS.runReplayMachine, {
description:
"Run ordered protocol events directly through a finite replay machine",
args: z.object({
inputJson: z.string().describe("Inline replay JSON or JSON file path"),
}),
run: ({ args }) =>
logCliCommand(logger, CLI_COMMANDS.runReplayMachine, async () => {
const input = await parseCliJsonInput(
args.inputJson,
CLI_COMMANDS.runReplayMachine,
);
if (!input.ok) return input.error;
const parsed = replayMachineRunInputSchema.safeParse(input.value);
return parsed.success
? runReplayMachine(parsed.data)
: {
error: "Process command failed",
...projectAnalysisError(
new AnalysisInputError(
CLI_COMMANDS.runReplayMachine,
{
cause: parsed.error,
},
projectInputIssues(parsed.error.issues, input.value),
),
),
};
}),
});
};