agentv 4.41.6 → 4.42.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.
Files changed (29) hide show
  1. package/dist/{artifact-writer-6O2T6PFY.js → artifact-writer-7ZQBLD6J.js} +4 -4
  2. package/dist/{chunk-TVSTWDYD.js → chunk-2H3D2AFZ.js} +100 -6
  3. package/dist/{chunk-TVSTWDYD.js.map → chunk-2H3D2AFZ.js.map} +1 -1
  4. package/dist/{chunk-KEDUYY5Q.js → chunk-CVQXNBO7.js} +50 -18
  5. package/dist/chunk-CVQXNBO7.js.map +1 -0
  6. package/dist/{chunk-CGMO3QA7.js → chunk-IX5KWMMM.js} +10 -6
  7. package/dist/{chunk-CGMO3QA7.js.map → chunk-IX5KWMMM.js.map} +1 -1
  8. package/dist/{chunk-AQBJ2NUK.js → chunk-PN3QFUFF.js} +2 -2
  9. package/dist/{chunk-V7YYOR2B.js → chunk-RP5425KQ.js} +25 -18
  10. package/dist/chunk-RP5425KQ.js.map +1 -0
  11. package/dist/cli.js +5 -5
  12. package/dist/dashboard/assets/index-BEZOKdZO.css +1 -0
  13. package/dist/dashboard/assets/index-CxvIJei9.js +118 -0
  14. package/dist/dashboard/assets/{index-_jpKSzIf.js → index-DFcMa-UW.js} +1 -1
  15. package/dist/dashboard/index.html +2 -2
  16. package/dist/{dist-5VQASJZI.js → dist-XANKSXGP.js} +3 -3
  17. package/dist/index.js +5 -5
  18. package/dist/{interactive-JRMDZ63V.js → interactive-MGFKEFXD.js} +5 -5
  19. package/dist/{ts-eval-loader-IVMSOI7K-JUPHBJM7.js → ts-eval-loader-DXSXFWYI-WV7NYVUG.js} +2 -2
  20. package/package.json +1 -1
  21. package/dist/chunk-KEDUYY5Q.js.map +0 -1
  22. package/dist/chunk-V7YYOR2B.js.map +0 -1
  23. package/dist/dashboard/assets/index-BnYCCJ7O.css +0 -1
  24. package/dist/dashboard/assets/index-DaueD7GO.js +0 -118
  25. /package/dist/{artifact-writer-6O2T6PFY.js.map → artifact-writer-7ZQBLD6J.js.map} +0 -0
  26. /package/dist/{chunk-AQBJ2NUK.js.map → chunk-PN3QFUFF.js.map} +0 -0
  27. /package/dist/{dist-5VQASJZI.js.map → dist-XANKSXGP.js.map} +0 -0
  28. /package/dist/{interactive-JRMDZ63V.js.map → interactive-MGFKEFXD.js.map} +0 -0
  29. /package/dist/{ts-eval-loader-IVMSOI7K-JUPHBJM7.js.map → ts-eval-loader-DXSXFWYI-WV7NYVUG.js.map} +0 -0
@@ -4,8 +4,8 @@ import {
4
4
  buildResultIndexArtifact,
5
5
  writeArtifactsFromResults,
6
6
  writePerTestArtifacts
7
- } from "./chunk-AQBJ2NUK.js";
8
- import "./chunk-KEDUYY5Q.js";
7
+ } from "./chunk-PN3QFUFF.js";
8
+ import "./chunk-CVQXNBO7.js";
9
9
  import "./chunk-76FOHROU.js";
10
10
  import "./chunk-BPGJ4HBU.js";
11
11
  import {
@@ -20,7 +20,7 @@ import {
20
20
  parseJsonlResults,
21
21
  writeArtifacts,
22
22
  writeInitialBenchmarkArtifact
23
- } from "./chunk-CGMO3QA7.js";
23
+ } from "./chunk-IX5KWMMM.js";
24
24
  import "./chunk-NPVGBFF6.js";
25
25
  import "./chunk-M7BUKBAF.js";
26
26
  import "./chunk-5H446C7X.js";
@@ -41,4 +41,4 @@ export {
41
41
  writeInitialBenchmarkArtifact,
42
42
  writePerTestArtifacts
43
43
  };
44
- //# sourceMappingURL=artifact-writer-6O2T6PFY.js.map
44
+ //# sourceMappingURL=artifact-writer-7ZQBLD6J.js.map
@@ -56,12 +56,12 @@ import {
56
56
  validateTargetsFile,
57
57
  validateWorkspacePaths,
58
58
  writeRunTags
59
- } from "./chunk-V7YYOR2B.js";
59
+ } from "./chunk-RP5425KQ.js";
60
60
  import {
61
61
  materializeEvalBundle,
62
62
  toSnakeCaseDeep as toSnakeCaseDeep2,
63
63
  writeArtifactsFromResults as writeArtifactsFromResults2
64
- } from "./chunk-AQBJ2NUK.js";
64
+ } from "./chunk-PN3QFUFF.js";
65
65
  import {
66
66
  DEFAULT_CATEGORY,
67
67
  deriveCategory,
@@ -76,7 +76,7 @@ import {
76
76
  syncProjects,
77
77
  transpileEvalYamlFile,
78
78
  trimBaselineResult
79
- } from "./chunk-KEDUYY5Q.js";
79
+ } from "./chunk-CVQXNBO7.js";
80
80
  import {
81
81
  DEFAULT_THRESHOLD,
82
82
  EXECUTION_TRACE_SCHEMA_VERSION,
@@ -127,7 +127,7 @@ import {
127
127
  traceEnvelopeToTranscriptMessages,
128
128
  traceFromTranscriptJsonLines,
129
129
  writeArtifactsFromResults
130
- } from "./chunk-CGMO3QA7.js";
130
+ } from "./chunk-IX5KWMMM.js";
131
131
  import {
132
132
  __commonJS,
133
133
  __require,
@@ -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-JRMDZ63V.js");
4809
+ const { launchInteractiveWizard } = await import("./interactive-MGFKEFXD.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";
@@ -13282,6 +13283,7 @@ async function handleRuns(c4, { searchDir, agentvDir, projectId }) {
13282
13283
  execution_error_count: executionErrorCount,
13283
13284
  size_bytes: m.sizeBytes,
13284
13285
  source: m.source,
13286
+ on_remote: m.on_remote,
13285
13287
  ...target && { target },
13286
13288
  ...experiment && { experiment },
13287
13289
  ...tagFields,
@@ -13805,6 +13807,89 @@ function handleFeedbackRead(c4, { searchDir }) {
13805
13807
  const resultsDir = path26.join(searchDir, ".agentv", "results");
13806
13808
  return c4.json(readFeedback(existsSync16(resultsDir) ? resultsDir : searchDir));
13807
13809
  }
13810
+ function expandHomePath(inputPath) {
13811
+ if (inputPath === "~") return homedir();
13812
+ if (inputPath.startsWith("~/") || inputPath.startsWith("~\\")) {
13813
+ return path26.join(homedir(), inputPath.slice(2));
13814
+ }
13815
+ return inputPath;
13816
+ }
13817
+ function resolveBrowsePath(inputPath, cwd) {
13818
+ const trimmed = inputPath?.trim() ?? "";
13819
+ const expanded = trimmed.length > 0 ? expandHomePath(trimmed) : cwd;
13820
+ return path26.resolve(cwd, expanded);
13821
+ }
13822
+ function hasAgentvDir(dirPath) {
13823
+ try {
13824
+ return statSync6(path26.join(dirPath, ".agentv")).isDirectory();
13825
+ } catch {
13826
+ return false;
13827
+ }
13828
+ }
13829
+ function directoryBrowseEntry(dirPath) {
13830
+ return {
13831
+ name: path26.basename(dirPath) || dirPath,
13832
+ path: dirPath,
13833
+ hasAgentv: hasAgentvDir(dirPath)
13834
+ };
13835
+ }
13836
+ function browseFilesystemDirectories(inputPath, cwd) {
13837
+ const browsePath = resolveBrowsePath(inputPath, cwd);
13838
+ if (!existsSync16(browsePath)) {
13839
+ throw new Error(`Directory not found: ${browsePath}`);
13840
+ }
13841
+ let stats;
13842
+ try {
13843
+ stats = statSync6(browsePath);
13844
+ } catch (err2) {
13845
+ throw new Error(`Unable to read directory: ${err2.message}`);
13846
+ }
13847
+ if (!stats.isDirectory()) {
13848
+ throw new Error(`Not a directory: ${browsePath}`);
13849
+ }
13850
+ let entries2;
13851
+ try {
13852
+ entries2 = readdirSync4(browsePath, { withFileTypes: true }).map((entry) => {
13853
+ const entryPath = path26.join(browsePath, entry.name);
13854
+ if (entry.isDirectory()) return directoryBrowseEntry(entryPath);
13855
+ if (entry.isSymbolicLink()) {
13856
+ try {
13857
+ return statSync6(entryPath).isDirectory() ? directoryBrowseEntry(entryPath) : null;
13858
+ } catch {
13859
+ return null;
13860
+ }
13861
+ }
13862
+ return null;
13863
+ }).filter((entry) => entry !== null).sort((a, b) => {
13864
+ if (a.hasAgentv !== b.hasAgentv) return a.hasAgentv ? -1 : 1;
13865
+ return a.name.localeCompare(b.name);
13866
+ });
13867
+ } catch (err2) {
13868
+ throw new Error(`Unable to read directory: ${err2.message}`);
13869
+ }
13870
+ const parentPath = path26.dirname(browsePath);
13871
+ return {
13872
+ path: browsePath,
13873
+ parentPath: parentPath !== browsePath ? parentPath : void 0,
13874
+ current: directoryBrowseEntry(browsePath),
13875
+ entries: entries2
13876
+ };
13877
+ }
13878
+ function directoryBrowseEntryToWire(entry) {
13879
+ return {
13880
+ name: entry.name,
13881
+ path: entry.path,
13882
+ has_agentv: entry.hasAgentv
13883
+ };
13884
+ }
13885
+ function directoryBrowseResultToWire(result) {
13886
+ return {
13887
+ path: result.path,
13888
+ ...result.parentPath !== void 0 && { parent_path: result.parentPath },
13889
+ current: directoryBrowseEntryToWire(result.current),
13890
+ entries: result.entries.map(directoryBrowseEntryToWire)
13891
+ };
13892
+ }
13808
13893
  async function handleRunTagsPut(c4, { searchDir, projectId }) {
13809
13894
  const filename = c4.req.param("filename") ?? "";
13810
13895
  const meta = await findRunById(searchDir, filename, projectId);
@@ -14060,6 +14145,15 @@ function createApp(results, resultDir, cwd, sourceFile, options) {
14060
14145
  );
14061
14146
  return c4.json({ projects });
14062
14147
  });
14148
+ app2.get("/api/filesystem/browse", (c4) => {
14149
+ try {
14150
+ return c4.json(
14151
+ directoryBrowseResultToWire(browseFilesystemDirectories(c4.req.query("path"), searchDir))
14152
+ );
14153
+ } catch (err2) {
14154
+ return c4.json({ error: err2.message }, 400);
14155
+ }
14156
+ });
14063
14157
  app2.post("/api/projects", async (c4) => {
14064
14158
  if (readOnly) {
14065
14159
  return c4.json({ error: "Dashboard is running in read-only mode" }, 403);
@@ -16603,4 +16697,4 @@ export {
16603
16697
  preprocessArgv,
16604
16698
  runCli
16605
16699
  };
16606
- //# sourceMappingURL=chunk-TVSTWDYD.js.map
16700
+ //# sourceMappingURL=chunk-2H3D2AFZ.js.map