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
+18 -11
View File
@@ -31,7 +31,6 @@ import {
processScenarioSchema,
reconstructionVerificationInputSchema,
recordUnknownInputSchema,
replayMachineRunInputSchema,
getEvidenceBundleInputSchema,
staticRuntimeCorrelationInputSchema,
updateUnknownInputSchema,
@@ -358,11 +357,6 @@ export const ENHANCED_TOOL_CONTRACTS = [
"Trace a literal feature query through every matching string and procedure, their xrefs, and truthful containing-procedure resolution. Returns observations, operation count, and residual unknowns without inferring reference kinds.",
enhancedInputSchemas.trace_feature,
),
enhanced(
"find_code_for_string",
"Resolve one literal string query across analyzed string entries, xrefs, and truthful containing-procedure candidates. Returns observations, operation count, and residual unknowns; it never infers reference kinds or runtime reachability.",
enhancedInputSchemas.find_code_for_string,
),
enhanced(
"trace_call_path",
"Trace direct callers or callees from one exact procedure address until the graph is exhausted or the optional goal is reached. Returns visited nodes, direct-call edges, a shortest traversal path, provider failures, and residual unknowns; unresolved indirect calls remain unknown.",
@@ -478,11 +472,6 @@ export const SESSION_TOOL_CONTRACTS = [
"Revalidate the current residual-unknown head against live bundled evidence, exact authority/confidence/environment requirements, and revision integrity. Withdrawn and out-of-scope dispositions are not truth claims.",
verifyUnknownResolutionInputSchema,
),
session(
"run_replay_machine",
"Evaluate ordered HTTP and WebSocket events directly against one validated finite replay machine without opening sockets or launching a target. Returns every decision, a capture-value-free transition journal, one redacted action table entry per used transition, captured aliases, final state, and exact configured and consumed limits.",
replayMachineRunInputSchema,
),
session(
"get_evidence_bundle",
"Return every Evidence record and residual unknown currently retained by this session as one inline bundle for direct inspection or follow-up workflows.",
@@ -514,3 +503,21 @@ export const TOOL_CONTRACTS = [
...APPLICATION_TOOL_CONTRACTS,
...SESSION_TOOL_CONTRACTS,
] as const;
/** Resolve a public contract by name while retaining its exact schema types. */
export const toolContract = <
Name extends (typeof TOOL_CONTRACTS)[number]["name"],
>(
name: Name,
): Extract<(typeof TOOL_CONTRACTS)[number], { readonly name: Name }> => {
const contract = TOOL_CONTRACTS.find(
(
candidate,
): candidate is Extract<
(typeof TOOL_CONTRACTS)[number],
{ readonly name: Name }
> => candidate.name === name,
);
if (contract === undefined) throw new Error(`Missing tool contract: ${name}`);
return contract;
};