@ls-stack/agent-eval 0.28.0 → 0.30.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/{app-mBbAN-Gt.mjs → app-CbOZBHju.mjs} +33 -6
- package/dist/apps/web/dist/assets/index-DEikHy2a.js +118 -0
- package/dist/apps/web/dist/assets/index-DjUTm3M-.css +1 -0
- package/dist/apps/web/dist/index.html +2 -2
- package/dist/bin.mjs +1 -1
- package/dist/{cli-BQwRbqsL.mjs → cli-CiFOqMwS.mjs} +893 -166
- package/dist/index.d.mts +5758 -3526
- package/dist/index.mjs +4 -4
- package/dist/runChild.mjs +4 -2
- package/dist/{runOrchestration-ClWYWPen.mjs → runOrchestration-CO3Vf0cQ.mjs} +654 -34
- package/dist/{runner-BQn_xf36.mjs → runner-4pF_Qrc9.mjs} +1 -1
- package/dist/{runner-DbVB66h9.mjs → runner-CXHkf7ih.mjs} +2 -2
- package/dist/src-BiPLv9ya.mjs +3 -0
- package/package.json +4 -33
- package/skills/agent-eval/SKILL.md +63 -8
- package/dist/apps/web/dist/assets/index-8VE7b6RK.css +0 -1
- package/dist/apps/web/dist/assets/index-Czer_MdN.js +0 -118
- package/dist/src-CuirVcPY.mjs +0 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
1
|
+
import { A as createRunRequestSchema, j as updateManualScoreRequestSchema } from "./runOrchestration-CO3Vf0cQ.mjs";
|
|
2
|
+
import { o as stageManualInputFile } from "./cli-CiFOqMwS.mjs";
|
|
3
|
+
import "./src-BiPLv9ya.mjs";
|
|
4
|
+
import { t as getRunnerInstance } from "./runner-CXHkf7ih.mjs";
|
|
4
5
|
import { readFile } from "node:fs/promises";
|
|
5
6
|
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
6
7
|
import { z } from "zod/v4";
|
|
@@ -132,6 +133,19 @@ const evalsRoutes = new Hono().get("/", (c) => {
|
|
|
132
133
|
return c.json({ ok: true }, 200);
|
|
133
134
|
});
|
|
134
135
|
//#endregion
|
|
136
|
+
//#region ../../apps/server/src/routes/manualInputFiles.ts
|
|
137
|
+
const manualInputFilesRoutes = new Hono().post("/", async (c) => {
|
|
138
|
+
const uploaded = (await c.req.parseBody())["file"];
|
|
139
|
+
if (!(uploaded instanceof File)) return c.json({ error: "Missing file upload" }, 400);
|
|
140
|
+
const value = await stageManualInputFile({
|
|
141
|
+
workspaceRoot: getRunnerInstance().getWorkspaceRoot(),
|
|
142
|
+
bytes: new Uint8Array(await uploaded.arrayBuffer()),
|
|
143
|
+
name: uploaded.name,
|
|
144
|
+
mimeType: uploaded.type
|
|
145
|
+
});
|
|
146
|
+
return c.json(value, 201);
|
|
147
|
+
});
|
|
148
|
+
//#endregion
|
|
135
149
|
//#region ../../apps/server/src/routes/runs.ts
|
|
136
150
|
const openRunLocationRequestSchema = z.object({
|
|
137
151
|
file: z.string().min(1),
|
|
@@ -158,7 +172,19 @@ const runsRoutes = new Hono().get("/", (c) => {
|
|
|
158
172
|
return c.json(result, 200);
|
|
159
173
|
}).post("/", zValidator("json", createRunRequestSchema), async (c) => {
|
|
160
174
|
const body = c.req.valid("json");
|
|
161
|
-
const
|
|
175
|
+
const runner = getRunnerInstance();
|
|
176
|
+
const configReload = runner.getConfigReloadState();
|
|
177
|
+
if (configReload.status !== "idle") return c.json({
|
|
178
|
+
code: "CONFIG_RELOAD_PENDING",
|
|
179
|
+
error: "agent-evals.config.ts changed and the app is reloading before new runs can start.",
|
|
180
|
+
configReload
|
|
181
|
+
}, 409);
|
|
182
|
+
const validation = runner.validateManualInputs(body);
|
|
183
|
+
if (!validation.ok) return c.json({
|
|
184
|
+
error: "Manual input validation failed",
|
|
185
|
+
failures: validation.failures
|
|
186
|
+
}, 400);
|
|
187
|
+
const run = await runner.startRun(body);
|
|
162
188
|
return c.json(run, 201);
|
|
163
189
|
}).post("/actions/open-location", zValidator("json", openRunLocationRequestSchema), (c) => {
|
|
164
190
|
const body = c.req.valid("json");
|
|
@@ -311,14 +337,15 @@ const workspaceRoutes = new Hono().get("/", async (c) => {
|
|
|
311
337
|
workspaceRoot: runner.getWorkspaceRoot(),
|
|
312
338
|
packageManager,
|
|
313
339
|
llmCalls: runner.getLlmCallsConfig(),
|
|
314
|
-
apiCalls: runner.getApiCallsConfig()
|
|
340
|
+
apiCalls: runner.getApiCallsConfig(),
|
|
341
|
+
configReload: runner.getConfigReloadState()
|
|
315
342
|
}, 200);
|
|
316
343
|
});
|
|
317
344
|
//#endregion
|
|
318
345
|
//#region ../../apps/server/src/app.ts
|
|
319
346
|
const baseApp = new Hono();
|
|
320
347
|
baseApp.use("/*", cors());
|
|
321
|
-
baseApp.route("/api/evals", evalsRoutes).route("/api/runs", runsRoutes).route("/api/cache", cacheRoutes).route("/api/workspace", workspaceRoutes).route("/api", assetsRoutes);
|
|
348
|
+
baseApp.route("/api/evals", evalsRoutes).route("/api/runs", runsRoutes).route("/api/manual-input-files", manualInputFilesRoutes).route("/api/cache", cacheRoutes).route("/api/workspace", workspaceRoutes).route("/api", assetsRoutes);
|
|
322
349
|
const serverDir = dirname(fileURLToPath(import.meta.url));
|
|
323
350
|
const webDist = process.env.AGENT_EVALS_WEB_DIST ? resolve(process.env.AGENT_EVALS_WEB_DIST) : resolve(serverDir, "../../web/dist");
|
|
324
351
|
if (existsSync(webDist)) {
|