{
  "answers": {
    "c00": {
      "noul": 0.99,
      "type": "noul"
    },
    "c01": {
      "noul": 0.96,
      "type": "noul"
    },
    "c02": {
      "noul": 0.97,
      "type": "noul"
    },
    "c03": {
      "noul": 0.94,
      "type": "noul"
    },
    "c04": {
      "noul": 0.98,
      "type": "noul"
    },
    "c05": {
      "noul": 0.69,
      "type": "noul"
    },
    "c06": {
      "noul": 0.98,
      "type": "noul"
    },
    "c07": {
      "noul": 0.96,
      "type": "noul"
    },
    "c08": {
      "noul": 0.98,
      "type": "noul"
    },
    "c09": {
      "noul": 0.98,
      "type": "noul"
    },
    "c10": {
      "noul": 0.98,
      "type": "noul"
    },
    "c11": {
      "noul": 0.98,
      "type": "noul"
    },
    "c12": {
      "noul": 0.99,
      "type": "noul"
    },
    "c13": {
      "noul": 0.96,
      "type": "noul"
    },
    "c14": {
      "noul": 0.98,
      "type": "noul"
    },
    "c15": {
      "noul": 0.86,
      "type": "noul"
    },
    "w00": {
      "noul": 0.01,
      "type": "noul"
    },
    "w01": {
      "noul": 0.01,
      "type": "noul"
    },
    "w02": {
      "noul": 0.01,
      "type": "noul"
    },
    "w03": {
      "noul": 0.01,
      "type": "noul"
    },
    "w04": {
      "noul": 0.01,
      "type": "noul"
    },
    "w05": {
      "noul": 0.01,
      "type": "noul"
    },
    "w06": {
      "noul": 0.94,
      "type": "noul"
    },
    "w07": {
      "noul": 0.93,
      "type": "noul"
    },
    "w08": {
      "noul": 0.95,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T01:25:49Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.99,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.96,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.97,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.94,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.98,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.69,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.98,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.96,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.98,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.98,
      "question": "c09"
    },
    {
      "call": 10,
      "noul": 0.98,
      "question": "c10"
    },
    {
      "call": 11,
      "noul": 0.98,
      "question": "c11"
    },
    {
      "call": 12,
      "noul": 0.99,
      "question": "c12"
    },
    {
      "call": 13,
      "noul": 0.96,
      "question": "c13"
    },
    {
      "call": 14,
      "noul": 0.98,
      "question": "c14"
    },
    {
      "call": 15,
      "noul": 0.86,
      "question": "c15"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 14811,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "debug": "not a boolean"
          },
          "parameter": "debug",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected debug to be a boolean. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "action-button"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "action": {}
          },
          "parameter": "action",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected action to be one of: probe. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "audio"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error (INVALID_ARGS): Expected action to be set. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "clipboard"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "action": {}
          },
          "parameter": "action",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected action to be one of: read, write. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "clipboard"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "cursor": {}
          },
          "parameter": "cursor",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected cursor to be a non-empty string. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "events"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error (INVALID_ARGS): Expected format to be set. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "get"
        },
        "type": "noul"
      },
      "c06": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "format": {}
          },
          "parameter": "format",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected format to be one of: text, attrs. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "get"
        },
        "type": "noul"
      },
      "c07": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "action": {}
          },
          "parameter": "action",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected action to be one of: status, dismiss, enter, return. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "keyboard"
        },
        "type": "noul"
      },
      "c08": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error (INVALID_ARGS): Expected orientation to be set. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "orientation"
        },
        "type": "noul"
      },
      "c09": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "orientation": {}
          },
          "parameter": "orientation",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected orientation to be one of: portrait, portrait-upside-down, landscape-left, landscape-right, auto. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "orientation"
        },
        "type": "noul"
      },
      "c10": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error (INVALID_ARGS): Expected app to be set. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "reinstall"
        },
        "type": "noul"
      },
      "c11": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "app": {},
            "appPath": "didrun"
          },
          "parameter": "app",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected app to be a non-empty string. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "reinstall"
        },
        "type": "noul"
      },
      "c12": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "debug": "not a boolean"
          },
          "parameter": "debug",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected debug to be a boolean. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "shutdown"
        },
        "type": "noul"
      },
      "c13": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "Error (INVALID_ARGS): Expected event to be set. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "trigger-app-event"
        },
        "type": "noul"
      },
      "c14": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "event": {}
          },
          "parameter": "event",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "Error (INVALID_ARGS): Expected event to be a non-empty string. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "trigger-app-event"
        },
        "type": "noul"
      },
      "c15": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "Error (INVALID_ARGS): Unknown command tool: didrun_unknown_tool. Next: Fix the command arguments; run help <command> for usage.",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "",
          "done_when": "The tools' replies show the device inventory in JSON, including an empty inventory if none are available.",
          "how_it_ended": "no_answer",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "mcpOutputFormat": "json",
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "devices"
            },
            {
              "arguments": {
                "mcpOutputFormat": "json",
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "devices"
            }
          ],
          "task": "List the devices and simulators available for automation, returning the full results as JSON."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "",
          "done_when": "The tools' replies show the device inventory in JSON, including an empty inventory if none are available.",
          "how_it_ended": "no_answer",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "mcpOutputFormat": "json",
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "devices"
            },
            {
              "arguments": {
                "mcpOutputFormat": "json",
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "devices"
            }
          ],
          "task": "List the devices and simulators available for automation, returning the full results as JSON."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I couldn’t retrieve the device and simulator list: the automation tool timed out without returning a result.",
          "done_when": "The tools' replies show the device inventory in JSON, including an empty inventory if none are available.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "mcpOutputFormat": "json",
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "devices"
            }
          ],
          "task": "List the devices and simulators available for automation, returning the full results as JSON."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I attempted a local device-readiness diagnosis without checking any remote connection, but the diagnostic tool timed out without returning results. I can’t determine device readiness from that attempt.",
          "done_when": "The tools' replies show the local diagnostic results, including any missing toolchains or devices.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "remote": false,
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "doctor"
            }
          ],
          "task": "Run a local device-readiness diagnosis and show the results, without checking any remote connection."
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "I attempted to run the local device-readiness diagnosis with remote connection checks disabled, but the tool timed out without returning any results. I can’t report the device readiness status from that attempt.",
          "done_when": "The tools' replies show the local diagnostic results, including any missing toolchains or devices.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "remote": false,
                "responseLevel": "full"
              },
              "reply": "no reply",
              "tool": "doctor"
            }
          ],
          "task": "Run a local device-readiness diagnosis and show the results, without checking any remote connection."
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "",
          "done_when": "The tools' replies show the local diagnostic results, including any missing toolchains or devices.",
          "how_it_ended": "no_answer",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {},
              "reply": "no reply",
              "tool": "doctor"
            },
            {
              "arguments": {
                "remote": false,
                "responseLevel": "digest"
              },
              "reply": "no reply",
              "tool": "doctor"
            }
          ],
          "task": "Run a local device-readiness diagnosis and show the results, without checking any remote connection."
        },
        "type": "noul"
      },
      "w06": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "# Server usage guide: writing automation scripts\n\nThe server returned the following guidance for **agent-device 0.21.37**. Its response ended mid-sentence, so the final section is incomplete.\n\n## MCP syntax\n\nThe guide uses terminal commands. When calling through MCP, use the tool named after the command and pass arguments as named properties. For example:\n\n- `press {ref: \"@e12\", settle: true}`\n- `snapshot {interactiveOnly: true}`\n\nPositionals become properties such as `ref`, `selector`, `text`, and `direction`; options become camelCase properties. Some commands mentioned in terminal documentation have no MCP tool.\n\n## Script paths\n\n- `replay <path>` and `test <path-or-glob>` read scripts on the machine running the command, then send their contents—including Maestro `runFlow` includes—with the request. Missing scripts fail immediately.\n- `--save-script` writes on the **daemon host** and is rejected against a remote daemon.\n- In JSON test results, `infrastructure: true` identifies a failed test whose owning runtime classified the failure as device, runner, boot, or transport related. It remains a failed test.\n\n## `.ad` line grammar\n\nEach line has the form:\n\n```text\n<command> [positional...] [flag...]\n```\n\nWhitespace splits tokens. Double or single quotes keep a value together:\n\n- Double-quoted values are JSON strings, supporting escapes such as `\\\\`, `\\\"`, `\\t`, and `\\n`.\n- Single-quoted values are literal; backslashes retain their own character, except `\\'` escapes an apostrophe.\n- Example: `press 'id=\"far\"'`\n\nScripts carry only command flags marked as recorded. Common per-request options that are **not** carried into scripts include `--settle`, `--verify`, `scroll --pixels`, `scroll --duration-ms`, and device-selection flags.\n\nFor viewport-independent navigation, prefer:\n\n```text\nscroll down --until 'id=\"x\"'\n```\n\nInteraction commands resolve their target once. Before interacting with a loading screen, add a landmark wait:\n\n```text\nwait 'label=\"Continue\"' 5000\npress ",
          "done_when": "The tools' replies contain the scripting usage guide.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "topic": "scripting"
              },
              "reply": "CLI syntax over MCP: the guide below is written for the terminal. Call the tool named after the command and pass every argument as a named property, for example press {ref: \"@e12\", settle: true} or snapshot {interactiveOnly: true}. Positionals become properties such as ref, label, selector, x, y, text, and direction; options become camelCase properties. Terminal-only (no MCP tool; run in a shell): auth, cdp, connect, connection, daemon, device, disconnect, mcp, plugins, prepare, proxy, react-devtools, takeover, web.\n\nagent-device 0.21.37 — scripting\n\nUse this for reusable .ad script authoring (save-script), scripted destination guards, secret-safe fills, batch multi-step JSON, replay divergence/repair, and evidence recording.\n\nScript paths are the caller's:\n  replay <path> and test <path-or-glob> resolve and read on the machine running the command, then send the script content (Maestro runFlow includes too) with the request. The same flows therefore run against a local daemon and against a remote one (AGENT_DEVICE_DAEMON_BASE_URL) with no copy step, and a missing script fails immediately, naming the path you typed. --save-script writes on the DAEMON host and is rejected against a remote daemon.\n  test --json marks a failed test with infrastructure: true only when the owning runtime classified a device, runner, boot, or transport failure. It remains a failed test; consumers may use the tag to distinguish \"the oracle did not run\" from a behavioral replay divergence without weakening either gate.\n\nScript line grammar:\n  A .ad line is <command> [positional...] [flag...]. Whitespace splits tokens; a token quoted with \" or ' is one argument, and single quotes keep a double quote literal, exactly as at the shell (press 'id=\"far\"' is one selector). Values in double quotes are JSON strings (escape \\\\, \\\", \\t, \\n). Values in single quotes are literal, as at the shell: a backslash keeps its own character and the only escape is \\' for an apostrophe. A script carries only the flags declared for that command and marked recorded, so the script form of a step matches the CLI form: scroll down --until 'id=\"x\"', wait 'label=\"Sign in\"' --raw. CLI-only spellings and per-request options are not part of a step: --settle, --verify, scroll --pixels/--duration-ms, and the device-selection flags (--platform, --serial, --device) are the common ones a script does not carry.\n  Reaching an off-screen target is viewport-independent in a script the same way it is at the CLI: write scroll down --until <selector>, not a fixed scroll amount that passes on one screen size and fails on another.\n  press/click/longpress resolve their target once. Before interacting with a loading screen, add an explicit landmark wait: wait 'label=\"Continue\"' 5000, then press 'label=\"Continue\"'.\n\nReusable open-to-destination scripts:\n  Arm recording on the first open, perform the full journey, verify the destination with a selector-targeted wait, then publish without closing:\n    agent-device open com.example.app --relaunch --save-script=screen-x.ad\n    agent-device press 'id=\"continue\"' --settle\n    agent-device wait 'role=\"heading\" label=\"Screen X\"'\n    agent-device session save-script\n  session save-script [path] [--force] publishes the sole recorded open through the destination guard, omits close, and leaves the session active. The guard is a selector wait on a labeled/id-bearing landmark: its identity is captured while armed and re-verified after the wait resolves at replay time, so a reshuffled screen with the same label elsewhere fails closed instead of false-passing. A duration wait, wait stable, wait absent, wait @ref, or a selector wait on an unlabeled element is not a destination guard. A second successful open aborts publication; start a fresh session to author again.\n  Unparameterized fill/type inputs are literal .ad script content. For a sensitive fill, arm recording first, keep the live value in an env var, and name its replay placeholder explicitly:\n    export AD_VAR_PASSWORD='<secret>'\n    agent-device fill 'id=\"password\"' \"$AD_VAR_PASSWORD\" --record-as PASSWORD\n  The live app receives the value; recording state and the published script contain only ${PASSWORD}. Reuse the same name for repeated values; --record-as is fill-only, requires an armed recording, and is mutually exclusive with --no-record. Replay with AD_VAR_PASSWORD still set, or pass --env PASSWORD=<value>. Do not record passwords/tokens without --record-as; their literal text is written to the .ad target.\n  To keep the value out of the CLI's argv as well, pipe it in with --text-stdin instead of a text argument:\n    printf %s \"$AD_VAR_PASSWORD\" | agent-device fill 'id=\"password\"' --text-stdin --record-as PASSWORD\n  --text-stdin reads at most 64 KiB, removes exactly one trailing newline, and refuses a terminal, empty input, invalid UTF-8, or an extra text argument. While recording is armed, --record-as publishes ${VAR} and --no-record leaves the step out; passing neither is an error. Output shows the value as ${VAR} with --record-as and as [REDACTED] otherwise, including in error messages and in the requested, before and after read-back of an unconfirmed fill, which can hold a reformatted form of the value. With --settle, the diff line text and tail labels are replaced whole; refs and counts stay. Without an armed recording the step is not recorded. It is not available inside batch steps.\n  The privacy controls for typed input (--text-stdin and --record-as) keep the literal out of agent-device's own responses, diagnostics, and recorded scripts. They do not rewrite what the platform records: on iOS, XCTest writes its own diagnostic logs and its .xcresult bundle, and typed text can appear in both, on a simulator or a physical device. Treat those as sensitive, and use test-only credentials when they may be kept or shared.\n\nReplay divergence and repair:\n  A failing replay/test step returns REPLAY_DIVERGENCE with a bounded report (screen digest, ranked selector suggestions, resume). Fix app state, then resume with replay --from <n> --plan-digest <sha256> (both from the report's resume field) to continue without re-running earlier steps; resume never re-executes skipped steps, so app state there is the caller's responsibility. --from is replay-only; test rejects it. The digest binds the script, includes, effective --platform/--target, and per-action runtime/identity; native .ad interpolation is late-bound so changing only its values keeps the digest, while Maestro environment substitution can change it.\n  A resource step that cannot run in bounded batch/replay returns details.reason bounded_composite_resource_unsupported, details.shape, and dispatched: no for that step. Affected commands include perf, audio, record, trace, some logs operations, close when it would dispose an owned capture or release a provider lease, and acquisition that would recover another session's durable resources. Existing-session open preserves its owned resource handles. An Android test IME alone is restored by ordinary close, including a bounded step; restoration may settle after the remaining composite time. If restore fails, close retires the session but retains its device claim: inspect the device and claim before recovery, rather than retrying close on the retired session. details.standaloneCommandName names the public command when known; it is not a complete command. Run the original refused step separately with its original arguments and options, the same --session value, and the same private CLI context. For replay, inspect the failed source line. After completing the step directly, use resume.alternateFrom with planDigest if offered and steps remain; resume.from retries the same bounded step and refuses it again. An authored .ad command without a resource classification fails closed with shape <command>:unclassified. Inspect completed steps before retrying the composite; earlier steps may have changed the app. A nested test with an attempt timeout ",
              "tool": "help"
            }
          ],
          "task": "Show me the server's usage guide for writing automation scripts."
        },
        "type": "noul"
      },
      "w07": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "# Server usage guide: writing automation scripts\n\nThe server’s **scripting** guide covers reusable `.ad` scripts, destination guards, secret-safe input, replay, and repair. It is written in CLI syntax; when using the MCP tools, call the named tool and pass arguments as named properties. For example, `press '@e12' --settle` becomes `press {ref: \"@e12\", settle: true}`.\n\n## Script syntax\n\nEach `.ad` line has the form:\n\n```text\n<command> [positional...] [flag...]\n```\n\nWhitespace separates tokens. Use single or double quotes to keep a value together:\n\n```text\npress 'id=\"far\"'\nscroll down --until 'id=\"x\"'\nwait 'label=\"Sign in\"' --raw\n```\n\nDouble-quoted values use JSON string escaping; single-quoted values are literal except that `\\'` represents an apostrophe.\n\nScripts carry only flags marked as recorded for each command. Common per-request options such as `--settle`, `--verify`, device-selection flags, and `scroll --pixels` or `--duration-ms` are not carried into script steps.\n\nFor viewport-independent navigation, prefer `scroll down --until <selector>` over a fixed scroll distance. Before interacting with a loading screen, add an explicit landmark wait:\n\n```text\nwait 'label=\"Continue\"' 5000\npress 'label=\"Continue\"'\n```\n\n## Record a reusable journey\n\nArm recording on the first open, perform the journey, verify the destination with a selector-targeted wait, then publish without closing:\n\n```sh\nagent-device open com.example.app --relaunch --save-script=screen-x.ad\nagent-device press 'id=\"continue\"' --settle\nagent-device wait 'role=\"heading\" label=\"Screen X\"'\nagent-device session save-script\n```\n\n`session save-script [path] [--force]` publishes the recorded journey through its destination guard, omits `close`, and leaves the session active.\n\nThe destination guard must be a selector wait on a labeled or ID-bearing landmark. Its identity is captured during recording and checked again during replay. Duration waits, stable or absent waits, ref waits, and waits on unlabeled eleme",
          "done_when": "The tools' replies contain the scripting usage guide.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "topic": "scripting"
              },
              "reply": "CLI syntax over MCP: the guide below is written for the terminal. Call the tool named after the command and pass every argument as a named property, for example press {ref: \"@e12\", settle: true} or snapshot {interactiveOnly: true}. Positionals become properties such as ref, label, selector, x, y, text, and direction; options become camelCase properties. Terminal-only (no MCP tool; run in a shell): auth, cdp, connect, connection, daemon, device, disconnect, mcp, plugins, prepare, proxy, react-devtools, takeover, web.\n\nagent-device 0.21.37 — scripting\n\nUse this for reusable .ad script authoring (save-script), scripted destination guards, secret-safe fills, batch multi-step JSON, replay divergence/repair, and evidence recording.\n\nScript paths are the caller's:\n  replay <path> and test <path-or-glob> resolve and read on the machine running the command, then send the script content (Maestro runFlow includes too) with the request. The same flows therefore run against a local daemon and against a remote one (AGENT_DEVICE_DAEMON_BASE_URL) with no copy step, and a missing script fails immediately, naming the path you typed. --save-script writes on the DAEMON host and is rejected against a remote daemon.\n  test --json marks a failed test with infrastructure: true only when the owning runtime classified a device, runner, boot, or transport failure. It remains a failed test; consumers may use the tag to distinguish \"the oracle did not run\" from a behavioral replay divergence without weakening either gate.\n\nScript line grammar:\n  A .ad line is <command> [positional...] [flag...]. Whitespace splits tokens; a token quoted with \" or ' is one argument, and single quotes keep a double quote literal, exactly as at the shell (press 'id=\"far\"' is one selector). Values in double quotes are JSON strings (escape \\\\, \\\", \\t, \\n). Values in single quotes are literal, as at the shell: a backslash keeps its own character and the only escape is \\' for an apostrophe. A script carries only the flags declared for that command and marked recorded, so the script form of a step matches the CLI form: scroll down --until 'id=\"x\"', wait 'label=\"Sign in\"' --raw. CLI-only spellings and per-request options are not part of a step: --settle, --verify, scroll --pixels/--duration-ms, and the device-selection flags (--platform, --serial, --device) are the common ones a script does not carry.\n  Reaching an off-screen target is viewport-independent in a script the same way it is at the CLI: write scroll down --until <selector>, not a fixed scroll amount that passes on one screen size and fails on another.\n  press/click/longpress resolve their target once. Before interacting with a loading screen, add an explicit landmark wait: wait 'label=\"Continue\"' 5000, then press 'label=\"Continue\"'.\n\nReusable open-to-destination scripts:\n  Arm recording on the first open, perform the full journey, verify the destination with a selector-targeted wait, then publish without closing:\n    agent-device open com.example.app --relaunch --save-script=screen-x.ad\n    agent-device press 'id=\"continue\"' --settle\n    agent-device wait 'role=\"heading\" label=\"Screen X\"'\n    agent-device session save-script\n  session save-script [path] [--force] publishes the sole recorded open through the destination guard, omits close, and leaves the session active. The guard is a selector wait on a labeled/id-bearing landmark: its identity is captured while armed and re-verified after the wait resolves at replay time, so a reshuffled screen with the same label elsewhere fails closed instead of false-passing. A duration wait, wait stable, wait absent, wait @ref, or a selector wait on an unlabeled element is not a destination guard. A second successful open aborts publication; start a fresh session to author again.\n  Unparameterized fill/type inputs are literal .ad script content. For a sensitive fill, arm recording first, keep the live value in an env var, and name its replay placeholder explicitly:\n    export AD_VAR_PASSWORD='<secret>'\n    agent-device fill 'id=\"password\"' \"$AD_VAR_PASSWORD\" --record-as PASSWORD\n  The live app receives the value; recording state and the published script contain only ${PASSWORD}. Reuse the same name for repeated values; --record-as is fill-only, requires an armed recording, and is mutually exclusive with --no-record. Replay with AD_VAR_PASSWORD still set, or pass --env PASSWORD=<value>. Do not record passwords/tokens without --record-as; their literal text is written to the .ad target.\n  To keep the value out of the CLI's argv as well, pipe it in with --text-stdin instead of a text argument:\n    printf %s \"$AD_VAR_PASSWORD\" | agent-device fill 'id=\"password\"' --text-stdin --record-as PASSWORD\n  --text-stdin reads at most 64 KiB, removes exactly one trailing newline, and refuses a terminal, empty input, invalid UTF-8, or an extra text argument. While recording is armed, --record-as publishes ${VAR} and --no-record leaves the step out; passing neither is an error. Output shows the value as ${VAR} with --record-as and as [REDACTED] otherwise, including in error messages and in the requested, before and after read-back of an unconfirmed fill, which can hold a reformatted form of the value. With --settle, the diff line text and tail labels are replaced whole; refs and counts stay. Without an armed recording the step is not recorded. It is not available inside batch steps.\n  The privacy controls for typed input (--text-stdin and --record-as) keep the literal out of agent-device's own responses, diagnostics, and recorded scripts. They do not rewrite what the platform records: on iOS, XCTest writes its own diagnostic logs and its .xcresult bundle, and typed text can appear in both, on a simulator or a physical device. Treat those as sensitive, and use test-only credentials when they may be kept or shared.\n\nReplay divergence and repair:\n  A failing replay/test step returns REPLAY_DIVERGENCE with a bounded report (screen digest, ranked selector suggestions, resume). Fix app state, then resume with replay --from <n> --plan-digest <sha256> (both from the report's resume field) to continue without re-running earlier steps; resume never re-executes skipped steps, so app state there is the caller's responsibility. --from is replay-only; test rejects it. The digest binds the script, includes, effective --platform/--target, and per-action runtime/identity; native .ad interpolation is late-bound so changing only its values keeps the digest, while Maestro environment substitution can change it.\n  A resource step that cannot run in bounded batch/replay returns details.reason bounded_composite_resource_unsupported, details.shape, and dispatched: no for that step. Affected commands include perf, audio, record, trace, some logs operations, close when it would dispose an owned capture or release a provider lease, and acquisition that would recover another session's durable resources. Existing-session open preserves its owned resource handles. An Android test IME alone is restored by ordinary close, including a bounded step; restoration may settle after the remaining composite time. If restore fails, close retires the session but retains its device claim: inspect the device and claim before recovery, rather than retrying close on the retired session. details.standaloneCommandName names the public command when known; it is not a complete command. Run the original refused step separately with its original arguments and options, the same --session value, and the same private CLI context. For replay, inspect the failed source line. After completing the step directly, use resume.alternateFrom with planDigest if offered and steps remain; resume.from retries the same bounded step and refuses it again. An authored .ad command without a resource classification fails closed with shape <command>:unclassified. Inspect completed steps before retrying the composite; earlier steps may have changed the app. A nested test with an attempt timeout ",
              "tool": "help"
            }
          ],
          "task": "Show me the server's usage guide for writing automation scripts."
        },
        "type": "noul"
      },
      "w08": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Server usage guide: writing automation scripts\n\nThe server’s **scripting** guide covers reusable `.ad` scripts, destination guards, secret-safe fills, batch steps, and replay repair. Its examples use CLI syntax; when calling the MCP tools, use the command name as the tool and pass arguments as named properties.\n\n### Script format\n\nAn `.ad` line has the form:\n\n```text\n<command> [positional...] [flag...]\n```\n\nWhitespace separates tokens. Quote selectors containing spaces or quotes:\n\n```text\npress 'id=\"far\"'\nscroll down --until 'id=\"x\"'\nwait 'label=\"Sign in\"' --raw\n```\n\nDouble-quoted values are JSON strings; single-quoted values are literal except that `\\'` represents an apostrophe. Scripts carry only flags marked as recorded for the command—not per-request options such as `--settle`, `--verify`, device-selection flags, or `scroll --pixels` and `--duration-ms`.\n\nPrefer `scroll ... --until <selector>` over a fixed scroll amount. Because `press`, `click`, and `longpress` resolve their target once, add an explicit landmark wait before interacting with a loading screen:\n\n```text\nwait 'label=\"Continue\"' 5000\npress 'label=\"Continue\"'\n```\n\n### Record a reusable journey\n\nArm recording on the first open, complete the journey, wait for a destination landmark, and publish without closing the session:\n\n```sh\nagent-device open com.example.app --relaunch --save-script=screen-x.ad\nagent-device press 'id=\"continue\"' --settle\nagent-device wait 'role=\"heading\" label=\"Screen X\"'\nagent-device session save-script\n```\n\nThe destination guard must be a selector wait on a labeled or ID-bearing landmark. Its identity is captured during recording and checked during replay. Duration waits, stable or absence waits, ref waits, and waits on unlabeled elements are not destination guards. A second successful `open` aborts publication.\n\n### Keep secrets out of scripts\n\nUnparameterized `fill` and `type` inputs are recorded literally. For sensitive fills, use an explicit replay placeholder:\n\n```sh\nexp",
          "done_when": "The tools' replies contain the scripting usage guide.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "topic": "scripting"
              },
              "reply": "CLI syntax over MCP: the guide below is written for the terminal. Call the tool named after the command and pass every argument as a named property, for example press {ref: \"@e12\", settle: true} or snapshot {interactiveOnly: true}. Positionals become properties such as ref, label, selector, x, y, text, and direction; options become camelCase properties. Terminal-only (no MCP tool; run in a shell): auth, cdp, connect, connection, daemon, device, disconnect, mcp, plugins, prepare, proxy, react-devtools, takeover, web.\n\nagent-device 0.21.37 — scripting\n\nUse this for reusable .ad script authoring (save-script), scripted destination guards, secret-safe fills, batch multi-step JSON, replay divergence/repair, and evidence recording.\n\nScript paths are the caller's:\n  replay <path> and test <path-or-glob> resolve and read on the machine running the command, then send the script content (Maestro runFlow includes too) with the request. The same flows therefore run against a local daemon and against a remote one (AGENT_DEVICE_DAEMON_BASE_URL) with no copy step, and a missing script fails immediately, naming the path you typed. --save-script writes on the DAEMON host and is rejected against a remote daemon.\n  test --json marks a failed test with infrastructure: true only when the owning runtime classified a device, runner, boot, or transport failure. It remains a failed test; consumers may use the tag to distinguish \"the oracle did not run\" from a behavioral replay divergence without weakening either gate.\n\nScript line grammar:\n  A .ad line is <command> [positional...] [flag...]. Whitespace splits tokens; a token quoted with \" or ' is one argument, and single quotes keep a double quote literal, exactly as at the shell (press 'id=\"far\"' is one selector). Values in double quotes are JSON strings (escape \\\\, \\\", \\t, \\n). Values in single quotes are literal, as at the shell: a backslash keeps its own character and the only escape is \\' for an apostrophe. A script carries only the flags declared for that command and marked recorded, so the script form of a step matches the CLI form: scroll down --until 'id=\"x\"', wait 'label=\"Sign in\"' --raw. CLI-only spellings and per-request options are not part of a step: --settle, --verify, scroll --pixels/--duration-ms, and the device-selection flags (--platform, --serial, --device) are the common ones a script does not carry.\n  Reaching an off-screen target is viewport-independent in a script the same way it is at the CLI: write scroll down --until <selector>, not a fixed scroll amount that passes on one screen size and fails on another.\n  press/click/longpress resolve their target once. Before interacting with a loading screen, add an explicit landmark wait: wait 'label=\"Continue\"' 5000, then press 'label=\"Continue\"'.\n\nReusable open-to-destination scripts:\n  Arm recording on the first open, perform the full journey, verify the destination with a selector-targeted wait, then publish without closing:\n    agent-device open com.example.app --relaunch --save-script=screen-x.ad\n    agent-device press 'id=\"continue\"' --settle\n    agent-device wait 'role=\"heading\" label=\"Screen X\"'\n    agent-device session save-script\n  session save-script [path] [--force] publishes the sole recorded open through the destination guard, omits close, and leaves the session active. The guard is a selector wait on a labeled/id-bearing landmark: its identity is captured while armed and re-verified after the wait resolves at replay time, so a reshuffled screen with the same label elsewhere fails closed instead of false-passing. A duration wait, wait stable, wait absent, wait @ref, or a selector wait on an unlabeled element is not a destination guard. A second successful open aborts publication; start a fresh session to author again.\n  Unparameterized fill/type inputs are literal .ad script content. For a sensitive fill, arm recording first, keep the live value in an env var, and name its replay placeholder explicitly:\n    export AD_VAR_PASSWORD='<secret>'\n    agent-device fill 'id=\"password\"' \"$AD_VAR_PASSWORD\" --record-as PASSWORD\n  The live app receives the value; recording state and the published script contain only ${PASSWORD}. Reuse the same name for repeated values; --record-as is fill-only, requires an armed recording, and is mutually exclusive with --no-record. Replay with AD_VAR_PASSWORD still set, or pass --env PASSWORD=<value>. Do not record passwords/tokens without --record-as; their literal text is written to the .ad target.\n  To keep the value out of the CLI's argv as well, pipe it in with --text-stdin instead of a text argument:\n    printf %s \"$AD_VAR_PASSWORD\" | agent-device fill 'id=\"password\"' --text-stdin --record-as PASSWORD\n  --text-stdin reads at most 64 KiB, removes exactly one trailing newline, and refuses a terminal, empty input, invalid UTF-8, or an extra text argument. While recording is armed, --record-as publishes ${VAR} and --no-record leaves the step out; passing neither is an error. Output shows the value as ${VAR} with --record-as and as [REDACTED] otherwise, including in error messages and in the requested, before and after read-back of an unconfirmed fill, which can hold a reformatted form of the value. With --settle, the diff line text and tail labels are replaced whole; refs and counts stay. Without an armed recording the step is not recorded. It is not available inside batch steps.\n  The privacy controls for typed input (--text-stdin and --record-as) keep the literal out of agent-device's own responses, diagnostics, and recorded scripts. They do not rewrite what the platform records: on iOS, XCTest writes its own diagnostic logs and its .xcresult bundle, and typed text can appear in both, on a simulator or a physical device. Treat those as sensitive, and use test-only credentials when they may be kept or shared.\n\nReplay divergence and repair:\n  A failing replay/test step returns REPLAY_DIVERGENCE with a bounded report (screen digest, ranked selector suggestions, resume). Fix app state, then resume with replay --from <n> --plan-digest <sha256> (both from the report's resume field) to continue without re-running earlier steps; resume never re-executes skipped steps, so app state there is the caller's responsibility. --from is replay-only; test rejects it. The digest binds the script, includes, effective --platform/--target, and per-action runtime/identity; native .ad interpolation is late-bound so changing only its values keeps the digest, while Maestro environment substitution can change it.\n  A resource step that cannot run in bounded batch/replay returns details.reason bounded_composite_resource_unsupported, details.shape, and dispatched: no for that step. Affected commands include perf, audio, record, trace, some logs operations, close when it would dispose an owned capture or release a provider lease, and acquisition that would recover another session's durable resources. Existing-session open preserves its owned resource handles. An Android test IME alone is restored by ordinary close, including a bounded step; restoration may settle after the remaining composite time. If restore fails, close retires the session but retains its device claim: inspect the device and claim before recovery, rather than retrying close on the retired session. details.standaloneCommandName names the public command when known; it is not a complete command. Run the original refused step separately with its original arguments and options, the same --session value, and the same private CLI context. For replay, inspect the failed source line. After completing the step directly, use resume.alternateFrom with planDigest if offered and steps remain; resume.from retries the same bounded step and refuses it again. An authored .ad command without a resource classification fails closed with shape <command>:unclassified. Inspect completed steps before retrying the composite; earlier steps may have changed the app. A nested test with an attempt timeout ",
              "tool": "help"
            }
          ],
          "task": "Show me the server's usage guide for writing automation scripts."
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M82WNVYZDQ4CGCPQCKWP4EP7",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.01,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.01,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.01,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.01,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.01,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.01,
      "question": "w05"
    },
    {
      "attempt": 6,
      "noul": 0.94,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.93,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.95,
      "question": "w08"
    }
  ]
}
