feat(plugins): add source-aware evidence and recording timelines

This commit is contained in:
chenmingxuan committed 2026-10-16 10:20:11 +08:00
1 parent 72ff342605
commit ef7af9988e
61 files changed
+3847 -108

No files matched your search

+22 -2
View File
@@ -733,7 +733,21 @@ class FlashRunner:
action_dict.update(
{
key: metadata[key]
for key in ("plugin_id", "plugin_version", "resource_ids", "plugin_status")
for key in (
"plugin_id",
"plugin_version",
"resource_ids",
"plugin_status",
"source_id",
"source",
"call_id",
"execution",
"side_effect",
"error_code",
"attachments",
"recording",
)
if key in metadata
}
)
action_dict.pop("coordinates", None)
@@ -849,7 +863,7 @@ class FlashRunner:
if plugins and name in plugins.bindings:
plugin_action = True
# A phone observation cannot serve as the before-image for a desktop action.
pre_screenshot_bytes = plugins.last_images.get(plugins.bindings[name][0])
pre_screenshot_bytes = plugins.previous_image(name, args)
xml_list = ""
control = getattr(self.ctx, "task_control", None)
if plugins and name in plugins.tool_names and isinstance(control, TaskControl):
@@ -875,6 +889,12 @@ class FlashRunner:
post_img_bytes = await self._capture_post_screenshot(
exec_result, name, action_names, state
)
if (
plugin_action
and exec_result.metadata.get("source")
and not exec_result.metadata.get("pre_image_valid")
):
pre_screenshot_bytes = None
# One record shape for the DataEngine step and the visual lens.
action_dict = (