sandbox.exec.
sandbox.exec.run(command, opts?)
Run a command synchronously. HTTP API →
Shell command
Timeout in seconds
Environment variables
Working directory
Promise<ProcessResult>
sandbox.exec.start(command, opts?)
Start a long-running command with streaming. HTTP API →
Command
Arguments
Environment variables
Working directory
Timeout in seconds
Seconds to keep running after disconnect
Stdout callback
Stderr callback
Exit callback
Promise<ExecSession>
sandbox.exec.attach(sessionId, opts?)
Reconnect to a running exec session.
Session ID
Stdout callback
Stderr callback
Exit callback
Scrollback replay done
Promise<ExecSession>
sandbox.exec.list()
List all exec sessions. HTTP API →
Returns: Promise<ExecSessionInfo[]>
sandbox.exec.kill(sessionId, signal?)
Kill an exec session. Default signal: 9 (SIGKILL). HTTP API →
Returns: Promise<void>
ExecSession
| Member | Type | Description |
|---|---|---|
sessionId | string | Session ID |
done | Promise<number> | Resolves with exit code |
sendStdin(data) | method | Send input (string or Uint8Array) |
kill(signal?) | Promise<void> | Kill process |
close() | method | Close WebSocket |
Types
ProcessResult
ProcessResult
ExecSessionInfo
ExecSessionInfo