mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
133 lines
3.1 KiB
JSON
133 lines
3.1 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "EvaluateResult",
|
|
"description": "Outcome of an `evaluate` call.\n\n* `ok: true` → expression evaluated successfully; `value` holds the JSON-serialised return value (`null` is meaningful and distinct from \"missing\"). * `ok: false` → the expression threw; `error.text` holds the stringified `exceptionDetails.text` / `exception.description`. The RPC itself still succeeds — the daemon does NOT map JS throws to top-level RPC errors so agents can act on the throw text.",
|
|
"type": "object",
|
|
"required": [
|
|
"ok",
|
|
"tab_id"
|
|
],
|
|
"properties": {
|
|
"dialogs": {
|
|
"description": "Native JS dialogs observed and auto-handled during this call.",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/JavaScriptDialogInfo"
|
|
}
|
|
},
|
|
"error": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/EvaluateError"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"ok": {
|
|
"type": "boolean"
|
|
},
|
|
"tab_id": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"value": true
|
|
},
|
|
"definitions": {
|
|
"EvaluateError": {
|
|
"type": "object",
|
|
"required": [
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"column": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "int64"
|
|
},
|
|
"line": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "int64"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"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"
|
|
]
|
|
}
|
|
}
|
|
}
|