agentv 4.38.0-next.1 → 4.38.1-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.
- package/dist/{artifact-writer-RG43U2YF.js → artifact-writer-MK5X5MSO.js} +4 -4
- package/dist/{chunk-P23UT54D.js → chunk-DKUAETXE.js} +3 -3
- package/dist/{chunk-Q5IJMKPS.js → chunk-NLTIK3LV.js} +2 -2
- package/dist/{chunk-KL33753Q.js → chunk-SMZQ7RPW.js} +173 -34
- package/dist/chunk-SMZQ7RPW.js.map +1 -0
- package/dist/{chunk-3KEVTQRM.js → chunk-VBHHZQS6.js} +43 -77
- package/dist/{chunk-3KEVTQRM.js.map → chunk-VBHHZQS6.js.map} +1 -1
- package/dist/{chunk-IUWDUONH.js → chunk-Z4BVJJXA.js} +50 -222
- package/dist/chunk-Z4BVJJXA.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/{dist-4AASUCNE.js → dist-HVLBDG5F.js} +3 -3
- package/dist/index.js +5 -5
- package/dist/{interactive-PADK5XH2.js → interactive-A7JNS2MT.js} +5 -5
- package/dist/{ts-eval-loader-XXZBXY7L-RLXQGTHS.js → ts-eval-loader-TJT6BGFF-DI7XNSO4.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-IUWDUONH.js.map +0 -1
- package/dist/chunk-KL33753Q.js.map +0 -1
- /package/dist/{artifact-writer-RG43U2YF.js.map → artifact-writer-MK5X5MSO.js.map} +0 -0
- /package/dist/{chunk-P23UT54D.js.map → chunk-DKUAETXE.js.map} +0 -0
- /package/dist/{chunk-Q5IJMKPS.js.map → chunk-NLTIK3LV.js.map} +0 -0
- /package/dist/{dist-4AASUCNE.js.map → dist-HVLBDG5F.js.map} +0 -0
- /package/dist/{interactive-PADK5XH2.js.map → interactive-A7JNS2MT.js.map} +0 -0
- /package/dist/{ts-eval-loader-XXZBXY7L-RLXQGTHS.js.map → ts-eval-loader-TJT6BGFF-DI7XNSO4.js.map} +0 -0
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
writeArtifactsFromResults,
|
|
15
15
|
writeInitialBenchmarkArtifact,
|
|
16
16
|
writePerTestArtifacts
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-DKUAETXE.js";
|
|
18
|
+
import "./chunk-NLTIK3LV.js";
|
|
19
19
|
import "./chunk-QOBQ5XYF.js";
|
|
20
20
|
import "./chunk-BPGJ4HBU.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-VBHHZQS6.js";
|
|
22
22
|
import "./chunk-NPVGBFF6.js";
|
|
23
23
|
import "./chunk-M7BUKBAF.js";
|
|
24
24
|
import "./chunk-5H446C7X.js";
|
|
@@ -38,4 +38,4 @@ export {
|
|
|
38
38
|
writeInitialBenchmarkArtifact,
|
|
39
39
|
writePerTestArtifacts
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=artifact-writer-
|
|
41
|
+
//# sourceMappingURL=artifact-writer-MK5X5MSO.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'node:module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
traceToTranscriptJsonLines
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NLTIK3LV.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_THRESHOLD,
|
|
7
7
|
buildTraceEnvelopeFromEvaluationResult,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
extractLastAssistantContent,
|
|
10
10
|
parseYamlValue,
|
|
11
11
|
toTraceEnvelopeWire
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VBHHZQS6.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/eval/artifact-writer.ts
|
|
15
15
|
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
|
|
@@ -1359,4 +1359,4 @@ export {
|
|
|
1359
1359
|
writePerTestArtifacts,
|
|
1360
1360
|
writeArtifactsFromResults
|
|
1361
1361
|
};
|
|
1362
|
-
//# sourceMappingURL=chunk-
|
|
1362
|
+
//# sourceMappingURL=chunk-DKUAETXE.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
parseRepoConfig,
|
|
12
12
|
parseYamlValue,
|
|
13
13
|
resolveRepoCloneUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VBHHZQS6.js";
|
|
15
15
|
|
|
16
16
|
// ../../packages/core/dist/index.js
|
|
17
17
|
import { readFileSync } from "node:fs";
|
|
@@ -3080,4 +3080,4 @@ export {
|
|
|
3080
3080
|
TranscriptProvider,
|
|
3081
3081
|
createAgentKernel
|
|
3082
3082
|
};
|
|
3083
|
-
//# sourceMappingURL=chunk-
|
|
3083
|
+
//# sourceMappingURL=chunk-NLTIK3LV.js.map
|
|
@@ -6,12 +6,9 @@ import {
|
|
|
6
6
|
clearRemoteRunTags,
|
|
7
7
|
deleteRunTags,
|
|
8
8
|
detectFileType,
|
|
9
|
-
detectInstallScope,
|
|
10
|
-
detectPackageManager,
|
|
11
9
|
discoverEvalFiles,
|
|
12
10
|
enforceRequiredVersion,
|
|
13
11
|
ensureRemoteRunAvailable,
|
|
14
|
-
fetchLatestVersion,
|
|
15
12
|
findRepoRoot,
|
|
16
13
|
findRunById,
|
|
17
14
|
formatCost,
|
|
@@ -19,7 +16,6 @@ import {
|
|
|
19
16
|
formatNumber,
|
|
20
17
|
formatScore,
|
|
21
18
|
formatSize,
|
|
22
|
-
getDistTagForVersion,
|
|
23
19
|
getRemoteResultsStatus,
|
|
24
20
|
getTraceSpans,
|
|
25
21
|
getTraceSummary,
|
|
@@ -35,7 +31,6 @@ import {
|
|
|
35
31
|
padLeft,
|
|
36
32
|
padRight,
|
|
37
33
|
parseResultManifest,
|
|
38
|
-
performSelfUpdate,
|
|
39
34
|
readRemoteRunTagState,
|
|
40
35
|
readRunTags,
|
|
41
36
|
resolveEvalPaths,
|
|
@@ -53,7 +48,7 @@ import {
|
|
|
53
48
|
validateTargetsFile,
|
|
54
49
|
validateWorkspacePaths,
|
|
55
50
|
writeRunTags
|
|
56
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-Z4BVJJXA.js";
|
|
57
52
|
import {
|
|
58
53
|
RESULT_INDEX_FILENAME,
|
|
59
54
|
aggregateRunDir,
|
|
@@ -65,7 +60,7 @@ import {
|
|
|
65
60
|
resolveRunManifestPath,
|
|
66
61
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
67
62
|
writeArtifactsFromResults
|
|
68
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-DKUAETXE.js";
|
|
69
64
|
import {
|
|
70
65
|
DEFAULT_CATEGORY,
|
|
71
66
|
deriveCategory,
|
|
@@ -81,7 +76,7 @@ import {
|
|
|
81
76
|
toTranscriptJsonLines,
|
|
82
77
|
transpileEvalYamlFile,
|
|
83
78
|
trimBaselineResult
|
|
84
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-NLTIK3LV.js";
|
|
85
80
|
import {
|
|
86
81
|
DEFAULT_THRESHOLD,
|
|
87
82
|
addProject,
|
|
@@ -117,7 +112,7 @@ import {
|
|
|
117
112
|
toCamelCaseDeep,
|
|
118
113
|
toSnakeCaseDeep,
|
|
119
114
|
touchProject
|
|
120
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-VBHHZQS6.js";
|
|
121
116
|
import {
|
|
122
117
|
__commonJS,
|
|
123
118
|
__require,
|
|
@@ -4605,7 +4600,7 @@ var evalRunCommand = command({
|
|
|
4605
4600
|
},
|
|
4606
4601
|
handler: async (args) => {
|
|
4607
4602
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4608
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4603
|
+
const { launchInteractiveWizard } = await import("./interactive-A7JNS2MT.js");
|
|
4609
4604
|
await launchInteractiveWizard();
|
|
4610
4605
|
return;
|
|
4611
4606
|
}
|
|
@@ -14021,6 +14016,150 @@ var runsCommand = subcommands({
|
|
|
14021
14016
|
}
|
|
14022
14017
|
});
|
|
14023
14018
|
|
|
14019
|
+
// src/self-update.ts
|
|
14020
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
14021
|
+
import { existsSync as existsSync17 } from "node:fs";
|
|
14022
|
+
import { get } from "node:https";
|
|
14023
|
+
import { basename, dirname as dirname3, join as join5, win32 } from "node:path";
|
|
14024
|
+
var NPM_REGISTRY_BASE = "https://registry.npmjs.org/agentv/";
|
|
14025
|
+
function getDistTagForVersion(version) {
|
|
14026
|
+
return version.includes("-") ? "next" : "latest";
|
|
14027
|
+
}
|
|
14028
|
+
function detectPackageManagerFromPath(scriptPath) {
|
|
14029
|
+
if (scriptPath.includes(".bun")) {
|
|
14030
|
+
return "bun";
|
|
14031
|
+
}
|
|
14032
|
+
return "npm";
|
|
14033
|
+
}
|
|
14034
|
+
function detectPackageManager() {
|
|
14035
|
+
return detectPackageManagerFromPath(process.argv[1] ?? "");
|
|
14036
|
+
}
|
|
14037
|
+
function detectInstallScopeFromPath(scriptPath, cwd = process.cwd()) {
|
|
14038
|
+
const normalizedScriptPath = scriptPath.replace(/\\/g, "/");
|
|
14039
|
+
const normalizedCwd = cwd.replace(/\\/g, "/");
|
|
14040
|
+
if (!normalizedScriptPath.includes("/node_modules/")) {
|
|
14041
|
+
return "global";
|
|
14042
|
+
}
|
|
14043
|
+
if (normalizedScriptPath.includes("/.npm/_npx/") || normalizedScriptPath.includes("/npm-cache/_npx/")) {
|
|
14044
|
+
return "local";
|
|
14045
|
+
}
|
|
14046
|
+
const packageRoot = normalizedScriptPath.split("/node_modules/")[0];
|
|
14047
|
+
if (!packageRoot) {
|
|
14048
|
+
return "global";
|
|
14049
|
+
}
|
|
14050
|
+
const scriptPathComparable = process.platform === "win32" ? normalizedScriptPath.toLowerCase() : normalizedScriptPath;
|
|
14051
|
+
const cwdComparable = process.platform === "win32" ? normalizedCwd.toLowerCase() : normalizedCwd;
|
|
14052
|
+
const packageRootComparable = process.platform === "win32" ? packageRoot.toLowerCase() : packageRoot;
|
|
14053
|
+
const projectOwnsPackage = cwdComparable === packageRootComparable || cwdComparable.startsWith(`${packageRootComparable}/`);
|
|
14054
|
+
return projectOwnsPackage ? "local" : "global";
|
|
14055
|
+
}
|
|
14056
|
+
function detectInstallScope() {
|
|
14057
|
+
return detectInstallScopeFromPath(process.argv[1] ?? "");
|
|
14058
|
+
}
|
|
14059
|
+
function runCommand(cmd, args) {
|
|
14060
|
+
return new Promise((resolve3, reject) => {
|
|
14061
|
+
const child = spawn2(cmd, args, { stdio: ["inherit", "pipe", "inherit"] });
|
|
14062
|
+
let stdout = "";
|
|
14063
|
+
child.stdout?.on("data", (data) => {
|
|
14064
|
+
process.stdout.write(data);
|
|
14065
|
+
stdout += data.toString();
|
|
14066
|
+
});
|
|
14067
|
+
child.on("error", reject);
|
|
14068
|
+
child.on("close", (code) => resolve3({ exitCode: code ?? 1, stdout }));
|
|
14069
|
+
});
|
|
14070
|
+
}
|
|
14071
|
+
function fetchLatestVersion(distTag = "latest") {
|
|
14072
|
+
return new Promise((resolve3) => {
|
|
14073
|
+
const req = get(`${NPM_REGISTRY_BASE}${distTag}`, { timeout: 5e3 }, (res) => {
|
|
14074
|
+
if (res.statusCode !== 200) {
|
|
14075
|
+
res.resume();
|
|
14076
|
+
resolve3(null);
|
|
14077
|
+
return;
|
|
14078
|
+
}
|
|
14079
|
+
let body = "";
|
|
14080
|
+
res.on("data", (chunk) => {
|
|
14081
|
+
body += chunk.toString();
|
|
14082
|
+
});
|
|
14083
|
+
res.on("end", () => {
|
|
14084
|
+
try {
|
|
14085
|
+
const version = JSON.parse(body).version;
|
|
14086
|
+
resolve3(typeof version === "string" ? version : null);
|
|
14087
|
+
} catch {
|
|
14088
|
+
resolve3(null);
|
|
14089
|
+
}
|
|
14090
|
+
});
|
|
14091
|
+
});
|
|
14092
|
+
req.on("error", () => resolve3(null));
|
|
14093
|
+
req.on("timeout", () => {
|
|
14094
|
+
req.destroy();
|
|
14095
|
+
resolve3(null);
|
|
14096
|
+
});
|
|
14097
|
+
});
|
|
14098
|
+
}
|
|
14099
|
+
function getInstallArgs(pm, versionSpec, scope) {
|
|
14100
|
+
const pkg = `agentv@${versionSpec}`;
|
|
14101
|
+
const baseCmd = pm === "npm" ? "install" : "add";
|
|
14102
|
+
return scope === "global" ? [baseCmd, "-g", pkg] : [baseCmd, pkg];
|
|
14103
|
+
}
|
|
14104
|
+
function findBundledNpmCli(execPath, platform, exists) {
|
|
14105
|
+
const pathApi = platform === "win32" ? win32 : { dirname: dirname3, join: join5 };
|
|
14106
|
+
const execDir = pathApi.dirname(execPath);
|
|
14107
|
+
const candidates = platform === "win32" ? [pathApi.join(execDir, "node_modules", "npm", "bin", "npm-cli.js")] : [
|
|
14108
|
+
pathApi.join(execDir, "..", "lib", "node_modules", "npm", "bin", "npm-cli.js"),
|
|
14109
|
+
pathApi.join(execDir, "node_modules", "npm", "bin", "npm-cli.js")
|
|
14110
|
+
];
|
|
14111
|
+
return candidates.find((candidate) => exists(candidate));
|
|
14112
|
+
}
|
|
14113
|
+
function resolvePackageManagerCommand(pm, args, options) {
|
|
14114
|
+
const execPath = options?.execPath ?? process.execPath;
|
|
14115
|
+
const platform = options?.platform ?? process.platform;
|
|
14116
|
+
const exists = options?.exists ?? existsSync17;
|
|
14117
|
+
const pathApi = platform === "win32" ? win32 : { basename };
|
|
14118
|
+
if (pm === "bun") {
|
|
14119
|
+
const runtimeName = pathApi.basename(execPath).toLowerCase();
|
|
14120
|
+
if ((runtimeName === "bun" || runtimeName === "bun.exe") && exists(execPath)) {
|
|
14121
|
+
return { cmd: execPath, args };
|
|
14122
|
+
}
|
|
14123
|
+
return { cmd: "bun", args };
|
|
14124
|
+
}
|
|
14125
|
+
const npmCliPath = findBundledNpmCli(execPath, platform, exists);
|
|
14126
|
+
if (npmCliPath) {
|
|
14127
|
+
return { cmd: execPath, args: [npmCliPath, ...args] };
|
|
14128
|
+
}
|
|
14129
|
+
return { cmd: "npm", args };
|
|
14130
|
+
}
|
|
14131
|
+
async function performSelfUpdate(options) {
|
|
14132
|
+
const pm = options?.pm ?? detectPackageManager();
|
|
14133
|
+
const currentVersion = options?.currentVersion ?? "unknown";
|
|
14134
|
+
const versionSpec = options?.versionRange ?? getDistTagForVersion(currentVersion === "unknown" ? "" : currentVersion);
|
|
14135
|
+
const scope = options?.scope ?? detectInstallScope();
|
|
14136
|
+
const args = getInstallArgs(pm, versionSpec, scope);
|
|
14137
|
+
const command2 = resolvePackageManagerCommand(pm, args);
|
|
14138
|
+
try {
|
|
14139
|
+
const result = await runCommand(command2.cmd, command2.args);
|
|
14140
|
+
if (result.exitCode !== 0) {
|
|
14141
|
+
return { success: false, currentVersion, scope };
|
|
14142
|
+
}
|
|
14143
|
+
let newVersion;
|
|
14144
|
+
try {
|
|
14145
|
+
const versionResult = await runCommand("agentv", ["--version"]);
|
|
14146
|
+
newVersion = versionResult.stdout.trim();
|
|
14147
|
+
} catch {
|
|
14148
|
+
}
|
|
14149
|
+
return { success: true, currentVersion, newVersion, scope };
|
|
14150
|
+
} catch (error) {
|
|
14151
|
+
if (error instanceof Error) {
|
|
14152
|
+
if (error.message.includes("ENOENT") || error.message.includes("not found")) {
|
|
14153
|
+
const alternative = pm === "npm" ? "bun" : "npm";
|
|
14154
|
+
console.error(`Error: ${pm} not found. Try using --${alternative} flag.`);
|
|
14155
|
+
} else {
|
|
14156
|
+
console.error(`Error: ${error.message}`);
|
|
14157
|
+
}
|
|
14158
|
+
}
|
|
14159
|
+
return { success: false, currentVersion, scope };
|
|
14160
|
+
}
|
|
14161
|
+
}
|
|
14162
|
+
|
|
14024
14163
|
// src/commands/self/index.ts
|
|
14025
14164
|
var updateCommand = command({
|
|
14026
14165
|
name: "update",
|
|
@@ -14080,14 +14219,14 @@ var selfCommand = subcommands({
|
|
|
14080
14219
|
});
|
|
14081
14220
|
|
|
14082
14221
|
// src/commands/skills/index.ts
|
|
14083
|
-
import { existsSync as
|
|
14222
|
+
import { existsSync as existsSync18, readFileSync as readFileSync13, readdirSync as readdirSync5 } from "node:fs";
|
|
14084
14223
|
import path25 from "node:path";
|
|
14085
14224
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
14086
14225
|
function isValidSkillsDir(dir) {
|
|
14087
|
-
if (!
|
|
14226
|
+
if (!existsSync18(dir)) return false;
|
|
14088
14227
|
try {
|
|
14089
14228
|
return readdirSync5(dir, { withFileTypes: true }).some(
|
|
14090
|
-
(e) => e.isDirectory() &&
|
|
14229
|
+
(e) => e.isDirectory() && existsSync18(path25.join(dir, e.name, "SKILL.md"))
|
|
14091
14230
|
);
|
|
14092
14231
|
} catch {
|
|
14093
14232
|
return false;
|
|
@@ -14118,17 +14257,17 @@ function requireSkillsDir() {
|
|
|
14118
14257
|
return dir;
|
|
14119
14258
|
}
|
|
14120
14259
|
function listSkillNames(skillsDir) {
|
|
14121
|
-
if (!
|
|
14260
|
+
if (!existsSync18(skillsDir)) return [];
|
|
14122
14261
|
return readdirSync5(skillsDir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort();
|
|
14123
14262
|
}
|
|
14124
14263
|
function readSkillFile(skillDir, relPath) {
|
|
14125
14264
|
const full = path25.join(skillDir, relPath);
|
|
14126
|
-
if (!
|
|
14265
|
+
if (!existsSync18(full)) return null;
|
|
14127
14266
|
return readFileSync13(full, "utf-8");
|
|
14128
14267
|
}
|
|
14129
14268
|
function collectDir(dir, prefix = "") {
|
|
14130
14269
|
const result = {};
|
|
14131
|
-
if (!
|
|
14270
|
+
if (!existsSync18(dir)) return result;
|
|
14132
14271
|
for (const entry of readdirSync5(dir, { withFileTypes: true })) {
|
|
14133
14272
|
const relPath = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
14134
14273
|
if (entry.isDirectory()) {
|
|
@@ -14140,12 +14279,12 @@ function collectDir(dir, prefix = "") {
|
|
|
14140
14279
|
return result;
|
|
14141
14280
|
}
|
|
14142
14281
|
function listSkillSubdirs(skillDir) {
|
|
14143
|
-
if (!
|
|
14282
|
+
if (!existsSync18(skillDir)) return [];
|
|
14144
14283
|
return readdirSync5(skillDir, { withFileTypes: true }).filter((e) => e.isDirectory() && !e.name.startsWith(".")).map((e) => e.name).sort();
|
|
14145
14284
|
}
|
|
14146
14285
|
function readSkill(skillsDir, name, full) {
|
|
14147
14286
|
const skillDir = path25.join(skillsDir, name);
|
|
14148
|
-
if (!
|
|
14287
|
+
if (!existsSync18(skillDir)) return null;
|
|
14149
14288
|
const content = readSkillFile(skillDir, "SKILL.md");
|
|
14150
14289
|
if (content === null) return null;
|
|
14151
14290
|
if (!full) return { name, content };
|
|
@@ -14162,14 +14301,14 @@ function findRefFile(skillDir, refName) {
|
|
|
14162
14301
|
for (const sub of listSkillSubdirs(skillDir)) {
|
|
14163
14302
|
for (const candidate of candidates) {
|
|
14164
14303
|
const filePath = path25.join(skillDir, sub, candidate);
|
|
14165
|
-
if (
|
|
14304
|
+
if (existsSync18(filePath)) {
|
|
14166
14305
|
return { relPath: `${sub}/${candidate}`, content: readFileSync13(filePath, "utf-8") };
|
|
14167
14306
|
}
|
|
14168
14307
|
}
|
|
14169
14308
|
}
|
|
14170
14309
|
for (const candidate of candidates) {
|
|
14171
14310
|
const filePath = path25.join(skillDir, candidate);
|
|
14172
|
-
if (
|
|
14311
|
+
if (existsSync18(filePath)) {
|
|
14173
14312
|
return { relPath: candidate, content: readFileSync13(filePath, "utf-8") };
|
|
14174
14313
|
}
|
|
14175
14314
|
}
|
|
@@ -14263,7 +14402,7 @@ var skillsGetCommand = command({
|
|
|
14263
14402
|
process.exit(1);
|
|
14264
14403
|
}
|
|
14265
14404
|
const skillDir = path25.join(skillsDir, name);
|
|
14266
|
-
if (!
|
|
14405
|
+
if (!existsSync18(skillDir)) {
|
|
14267
14406
|
const msg = `skill '${name}' not found`;
|
|
14268
14407
|
if (json) {
|
|
14269
14408
|
process.stdout.write(`${JSON.stringify({ success: false, error: msg })}
|
|
@@ -14352,7 +14491,7 @@ var skillsPathCommand = command({
|
|
|
14352
14491
|
const skillsDir = requireSkillsDir();
|
|
14353
14492
|
if (name) {
|
|
14354
14493
|
const skillDir = path25.join(skillsDir, name);
|
|
14355
|
-
if (!
|
|
14494
|
+
if (!existsSync18(skillDir)) {
|
|
14356
14495
|
console.error(`Error: skill '${name}' not found`);
|
|
14357
14496
|
process.exit(1);
|
|
14358
14497
|
}
|
|
@@ -15078,7 +15217,7 @@ var validateCommand = command({
|
|
|
15078
15217
|
});
|
|
15079
15218
|
|
|
15080
15219
|
// src/commands/workspace/clean.ts
|
|
15081
|
-
import { existsSync as
|
|
15220
|
+
import { existsSync as existsSync19 } from "node:fs";
|
|
15082
15221
|
import { readFile as readFile8, readdir as readdir5, rm } from "node:fs/promises";
|
|
15083
15222
|
import path29 from "node:path";
|
|
15084
15223
|
async function confirm2(message) {
|
|
@@ -15107,7 +15246,7 @@ var cleanCommand = command({
|
|
|
15107
15246
|
},
|
|
15108
15247
|
handler: async ({ repo, force }) => {
|
|
15109
15248
|
const poolRoot = getWorkspacePoolRoot();
|
|
15110
|
-
if (!
|
|
15249
|
+
if (!existsSync19(poolRoot)) {
|
|
15111
15250
|
console.log("No workspace pool entries found.");
|
|
15112
15251
|
return;
|
|
15113
15252
|
}
|
|
@@ -15207,7 +15346,7 @@ var depsCommand = command({
|
|
|
15207
15346
|
});
|
|
15208
15347
|
|
|
15209
15348
|
// src/commands/workspace/list.ts
|
|
15210
|
-
import { existsSync as
|
|
15349
|
+
import { existsSync as existsSync20 } from "node:fs";
|
|
15211
15350
|
import { readFile as readFile9, readdir as readdir6, stat as stat2 } from "node:fs/promises";
|
|
15212
15351
|
import path31 from "node:path";
|
|
15213
15352
|
async function getDirectorySize(dirPath) {
|
|
@@ -15239,7 +15378,7 @@ var listCommand = command({
|
|
|
15239
15378
|
args: {},
|
|
15240
15379
|
handler: async () => {
|
|
15241
15380
|
const poolRoot = getWorkspacePoolRoot();
|
|
15242
|
-
if (!
|
|
15381
|
+
if (!existsSync20(poolRoot)) {
|
|
15243
15382
|
console.log("No workspace pool entries found.");
|
|
15244
15383
|
return;
|
|
15245
15384
|
}
|
|
@@ -15294,15 +15433,15 @@ var workspaceCommand = subcommands({
|
|
|
15294
15433
|
});
|
|
15295
15434
|
|
|
15296
15435
|
// src/update-check.ts
|
|
15297
|
-
import { spawn as
|
|
15436
|
+
import { spawn as spawn3 } from "node:child_process";
|
|
15298
15437
|
import { readFile as readFile10 } from "node:fs/promises";
|
|
15299
|
-
import { join as
|
|
15438
|
+
import { join as join6 } from "node:path";
|
|
15300
15439
|
var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
15301
15440
|
var CONFIG_DIR = getAgentvConfigDir();
|
|
15302
15441
|
var CACHE_FILE = "version-check.json";
|
|
15303
|
-
var
|
|
15442
|
+
var NPM_REGISTRY_BASE2 = "https://registry.npmjs.org/agentv/";
|
|
15304
15443
|
async function getCachedUpdateInfo(path33) {
|
|
15305
|
-
const filePath = path33 ??
|
|
15444
|
+
const filePath = path33 ?? join6(CONFIG_DIR, CACHE_FILE);
|
|
15306
15445
|
try {
|
|
15307
15446
|
const raw = await readFile10(filePath, "utf-8");
|
|
15308
15447
|
const data = JSON.parse(raw);
|
|
@@ -15336,8 +15475,8 @@ function buildNotice(currentVersion, latestVersion) {
|
|
|
15336
15475
|
}
|
|
15337
15476
|
function backgroundUpdateCheck(distTag = "latest") {
|
|
15338
15477
|
const dir = CONFIG_DIR;
|
|
15339
|
-
const filePath =
|
|
15340
|
-
const registryUrl = `${
|
|
15478
|
+
const filePath = join6(dir, CACHE_FILE);
|
|
15479
|
+
const registryUrl = `${NPM_REGISTRY_BASE2}${distTag}`;
|
|
15341
15480
|
const script = `
|
|
15342
15481
|
const https = require('https');
|
|
15343
15482
|
const fs = require('fs');
|
|
@@ -15360,7 +15499,7 @@ function backgroundUpdateCheck(distTag = "latest") {
|
|
|
15360
15499
|
}).on('error', () => process.exit()).on('timeout', function() { this.destroy(); process.exit(); });
|
|
15361
15500
|
`;
|
|
15362
15501
|
try {
|
|
15363
|
-
const child =
|
|
15502
|
+
const child = spawn3(process.execPath, ["-e", script], {
|
|
15364
15503
|
detached: true,
|
|
15365
15504
|
stdio: "ignore",
|
|
15366
15505
|
windowsHide: true
|
|
@@ -15493,4 +15632,4 @@ export {
|
|
|
15493
15632
|
preprocessArgv,
|
|
15494
15633
|
runCli
|
|
15495
15634
|
};
|
|
15496
|
-
//# sourceMappingURL=chunk-
|
|
15635
|
+
//# sourceMappingURL=chunk-SMZQ7RPW.js.map
|