[
  {
    "name": "preview_open",
    "args": {
      "open": false,
      "reuseExistingTab": false
    },
    "durationMs": 998,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"available\":true,\"visible\":false,\"tabId\":\"tab_1_4116d70b-d051-445f-946a-4ab2aa18cffc\",\"url\":\"https://example.com/\",\"title\":\"Example Domain\",\"loading\":false,\"control\":{\"owner\":\"agent\",\"ownedByCaller\":true,\"generation\":0},\"dialog\":null,\"viewportSetting\":{\"_tag\":\"fill\"},\"viewport\":{\"width\":1280,\"height\":800},\"fileChooser\":null,\"downloads\":[],\"tabs\":[{\"tabId\":\"tab_1_4116d70b-d051-445f-946a-4ab2aa18cffc\",\"url\":\"https://example.com/\",\"owner\":\"agent\",\"ownedByCaller\":true,\"visible\":false,\"profileId\":\"default\"}],\"profiles\":[{\"id\":\"default\",\"name\":\"Default\"},{\"id\":\"incognito\",\"name\":\"Incognito\",\"incognito\":true}],\"defaultProfileId\":\"default\"}"
        }
      ],
      "structuredContent": {
        "available": true,
        "visible": false,
        "tabId": "tab_1_4116d70b-d051-445f-946a-4ab2aa18cffc",
        "url": "https://example.com/",
        "title": "Example Domain",
        "loading": false,
        "control": {
          "owner": "agent",
          "ownedByCaller": true,
          "generation": 0
        },
        "dialog": null,
        "viewportSetting": {
          "_tag": "fill"
        },
        "viewport": {
          "width": 1280,
          "height": 800
        },
        "fileChooser": null,
        "downloads": [],
        "tabs": [
          {
            "tabId": "tab_1_4116d70b-d051-445f-946a-4ab2aa18cffc",
            "url": "https://example.com/",
            "owner": "agent",
            "ownedByCaller": true,
            "visible": false,
            "profileId": "default"
          }
        ],
        "profiles": [
          {
            "id": "default",
            "name": "Default"
          },
          {
            "id": "incognito",
            "name": "Incognito",
            "incognito": true
          }
        ],
        "defaultProfileId": "default"
      },
      "isError": false
    }
  },
  {
    "name": "preview_evaluate",
    "args": {
      "expression": "document.querySelectorAll('a').length"
    },
    "durationMs": 10,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"},\"value\":1}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        },
        "value": 1
      },
      "isError": false
    }
  },
  {
    "name": "preview_wait_for",
    "args": {
      "selector": "a",
      "timeoutMs": 10000
    },
    "durationMs": 25,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_wait_for",
    "args": {
      "text": "Example",
      "timeoutMs": 10000
    },
    "durationMs": 10008,
    "result": {
      "_meta": {
        "website.effect/toolError": {
          "kind": "failure",
          "tag": "PreviewAutomationTimeoutError"
        }
      },
      "content": [
        {
          "type": "text",
          "text": "Preview automation waitFor timed out after 10000ms."
        }
      ],
      "isError": true
    }
  },
  {
    "name": "preview_act",
    "args": {
      "action": "hover",
      "selector": "a",
      "timeoutMs": 10000
    },
    "durationMs": 249,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_act",
    "args": {
      "action": "type",
      "selector": "iframe#proof-init-frame >> internal:control=enter-frame >> #init-input",
      "text": "initialization frame ready",
      "clear": true,
      "timeoutMs": 5000
    },
    "durationMs": 99,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_evaluate",
    "args": {
      "expression": "document.querySelector('#proof-init-frame').contentDocument.querySelector('#init-input').value"
    },
    "durationMs": 15,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"},\"value\":\"initialization frame ready\"}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        },
        "value": "initialization frame ready"
      },
      "isError": false
    }
  },
  {
    "name": "preview_evaluate",
    "args": {
      "expression": "({hasExample:document.body.innerText.includes(\"Example\"),hasBodyText:document.body.innerText.length>0})"
    },
    "durationMs": 13,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"},\"value\":{\"hasBodyText\":true,\"hasExample\":false}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        },
        "value": {
          "hasBodyText": true,
          "hasExample": false
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_evaluate",
    "args": {
      "expression": "(() => { const form = document.createElement('section'); form.innerHTML = '<h2>Example</h2><label>Proof input <input id=\"proof-input\"></label><button id=\"proof-button\">Confirm</button><output id=\"proof-output\"></output>'; document.body.append(form); document.querySelector('#proof-button').onclick=()=>document.querySelector('#proof-output').textContent=document.querySelector('#proof-input').value; setTimeout(() => { const f=document.createElement('iframe'); f.id='proof-frame'; f.srcdoc='<label>Frame input <input id=\"frame-input\"></label>'; document.body.append(f); },150); return 'Synthetic Example heading, controls, and late same-origin iframe added'; })()"
    },
    "durationMs": 10,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"},\"value\":\"Synthetic Example heading, controls, and late same-origin iframe added\"}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        },
        "value": "Synthetic Example heading, controls, and late same-origin iframe added"
      },
      "isError": false
    }
  },
  {
    "name": "preview_wait_for",
    "args": {
      "text": "Example",
      "timeoutMs": 5000
    },
    "durationMs": 10,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_act",
    "args": {
      "action": "type",
      "selector": "#proof-input",
      "text": "preview ready",
      "clear": true,
      "timeoutMs": 5000
    },
    "durationMs": 54,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_act",
    "args": {
      "action": "click",
      "selector": "#proof-button",
      "timeoutMs": 5000
    },
    "durationMs": 1341,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_evaluate",
    "args": {
      "expression": "({typed:document.querySelector('#proof-input').value,clicked:document.querySelector('#proof-output').textContent})"
    },
    "durationMs": 10,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"},\"value\":{\"clicked\":\"preview ready\",\"typed\":\"preview ready\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        },
        "value": {
          "clicked": "preview ready",
          "typed": "preview ready"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_act",
    "args": {
      "action": "type",
      "selector": "iframe#proof-frame >> internal:control=enter-frame >> #frame-input",
      "text": "late frame ready",
      "clear": true,
      "timeoutMs": 5000
    },
    "durationMs": 90,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_evaluate",
    "args": {
      "expression": "document.querySelector('#proof-frame').contentDocument.querySelector('#frame-input').value"
    },
    "durationMs": 9,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"},\"value\":\"late frame ready\"}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        },
        "value": "late frame ready"
      },
      "isError": false
    }
  },
  {
    "name": "preview_wait_for",
    "args": {
      "selector": "a",
      "text": "Example",
      "timeoutMs": 5000
    },
    "durationMs": 23,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  },
  {
    "name": "preview_act",
    "args": {
      "action": "hover",
      "selector": "a",
      "timeoutMs": 5000
    },
    "durationMs": 239,
    "result": {
      "content": [
        {
          "type": "text",
          "text": "{\"toolIcon\":{\"_tag\":\"website\",\"pageUrl\":\"https://example.com/\"}}"
        }
      ],
      "structuredContent": {
        "toolIcon": {
          "_tag": "website",
          "pageUrl": "https://example.com/"
        }
      },
      "isError": false
    }
  }
]