agentv 4.8.0 → 4.9.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-QBZJSQXV.js → chunk-6HQCMEGO.js} +5 -5
- package/dist/{chunk-QBZJSQXV.js.map → chunk-6HQCMEGO.js.map} +1 -1
- package/dist/{chunk-H4GQXK5M.js → chunk-7K5LYK5B.js} +232 -136
- package/dist/chunk-7K5LYK5B.js.map +1 -0
- package/dist/{chunk-A6W3KOCS.js → chunk-MTXZDEVR.js} +53 -11
- package/dist/chunk-MTXZDEVR.js.map +1 -0
- package/dist/cli.js +3 -3
- package/dist/{dist-QXVR2ZRH.js → dist-2VDI64IM.js} +4 -2
- package/dist/index.js +3 -3
- package/dist/{interactive-IRYNIFCY.js → interactive-UDDXUKAU.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-A6W3KOCS.js.map +0 -1
- package/dist/chunk-H4GQXK5M.js.map +0 -1
- /package/dist/{dist-QXVR2ZRH.js.map → dist-2VDI64IM.js.map} +0 -0
- /package/dist/{interactive-IRYNIFCY.js.map → interactive-UDDXUKAU.js.map} +0 -0
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
validateFileReferences,
|
|
28
28
|
validateTargetsFile,
|
|
29
29
|
writeArtifactsFromResults
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6HQCMEGO.js";
|
|
31
31
|
import {
|
|
32
32
|
DEFAULT_CATEGORY,
|
|
33
33
|
DEFAULT_THRESHOLD,
|
|
@@ -55,12 +55,13 @@ import {
|
|
|
55
55
|
readTargetDefinitions,
|
|
56
56
|
readTranscriptFile,
|
|
57
57
|
removeProject,
|
|
58
|
+
scanRepoDeps,
|
|
58
59
|
toCamelCaseDeep,
|
|
59
60
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
60
61
|
toTranscriptJsonLine,
|
|
61
62
|
transpileEvalYamlFile,
|
|
62
63
|
trimBaselineResult
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-7K5LYK5B.js";
|
|
64
65
|
import {
|
|
65
66
|
__commonJS,
|
|
66
67
|
__require,
|
|
@@ -3891,7 +3892,7 @@ var evalRunCommand = command({
|
|
|
3891
3892
|
},
|
|
3892
3893
|
handler: async (args) => {
|
|
3893
3894
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
3894
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
3895
|
+
const { launchInteractiveWizard } = await import("./interactive-UDDXUKAU.js");
|
|
3895
3896
|
await launchInteractiveWizard();
|
|
3896
3897
|
return;
|
|
3897
3898
|
}
|
|
@@ -9148,16 +9149,56 @@ var cleanCommand = command({
|
|
|
9148
9149
|
}
|
|
9149
9150
|
});
|
|
9150
9151
|
|
|
9152
|
+
// src/commands/workspace/deps.ts
|
|
9153
|
+
import path19 from "node:path";
|
|
9154
|
+
var depsCommand = command({
|
|
9155
|
+
name: "deps",
|
|
9156
|
+
description: "Scan eval files and list git repo dependencies needed by workspaces",
|
|
9157
|
+
args: {
|
|
9158
|
+
evalPaths: restPositionals({
|
|
9159
|
+
type: string,
|
|
9160
|
+
displayName: "eval-paths",
|
|
9161
|
+
description: "Path(s) or glob(s) to evaluation .yaml file(s)"
|
|
9162
|
+
}),
|
|
9163
|
+
usedBy: flag({
|
|
9164
|
+
long: "used-by",
|
|
9165
|
+
description: "Include list of eval files that reference each repo"
|
|
9166
|
+
})
|
|
9167
|
+
},
|
|
9168
|
+
handler: async ({ evalPaths, usedBy }) => {
|
|
9169
|
+
if (evalPaths.length === 0) {
|
|
9170
|
+
console.error("Usage: agentv workspace deps <eval-paths...>");
|
|
9171
|
+
process.exit(1);
|
|
9172
|
+
}
|
|
9173
|
+
const cwd = process.cwd();
|
|
9174
|
+
const resolvedPaths = await resolveEvalPaths(evalPaths, cwd);
|
|
9175
|
+
const result = await scanRepoDeps(resolvedPaths);
|
|
9176
|
+
for (const err2 of result.errors) {
|
|
9177
|
+
console.error(`warning: ${path19.relative(cwd, err2.file)}: ${err2.message}`);
|
|
9178
|
+
}
|
|
9179
|
+
const output = {
|
|
9180
|
+
repos: result.repos.map((r) => ({
|
|
9181
|
+
url: r.url,
|
|
9182
|
+
...r.ref !== void 0 && { ref: r.ref },
|
|
9183
|
+
...r.clone !== void 0 && { clone: r.clone },
|
|
9184
|
+
...r.checkout !== void 0 && { checkout: r.checkout },
|
|
9185
|
+
...usedBy && { used_by: r.usedBy.map((p) => path19.relative(cwd, p)) }
|
|
9186
|
+
}))
|
|
9187
|
+
};
|
|
9188
|
+
console.log(JSON.stringify(output, null, 2));
|
|
9189
|
+
}
|
|
9190
|
+
});
|
|
9191
|
+
|
|
9151
9192
|
// src/commands/workspace/list.ts
|
|
9152
9193
|
import { existsSync as existsSync11 } from "node:fs";
|
|
9153
9194
|
import { readFile as readFile7, readdir as readdir6, stat as stat2 } from "node:fs/promises";
|
|
9154
|
-
import
|
|
9195
|
+
import path20 from "node:path";
|
|
9155
9196
|
async function getDirectorySize(dirPath) {
|
|
9156
9197
|
let totalSize = 0;
|
|
9157
9198
|
try {
|
|
9158
9199
|
const entries2 = await readdir6(dirPath, { withFileTypes: true });
|
|
9159
9200
|
for (const entry of entries2) {
|
|
9160
|
-
const fullPath =
|
|
9201
|
+
const fullPath = path20.join(dirPath, entry.name);
|
|
9161
9202
|
if (entry.isDirectory()) {
|
|
9162
9203
|
totalSize += await getDirectorySize(fullPath);
|
|
9163
9204
|
} else {
|
|
@@ -9192,11 +9233,11 @@ var listCommand = command({
|
|
|
9192
9233
|
return;
|
|
9193
9234
|
}
|
|
9194
9235
|
for (const dir of poolDirs) {
|
|
9195
|
-
const poolDir =
|
|
9236
|
+
const poolDir = path20.join(poolRoot, dir.name);
|
|
9196
9237
|
const fingerprint = dir.name;
|
|
9197
9238
|
const poolEntries = await readdir6(poolDir, { withFileTypes: true });
|
|
9198
9239
|
const slots = poolEntries.filter((e) => e.isDirectory() && e.name.startsWith("slot-"));
|
|
9199
|
-
const metadataPath =
|
|
9240
|
+
const metadataPath = path20.join(poolDir, "metadata.json");
|
|
9200
9241
|
let metadata = null;
|
|
9201
9242
|
try {
|
|
9202
9243
|
const raw = await readFile7(metadataPath, "utf-8");
|
|
@@ -9230,7 +9271,8 @@ var workspaceCommand = subcommands({
|
|
|
9230
9271
|
description: "Manage workspace pool",
|
|
9231
9272
|
cmds: {
|
|
9232
9273
|
list: listCommand,
|
|
9233
|
-
clean: cleanCommand
|
|
9274
|
+
clean: cleanCommand,
|
|
9275
|
+
deps: depsCommand
|
|
9234
9276
|
}
|
|
9235
9277
|
});
|
|
9236
9278
|
|
|
@@ -9242,8 +9284,8 @@ var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
|
9242
9284
|
var AGENTV_DIR = getAgentvHome();
|
|
9243
9285
|
var CACHE_FILE = "version-check.json";
|
|
9244
9286
|
var NPM_REGISTRY_URL = "https://registry.npmjs.org/agentv/latest";
|
|
9245
|
-
async function getCachedUpdateInfo(
|
|
9246
|
-
const filePath =
|
|
9287
|
+
async function getCachedUpdateInfo(path21) {
|
|
9288
|
+
const filePath = path21 ?? join5(AGENTV_DIR, CACHE_FILE);
|
|
9247
9289
|
try {
|
|
9248
9290
|
const raw = await readFile8(filePath, "utf-8");
|
|
9249
9291
|
const data = JSON.parse(raw);
|
|
@@ -9404,4 +9446,4 @@ export {
|
|
|
9404
9446
|
preprocessArgv,
|
|
9405
9447
|
runCli
|
|
9406
9448
|
};
|
|
9407
|
-
//# sourceMappingURL=chunk-
|
|
9449
|
+
//# sourceMappingURL=chunk-MTXZDEVR.js.map
|