agentv 4.31.3 → 4.32.0-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 (32) hide show
  1. package/README.md +14 -0
  2. package/dist/{artifact-writer-FZ5RUHWC.js → artifact-writer-VDF7KRWL.js} +4 -4
  3. package/dist/{chunk-IJPWTVDU.js → chunk-2ZEY3WBH.js} +3 -3
  4. package/dist/{chunk-CO23UZAA.js → chunk-5JMFFG36.js} +13 -9
  5. package/dist/chunk-5JMFFG36.js.map +1 -0
  6. package/dist/{chunk-4POCDPC2.js → chunk-IGTRNQAM.js} +106 -63
  7. package/dist/chunk-IGTRNQAM.js.map +1 -0
  8. package/dist/{chunk-LOYPSIE7.js → chunk-LX5AK3P7.js} +22 -12
  9. package/dist/chunk-LX5AK3P7.js.map +1 -0
  10. package/dist/{chunk-377GONL7.js → chunk-TAZBCVEZ.js} +66 -62
  11. package/dist/chunk-TAZBCVEZ.js.map +1 -0
  12. package/dist/cli.js +5 -5
  13. package/dist/cli.js.map +1 -1
  14. package/dist/{studio/assets/index-sazn_aO8.js → dashboard/assets/index-BdoQWnyM.js} +1 -1
  15. package/dist/{studio/assets/index-CYUVGyMn.css → dashboard/assets/index-DcPH8PyS.css} +1 -1
  16. package/dist/dashboard/assets/index-EXkiwqam.js +116 -0
  17. package/dist/{studio → dashboard}/index.html +3 -3
  18. package/dist/{dist-CRYAFKLS.js → dist-GICSKMNP.js} +5 -3
  19. package/dist/index.js +9 -7
  20. package/dist/{interactive-QBLQNYDH.js → interactive-GIDBBDYZ.js} +5 -5
  21. package/dist/{ts-eval-loader-XR6DNOZ3-GA7B5N26.js → ts-eval-loader-Z6IUSDNA-YBOE4JIQ.js} +2 -2
  22. package/package.json +1 -1
  23. package/dist/chunk-377GONL7.js.map +0 -1
  24. package/dist/chunk-4POCDPC2.js.map +0 -1
  25. package/dist/chunk-CO23UZAA.js.map +0 -1
  26. package/dist/chunk-LOYPSIE7.js.map +0 -1
  27. package/dist/studio/assets/index-DBSSri9Q.js +0 -116
  28. /package/dist/{artifact-writer-FZ5RUHWC.js.map → artifact-writer-VDF7KRWL.js.map} +0 -0
  29. /package/dist/{chunk-IJPWTVDU.js.map → chunk-2ZEY3WBH.js.map} +0 -0
  30. /package/dist/{dist-CRYAFKLS.js.map → dist-GICSKMNP.js.map} +0 -0
  31. /package/dist/{interactive-QBLQNYDH.js.map → interactive-GIDBBDYZ.js.map} +0 -0
  32. /package/dist/{ts-eval-loader-XR6DNOZ3-GA7B5N26.js.map → ts-eval-loader-Z6IUSDNA-YBOE4JIQ.js.map} +0 -0
@@ -6037,7 +6037,7 @@ async function expandFileReferences(tests, evalFileDir) {
6037
6037
  return expanded;
6038
6038
  }
6039
6039
 
6040
- // ../../packages/core/dist/chunk-A27NE3R7.js
6040
+ // ../../packages/core/dist/chunk-N5EU446L.js
6041
6041
  import path46 from "node:path";
6042
6042
  import { pathToFileURL as pathToFileURL2 } from "node:url";
6043
6043
  import { existsSync as existsSync6 } from "node:fs";
@@ -18704,7 +18704,7 @@ var RequestError = class _RequestError extends Error {
18704
18704
  }
18705
18705
  };
18706
18706
 
18707
- // ../../packages/core/dist/chunk-A27NE3R7.js
18707
+ // ../../packages/core/dist/chunk-N5EU446L.js
18708
18708
  import { exec as execCallback } from "node:child_process";
18709
18709
  import { readdirSync, statSync } from "node:fs";
18710
18710
  import { readFile as readFile22, readdir as readdir2, stat as stat2 } from "node:fs/promises";
@@ -19026,32 +19026,31 @@ function validateConcurrency(concurrency) {
19026
19026
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
19027
19027
  }
19028
19028
  }
19029
- var logged = false;
19029
+ function readEnvPath(name) {
19030
+ const value = process.env[name];
19031
+ if (!value || value === "undefined") return void 0;
19032
+ return value;
19033
+ }
19030
19034
  function getAgentvConfigDir() {
19031
- return path4.join(os.homedir(), ".agentv");
19035
+ return readEnvPath("AGENTV_HOME") ?? path4.join(os.homedir(), ".agentv");
19032
19036
  }
19033
19037
  function getAgentvHome() {
19034
- const envHome = process.env.AGENTV_HOME;
19035
- if (envHome && envHome !== "undefined") {
19036
- if (!logged) {
19037
- logged = true;
19038
- console.log(`Using AGENTV_HOME: ${envHome}`);
19039
- }
19040
- return envHome;
19041
- }
19042
- return path4.join(os.homedir(), ".agentv");
19038
+ return getAgentvConfigDir();
19039
+ }
19040
+ function getAgentvDataDir() {
19041
+ return readEnvPath("AGENTV_DATA_DIR") ?? getAgentvConfigDir();
19043
19042
  }
19044
19043
  function getWorkspacesRoot() {
19045
- return path4.join(getAgentvHome(), "workspaces");
19044
+ return path4.join(getAgentvDataDir(), "workspaces");
19046
19045
  }
19047
19046
  function getSubagentsRoot() {
19048
- return path4.join(getAgentvHome(), "subagents");
19047
+ return path4.join(getAgentvDataDir(), "subagents");
19049
19048
  }
19050
19049
  function getTraceStateRoot() {
19051
- return path4.join(getAgentvHome(), "trace-state");
19050
+ return path4.join(getAgentvDataDir(), "trace-state");
19052
19051
  }
19053
19052
  function getWorkspacePoolRoot() {
19054
- return path4.join(getAgentvHome(), "workspace-pool");
19053
+ return path4.join(getAgentvDataDir(), "workspace-pool");
19055
19054
  }
19056
19055
  var DEFAULT_MAX_CALLS = 50;
19057
19056
  async function createTargetProxy(options) {
@@ -27514,7 +27513,7 @@ async function promptInstall() {
27514
27513
  }
27515
27514
  }
27516
27515
  function findManagedSdkInstallRoot() {
27517
- return path16.join(getAgentvHome(), "deps", "pi-sdk");
27516
+ return path16.join(getAgentvDataDir(), "deps", "pi-sdk");
27518
27517
  }
27519
27518
  function resolveGlobalNpmRoot() {
27520
27519
  try {
@@ -31111,48 +31110,52 @@ async function loadConfig(evalFilePath, repoRoot) {
31111
31110
  if (!await fileExists3(configPath)) {
31112
31111
  continue;
31113
31112
  }
31114
- try {
31115
- const rawConfig = await readFile10(configPath, "utf8");
31116
- const parsed = interpolateEnv(parseYamlValue(rawConfig), process.env);
31117
- if (!isJsonObject(parsed)) {
31118
- logWarning(`Invalid .agentv/config.yaml format at ${configPath}`);
31119
- continue;
31120
- }
31121
- const config2 = parsed;
31122
- const requiredVersion = parsed.required_version;
31123
- if (requiredVersion !== void 0 && typeof requiredVersion !== "string") {
31124
- logWarning(`Invalid required_version in ${configPath}, expected string`);
31125
- continue;
31126
- }
31127
- const evalPatterns = config2.eval_patterns;
31128
- if (evalPatterns !== void 0 && !Array.isArray(evalPatterns)) {
31129
- logWarning(`Invalid eval_patterns in ${configPath}, expected array`);
31130
- continue;
31131
- }
31132
- if (Array.isArray(evalPatterns) && !evalPatterns.every((p) => typeof p === "string")) {
31133
- logWarning(`Invalid eval_patterns in ${configPath}, all entries must be strings`);
31134
- continue;
31135
- }
31136
- const executionDefaults = parseExecutionDefaults(
31137
- parsed.execution,
31138
- configPath
31139
- );
31140
- const results = parseResultsConfig(parsed.results, configPath);
31141
- const hooks = parseHooksConfig(parsed.hooks, configPath);
31142
- return {
31143
- required_version: requiredVersion,
31144
- eval_patterns: evalPatterns,
31145
- execution: executionDefaults,
31146
- results,
31147
- ...hooks && { hooks }
31148
- };
31149
- } catch (error40) {
31150
- logWarning(
31151
- `Could not read .agentv/config.yaml at ${configPath}: ${error40.message}`
31152
- );
31153
- }
31113
+ const config2 = await readConfigFile(configPath);
31114
+ if (config2) return config2;
31115
+ }
31116
+ const globalConfigPath = path39.join(getAgentvConfigDir(), "config.yaml");
31117
+ return await fileExists3(globalConfigPath) ? readConfigFile(globalConfigPath) : null;
31118
+ }
31119
+ async function readConfigFile(configPath) {
31120
+ try {
31121
+ const rawConfig = await readFile10(configPath, "utf8");
31122
+ const parsed = interpolateEnv(parseYamlValue(rawConfig), process.env);
31123
+ if (!isJsonObject(parsed)) {
31124
+ logWarning(`Invalid config.yaml format at ${configPath}`);
31125
+ return null;
31126
+ }
31127
+ const config2 = parsed;
31128
+ const requiredVersion = parsed.required_version;
31129
+ if (requiredVersion !== void 0 && typeof requiredVersion !== "string") {
31130
+ logWarning(`Invalid required_version in ${configPath}, expected string`);
31131
+ return null;
31132
+ }
31133
+ const evalPatterns = config2.eval_patterns;
31134
+ if (evalPatterns !== void 0 && !Array.isArray(evalPatterns)) {
31135
+ logWarning(`Invalid eval_patterns in ${configPath}, expected array`);
31136
+ return null;
31137
+ }
31138
+ if (Array.isArray(evalPatterns) && !evalPatterns.every((p) => typeof p === "string")) {
31139
+ logWarning(`Invalid eval_patterns in ${configPath}, all entries must be strings`);
31140
+ return null;
31141
+ }
31142
+ const executionDefaults = parseExecutionDefaults(
31143
+ parsed.execution,
31144
+ configPath
31145
+ );
31146
+ const results = parseResultsConfig(parsed.results, configPath);
31147
+ const hooks = parseHooksConfig(parsed.hooks, configPath);
31148
+ return {
31149
+ required_version: requiredVersion,
31150
+ eval_patterns: evalPatterns,
31151
+ execution: executionDefaults,
31152
+ results,
31153
+ ...hooks && { hooks }
31154
+ };
31155
+ } catch (error40) {
31156
+ logWarning(`Could not read config.yaml at ${configPath}: ${error40.message}`);
31157
+ return null;
31154
31158
  }
31155
- return null;
31156
31159
  }
31157
31160
  function extractTargetFromSuite(suite) {
31158
31161
  const execution = suite.execution;
@@ -34150,7 +34153,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
34150
34153
  return { tests: await loadTestsFromAgentSkills(evalFilePath) };
34151
34154
  }
34152
34155
  if (format === "typescript") {
34153
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-XR6DNOZ3-GA7B5N26.js");
34156
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-Z6IUSDNA-YBOE4JIQ.js");
34154
34157
  return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
34155
34158
  }
34156
34159
  const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
@@ -34185,7 +34188,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
34185
34188
  return loadTestsFromAgentSkills(evalFilePath);
34186
34189
  }
34187
34190
  if (format === "typescript") {
34188
- const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-XR6DNOZ3-GA7B5N26.js");
34191
+ const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-Z6IUSDNA-YBOE4JIQ.js");
34189
34192
  const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
34190
34193
  return suite.tests;
34191
34194
  }
@@ -37965,6 +37968,7 @@ export {
37965
37968
  negateScore,
37966
37969
  getAgentvConfigDir,
37967
37970
  getAgentvHome,
37971
+ getAgentvDataDir,
37968
37972
  getWorkspacesRoot,
37969
37973
  getSubagentsRoot,
37970
37974
  getTraceStateRoot,
@@ -38085,4 +38089,4 @@ export {
38085
38089
  loadTsEvalFile,
38086
38090
  loadTsEvalSuite
38087
38091
  };
38088
- //# sourceMappingURL=chunk-377GONL7.js.map
38092
+ //# sourceMappingURL=chunk-TAZBCVEZ.js.map