agentv 4.12.7 → 4.12.8

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.
@@ -305,7 +305,7 @@ var require_dist = __commonJS({
305
305
  }
306
306
  });
307
307
 
308
- // ../../packages/core/dist/chunk-5POFMJJ7.js
308
+ // ../../packages/core/dist/chunk-SWLNU3I6.js
309
309
  import { constants } from "node:fs";
310
310
  import { access, readFile } from "node:fs/promises";
311
311
  import path from "node:path";
@@ -423,7 +423,7 @@ __export(external_exports2, {
423
423
  void: () => voidType
424
424
  });
425
425
 
426
- // ../../packages/core/dist/chunk-5POFMJJ7.js
426
+ // ../../packages/core/dist/chunk-SWLNU3I6.js
427
427
  import { readFile as readFile2 } from "node:fs/promises";
428
428
  import path3 from "node:path";
429
429
  import fg from "fast-glob";
@@ -484,7 +484,7 @@ function isTestMessage(value) {
484
484
  if (typeof candidate.content === "string") {
485
485
  return true;
486
486
  }
487
- if (Array.isArray(candidate.content) && candidate.content.every(isJsonObject)) {
487
+ if (Array.isArray(candidate.content) && candidate.content.every((item) => typeof item === "string" || isJsonObject(item))) {
488
488
  return true;
489
489
  }
490
490
  if (Array.isArray(candidate.tool_calls) && candidate.tool_calls.length > 0) {
@@ -14733,6 +14733,12 @@ function extractContentSegments(content) {
14733
14733
  }
14734
14734
  const segments = [];
14735
14735
  for (const segment of content) {
14736
+ if (typeof segment === "string") {
14737
+ if (segment.trim().length > 0) {
14738
+ segments.push({ type: "text", value: segment });
14739
+ }
14740
+ continue;
14741
+ }
14736
14742
  if (!isJsonObject(segment)) {
14737
14743
  continue;
14738
14744
  }
@@ -17277,6 +17283,15 @@ async function processMessages(options) {
17277
17283
  }
17278
17284
  const processedContent = [];
17279
17285
  for (const rawSegment of content) {
17286
+ if (typeof rawSegment === "string") {
17287
+ if (rawSegment.length > 0) {
17288
+ processedContent.push({ type: "text", value: rawSegment });
17289
+ if (textParts) {
17290
+ textParts.push(rawSegment);
17291
+ }
17292
+ }
17293
+ continue;
17294
+ }
17280
17295
  if (!isJsonObject(rawSegment)) {
17281
17296
  continue;
17282
17297
  }
@@ -17396,6 +17411,12 @@ async function processExpectedMessages(options) {
17396
17411
  } else if (Array.isArray(content)) {
17397
17412
  const processedContent = [];
17398
17413
  for (const rawSegment of content) {
17414
+ if (typeof rawSegment === "string") {
17415
+ if (rawSegment.length > 0) {
17416
+ processedContent.push({ type: "text", value: rawSegment });
17417
+ }
17418
+ continue;
17419
+ }
17399
17420
  if (!isJsonObject(rawSegment)) {
17400
17421
  continue;
17401
17422
  }
@@ -34688,4 +34709,4 @@ export {
34688
34709
  TranscriptProvider,
34689
34710
  createAgentKernel
34690
34711
  };
34691
- //# sourceMappingURL=chunk-CXAO4VPP.js.map
34712
+ //# sourceMappingURL=chunk-LRVNXL6J.js.map