agentv 4.41.6-next.1 → 4.42.0-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/{chunk-AK4JMDN2.js → chunk-OB22TCWU.js} +96 -3
- package/dist/{chunk-AK4JMDN2.js.map → chunk-OB22TCWU.js.map} +1 -1
- package/dist/{chunk-BSSFZB4P.js → chunk-S3QAKOIY.js} +2 -2
- package/dist/{chunk-BSSFZB4P.js.map → chunk-S3QAKOIY.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/dashboard/assets/index-B8f0vL8Y.js +118 -0
- package/dist/dashboard/assets/index-CE7sZEXf.css +1 -0
- package/dist/dashboard/assets/{index-_jpKSzIf.js → index-ZSsKg-gp.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +2 -2
- package/dist/{interactive-BCOLVCKW.js → interactive-HOXOATB2.js} +2 -2
- package/package.json +1 -1
- package/dist/dashboard/assets/index-BnYCCJ7O.css +0 -1
- package/dist/dashboard/assets/index-DaueD7GO.js +0 -118
- /package/dist/{interactive-BCOLVCKW.js.map → interactive-HOXOATB2.js.map} +0 -0
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
validateTargetsFile,
|
|
57
57
|
validateWorkspacePaths,
|
|
58
58
|
writeRunTags
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-S3QAKOIY.js";
|
|
60
60
|
import {
|
|
61
61
|
materializeEvalBundle,
|
|
62
62
|
toSnakeCaseDeep as toSnakeCaseDeep2,
|
|
@@ -4806,7 +4806,7 @@ var evalRunCommand = command({
|
|
|
4806
4806
|
},
|
|
4807
4807
|
handler: async (args) => {
|
|
4808
4808
|
if (args.evalPaths.length === 0 && process.stdin.isTTY) {
|
|
4809
|
-
const { launchInteractiveWizard } = await import("./interactive-
|
|
4809
|
+
const { launchInteractiveWizard } = await import("./interactive-HOXOATB2.js");
|
|
4810
4810
|
await launchInteractiveWizard();
|
|
4811
4811
|
return;
|
|
4812
4812
|
}
|
|
@@ -12358,6 +12358,7 @@ var resultsCommand = subcommands({
|
|
|
12358
12358
|
|
|
12359
12359
|
// src/commands/results/serve.ts
|
|
12360
12360
|
import { existsSync as existsSync16, readFileSync as readFileSync12, readdirSync as readdirSync4, statSync as statSync6, writeFileSync as writeFileSync6 } from "node:fs";
|
|
12361
|
+
import { homedir } from "node:os";
|
|
12361
12362
|
import path26 from "node:path";
|
|
12362
12363
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
12363
12364
|
import { Hono } from "hono";
|
|
@@ -13805,6 +13806,89 @@ function handleFeedbackRead(c4, { searchDir }) {
|
|
|
13805
13806
|
const resultsDir = path26.join(searchDir, ".agentv", "results");
|
|
13806
13807
|
return c4.json(readFeedback(existsSync16(resultsDir) ? resultsDir : searchDir));
|
|
13807
13808
|
}
|
|
13809
|
+
function expandHomePath(inputPath) {
|
|
13810
|
+
if (inputPath === "~") return homedir();
|
|
13811
|
+
if (inputPath.startsWith("~/") || inputPath.startsWith("~\\")) {
|
|
13812
|
+
return path26.join(homedir(), inputPath.slice(2));
|
|
13813
|
+
}
|
|
13814
|
+
return inputPath;
|
|
13815
|
+
}
|
|
13816
|
+
function resolveBrowsePath(inputPath, cwd) {
|
|
13817
|
+
const trimmed = inputPath?.trim() ?? "";
|
|
13818
|
+
const expanded = trimmed.length > 0 ? expandHomePath(trimmed) : cwd;
|
|
13819
|
+
return path26.resolve(cwd, expanded);
|
|
13820
|
+
}
|
|
13821
|
+
function hasAgentvDir(dirPath) {
|
|
13822
|
+
try {
|
|
13823
|
+
return statSync6(path26.join(dirPath, ".agentv")).isDirectory();
|
|
13824
|
+
} catch {
|
|
13825
|
+
return false;
|
|
13826
|
+
}
|
|
13827
|
+
}
|
|
13828
|
+
function directoryBrowseEntry(dirPath) {
|
|
13829
|
+
return {
|
|
13830
|
+
name: path26.basename(dirPath) || dirPath,
|
|
13831
|
+
path: dirPath,
|
|
13832
|
+
hasAgentv: hasAgentvDir(dirPath)
|
|
13833
|
+
};
|
|
13834
|
+
}
|
|
13835
|
+
function browseFilesystemDirectories(inputPath, cwd) {
|
|
13836
|
+
const browsePath = resolveBrowsePath(inputPath, cwd);
|
|
13837
|
+
if (!existsSync16(browsePath)) {
|
|
13838
|
+
throw new Error(`Directory not found: ${browsePath}`);
|
|
13839
|
+
}
|
|
13840
|
+
let stats;
|
|
13841
|
+
try {
|
|
13842
|
+
stats = statSync6(browsePath);
|
|
13843
|
+
} catch (err2) {
|
|
13844
|
+
throw new Error(`Unable to read directory: ${err2.message}`);
|
|
13845
|
+
}
|
|
13846
|
+
if (!stats.isDirectory()) {
|
|
13847
|
+
throw new Error(`Not a directory: ${browsePath}`);
|
|
13848
|
+
}
|
|
13849
|
+
let entries2;
|
|
13850
|
+
try {
|
|
13851
|
+
entries2 = readdirSync4(browsePath, { withFileTypes: true }).map((entry) => {
|
|
13852
|
+
const entryPath = path26.join(browsePath, entry.name);
|
|
13853
|
+
if (entry.isDirectory()) return directoryBrowseEntry(entryPath);
|
|
13854
|
+
if (entry.isSymbolicLink()) {
|
|
13855
|
+
try {
|
|
13856
|
+
return statSync6(entryPath).isDirectory() ? directoryBrowseEntry(entryPath) : null;
|
|
13857
|
+
} catch {
|
|
13858
|
+
return null;
|
|
13859
|
+
}
|
|
13860
|
+
}
|
|
13861
|
+
return null;
|
|
13862
|
+
}).filter((entry) => entry !== null).sort((a, b) => {
|
|
13863
|
+
if (a.hasAgentv !== b.hasAgentv) return a.hasAgentv ? -1 : 1;
|
|
13864
|
+
return a.name.localeCompare(b.name);
|
|
13865
|
+
});
|
|
13866
|
+
} catch (err2) {
|
|
13867
|
+
throw new Error(`Unable to read directory: ${err2.message}`);
|
|
13868
|
+
}
|
|
13869
|
+
const parentPath = path26.dirname(browsePath);
|
|
13870
|
+
return {
|
|
13871
|
+
path: browsePath,
|
|
13872
|
+
parentPath: parentPath !== browsePath ? parentPath : void 0,
|
|
13873
|
+
current: directoryBrowseEntry(browsePath),
|
|
13874
|
+
entries: entries2
|
|
13875
|
+
};
|
|
13876
|
+
}
|
|
13877
|
+
function directoryBrowseEntryToWire(entry) {
|
|
13878
|
+
return {
|
|
13879
|
+
name: entry.name,
|
|
13880
|
+
path: entry.path,
|
|
13881
|
+
has_agentv: entry.hasAgentv
|
|
13882
|
+
};
|
|
13883
|
+
}
|
|
13884
|
+
function directoryBrowseResultToWire(result) {
|
|
13885
|
+
return {
|
|
13886
|
+
path: result.path,
|
|
13887
|
+
...result.parentPath !== void 0 && { parent_path: result.parentPath },
|
|
13888
|
+
current: directoryBrowseEntryToWire(result.current),
|
|
13889
|
+
entries: result.entries.map(directoryBrowseEntryToWire)
|
|
13890
|
+
};
|
|
13891
|
+
}
|
|
13808
13892
|
async function handleRunTagsPut(c4, { searchDir, projectId }) {
|
|
13809
13893
|
const filename = c4.req.param("filename") ?? "";
|
|
13810
13894
|
const meta = await findRunById(searchDir, filename, projectId);
|
|
@@ -14060,6 +14144,15 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
|
|
|
14060
14144
|
);
|
|
14061
14145
|
return c4.json({ projects });
|
|
14062
14146
|
});
|
|
14147
|
+
app2.get("/api/filesystem/browse", (c4) => {
|
|
14148
|
+
try {
|
|
14149
|
+
return c4.json(
|
|
14150
|
+
directoryBrowseResultToWire(browseFilesystemDirectories(c4.req.query("path"), searchDir))
|
|
14151
|
+
);
|
|
14152
|
+
} catch (err2) {
|
|
14153
|
+
return c4.json({ error: err2.message }, 400);
|
|
14154
|
+
}
|
|
14155
|
+
});
|
|
14063
14156
|
app2.post("/api/projects", async (c4) => {
|
|
14064
14157
|
if (readOnly) {
|
|
14065
14158
|
return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
|
|
@@ -16603,4 +16696,4 @@ export {
|
|
|
16603
16696
|
preprocessArgv,
|
|
16604
16697
|
runCli
|
|
16605
16698
|
};
|
|
16606
|
-
//# sourceMappingURL=chunk-
|
|
16699
|
+
//# sourceMappingURL=chunk-OB22TCWU.js.map
|