chore(release): harden package artifacts

This commit is contained in:
morluto
2026-07-12 08:45:28 +08:00
parent 2b7ef8610d
commit e32906afb7
5 changed files with 31 additions and 8 deletions
+4 -2
View File
@@ -10,9 +10,11 @@ import { TOOL_CONTRACTS } from "../dist/contracts/toolContracts.js";
const execFileAsync = promisify(execFile);
const timeout = 180_000;
const hopperProcessPrefix = "/Applications/Hopper Disassembler.app/Contents/";
// Snapshot bundle processes so cleanup terminates only Hopper processes this
// verifier caused to appear, never an instance the user already had running.
const hopperProcessesBefore = await hopperProcessIds();
const sessionsBefore = new Set(
(await readdir("/tmp")).filter((name) => name.startsWith("bbm-")),
(await readdir("/tmp")).filter((name) => name.startsWith("rea-")),
);
const textValue = (result) => {
@@ -163,7 +165,7 @@ try {
await new Promise((resolve) => setTimeout(resolve, 500));
const sessionsAfter = (await readdir("/tmp")).filter(
(name) => name.startsWith("bbm-") && !sessionsBefore.has(name),
(name) => name.startsWith("rea-") && !sessionsBefore.has(name),
);
if (sessionsAfter.length > 0) {
throw new Error("The MCP runtime leaked a bridge session directory");