Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(debug): improve image attachment roundtrip validation

Steven Enamakel5fd208629581
diff --git a/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs b/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
index 86caf7ba92..01e02da1a8 100644
--- a/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
+++ b/scripts/debug/web-scripts/queued-image-attachment-roundtrip.mjs
@@ -154,8 +154,12 @@ export default async function queuedImageAttachmentRoundtrip({
() => rpcResponses.find((call) => call.method === "openhuman.channel_web_chat" && call.params?.message === "Hold this turn while I queue an image."),
"first channel_web_chat response",
);
- if (typeof firstAck.result !== "string") {
- throw new Error(`first chat response was not a legacy started request id: ${JSON.stringify(firstAck)}`);
+ if (
+ !firstAck.result ||
+ firstAck.result.accepted !== true ||
+ typeof firstAck.result.request_id !== "string"
+ ) {
+ throw new Error(`first chat response was not a started acknowledgement: ${JSON.stringify(firstAck)}`);
}
await page.waitForFunction(
(id) =>