@konneal/engine 0.2.65 → 0.2.67
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.
|
@@ -1943,8 +1943,11 @@ async function extractNameplate(ai, model, image) {
|
|
|
1943
1943
|
reasoning_effort: "low"
|
|
1944
1944
|
});
|
|
1945
1945
|
const text = typeof res?.response === "string" ? res.response : res?.choices?.[0]?.message?.content;
|
|
1946
|
-
|
|
1947
|
-
|
|
1946
|
+
const np = parseNameplate(text ?? "");
|
|
1947
|
+
console.log(`nameplate-extract: ${np ? `${np.manufacturer} / ${np.model}` : `no parse (${(text ?? "").slice(0, 120)})`}`);
|
|
1948
|
+
return np;
|
|
1949
|
+
} catch (e) {
|
|
1950
|
+
console.log(`nameplate-extract: FAILED ${String(e).slice(0, 160)}`);
|
|
1948
1951
|
return null;
|
|
1949
1952
|
}
|
|
1950
1953
|
}
|
|
@@ -2307,7 +2310,7 @@ async function handleAsk(env, ctx, req, tier, key) {
|
|
|
2307
2310
|
if (bridgeImage && /certificate|certified|certification/i.test(q.query)) {
|
|
2308
2311
|
const np = await extractNameplate(env.AI, MODELS.member, bridgeImage);
|
|
2309
2312
|
if (np?.manufacturer) {
|
|
2310
|
-
const bridged = await searchRegister(env.DB, nameplateRegisterQuery(np, q.query));
|
|
2313
|
+
const bridged = await searchRegister(env.DB, nameplateRegisterQuery(np, q.query), true);
|
|
2311
2314
|
if (bridged?.rows?.length) {
|
|
2312
2315
|
register = bridged;
|
|
2313
2316
|
console.log("nameplate-bridge:", np.manufacturer, np.model ?? "", "\u2192", bridged.rows.length, "register rows");
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
modelGroundingBlock,
|
|
7
7
|
scoreFaithfulness,
|
|
8
8
|
scoreJudge
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-67VVH7CX.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-O2ZWIV2Y.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.67",
|
|
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",
|
|
@@ -632,7 +632,7 @@ let convEntities: Array<{ entity: string; kind: string }> = [];
|
|
|
632
632
|
if (bridgeImage && /certificate|certified|certification/i.test(q.query)) {
|
|
633
633
|
const np = await extractNameplate((env as any).AI, MODELS.member, bridgeImage);
|
|
634
634
|
if (np?.manufacturer) {
|
|
635
|
-
const bridged = await searchRegister(env.DB, nameplateRegisterQuery(np, q.query));
|
|
635
|
+
const bridged = await searchRegister(env.DB, nameplateRegisterQuery(np, q.query), true);
|
|
636
636
|
if (bridged?.rows?.length) {
|
|
637
637
|
register = bridged;
|
|
638
638
|
console.log("nameplate-bridge:", np.manufacturer, np.model ?? "", "→", bridged.rows.length, "register rows");
|
|
@@ -24,8 +24,11 @@ export async function extractNameplate(ai: any, model: string, image: string): P
|
|
|
24
24
|
reasoning_effort: "low",
|
|
25
25
|
});
|
|
26
26
|
const text = typeof res?.response === "string" ? res.response : res?.choices?.[0]?.message?.content;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const np = parseNameplate(text ?? "");
|
|
28
|
+
console.log(`nameplate-extract: ${np ? `${np.manufacturer} / ${np.model}` : `no parse (${(text ?? "").slice(0, 120)})`}`);
|
|
29
|
+
return np;
|
|
30
|
+
} catch (e) {
|
|
31
|
+
console.log(`nameplate-extract: FAILED ${String(e).slice(0, 160)}`);
|
|
29
32
|
return null; // the bridge is optional — the ask never depends on it
|
|
30
33
|
}
|
|
31
34
|
}
|