@agentv/core 4.25.0 → 4.25.1-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.
@@ -17,7 +17,7 @@ import {
17
17
  readTextFile,
18
18
  resolveDelegatedTargetDefinition,
19
19
  resolveTargetDefinition
20
- } from "./chunk-4VLOUBFL.js";
20
+ } from "./chunk-6HLBKYE2.js";
21
21
  import {
22
22
  execFileWithStdin,
23
23
  execShellWithStdin
@@ -16105,7 +16105,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
16105
16105
  return { tests: await loadTestsFromAgentSkills(evalFilePath) };
16106
16106
  }
16107
16107
  if (format === "typescript") {
16108
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-F7Y5QBKH.js");
16108
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-4CFPGHGT.js");
16109
16109
  return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
16110
16110
  }
16111
16111
  const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
@@ -16140,7 +16140,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
16140
16140
  return loadTestsFromAgentSkills(evalFilePath);
16141
16141
  }
16142
16142
  if (format === "typescript") {
16143
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-F7Y5QBKH.js");
16143
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-4CFPGHGT.js");
16144
16144
  const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
16145
16145
  return suite.tests;
16146
16146
  }
@@ -19954,4 +19954,4 @@ export {
19954
19954
  loadTestById,
19955
19955
  loadEvalCaseById
19956
19956
  };
19957
- //# sourceMappingURL=chunk-SJ5SN7RJ.js.map
19957
+ //# sourceMappingURL=chunk-IXTJEXWN.js.map
@@ -125,8 +125,21 @@ var import_node_path3 = __toESM(require("path"), 1);
125
125
 
126
126
  // src/evaluation/interpolation.ts
127
127
  var ENV_VAR_PATTERN = /\$\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}/g;
128
+ var WHOLE_VAR_PATTERN = /^\$\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}$/;
129
+ var PLAIN_NUMBER_PATTERN = /^-?(?:0|[1-9]\d*)(?:\.\d+)?$/;
130
+ function coercePrimitive(value) {
131
+ if (value === "true") return true;
132
+ if (value === "false") return false;
133
+ if (PLAIN_NUMBER_PATTERN.test(value)) return Number(value);
134
+ return value;
135
+ }
128
136
  function interpolateEnv(value, env) {
129
137
  if (typeof value === "string") {
138
+ const wholeMatch = WHOLE_VAR_PATTERN.exec(value);
139
+ if (wholeMatch) {
140
+ const resolved = env[wholeMatch[1]] ?? "";
141
+ return coercePrimitive(resolved);
142
+ }
130
143
  return value.replace(ENV_VAR_PATTERN, (_, varName) => env[varName] ?? "");
131
144
  }
132
145
  if (Array.isArray(value)) {
@@ -1625,7 +1638,7 @@ async function validateTargetsFile(filePath) {
1625
1638
  let parsed;
1626
1639
  try {
1627
1640
  const content = await (0, import_promises5.readFile)(absolutePath, "utf8");
1628
- parsed = parseYamlValue(content);
1641
+ parsed = interpolateEnv(parseYamlValue(content), process.env);
1629
1642
  } catch (error) {
1630
1643
  errors.push({
1631
1644
  severity: "error",
@@ -1843,7 +1856,7 @@ async function validateConfigFile(filePath) {
1843
1856
  const errors = [];
1844
1857
  try {
1845
1858
  const content = await (0, import_promises6.readFile)(filePath, "utf8");
1846
- const parsed = parseYamlValue(content);
1859
+ const parsed = interpolateEnv(parseYamlValue(content), process.env);
1847
1860
  if (typeof parsed !== "object" || parsed === null) {
1848
1861
  errors.push({
1849
1862
  severity: "error",