@velum-labs/routekit-eval-setup 1.0.21 → 1.0.22

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.
@@ -30,8 +30,16 @@ for (const model of manifest.candidateModels) {
30
30
  ? testCase.prompt
31
31
  : [testCase.prompt, "", "Reference material:", "-----", testCase.context, "-----"].join("\\n");
32
32
  const run = await candidate.run({ prompt, caseId: testCase.id });
33
- run.toComplete();
33
+ let candidateCompletionError: unknown;
34
+ try {
35
+ run.toComplete();
36
+ } catch (error) {
37
+ candidateCompletionError = error;
38
+ }
34
39
  await judge.autoEvals({ criteria: testCase.rubric, prompt, run });
40
+ if (candidateCompletionError !== undefined) {
41
+ throw candidateCompletionError;
42
+ }
35
43
  });
36
44
  }
37
45
  }
@@ -306,6 +306,14 @@ test("reviewed artifacts are digest-bound and produce an immutable exact-call pl
306
306
  const planPath = path.join(root, ".routekit", "evals", "plans", `${result.plan.planId}.json`);
307
307
  assert.equal((await stat(planPath)).mode & 0o777, 0o600);
308
308
  assert.deepEqual(JSON.parse(await readFile(planPath, "utf8")), result.plan);
309
+ const firstDimension = reviewedDimensions[0];
310
+ const generatedSuite = await readFile(path.join(root, ".routekit", "evals", "plans", result.plan.planId, "dimensions", firstDimension.id, `${firstDimension.id}.eval.ts`), "utf8");
311
+ const completionAssertion = generatedSuite.indexOf("run.toComplete();");
312
+ const judgeCall = generatedSuite.indexOf("await judge.autoEvals");
313
+ const completionRethrow = generatedSuite.indexOf("throw candidateCompletionError;");
314
+ assert.ok(completionAssertion >= 0);
315
+ assert.ok(judgeCall > completionAssertion);
316
+ assert.ok(completionRethrow > judgeCall);
309
317
  for (const dimension of reviewedDimensions) {
310
318
  assert.equal((await stat(path.join(root, ".routekit", "evals", "dimensions", dimension.id, "suite.json")))
311
319
  .mode & 0o777, 0o600);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@velum-labs/routekit-eval-setup",
3
3
  "private": false,
4
- "version": "1.0.21",
4
+ "version": "1.0.22",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/velum-labs/routekit.git",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "effect": "4.0.0-rc.108",
35
- "@velum-labs/routekit-eval-contracts": "1.0.21",
36
- "@velum-labs/routekit-runtime": "1.0.21"
35
+ "@velum-labs/routekit-eval-contracts": "1.0.22",
36
+ "@velum-labs/routekit-runtime": "1.0.22"
37
37
  },
38
38
  "keywords": [
39
39
  "routekit",