Wait on a terminal
herdr_waitWaits until a program or agent reports idle/done/blocked/error, exits, or prints specified output; replaces sleep/polling, and timeouts are check-ins to wait again.
Instructions
Wait until a program is not working (an agent reports idle/done/blocked/error, or a program exits), or with output, until it prints that text. Use it instead of sleeping or polling. A timeout is a check-in (ended=false), not a failure: wait again. children=all waits until none of the caller's children is working; children=any returns on the next child's news.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | For programs: end when output printed after the wait starts contains this text. | |
| timeout | No | Seconds before the wait checks in, leaving it running (default 180). | |
| children | No | ||
| terminal | No | The terminal; with children, whose children (default: the caller). |