feat(identity): rename package and CLI to REA

This commit is contained in:
morluto
2026-07-12 07:44:30 +08:00
parent 97541d8dad
commit 3d70812c37
17 changed files with 129 additions and 85 deletions
+8 -6
View File
@@ -115,8 +115,7 @@ export const runSetup = async (
...(doctor.healthy
? {}
: {
remediation:
"Run better-binary doctor and apply each reported remediation.",
remediation: "Run rea doctor and apply each reported remediation.",
}),
};
};
@@ -186,7 +185,10 @@ export const configureJsonClient = async (
if (!isMissing(cause)) return { status: "failed", reason: "readback" };
}
const servers = objectValue(document.mcpServers);
const desired = { command: PRODUCT_IDENTITY.mcpBinary };
const desired = {
command: "npx",
args: ["-y", PRODUCT_IDENTITY.packageName, "mcp"],
};
if (
JSON.stringify(servers[PRODUCT_IDENTITY.mcpServerKey]) ===
JSON.stringify(desired)
@@ -194,7 +196,7 @@ export const configureJsonClient = async (
return { status: "unchanged" };
let backupPath: string | undefined;
if (original !== undefined) {
backupPath = `${client.configPath}.better-binary.backup`;
backupPath = `${client.configPath}.rea.backup`;
try {
await copyFile(client.configPath, backupPath);
} catch {
@@ -206,7 +208,7 @@ export const configureJsonClient = async (
[PRODUCT_IDENTITY.mcpServerKey]: desired,
};
const encoded = `${JSON.stringify(document, null, 2)}\n`;
const temporary = `${client.configPath}.better-binary.tmp`;
const temporary = `${client.configPath}.rea.tmp`;
try {
await mkdir(dirname(client.configPath), { recursive: true });
await writeFile(temporary, encoded, { encoding: "utf8", mode: 0o600 });
@@ -243,7 +245,7 @@ const installCanonicalSkill = async (
PRODUCT_IDENTITY.skillName,
"SKILL.md",
);
const content = `---\nname: ${PRODUCT_IDENTITY.skillName}\ndescription: Analyze binaries with Better Binary and Hopper.\n---\n\nOpen a target with open_binary, begin with binary_overview, and close it when finished.\n`;
const content = `---\nname: ${PRODUCT_IDENTITY.skillName}\ndescription: Analyze binaries with REA and Hopper.\n---\n\nOpen a target with open_binary, begin with binary_overview, and close it when finished.\n`;
try {
if (
(await readFile(destination, "utf8").catch(() => undefined)) === content
+1 -1
View File
@@ -180,7 +180,7 @@ export const OFFICIAL_TOOL_CONTRACTS = [
),
] as const satisfies readonly ToolContract[];
/** All 8 reverse-engineering tools implemented by betterBinaryMCP. */
/** All 8 reverse-engineering tools implemented by REA. */
export const ENHANCED_TOOL_CONTRACTS = [
enhanced(
"swift_classes",
+2 -2
View File
@@ -41,8 +41,8 @@ export class HopperApplicationLauncher implements BridgeLauncher {
): Promise<Result<BridgeLaunch, HopperStartError>> {
const bootstrapPath = `${session.directory}/bootstrap.py`;
const source = [
`BETTER_BINARY_SOCKET = ${JSON.stringify(session.socketPath)}`,
`BETTER_BINARY_TOKEN = ${JSON.stringify(session.token)}`,
`REA_SOCKET = ${JSON.stringify(session.socketPath)}`,
`REA_TOKEN = ${JSON.stringify(session.token)}`,
`exec(compile(open(${JSON.stringify(this.options.bridgeScriptPath)}, 'rb').read(), ${JSON.stringify(this.options.bridgeScriptPath)}, 'exec'))`,
"",
].join("\n");
+1 -1
View File
@@ -341,7 +341,7 @@ const parseServerInfo = (
typeof value === "object" &&
value !== null &&
!Array.isArray(value) &&
value.name === "betterBinaryMCP Hopper bridge" &&
value.name === "REA Hopper bridge" &&
typeof value.version === "string"
) {
return ok({ name: value.name, version: value.version });
+8 -8
View File
@@ -1,10 +1,10 @@
/** Provisional product identifiers kept together for release-time renaming. */
/** Public REA identifiers kept together for consistent packaging and setup. */
export const PRODUCT_IDENTITY = {
displayName: "Better Binary",
packageName: "better-binary-mcp",
cliBinary: "better-binary",
mcpBinary: "better-binary-mcp",
mcpServerKey: "better-binary",
skillName: "better-binary-analysis",
configFileName: "better-binary.json",
displayName: "REA",
packageName: "@morluto/rea",
cliBinary: "rea",
mcpCommand: "npx -y @morluto/rea mcp",
mcpServerKey: "rea",
skillName: "rea-analysis",
configFileName: "rea.json",
} as const;