{
  "schema_version": 1,
  "name": "Stop and hand off on a captcha",
  "version": 1,
  "description": "Do the work, but the moment a captcha or verification challenge shows up, stop, screenshot it, and hand control back to you — Orbe never tries to solve or bypass a challenge. Use this pattern in any flow where a checkpoint is likely. Discipline also stops on checkpoints automatically; this makes the hand-off explicit and captures evidence.",
  "vars": {
    "target_url": "https://example.com/action",
    "action_button": "Continue"
  },
  "on_error": "screenshot_and_stop",
  "steps": [
    { "open": {} },
    { "goto": { "url": "{{target_url}}" } },
    { "wait_for": { "text": "{{action_button}}", "timeout": 15 } },
    { "if": { "text_present": "captcha" },
      "then": [ { "screenshot": { "path": "captcha.png" } },
                { "stop": { "reason": "captcha detected — handing off, not solving" } } ] },
    { "if": { "text_present": "Verify" },
      "then": [ { "screenshot": { "path": "verify.png" } },
                { "stop": { "reason": "verification challenge — handing off" } } ] },
    { "click": { "text": "{{action_button}}" } },
    { "wait": { "seconds": 3 } },
    { "if": { "text_present": "captcha" },
      "then": [ { "screenshot": { "path": "captcha-after.png" } },
                { "stop": { "reason": "captcha after the action — handing off" } } ] },
    { "screenshot": { "path": "done.png" } },
    { "close": {} }
  ]
}
