Skip to content

armgit / rea

Public Imported from GitHub
0

Reverse engineer anything with agents, from app behavior down to native binaries.

fix(setup): omit aligned skill from plan

morlutod81687f38393
diff --cc scripts/verify-package.mjs
index f745678ca,66e705834..3782e4bad
--- a/scripts/verify-package.mjs
+++ b/scripts/verify-package.mjs
@@@ -470,63 -450,9 +482,64 @@@ try
recoveredExecution.status !== (status === "ready" ? 0 : 1)
)
throw new Error("packaged setup did not recover");
+
+ const geminiDir = join(home, ".gemini");
+ const geminiConfig = join(geminiDir, "settings.json");
+ await mkdir(geminiDir, { recursive: true });
+ await symlink(join(home, "missing-gemini.json"), geminiConfig);
+ const danglingExecution = await runWithStatus(
+ cli,
+ ["setup", "--yes", "--json"],
+ environment,
+ );
+ const dangling = json(danglingExecution.stdout);
+ if (
+ dangling.status !== "needs_human" ||
+ danglingExecution.status !== 1 ||
+ dangling.clients?.gemini_cli?.status !== "failed" ||
+ dangling.clients?.gemini_cli?.reason !== "path" ||
+ !(await lstat(geminiConfig)).isSymbolicLink() ||
+ (await pathExists(`${geminiConfig}.rea.backup`))
+ )
+ throw new Error(
+ `packaged setup did not reject a dangling config symlink before mutation: ${JSON.stringify(dangling)}`,
+ );
+ await rm(geminiDir, { recursive: true });
+
+ const uninstallExecution = await runWithStatus(
+ cli,
+ ["uninstall", "--json"],
+ environment,
+ );
+ const uninstall = json(uninstallExecution.stdout);
+ const cursorAfterUninstall = json(await readFile(cursorTarget, "utf8"));
+ const codexAfterUninstall = await readFile(codexTarget, "utf8");
+ if (
+ uninstall.status !== "complete" ||
+ uninstallExecution.status !== 0 ||
+ uninstall.items?.find(({ name }) => name === "cursor")?.status !==
+ "removed" ||
+ uninstall.items?.find(({ name }) => name === "codex")?.status !==
+ "removed" ||
+ !(await lstat(cursorConfig)).isSymbolicLink() ||
+ !(await lstat(codexConfig)).isSymbolicLink() ||
+ cursorAfterUninstall.existing !== true ||
+ cursorAfterUninstall.mcpServers?.rea !== undefined ||
+ !codexAfterUninstall.includes('model = "gpt-5"') ||
+ codexAfterUninstall.includes("mcp_servers.rea") ||
+ !(await readFile(`${cursorConfig}.rea.backup`, "utf8")).includes(
+ '"rea"',
+ ) ||
+ !(await readFile(`${codexConfig}.rea.backup`, "utf8")).includes(
+ "[mcp_servers.rea]",
+ )
+ )
+ throw new Error(
+ `packaged uninstall did not preserve config symlinks: ${JSON.stringify(uninstall)}`,
+ );
} else if (
first.status !== "needs_human" ||
+ aligned.status !== "needs_human" ||
second.status !== "needs_human"
) {
throw new Error("packaged setup did not reject an unsupported host");