import { t as detectSetupInference } from "../setup-inference-detect-D9FyOkzn.js";
import { parentPort, workerData } from "node:worker_threads";
//#region src/system-agent/setup-inference-detection.worker.ts
if (!parentPort) throw new Error("setup inference detection worker requires a parent port");
const port = parentPort;
try {
	const detection = await detectSetupInference({ onPartial: (partial) => port.postMessage({
		type: "partial",
		detection: partial
	}) }, workerData && typeof workerData === "object" && typeof workerData.agentId === "string" ? workerData.agentId : void 0);
	port.postMessage({
		type: "result",
		detection
	});
} catch (error) {
	port.postMessage({
		ok: false,
		error: error instanceof Error ? error.message : String(error)
	});
} finally {
	port.close();
}
//#endregion
export {};
