Files
reverse-engineering-anything/src/cli/desktopApplicationCommands.ts
T
morluto fa53f7070a refactor(cli): project view-delivery inspectors from their contracts (#10600)
* refactor(cli): project view-delivery inspectors from their contracts

* refactor(cli): project APK signature, desktop application and EVM inspectors from contracts (#10603)
2026-11-15 15:00:24 +08:00

48 lines
1.5 KiB
TypeScript

import type { Logger } from "pino";
import { CLI_COMMANDS } from "../cliCommandNames.js";
import { createDesktopApplicationService } from "../composition/desktop.js";
import { DESKTOP_APPLICATION_TOOL_CONTRACTS } from "../contracts/desktopApplicationToolContracts.js";
import { contractNamed } from "./contractCliDescription.js";
import {
deliverWithService,
registerContractCommand,
} from "./contractCommand.js";
import type { CliInstance } from "./types.js";
/** One-shot complete Evidence can be saved and queried with inspect-analysis-view. */
export const registerDesktopApplicationCommands = (
cli: CliInstance,
logger: Logger,
): void => {
registerContractCommand(
cli,
logger,
contractNamed(
DESKTOP_APPLICATION_TOOL_CONTRACTS,
"inspect_desktop_application",
),
{
command: CLI_COMMANDS.inspectDesktopApplication,
description:
"Identify desktop runtime candidates from bounded directory and header observations",
positionals: ["path"],
callerPaths: ["path"],
evidenceDelivery: true,
fields: {
path: { description: "Local installation directory" },
max_entries: {
name: "max_entries",
description:
"Maximum directory entries to examine; exhaustion leaves partial coverage",
},
max_probe_bytes: {
name: "max_probe_bytes",
description: "Maximum total bytes read from selected file ranges",
},
},
},
deliverWithService(createDesktopApplicationService, "rea-artifact-graph"),
);
};