assert_state
Verify desktop conditions like window, focus, text, widget, or clipboard state. Each assertion returns passed/failed with observed evidence, making mismatches results rather than errors.
Instructions
Prove the desktop is in a state, with evidence -- the honest way to END a task. Each assertion comes back passed/failed with what was actually observed; a false assertion is a result, not an error. Give any of: window_exists, window_focused, text_present, widget_exists, clipboard_contains.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text_present | No | {"text": ..., "window": ...}: the string must be visible (OCR) in that window. | |
| widget_exists | No | {"app": ..., "text" and/or "role"}: a matching AT-SPI widget must exist. | |
| window_exists | No | A window id, wm_class or title fragment that must exist. | |
| window_focused | No | A window that must exist AND hold focus. | |
| clipboard_contains | No | The clipboard text must contain this string. |