agentv 4.26.1 → 4.27.0
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.
- package/dist/{chunk-XBUHMRX2.js → chunk-PH5MHKPL.js} +431 -49
- package/dist/chunk-PH5MHKPL.js.map +1 -0
- package/dist/{chunk-JA4WQNE6.js → chunk-VO3THAOI.js} +10 -2
- package/dist/chunk-VO3THAOI.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{interactive-YMKWKPD7.js → interactive-UG4YNLYK.js} +2 -2
- package/dist/skills/agentv-bench/LICENSE.txt +202 -0
- package/dist/skills/agentv-bench/SKILL.md +459 -0
- package/dist/skills/agentv-bench/agents/analyzer.md +177 -0
- package/dist/skills/agentv-bench/agents/comparator.md +247 -0
- package/dist/skills/agentv-bench/agents/executor.md +30 -0
- package/dist/skills/agentv-bench/agents/grader.md +238 -0
- package/dist/skills/agentv-bench/agents/mutator.md +172 -0
- package/dist/skills/agentv-bench/references/autoresearch.md +309 -0
- package/dist/skills/agentv-bench/references/description-optimization.md +66 -0
- package/dist/skills/agentv-bench/references/environment-adaptation.md +82 -0
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +338 -0
- package/dist/skills/agentv-bench/references/migrating-from-skill-creator.md +103 -0
- package/dist/skills/agentv-bench/references/schemas.md +432 -0
- package/dist/skills/agentv-bench/references/subagent-pipeline.md +181 -0
- package/dist/skills/agentv-bench/scripts/trajectory.html +462 -0
- package/dist/skills/agentv-eval-review/SKILL.md +53 -0
- package/dist/skills/agentv-eval-review/scripts/lint_eval.py +239 -0
- package/dist/skills/agentv-eval-writer/SKILL.md +707 -0
- package/dist/skills/agentv-eval-writer/references/config-schema.json +63 -0
- package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +119 -0
- package/dist/skills/agentv-eval-writer/references/eval-schema.json +19077 -0
- package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +114 -0
- package/dist/skills/agentv-governance/SKILL.md +79 -0
- package/dist/skills/agentv-governance/references/eu-ai-act-risk-tiers.md +37 -0
- package/dist/skills/agentv-governance/references/governance-yaml-shape.md +125 -0
- package/dist/skills/agentv-governance/references/iso-42001-controls.md +46 -0
- package/dist/skills/agentv-governance/references/lint-rules.md +169 -0
- package/dist/skills/agentv-governance/references/mitre-atlas.md +38 -0
- package/dist/skills/agentv-governance/references/owasp-agentic-top-10-2025.md +28 -0
- package/dist/skills/agentv-governance/references/owasp-llm-top-10-2025.md +25 -0
- package/dist/skills/agentv-trace-analyst/SKILL.md +161 -0
- package/package.json +1 -1
- package/dist/chunk-JA4WQNE6.js.map +0 -1
- package/dist/chunk-XBUHMRX2.js.map +0 -1
- /package/dist/{interactive-YMKWKPD7.js.map → interactive-UG4YNLYK.js.map} +0 -0
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
validateFileReferences,
|
|
46
46
|
validateTargetsFile,
|
|
47
47
|
validateWorkspacePaths
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VO3THAOI.js";
|
|
49
49
|
import {
|
|
50
50
|
RESULT_INDEX_FILENAME,
|
|
51
51
|
aggregateRunDir,
|
|
@@ -863,7 +863,7 @@ var require_src = __commonJS({
|
|
|
863
863
|
});
|
|
864
864
|
|
|
865
865
|
// src/index.ts
|
|
866
|
-
import
|
|
866
|
+
import path27 from "node:path";
|
|
867
867
|
|
|
868
868
|
// ../../node_modules/.bun/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
869
869
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -3997,7 +3997,7 @@ var evalRunCommand = command({
|
|
|
3997
3997
|
},
|
|
3998
3998
|
handler: async (args) => {
|
|
3999
3999
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4000
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4000
|
+
const { launchInteractiveWizard } = await import("./interactive-UG4YNLYK.js");
|
|
4001
4001
|
await launchInteractiveWizard();
|
|
4002
4002
|
return;
|
|
4003
4003
|
}
|
|
@@ -4599,9 +4599,11 @@ function readTemplatesRecursively(dir, relativePath) {
|
|
|
4599
4599
|
// src/commands/init/index.ts
|
|
4600
4600
|
function printSkillFirstInstructions() {
|
|
4601
4601
|
console.log("\nAI-skills-first setup (recommended):");
|
|
4602
|
+
console.log(" agentv skills get agentv-bench");
|
|
4603
|
+
console.log(' Then ask your agent: "Set up AgentV in this repo."');
|
|
4604
|
+
console.log("\nOr install the agentv-dev plugin for automatic skill discovery:");
|
|
4602
4605
|
console.log(" npx allagents plugin marketplace add EntityProcess/agentv");
|
|
4603
4606
|
console.log(" npx allagents plugin install agentv-dev@agentv");
|
|
4604
|
-
console.log(' Then ask your agent: "Set up AgentV in this repo."');
|
|
4605
4607
|
}
|
|
4606
4608
|
async function promptYesNo(message) {
|
|
4607
4609
|
const rl = readline.createInterface({
|
|
@@ -6489,9 +6491,34 @@ var evalInputCommand = command({
|
|
|
6489
6491
|
test_ids: testIds
|
|
6490
6492
|
});
|
|
6491
6493
|
console.log(`Extracted ${testIds.length} test(s) to ${outDir}`);
|
|
6494
|
+
if (targetKind === "agent") {
|
|
6495
|
+
console.log(`
|
|
6496
|
+
Target: ${targetName} (subagent-as-target mode)`);
|
|
6497
|
+
console.log(` Tests: ${testIds.join(", ")}`);
|
|
6498
|
+
console.log("");
|
|
6499
|
+
console.log(" Next steps for the orchestrating agent:");
|
|
6500
|
+
console.log(" 1. Dispatch executor subagents \u2014 one per test case (all in parallel):");
|
|
6501
|
+
console.log(" - Each reads <run-dir>/<test-id>/input.json");
|
|
6502
|
+
console.log(" - Executes the task, writes <run-dir>/<test-id>/response.md");
|
|
6503
|
+
console.log(" 2. Run code graders: agentv pipeline grade <run-dir>");
|
|
6504
|
+
console.log(
|
|
6505
|
+
" 3. Dispatch grader subagents \u2014 one per (test \xD7 LLM grader) pair (all in parallel):"
|
|
6506
|
+
);
|
|
6507
|
+
console.log(
|
|
6508
|
+
" - Read agents/grader.md and embed its content as system instructions in each subagent prompt"
|
|
6509
|
+
);
|
|
6510
|
+
console.log(" - Each subagent reads llm_graders/<name>.json + response.md for its test");
|
|
6511
|
+
console.log(" - Each writes llm_grader_results/<name>.json");
|
|
6512
|
+
console.log(" 4. Merge scores: agentv pipeline bench <run-dir>");
|
|
6513
|
+
console.log("");
|
|
6514
|
+
console.log(" For the full procedure:");
|
|
6515
|
+
console.log(" agentv skills get agentv-bench --ref subagent-pipeline");
|
|
6516
|
+
console.log("");
|
|
6517
|
+
}
|
|
6492
6518
|
}
|
|
6493
6519
|
});
|
|
6494
6520
|
async function writeGraderConfigs(testDir, assertions, evalDir) {
|
|
6521
|
+
const counts = { codeGraders: 0, llmGraders: 0, builtinAssertions: 0 };
|
|
6495
6522
|
const codeGradersDir = join3(testDir, "code_graders");
|
|
6496
6523
|
const llmGradersDir = join3(testDir, "llm_graders");
|
|
6497
6524
|
let hasCodeGraders = false;
|
|
@@ -6527,9 +6554,19 @@ async function writeGraderConfigs(testDir, assertions, evalDir) {
|
|
|
6527
6554
|
} else if (typeof config.prompt === "string") {
|
|
6528
6555
|
promptContent = config.prompt;
|
|
6529
6556
|
}
|
|
6557
|
+
const rubrics = config.rubrics;
|
|
6558
|
+
const rubricsData = rubrics?.map((r) => ({
|
|
6559
|
+
id: r.id,
|
|
6560
|
+
outcome: r.outcome,
|
|
6561
|
+
weight: r.weight ?? 1,
|
|
6562
|
+
...r.score_ranges ? { score_range: r.score_ranges } : {},
|
|
6563
|
+
...r.required !== void 0 ? { required: r.required } : {},
|
|
6564
|
+
...r.required_min_score !== void 0 ? { required_min_score: r.required_min_score } : {}
|
|
6565
|
+
}));
|
|
6530
6566
|
await writeJson(join3(llmGradersDir, `${config.name}.json`), {
|
|
6531
6567
|
name: config.name,
|
|
6532
6568
|
prompt_content: promptContent,
|
|
6569
|
+
...rubricsData && rubricsData.length > 0 ? { rubrics: rubricsData } : {},
|
|
6533
6570
|
weight: config.weight ?? 1,
|
|
6534
6571
|
threshold: 0.5,
|
|
6535
6572
|
config: {}
|
|
@@ -6550,6 +6587,7 @@ async function writeGraderConfigs(testDir, assertions, evalDir) {
|
|
|
6550
6587
|
});
|
|
6551
6588
|
}
|
|
6552
6589
|
}
|
|
6590
|
+
return counts;
|
|
6553
6591
|
}
|
|
6554
6592
|
async function writeJson(filePath, data) {
|
|
6555
6593
|
await writeFile7(filePath, `${JSON.stringify(data, null, 2)}
|
|
@@ -6591,7 +6629,7 @@ function loadEnvFile(dir) {
|
|
|
6591
6629
|
}
|
|
6592
6630
|
var evalRunCommand2 = command({
|
|
6593
6631
|
name: "run",
|
|
6594
|
-
description: "Extract inputs, invoke CLI targets, and run code graders
|
|
6632
|
+
description: "Extract inputs, invoke CLI targets, and run code graders (for agent targets, use pipeline input + subagents)",
|
|
6595
6633
|
args: {
|
|
6596
6634
|
evalPath: positional({
|
|
6597
6635
|
type: string,
|
|
@@ -6823,14 +6861,46 @@ var evalRunCommand2 = command({
|
|
|
6823
6861
|
await Promise.all(pending);
|
|
6824
6862
|
process.stderr.write("\n");
|
|
6825
6863
|
} else {
|
|
6826
|
-
console.log("Subagent-as-target mode \u2014
|
|
6864
|
+
console.log("Subagent-as-target mode \u2014 the agent IS the target.");
|
|
6865
|
+
console.log("");
|
|
6866
|
+
console.log(" What happened: pipeline extracted inputs but did NOT invoke a CLI target.");
|
|
6867
|
+
console.log(
|
|
6868
|
+
" The orchestrating agent must dispatch executor subagents to process each test."
|
|
6869
|
+
);
|
|
6870
|
+
console.log("");
|
|
6871
|
+
console.log(" Next steps:");
|
|
6872
|
+
console.log(" 1. Dispatch executor subagents \u2014 one per test case (all in parallel):");
|
|
6873
|
+
console.log(" - Each reads <run-dir>/<test-id>/input.json");
|
|
6874
|
+
console.log(" - Executes the task, writes <run-dir>/<test-id>/response.md");
|
|
6875
|
+
console.log(" 2. Run code graders: agentv pipeline grade <run-dir>");
|
|
6876
|
+
console.log(
|
|
6877
|
+
" 3. Dispatch grader subagents \u2014 one per (test x LLM grader) pair (all in parallel):"
|
|
6878
|
+
);
|
|
6879
|
+
console.log(
|
|
6880
|
+
" - Read agents/grader.md and embed its content as system instructions in each subagent prompt"
|
|
6881
|
+
);
|
|
6882
|
+
console.log(" - Each subagent reads llm_graders/<name>.json + response.md");
|
|
6883
|
+
console.log(" - Each writes llm_grader_results/<name>.json");
|
|
6884
|
+
console.log(" 4. Merge scores: agentv pipeline bench <run-dir>");
|
|
6885
|
+
console.log("");
|
|
6886
|
+
console.log(" For the full procedure:");
|
|
6887
|
+
console.log(" agentv skills get agentv-bench --ref subagent-pipeline");
|
|
6888
|
+
console.log("");
|
|
6827
6889
|
}
|
|
6828
6890
|
if (graderType !== "code") {
|
|
6829
6891
|
console.log(`
|
|
6830
6892
|
Done. Results in ${outDir}`);
|
|
6831
|
-
console.log(
|
|
6832
|
-
|
|
6833
|
-
|
|
6893
|
+
console.log("");
|
|
6894
|
+
if (targetKind === "agent") {
|
|
6895
|
+
console.log(" The agent must now:");
|
|
6896
|
+
console.log(" 1. Dispatch executor subagents to generate response.md files");
|
|
6897
|
+
console.log(" 2. Run code graders: agentv pipeline grade <run-dir>");
|
|
6898
|
+
console.log(" 3. Dispatch grader subagents for llm_graders/ configs");
|
|
6899
|
+
console.log(" 4. Merge scores: agentv pipeline bench <run-dir>");
|
|
6900
|
+
} else {
|
|
6901
|
+
console.log(" To run code graders: agentv pipeline grade <run-dir>");
|
|
6902
|
+
console.log(" Or re-run with --grader-type code to grade inline.");
|
|
6903
|
+
}
|
|
6834
6904
|
return;
|
|
6835
6905
|
}
|
|
6836
6906
|
const graderTasks = [];
|
|
@@ -6856,8 +6926,15 @@ Done. Results in ${outDir}`);
|
|
|
6856
6926
|
const graderConcurrency = workers ?? 10;
|
|
6857
6927
|
const { totalGraders, totalPassed } = await runCodeGraders(graderTasks, graderConcurrency);
|
|
6858
6928
|
console.log(`Graded ${totalGraders} code-grader(s): ${totalPassed} passed`);
|
|
6859
|
-
console.log(
|
|
6860
|
-
|
|
6929
|
+
console.log("");
|
|
6930
|
+
console.log(`Results in ${outDir}`);
|
|
6931
|
+
console.log("");
|
|
6932
|
+
console.log(" Remaining steps:");
|
|
6933
|
+
console.log(" 1. If llm_graders/ configs exist, dispatch grader subagents");
|
|
6934
|
+
console.log(
|
|
6935
|
+
" - Read agents/grader.md, embed as system instructions in each subagent prompt"
|
|
6936
|
+
);
|
|
6937
|
+
console.log(" 2. Merge all scores: agentv pipeline bench <run-dir>");
|
|
6861
6938
|
}
|
|
6862
6939
|
});
|
|
6863
6940
|
async function writeJson2(filePath, data) {
|
|
@@ -6899,9 +6976,19 @@ async function writeGraderConfigs2(testDir, assertions, evalDir) {
|
|
|
6899
6976
|
} else if (typeof config.prompt === "string") {
|
|
6900
6977
|
promptContent = config.prompt;
|
|
6901
6978
|
}
|
|
6979
|
+
const rubrics = config.rubrics;
|
|
6980
|
+
const rubricsData = rubrics?.map((r) => ({
|
|
6981
|
+
id: r.id,
|
|
6982
|
+
outcome: r.outcome,
|
|
6983
|
+
weight: r.weight ?? 1,
|
|
6984
|
+
...r.score_ranges ? { score_range: r.score_ranges } : {},
|
|
6985
|
+
...r.required !== void 0 ? { required: r.required } : {},
|
|
6986
|
+
...r.required_min_score !== void 0 ? { required_min_score: r.required_min_score } : {}
|
|
6987
|
+
}));
|
|
6902
6988
|
await writeJson2(join4(llmGradersDir, `${config.name}.json`), {
|
|
6903
6989
|
name: config.name,
|
|
6904
6990
|
prompt_content: promptContent,
|
|
6991
|
+
...rubricsData && rubricsData.length > 0 ? { rubrics: rubricsData } : {},
|
|
6905
6992
|
weight: config.weight ?? 1,
|
|
6906
6993
|
threshold: 0.5,
|
|
6907
6994
|
config: {}
|
|
@@ -6913,7 +7000,7 @@ async function writeGraderConfigs2(testDir, assertions, evalDir) {
|
|
|
6913
7000
|
// src/commands/pipeline/index.ts
|
|
6914
7001
|
var pipelineCommand = subcommands({
|
|
6915
7002
|
name: "pipeline",
|
|
6916
|
-
description: "
|
|
7003
|
+
description: "Subagent-mode eval pipeline (input \u2192 executor subagents \u2192 grade \u2192 bench) \u2014 use this when the eval target is an AI agent (Claude, Codex, etc.)",
|
|
6917
7004
|
cmds: {
|
|
6918
7005
|
input: evalInputCommand,
|
|
6919
7006
|
grade: evalGradeCommand,
|
|
@@ -11007,9 +11094,302 @@ var selfCommand = subcommands({
|
|
|
11007
11094
|
}
|
|
11008
11095
|
});
|
|
11009
11096
|
|
|
11097
|
+
// src/commands/skills/index.ts
|
|
11098
|
+
import { existsSync as existsSync15, readFileSync as readFileSync13, readdirSync as readdirSync5 } from "node:fs";
|
|
11099
|
+
import path20 from "node:path";
|
|
11100
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
11101
|
+
function isValidSkillsDir(dir) {
|
|
11102
|
+
if (!existsSync15(dir)) return false;
|
|
11103
|
+
try {
|
|
11104
|
+
return readdirSync5(dir, { withFileTypes: true }).some(
|
|
11105
|
+
(e) => e.isDirectory() && existsSync15(path20.join(dir, e.name, "SKILL.md"))
|
|
11106
|
+
);
|
|
11107
|
+
} catch {
|
|
11108
|
+
return false;
|
|
11109
|
+
}
|
|
11110
|
+
}
|
|
11111
|
+
function findSkillsDir() {
|
|
11112
|
+
const selfFile = fileURLToPath4(import.meta.url);
|
|
11113
|
+
let dir = path20.dirname(selfFile);
|
|
11114
|
+
for (let i = 0; i < 6; i++) {
|
|
11115
|
+
const distCandidate = path20.join(dir, "dist", "skills");
|
|
11116
|
+
if (isValidSkillsDir(distCandidate)) return distCandidate;
|
|
11117
|
+
const repoRootCandidate = path20.join(dir, "skills-data");
|
|
11118
|
+
if (isValidSkillsDir(repoRootCandidate)) return repoRootCandidate;
|
|
11119
|
+
const legacyCandidate = path20.join(dir, "skills");
|
|
11120
|
+
if (isValidSkillsDir(legacyCandidate)) return legacyCandidate;
|
|
11121
|
+
dir = path20.dirname(dir);
|
|
11122
|
+
}
|
|
11123
|
+
return null;
|
|
11124
|
+
}
|
|
11125
|
+
function requireSkillsDir() {
|
|
11126
|
+
const dir = findSkillsDir();
|
|
11127
|
+
if (!dir) {
|
|
11128
|
+
console.error(
|
|
11129
|
+
"Error: bundled skills directory not found. This is a build issue \u2014 please reinstall agentv."
|
|
11130
|
+
);
|
|
11131
|
+
process.exit(1);
|
|
11132
|
+
}
|
|
11133
|
+
return dir;
|
|
11134
|
+
}
|
|
11135
|
+
function listSkillNames(skillsDir) {
|
|
11136
|
+
if (!existsSync15(skillsDir)) return [];
|
|
11137
|
+
return readdirSync5(skillsDir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
|
|
11138
|
+
}
|
|
11139
|
+
function readSkillFile(skillDir, relPath) {
|
|
11140
|
+
const full = path20.join(skillDir, relPath);
|
|
11141
|
+
if (!existsSync15(full)) return null;
|
|
11142
|
+
return readFileSync13(full, "utf-8");
|
|
11143
|
+
}
|
|
11144
|
+
function collectDir(dir, prefix = "") {
|
|
11145
|
+
const result = {};
|
|
11146
|
+
if (!existsSync15(dir)) return result;
|
|
11147
|
+
for (const entry of readdirSync5(dir, { withFileTypes: true })) {
|
|
11148
|
+
const relPath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
11149
|
+
if (entry.isDirectory()) {
|
|
11150
|
+
Object.assign(result, collectDir(path20.join(dir, entry.name), relPath));
|
|
11151
|
+
} else {
|
|
11152
|
+
result[relPath] = readFileSync13(path20.join(dir, entry.name), "utf-8");
|
|
11153
|
+
}
|
|
11154
|
+
}
|
|
11155
|
+
return result;
|
|
11156
|
+
}
|
|
11157
|
+
function listSkillSubdirs(skillDir) {
|
|
11158
|
+
if (!existsSync15(skillDir)) return [];
|
|
11159
|
+
return readdirSync5(skillDir, { withFileTypes: true }).filter((e) => e.isDirectory() && !e.name.startsWith(".")).map((e) => e.name).sort();
|
|
11160
|
+
}
|
|
11161
|
+
function readSkill(skillsDir, name, full) {
|
|
11162
|
+
const skillDir = path20.join(skillsDir, name);
|
|
11163
|
+
if (!existsSync15(skillDir)) return null;
|
|
11164
|
+
const content = readSkillFile(skillDir, "SKILL.md");
|
|
11165
|
+
if (content === null) return null;
|
|
11166
|
+
if (!full) return { name, content };
|
|
11167
|
+
const files = {};
|
|
11168
|
+
for (const sub of listSkillSubdirs(skillDir)) {
|
|
11169
|
+
const subDir = path20.join(skillDir, sub);
|
|
11170
|
+
const collected = collectDir(subDir, sub);
|
|
11171
|
+
Object.assign(files, collected);
|
|
11172
|
+
}
|
|
11173
|
+
return { name, content, files: Object.keys(files).length > 0 ? files : void 0 };
|
|
11174
|
+
}
|
|
11175
|
+
function findRefFile(skillDir, refName) {
|
|
11176
|
+
const candidates = refName.endsWith(".md") ? [refName] : [refName, `${refName}.md`];
|
|
11177
|
+
for (const sub of listSkillSubdirs(skillDir)) {
|
|
11178
|
+
for (const candidate of candidates) {
|
|
11179
|
+
const filePath = path20.join(skillDir, sub, candidate);
|
|
11180
|
+
if (existsSync15(filePath)) {
|
|
11181
|
+
return { relPath: `${sub}/${candidate}`, content: readFileSync13(filePath, "utf-8") };
|
|
11182
|
+
}
|
|
11183
|
+
}
|
|
11184
|
+
}
|
|
11185
|
+
for (const candidate of candidates) {
|
|
11186
|
+
const filePath = path20.join(skillDir, candidate);
|
|
11187
|
+
if (existsSync15(filePath)) {
|
|
11188
|
+
return { relPath: candidate, content: readFileSync13(filePath, "utf-8") };
|
|
11189
|
+
}
|
|
11190
|
+
}
|
|
11191
|
+
return null;
|
|
11192
|
+
}
|
|
11193
|
+
function listRefFiles(skillDir) {
|
|
11194
|
+
const out = [];
|
|
11195
|
+
for (const sub of listSkillSubdirs(skillDir)) {
|
|
11196
|
+
const subDir = path20.join(skillDir, sub);
|
|
11197
|
+
for (const entry of readdirSync5(subDir, { withFileTypes: true })) {
|
|
11198
|
+
if (entry.isFile()) out.push(`${sub}/${entry.name}`);
|
|
11199
|
+
}
|
|
11200
|
+
}
|
|
11201
|
+
return out.sort();
|
|
11202
|
+
}
|
|
11203
|
+
function printSkill(skill, json) {
|
|
11204
|
+
if (json) {
|
|
11205
|
+
process.stdout.write(`${JSON.stringify({ success: true, data: [skill] })}
|
|
11206
|
+
`);
|
|
11207
|
+
return;
|
|
11208
|
+
}
|
|
11209
|
+
process.stdout.write(skill.content);
|
|
11210
|
+
if (!skill.content.endsWith("\n")) process.stdout.write("\n");
|
|
11211
|
+
if (skill.files) {
|
|
11212
|
+
for (const [relPath, content] of Object.entries(skill.files)) {
|
|
11213
|
+
process.stdout.write(`
|
|
11214
|
+
--- ${relPath} ---
|
|
11215
|
+
`);
|
|
11216
|
+
process.stdout.write(content);
|
|
11217
|
+
if (!content.endsWith("\n")) process.stdout.write("\n");
|
|
11218
|
+
}
|
|
11219
|
+
}
|
|
11220
|
+
}
|
|
11221
|
+
var skillsListCommand = command({
|
|
11222
|
+
name: "list",
|
|
11223
|
+
description: "List available bundled skills",
|
|
11224
|
+
args: {
|
|
11225
|
+
json: flag({ long: "json", description: "Output as JSON" })
|
|
11226
|
+
},
|
|
11227
|
+
handler: ({ json }) => {
|
|
11228
|
+
const skillsDir = requireSkillsDir();
|
|
11229
|
+
const names = listSkillNames(skillsDir);
|
|
11230
|
+
if (json) {
|
|
11231
|
+
process.stdout.write(`${JSON.stringify({ success: true, data: names })}
|
|
11232
|
+
`);
|
|
11233
|
+
} else {
|
|
11234
|
+
for (const name of names) {
|
|
11235
|
+
console.log(name);
|
|
11236
|
+
}
|
|
11237
|
+
}
|
|
11238
|
+
}
|
|
11239
|
+
});
|
|
11240
|
+
var skillsGetCommand = command({
|
|
11241
|
+
name: "get",
|
|
11242
|
+
description: "Get skill content by name (or --all for all skills)",
|
|
11243
|
+
args: {
|
|
11244
|
+
name: positional({ type: optional(string), displayName: "name", description: "Skill name" }),
|
|
11245
|
+
all: flag({ long: "all", description: "Get all skills" }),
|
|
11246
|
+
full: flag({
|
|
11247
|
+
long: "full",
|
|
11248
|
+
description: "Also include all files under subdirectories (references/, scripts/, agents/, etc.)"
|
|
11249
|
+
}),
|
|
11250
|
+
ref: option({
|
|
11251
|
+
type: optional(string),
|
|
11252
|
+
long: "ref",
|
|
11253
|
+
description: "Load a single file from the skill by relative path (searches all subdirectories). Takes precedence over --full."
|
|
11254
|
+
}),
|
|
11255
|
+
json: flag({ long: "json", description: "Output as JSON" })
|
|
11256
|
+
},
|
|
11257
|
+
handler: ({ name, all, full, ref, json }) => {
|
|
11258
|
+
const skillsDir = requireSkillsDir();
|
|
11259
|
+
if (ref !== void 0 && all) {
|
|
11260
|
+
const msg = "--ref is incompatible with --all";
|
|
11261
|
+
if (json) {
|
|
11262
|
+
process.stdout.write(`${JSON.stringify({ success: false, error: msg })}
|
|
11263
|
+
`);
|
|
11264
|
+
} else {
|
|
11265
|
+
console.error(`Error: ${msg}`);
|
|
11266
|
+
}
|
|
11267
|
+
process.exit(1);
|
|
11268
|
+
}
|
|
11269
|
+
if (ref !== void 0) {
|
|
11270
|
+
if (name === void 0) {
|
|
11271
|
+
const msg = "--ref requires a skill name";
|
|
11272
|
+
if (json) {
|
|
11273
|
+
process.stdout.write(`${JSON.stringify({ success: false, error: msg })}
|
|
11274
|
+
`);
|
|
11275
|
+
} else {
|
|
11276
|
+
console.error(`Error: ${msg}`);
|
|
11277
|
+
}
|
|
11278
|
+
process.exit(1);
|
|
11279
|
+
}
|
|
11280
|
+
const skillDir = path20.join(skillsDir, name);
|
|
11281
|
+
if (!existsSync15(skillDir)) {
|
|
11282
|
+
const msg = `skill '${name}' not found`;
|
|
11283
|
+
if (json) {
|
|
11284
|
+
process.stdout.write(`${JSON.stringify({ success: false, error: msg })}
|
|
11285
|
+
`);
|
|
11286
|
+
} else {
|
|
11287
|
+
console.error(`Error: ${msg}`);
|
|
11288
|
+
const available = listSkillNames(skillsDir);
|
|
11289
|
+
if (available.length > 0) {
|
|
11290
|
+
console.error(`Available skills: ${available.join(", ")}`);
|
|
11291
|
+
}
|
|
11292
|
+
}
|
|
11293
|
+
process.exit(1);
|
|
11294
|
+
}
|
|
11295
|
+
const file = findRefFile(skillDir, ref);
|
|
11296
|
+
if (!file) {
|
|
11297
|
+
const msg = `reference '${ref}' not found in skill '${name}'`;
|
|
11298
|
+
if (json) {
|
|
11299
|
+
process.stdout.write(`${JSON.stringify({ success: false, error: msg })}
|
|
11300
|
+
`);
|
|
11301
|
+
} else {
|
|
11302
|
+
console.error(`Error: ${msg}`);
|
|
11303
|
+
const available = listRefFiles(skillDir);
|
|
11304
|
+
if (available.length > 0) {
|
|
11305
|
+
console.error(`Available reference files:
|
|
11306
|
+
${available.join("\n ")}`);
|
|
11307
|
+
}
|
|
11308
|
+
}
|
|
11309
|
+
process.exit(1);
|
|
11310
|
+
}
|
|
11311
|
+
if (json) {
|
|
11312
|
+
process.stdout.write(
|
|
11313
|
+
`${JSON.stringify({ success: true, data: [{ name, content: file.content, files: { [file.relPath]: file.content } }] })}
|
|
11314
|
+
`
|
|
11315
|
+
);
|
|
11316
|
+
return;
|
|
11317
|
+
}
|
|
11318
|
+
process.stdout.write(file.content);
|
|
11319
|
+
if (!file.content.endsWith("\n")) process.stdout.write("\n");
|
|
11320
|
+
return;
|
|
11321
|
+
}
|
|
11322
|
+
if (all || name === void 0) {
|
|
11323
|
+
const names = listSkillNames(skillsDir);
|
|
11324
|
+
const skills = names.map((n) => readSkill(skillsDir, n, full)).filter((s) => s !== null);
|
|
11325
|
+
if (json) {
|
|
11326
|
+
process.stdout.write(`${JSON.stringify({ success: true, data: skills })}
|
|
11327
|
+
`);
|
|
11328
|
+
return;
|
|
11329
|
+
}
|
|
11330
|
+
for (const skill2 of skills) {
|
|
11331
|
+
if (skills.length > 1) {
|
|
11332
|
+
process.stdout.write(`
|
|
11333
|
+
=== ${skill2.name} ===
|
|
11334
|
+
|
|
11335
|
+
`);
|
|
11336
|
+
}
|
|
11337
|
+
printSkill(skill2, false);
|
|
11338
|
+
}
|
|
11339
|
+
return;
|
|
11340
|
+
}
|
|
11341
|
+
const skill = readSkill(skillsDir, name, full);
|
|
11342
|
+
if (!skill) {
|
|
11343
|
+
if (json) {
|
|
11344
|
+
process.stdout.write(
|
|
11345
|
+
`${JSON.stringify({ success: false, error: `Skill '${name}' not found` })}
|
|
11346
|
+
`
|
|
11347
|
+
);
|
|
11348
|
+
} else {
|
|
11349
|
+
console.error(`Error: skill '${name}' not found`);
|
|
11350
|
+
const available = listSkillNames(skillsDir);
|
|
11351
|
+
if (available.length > 0) {
|
|
11352
|
+
console.error(`Available skills: ${available.join(", ")}`);
|
|
11353
|
+
}
|
|
11354
|
+
}
|
|
11355
|
+
process.exit(1);
|
|
11356
|
+
}
|
|
11357
|
+
printSkill(skill, json);
|
|
11358
|
+
}
|
|
11359
|
+
});
|
|
11360
|
+
var skillsPathCommand = command({
|
|
11361
|
+
name: "path",
|
|
11362
|
+
description: "Print path to bundled skills directory (or specific skill directory)",
|
|
11363
|
+
args: {
|
|
11364
|
+
name: positional({ type: optional(string), displayName: "name", description: "Skill name" })
|
|
11365
|
+
},
|
|
11366
|
+
handler: ({ name }) => {
|
|
11367
|
+
const skillsDir = requireSkillsDir();
|
|
11368
|
+
if (name) {
|
|
11369
|
+
const skillDir = path20.join(skillsDir, name);
|
|
11370
|
+
if (!existsSync15(skillDir)) {
|
|
11371
|
+
console.error(`Error: skill '${name}' not found`);
|
|
11372
|
+
process.exit(1);
|
|
11373
|
+
}
|
|
11374
|
+
console.log(skillDir);
|
|
11375
|
+
} else {
|
|
11376
|
+
console.log(skillsDir);
|
|
11377
|
+
}
|
|
11378
|
+
}
|
|
11379
|
+
});
|
|
11380
|
+
var skillsCommand = subcommands({
|
|
11381
|
+
name: "skills",
|
|
11382
|
+
description: "List and retrieve bundled AgentV skills",
|
|
11383
|
+
cmds: {
|
|
11384
|
+
list: skillsListCommand,
|
|
11385
|
+
get: skillsGetCommand,
|
|
11386
|
+
path: skillsPathCommand
|
|
11387
|
+
}
|
|
11388
|
+
});
|
|
11389
|
+
|
|
11010
11390
|
// src/commands/transpile/index.ts
|
|
11011
11391
|
import { writeFileSync as writeFileSync7 } from "node:fs";
|
|
11012
|
-
import
|
|
11392
|
+
import path21 from "node:path";
|
|
11013
11393
|
var transpileCommand = command({
|
|
11014
11394
|
name: "transpile",
|
|
11015
11395
|
description: "Convert an EVAL.yaml file to Agent Skills evals.json format",
|
|
@@ -11033,7 +11413,7 @@ var transpileCommand = command({
|
|
|
11033
11413
|
handler: async ({ input, outDir, stdout }) => {
|
|
11034
11414
|
let result;
|
|
11035
11415
|
try {
|
|
11036
|
-
result = transpileEvalYamlFile(
|
|
11416
|
+
result = transpileEvalYamlFile(path21.resolve(input));
|
|
11037
11417
|
} catch (error) {
|
|
11038
11418
|
console.error(`Error: ${error.message}`);
|
|
11039
11419
|
process.exit(1);
|
|
@@ -11057,11 +11437,11 @@ var transpileCommand = command({
|
|
|
11057
11437
|
process.stdout.write("\n");
|
|
11058
11438
|
return;
|
|
11059
11439
|
}
|
|
11060
|
-
const outputDir = outDir ?
|
|
11440
|
+
const outputDir = outDir ? path21.resolve(outDir) : path21.dirname(path21.resolve(input));
|
|
11061
11441
|
const fileNames = getOutputFilenames(result);
|
|
11062
11442
|
for (const [skill, evalsJson] of result.files) {
|
|
11063
11443
|
const fileName = fileNames.get(skill) ?? "evals.json";
|
|
11064
|
-
const outputPath =
|
|
11444
|
+
const outputPath = path21.join(outputDir, fileName);
|
|
11065
11445
|
writeFileSync7(outputPath, `${JSON.stringify(evalsJson, null, 2)}
|
|
11066
11446
|
`);
|
|
11067
11447
|
console.log(`Transpiled to ${outputPath}`);
|
|
@@ -11070,7 +11450,7 @@ var transpileCommand = command({
|
|
|
11070
11450
|
});
|
|
11071
11451
|
|
|
11072
11452
|
// src/commands/trend/index.ts
|
|
11073
|
-
import
|
|
11453
|
+
import path22 from "node:path";
|
|
11074
11454
|
var colors2 = {
|
|
11075
11455
|
reset: "\x1B[0m",
|
|
11076
11456
|
bold: "\x1B[1m",
|
|
@@ -11120,7 +11500,7 @@ function colorizeSlope(value) {
|
|
|
11120
11500
|
}
|
|
11121
11501
|
function ensureTrendIndexPath(source, cwd) {
|
|
11122
11502
|
const resolved = resolveResultSourcePath(source, cwd);
|
|
11123
|
-
if (
|
|
11503
|
+
if (path22.basename(resolved) !== RESULT_INDEX_FILENAME) {
|
|
11124
11504
|
throw new Error(
|
|
11125
11505
|
`Unsupported result source for trend: ${source}. Use a run workspace directory or ${RESULT_INDEX_FILENAME} manifest.`
|
|
11126
11506
|
);
|
|
@@ -11140,7 +11520,7 @@ function resolveTrendSources(cwd, sources, last) {
|
|
|
11140
11520
|
if (last < 2) {
|
|
11141
11521
|
throw new Error("--last must be at least 2");
|
|
11142
11522
|
}
|
|
11143
|
-
const metas = listResultFiles(cwd).filter((meta) =>
|
|
11523
|
+
const metas = listResultFiles(cwd).filter((meta) => path22.basename(meta.path) === RESULT_INDEX_FILENAME).slice(0, last);
|
|
11144
11524
|
if (metas.length < 2) {
|
|
11145
11525
|
throw new Error(
|
|
11146
11526
|
"Trend analysis requires at least 2 canonical run workspaces in .agentv/results/runs/"
|
|
@@ -11155,10 +11535,10 @@ function getRunLabel(sourcePath, timestamp) {
|
|
|
11155
11535
|
if (timestamp) {
|
|
11156
11536
|
return timestamp;
|
|
11157
11537
|
}
|
|
11158
|
-
return
|
|
11538
|
+
return path22.basename(path22.dirname(sourcePath));
|
|
11159
11539
|
}
|
|
11160
11540
|
function getRunSortKey(sourcePath, timestamp) {
|
|
11161
|
-
return timestamp ??
|
|
11541
|
+
return timestamp ?? path22.basename(path22.dirname(sourcePath));
|
|
11162
11542
|
}
|
|
11163
11543
|
function mean2(values) {
|
|
11164
11544
|
return values.reduce((sum, value) => sum + value, 0) / values.length;
|
|
@@ -11413,7 +11793,7 @@ var trendCommand = command({
|
|
|
11413
11793
|
});
|
|
11414
11794
|
|
|
11415
11795
|
// src/commands/trim/index.ts
|
|
11416
|
-
import { readFileSync as
|
|
11796
|
+
import { readFileSync as readFileSync14, writeFileSync as writeFileSync8 } from "node:fs";
|
|
11417
11797
|
var trimCommand = command({
|
|
11418
11798
|
name: "trim",
|
|
11419
11799
|
description: "Trim evaluation results for baseline storage (strips debug/audit fields)",
|
|
@@ -11432,7 +11812,7 @@ var trimCommand = command({
|
|
|
11432
11812
|
},
|
|
11433
11813
|
handler: async ({ input, out }) => {
|
|
11434
11814
|
try {
|
|
11435
|
-
const content =
|
|
11815
|
+
const content = readFileSync14(input, "utf8");
|
|
11436
11816
|
const lines = content.trim().split("\n").filter((line) => line.trim());
|
|
11437
11817
|
const trimmedLines = lines.map((line) => {
|
|
11438
11818
|
const record = JSON.parse(line);
|
|
@@ -11539,7 +11919,7 @@ function isTTY() {
|
|
|
11539
11919
|
// src/commands/validate/validate-files.ts
|
|
11540
11920
|
import { constants } from "node:fs";
|
|
11541
11921
|
import { access, readdir as readdir4, stat } from "node:fs/promises";
|
|
11542
|
-
import
|
|
11922
|
+
import path23 from "node:path";
|
|
11543
11923
|
import fg2 from "fast-glob";
|
|
11544
11924
|
async function validateFiles(paths) {
|
|
11545
11925
|
const filePaths = await expandPaths(paths);
|
|
@@ -11554,7 +11934,7 @@ async function validateFiles(paths) {
|
|
|
11554
11934
|
};
|
|
11555
11935
|
}
|
|
11556
11936
|
async function validateSingleFile(filePath) {
|
|
11557
|
-
const absolutePath =
|
|
11937
|
+
const absolutePath = path23.resolve(filePath);
|
|
11558
11938
|
const fileType = await detectFileType(absolutePath);
|
|
11559
11939
|
let result;
|
|
11560
11940
|
if (fileType === "eval") {
|
|
@@ -11598,7 +11978,7 @@ async function validateSingleFile(filePath) {
|
|
|
11598
11978
|
async function expandPaths(paths) {
|
|
11599
11979
|
const expanded = /* @__PURE__ */ new Set();
|
|
11600
11980
|
for (const inputPath of paths) {
|
|
11601
|
-
const absolutePath =
|
|
11981
|
+
const absolutePath = path23.resolve(inputPath);
|
|
11602
11982
|
try {
|
|
11603
11983
|
await access(absolutePath, constants.F_OK);
|
|
11604
11984
|
const stats = await stat(absolutePath);
|
|
@@ -11626,7 +12006,7 @@ async function expandPaths(paths) {
|
|
|
11626
12006
|
if (yamlMatches.length === 0) {
|
|
11627
12007
|
console.warn(`Warning: No YAML files matched pattern: ${inputPath}`);
|
|
11628
12008
|
}
|
|
11629
|
-
for (const f of yamlMatches) expanded.add(
|
|
12009
|
+
for (const f of yamlMatches) expanded.add(path23.normalize(f));
|
|
11630
12010
|
}
|
|
11631
12011
|
const sorted = Array.from(expanded);
|
|
11632
12012
|
sorted.sort();
|
|
@@ -11637,7 +12017,7 @@ async function findYamlFiles(dirPath) {
|
|
|
11637
12017
|
try {
|
|
11638
12018
|
const entries2 = await readdir4(dirPath, { withFileTypes: true });
|
|
11639
12019
|
for (const entry of entries2) {
|
|
11640
|
-
const fullPath =
|
|
12020
|
+
const fullPath = path23.join(dirPath, entry.name);
|
|
11641
12021
|
if (entry.isDirectory()) {
|
|
11642
12022
|
if (entry.name === "node_modules" || entry.name.startsWith(".")) {
|
|
11643
12023
|
continue;
|
|
@@ -11654,11 +12034,11 @@ async function findYamlFiles(dirPath) {
|
|
|
11654
12034
|
return results;
|
|
11655
12035
|
}
|
|
11656
12036
|
function isYamlFile(filePath) {
|
|
11657
|
-
const ext =
|
|
12037
|
+
const ext = path23.extname(filePath).toLowerCase();
|
|
11658
12038
|
return ext === ".yaml" || ext === ".yml";
|
|
11659
12039
|
}
|
|
11660
12040
|
function isEvalYamlFile(filePath) {
|
|
11661
|
-
const lower =
|
|
12041
|
+
const lower = path23.basename(filePath).toLowerCase();
|
|
11662
12042
|
return lower.endsWith(".eval.yaml") || lower.endsWith(".eval.yml");
|
|
11663
12043
|
}
|
|
11664
12044
|
|
|
@@ -11713,9 +12093,9 @@ var validateCommand = command({
|
|
|
11713
12093
|
});
|
|
11714
12094
|
|
|
11715
12095
|
// src/commands/workspace/clean.ts
|
|
11716
|
-
import { existsSync as
|
|
12096
|
+
import { existsSync as existsSync16 } from "node:fs";
|
|
11717
12097
|
import { readFile as readFile6, readdir as readdir5, rm } from "node:fs/promises";
|
|
11718
|
-
import
|
|
12098
|
+
import path24 from "node:path";
|
|
11719
12099
|
async function confirm(message) {
|
|
11720
12100
|
const readline2 = await import("node:readline");
|
|
11721
12101
|
const rl = readline2.createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -11742,7 +12122,7 @@ var cleanCommand = command({
|
|
|
11742
12122
|
},
|
|
11743
12123
|
handler: async ({ repo, force }) => {
|
|
11744
12124
|
const poolRoot = getWorkspacePoolRoot();
|
|
11745
|
-
if (!
|
|
12125
|
+
if (!existsSync16(poolRoot)) {
|
|
11746
12126
|
console.log("No workspace pool entries found.");
|
|
11747
12127
|
return;
|
|
11748
12128
|
}
|
|
@@ -11751,8 +12131,8 @@ var cleanCommand = command({
|
|
|
11751
12131
|
const poolDirs = entries2.filter((e) => e.isDirectory());
|
|
11752
12132
|
const matchingDirs = [];
|
|
11753
12133
|
for (const dir of poolDirs) {
|
|
11754
|
-
const poolDir =
|
|
11755
|
-
const metadataPath =
|
|
12134
|
+
const poolDir = path24.join(poolRoot, dir.name);
|
|
12135
|
+
const metadataPath = path24.join(poolDir, "metadata.json");
|
|
11756
12136
|
try {
|
|
11757
12137
|
const raw = await readFile6(metadataPath, "utf-8");
|
|
11758
12138
|
const metadata = JSON.parse(raw);
|
|
@@ -11783,7 +12163,7 @@ var cleanCommand = command({
|
|
|
11783
12163
|
}
|
|
11784
12164
|
for (const dir of matchingDirs) {
|
|
11785
12165
|
await rm(dir, { recursive: true, force: true });
|
|
11786
|
-
console.log(`Removed: ${
|
|
12166
|
+
console.log(`Removed: ${path24.basename(dir).slice(0, 12)}...`);
|
|
11787
12167
|
}
|
|
11788
12168
|
console.log("Done.");
|
|
11789
12169
|
} else {
|
|
@@ -11801,7 +12181,7 @@ var cleanCommand = command({
|
|
|
11801
12181
|
});
|
|
11802
12182
|
|
|
11803
12183
|
// src/commands/workspace/deps.ts
|
|
11804
|
-
import
|
|
12184
|
+
import path25 from "node:path";
|
|
11805
12185
|
var depsCommand = command({
|
|
11806
12186
|
name: "deps",
|
|
11807
12187
|
description: "Scan eval files and list git repo dependencies needed by workspaces",
|
|
@@ -11825,7 +12205,7 @@ var depsCommand = command({
|
|
|
11825
12205
|
const resolvedPaths = await resolveEvalPaths(evalPaths, cwd);
|
|
11826
12206
|
const result = await scanRepoDeps(resolvedPaths);
|
|
11827
12207
|
for (const err2 of result.errors) {
|
|
11828
|
-
console.error(`warning: ${
|
|
12208
|
+
console.error(`warning: ${path25.relative(cwd, err2.file)}: ${err2.message}`);
|
|
11829
12209
|
}
|
|
11830
12210
|
const output = {
|
|
11831
12211
|
repos: result.repos.map((r) => ({
|
|
@@ -11833,7 +12213,7 @@ var depsCommand = command({
|
|
|
11833
12213
|
...r.ref !== void 0 && { ref: r.ref },
|
|
11834
12214
|
...r.clone !== void 0 && { clone: r.clone },
|
|
11835
12215
|
...r.checkout !== void 0 && { checkout: r.checkout },
|
|
11836
|
-
...usedBy && { used_by: r.usedBy.map((p) =>
|
|
12216
|
+
...usedBy && { used_by: r.usedBy.map((p) => path25.relative(cwd, p)) }
|
|
11837
12217
|
}))
|
|
11838
12218
|
};
|
|
11839
12219
|
console.log(JSON.stringify(output, null, 2));
|
|
@@ -11841,15 +12221,15 @@ var depsCommand = command({
|
|
|
11841
12221
|
});
|
|
11842
12222
|
|
|
11843
12223
|
// src/commands/workspace/list.ts
|
|
11844
|
-
import { existsSync as
|
|
12224
|
+
import { existsSync as existsSync17 } from "node:fs";
|
|
11845
12225
|
import { readFile as readFile7, readdir as readdir6, stat as stat2 } from "node:fs/promises";
|
|
11846
|
-
import
|
|
12226
|
+
import path26 from "node:path";
|
|
11847
12227
|
async function getDirectorySize(dirPath) {
|
|
11848
12228
|
let totalSize = 0;
|
|
11849
12229
|
try {
|
|
11850
12230
|
const entries2 = await readdir6(dirPath, { withFileTypes: true });
|
|
11851
12231
|
for (const entry of entries2) {
|
|
11852
|
-
const fullPath =
|
|
12232
|
+
const fullPath = path26.join(dirPath, entry.name);
|
|
11853
12233
|
if (entry.isDirectory()) {
|
|
11854
12234
|
totalSize += await getDirectorySize(fullPath);
|
|
11855
12235
|
} else {
|
|
@@ -11873,7 +12253,7 @@ var listCommand = command({
|
|
|
11873
12253
|
args: {},
|
|
11874
12254
|
handler: async () => {
|
|
11875
12255
|
const poolRoot = getWorkspacePoolRoot();
|
|
11876
|
-
if (!
|
|
12256
|
+
if (!existsSync17(poolRoot)) {
|
|
11877
12257
|
console.log("No workspace pool entries found.");
|
|
11878
12258
|
return;
|
|
11879
12259
|
}
|
|
@@ -11884,11 +12264,11 @@ var listCommand = command({
|
|
|
11884
12264
|
return;
|
|
11885
12265
|
}
|
|
11886
12266
|
for (const dir of poolDirs) {
|
|
11887
|
-
const poolDir =
|
|
12267
|
+
const poolDir = path26.join(poolRoot, dir.name);
|
|
11888
12268
|
const fingerprint = dir.name;
|
|
11889
12269
|
const poolEntries = await readdir6(poolDir, { withFileTypes: true });
|
|
11890
12270
|
const slots = poolEntries.filter((e) => e.isDirectory() && e.name.startsWith("slot-"));
|
|
11891
|
-
const metadataPath =
|
|
12271
|
+
const metadataPath = path26.join(poolDir, "metadata.json");
|
|
11892
12272
|
let metadata = null;
|
|
11893
12273
|
try {
|
|
11894
12274
|
const raw = await readFile7(metadataPath, "utf-8");
|
|
@@ -11935,8 +12315,8 @@ var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
|
11935
12315
|
var CONFIG_DIR = getAgentvConfigDir();
|
|
11936
12316
|
var CACHE_FILE = "version-check.json";
|
|
11937
12317
|
var NPM_REGISTRY_BASE = "https://registry.npmjs.org/agentv/";
|
|
11938
|
-
async function getCachedUpdateInfo(
|
|
11939
|
-
const filePath =
|
|
12318
|
+
async function getCachedUpdateInfo(path28) {
|
|
12319
|
+
const filePath = path28 ?? join5(CONFIG_DIR, CACHE_FILE);
|
|
11940
12320
|
try {
|
|
11941
12321
|
const raw = await readFile8(filePath, "utf-8");
|
|
11942
12322
|
const data = JSON.parse(raw);
|
|
@@ -12030,6 +12410,7 @@ var app = subcommands({
|
|
|
12030
12410
|
pipeline: pipelineCommand,
|
|
12031
12411
|
results: resultsCommand,
|
|
12032
12412
|
self: selfCommand,
|
|
12413
|
+
skills: skillsCommand,
|
|
12033
12414
|
serve: resultsServeCommand,
|
|
12034
12415
|
studio: resultsServeCommand,
|
|
12035
12416
|
inspect: inspectCommand,
|
|
@@ -12051,6 +12432,7 @@ var TOP_LEVEL_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
12051
12432
|
"pipeline",
|
|
12052
12433
|
"results",
|
|
12053
12434
|
"self",
|
|
12435
|
+
"skills",
|
|
12054
12436
|
"serve",
|
|
12055
12437
|
"studio",
|
|
12056
12438
|
"trend",
|
|
@@ -12095,7 +12477,7 @@ ${updateNotice}
|
|
|
12095
12477
|
const processedArgv = preprocessArgv(argv);
|
|
12096
12478
|
const cwd = process.cwd();
|
|
12097
12479
|
const repoRoot = await findRepoRoot(cwd);
|
|
12098
|
-
const sessionConfig = await loadConfig(
|
|
12480
|
+
const sessionConfig = await loadConfig(path27.join(cwd, "_"), repoRoot);
|
|
12099
12481
|
const beforeSessionCommand = sessionConfig?.hooks?.before_session;
|
|
12100
12482
|
if (beforeSessionCommand) {
|
|
12101
12483
|
runBeforeSessionHook(beforeSessionCommand);
|
|
@@ -12108,4 +12490,4 @@ export {
|
|
|
12108
12490
|
preprocessArgv,
|
|
12109
12491
|
runCli
|
|
12110
12492
|
};
|
|
12111
|
-
//# sourceMappingURL=chunk-
|
|
12493
|
+
//# sourceMappingURL=chunk-PH5MHKPL.js.map
|