Files
openclaw/src/worker/worker-deploy-entry.ts
Peter Steinberger f19f62cb77 perf(node-host): prewarm worker bundles (#124427)
* perf(node-host): prewarm worker bundles

* test(gateway): gate worker finalization responsiveness

* fix(node-host): negotiate bundle prewarming

* fix(protocol): refresh worker prewarm models

* fix(node-host): preserve prewarm upgrade compatibility
2026-08-16 00:41:42 -07:00

21 lines
727 B
TypeScript

import { flushCompileCache } from "node:module";
import "./worker-deploy-runtime.js";
import workerDeployBrowserRuntime from "./worker-deploy-browser-runtime.js";
import { runWorkerProcess } from "./worker-process.js";
const args = process.argv.slice(2);
const internalWorkerIpc = args[0] === "--internal-worker-ipc";
const internalWorkerPrewarm = args[0] === "--internal-worker-prewarm";
if (args.length > 1 || (args.length === 1 && !internalWorkerIpc && !internalWorkerPrewarm)) {
throw new Error("worker deploy entry received unsupported arguments");
}
if (internalWorkerPrewarm) {
flushCompileCache();
} else {
await runWorkerProcess({
internalWorkerIpc,
browserRuntime: workerDeployBrowserRuntime,
});
}