Commands
Module for starting and interacting with commands in the sandbox.Constructors
Parameters
Returns
Commands
Methods
closeStdin()
stdin: true.
Parameters
Returns
Promise<void>
connect()
Parameters
Returns
Promise<CommandHandle>
CommandHandle handle to interact with the running command.
kill()
SIGKILL signal to kill the command.
Parameters
Returns
Promise<boolean>
true if the command was killed, false if the command was not found.
list()
Parameters
Returns
Promise<ProcessInfo[]>
list of running commands and PTY sessions.
run()
Call Signature
Parameters
Returns
Promise<CommandResult>
CommandResult result of the command execution.
Call Signature
Parameters
Returns
Promise<CommandHandle>
CommandHandle handle to interact with the running command.
Call Signature
Parameters
Returns
Promise<CommandHandle | CommandResult>
Either a CommandHandle or a CommandResult (depending on opts.background).
sendStdin()
Parameters
Returns
Promise<void>
Pty
Module for interacting with PTYs (pseudo-terminals) in the sandbox.Constructors
Parameters
Returns
Pty
Methods
connect()
Parameters
Returns
Promise<CommandHandle>
handle to interact with the PTY.
create()
Parameters
Returns
Promise<CommandHandle>
handle to interact with the PTY.
kill()
SIGKILL signal to kill the PTY.
Parameters
Returns
Promise<boolean>
true if the PTY was killed, false if the PTY was not found.
resize()
Parameters
Returns
Promise<void>
sendInput()
Parameters
Returns
Promise<void>
Interfaces
CommandRequestOpts
Options for sending a command request.Extended by
CommandStartOpts
Properties
requestTimeoutMs?
Default
AbortSignal that can be used to cancel the in-flight request.
When the signal is aborted, the underlying fetch is aborted and the
returned promise rejects with an AbortError.
cwd?
Default
envs?
Sandbox constructor.
Default
{}
onStderr()?
Parameters
Returns
void | Promise<void>
onStdout()?
Parameters
Returns
void | Promise<void>
requestTimeoutMs?
Default
signal?
AbortSignal that can be used to cancel the in-flight request.
When the signal is aborted, the underlying fetch is aborted and the
returned promise rejects with an AbortError.
stdin?
Default
timeoutMs?
Default
user?
Default
default Sandbox user (as specified in the template)