mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
refactor(cli): remove redundant alias coverage metadata
Remove the duplicate command-alias enumeration and convention-equivalent tool mappings. Keep explicit semantic exceptions, independent MCP-only policy and exact runtime alias-target coverage.
This commit is contained in:
@@ -175,9 +175,6 @@ export const CLI_COMMANDS = Object.freeze({
|
||||
/** Ordered primary CLI inventory; aliases are intentionally excluded. */
|
||||
export const CLI_COMMAND_NAMES = Object.freeze(Object.values(CLI_COMMANDS));
|
||||
|
||||
/** Command aliases registered on top of the primary CLI command inventory. */
|
||||
export const CLI_COMMAND_ALIASES = Object.freeze(["compare-bundles"]);
|
||||
|
||||
/** Canonical MCP operations reached by CLI commands with different names. */
|
||||
export const CLI_COMMAND_TOOL_ALIASES = Object.freeze({
|
||||
analyze: ["binary_overview"],
|
||||
@@ -189,16 +186,9 @@ export const CLI_COMMAND_TOOL_ALIASES = Object.freeze({
|
||||
search: ["search_strings", "search_procedures"],
|
||||
"capture-process": ["capture_process_scenario"],
|
||||
"compare-bundles": ["compare_bundles"],
|
||||
"list-cutter-sessions": ["list_cutter_sessions"],
|
||||
"cutter-command": ["cutter_command"],
|
||||
"inspect-with-objdump": ["inspect_with_objdump"],
|
||||
"list-objdump-architectures": ["inspect_with_objdump"],
|
||||
"execute-rizin-command": ["execute_rizin_command"],
|
||||
"debug-with-gdb": ["gdb_console"],
|
||||
"debug-with-rizin": ["rizin_debug_command"],
|
||||
"list-frida-devices": ["list_frida_devices"],
|
||||
"list-frida-processes": ["list_frida_processes"],
|
||||
"instrument-with-frida": ["instrument_with_frida"],
|
||||
});
|
||||
|
||||
/** MCP operations without a dedicated CLI command or direct command alias. */
|
||||
|
||||
@@ -4,7 +4,6 @@ import { createCli } from "../../../src/cli.js";
|
||||
import { createCliInventory } from "../../../scripts/lib/catalog-cli.mjs";
|
||||
import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js";
|
||||
import {
|
||||
CLI_COMMAND_ALIASES,
|
||||
CLI_COMMAND_NAMES,
|
||||
CLI_COMMAND_TOOL_ALIASES,
|
||||
MCP_TOOLS_WITHOUT_DEDICATED_CLI,
|
||||
@@ -26,8 +25,6 @@ describe("CLI canonical tool coverage", () => {
|
||||
}
|
||||
for (const command of CLI_COMMAND_NAMES)
|
||||
expect(registeredCommandNames.has(command)).toBe(true);
|
||||
for (const command of CLI_COMMAND_ALIASES)
|
||||
expect(registeredCommandNames.has(command)).toBe(true);
|
||||
const intentionalMcpOnly = new Set<string>(MCP_TOOLS_WITHOUT_DEDICATED_CLI);
|
||||
expect(
|
||||
[...intentionalMcpOnly].filter((name) => cliToolNames.has(name)).sort(),
|
||||
|
||||
Reference in New Issue
Block a user