1import type { SourceBundle } from "../generate/bundle";
2import type { PlainValue } from "./plain";
3import type { BackendInfo, RunResult } from "./types";
5export type ToWorker =
6 | {
7 type: "run";
8 id: number;
9 bundle: SourceBundle;
10 inputs?: Record<string, PlainValue>;
11 }
12 | { type: "info"; id: number };
14export type FromWorker =
15 | { type: "output"; id: number; text: string }
16 | { type: "done"; id: number; result: RunResult }
17 | { type: "info"; id: number; backend: BackendInfo };