@konneal/engine 0.2.11 → 0.2.12

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-KMSUJI75.js";
3
+ } from "./chunk-B4MH5IR2.js";
4
4
  import "./chunk-7UT76RQO.js";
5
5
  import "./chunk-EFQALN2Z.js";
6
6
  import "./chunk-DBBGOOMZ.js";
@@ -1637,7 +1637,7 @@ ${summary}` }] : [],
1637
1637
  const stated = quantitiesIn(q.query);
1638
1638
  if (severityWord && Object.keys(stated).length >= 1) {
1639
1639
  const docNum = modelDocHint?.doc_number;
1640
- const sql = docNum ? "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set' AND standard = ?1" : "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set' LIMIT 40";
1640
+ const sql = docNum ? "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set' AND standard LIKE '%' || ?1" : "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set'";
1641
1641
  const stmt = docNum ? env.DB.prepare(sql).bind(docNum) : env.DB.prepare(sql);
1642
1642
  const rows = await stmt.all().catch(() => ({ results: [] }));
1643
1643
  const candidates = (rows.results ?? []).filter((r) => {
@@ -7,7 +7,7 @@ import {
7
7
  handleMemories,
8
8
  scoreJudge,
9
9
  standardForDocNumber
10
- } from "../../chunk-KMSUJI75.js";
10
+ } from "../../chunk-B4MH5IR2.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-AAEPGPJI.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-RFKT7ZZY.js")).handleSearch(env, ctx, inner, tier, key);
982
+ const res = name === "ask" ? await (await import("../../ask-J3VYAEMM.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-RFKT7ZZY.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
@@ -34,7 +34,7 @@
34
34
  "@oimlsmart/oiml-pubid": "^1.2.1"
35
35
  },
36
36
  "dependencies": {},
37
- "version": "0.2.11",
37
+ "version": "0.2.12",
38
38
  "description": "The Konneal engine: the publisher-agnostic build pipeline and API plane for standards intelligence (retrieval, answer contract, verdicts, evaluation).",
39
39
  "license": "BSD-3-Clause",
40
40
  "type": "module",
@@ -732,9 +732,11 @@ async function handleAsk(
732
732
  const stated = quantitiesIn(q.query);
733
733
  if (severityWord && Object.keys(stated).length >= 1) {
734
734
  const docNum = modelDocHint?.doc_number;
735
+ // the doc number joins the STANDARD id (iec-60068-2-78), which is
736
+ // the doc number prefixed with the package-family prefix
735
737
  const sql = docNum
736
- ? "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set' AND standard = ?1"
737
- : "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set' LIMIT 40";
738
+ ? "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set' AND standard LIKE '%' || ?1"
739
+ : "SELECT standard, node_id, content FROM model_nodes WHERE kind = 'condition_set'";
738
740
  const stmt = docNum ? env.DB.prepare(sql).bind(docNum) : env.DB.prepare(sql);
739
741
  const rows = await stmt.all().catch(() => ({ results: [] }));
740
742
  const candidates = (rows.results ?? []).filter((r: any) => {