@konneal/engine 0.2.63 → 0.2.64
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.
|
@@ -2303,8 +2303,9 @@ async function handleAsk(env, ctx, req, tier, key) {
|
|
|
2303
2303
|
const graphDocNumbers = await graphExpand(env, understanding);
|
|
2304
2304
|
const eNote = await editionNote(env, understanding);
|
|
2305
2305
|
let register = await searchRegister(env.DB, q.query);
|
|
2306
|
-
|
|
2307
|
-
|
|
2306
|
+
const bridgeImage = userImage ?? storedImage;
|
|
2307
|
+
if (bridgeImage && /certificate|certified|certification/i.test(q.query)) {
|
|
2308
|
+
const np = await extractNameplate(env.AI, MODELS.member, bridgeImage);
|
|
2308
2309
|
if (np?.manufacturer) {
|
|
2309
2310
|
const bridged = await searchRegister(env.DB, nameplateRegisterQuery(np, q.query));
|
|
2310
2311
|
if (bridged?.rows?.length) {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
modelGroundingBlock,
|
|
7
7
|
scoreFaithfulness,
|
|
8
8
|
scoreJudge
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-NC52SIL7.js";
|
|
10
10
|
import {
|
|
11
11
|
handleSearch
|
|
12
12
|
} from "../../chunk-FLNX4O7C.js";
|
|
@@ -959,7 +959,7 @@ async function handleMcp(env, ctx, req, tier, key) {
|
|
|
959
959
|
// stream:false forces the JSON lane (anon defaults to SSE)
|
|
960
960
|
body: JSON.stringify({ ...args, stream: false })
|
|
961
961
|
});
|
|
962
|
-
const res = name === "ask" ? await (await import("../../ask-
|
|
962
|
+
const res = name === "ask" ? await (await import("../../ask-QSZUXUWG.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-PBOODCMQ.js")).handleSearch(env, ctx, inner, tier, key);
|
|
963
963
|
return res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
|
|
964
964
|
});
|
|
965
965
|
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.
|
|
30
|
+
"version": "0.2.64",
|
|
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",
|
|
@@ -628,8 +628,9 @@ let convEntities: Array<{ entity: string; kind: string }> = [];
|
|
|
628
628
|
// Fires whenever a photo is present: the text lane's tokens are the
|
|
629
629
|
// question's stopwords ("this", "have") and can match an unrelated
|
|
630
630
|
// holder, and the photograph's own reading is authoritative over them.
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
const bridgeImage = userImage ?? storedImage;
|
|
632
|
+
if (bridgeImage && /certificate|certified|certification/i.test(q.query)) {
|
|
633
|
+
const np = await extractNameplate((env as any).AI, MODELS.member, bridgeImage);
|
|
633
634
|
if (np?.manufacturer) {
|
|
634
635
|
const bridged = await searchRegister(env.DB, nameplateRegisterQuery(np, q.query));
|
|
635
636
|
if (bridged?.rows?.length) {
|