import { spawnSync } from "node:child_process"; import { resolve } from "node:path"; import { SmithersError } from "../utils/errors"; import type { SerializedCtx, HostNodeJson } from "./create-external-smithers"; export type PythonSubprocessConfig = { /** Path to the Python workflow script. */ scriptPath: string; /** Working directory for the subprocess. Defaults to cwd. */ cwd?: string; /** Timeout in milliseconds. Defaults to 30000. */ timeoutMs?: number; /** Additional environment variables for the subprocess. */ env?: Record; }; /** * Create a synchronous build function that spawns `uv run