Expand description
computer_wait — block until an element reaches a state, or time out
with a diagnosis.
This is a standalone OBSERVATION tool (like [super::apps] and
[super::snapshot]): it sends no input and moves nothing, so it is
allowed in every mode including Ask. It replaces poll-loops (snapshot →
check → snapshot …, each a full round trip) with one blocking call:
wait until a selector reaches a state, or fail with the condition AND
the last observed state so the model can decide the next move without
another probe.
Every xa11y call is blocking (platform accessibility APIs are synchronous), so it runs on tokio’s blocking pool like every other tool in this module.
Constants§
- DEFAULT_
WAIT_ MS - Default wait before giving up: long enough for dialogs to open and spinners to finish, short enough that a stuck call wastes one round trip, not a minute.
- MAX_
WAIT_ MS - Hard cap on a single wait: a stuck condition must not pin the agent loop (or the blocking pool) for minutes. Chain calls for longer waits.