ProcessClient
Source: src/services/process.ts
Signature
Section titled “Signature”ProcessClient(transport: Leap0Transport)Overview
Section titled “Overview”Executes one-shot commands inside a sandbox.
Throws
Section titled “Throws”Leap0Error: If the process request or response validation fails.
Methods
Section titled “Methods”execute
Section titled “execute”async execute(sandbox: SandboxRef, params: ExecuteProcessParams, options: RequestOptions = {}): Promise<ProcessResult>Executes a one-shot command inside the sandbox.
Parameters
Section titled “Parameters”sandbox: Sandbox ID or sandbox-like object.params: Command execution parameters.params.command: Command line to execute.params.cwd: Optional working directory.params.timeout: Optional command timeout in milliseconds.params.env: Optional environment variables applied to the spawned process.options: Optional request settings such as timeout and query params.
Returns
Section titled “Returns”- The process exit code and collected stdout/stderr output.
Examples
Section titled “Examples”const result = await sandbox.process.execute({ command: "node --version" });