Files
oh-my-pi/packages/coding-agent/test/fixtures/computer-worker-bundled-host.ts
T
can1357 aa014717dc refactor(coding-agent): restored static computer worker start hook
- The pi-utils/mime subpath fix made the computer worker graph lazy-safe,
  so the dynamic-import dispatch added for laziness is no longer needed;
  cli.ts and the bundled-host fixture statically import
  startComputerWorker() per the no-inline-import rule.
- worker-entry keeps the selector-guarded direct-source auto-start; the
  worker-selector test now pins the exported hook contract. Verified
  --no-addons CLI startup stays addon-free and the bundled/compiled
  worker-host tests pass.
2026-08-03 00:19:58 +02:00

10 lines
515 B
TypeScript

import { parentPort } from "node:worker_threads";
import { installWorkerInbox } from "@oh-my-pi/pi-utils/worker-host";
import { COMPUTER_WORKER_ARG } from "../../src/tools/computer/protocol";
import { startComputerWorker } from "../../src/tools/computer/worker-entry";
if (process.argv[2] !== COMPUTER_WORKER_ARG) throw new Error(`unknown worker selector: ${process.argv[2]}`);
if (!parentPort) throw new Error("computer worker fixture: missing parentPort");
installWorkerInbox(parentPort);
startComputerWorker();