agentv 4.3.0 → 4.3.2

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.
Files changed (30) hide show
  1. package/dist/{agentv-provider-NFFLXG5M-TJAWCWCX.js → agentv-provider-TXM4UEUT-SUZSAXWZ.js} +2 -2
  2. package/dist/{chunk-ZDJN5FSI.js → chunk-EM2JOZFS.js} +4 -12
  3. package/dist/{chunk-ZDJN5FSI.js.map → chunk-EM2JOZFS.js.map} +1 -1
  4. package/dist/{chunk-ASU5L5ZW.js → chunk-FXN26R2H.js} +198 -102
  5. package/dist/chunk-FXN26R2H.js.map +1 -0
  6. package/dist/{chunk-XLM3RNN7.js → chunk-HMOXP7T5.js} +63 -64
  7. package/dist/{chunk-XLM3RNN7.js.map → chunk-HMOXP7T5.js.map} +1 -1
  8. package/dist/{chunk-C5GOHBQM.js → chunk-QOBQ5XYF.js} +2 -2
  9. package/dist/{chunk-BJV6MDBE.js → chunk-ZKO2LGRR.js} +2 -2
  10. package/dist/cli.js +5 -5
  11. package/dist/{dist-VVXR6TYM.js → dist-M7R6II6Y.js} +4 -4
  12. package/dist/{esm-5Q4BZALM-5REQWAUV.js → esm-ZADQ4XQH-5LX2IKZV.js} +2 -2
  13. package/dist/index.js +5 -5
  14. package/dist/{interactive-BKK53ETJ.js → interactive-FMOEUIKE.js} +5 -5
  15. package/dist/{otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js → otlp-json-file-exporter-RJFPCKVK-T6N4OGWG.js} +2 -2
  16. package/dist/studio/assets/{index-Cir5Hc8S.js → index-Bv9YUyqt.js} +1 -1
  17. package/dist/studio/assets/index-CElXpUjl.css +1 -0
  18. package/dist/studio/assets/index-CaOaajcd.js +65 -0
  19. package/dist/studio/index.html +2 -2
  20. package/package.json +1 -1
  21. package/dist/chunk-ASU5L5ZW.js.map +0 -1
  22. package/dist/studio/assets/index-D8LVkz9x.js +0 -71
  23. package/dist/studio/assets/index-izxfmBKC.css +0 -1
  24. /package/dist/{agentv-provider-NFFLXG5M-TJAWCWCX.js.map → agentv-provider-TXM4UEUT-SUZSAXWZ.js.map} +0 -0
  25. /package/dist/{chunk-C5GOHBQM.js.map → chunk-QOBQ5XYF.js.map} +0 -0
  26. /package/dist/{chunk-BJV6MDBE.js.map → chunk-ZKO2LGRR.js.map} +0 -0
  27. /package/dist/{dist-VVXR6TYM.js.map → dist-M7R6II6Y.js.map} +0 -0
  28. /package/dist/{esm-5Q4BZALM-5REQWAUV.js.map → esm-ZADQ4XQH-5LX2IKZV.js.map} +0 -0
  29. /package/dist/{interactive-BKK53ETJ.js.map → interactive-FMOEUIKE.js.map} +0 -0
  30. /package/dist/{otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js.map → otlp-json-file-exporter-RJFPCKVK-T6N4OGWG.js.map} +0 -0
@@ -149,7 +149,7 @@ import {
149
149
  withUserAgentSuffix,
150
150
  withoutTrailingSlash,
151
151
  zodSchema
152
- } from "./chunk-BJV6MDBE.js";
152
+ } from "./chunk-ZKO2LGRR.js";
153
153
  import {
154
154
  SpanStatusCode,
155
155
  context,
@@ -301,7 +301,7 @@ var require_dist = __commonJS({
301
301
  }
302
302
  });
303
303
 
304
- // ../../packages/core/dist/chunk-V6QVGHVD.js
304
+ // ../../packages/core/dist/chunk-M65PVDQ5.js
305
305
  import { constants } from "node:fs";
306
306
  import { access, readFile } from "node:fs/promises";
307
307
  import path from "node:path";
@@ -419,7 +419,7 @@ __export(external_exports2, {
419
419
  void: () => voidType
420
420
  });
421
421
 
422
- // ../../packages/core/dist/chunk-V6QVGHVD.js
422
+ // ../../packages/core/dist/chunk-M65PVDQ5.js
423
423
  import { readFile as readFile2 } from "node:fs/promises";
424
424
  import path3 from "node:path";
425
425
  import fg from "fast-glob";
@@ -1638,8 +1638,8 @@ function resolveCliConfig(target, env, evalFilePath) {
1638
1638
  const parseResult = CliTargetInputSchema.safeParse(target, { errorMap: cliErrorMap });
1639
1639
  if (!parseResult.success) {
1640
1640
  const firstError = parseResult.error.errors[0];
1641
- const path48 = firstError?.path.join(".") || "";
1642
- const prefix = path48 ? `${target.name} ${path48}: ` : `${target.name}: `;
1641
+ const path47 = firstError?.path.join(".") || "";
1642
+ const prefix = path47 ? `${target.name} ${path47}: ` : `${target.name}: `;
1643
1643
  throw new Error(`${prefix}${firstError?.message}`);
1644
1644
  }
1645
1645
  const normalized = normalizeCliTargetInput(parseResult.data, env, evalFilePath);
@@ -6722,7 +6722,7 @@ function createOpenRouter(options = {}) {
6722
6722
  );
6723
6723
  const createChatModel = (modelId, settings = {}) => new OpenRouterChatLanguageModel(modelId, settings, {
6724
6724
  provider: "openrouter.chat",
6725
- url: ({ path: path48 }) => `${baseURL}${path48}`,
6725
+ url: ({ path: path47 }) => `${baseURL}${path47}`,
6726
6726
  headers: getHeaders,
6727
6727
  compatibility,
6728
6728
  fetch: options.fetch,
@@ -6730,7 +6730,7 @@ function createOpenRouter(options = {}) {
6730
6730
  });
6731
6731
  const createCompletionModel = (modelId, settings = {}) => new OpenRouterCompletionLanguageModel(modelId, settings, {
6732
6732
  provider: "openrouter.completion",
6733
- url: ({ path: path48 }) => `${baseURL}${path48}`,
6733
+ url: ({ path: path47 }) => `${baseURL}${path47}`,
6734
6734
  headers: getHeaders,
6735
6735
  compatibility,
6736
6736
  fetch: options.fetch,
@@ -6738,14 +6738,14 @@ function createOpenRouter(options = {}) {
6738
6738
  });
6739
6739
  const createEmbeddingModel = (modelId, settings = {}) => new OpenRouterEmbeddingModel(modelId, settings, {
6740
6740
  provider: "openrouter.embedding",
6741
- url: ({ path: path48 }) => `${baseURL}${path48}`,
6741
+ url: ({ path: path47 }) => `${baseURL}${path47}`,
6742
6742
  headers: getHeaders,
6743
6743
  fetch: options.fetch,
6744
6744
  extraBody: options.extraBody
6745
6745
  });
6746
6746
  const createImageModel = (modelId, settings = {}) => new OpenRouterImageModel(modelId, settings, {
6747
6747
  provider: "openrouter.image",
6748
- url: ({ path: path48 }) => `${baseURL}${path48}`,
6748
+ url: ({ path: path47 }) => `${baseURL}${path47}`,
6749
6749
  headers: getHeaders,
6750
6750
  fetch: options.fetch,
6751
6751
  extraBody: options.extraBody
@@ -14338,7 +14338,6 @@ import { existsSync as existsSync4 } from "node:fs";
14338
14338
  import path45 from "node:path";
14339
14339
  import { mkdir as mkdir15, readFile as readFile13, writeFile as writeFile8 } from "node:fs/promises";
14340
14340
  import path46 from "node:path";
14341
- import path47 from "node:path";
14342
14341
  function computeTraceSummary(messages) {
14343
14342
  const toolCallCounts = {};
14344
14343
  const toolDurations = {};
@@ -24371,13 +24370,13 @@ async function execFileWithStdinNode(argv, stdinPayload, options) {
24371
24370
  async function execShellWithStdin(command, stdinPayload, options = {}) {
24372
24371
  const { mkdir: mkdir16, readFile: readFile14, rm: rm6, writeFile: writeFile9 } = await import("node:fs/promises");
24373
24372
  const { tmpdir: tmpdir3 } = await import("node:os");
24374
- const path48 = await import("node:path");
24373
+ const path47 = await import("node:path");
24375
24374
  const { randomUUID: randomUUID10 } = await import("node:crypto");
24376
- const dir = path48.join(tmpdir3(), `agentv-exec-${randomUUID10()}`);
24375
+ const dir = path47.join(tmpdir3(), `agentv-exec-${randomUUID10()}`);
24377
24376
  await mkdir16(dir, { recursive: true });
24378
- const stdinPath = path48.join(dir, "stdin.txt");
24379
- const stdoutPath = path48.join(dir, "stdout.txt");
24380
- const stderrPath = path48.join(dir, "stderr.txt");
24377
+ const stdinPath = path47.join(dir, "stdin.txt");
24378
+ const stdoutPath = path47.join(dir, "stdout.txt");
24379
+ const stderrPath = path47.join(dir, "stderr.txt");
24381
24380
  await writeFile9(stdinPath, stdinPayload, "utf8");
24382
24381
  const wrappedCommand = process.platform === "win32" ? `(${command}) < ${shellEscapePath(stdinPath)} > ${shellEscapePath(stdoutPath)} 2> ${shellEscapePath(stderrPath)}` : `(${command}) < ${shellEscapePath(stdinPath)} > ${shellEscapePath(stdoutPath)} 2> ${shellEscapePath(stderrPath)}`;
24383
24382
  const { spawn: spawn5 } = await import("node:child_process");
@@ -26565,115 +26564,115 @@ var FieldAccuracyEvaluator = class {
26565
26564
  * Evaluate a single field against the expected value.
26566
26565
  */
26567
26566
  evaluateField(fieldConfig, candidateData, expectedData) {
26568
- const { path: path48, match, required = true, weight = 1 } = fieldConfig;
26569
- const candidateValue = resolvePath(candidateData, path48);
26570
- const expectedValue = resolvePath(expectedData, path48);
26567
+ const { path: path47, match, required = true, weight = 1 } = fieldConfig;
26568
+ const candidateValue = resolvePath(candidateData, path47);
26569
+ const expectedValue = resolvePath(expectedData, path47);
26571
26570
  if (expectedValue === void 0) {
26572
26571
  return {
26573
- path: path48,
26572
+ path: path47,
26574
26573
  score: 1,
26575
26574
  // No expected value means no comparison needed
26576
26575
  weight,
26577
26576
  hit: true,
26578
- message: `${path48}: no expected value`
26577
+ message: `${path47}: no expected value`
26579
26578
  };
26580
26579
  }
26581
26580
  if (candidateValue === void 0) {
26582
26581
  if (required) {
26583
26582
  return {
26584
- path: path48,
26583
+ path: path47,
26585
26584
  score: 0,
26586
26585
  weight,
26587
26586
  hit: false,
26588
- message: `${path48} (required, missing)`
26587
+ message: `${path47} (required, missing)`
26589
26588
  };
26590
26589
  }
26591
26590
  return {
26592
- path: path48,
26591
+ path: path47,
26593
26592
  score: 1,
26594
26593
  // Don't penalize missing optional fields
26595
26594
  weight: 0,
26596
26595
  // Zero weight means it won't affect the score
26597
26596
  hit: true,
26598
- message: `${path48}: optional field missing`
26597
+ message: `${path47}: optional field missing`
26599
26598
  };
26600
26599
  }
26601
26600
  switch (match) {
26602
26601
  case "exact":
26603
- return this.compareExact(path48, candidateValue, expectedValue, weight);
26602
+ return this.compareExact(path47, candidateValue, expectedValue, weight);
26604
26603
  case "numeric_tolerance":
26605
26604
  return this.compareNumericTolerance(
26606
- path48,
26605
+ path47,
26607
26606
  candidateValue,
26608
26607
  expectedValue,
26609
26608
  fieldConfig,
26610
26609
  weight
26611
26610
  );
26612
26611
  case "date":
26613
- return this.compareDate(path48, candidateValue, expectedValue, fieldConfig, weight);
26612
+ return this.compareDate(path47, candidateValue, expectedValue, fieldConfig, weight);
26614
26613
  default:
26615
26614
  return {
26616
- path: path48,
26615
+ path: path47,
26617
26616
  score: 0,
26618
26617
  weight,
26619
26618
  hit: false,
26620
- message: `${path48}: unknown match type "${match}"`
26619
+ message: `${path47}: unknown match type "${match}"`
26621
26620
  };
26622
26621
  }
26623
26622
  }
26624
26623
  /**
26625
26624
  * Exact equality comparison.
26626
26625
  */
26627
- compareExact(path48, candidateValue, expectedValue, weight) {
26626
+ compareExact(path47, candidateValue, expectedValue, weight) {
26628
26627
  if (deepEqual(candidateValue, expectedValue)) {
26629
26628
  return {
26630
- path: path48,
26629
+ path: path47,
26631
26630
  score: 1,
26632
26631
  weight,
26633
26632
  hit: true,
26634
- message: path48
26633
+ message: path47
26635
26634
  };
26636
26635
  }
26637
26636
  if (typeof candidateValue !== typeof expectedValue) {
26638
26637
  return {
26639
- path: path48,
26638
+ path: path47,
26640
26639
  score: 0,
26641
26640
  weight,
26642
26641
  hit: false,
26643
- message: `${path48} (type mismatch: got ${typeof candidateValue}, expected ${typeof expectedValue})`
26642
+ message: `${path47} (type mismatch: got ${typeof candidateValue}, expected ${typeof expectedValue})`
26644
26643
  };
26645
26644
  }
26646
26645
  return {
26647
- path: path48,
26646
+ path: path47,
26648
26647
  score: 0,
26649
26648
  weight,
26650
26649
  hit: false,
26651
- message: `${path48} (value mismatch)`
26650
+ message: `${path47} (value mismatch)`
26652
26651
  };
26653
26652
  }
26654
26653
  /**
26655
26654
  * Numeric comparison with absolute or relative tolerance.
26656
26655
  */
26657
- compareNumericTolerance(path48, candidateValue, expectedValue, fieldConfig, weight) {
26656
+ compareNumericTolerance(path47, candidateValue, expectedValue, fieldConfig, weight) {
26658
26657
  const { tolerance = 0, relative = false } = fieldConfig;
26659
26658
  const candidateNum = toNumber(candidateValue);
26660
26659
  const expectedNum = toNumber(expectedValue);
26661
26660
  if (candidateNum === null || expectedNum === null) {
26662
26661
  return {
26663
- path: path48,
26662
+ path: path47,
26664
26663
  score: 0,
26665
26664
  weight,
26666
26665
  hit: false,
26667
- message: `${path48} (non-numeric value)`
26666
+ message: `${path47} (non-numeric value)`
26668
26667
  };
26669
26668
  }
26670
26669
  if (!Number.isFinite(candidateNum) || !Number.isFinite(expectedNum)) {
26671
26670
  return {
26672
- path: path48,
26671
+ path: path47,
26673
26672
  score: 0,
26674
26673
  weight,
26675
26674
  hit: false,
26676
- message: `${path48} (invalid numeric value)`
26675
+ message: `${path47} (invalid numeric value)`
26677
26676
  };
26678
26677
  }
26679
26678
  const diff = Math.abs(candidateNum - expectedNum);
@@ -26686,61 +26685,61 @@ var FieldAccuracyEvaluator = class {
26686
26685
  }
26687
26686
  if (withinTolerance) {
26688
26687
  return {
26689
- path: path48,
26688
+ path: path47,
26690
26689
  score: 1,
26691
26690
  weight,
26692
26691
  hit: true,
26693
- message: `${path48} (within tolerance: diff=${diff.toFixed(2)})`
26692
+ message: `${path47} (within tolerance: diff=${diff.toFixed(2)})`
26694
26693
  };
26695
26694
  }
26696
26695
  return {
26697
- path: path48,
26696
+ path: path47,
26698
26697
  score: 0,
26699
26698
  weight,
26700
26699
  hit: false,
26701
- message: `${path48} (outside tolerance: diff=${diff.toFixed(2)}, tolerance=${tolerance})`
26700
+ message: `${path47} (outside tolerance: diff=${diff.toFixed(2)}, tolerance=${tolerance})`
26702
26701
  };
26703
26702
  }
26704
26703
  /**
26705
26704
  * Date comparison with format normalization.
26706
26705
  */
26707
- compareDate(path48, candidateValue, expectedValue, fieldConfig, weight) {
26706
+ compareDate(path47, candidateValue, expectedValue, fieldConfig, weight) {
26708
26707
  const formats = fieldConfig.formats ?? DEFAULT_DATE_FORMATS;
26709
26708
  const candidateDate = parseDate(String(candidateValue), formats);
26710
26709
  const expectedDate = parseDate(String(expectedValue), formats);
26711
26710
  if (candidateDate === null) {
26712
26711
  return {
26713
- path: path48,
26712
+ path: path47,
26714
26713
  score: 0,
26715
26714
  weight,
26716
26715
  hit: false,
26717
- message: `${path48} (unparseable candidate date)`
26716
+ message: `${path47} (unparseable candidate date)`
26718
26717
  };
26719
26718
  }
26720
26719
  if (expectedDate === null) {
26721
26720
  return {
26722
- path: path48,
26721
+ path: path47,
26723
26722
  score: 0,
26724
26723
  weight,
26725
26724
  hit: false,
26726
- message: `${path48} (unparseable expected date)`
26725
+ message: `${path47} (unparseable expected date)`
26727
26726
  };
26728
26727
  }
26729
26728
  if (candidateDate.getFullYear() === expectedDate.getFullYear() && candidateDate.getMonth() === expectedDate.getMonth() && candidateDate.getDate() === expectedDate.getDate()) {
26730
26729
  return {
26731
- path: path48,
26730
+ path: path47,
26732
26731
  score: 1,
26733
26732
  weight,
26734
26733
  hit: true,
26735
- message: path48
26734
+ message: path47
26736
26735
  };
26737
26736
  }
26738
26737
  return {
26739
- path: path48,
26738
+ path: path47,
26740
26739
  score: 0,
26741
26740
  weight,
26742
26741
  hit: false,
26743
- message: `${path48} (date mismatch: got ${formatDateISO(candidateDate)}, expected ${formatDateISO(expectedDate)})`
26742
+ message: `${path47} (date mismatch: got ${formatDateISO(candidateDate)}, expected ${formatDateISO(expectedDate)})`
26744
26743
  };
26745
26744
  }
26746
26745
  /**
@@ -26773,11 +26772,11 @@ var FieldAccuracyEvaluator = class {
26773
26772
  };
26774
26773
  }
26775
26774
  };
26776
- function resolvePath(obj, path48) {
26777
- if (!path48 || !obj) {
26775
+ function resolvePath(obj, path47) {
26776
+ if (!path47 || !obj) {
26778
26777
  return void 0;
26779
26778
  }
26780
- const parts = path48.split(/\.|\[|\]/).filter((p) => p.length > 0);
26779
+ const parts = path47.split(/\.|\[|\]/).filter((p) => p.length > 0);
26781
26780
  let current = obj;
26782
26781
  for (const part of parts) {
26783
26782
  if (current === null || current === void 0) {
@@ -27251,8 +27250,8 @@ var TokenUsageEvaluator = class {
27251
27250
  };
27252
27251
  }
27253
27252
  };
27254
- function getNestedValue(obj, path48) {
27255
- const parts = path48.split(".");
27253
+ function getNestedValue(obj, path47) {
27254
+ const parts = path47.split(".");
27256
27255
  let current = obj;
27257
27256
  for (const part of parts) {
27258
27257
  if (current === null || current === void 0 || typeof current !== "object") {
@@ -29402,7 +29401,7 @@ async function runEvaluation(options) {
29402
29401
  if (!cliModel) {
29403
29402
  throw new Error('--grader-target "agentv" requires --model (e.g., "openai:gpt-5-mini")');
29404
29403
  }
29405
- const { AgentvProvider: AgentvProvider2 } = await import("./agentv-provider-NFFLXG5M-TJAWCWCX.js");
29404
+ const { AgentvProvider: AgentvProvider2 } = await import("./agentv-provider-TXM4UEUT-SUZSAXWZ.js");
29406
29405
  return new AgentvProvider2("agentv", { model: cliModel, temperature: 0 });
29407
29406
  }
29408
29407
  const overrideTarget = resolveTargetByName(cliGraderTarget);
@@ -31677,7 +31676,7 @@ function trimBaselineResult(result) {
31677
31676
  }
31678
31677
  var DEFAULT_CATEGORY = "Uncategorized";
31679
31678
  function deriveCategory(relativePath) {
31680
- const parts = relativePath.split(path47.sep);
31679
+ const parts = relativePath.split(/[/\\]/);
31681
31680
  if (parts.length <= 1) {
31682
31681
  return DEFAULT_CATEGORY;
31683
31682
  }
@@ -31733,7 +31732,7 @@ var OtelTraceExporter = class {
31733
31732
  import("./esm-CZAWIY6F.js"),
31734
31733
  import("./esm-RVQPUGWH.js"),
31735
31734
  import("./esm-R77SNOF5.js"),
31736
- import("./esm-5Q4BZALM-5REQWAUV.js").catch(() => null)
31735
+ import("./esm-ZADQ4XQH-5LX2IKZV.js").catch(() => null)
31737
31736
  ]);
31738
31737
  const { NodeTracerProvider: Provider, SimpleSpanProcessor } = sdkTraceNode;
31739
31738
  const { resourceFromAttributes } = resourcesMod;
@@ -31752,7 +31751,7 @@ var OtelTraceExporter = class {
31752
31751
  processors.push(new SimpleSpanProcessor(exporter));
31753
31752
  }
31754
31753
  if (this.options.otlpFilePath) {
31755
- const { OtlpJsonFileExporter: OtlpJsonFileExporter2 } = await import("./otlp-json-file-exporter-77FDBRSY-EZAPHWP6.js");
31754
+ const { OtlpJsonFileExporter: OtlpJsonFileExporter2 } = await import("./otlp-json-file-exporter-RJFPCKVK-T6N4OGWG.js");
31756
31755
  processors.push(
31757
31756
  new SimpleSpanProcessor(new OtlpJsonFileExporter2(this.options.otlpFilePath))
31758
31757
  );
@@ -32344,4 +32343,4 @@ export {
32344
32343
  OtelStreamingObserver,
32345
32344
  createAgentKernel
32346
32345
  };
32347
- //# sourceMappingURL=chunk-XLM3RNN7.js.map
32346
+ //# sourceMappingURL=chunk-HMOXP7T5.js.map