waitForTerminalOutput
Blocks script execution until terminal output matches a given JavaScript regex. Returns matched line and elapsed time, or indicates timeout.
Instructions
Block until regex matches terminal output. Returns {matched, matchedLine, elapsed} or timedOut.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | JS regex to match against terminal output lines | |
| name | No | Terminal name (from listTerminals). Uses active if omitted. | |
| index | No | Terminal index (0-based) from listTerminals. Used if name omitted. | |
| timeout | No | Seconds to wait (default: 30, max: 300) |