@konneal/engine 0.2.23 → 0.2.24

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 {
2
2
  handleAsk
3
- } from "./chunk-GZZWHWGM.js";
3
+ } from "./chunk-IM5KMIL6.js";
4
4
  import "./chunk-HXWDVAVN.js";
5
5
  import "./chunk-FYGJDJPN.js";
6
6
  import "./chunk-RZ3UZVRR.js";
@@ -827,7 +827,7 @@ function evaluateConditionSets(nodes, query) {
827
827
  verdict: "pass",
828
828
  matched: matched.map((m) => m.node_id),
829
829
  checks: matched[0].checks,
830
- note: `VERDICT: PASS \u2014 the stated combination (${kinds.join(", ")}) matches severity set(s) ${matched.map((m) => m.node_id).join(", ")}. Present this verdict and cite the set's clause.`
830
+ note: `VERDICT: PASS \u2014 the stated combination (${kinds.join(", ")}) matches a severity set (${matched[0].checks.map((c) => c.band).join("; ")}). Present this verdict and cite the set's clause. The machine set identifier rides the verdict block as data \u2014 never write it in your prose.`
831
831
  };
832
832
  }
833
833
  const nearest = scored[0];
@@ -836,7 +836,7 @@ function evaluateConditionSets(nodes, query) {
836
836
  matched: [],
837
837
  nearest: { node_id: nearest.node_id, distance: Number(nearest.distance.toFixed(2)), bands: nearest.checks.map((c) => c.band) },
838
838
  checks: nearest.checks,
839
- note: `VERDICT: FAIL \u2014 no severity set admits the stated combination. The nearest set is ${nearest.node_id} (bands: ${nearest.checks.map((c) => c.band).join("; ")}). Say the combination is outside the menu and name the nearest set; never soften it.`
839
+ note: `VERDICT: FAIL \u2014 no severity set admits the stated combination. The nearest set (bands: ${nearest.checks.map((c) => c.band).join("; ")}) is the closest match. Say the combination is outside the menu and describe the nearest set's bands; never soften it. The machine set identifier rides the verdict block as data \u2014 never write it in your prose.`
840
840
  };
841
841
  }
842
842
 
@@ -985,7 +985,7 @@ function evaluateAggregation(nodes, query) {
985
985
  const rawTitle = String(content.name ?? content.definition ?? node.node_id.replace("/table/", ""));
986
986
  const cut = rawTitle.indexOf(" (");
987
987
  const tableTitle = cut > 0 ? rawTitle.slice(0, cut) : rawTitle.slice(0, 120);
988
- const cite = (what) => `COMPUTED (${operation}) \u2014 ${what}, read from the typed table "${tableTitle}" (${node.node_id}). Present this result and cite the table's clause; the value is machine-computed from the table payload, do not recompute or round it differently.`;
988
+ const cite = (what) => `COMPUTED (${operation}) \u2014 ${what}, read from the typed table "${tableTitle}". Present this result and cite the table's clause; the value is machine-computed from the table payload, do not recompute or round it differently. The machine table identifier rides the verdict block as data \u2014 never write it in your prose.`;
989
989
  if (operation === "count") {
990
990
  const cc2 = classColumn(cols);
991
991
  if (cc2 && /\bclasses?\b/.test(qLower) && tokens(cc2.name).some((t) => t.length >= 3 && qLower.includes(t))) {
@@ -7,7 +7,7 @@ import {
7
7
  handleMemories,
8
8
  scoreJudge,
9
9
  standardForDocNumber
10
- } from "../../chunk-GZZWHWGM.js";
10
+ } from "../../chunk-IM5KMIL6.js";
11
11
  import {
12
12
  buildMessages,
13
13
  citations,
@@ -979,7 +979,7 @@ async function handleMcp(env, ctx, req, tier, key) {
979
979
  // stream:false forces the JSON lane (anon defaults to SSE)
980
980
  body: JSON.stringify({ ...args, stream: false })
981
981
  });
982
- const res = name === "ask" ? await (await import("../../ask-U3DLB37U.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-OJ776DMH.js")).handleSearch(env, ctx, inner, tier, key);
982
+ const res = name === "ask" ? await (await import("../../ask-OO6UUIFF.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-OJ776DMH.js")).handleSearch(env, ctx, inner, tier, key);
983
983
  return res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
984
984
  });
985
985
  if (out.ok && "accepted" in out) return new Response(null, { status: 202 });
package/package.json CHANGED
@@ -27,7 +27,7 @@
27
27
  "playwright": "^1.62.1",
28
28
  "yaml": "^2.9.1"
29
29
  },
30
- "version": "0.2.23",
30
+ "version": "0.2.24",
31
31
  "description": "The Konneal engine: the publisher-agnostic build pipeline and API plane for standards intelligence (retrieval, answer contract, verdicts, evaluation).",
32
32
  "license": "BSD-3-Clause",
33
33
  "type": "module",
@@ -222,7 +222,7 @@ export function evaluateAggregation(
222
222
  const tableTitle = cut > 0 ? rawTitle.slice(0, cut) : rawTitle.slice(0, 120);
223
223
 
224
224
  const cite = (what: string) =>
225
- `COMPUTED (${operation}) — ${what}, read from the typed table "${tableTitle}" (${node.node_id}). Present this result and cite the table's clause; the value is machine-computed from the table payload, do not recompute or round it differently.`;
225
+ `COMPUTED (${operation}) — ${what}, read from the typed table "${tableTitle}". Present this result and cite the table's clause; the value is machine-computed from the table payload, do not recompute or round it differently. The machine table identifier rides the verdict block as data — never write it in your prose.`;
226
226
 
227
227
  if (operation === "count") {
228
228
  const cc = classColumn(cols);
@@ -118,7 +118,7 @@ export function evaluateConditionSets(
118
118
  verdict: "pass",
119
119
  matched: matched.map((m) => m.node_id),
120
120
  checks: matched[0]!.checks,
121
- note: `VERDICT: PASS — the stated combination (${kinds.join(", ")}) matches severity set(s) ${matched.map((m) => m.node_id).join(", ")}. Present this verdict and cite the set's clause.`,
121
+ note: `VERDICT: PASS — the stated combination (${kinds.join(", ")}) matches a severity set (${matched[0]!.checks.map((c) => c.band).join("; ")}). Present this verdict and cite the set's clause. The machine set identifier rides the verdict block as data — never write it in your prose.`,
122
122
  };
123
123
  }
124
124
  const nearest = scored[0]!;
@@ -127,6 +127,6 @@ export function evaluateConditionSets(
127
127
  matched: [],
128
128
  nearest: { node_id: nearest.node_id, distance: Number(nearest.distance.toFixed(2)), bands: nearest.checks.map((c) => c.band) },
129
129
  checks: nearest.checks,
130
- note: `VERDICT: FAIL — no severity set admits the stated combination. The nearest set is ${nearest.node_id} (bands: ${nearest.checks.map((c) => c.band).join("; ")}). Say the combination is outside the menu and name the nearest set; never soften it.`,
130
+ note: `VERDICT: FAIL — no severity set admits the stated combination. The nearest set (bands: ${nearest.checks.map((c) => c.band).join("; ")}) is the closest match. Say the combination is outside the menu and describe the nearest set's bands; never soften it. The machine set identifier rides the verdict block as data — never write it in your prose.`,
131
131
  };
132
132
  }