import { c as WorkspaceModuleFactory } from "../shared-BP8PrtyI.js"; //#region src/modules/container.d.ts /** Options for {@link createContainerModule}. */ interface ContainerModuleOptions { /** Id of the container backend. Defaults to `"container-shell"`. */ readonly backend?: string; /** * Largest standard output and standard error returned to the * isolate, in bytes per stream. Longer output keeps its last lines * (up to 2000), and the runtime saves all of it to a Workspace file * that `truncated` names. Defaults to 64 KiB. Keep both streams well * under the backend's `maxCapabilityBytes`. */ readonly maxOutputBytes?: number; /** * Most lines of each stream returned to the isolate. Defaults to the * runtime's 2000. */ readonly maxOutputLines?: number; readonly prelude?: string; } /** * Build the `ws:container` host module over the Workspace's container * backend. * * It exports `exec(command, { cwd, env, stdin, timeoutMs })`, which * returns `{ exitCode, stdout, stderr, sync }` once the command * finishes. `sync` reports whether the container's file changes reached * the Workspace, the first 100 paths it skipped, and `skippedCount`. A * non-zero exit code is a normal result, not an error. Cancelling the * execution kills the command. * * A container command can write to the Workspace, so `exec` refuses to * run on a read-only backend. Network access follows the container * backend's own egress setting; the JavaScript backend's does not apply. * * @param options - Which backend to use and how much output to return. * @returns The module to pass as `modules["ws:container"]`. Its * `description` tells the model how to use it. * @throws When `maxOutputBytes` is not a positive integer. The module * also throws when the backend connects if the Workspace has no * such backend, or that backend runs module source rather than shell * commands. A callable shell backend is fine. */ declare function createContainerModule(options?: ContainerModuleOptions): WorkspaceModuleFactory; //#endregion export { ContainerModuleOptions, createContainerModule }; //# sourceMappingURL=container.d.ts.map