/** * The root `AsyncJobManager` across subagent worker links (kind * `"async-job-manager"`, protocol in `./async-jobs-protocol`). * * Main side: every manager crossing to a worker is served by reference. Job ids, * rows, the running-job cap, delivery queues and sinks stay on the root's * manager; a worker-registered job's body runs in the worker (its `run` * function crosses), and main's cancellation aborts it through the run * context's signal. Delivery sinks, settle listeners and widget subscriptions a * worker registered are dropped when it exits, so owned deliveries dead-letter * exactly as for a disposed in-process session. * * A worker job's `process` and `widgetInputs` arrive as a {@link WireJobFeed}; * {@link JobFeedMirror} keeps the latest pids, brief and source text main * pulled (each synchronous read starts one background pull) or the body pushed * as it settled, so the widget registry's final read sees the job's last output. * * Worker side: see `./async-jobs-remote`. */ import { type AsyncJob } from "../../async/job-manager.js"; import type { ThreadService } from "../services.js"; import { type AsyncJobWire } from "./async-jobs-protocol.js"; /** Cloneable projection of a main job row. */ export declare function toJobWire(job: AsyncJob): AsyncJobWire; /** * Root `AsyncJobManager`s for subagent workers: main serves them by reference, workers use * {@link RemoteAsyncJobManager}. See the module doc. */ export declare const asyncJobsThreadService: ThreadService;