@velum-labs/routekit-eval-setup 1.0.4 → 1.0.6

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.
@@ -134,10 +134,9 @@ const DIMENSIONS_JSON_SCHEMA = {
134
134
  properties: {
135
135
  dimensions: {
136
136
  type: "array",
137
- // Anthropic structured outputs only accept minItems values of 0 or 1.
138
- // assertRoutingBasis enforces the required 5–10 dimensions after parsing.
137
+ // Anthropic structured outputs only accept minItems values of 0 or 1 and
138
+ // reject maxItems. assertRoutingBasis enforces 5–10 after parsing.
139
139
  minItems: 1,
140
- maxItems: 10,
141
140
  items: {
142
141
  type: "object",
143
142
  additionalProperties: false,
@@ -41,7 +41,7 @@ const dimensions = (count) => Array.from({ length: count }, (_, index) => ({
41
41
  const proposeDimensions = (root, output, requests = []) => Effect.runPromise(Effect.gen(function* () {
42
42
  const author = yield* EvalProjectAuthor;
43
43
  return yield* author.proposeDimensions({
44
- operationId: "eng-830",
44
+ operationId: "eng-831",
45
45
  repositoryRoot: root,
46
46
  sourceInventory: ["source.md"],
47
47
  configuration
@@ -52,15 +52,16 @@ const proposeDimensions = (root, output, requests = []) => Effect.runPromise(Eff
52
52
  return JSON.stringify(output);
53
53
  })
54
54
  }))), Layer.provide(NodeServicesLayer)))));
55
- const collectMinimumItems = (value) => {
55
+ const collectSchemaNumberKeyword = (value, keyword) => {
56
56
  if (typeof value !== "object" || value === null)
57
57
  return [];
58
- if (Array.isArray(value))
59
- return value.flatMap(collectMinimumItems);
58
+ if (Array.isArray(value)) {
59
+ return value.flatMap((item) => collectSchemaNumberKeyword(item, keyword));
60
+ }
60
61
  const record = value;
61
62
  return [
62
- ...(typeof record.minItems === "number" ? [record.minItems] : []),
63
- ...Object.values(record).flatMap(collectMinimumItems)
63
+ ...(typeof record[keyword] === "number" ? [record[keyword]] : []),
64
+ ...Object.values(record).flatMap((item) => collectSchemaNumberKeyword(item, keyword))
64
65
  ];
65
66
  };
66
67
  test("authoring reads an exact discovered regular source", async () => {
@@ -113,11 +114,12 @@ test("dimension authoring sends an Anthropic-compatible structured output schema
113
114
  assert.equal(requests.length, 1);
114
115
  const schema = requests[0]?.jsonSchema;
115
116
  assert.ok(schema !== undefined);
116
- assert.deepEqual(collectMinimumItems(schema), [1, 1, 1]);
117
+ assert.deepEqual(collectSchemaNumberKeyword(schema, "minItems"), [1, 1, 1]);
118
+ assert.deepEqual(collectSchemaNumberKeyword(schema, "maxItems"), []);
117
119
  const dimensionsSchema = schema.properties?.dimensions;
118
120
  assert.equal(dimensionsSchema?.type, "array");
119
121
  assert.equal(dimensionsSchema.minItems, 1);
120
- assert.equal(dimensionsSchema.maxItems, 10);
122
+ assert.equal(dimensionsSchema.maxItems, undefined);
121
123
  });
122
124
  });
123
125
  test("dimension authoring enforces routing basis counts after structured output parsing", async () => {
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.4",
4
+ "version": "1.0.6",
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.4",
36
- "@velum-labs/routekit-runtime": "1.0.4"
35
+ "@velum-labs/routekit-eval-contracts": "1.0.6",
36
+ "@velum-labs/routekit-runtime": "1.0.6"
37
37
  },
38
38
  "keywords": [
39
39
  "routekit",