onda_terminal_wait_for
Waits for a regex pattern to match terminal output, enabling scripted command sequences to pause until expected output appears. Returns match status and matched text.
Instructions
Block until a regex pattern matches new terminal output, or timeout. Useful to synchronize scripted command sequences: run command -> wait for prompt -> run next command. Pattern is a JavaScript regex string; flags default to "m" (multiline). Returns { matched: bool, match?: string }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Terminal ID to watch. | |
| flags | No | Regex flags. Default "m". | |
| pattern | Yes | Regex pattern (string form). | |
| timeoutMs | No | Max wait in ms. Default 30000. |