/** * Subagent host worker bootstrap. * * Loaded inside a Bun worker spawned by `SubagentWorker` (`./subagent-worker`), * either through the CLI host selector (`__omp_worker_subagent`, which installs * a buffering inbox before importing this module) or directly as a module URL * (tests, SDK embedding). The first message is the raw * {@link SubagentWorkerInit}; everything after it is an RPC frame. * * Its first import routes every log record to main (`./worker-log-install`) * before the rest of its graph evaluates. Like the CLI's network bootstrap, it * then installs PI_PROXY handling on this realm's `globalThis.fetch` (each * worker realm has its own), before any service can make a request. * * This module only wires the link: thread identity, every service's worker * hooks, and the `boot`/`ping` handlers. It deliberately performs no * process-level side effects (title, signal or exit hooks): the process * belongs to the main thread. */ import "./worker-log-install.js";