Skip to content

armgit / rea

Public Imported from GitHub
0

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

fix(build): exclude the test-only generated catalog from packages (#1116)

Ysopwnabled1c904bac797
diff --git a/scripts/generate-mcp-tool-catalog.mjs b/scripts/generate-mcp-tool-catalog.mjs
index 4803cf8d2..baa0860c2 100644
--- a/scripts/generate-mcp-tool-catalog.mjs
+++ b/scripts/generate-mcp-tool-catalog.mjs
@@ -17,9 +17,9 @@ for (const argument of arguments_)
throw new Error(`Unknown MCP tool catalog option: ${argument}`);
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
-// The build-generated catalog is a portable package artifact that is not
-// committed to git. Keep its canonical provider metadata independent of the
-// machine running the generator. It is regenerated by `npm run build`.
+// This build-generated source supports schema and provider conformance tests;
+// production MCP tools are registered from their canonical contracts directly.
+// Keep the test metadata portable and regenerate it with `npm run build`.
const CATALOG_PLATFORM = "darwin";
const sessionToolNames = new Set([
...TOOL_CONTRACTS.filter(({ kind }) => kind === "session").map(
diff --git a/scripts/verify-package-pack.mjs b/scripts/verify-package-pack.mjs
index 600ecf7a0..4a674075a 100644
--- a/scripts/verify-package-pack.mjs
+++ b/scripts/verify-package-pack.mjs
@@ -33,6 +33,12 @@ export async function verifyPackagePack({ root, workspace }) {
throw new Error(
"package included authored skill sources instead of only the generated bundle",
);
+ if (
+ packedFiles.some((path) =>
+ /^package\/(?:dist|src)\/generatedMcpToolCatalog\./u.test(path),
+ )
+ )
+ throw new Error("package included the test-only generated MCP catalog");
const skill = (
await exec("tar", [
"-xOf",
diff --git a/tsconfig.build.json b/tsconfig.build.json
index 9ab834392..062eb0567 100644
--- a/tsconfig.build.json
+++ b/tsconfig.build.json
@@ -8,6 +8,7 @@
},
"include": ["src/**/*.ts"],
"exclude": [
+ "src/generatedMcpToolCatalog.ts",
"src/**/*.fixture.ts",
"src/**/*.test.ts",
"tests",