glass_wait_for_log
Waits for a log line containing a substring, returns it and a cursor to resume from. Pass a cursor to capture lines emitted before the call; times out when no match appears.
Instructions
Block until a log line containing contains (optionally on a given stream) appears, then return it as text. By default only lines emitted after this call count; pass a cursor from glass_logs to catch a line emitted just before. Returns {matched,line{seq,stream,text},cursor,elapsed_ms}; on timeout {matched:false}. Resume reading from the returned cursor.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Start scanning from this cursor (from a prior glass_logs). Omit to match only lines emitted after this call. | |
| stream | No | "stdout", "stderr", or "both" (default). | |
| contains | Yes | Substring to wait for (required, non-empty). | |
| timeout_ms | No | Give up after this long (default 10000ms); returns `{matched:false}`. | |
| interval_ms | No | Poll interval (default 100ms). |