Files
reverse-engineering-anything/src/composition/apkSignature.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

25 lines
1.1 KiB
TypeScript

import { ApkSignatureService } from "../application/apkSignature/ApkSignatureService.js";
import { ApkSignatureProvider } from "../apkSignature/ApkSignatureProvider.js";
import { INSPECT_APK_SIGNATURE_CONTRACT } from "../contracts/apkSignature/apkSignatureToolContracts.js";
import { cliCommandFor } from "../contracts/cliCommandNames.js";
/** Compose the in-process APK signature reader without acquisition or import-time I/O. */
export const createApkSignatureService = (): ApkSignatureService =>
new ApkSignatureService(new ApkSignatureProvider());
/** Static descriptor binding the one APK-signature operation for CLI/MCP. */
export const apkSignatureModule = {
contract: INSPECT_APK_SIGNATURE_CONTRACT,
cliCommand: cliCommandFor("inspect_apk_signature"),
create(
_environment: Readonly<NodeJS.ProcessEnv>,
injected?: ApkSignatureService,
): Pick<ApkSignatureService, "inspect" | "close"> {
const service = injected ?? createApkSignatureService();
return {
inspect: service.inspect.bind(service),
close: service.close.bind(service),
};
},
} as const;