agentv 5.3.0-next.1 → 5.3.2-next.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.
Files changed (75) hide show
  1. package/README.md +70 -60
  2. package/dist/{artifact-writer-JFNIPMKW.js → artifact-writer-KJEOROKQ.js} +5 -5
  3. package/dist/{chunk-6ZZCDZPD.js → chunk-6262OKXM.js} +21774 -21034
  4. package/dist/chunk-6262OKXM.js.map +1 -0
  5. package/dist/chunk-AQ5BIAXF.js +604 -0
  6. package/dist/chunk-AQ5BIAXF.js.map +1 -0
  7. package/dist/chunk-BV5VQLI2.js +2 -0
  8. package/dist/{chunk-V52ATPTT.js → chunk-JGSRUJZQ.js} +186 -32
  9. package/dist/chunk-JGSRUJZQ.js.map +1 -0
  10. package/dist/chunk-MMDLXYBX.js +721 -0
  11. package/dist/chunk-MMDLXYBX.js.map +1 -0
  12. package/dist/{chunk-FVR4RQFK.js → chunk-QSK3PC44.js} +1131 -580
  13. package/dist/chunk-QSK3PC44.js.map +1 -0
  14. package/dist/chunk-TEEXVJWM.js +2 -0
  15. package/dist/{chunk-BHKQHG26.js → chunk-WIAJ7JAV.js} +186 -64
  16. package/dist/chunk-WIAJ7JAV.js.map +1 -0
  17. package/dist/cli.d.ts +1 -0
  18. package/dist/cli.js +17517 -10
  19. package/dist/cli.js.map +1 -1
  20. package/dist/config.d.ts +2 -0
  21. package/dist/{ts-eval-loader-DQDYRULE-V3377FOL.js → config.js} +7 -7
  22. package/dist/config.js.map +1 -0
  23. package/dist/contracts-DsZmZLl8.d.ts +742 -0
  24. package/dist/contracts.d.ts +2 -0
  25. package/dist/contracts.js +28 -0
  26. package/dist/contracts.js.map +1 -0
  27. package/dist/dashboard/assets/{index-DNgf3qJ2.js → index-BfqOlLOF.js} +1 -1
  28. package/dist/dashboard/assets/index-Bh8lpGce.css +1 -0
  29. package/dist/dashboard/assets/index-oPR3ywQb.js +121 -0
  30. package/dist/dashboard/index.html +2 -2
  31. package/dist/{dist-6Z7U473R.js → dist-A3SGR7TW.js} +30 -18
  32. package/dist/dist-A3SGR7TW.js.map +1 -0
  33. package/dist/index.d.ts +4 -0
  34. package/dist/index.js +137 -18
  35. package/dist/{interactive-RUY3OCBI.js → interactive-DL7N2C7K.js} +24 -24
  36. package/dist/interactive-DL7N2C7K.js.map +1 -0
  37. package/dist/provider.d.ts +2 -0
  38. package/dist/provider.js +24 -0
  39. package/dist/provider.js.map +1 -0
  40. package/dist/sdk.d.ts +802 -0
  41. package/dist/sdk.js +145 -0
  42. package/dist/sdk.js.map +1 -0
  43. package/dist/skills/agentv-bench/SKILL.md +14 -13
  44. package/dist/skills/agentv-bench/agents/analyzer.md +1 -1
  45. package/dist/skills/agentv-bench/agents/executor.md +1 -1
  46. package/dist/skills/agentv-bench/references/autoresearch.md +9 -9
  47. package/dist/skills/agentv-bench/references/environment-adaptation.md +4 -4
  48. package/dist/skills/agentv-bench/references/eval-yaml-spec.md +30 -47
  49. package/dist/skills/agentv-bench/references/schemas.md +44 -60
  50. package/dist/skills/agentv-bench/references/subagent-pipeline.md +20 -18
  51. package/dist/skills/agentv-eval-migrations/SKILL.md +13 -0
  52. package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +56 -39
  53. package/dist/skills/agentv-eval-writer/SKILL.md +101 -60
  54. package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +15 -10
  55. package/dist/skills/agentv-eval-writer/references/eval.schema.json +4543 -5189
  56. package/dist/skills/agentv-eval-writer/references/python-helpers.md +2 -2
  57. package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +20 -3
  58. package/dist/templates/.agentv/providers.yaml +42 -0
  59. package/dist/templates/.env.example +2 -2
  60. package/dist/ts-eval-loader-3G5GEAEC-6F52JLPP.js +18 -0
  61. package/dist/ts-eval-loader-3G5GEAEC-6F52JLPP.js.map +1 -0
  62. package/package.json +29 -4
  63. package/dist/chunk-6ZZCDZPD.js.map +0 -1
  64. package/dist/chunk-BHKQHG26.js.map +0 -1
  65. package/dist/chunk-FVR4RQFK.js.map +0 -1
  66. package/dist/chunk-T32NL3E6.js +0 -17973
  67. package/dist/chunk-T32NL3E6.js.map +0 -1
  68. package/dist/chunk-V52ATPTT.js.map +0 -1
  69. package/dist/dashboard/assets/index-D_bokML8.css +0 -1
  70. package/dist/dashboard/assets/index-r_jSJmlw.js +0 -121
  71. package/dist/interactive-RUY3OCBI.js.map +0 -1
  72. package/dist/templates/.agentv/targets.yaml +0 -97
  73. /package/dist/{artifact-writer-JFNIPMKW.js.map → artifact-writer-KJEOROKQ.js.map} +0 -0
  74. /package/dist/{dist-6Z7U473R.js.map → chunk-BV5VQLI2.js.map} +0 -0
  75. /package/dist/{ts-eval-loader-DQDYRULE-V3377FOL.js.map → chunk-TEEXVJWM.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
2
+ //# sourceMappingURL=chunk-TEEXVJWM.js.map
@@ -6,7 +6,7 @@ import {
6
6
  toSnakeCaseDeep,
7
7
  writeArtifactsFromResults,
8
8
  writePerTestArtifacts
9
- } from "./chunk-6ZZCDZPD.js";
9
+ } from "./chunk-6262OKXM.js";
10
10
 
11
11
  // src/commands/eval/artifact-writer.ts
12
12
  import path2 from "node:path";
@@ -18,13 +18,15 @@ import path from "node:path";
18
18
  import { stringify as stringifyYaml } from "yaml";
19
19
  var TEST_BUNDLE_DIRNAME = "test";
20
20
  var TASK_EVAL_FILENAME = "EVAL.yaml";
21
- var TASK_TARGETS_FILENAME = "targets.yaml";
21
+ var TASK_PROVIDERS_FILENAME = "providers.yaml";
22
22
  var TASK_FILES_DIRNAME = "files";
23
23
  var TASK_GRADERS_DIRNAME = "graders";
24
24
  var INPUT_PROMPT = "{{ input }}";
25
25
  var BUNDLE_EVALS_DIRNAME = "evals";
26
26
  var BUNDLE_MANIFEST_FILENAME = "agentv_bundle.json";
27
- var BUNDLE_TARGETS_FILENAME = "targets.yaml";
27
+ var BUNDLE_PROVIDERS_FILENAME = "providers.yaml";
28
+ var BUNDLE_CONFIG_DIRNAME = ".agentv";
29
+ var BUNDLE_CONFIG_FILENAME = "config.yaml";
28
30
  var BUNDLE_WORKSPACES_DIRNAME = "workspaces";
29
31
  var BUNDLE_SCRIPTS_DIRNAME = "scripts";
30
32
  var REDACTED_SOURCE_VALUE = "[redacted]";
@@ -44,17 +46,20 @@ var SKIPPED_DIR_NAMES = /* @__PURE__ */ new Set([
44
46
  var AUTHORING_TOP_LEVEL_TARGET_FIELDS = /* @__PURE__ */ new Set([
45
47
  "label",
46
48
  "provider",
49
+ "provider_spec",
50
+ "environment",
47
51
  "prompts",
48
52
  "transform",
49
53
  "delay",
50
54
  "env",
51
55
  "model",
56
+ "runtime",
57
+ "hooks",
52
58
  "use_target",
53
59
  "fallback_targets",
54
60
  "grader_target",
55
61
  "max_budget_usd",
56
62
  "workers",
57
- "batch_requests",
58
63
  "subagent_mode_allowed",
59
64
  "max_retries",
60
65
  "retry_initial_delay_ms",
@@ -420,7 +425,7 @@ function targetReferenceNames(target) {
420
425
  }
421
426
  return references;
422
427
  }
423
- function selectTargetDefinitions(targetName, definitions) {
428
+ function selectTargetDefinitions(providerLabel, definitions) {
424
429
  const byName = new Map(definitions.map((definition) => [definition.name, definition]));
425
430
  const selected = [];
426
431
  const seen = /* @__PURE__ */ new Set();
@@ -438,7 +443,7 @@ function selectTargetDefinitions(targetName, definitions) {
438
443
  visit(referenceName);
439
444
  }
440
445
  }
441
- visit(targetName);
446
+ visit(providerLabel);
442
447
  return selected;
443
448
  }
444
449
  async function writeYamlFile(filePath, value) {
@@ -457,11 +462,62 @@ function bundledEvalFileName(evalFilePath) {
457
462
  const safeName = withoutKnownExtension.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
458
463
  return `${safeName || "bundle"}.eval.yaml`;
459
464
  }
460
- function uniqueTargetDefinitions(selections) {
465
+ function uniqueTargetDefinitions(selections, tests = []) {
461
466
  const selected = [];
462
467
  const seen = /* @__PURE__ */ new Set();
468
+ function addDefinitions(names, definitions) {
469
+ for (const name of names) {
470
+ for (const definition of selectTargetDefinitions(name, definitions)) {
471
+ if (seen.has(definition.name)) {
472
+ continue;
473
+ }
474
+ seen.add(definition.name);
475
+ selected.push(definition);
476
+ }
477
+ }
478
+ }
479
+ const graderTargetNames = collectGraderTargetNames(tests);
463
480
  for (const selection of selections) {
464
- for (const definition of selectTargetDefinitions(selection.targetName, selection.definitions)) {
481
+ addDefinitions([selection.providerLabel, ...graderTargetNames], selection.definitions);
482
+ }
483
+ return selected;
484
+ }
485
+ function collectGraderTargetNames(tests) {
486
+ const names = [];
487
+ const seen = /* @__PURE__ */ new Set();
488
+ function collect(value, key) {
489
+ if (key === "target" && typeof value === "string") {
490
+ const target = value.trim();
491
+ if (target.length > 0 && !target.includes("${{") && !seen.has(target)) {
492
+ seen.add(target);
493
+ names.push(target);
494
+ }
495
+ return;
496
+ }
497
+ if (Array.isArray(value)) {
498
+ for (const item of value) {
499
+ collect(item);
500
+ }
501
+ return;
502
+ }
503
+ if (isRecord(value)) {
504
+ for (const [childKey, childValue] of Object.entries(value)) {
505
+ collect(childValue, childKey);
506
+ }
507
+ }
508
+ }
509
+ for (const test of tests) {
510
+ for (const grader of test.source?.graderDefinitions ?? []) {
511
+ collect(grader.definition);
512
+ }
513
+ }
514
+ return names;
515
+ }
516
+ function selectTaskBundleTargetDefinitions(providerLabel, definitions, tests) {
517
+ const selected = [];
518
+ const seen = /* @__PURE__ */ new Set();
519
+ for (const name of [providerLabel, ...collectGraderTargetNames(tests)]) {
520
+ for (const definition of selectTargetDefinitions(name, definitions)) {
465
521
  if (seen.has(definition.name)) {
466
522
  continue;
467
523
  }
@@ -471,18 +527,24 @@ function uniqueTargetDefinitions(selections) {
471
527
  }
472
528
  return selected;
473
529
  }
474
- function serializeTargetDefinition(definition) {
475
- const target = { id: definition.name };
476
- if (definition.id !== void 0) {
477
- target.id = definition.id;
530
+ function serializeTargetDefinition(definition, rewrites) {
531
+ const providerSpec = typeof definition.provider_spec === "string" && definition.provider_spec.trim().length > 0 ? definition.provider_spec.trim() : typeof definition.provider === "string" && definition.provider.trim().length > 0 ? definition.provider.trim() : typeof definition.id === "string" && definition.id.trim().length > 0 ? definition.id.trim() : definition.name;
532
+ const provider = { id: providerSpec };
533
+ if (definition.name !== providerSpec) {
534
+ provider.label = definition.name;
478
535
  }
479
536
  const config = {};
480
537
  for (const [key, value] of Object.entries(definition)) {
481
- if (value === void 0 || key === "name" || key === "id" || key === "label" || key === "config") {
538
+ if (value === void 0 || key === "name" || key === "id" || key === "provider" || key === "provider_spec" || key === "label" || key === "config") {
482
539
  continue;
483
540
  }
484
- if (AUTHORING_TOP_LEVEL_TARGET_FIELDS.has(key)) {
485
- target[key] = value;
541
+ if (key === "environment" && definition.environment) {
542
+ provider.environment = serializeEnvironment(
543
+ definition.environment,
544
+ rewrites
545
+ );
546
+ } else if (AUTHORING_TOP_LEVEL_TARGET_FIELDS.has(key)) {
547
+ provider[key] = value;
486
548
  } else {
487
549
  config[key] = value;
488
550
  }
@@ -495,22 +557,22 @@ function serializeTargetDefinition(definition) {
495
557
  }
496
558
  }
497
559
  if (Object.keys(config).length > 0) {
498
- target.config = config;
560
+ provider.config = config;
499
561
  }
500
- return target;
562
+ return provider;
501
563
  }
502
- function serializeTargetDefinitions(definitions) {
503
- return definitions.map((definition) => serializeTargetDefinition(definition));
564
+ function serializeTargetDefinitions(definitions, rewrites = /* @__PURE__ */ new Map()) {
565
+ return definitions.map((definition) => serializeTargetDefinition(definition, rewrites));
504
566
  }
505
567
  function uniqueTargetNames(selections) {
506
568
  const names = [];
507
569
  const seen = /* @__PURE__ */ new Set();
508
570
  for (const selection of selections) {
509
- if (seen.has(selection.targetName)) {
571
+ if (seen.has(selection.providerLabel)) {
510
572
  continue;
511
573
  }
512
- seen.add(selection.targetName);
513
- names.push(selection.targetName);
574
+ seen.add(selection.providerLabel);
575
+ names.push(selection.providerLabel);
514
576
  }
515
577
  return names;
516
578
  }
@@ -710,6 +772,45 @@ async function collectEnvironmentReferences(tests, evalFileDir) {
710
772
  }
711
773
  return references;
712
774
  }
775
+ async function collectProviderEnvironmentReferences(definitions, evalFileDir) {
776
+ const references = [];
777
+ for (const definition of definitions) {
778
+ const environment = definition.environment;
779
+ if (!environment) {
780
+ continue;
781
+ }
782
+ const label = `provider "${definition.name}"`;
783
+ if (environment.type === "host") {
784
+ references.push({
785
+ kind: "environment_workdir",
786
+ displayPath: environment.workdir,
787
+ resolvedPath: environment.workdir,
788
+ location: `${label}.environment.workdir`
789
+ });
790
+ }
791
+ const command = environment.setup?.command;
792
+ if (!command) {
793
+ continue;
794
+ }
795
+ const baseDir = environmentBaseDir(environment, evalFileDir);
796
+ for (const arg of command) {
797
+ const reference = await maybeWorkspaceHookCommandReference({
798
+ arg,
799
+ baseDir,
800
+ testId: definition.name,
801
+ hookName: "setup"
802
+ });
803
+ if (reference) {
804
+ references.push({
805
+ ...reference,
806
+ kind: "environment_setup_command",
807
+ location: `${label}.environment.setup.command`
808
+ });
809
+ }
810
+ }
811
+ }
812
+ return references;
813
+ }
713
814
  async function collectWorkspaceReferences(tests, evalFileDir) {
714
815
  const references = [];
715
816
  const errors = [];
@@ -793,7 +894,7 @@ function bundleManifest(options) {
793
894
  created_at: options.createdAt,
794
895
  source_eval: options.evalFilePath,
795
896
  eval_path: relative(options.evalPath),
796
- targets_path: relative(options.targetsPath),
897
+ providers_path: relative(options.providersPath),
797
898
  test_count: options.tests.length,
798
899
  targets: options.targetNames,
799
900
  ...hasCopiedBucket(options.copiedReferences, "files") ? { files_path: "evals/files" } : {},
@@ -806,27 +907,41 @@ async function materializeTaskBundle(options) {
806
907
  if (!options.test.source) {
807
908
  return void 0;
808
909
  }
809
- const targetDefinitions = selectTargetDefinitions(options.targetName, options.targetDefinitions);
810
- if (targetDefinitions.length === 0) {
910
+ const providerDefinitions = selectTaskBundleTargetDefinitions(
911
+ options.providerLabel,
912
+ options.providerDefinitions,
913
+ [options.test]
914
+ );
915
+ if (providerDefinitions.length === 0) {
811
916
  return void 0;
812
917
  }
813
918
  const testDir = path.join(options.outputDir, TEST_BUNDLE_DIRNAME);
814
919
  await mkdir(testDir, { recursive: true });
815
- const copiedReferences = await copyReferences(options.test.source.references, testDir, options);
920
+ const providerEnvironmentReferences = await collectProviderEnvironmentReferences(
921
+ providerDefinitions,
922
+ path.dirname(options.test.source.evalFileAbsolutePath ?? options.test.source.evalFilePath)
923
+ );
924
+ const copiedReferences = await copyReferences(
925
+ [...options.test.source.references, ...providerEnvironmentReferences],
926
+ testDir,
927
+ options
928
+ );
816
929
  const rewrites = buildPathRewrites(copiedReferences);
817
930
  const evalCase = buildEvalCase(options.test, rewrites);
818
931
  const evalPath = path.join(testDir, TASK_EVAL_FILENAME);
819
- const targetsPath = path.join(testDir, TASK_TARGETS_FILENAME);
932
+ const providersPath = path.join(testDir, TASK_PROVIDERS_FILENAME);
820
933
  await writeYamlFile(evalPath, {
821
- target: options.targetName,
934
+ providers: [options.providerLabel],
822
935
  prompts: [INPUT_PROMPT],
823
936
  tests: [evalCase]
824
937
  });
825
- await writeYamlFile(targetsPath, { targets: serializeTargetDefinitions(targetDefinitions) });
938
+ await writeYamlFile(providersPath, {
939
+ providers: serializeTargetDefinitions(providerDefinitions, rewrites)
940
+ });
826
941
  return {
827
942
  testDir,
828
943
  evalPath,
829
- targetsPath,
944
+ providersPath,
830
945
  ...hasCopiedBucket(copiedReferences, "files") ? { filesPath: path.join(testDir, TASK_FILES_DIRNAME) } : {},
831
946
  ...hasCopiedBucket(copiedReferences, "graders") ? { gradersPath: path.join(testDir, TASK_GRADERS_DIRNAME) } : {}
832
947
  };
@@ -835,7 +950,7 @@ async function materializeEvalBundle(options) {
835
950
  if (options.tests.length === 0) {
836
951
  throw new Error("Cannot bundle eval with no runnable tests.");
837
952
  }
838
- if (options.targetSelections.length === 0) {
953
+ if (options.providerSelections.length === 0) {
839
954
  throw new Error("Cannot bundle eval without a selected target.");
840
955
  }
841
956
  const missingSource = options.tests.find((test) => !test.source);
@@ -848,12 +963,18 @@ async function materializeEvalBundle(options) {
848
963
  const evalsDir = path.join(outputDir, BUNDLE_EVALS_DIRNAME);
849
964
  await mkdir(evalsDir, { recursive: true });
850
965
  const evalFileDir = path.dirname(path.resolve(options.evalFilePath));
966
+ const providerDefinitions = uniqueTargetDefinitions(options.providerSelections, options.tests);
851
967
  const workspaceReferences = await collectWorkspaceReferences(options.tests, evalFileDir);
852
968
  const environmentReferences = await collectEnvironmentReferences(options.tests, evalFileDir);
969
+ const providerEnvironmentReferences = await collectProviderEnvironmentReferences(
970
+ providerDefinitions,
971
+ evalFileDir
972
+ );
853
973
  const references = [
854
974
  ...options.tests.flatMap((test) => test.source?.references ?? []),
855
975
  ...collectExpectedOutputReferences(options.tests),
856
976
  ...environmentReferences,
977
+ ...providerEnvironmentReferences,
857
978
  ...workspaceReferences.references
858
979
  ];
859
980
  const { copied, failures } = await copyReferencesStrict(references, evalsDir, options);
@@ -863,24 +984,25 @@ async function materializeEvalBundle(options) {
863
984
  ${errors.map((error) => `- ${error}`).join("\n")}`);
864
985
  }
865
986
  const rewrites = buildPathRewrites(copied);
866
- const targetNames = uniqueTargetNames(options.targetSelections);
987
+ const targetNames = uniqueTargetNames(options.providerSelections);
867
988
  const evalPath = path.join(evalsDir, bundledEvalFileName(options.evalFilePath));
868
- const targetsPath = path.join(outputDir, BUNDLE_TARGETS_FILENAME);
989
+ const providersPath = path.join(outputDir, BUNDLE_PROVIDERS_FILENAME);
990
+ const configPath = path.join(outputDir, BUNDLE_CONFIG_DIRNAME, BUNDLE_CONFIG_FILENAME);
869
991
  const manifestPath = path.join(outputDir, BUNDLE_MANIFEST_FILENAME);
870
- const runtime = options.runtime ?? (targetNames.length === 1 ? { target: targetNames[0] } : void 0);
992
+ const runtime = options.runtime ?? (targetNames.length > 0 ? { providers: targetNames } : void 0);
871
993
  await writeYamlFile(evalPath, {
872
994
  ...runtime ?? {},
873
995
  prompts: [INPUT_PROMPT],
874
996
  tests: options.tests.map((test) => buildPortableEvalCase(test, rewrites))
875
997
  });
876
- await writeYamlFile(targetsPath, {
877
- targets: serializeTargetDefinitions(uniqueTargetDefinitions(options.targetSelections))
878
- });
998
+ await writeYamlFile(providersPath, serializeTargetDefinitions(providerDefinitions, rewrites));
999
+ await mkdir(path.dirname(configPath), { recursive: true });
1000
+ await writeYamlFile(configPath, { providers: `file://../${BUNDLE_PROVIDERS_FILENAME}` });
879
1001
  const manifest = bundleManifest({
880
1002
  outputDir,
881
1003
  evalFilePath: path.resolve(options.evalFilePath),
882
1004
  evalPath,
883
- targetsPath,
1005
+ providersPath,
884
1006
  copiedReferences: copied,
885
1007
  tests: options.tests,
886
1008
  targetNames,
@@ -892,7 +1014,7 @@ ${errors.map((error) => `- ${error}`).join("\n")}`);
892
1014
  bundleDir: outputDir,
893
1015
  evalsDir,
894
1016
  evalPath,
895
- targetsPath,
1017
+ providersPath,
896
1018
  manifestPath,
897
1019
  ...hasCopiedBucket(copied, "files") ? { filesPath: path.join(evalsDir, TASK_FILES_DIRNAME) } : {},
898
1020
  ...hasCopiedBucket(copied, "graders") ? { gradersPath: path.join(evalsDir, TASK_GRADERS_DIRNAME) } : {},
@@ -912,7 +1034,7 @@ function buildTaskBundleIndexFields(outputDir, taskBundle) {
912
1034
  return {
913
1035
  test_dir: toRelativeArtifactPath(outputDir, taskBundle.testDir),
914
1036
  eval_path: toRelativeArtifactPath(outputDir, taskBundle.evalPath),
915
- targets_path: toRelativeArtifactPath(outputDir, taskBundle.targetsPath),
1037
+ providers_path: toRelativeArtifactPath(outputDir, taskBundle.providersPath),
916
1038
  ...taskBundle.filesPath ? { files_path: toRelativeArtifactPath(outputDir, taskBundle.filesPath) } : {},
917
1039
  ...taskBundle.gradersPath ? { graders_path: toRelativeArtifactPath(outputDir, taskBundle.gradersPath) } : {}
918
1040
  };
@@ -928,56 +1050,56 @@ function buildResultIndexArtifact2(result, taskBundle) {
928
1050
  const extraIndexFields = taskBundle ? {
929
1051
  test_dir: path2.posix.join(artifactSubdir, "test"),
930
1052
  eval_path: path2.posix.join(artifactSubdir, "test", "EVAL.yaml"),
931
- targets_path: path2.posix.join(artifactSubdir, "test", "targets.yaml"),
1053
+ providers_path: path2.posix.join(artifactSubdir, "test", "providers.yaml"),
932
1054
  ...taskBundle.filesPath ? { files_path: path2.posix.join(artifactSubdir, "test", "files") } : {},
933
1055
  ...taskBundle.gradersPath ? { graders_path: path2.posix.join(artifactSubdir, "test", "graders") } : {}
934
1056
  } : void 0;
935
1057
  return buildResultIndexArtifact(result, extraIndexFields);
936
1058
  }
937
- function targetSelectionKey(evalFileAbsolutePath, targetName) {
938
- return `${evalFileAbsolutePath ? path2.resolve(evalFileAbsolutePath) : ""}::${targetName}`;
1059
+ function providerSelectionKey(evalFileAbsolutePath, providerLabel) {
1060
+ return `${evalFileAbsolutePath ? path2.resolve(evalFileAbsolutePath) : ""}::${providerLabel}`;
939
1061
  }
940
- function buildTargetSelectionMap(selections) {
941
- const targets = /* @__PURE__ */ new Map();
1062
+ function buildProviderSelectionMap(selections) {
1063
+ const providers = /* @__PURE__ */ new Map();
942
1064
  for (const selection of selections ?? []) {
943
- targets.set(
944
- targetSelectionKey(selection.evalFileAbsolutePath, selection.targetName),
1065
+ providers.set(
1066
+ providerSelectionKey(selection.evalFileAbsolutePath, selection.providerLabel),
945
1067
  selection
946
1068
  );
947
- if (selection.resolvedTargetName) {
948
- targets.set(
949
- targetSelectionKey(selection.evalFileAbsolutePath, selection.resolvedTargetName),
1069
+ if (selection.resolvedProviderName) {
1070
+ providers.set(
1071
+ providerSelectionKey(selection.evalFileAbsolutePath, selection.resolvedProviderName),
950
1072
  selection
951
1073
  );
952
1074
  }
953
1075
  if (!selection.evalFileAbsolutePath) {
954
- targets.set(targetSelectionKey(void 0, selection.targetName), selection);
955
- if (selection.resolvedTargetName) {
956
- targets.set(targetSelectionKey(void 0, selection.resolvedTargetName), selection);
1076
+ providers.set(providerSelectionKey(void 0, selection.providerLabel), selection);
1077
+ if (selection.resolvedProviderName) {
1078
+ providers.set(providerSelectionKey(void 0, selection.resolvedProviderName), selection);
957
1079
  }
958
1080
  }
959
1081
  }
960
- return targets;
1082
+ return providers;
961
1083
  }
962
- function findTargetSelection(result, test, targets) {
963
- const targetName = result.target ?? "unknown";
1084
+ function findProviderSelection(result, test, providers) {
1085
+ const providerLabel = result.target ?? "unknown";
964
1086
  const evalFileAbsolutePath = test?.source?.evalFileAbsolutePath;
965
- return targets.get(targetSelectionKey(evalFileAbsolutePath, targetName)) ?? targets.get(targetSelectionKey(void 0, targetName));
1087
+ return providers.get(providerSelectionKey(evalFileAbsolutePath, providerLabel)) ?? providers.get(providerSelectionKey(void 0, providerLabel));
966
1088
  }
967
1089
  function createTaskBundleArtifactsWriter(options) {
968
- const targetSelections = buildTargetSelectionMap(options?.taskBundleTargets);
969
- if (targetSelections.size === 0) {
1090
+ const providerSelections = buildProviderSelectionMap(options?.taskBundleTargets);
1091
+ if (providerSelections.size === 0) {
970
1092
  return void 0;
971
1093
  }
972
1094
  return async ({ outputDir, result, sourceTest, testDir }) => {
973
- const targetSelection = findTargetSelection(result, sourceTest, targetSelections);
974
- if (!sourceTest || !targetSelection) {
1095
+ const providerSelection = findProviderSelection(result, sourceTest, providerSelections);
1096
+ if (!sourceTest || !providerSelection) {
975
1097
  return void 0;
976
1098
  }
977
1099
  const taskBundle = await materializeTaskBundle({
978
1100
  test: sourceTest,
979
- targetName: targetSelection.targetName,
980
- targetDefinitions: targetSelection.definitions,
1101
+ providerLabel: providerSelection.providerLabel,
1102
+ providerDefinitions: providerSelection.definitions,
981
1103
  outputDir: testDir,
982
1104
  cwd: options?.cwd,
983
1105
  repoRoot: options?.repoRoot
@@ -1020,4 +1142,4 @@ export {
1020
1142
  writePerTestArtifacts2 as writePerTestArtifacts,
1021
1143
  writeArtifactsFromResults2 as writeArtifactsFromResults
1022
1144
  };
1023
- //# sourceMappingURL=chunk-BHKQHG26.js.map
1145
+ //# sourceMappingURL=chunk-WIAJ7JAV.js.map