Gets the current terminal output without waiting for the command to exit.
Waits for the terminal command to complete and returns its exit status.
Kills the terminal command without releasing the terminal.
The terminal remains valid after killing, allowing you to:
currentOutput()Useful for implementing timeouts or cancellation.
Releases the terminal and frees all associated resources.
If the command is still running, it will be killed. After release, the terminal ID becomes invalid and cannot be used with other terminal methods.
Tool calls that already reference this terminal will continue to display its output.
Important: Always call this method when done with the terminal.
Handle for controlling and monitoring a terminal created via
createTerminal.Provides methods to:
Important: Always call
release()when done with the terminal to free resources.The terminal supports async disposal via
Symbol.asyncDisposefor automatic cleanup.You can use
await usingto ensure the terminal is automatically released when it goes out of scope.