mirror of
https://github.com/morluto/rea.git
synced 2026-11-09 08:17:02 +00:00
chore: merge environment state serve (25b6622d) into environment state writes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
4aeefd9df0
304 files changed
+21890
-3117
No files matched your search
@@ -24,16 +24,22 @@ import { runCliJavaScriptApplicationAnalysis } from "./javascriptApplicationAnal
|
||||
import { withCommandCancellation } from "./commandCancellation.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
|
||||
import type { ElectronActiveObservationPort } from "../application/javascript/ElectronActiveObservationPort.js";
|
||||
|
||||
/** Register CLI equivalents of the Electron MCP tools. */
|
||||
export const registerElectronCommands = (
|
||||
cli: ReturnType<typeof Cli.create>,
|
||||
logger: Logger,
|
||||
environment: Readonly<Record<string, string | undefined>>,
|
||||
options: {
|
||||
readonly createActiveProvider?: (
|
||||
environment: Readonly<Record<string, string | undefined>>,
|
||||
) => ElectronActiveObservationPort;
|
||||
} = {},
|
||||
): void => {
|
||||
registerElectronObservationCommands(cli, logger);
|
||||
registerElectronFuseCommand(cli, logger);
|
||||
registerElectronActiveCommand(cli, logger, environment);
|
||||
registerElectronActiveCommand(cli, logger, environment, options);
|
||||
registerJavaScriptApplicationCommand(cli, logger);
|
||||
registerJavaScriptRuntimeReconciliationCommand(cli, logger);
|
||||
};
|
||||
@@ -86,6 +92,11 @@ const registerElectronActiveCommand = (
|
||||
cli: ReturnType<typeof Cli.create>,
|
||||
logger: Logger,
|
||||
environment: Readonly<Record<string, string | undefined>>,
|
||||
options: {
|
||||
readonly createActiveProvider?: (
|
||||
environment: Readonly<Record<string, string | undefined>>,
|
||||
) => ElectronActiveObservationPort;
|
||||
},
|
||||
): void => {
|
||||
cli.command(CLI_COMMANDS.captureElectronScenario, {
|
||||
description: "Run one owned Electron scenario with cancellable actions",
|
||||
@@ -122,9 +133,13 @@ const registerElectronActiveCommand = (
|
||||
);
|
||||
const { captureElectronScenario } =
|
||||
await import("../application/javascript/ElectronActiveObservationService.js");
|
||||
const { createElectronScenarioProvider } =
|
||||
await import("../composition/electronScenario.js");
|
||||
const provider = createElectronScenarioProvider(environment);
|
||||
const provider =
|
||||
options.createActiveProvider === undefined
|
||||
? await import("../composition/electronScenario.js").then(
|
||||
({ createElectronScenarioProvider }) =>
|
||||
createElectronScenarioProvider(environment),
|
||||
)
|
||||
: options.createActiveProvider(environment);
|
||||
const result = await finishAnalysisCommand(
|
||||
() => captureElectronScenario(provider, parsed.data, { signal }),
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user