craftos_expect
Waits for a ComputerCraft program to settle, checks screen, text, simulation, or waiting-state expectations, and returns pass/fail results with diagnostic evidence.
Instructions
Assert instead of look. Waits for the program to settle, checks the expectations and returns only {pass, failures}. A failure carries the reason and the closest things that do exist (nearest rectangles by colour, nearby text, the actual sim value), and the session saves PNGs plus a JSON dump to disk (evidence) that you open only if the text is not enough. Costs a few lines; prefer it over craftos_ui when you know what you expect.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"expect": "<expect>"
},
"name": "craftos_expect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id returned by craftos_session_create. | |
| expect | Yes | ||
| settle | No | ||
| waitMs | No | Keep re-checking for this long before failing: games animate with timers, so a screen can be still between frames. | |
| evidence | No | ||
| timeoutMs | No |