{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "ScreenshotResult", "type": "object", "required": [ "format", "image_base64", "tab_id" ], "properties": { "dialogs": { "type": "array", "items": { "$ref": "#/definitions/JavaScriptDialogInfo" } }, "format": { "description": "Always `\"png\"` in v0.1; reserved for future JPEG / WebP support.", "type": "string" }, "height": { "description": "Pixel height (see [`Self::width`]).", "default": 0, "type": "integer", "format": "uint32", "minimum": 0.0 }, "image_base64": { "description": "Base64-encoded PNG payload (no `data:` prefix).", "type": "string" }, "tab_id": { "type": "integer", "format": "int64" }, "width": { "description": "Pixel width parsed from the PNG IHDR. May be `0` when parsing fails (extension only logs a warning in that case so the agent still gets the image).", "default": 0, "type": "integer", "format": "uint32", "minimum": 0.0 } }, "definitions": { "JavaScriptDialogHandledAction": { "description": "How the extension resolved the dialog so CDP could continue.", "type": "string", "enum": [ "accepted", "dismissed" ] }, "JavaScriptDialogInfo": { "description": "One observed + handled JavaScript dialog during a tool call.", "type": "object", "required": [ "handled", "message", "sequence", "tab_id", "type" ], "properties": { "default_prompt": { "type": [ "string", "null" ] }, "handled": { "$ref": "#/definitions/JavaScriptDialogHandledAction" }, "has_browser_handler": { "type": [ "boolean", "null" ] }, "message": { "type": "string" }, "sequence": { "description": "Monotonic per-tab sequence for ordering within a session.", "type": "integer", "format": "uint64", "minimum": 0.0 }, "tab_id": { "type": "integer", "format": "int64" }, "type": { "$ref": "#/definitions/JavaScriptDialogType" }, "url": { "type": [ "string", "null" ] } } }, "JavaScriptDialogType": { "description": "Native JS dialog kind reported by CDP.", "type": "string", "enum": [ "alert", "confirm", "prompt", "beforeunload" ] } } }