agentv 4.0.0 → 4.1.1

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.
@@ -15005,7 +15005,7 @@ function validateTemplateVariables(content, source) {
15005
15005
  match = variablePattern.exec(content);
15006
15006
  }
15007
15007
  const hasCandidateAnswer = foundVariables.has(TEMPLATE_VARIABLES.OUTPUT) || foundVariables.has(TEMPLATE_VARIABLES.OUTPUT_TEXT);
15008
- const hasExpectedOutput = foundVariables.has(TEMPLATE_VARIABLES.EXPECTED_OUTPUT);
15008
+ const hasExpectedOutput = foundVariables.has(TEMPLATE_VARIABLES.EXPECTED_OUTPUT) || foundVariables.has(TEMPLATE_VARIABLES.EXPECTED_OUTPUT_TEXT);
15009
15009
  const hasRequiredFields = hasCandidateAnswer || hasExpectedOutput;
15010
15010
  if (!hasRequiredFields) {
15011
15011
  throw new Error(
@@ -18207,7 +18207,8 @@ function toContentArray(content) {
18207
18207
  } else if (p.type === "image" && typeof p.source === "object" && p.source !== null) {
18208
18208
  const src = p.source;
18209
18209
  const mediaType = typeof p.media_type === "string" ? p.media_type : typeof src.media_type === "string" ? src.media_type : "application/octet-stream";
18210
- const data = typeof src.data === "string" ? `data:${mediaType};base64,${src.data}` : typeof p.url === "string" ? p.url : "";
18210
+ const data = typeof src.data === "string" && src.data !== "" ? `data:${mediaType};base64,${src.data}` : typeof p.url === "string" && p.url !== "" ? p.url : "";
18211
+ if (!data) continue;
18211
18212
  blocks.push({ type: "image", media_type: mediaType, source: data });
18212
18213
  hasNonText = true;
18213
18214
  } else if (p.type === "tool_use") {
@@ -32353,4 +32354,4 @@ export {
32353
32354
  OtelStreamingObserver,
32354
32355
  createAgentKernel
32355
32356
  };
32356
- //# sourceMappingURL=chunk-OXBBWZOY.js.map
32357
+ //# sourceMappingURL=chunk-XEAW7OQT.js.map