agentv 2.11.0 → 2.11.2

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 (27) hide show
  1. package/dist/{chunk-GO7OTNQ4.js → chunk-IL7CRMY6.js} +20 -9
  2. package/dist/chunk-IL7CRMY6.js.map +1 -0
  3. package/dist/{chunk-EXJWRKKL.js → chunk-MQIQH5LB.js} +90 -7
  4. package/dist/chunk-MQIQH5LB.js.map +1 -0
  5. package/dist/{chunk-CVC3VMZ3.js → chunk-SNABHVUB.js} +66 -19
  6. package/dist/chunk-SNABHVUB.js.map +1 -0
  7. package/dist/cli.js +3 -3
  8. package/dist/{dist-NYXYDALF.js → dist-OVEHXEXC.js} +2 -2
  9. package/dist/index.js +3 -3
  10. package/dist/{interactive-V4A3RRU3.js → interactive-7NQRG7GK.js} +3 -3
  11. package/package.json +1 -1
  12. package/dist/chunk-CVC3VMZ3.js.map +0 -1
  13. package/dist/chunk-EXJWRKKL.js.map +0 -1
  14. package/dist/chunk-GO7OTNQ4.js.map +0 -1
  15. package/dist/templates/.agents/skills/agentv-chat-to-eval/README.md +0 -84
  16. package/dist/templates/.agents/skills/agentv-chat-to-eval/SKILL.md +0 -144
  17. package/dist/templates/.agents/skills/agentv-chat-to-eval/examples/transcript-json.md +0 -67
  18. package/dist/templates/.agents/skills/agentv-chat-to-eval/examples/transcript-markdown.md +0 -101
  19. package/dist/templates/.agents/skills/agentv-eval-builder/SKILL.md +0 -458
  20. package/dist/templates/.agents/skills/agentv-eval-builder/references/config-schema.json +0 -36
  21. package/dist/templates/.agents/skills/agentv-eval-builder/references/custom-evaluators.md +0 -118
  22. package/dist/templates/.agents/skills/agentv-eval-builder/references/eval-schema.json +0 -12753
  23. package/dist/templates/.agents/skills/agentv-eval-builder/references/rubric-evaluator.md +0 -77
  24. package/dist/templates/.agents/skills/agentv-eval-orchestrator/SKILL.md +0 -50
  25. package/dist/templates/.agents/skills/agentv-prompt-optimizer/SKILL.md +0 -78
  26. /package/dist/{dist-NYXYDALF.js.map → dist-OVEHXEXC.js.map} +0 -0
  27. /package/dist/{interactive-V4A3RRU3.js.map → interactive-7NQRG7GK.js.map} +0 -0
@@ -10,7 +10,7 @@ import {
10
10
  validateEvalFile,
11
11
  validateFileReferences,
12
12
  validateTargetsFile
13
- } from "./chunk-GO7OTNQ4.js";
13
+ } from "./chunk-IL7CRMY6.js";
14
14
  import {
15
15
  RepoManager,
16
16
  assembleLlmJudgePrompt,
@@ -25,7 +25,7 @@ import {
25
25
  toCamelCaseDeep,
26
26
  toSnakeCaseDeep,
27
27
  trimBaselineResult
28
- } from "./chunk-EXJWRKKL.js";
28
+ } from "./chunk-MQIQH5LB.js";
29
29
  import {
30
30
  __commonJS,
31
31
  __esm,
@@ -2878,7 +2878,7 @@ function oneOf(literals) {
2878
2878
  // package.json
2879
2879
  var package_default = {
2880
2880
  name: "agentv",
2881
- version: "2.11.0",
2881
+ version: "2.11.2",
2882
2882
  description: "CLI entry point for AgentV",
2883
2883
  type: "module",
2884
2884
  repository: {
@@ -2925,6 +2925,52 @@ var package_default = {
2925
2925
  }
2926
2926
  };
2927
2927
 
2928
+ // src/commands/cache/add.ts
2929
+ import { existsSync } from "node:fs";
2930
+ import { join, resolve } from "node:path";
2931
+ var addCommand = command({
2932
+ name: "add",
2933
+ description: "Seed cache from a local git repository",
2934
+ args: {
2935
+ url: option({
2936
+ long: "url",
2937
+ description: "Remote URL to associate with the cache entry",
2938
+ type: string
2939
+ }),
2940
+ from: option({
2941
+ long: "from",
2942
+ description: "Path to local git repository to clone from",
2943
+ type: string
2944
+ }),
2945
+ force: flag({
2946
+ long: "force",
2947
+ short: "f",
2948
+ description: "Overwrite existing cache entry"
2949
+ })
2950
+ },
2951
+ handler: async ({ url, from, force }) => {
2952
+ const localPath = resolve(from);
2953
+ if (!existsSync(localPath)) {
2954
+ console.error(`Error: local path does not exist: ${localPath}`);
2955
+ process.exit(1);
2956
+ }
2957
+ if (!existsSync(join(localPath, ".git")) && !existsSync(join(localPath, "HEAD"))) {
2958
+ console.error(`Error: ${localPath} does not appear to be a git repository`);
2959
+ process.exit(1);
2960
+ }
2961
+ const manager = new RepoManager();
2962
+ try {
2963
+ const cachePath = await manager.seedCache(localPath, url, { force });
2964
+ console.log(`Cache seeded from ${localPath}`);
2965
+ console.log(` Remote URL: ${url}`);
2966
+ console.log(` Cache path: ${cachePath}`);
2967
+ } catch (err2) {
2968
+ console.error(`Error: ${err2 instanceof Error ? err2.message : err2}`);
2969
+ process.exit(1);
2970
+ }
2971
+ }
2972
+ });
2973
+
2928
2974
  // src/commands/cache/index.ts
2929
2975
  var cleanCommand = command({
2930
2976
  name: "clean",
@@ -2940,8 +2986,8 @@ var cleanCommand = command({
2940
2986
  if (!force) {
2941
2987
  const readline2 = await import("node:readline");
2942
2988
  const rl = readline2.createInterface({ input: process.stdin, output: process.stdout });
2943
- const answer = await new Promise((resolve) => {
2944
- rl.question("Remove all cached git repos from ~/.agentv/git-cache/? [y/N] ", resolve);
2989
+ const answer = await new Promise((resolve2) => {
2990
+ rl.question("Remove all cached git repos from ~/.agentv/git-cache/? [y/N] ", resolve2);
2945
2991
  });
2946
2992
  rl.close();
2947
2993
  if (answer.toLowerCase() !== "y") {
@@ -2958,6 +3004,7 @@ var cacheCommand = subcommands({
2958
3004
  name: "cache",
2959
3005
  description: "Manage AgentV cache",
2960
3006
  cmds: {
3007
+ add: addCommand,
2961
3008
  clean: cleanCommand
2962
3009
  }
2963
3010
  });
@@ -4080,7 +4127,7 @@ var evalRunCommand = command({
4080
4127
  },
4081
4128
  handler: async (args) => {
4082
4129
  if (args.evalPaths.length === 0 && process.stdin.isTTY) {
4083
- const { launchInteractiveWizard } = await import("./interactive-V4A3RRU3.js");
4130
+ const { launchInteractiveWizard } = await import("./interactive-7NQRG7GK.js");
4084
4131
  await launchInteractiveWizard();
4085
4132
  return;
4086
4133
  }
@@ -4298,7 +4345,7 @@ var generateCommand = subcommands({
4298
4345
  });
4299
4346
 
4300
4347
  // src/commands/init/index.ts
4301
- import { existsSync, mkdirSync, writeFileSync as writeFileSync2 } from "node:fs";
4348
+ import { existsSync as existsSync2, mkdirSync, writeFileSync as writeFileSync2 } from "node:fs";
4302
4349
  import path5 from "node:path";
4303
4350
  import * as readline from "node:readline/promises";
4304
4351
 
@@ -4368,14 +4415,14 @@ async function initCommand(options = {}) {
4368
4415
  const existingFiles = [];
4369
4416
  if (envTemplate) {
4370
4417
  const envFilePath = path5.join(targetPath, ".env.example");
4371
- if (existsSync(envFilePath)) {
4418
+ if (existsSync2(envFilePath)) {
4372
4419
  existingFiles.push(".env.example");
4373
4420
  }
4374
4421
  }
4375
- if (existsSync(agentvDir)) {
4422
+ if (existsSync2(agentvDir)) {
4376
4423
  for (const template of otherAgentvTemplates) {
4377
4424
  const targetFilePath = path5.join(agentvDir, template.path);
4378
- if (existsSync(targetFilePath)) {
4425
+ if (existsSync2(targetFilePath)) {
4379
4426
  existingFiles.push(path5.relative(targetPath, targetFilePath));
4380
4427
  }
4381
4428
  }
@@ -4394,7 +4441,7 @@ async function initCommand(options = {}) {
4394
4441
  }
4395
4442
  console.log();
4396
4443
  }
4397
- if (!existsSync(agentvDir)) {
4444
+ if (!existsSync2(agentvDir)) {
4398
4445
  mkdirSync(agentvDir, { recursive: true });
4399
4446
  }
4400
4447
  if (envTemplate) {
@@ -4405,7 +4452,7 @@ async function initCommand(options = {}) {
4405
4452
  for (const template of otherAgentvTemplates) {
4406
4453
  const targetFilePath = path5.join(agentvDir, template.path);
4407
4454
  const targetDirPath = path5.dirname(targetFilePath);
4408
- if (!existsSync(targetDirPath)) {
4455
+ if (!existsSync2(targetDirPath)) {
4409
4456
  mkdirSync(targetDirPath, { recursive: true });
4410
4457
  }
4411
4458
  writeFileSync2(targetFilePath, template.content, "utf-8");
@@ -4459,7 +4506,7 @@ function detectPackageManager() {
4459
4506
  return detectPackageManagerFromPath(process.argv[1] ?? "");
4460
4507
  }
4461
4508
  function runCommand(cmd, args) {
4462
- return new Promise((resolve, reject) => {
4509
+ return new Promise((resolve2, reject) => {
4463
4510
  const child = spawn(cmd, args, { stdio: ["inherit", "pipe", "inherit"], shell: true });
4464
4511
  let stdout = "";
4465
4512
  child.stdout?.on("data", (data) => {
@@ -4467,7 +4514,7 @@ function runCommand(cmd, args) {
4467
4514
  stdout += data.toString();
4468
4515
  });
4469
4516
  child.on("error", reject);
4470
- child.on("close", (code) => resolve({ exitCode: code ?? 1, stdout }));
4517
+ child.on("close", (code) => resolve2({ exitCode: code ?? 1, stdout }));
4471
4518
  });
4472
4519
  }
4473
4520
  var updateCommand = command({
@@ -5638,13 +5685,13 @@ var validateCommand = command({
5638
5685
  import { spawn as spawn2 } from "node:child_process";
5639
5686
  import { readFile as readFile3 } from "node:fs/promises";
5640
5687
  import { homedir } from "node:os";
5641
- import { join } from "node:path";
5688
+ import { join as join2 } from "node:path";
5642
5689
  var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
5643
- var AGENTV_DIR = join(homedir(), ".agentv");
5690
+ var AGENTV_DIR = join2(homedir(), ".agentv");
5644
5691
  var CACHE_FILE = "version-check.json";
5645
5692
  var NPM_REGISTRY_URL = "https://registry.npmjs.org/agentv/latest";
5646
5693
  async function getCachedUpdateInfo(path8) {
5647
- const filePath = path8 ?? join(AGENTV_DIR, CACHE_FILE);
5694
+ const filePath = path8 ?? join2(AGENTV_DIR, CACHE_FILE);
5648
5695
  try {
5649
5696
  const raw = await readFile3(filePath, "utf-8");
5650
5697
  const data = JSON.parse(raw);
@@ -5678,7 +5725,7 @@ function buildNotice(currentVersion, latestVersion) {
5678
5725
  }
5679
5726
  function backgroundUpdateCheck() {
5680
5727
  const dir = AGENTV_DIR;
5681
- const filePath = join(dir, CACHE_FILE);
5728
+ const filePath = join2(dir, CACHE_FILE);
5682
5729
  const script = `
5683
5730
  const https = require('https');
5684
5731
  const fs = require('fs');
@@ -5784,4 +5831,4 @@ export {
5784
5831
  preprocessArgv,
5785
5832
  runCli
5786
5833
  };
5787
- //# sourceMappingURL=chunk-CVC3VMZ3.js.map
5834
+ //# sourceMappingURL=chunk-SNABHVUB.js.map