mirror of
https://github.com/morluto/rea.git
synced 2026-11-07 07:16:13 +00:00
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:
1 parent
c6d3bdf597
commit
e07b81649e
258 files changed
+1193
-22444
No files matched your search
@@ -1,38 +1,24 @@
|
||||
import { delimiter } from "node:path";
|
||||
|
||||
import type { ProcessScenario } from "../domain/processCapture.js";
|
||||
import type { LoopbackReplay } from "./LoopbackReplay.js";
|
||||
import type { CommandShimReplay } from "./CommandShimReplay.js";
|
||||
|
||||
interface ProcessCaptureEnvironmentOptions {
|
||||
readonly scenario: ProcessScenario;
|
||||
readonly replay: LoopbackReplay;
|
||||
readonly shimReplay: CommandShimReplay;
|
||||
readonly runId: string;
|
||||
readonly hostEnvironment: Readonly<Record<string, string | undefined>>;
|
||||
}
|
||||
|
||||
/** Build the inherited environment with scenario overrides and replay instrumentation. */
|
||||
/** Build the child environment from the host plus caller-selected overrides. */
|
||||
export const makeProcessCaptureEnvironment = (
|
||||
options: ProcessCaptureEnvironmentOptions,
|
||||
): Record<string, string> => {
|
||||
const { scenario, replay, shimReplay, runId, hostEnvironment } = options;
|
||||
const environment: Record<string, string> = {
|
||||
...Object.fromEntries(
|
||||
Object.entries(hostEnvironment).filter(
|
||||
(entry): entry is [string, string] => entry[1] !== undefined,
|
||||
),
|
||||
): Record<string, string> => ({
|
||||
...Object.fromEntries(
|
||||
Object.entries(options.hostEnvironment).filter(
|
||||
(entry): entry is [string, string] => entry[1] !== undefined,
|
||||
),
|
||||
...scenario.environment,
|
||||
TERM: scenario.environment.TERM ?? hostEnvironment.TERM ?? "xterm-256color",
|
||||
REA_PROCESS_RUN_ID: runId,
|
||||
};
|
||||
environment.REA_REPLAY_HTTP_URL = replay.httpUrl;
|
||||
environment.REA_REPLAY_WEBSOCKET_URL = replay.websocketUrl;
|
||||
environment.REA_SHIM_LEDGER_URL = shimReplay.url;
|
||||
// Shims are instrumentation; all remaining executable lookup uses host PATH.
|
||||
environment.PATH = [shimReplay.binPath, environment.PATH ?? ""]
|
||||
.filter((part) => part.length > 0)
|
||||
.join(delimiter);
|
||||
return environment;
|
||||
};
|
||||
),
|
||||
...options.scenario.environment,
|
||||
TERM:
|
||||
options.scenario.environment.TERM ??
|
||||
options.hostEnvironment.TERM ??
|
||||
"xterm-256color",
|
||||
REA_PROCESS_RUN_ID: options.runId,
|
||||
});
|
||||
Reference in new issue
Block a user