agentv 4.24.0 → 4.24.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 (26) hide show
  1. package/dist/{artifact-writer-7CKE5ILM.js → artifact-writer-SHHWQAXG.js} +4 -4
  2. package/dist/{chunk-D5HCHBPT.js → chunk-5CC472UM.js} +3 -5
  3. package/dist/{chunk-D5HCHBPT.js.map → chunk-5CC472UM.js.map} +1 -1
  4. package/dist/{chunk-EFA3SBAY.js → chunk-B4Y5U75M.js} +47 -17
  5. package/dist/chunk-B4Y5U75M.js.map +1 -0
  6. package/dist/{chunk-KTHVVL7Q.js → chunk-OQKETJT6.js} +3 -3
  7. package/dist/{chunk-NM4NQSUT.js → chunk-VQIZ5FIV.js} +6 -6
  8. package/dist/{chunk-HL3MTSIW.js → chunk-XGWXNNH6.js} +7 -7
  9. package/dist/{chunk-HL3MTSIW.js.map → chunk-XGWXNNH6.js.map} +1 -1
  10. package/dist/cli.js +5 -5
  11. package/dist/{dist-IA3D556U.js → dist-AWHCD22R.js} +3 -3
  12. package/dist/index.js +5 -5
  13. package/dist/{interactive-4NRIFB5R.js → interactive-KPCZ6YIR.js} +5 -5
  14. package/dist/studio/assets/{index-jBBmFdWd.js → index-8Vc4sq0b.js} +1 -1
  15. package/dist/studio/assets/index-C25w7gi1.js +116 -0
  16. package/dist/studio/index.html +1 -1
  17. package/dist/{ts-eval-loader-SYQYQPMC-FKU23VX3.js → ts-eval-loader-F7Y5QBKH-RTDAVGXO.js} +2 -2
  18. package/package.json +1 -1
  19. package/dist/chunk-EFA3SBAY.js.map +0 -1
  20. package/dist/studio/assets/index-DZpM1lzZ.js +0 -116
  21. /package/dist/{artifact-writer-7CKE5ILM.js.map → artifact-writer-SHHWQAXG.js.map} +0 -0
  22. /package/dist/{chunk-KTHVVL7Q.js.map → chunk-OQKETJT6.js.map} +0 -0
  23. /package/dist/{chunk-NM4NQSUT.js.map → chunk-VQIZ5FIV.js.map} +0 -0
  24. /package/dist/{dist-IA3D556U.js.map → dist-AWHCD22R.js.map} +0 -0
  25. /package/dist/{interactive-4NRIFB5R.js.map → interactive-KPCZ6YIR.js.map} +0 -0
  26. /package/dist/{ts-eval-loader-SYQYQPMC-FKU23VX3.js.map → ts-eval-loader-F7Y5QBKH-RTDAVGXO.js.map} +0 -0
@@ -15,7 +15,7 @@ import {
15
15
  resolveWorkspaceOrFilePath,
16
16
  toSnakeCaseDeep,
17
17
  writeArtifactsFromResults
18
- } from "./chunk-KTHVVL7Q.js";
18
+ } from "./chunk-OQKETJT6.js";
19
19
  import {
20
20
  ResponseCache,
21
21
  RunBudgetTracker,
@@ -31,7 +31,7 @@ import {
31
31
  shouldSkipCacheForTemperature,
32
32
  stageResultsArtifacts,
33
33
  syncResultsRepo
34
- } from "./chunk-D5HCHBPT.js";
34
+ } from "./chunk-5CC472UM.js";
35
35
  import {
36
36
  CLI_PLACEHOLDERS,
37
37
  COMMON_TARGET_SETTINGS,
@@ -63,7 +63,7 @@ import {
63
63
  subscribeToCopilotSdkLogEntries,
64
64
  subscribeToPiLogEntries,
65
65
  toCamelCaseDeep
66
- } from "./chunk-HL3MTSIW.js";
66
+ } from "./chunk-XGWXNNH6.js";
67
67
 
68
68
  // src/commands/eval/shared.ts
69
69
  import { constants } from "node:fs";
@@ -179,7 +179,7 @@ async function findRepoRoot(start) {
179
179
  // package.json
180
180
  var package_default = {
181
181
  name: "agentv",
182
- version: "4.24.0",
182
+ version: "4.24.1",
183
183
  description: "CLI entry point for AgentV",
184
184
  type: "module",
185
185
  repository: {
@@ -287,7 +287,7 @@ async function discoverTargetsFile(options) {
287
287
  }
288
288
 
289
289
  // src/commands/eval/run-eval.ts
290
- import { constants as constants4, existsSync as existsSync2, mkdirSync } from "node:fs";
290
+ import { constants as constants4, existsSync as existsSync3, mkdirSync } from "node:fs";
291
291
  import { access as access5, readFile as readFile8 } from "node:fs/promises";
292
292
  import path15 from "node:path";
293
293
  import { pathToFileURL } from "node:url";
@@ -297,7 +297,9 @@ import { coerce, major, satisfies, validRange } from "semver";
297
297
 
298
298
  // src/self-update.ts
299
299
  import { spawn } from "node:child_process";
300
+ import { existsSync } from "node:fs";
300
301
  import { get } from "node:https";
302
+ import { basename, dirname, join, win32 } from "node:path";
301
303
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/agentv/latest";
302
304
  function detectPackageManagerFromPath(scriptPath) {
303
305
  if (scriptPath.includes(".bun")) {
@@ -360,14 +362,42 @@ function getInstallArgs(pm, versionSpec, scope) {
360
362
  const baseCmd = pm === "npm" ? "install" : "add";
361
363
  return scope === "global" ? [baseCmd, "-g", pkg] : [baseCmd, pkg];
362
364
  }
365
+ function findBundledNpmCli(execPath, platform, exists) {
366
+ const pathApi = platform === "win32" ? win32 : { dirname, join };
367
+ const execDir = pathApi.dirname(execPath);
368
+ const candidates = platform === "win32" ? [pathApi.join(execDir, "node_modules", "npm", "bin", "npm-cli.js")] : [
369
+ pathApi.join(execDir, "..", "lib", "node_modules", "npm", "bin", "npm-cli.js"),
370
+ pathApi.join(execDir, "node_modules", "npm", "bin", "npm-cli.js")
371
+ ];
372
+ return candidates.find((candidate) => exists(candidate));
373
+ }
374
+ function resolvePackageManagerCommand(pm, args, options) {
375
+ const execPath = options?.execPath ?? process.execPath;
376
+ const platform = options?.platform ?? process.platform;
377
+ const exists = options?.exists ?? existsSync;
378
+ const pathApi = platform === "win32" ? win32 : { basename };
379
+ if (pm === "bun") {
380
+ const runtimeName = pathApi.basename(execPath).toLowerCase();
381
+ if ((runtimeName === "bun" || runtimeName === "bun.exe") && exists(execPath)) {
382
+ return { cmd: execPath, args };
383
+ }
384
+ return { cmd: "bun", args };
385
+ }
386
+ const npmCliPath = findBundledNpmCli(execPath, platform, exists);
387
+ if (npmCliPath) {
388
+ return { cmd: execPath, args: [npmCliPath, ...args] };
389
+ }
390
+ return { cmd: "npm", args };
391
+ }
363
392
  async function performSelfUpdate(options) {
364
393
  const pm = options?.pm ?? detectPackageManager();
365
394
  const currentVersion = options?.currentVersion ?? "unknown";
366
395
  const versionSpec = options?.versionRange ?? "latest";
367
396
  const scope = options?.scope ?? detectInstallScope();
368
397
  const args = getInstallArgs(pm, versionSpec, scope);
398
+ const command = resolvePackageManagerCommand(pm, args);
369
399
  try {
370
- const result = await runCommand(pm, args);
400
+ const result = await runCommand(command.cmd, command.args);
371
401
  if (result.exitCode !== 0) {
372
402
  return { success: false, currentVersion, scope };
373
403
  }
@@ -475,7 +505,7 @@ import { readFileSync as readFileSync2, readdirSync, statSync } from "node:fs";
475
505
  import path4 from "node:path";
476
506
 
477
507
  // src/commands/results/manifest.ts
478
- import { existsSync, readFileSync } from "node:fs";
508
+ import { existsSync as existsSync2, readFileSync } from "node:fs";
479
509
  import path3 from "node:path";
480
510
  function parseJsonlLines(content) {
481
511
  return content.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0).map((line) => JSON.parse(line));
@@ -496,7 +526,7 @@ function readOptionalText(baseDir, relativePath) {
496
526
  return void 0;
497
527
  }
498
528
  const absolutePath = path3.join(baseDir, relativePath);
499
- if (!existsSync(absolutePath)) {
529
+ if (!existsSync2(absolutePath)) {
500
530
  return void 0;
501
531
  }
502
532
  return readFileSync(absolutePath, "utf8");
@@ -2822,16 +2852,16 @@ async function detectFileType(filePath) {
2822
2852
  }
2823
2853
  function inferFileTypeFromPath(filePath) {
2824
2854
  const normalized = path14.normalize(filePath).replace(/\\/g, "/");
2825
- const basename = path14.basename(filePath);
2855
+ const basename2 = path14.basename(filePath);
2826
2856
  if (normalized.includes("/.agentv/")) {
2827
- if (basename === "config.yaml" || basename === "config.yml") {
2857
+ if (basename2 === "config.yaml" || basename2 === "config.yml") {
2828
2858
  return "config";
2829
2859
  }
2830
- if (basename === "targets.yaml" || basename === "targets.yml") {
2860
+ if (basename2 === "targets.yaml" || basename2 === "targets.yml") {
2831
2861
  return "targets";
2832
2862
  }
2833
2863
  }
2834
- const lower = basename.toLowerCase();
2864
+ const lower = basename2.toLowerCase();
2835
2865
  if (lower.endsWith(".eval.yaml") || lower.endsWith(".eval.yml")) {
2836
2866
  return "eval";
2837
2867
  }
@@ -5361,7 +5391,7 @@ async function runEvalCommand(input) {
5361
5391
  const explicitResumeDir = options.outputDir ?? options.artifacts;
5362
5392
  if (explicitResumeDir) {
5363
5393
  const resumeIndexPath = path15.join(path15.resolve(explicitResumeDir), "index.jsonl");
5364
- if (existsSync2(resumeIndexPath)) {
5394
+ if (existsSync3(resumeIndexPath)) {
5365
5395
  const content = await readFile8(resumeIndexPath, "utf8");
5366
5396
  const existingResults = parseJsonlResults(content);
5367
5397
  resumeSkipKeys = /* @__PURE__ */ new Set();
@@ -5444,7 +5474,7 @@ async function runEvalCommand(input) {
5444
5474
  const useFileExport = !!options.otelFile;
5445
5475
  if (options.exportOtel || useFileExport) {
5446
5476
  try {
5447
- const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-IA3D556U.js");
5477
+ const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-AWHCD22R.js");
5448
5478
  let endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
5449
5479
  let headers = {};
5450
5480
  if (options.otelBackend) {
@@ -5643,7 +5673,7 @@ async function runEvalCommand(input) {
5643
5673
  const activeTestFiles = resolvedTestFiles.filter((f) => fileMetadata.has(f));
5644
5674
  let transcriptProviderFactory;
5645
5675
  if (options.transcript) {
5646
- const { TranscriptProvider } = await import("./dist-IA3D556U.js");
5676
+ const { TranscriptProvider } = await import("./dist-AWHCD22R.js");
5647
5677
  const transcriptProvider = await TranscriptProvider.fromFile(options.transcript);
5648
5678
  const totalTests = [...fileMetadata.values()].reduce(
5649
5679
  (sum, meta) => sum + meta.testCases.length,
@@ -5812,7 +5842,7 @@ async function runEvalCommand(input) {
5812
5842
  if (usesDefaultArtifactWorkspace && allResults.length > 0) {
5813
5843
  const evalFile = activeTestFiles.length === 1 ? activeTestFiles[0] : "";
5814
5844
  if (isResumeAppend) {
5815
- const { writePerTestArtifacts } = await import("./artifact-writer-7CKE5ILM.js");
5845
+ const { writePerTestArtifacts } = await import("./artifact-writer-SHHWQAXG.js");
5816
5846
  await writePerTestArtifacts(allResults, runDir, {
5817
5847
  experiment: normalizeExperimentName(options.experiment)
5818
5848
  });
@@ -6035,4 +6065,4 @@ export {
6035
6065
  getCategories,
6036
6066
  filterByCategory
6037
6067
  };
6038
- //# sourceMappingURL=chunk-EFA3SBAY.js.map
6068
+ //# sourceMappingURL=chunk-B4Y5U75M.js.map