feat: expand cross-platform investigation workflows

This commit is contained in:
morluto
2026-07-20 08:08:39 +00:00
parent b537ebfa34
commit dffc81c865
672 changed files with 13013 additions and 2302 deletions
+12
View File
@@ -152,6 +152,8 @@ const server = createServer((socket) => {
type: "bridge_exception",
},
});
} else if (request.method === "analysis_in_progress") {
sendAnalysisInProgress(send, request.id);
} else if (request.method === "current_document") {
send({ id: request.id, result: "fixture" });
} else if (enhancedFixtureResult(request.method) !== undefined) {
@@ -194,5 +196,15 @@ const server = createServer((socket) => {
});
});
const sendAnalysisInProgress = (send, id) =>
send({
id,
error: {
code: -32000,
message: "Hopper analysis is still running",
type: "analysis_in_progress",
},
});
server.listen(socketPath);
process.on("SIGTERM", () => server.close());
+17
View File
@@ -1,4 +1,5 @@
import { spawn } from "node:child_process";
import { rm, writeFile } from "node:fs/promises";
const mode = process.argv[2];
@@ -42,6 +43,22 @@ if (mode === "interactive") {
spawn(process.execPath, [process.argv[1], "tree-child"], { stdio: "ignore" });
process.stdout.write("tree-ready\n");
setInterval(() => undefined, 1_000);
} else if (mode === "reexec-child") {
process.stdout.write("reexec-child-ready\n");
setInterval(() => undefined, 1_000);
} else if (mode === "reexec") {
const child = spawn(process.execPath, [process.argv[1], "reexec-child"], {
detached: true,
stdio: "ignore",
});
child.unref();
process.stdout.write("supervisor-exit\n");
await new Promise((resolve) => setTimeout(resolve, 150));
} else if (mode === "filesystem-effects") {
await writeFile("modified.txt", "after");
await rm("deleted.txt");
await writeFile("created.txt", "created");
process.stdout.write("filesystem-effects-ready\n");
} else if (mode === "crash") {
process.stderr.write("intentional-crash\n");
process.exit(23);