UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

28 lines (27 loc) • 915 B
import { parentPort } from "node:worker_threads"; //#region src/worker/memory-worker-entry.ts try { console.log = console.info = (...e) => console.error(...e); const { loadBundledPluginPublicArtifactModuleSync: e } = await import("../public-surface-loader-B3vE7Jrp.mjs"); const t = e({ dirName: "memory-core", artifactBasename: "worker-api.js" }); if (parentPort) await t.serveLocalMemoryWatches(parentPort); else { const [e, n, ...r] = process.argv.slice(2); if (e !== "--files" && e !== "--watch-files" || !n || r.length) throw new Error("Memory file worker requires --files or --watch-files <workspace>"); await t.serveMemoryFiles({ workspace: n, input: process.stdin, output: process.stdout, watch: e === "--watch-files" }); } } catch (e) { process.stderr.write(`Memory file worker failed: ${String(e)}\n`); process.exitCode = 1; parentPort?.close(); } //#endregion export {};