@ls-stack/agent-eval 0.26.0 → 0.26.2

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.
@@ -1,6 +1,6 @@
1
1
  import { E as updateManualScoreRequestSchema, T as createRunRequestSchema } from "./runOrchestration-B31SV_Bq.mjs";
2
- import "./src-DIFRuMuH.mjs";
3
- import { t as getRunnerInstance } from "./runner-dnkl4pWd.mjs";
2
+ import "./src-CLMrRle2.mjs";
3
+ import { t as getRunnerInstance } from "./runner-LHN7L-xk.mjs";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
6
6
  import { z } from "zod/v4";
@@ -138,9 +138,13 @@ const openRunLocationRequestSchema = z.object({
138
138
  line: z.number().int().min(1),
139
139
  column: z.number().int().min(1)
140
140
  });
141
+ const importQuerySeparatorRegex = /[?#]/;
141
142
  function isInsideWorkspace(path, workspaceRoot) {
142
143
  return path === workspaceRoot || path.startsWith(workspaceRoot + sep);
143
144
  }
145
+ function stripImportQuery(path) {
146
+ return path.split(importQuerySeparatorRegex, 1)[0] ?? path;
147
+ }
144
148
  const runsRoutes = new Hono().get("/", (c) => {
145
149
  const runs = getRunnerInstance().getRuns();
146
150
  return c.json(runs, 200);
@@ -159,7 +163,8 @@ const runsRoutes = new Hono().get("/", (c) => {
159
163
  }).post("/actions/open-location", zValidator("json", openRunLocationRequestSchema), (c) => {
160
164
  const body = c.req.valid("json");
161
165
  const workspaceRoot = getRunnerInstance().getWorkspaceRoot();
162
- const absolutePath = isAbsolute(body.file) ? resolve(body.file) : resolve(workspaceRoot, body.file);
166
+ const file = stripImportQuery(body.file);
167
+ const absolutePath = isAbsolute(file) ? resolve(file) : resolve(workspaceRoot, file);
163
168
  if (!isInsideWorkspace(absolutePath, workspaceRoot)) return c.json({ error: "Resolved path escapes workspace" }, 400);
164
169
  if (!existsSync(absolutePath)) return c.json({ error: "Source file not found on disk" }, 404);
165
170
  const target = `${absolutePath}:${String(body.line)}:${String(body.column)}`;
@@ -291,6 +296,7 @@ const workspaceRoutes = new Hono().get("/", async (c) => {
291
296
  const runner = getRunnerInstance();
292
297
  const packageManager = await detectWorkspacePackageManager(runner.getWorkspaceRoot());
293
298
  return c.json({
299
+ workspaceRoot: runner.getWorkspaceRoot(),
294
300
  packageManager,
295
301
  llmCalls: runner.getLlmCallsConfig(),
296
302
  apiCalls: runner.getApiCallsConfig()