Blocking commands
Usecommands.run() when you want to execute a command and wait for it to finish before continuing. The call blocks until the process exits and returns the full exit_code, stdout, and stderr. An optional truncated flag indicates whether the output was cut short by the platform.
Pass timeoutSeconds (TypeScript) or timeout_seconds (Python/Rust) to set a maximum wall-clock limit for the command.
- TypeScript
- Python
- Rust
When the command timeout expires, FissionPlane terminates the process and throws a command-timeout error. Catch it with
CommandTimeoutError (TypeScript/Python) or match on fissionplane::Error (Rust) to handle timeouts gracefully in your application logic.Background processes
Usecommands.start() when you need to keep the process running while streaming its output or sending it input over time. Optionally request a PTY — pass pty: { cols, rows } to allocate a pseudo-terminal with the specified dimensions. Call attach() (or process.attach(0) in Rust) on the returned handle to get an iterable stream of events.
- TypeScript
- Python
- Rust
Sending stdin
After callingattach(), send input to the process using sendInput() / send_input(). This is especially useful for interactive shells and REPL-based workflows.
- TypeScript
- Python
- Rust
Listing processes
Callcommands.listProcesses() / list_processes() / Commands::list_processes() to get a snapshot of all processes currently supervised by the data-plane agent in this sandbox.
- TypeScript
- Python
- Rust
Killing a process
Send a signal to a specific process by PID usingcommands.kill() / Commands::kill(). Pass the PID and a signal name such as "SIGTERM" or "SIGKILL".
- TypeScript
- Python
- Rust