Files
reverse-engineering-anything/src/composition/evm.ts
T
morluto 960a387731 refactor(contracts): own CLI command names, catalog identity and schema presentation in contracts (#11425)
* refactor(contracts): move the CLI command name owner into src/contracts

* refactor(contracts): own catalog identity in contracts and server identity in process (#11435)

* refactor(contracts): move catalog identity into contracts and server identity into process

* refactor(contracts): own the advertised MCP schema presentation in contracts

* test(mcp): import the advertised presentation from contracts in toolSchemaValidity

* test(release): expect the catalog identity at its contracts path in the canary

* test(mcp): import the catalog identity from contracts in syntheticContractSurfaces

* refactor(contracts): import CLI command names from contracts in the capability conformance test
2026-11-16 05:31:37 +08:00

26 lines
1.2 KiB
TypeScript

import { EvmInterfaceService } from "../application/evm/EvmInterfaceService.js";
import { EvmoleInterfaceProvider } from "../evm/EvmoleInterfaceProvider.js";
import { cliCommandFor } from "../contracts/cliCommandNames.js";
import { HOST_PLATFORM, type HostPlatform } from "../platform/HostPlatform.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,
host: HostPlatform = HOST_PLATFORM,
): EvmInterfaceService =>
new EvmInterfaceService(
new EvmoleInterfaceProvider(environment, undefined, undefined, host),
);
/**
* 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: cliCommandFor("inspect_evm_interface"),
create: createEvmInterfaceService,
} as const;