openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
26 lines (25 loc) • 843 B
JavaScript
import { t as detectSetupInference } from "../setup-inference-detect-QZ_aVC2Y.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 agentId = workerData && typeof workerData === "object" && typeof workerData.agentId === "string" ? workerData.agentId : void 0;
const detection = await detectSetupInference({ onPartial: (partial) => port.postMessage({
type: "partial",
detection: partial
}) }, agentId);
port.postMessage({
type: "result",
detection
});
} catch (error) {
port.postMessage({
ok: false,
error: error instanceof Error ? error.message : String(error)
});
} finally {
port.close();
}
//#endregion
export {};