feat(record): capture interactions in embedded frames

Track recording per document so injectable child frames are captured while partial frame failures remain visible in exported traces.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
“haonan”
2026-08-17 14:41:02 +08:00
co-authored by Cursor
parent 61a0e0d218
commit f7e08f461b
28 changed files with 1374 additions and 144 deletions
+81
View File
@@ -16,6 +16,16 @@
"entry": {
"$ref": "#/definitions/TraceEntry"
},
"frame_capture": {
"anyOf": [
{
"$ref": "#/definitions/FrameCaptureInfo"
},
{
"type": "null"
}
]
},
"purpose": {
"type": [
"string",
@@ -64,6 +74,77 @@
"blur"
]
},
"FrameCaptureFailure": {
"type": "object",
"required": [
"frame_id",
"reason"
],
"properties": {
"detail": {
"type": [
"string",
"null"
]
},
"document_id": {
"type": [
"string",
"null"
]
},
"frame_id": {
"type": "integer",
"format": "int64"
},
"reason": {
"$ref": "#/definitions/FrameCaptureFailureReason"
},
"url": {
"type": [
"string",
"null"
]
}
}
},
"FrameCaptureFailureReason": {
"type": "string",
"enum": [
"not_injectable",
"arm_failed",
"rearm_failed",
"drain_failed",
"flush_failed"
]
},
"FrameCaptureInfo": {
"type": "object",
"required": [
"status"
],
"properties": {
"failures": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/FrameCaptureFailure"
}
},
"status": {
"$ref": "#/definitions/FrameCaptureStatus"
}
}
},
"FrameCaptureStatus": {
"type": "string",
"enum": [
"complete",
"partial"
]
},
"KeyModifier": {
"description": "Keyboard modifier flags. Multiple flags may be combined; the extension folds them into CDP's bitfield (`alt=1, ctrl=2, meta=4, shift=8`).",
"type": "string",