import { l as SandboxEntity } from "./types-CjEJw7Bn.mjs"; import { DslAudit } from "@mengine/medeo-client"; //#region src/sandbox/worker.d.ts /** * Node worker entry for agent edit scripts: open the document fork, run the * script in a bare `vm` context holding only the bindings `script-bridge.ts` * builds there, and report the plan. Writes and logs stream to the host, so a * timeout or out-of-memory termination still leaves the partial count. */ interface WorkerData { snapshot: Uint8Array; script: string; audit: Omit; /** Deterministic id label for tests; omitted, ids are random. */ idLabel?: string; /** Whether the host reads files; without it a plan leaves the facts of the files it names unknown. */ readsFiles: boolean; } type WorkerMessage = { t: 'read-file'; requestId: number; entity: SandboxEntity; } | { t: 'upload-text'; requestId: number; text: string; } | { t: 'ready'; } | { t: 'write'; } | { t: 'log'; line: string; } | { t: 'done'; preview: string; loroUpdate?: string; createdMedia: { id: string; key: string; }[]; } | { t: 'fail'; phase: 'parse' | 'runtime'; error: { message: string; line?: number; column?: number; stack?: string; }; }; //#endregion export { WorkerData, WorkerMessage }; //# sourceMappingURL=worker.d.mts.map