mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
109 lines
2.7 KiB
JSON
109 lines
2.7 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "SnapshotResult",
|
|
"type": "object",
|
|
"required": [
|
|
"ref_count",
|
|
"tab_id",
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"dialogs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/JavaScriptDialogInfo"
|
|
}
|
|
},
|
|
"ref_count": {
|
|
"description": "Number of `@e<N>` refs registered for this session by this snapshot. Equivalent to the size of the new ref-store map.",
|
|
"type": "integer",
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"tab_id": {
|
|
"description": "Tab the snapshot was actually computed for (after resolving the optional `tab_id` default).",
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"text": {
|
|
"description": "Indented aria-snapshot text. Refs are rendered as `@e<N>` so the agent can copy them into subsequent `tool.click` / `tool.fill` selectors.",
|
|
"type": "string"
|
|
},
|
|
"truncated": {
|
|
"description": "Whether the rendered tree was truncated because of `max_depth` / `max_tokens`. Agents may re-run with looser caps.",
|
|
"default": false,
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"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"
|
|
]
|
|
}
|
|
}
|
|
}
|