mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 19:23:24 +00:00
* refactor(cli): project view-delivery inspectors from their contracts * refactor(cli): project APK signature, desktop application and EVM inspectors from contracts (#10603)
48 lines
1.5 KiB
TypeScript
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"),
|
|
);
|
|
};
|