Skip to content

Commit d350fe2

Browse files
authored
Merge pull request #113 from SentienceAPI/update_trace_schema
update trace schema
2 parents fa4e499 + 166c42d commit d350fe2

File tree

1 file changed

+51
-5
lines changed

1 file changed

+51
-5
lines changed

sentience/schemas/trace_v1.json

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"type": {
1515
"type": "string",
16-
"enum": ["run_start", "step_start", "snapshot_taken", "llm_called", "action_executed", "verification", "recovery", "step_end", "run_end", "error"],
16+
"enum": ["run_start", "step_start", "snapshot", "snapshot_taken", "llm_called", "llm_response", "action", "action_executed", "verification", "recovery", "step_end", "run_end", "error"],
1717
"description": "Event type"
1818
},
1919
"ts": {
@@ -64,15 +64,61 @@
6464
}
6565
},
6666
{
67-
"description": "snapshot_taken data",
68-
"required": ["step_id", "snapshot_digest"],
67+
"description": "snapshot or snapshot_taken data",
6968
"properties": {
70-
"step_id": {"type": "string"},
69+
"step_id": {"type": ["string", "null"]},
7170
"snapshot_id": {"type": ["string", "null"]},
7271
"snapshot_digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
7372
"snapshot_digest_loose": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
7473
"url": {"type": ["string", "null"]},
75-
"element_count": {"type": "integer"}
74+
"element_count": {"type": "integer"},
75+
"timestamp": {"type": ["string", "null"]},
76+
"elements": {
77+
"type": "array",
78+
"items": {
79+
"type": "object",
80+
"properties": {
81+
"id": {"type": "integer"},
82+
"role": {"type": "string"},
83+
"text": {"type": ["string", "null"]},
84+
"importance": {"type": "number"},
85+
"importance_score": {"type": "number"},
86+
"bbox": {
87+
"type": "object",
88+
"properties": {
89+
"x": {"type": "number"},
90+
"y": {"type": "number"},
91+
"width": {"type": "number"},
92+
"height": {"type": "number"}
93+
},
94+
"required": ["x", "y", "width", "height"]
95+
},
96+
"visual_cues": {
97+
"type": "object",
98+
"properties": {
99+
"is_primary": {"type": "boolean"},
100+
"is_clickable": {"type": "boolean"},
101+
"background_color_name": {"type": ["string", "null"]}
102+
}
103+
},
104+
"in_viewport": {"type": "boolean"},
105+
"is_occluded": {"type": "boolean"},
106+
"z_index": {"type": "integer"},
107+
"rerank_index": {"type": ["integer", "null"]},
108+
"heuristic_index": {"type": ["integer", "null"]},
109+
"ml_probability": {"type": ["number", "null"]},
110+
"ml_score": {"type": ["number", "null"]},
111+
"diff_status": {
112+
"type": ["string", "null"],
113+
"enum": ["ADDED", "REMOVED", "MODIFIED", "MOVED", null],
114+
"description": "Diff status for Diff Overlay feature. ADDED: new element, REMOVED: element was removed, MODIFIED: element changed, MOVED: element position changed, null: no change"
115+
}
116+
},
117+
"required": ["id", "role", "importance", "bbox", "visual_cues"]
118+
}
119+
},
120+
"screenshot_base64": {"type": ["string", "null"]},
121+
"screenshot_format": {"type": ["string", "null"], "enum": ["png", "jpeg", null]}
76122
}
77123
},
78124
{

0 commit comments

Comments
 (0)