@standardagents/builder 0.37.3 → 0.37.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9983,10 +9983,18 @@ ${msg.content}` : `${imageDescriptions}${nonImageList}`;
9983
9983
  const mimeType = match2[1];
9984
9984
  const base64Data = match2[2];
9985
9985
  const ext = mimeType.split("/")[1] || "png";
9986
+ if (base64Data.length < 64) {
9987
+ console.error("[FlowEngine] Generated image payload is empty/truncated, skipping");
9988
+ continue;
9989
+ }
9986
9990
  const attachmentId = crypto.randomUUID();
9987
9991
  const path10 = `/attachments/${Date.now()}-${attachmentId.slice(0, 8)}.${ext}`;
9988
9992
  try {
9989
- await state.thread.instance.writeFile(path10, base64Data, mimeType);
9993
+ const written = await state.thread.instance.writeFile(path10, base64Data, mimeType);
9994
+ if (written && written.success === false) {
9995
+ console.error("[FlowEngine] Generated image write failed:", written.error);
9996
+ continue;
9997
+ }
9990
9998
  if (image.id) {
9991
9999
  imagePathMap.set(image.id, path10);
9992
10000
  }
@@ -10053,10 +10061,18 @@ ${msg.content}` : `${imageDescriptions}${nonImageList}`;
10053
10061
  const mimeType = imageUrl.slice(dataPrefix.length, base64Index);
10054
10062
  const base64Data = imageUrl.slice(base64Index + base64Marker.length);
10055
10063
  const ext = mimeType.split("/")[1] || "png";
10064
+ if (base64Data.length < 64) {
10065
+ console.error(`[FlowEngine] ${toolName} image payload is empty/truncated, skipping`);
10066
+ continue;
10067
+ }
10056
10068
  const attachmentId = crypto.randomUUID();
10057
10069
  const path10 = `/attachments/${Date.now()}-${attachmentId.slice(0, 8)}.${ext}`;
10058
10070
  try {
10059
- await state.thread.instance.writeFile(path10, base64Data, mimeType);
10071
+ const written = await state.thread.instance.writeFile(path10, base64Data, mimeType);
10072
+ if (written && written.success === false) {
10073
+ console.error(`[FlowEngine] ${toolName} image write failed:`, written.error);
10074
+ continue;
10075
+ }
10060
10076
  const attachmentRef = {
10061
10077
  id: attachmentId,
10062
10078
  type: "file",
@@ -67912,7 +67928,7 @@ var config_get_default = defineController2(async ({ config, env: env2, req }) =>
67912
67928
  });
67913
67929
 
67914
67930
  // src/version.ts
67915
- var BUILDER_VERSION = "0.37.3".length > 0 ? "0.37.3" : "dev";
67931
+ var BUILDER_VERSION = "0.37.4".length > 0 ? "0.37.4" : "dev";
67916
67932
 
67917
67933
  // src/api/diagnostics.get.ts
67918
67934
  init_LLMRequest();