refactor(browser): return complete observation evidence

This commit is contained in:
morluto
2026-09-29 13:56:49 +08:00
parent 9d1f88cbe8
commit 0e2738ffb6
69 changed files with 747 additions and 1206 deletions
+4 -5
View File
@@ -2,7 +2,6 @@ import type { WebPageInspection } from "../domain/browserObservation.js";
import type { CdpCaptureEvents } from "./CdpCaptureEvents.js";
import {
allowedSanitizedUrl,
boundedText,
isHttpUrl,
recordValue,
recordsValue,
@@ -57,13 +56,13 @@ export const captureWorkers = async (
continue;
}
items.push({
target_id: (stringValue(target.targetId) ?? "").slice(0, 256),
type: type.slice(0, 100),
target_id: stringValue(target.targetId) ?? "",
type,
url: url.url,
origin: url.origin,
attached: target.attached === true,
opener_target_id: boundedText(target.openerId, 256) ?? null,
parent_frame_id: boundedText(target.parentFrameId, 256) ?? null,
opener_target_id: stringValue(target.openerId) ?? null,
parent_frame_id: stringValue(target.parentFrameId) ?? null,
});
}
return items;