@agentv/core 4.25.0-next.1 → 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.
@@ -1733,8 +1733,21 @@ function resolveOptionalNumberArray(source, description) {
1733
1733
 
1734
1734
  // src/evaluation/interpolation.ts
1735
1735
  var ENV_VAR_PATTERN = /\$\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}/g;
1736
+ var WHOLE_VAR_PATTERN = /^\$\{\{\s*([A-Za-z_][A-Za-z0-9_]*)\s*\}\}$/;
1737
+ var PLAIN_NUMBER_PATTERN = /^-?(?:0|[1-9]\d*)(?:\.\d+)?$/;
1738
+ function coercePrimitive(value) {
1739
+ if (value === "true") return true;
1740
+ if (value === "false") return false;
1741
+ if (PLAIN_NUMBER_PATTERN.test(value)) return Number(value);
1742
+ return value;
1743
+ }
1736
1744
  function interpolateEnv(value, env) {
1737
1745
  if (typeof value === "string") {
1746
+ const wholeMatch = WHOLE_VAR_PATTERN.exec(value);
1747
+ if (wholeMatch) {
1748
+ const resolved = env[wholeMatch[1]] ?? "";
1749
+ return coercePrimitive(resolved);
1750
+ }
1738
1751
  return value.replace(ENV_VAR_PATTERN, (_, varName) => env[varName] ?? "");
1739
1752
  }
1740
1753
  if (Array.isArray(value)) {
@@ -1958,4 +1971,4 @@ export {
1958
1971
  resolveDelegatedTargetDefinition,
1959
1972
  resolveTargetDefinition
1960
1973
  };
1961
- //# sourceMappingURL=chunk-4VLOUBFL.js.map
1974
+ //# sourceMappingURL=chunk-6HLBKYE2.js.map