agentv 4.38.0-next.1 → 4.38.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/{artifact-writer-RG43U2YF.js → artifact-writer-MK5X5MSO.js} +4 -4
- package/dist/{chunk-KL33753Q.js → chunk-3G4BK6Z5.js} +6 -6
- package/dist/{chunk-P23UT54D.js → chunk-DKUAETXE.js} +3 -3
- package/dist/{chunk-IUWDUONH.js → chunk-EKMMIULD.js} +8 -8
- package/dist/chunk-EKMMIULD.js.map +1 -0
- package/dist/{chunk-Q5IJMKPS.js → chunk-NLTIK3LV.js} +2 -2
- package/dist/{chunk-3KEVTQRM.js → chunk-VBHHZQS6.js} +43 -77
- package/dist/{chunk-3KEVTQRM.js.map → chunk-VBHHZQS6.js.map} +1 -1
- 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-QFAAM4SI.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/{artifact-writer-RG43U2YF.js.map → artifact-writer-MK5X5MSO.js.map} +0 -0
- /package/dist/{chunk-KL33753Q.js.map → chunk-3G4BK6Z5.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-QFAAM4SI.js.map} +0 -0
- /package/dist/{ts-eval-loader-XXZBXY7L-RLXQGTHS.js.map → ts-eval-loader-TJT6BGFF-DI7XNSO4.js.map} +0 -0
|
@@ -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
|
|
@@ -6184,7 +6184,7 @@ async function expandFileReferences(tests, evalFileDir) {
|
|
|
6184
6184
|
return expanded;
|
|
6185
6185
|
}
|
|
6186
6186
|
|
|
6187
|
-
// ../../packages/core/dist/chunk-
|
|
6187
|
+
// ../../packages/core/dist/chunk-RH5LAMMU.js
|
|
6188
6188
|
import path48 from "node:path";
|
|
6189
6189
|
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
6190
6190
|
import { existsSync as existsSync7 } from "node:fs";
|
|
@@ -6192,13 +6192,13 @@ import path47 from "node:path";
|
|
|
6192
6192
|
import micromatch4 from "micromatch";
|
|
6193
6193
|
import { mkdir, readFile as readFile3, writeFile } from "node:fs/promises";
|
|
6194
6194
|
import path5 from "node:path";
|
|
6195
|
-
import { execFile as
|
|
6195
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
6196
6196
|
import { createHash as createHash5, randomUUID as randomUUID10 } from "node:crypto";
|
|
6197
6197
|
import { existsSync as existsSync6 } from "node:fs";
|
|
6198
6198
|
import { copyFile as copyFile2, mkdir as mkdir17, readdir as readdir8, stat as stat9 } from "node:fs/promises";
|
|
6199
6199
|
import path46 from "node:path";
|
|
6200
6200
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
6201
|
-
import { promisify as
|
|
6201
|
+
import { promisify as promisify6 } from "node:util";
|
|
6202
6202
|
import micromatch3 from "micromatch";
|
|
6203
6203
|
import { mkdtemp, rm, writeFile as writeFile2 } from "node:fs/promises";
|
|
6204
6204
|
import { tmpdir } from "node:os";
|
|
@@ -18852,7 +18852,7 @@ var RequestError = class _RequestError extends Error {
|
|
|
18852
18852
|
}
|
|
18853
18853
|
};
|
|
18854
18854
|
|
|
18855
|
-
// ../../packages/core/dist/chunk-
|
|
18855
|
+
// ../../packages/core/dist/chunk-RH5LAMMU.js
|
|
18856
18856
|
import { exec as execCallback } from "node:child_process";
|
|
18857
18857
|
import { readdirSync, statSync } from "node:fs";
|
|
18858
18858
|
import { readFile as readFile32, readdir as readdir2, stat as stat2 } from "node:fs/promises";
|
|
@@ -18927,18 +18927,16 @@ import path33 from "node:path";
|
|
|
18927
18927
|
import fg3 from "fast-glob";
|
|
18928
18928
|
import { cp, mkdir as mkdir14, readdir as readdir5, rm as rm4, stat as stat6 } from "node:fs/promises";
|
|
18929
18929
|
import path34 from "node:path";
|
|
18930
|
-
import { execFile } from "node:child_process";
|
|
18931
18930
|
import { createHash as createHash3 } from "node:crypto";
|
|
18932
18931
|
import { existsSync as existsSync3 } from "node:fs";
|
|
18933
18932
|
import { cp as cp2, mkdir as mkdir15, readFile as readFile11, readdir as readdir6, rm as rm5, unlink, writeFile as writeFile9 } from "node:fs/promises";
|
|
18934
18933
|
import path35 from "node:path";
|
|
18935
|
-
import {
|
|
18936
|
-
import { execFile as execFile2, spawn as spawn5 } from "node:child_process";
|
|
18934
|
+
import { execFile, spawn as spawn5 } from "node:child_process";
|
|
18937
18935
|
import { createHash as createHash4, randomUUID as randomUUID9 } from "node:crypto";
|
|
18938
18936
|
import { existsSync as existsSync5, readFileSync as readFileSync3 } from "node:fs";
|
|
18939
18937
|
import { mkdir as mkdir16, rename, rm as rm6 } from "node:fs/promises";
|
|
18940
18938
|
import path37 from "node:path";
|
|
18941
|
-
import { promisify as
|
|
18939
|
+
import { promisify as promisify5 } from "node:util";
|
|
18942
18940
|
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync22, readdirSync as readdirSync3, statSync as statSync2, writeFileSync } from "node:fs";
|
|
18943
18941
|
import path36 from "node:path";
|
|
18944
18942
|
import { stringify as stringifyYaml } from "yaml";
|
|
@@ -33000,30 +32998,6 @@ function normalizeHostPath(host, rawPath) {
|
|
|
33000
32998
|
function stripGitSuffix(value) {
|
|
33001
32999
|
return value.replace(/\.git$/i, "");
|
|
33002
33000
|
}
|
|
33003
|
-
var execFileAsync = promisify5(execFile);
|
|
33004
|
-
function gitEnv() {
|
|
33005
|
-
const env = { ...process.env };
|
|
33006
|
-
for (const key of Object.keys(env)) {
|
|
33007
|
-
if (key.startsWith("GIT_") && key !== "GIT_SSH_COMMAND") {
|
|
33008
|
-
delete env[key];
|
|
33009
|
-
}
|
|
33010
|
-
}
|
|
33011
|
-
return {
|
|
33012
|
-
...env,
|
|
33013
|
-
GIT_TERMINAL_PROMPT: "0",
|
|
33014
|
-
GIT_ASKPASS: "",
|
|
33015
|
-
GIT_SSH_COMMAND: "ssh -o BatchMode=yes"
|
|
33016
|
-
};
|
|
33017
|
-
}
|
|
33018
|
-
async function git(args, opts) {
|
|
33019
|
-
const { stdout } = await execFileAsync("git", args, {
|
|
33020
|
-
cwd: opts?.cwd,
|
|
33021
|
-
timeout: opts?.timeout ?? 3e5,
|
|
33022
|
-
env: gitEnv(),
|
|
33023
|
-
maxBuffer: 50 * 1024 * 1024
|
|
33024
|
-
});
|
|
33025
|
-
return stdout.trim();
|
|
33026
|
-
}
|
|
33027
33001
|
function normalizeRepoForFingerprint(repo) {
|
|
33028
33002
|
const result = {};
|
|
33029
33003
|
if (repo.path) {
|
|
@@ -33103,7 +33077,7 @@ var WorkspacePoolManager = class {
|
|
|
33103
33077
|
}
|
|
33104
33078
|
const slotExists = existsSync3(slotPath);
|
|
33105
33079
|
if (slotExists) {
|
|
33106
|
-
await this.resetSlot(slotPath, templatePath, repos, poolReset);
|
|
33080
|
+
await this.resetSlot(slotPath, templatePath, repos, options.repoManager, poolReset);
|
|
33107
33081
|
return {
|
|
33108
33082
|
index: i,
|
|
33109
33083
|
path: slotPath,
|
|
@@ -33235,20 +33209,9 @@ var WorkspacePoolManager = class {
|
|
|
33235
33209
|
* 1. Reset repos to their declared checkout, then git clean per repo
|
|
33236
33210
|
* 2. Re-copy template files (skip repo directories)
|
|
33237
33211
|
*/
|
|
33238
|
-
async resetSlot(slotPath, templatePath, repos, poolReset = "fast") {
|
|
33239
|
-
|
|
33240
|
-
|
|
33241
|
-
const repoDir = path35.join(slotPath, repo.path);
|
|
33242
|
-
if (!existsSync3(repoDir)) {
|
|
33243
|
-
continue;
|
|
33244
|
-
}
|
|
33245
|
-
if (poolReset === "none") {
|
|
33246
|
-
continue;
|
|
33247
|
-
}
|
|
33248
|
-
const ref = getRepoCheckoutRef(repo);
|
|
33249
|
-
await git(["reset", "--hard", ref], { cwd: repoDir });
|
|
33250
|
-
const cleanFlag = poolReset === "strict" ? "-fdx" : "-fd";
|
|
33251
|
-
await git(["clean", cleanFlag], { cwd: repoDir });
|
|
33212
|
+
async resetSlot(slotPath, templatePath, repos, repoManager, poolReset = "fast") {
|
|
33213
|
+
if (poolReset !== "none") {
|
|
33214
|
+
await repoManager.reset(repos, slotPath, poolReset);
|
|
33252
33215
|
}
|
|
33253
33216
|
if (templatePath) {
|
|
33254
33217
|
const repoDirNames = new Set(
|
|
@@ -33450,12 +33413,12 @@ function discoverProjects(rootDir, maxDepth = 2) {
|
|
|
33450
33413
|
scan(absRoot, 0);
|
|
33451
33414
|
return results.sort();
|
|
33452
33415
|
}
|
|
33453
|
-
var
|
|
33416
|
+
var execFileAsync = promisify5(execFile);
|
|
33454
33417
|
var DEFAULT_TIMEOUT_MS2 = 3e5;
|
|
33455
33418
|
var DEFAULT_HEARTBEAT_MS = 3e4;
|
|
33456
33419
|
var ERROR_OUTPUT_LIMIT = 1024 * 1024;
|
|
33457
33420
|
var LOCK_POLL_MS = 100;
|
|
33458
|
-
function
|
|
33421
|
+
function gitEnv() {
|
|
33459
33422
|
const env = { ...process.env };
|
|
33460
33423
|
for (const key of Object.keys(env)) {
|
|
33461
33424
|
if (key.startsWith("GIT_") && key !== "GIT_SSH_COMMAND") {
|
|
@@ -33506,11 +33469,11 @@ function expandHome(value) {
|
|
|
33506
33469
|
if (value.startsWith("~/")) return path37.join(process.env.HOME ?? "~", value.slice(2));
|
|
33507
33470
|
return value;
|
|
33508
33471
|
}
|
|
33509
|
-
async function
|
|
33510
|
-
const { stdout } = await
|
|
33472
|
+
async function git(args, opts) {
|
|
33473
|
+
const { stdout } = await execFileAsync("git", args, {
|
|
33511
33474
|
cwd: opts?.cwd,
|
|
33512
33475
|
timeout: opts?.timeout ?? DEFAULT_TIMEOUT_MS2,
|
|
33513
|
-
env:
|
|
33476
|
+
env: gitEnv(),
|
|
33514
33477
|
maxBuffer: 50 * 1024 * 1024
|
|
33515
33478
|
});
|
|
33516
33479
|
return stdout.trim();
|
|
@@ -33532,7 +33495,7 @@ var RepoManager = class {
|
|
|
33532
33495
|
console.log(`[repo] git start cwd=${opts?.cwd ?? process.cwd()} args=${args.join(" ")}`);
|
|
33533
33496
|
}
|
|
33534
33497
|
try {
|
|
33535
|
-
const output = await
|
|
33498
|
+
const output = await git(args, { ...opts, timeout: opts?.timeout ?? this.timeoutMs });
|
|
33536
33499
|
if (this.verbose) {
|
|
33537
33500
|
console.log(`[repo] git ok durationMs=${Date.now() - startedAt} args=${args.join(" ")}`);
|
|
33538
33501
|
}
|
|
@@ -33560,7 +33523,7 @@ var RepoManager = class {
|
|
|
33560
33523
|
let timedOut = false;
|
|
33561
33524
|
const child = spawn5("git", args, {
|
|
33562
33525
|
cwd: opts.cwd,
|
|
33563
|
-
env:
|
|
33526
|
+
env: gitEnv(),
|
|
33564
33527
|
stdio: ["ignore", "pipe", "pipe"]
|
|
33565
33528
|
});
|
|
33566
33529
|
let timeoutHandle;
|
|
@@ -33793,6 +33756,20 @@ ${output}` : ""}`
|
|
|
33793
33756
|
}
|
|
33794
33757
|
throw new Error(`Cannot resolve ref '${ref}' to a commit.`);
|
|
33795
33758
|
}
|
|
33759
|
+
async resolveCheckoutCommit(repo, targetDir) {
|
|
33760
|
+
const ref = getRepoCheckoutRef(repo);
|
|
33761
|
+
const checkoutSha = await this.resolveCommit(ref, targetDir);
|
|
33762
|
+
const ancestor = repo.ancestor ?? 0;
|
|
33763
|
+
if (ancestor === 0) {
|
|
33764
|
+
return checkoutSha;
|
|
33765
|
+
}
|
|
33766
|
+
try {
|
|
33767
|
+
return await this.resolveCommit(`${checkoutSha}~${ancestor}`, targetDir);
|
|
33768
|
+
} catch {
|
|
33769
|
+
const shallowHint = isFullCommitSha(ref) ? "" : " Ensure the declared commit has enough reachable history in the selected repo.";
|
|
33770
|
+
throw new Error(`Cannot resolve ancestor ${ancestor} of ref '${ref}'.${shallowHint}`);
|
|
33771
|
+
}
|
|
33772
|
+
}
|
|
33796
33773
|
assertNoUserOwnedAlternates(targetDir, acquisition) {
|
|
33797
33774
|
const alternatesPath = path37.join(targetDir, ".git", "objects", "info", "alternates");
|
|
33798
33775
|
if (!existsSync5(alternatesPath)) return;
|
|
@@ -33883,18 +33860,8 @@ ${output}` : ""}`
|
|
|
33883
33860
|
if (this.verbose) {
|
|
33884
33861
|
console.log(`[repo] checkout path=${repo.path} ref=${ref}`);
|
|
33885
33862
|
}
|
|
33886
|
-
const checkoutSha = await this.
|
|
33863
|
+
const checkoutSha = await this.resolveCheckoutCommit(repo, targetDir);
|
|
33887
33864
|
await this.runGit(["checkout", "--detach", checkoutSha], { cwd: targetDir });
|
|
33888
|
-
const ancestor = repo.ancestor ?? 0;
|
|
33889
|
-
if (ancestor > 0) {
|
|
33890
|
-
try {
|
|
33891
|
-
const ancestorSha = await this.resolveCommit(`HEAD~${ancestor}`, targetDir);
|
|
33892
|
-
await this.runGit(["checkout", "--detach", ancestorSha], { cwd: targetDir });
|
|
33893
|
-
} catch {
|
|
33894
|
-
const shallowHint = isFullCommitSha(ref) ? "" : " Ensure the declared commit has enough reachable history in the selected repo.";
|
|
33895
|
-
throw new Error(`Cannot resolve ancestor ${ancestor} of ref '${ref}'.${shallowHint}`);
|
|
33896
|
-
}
|
|
33897
|
-
}
|
|
33898
33865
|
if (this.verbose) {
|
|
33899
33866
|
console.log(
|
|
33900
33867
|
`[repo] materialize done path=${repo.path} target=${targetDir} durationMs=${Date.now() - startedAt}`
|
|
@@ -33922,8 +33889,7 @@ ${output}` : ""}`
|
|
|
33922
33889
|
for (const repo of repos) {
|
|
33923
33890
|
if (!repo.path || !repo.repo) continue;
|
|
33924
33891
|
const targetDir = path37.join(workspacePath, repo.path);
|
|
33925
|
-
const
|
|
33926
|
-
const resetSha = await this.resolveCommit(ref, targetDir);
|
|
33892
|
+
const resetSha = await this.resolveCheckoutCommit(repo, targetDir);
|
|
33927
33893
|
await this.runGit(["reset", "--hard", resetSha], { cwd: targetDir });
|
|
33928
33894
|
await this.runGit(["clean", cleanFlag], { cwd: targetDir });
|
|
33929
33895
|
}
|
|
@@ -37438,7 +37404,7 @@ async function loadTestSuite(evalFilePath, repoRoot, options) {
|
|
|
37438
37404
|
return { tests: await loadTestsFromAgentSkills(evalFilePath) };
|
|
37439
37405
|
}
|
|
37440
37406
|
if (format === "typescript") {
|
|
37441
|
-
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-
|
|
37407
|
+
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-TJT6BGFF-DI7XNSO4.js");
|
|
37442
37408
|
return loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
|
|
37443
37409
|
}
|
|
37444
37410
|
const { tests, parsed, suiteWorkspacePath } = await loadTestsFromYaml(
|
|
@@ -37473,7 +37439,7 @@ async function loadTests(evalFilePath, repoRoot, options) {
|
|
|
37473
37439
|
return loadTestsFromAgentSkills(evalFilePath);
|
|
37474
37440
|
}
|
|
37475
37441
|
if (format === "typescript") {
|
|
37476
|
-
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-
|
|
37442
|
+
const { loadTsEvalSuite: loadTsEvalSuite2 } = await import("./ts-eval-loader-TJT6BGFF-DI7XNSO4.js");
|
|
37477
37443
|
const suite = await loadTsEvalSuite2(evalFilePath, resolveToAbsolutePath(repoRoot), options);
|
|
37478
37444
|
return suite.tests;
|
|
37479
37445
|
}
|
|
@@ -38200,7 +38166,7 @@ ${detailBlock}${ANSI_RESET8}`);
|
|
|
38200
38166
|
console.error(`${ANSI_RED3}Error: ${message}${ANSI_RESET8}`);
|
|
38201
38167
|
}
|
|
38202
38168
|
}
|
|
38203
|
-
var
|
|
38169
|
+
var execFileAsync2 = promisify6(execFile2);
|
|
38204
38170
|
var WORKSPACE_GIT_TIMEOUT_MS = 3e5;
|
|
38205
38171
|
function pathFromRoot(root) {
|
|
38206
38172
|
return root instanceof URL ? fileURLToPath5(root) : String(root);
|
|
@@ -38267,8 +38233,8 @@ async function resetWorkspaceRoot(workspacePath, resetMode, baselineRef) {
|
|
|
38267
38233
|
env: workspaceGitEnv(),
|
|
38268
38234
|
maxBuffer: 50 * 1024 * 1024
|
|
38269
38235
|
};
|
|
38270
|
-
await
|
|
38271
|
-
await
|
|
38236
|
+
await execFileAsync2("git", ["reset", "--hard", baselineRef ?? "HEAD"], opts);
|
|
38237
|
+
await execFileAsync2("git", ["clean", cleanFlag], opts);
|
|
38272
38238
|
return true;
|
|
38273
38239
|
}
|
|
38274
38240
|
function validateDependencyGraph(tests) {
|
|
@@ -41185,15 +41151,15 @@ function computeWeightedMean(entries) {
|
|
|
41185
41151
|
return totalWeight > 0 ? weightedSum / totalWeight : 0;
|
|
41186
41152
|
}
|
|
41187
41153
|
async function runPreflightChecks(env, cwd, log) {
|
|
41188
|
-
const
|
|
41154
|
+
const execFileAsync3 = promisify6(execFile2);
|
|
41189
41155
|
const missing = [];
|
|
41190
41156
|
for (const cmd of env.required_commands ?? []) {
|
|
41191
41157
|
log(`preflight: checking command "${cmd}"`);
|
|
41192
41158
|
try {
|
|
41193
41159
|
if (process.platform === "win32") {
|
|
41194
|
-
await
|
|
41160
|
+
await execFileAsync3("where", [cmd], { cwd });
|
|
41195
41161
|
} else {
|
|
41196
|
-
await
|
|
41162
|
+
await execFileAsync3("sh", ["-c", `command -v ${cmd}`], { cwd });
|
|
41197
41163
|
}
|
|
41198
41164
|
} catch {
|
|
41199
41165
|
missing.push(`command: ${cmd}`);
|
|
@@ -41202,7 +41168,7 @@ async function runPreflightChecks(env, cwd, log) {
|
|
|
41202
41168
|
for (const mod of env.required_python_modules ?? []) {
|
|
41203
41169
|
log(`preflight: checking Python module "${mod}"`);
|
|
41204
41170
|
try {
|
|
41205
|
-
await
|
|
41171
|
+
await execFileAsync3("python3", ["-c", `import ${mod}`], { cwd });
|
|
41206
41172
|
} catch {
|
|
41207
41173
|
missing.push(`python module: ${mod}`);
|
|
41208
41174
|
}
|
|
@@ -41842,4 +41808,4 @@ export {
|
|
|
41842
41808
|
loadTsEvalFile,
|
|
41843
41809
|
loadTsEvalSuite
|
|
41844
41810
|
};
|
|
41845
|
-
//# sourceMappingURL=chunk-
|
|
41811
|
+
//# sourceMappingURL=chunk-VBHHZQS6.js.map
|