Files
reverse-engineering-anything/src/composition/evm.ts
T
morluto a74d859a19 fix(evm): probe the selected limiter before advertising availability
Share asynchronous executable selection between discovery and execution. Recheck it for default Linux x64 sessions, preserve caller-injected service policy and propagate cancellation through pending probes.

Refs #5086. Focused owner, inventory and MCP controls passed; Linux-specific discovery and execution cases were skipped on Darwin arm64 and remain unverified.
2026-10-20 22:18:52 +08:00

27 lines
1.1 KiB
TypeScript

import { EvmInterfaceService } from "../application/evm/EvmInterfaceService.js";
import {
EvmoleInterfaceProvider,
evmLimiterAvailability,
} from "../evm/EvmoleInterfaceProvider.js";
import { CLI_COMMANDS } from "../cliCommandNames.js";
import { INSPECT_EVM_INTERFACE_CONTRACT } from "../contracts/evm/evmToolContracts.js";
/** Compose offline interface analysis without import-time I/O or dependency acquisition. */
export const createEvmInterfaceService = (
environment: Readonly<NodeJS.ProcessEnv> = process.env,
): EvmInterfaceService =>
new EvmInterfaceService(new EvmoleInterfaceProvider(environment));
export { evmLimiterAvailability };
/**
* Static binding of the existing operation, command and fresh service factory.
* The host owns injected service identity and its retryable cleanup lifetime.
* Construction performs no acquisition, target I/O or import-time execution.
*/
export const evmInterfaceModule = {
contract: INSPECT_EVM_INTERFACE_CONTRACT,
cliCommand: CLI_COMMANDS.inspectEvmInterface,
create: createEvmInterfaceService,
} as const;