@konneal/engine 0.2.142 → 0.2.144
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.
- package/dist/{ask-FAZAUKM4.js → ask-A54GAMZR.js} +3 -3
- package/dist/{certificates-S3KZ37DQ.js → certificates-F5G7GRWK.js} +1 -1
- package/dist/{chunk-CEHMIHYM.js → chunk-363Q6FOL.js} +1 -1
- package/dist/{chunk-45GD6334.js → chunk-ECOYO7EX.js} +1 -1
- package/dist/{chunk-TMIRFD4I.js → chunk-Y5T6V5CB.js} +4 -3
- package/dist/{tools-5AGS4IO3.js → tools-5Y763UWT.js} +1 -1
- package/dist/worker_public/src/index.js +5 -5
- package/package.json +1 -1
- package/workers/worker_public/src/ask.ts +4 -1
- package/workers/worker_public/src/certificates.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleAsk
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Y5T6V5CB.js";
|
|
4
|
+
import "./chunk-ECOYO7EX.js";
|
|
5
|
+
import "./chunk-363Q6FOL.js";
|
|
6
6
|
import "./chunk-XH5QGX2O.js";
|
|
7
7
|
import "./chunk-NI4CIK6W.js";
|
|
8
8
|
import "./chunk-W7J5SFXJ.js";
|
|
@@ -1441,7 +1441,7 @@ var certificatesSearch = {
|
|
|
1441
1441
|
handler: async (env, args) => {
|
|
1442
1442
|
const query = String(args?.query ?? "").trim().slice(0, 160);
|
|
1443
1443
|
if (!query) return null;
|
|
1444
|
-
const { searchRegister, registerNote, certificateLinks } = await import("./certificates-
|
|
1444
|
+
const { searchRegister, registerNote, certificateLinks } = await import("./certificates-F5G7GRWK.js");
|
|
1445
1445
|
const reg = await searchRegister(env.DB, query, true);
|
|
1446
1446
|
const output = reg?.rows?.length ? [registerNote(reg.rows), certificateLinks(reg.rows)].filter(Boolean).join("\n") : `No certificate was found for "${query}" in the certificates database (the register snapshot). State this as the search's result, with the searched string visible.`;
|
|
1447
1447
|
return { name: "certificates.search", query, output };
|
|
@@ -33,7 +33,7 @@ async function registerAggregate(db, family) {
|
|
|
33
33
|
}
|
|
34
34
|
function aggregateNote(agg) {
|
|
35
35
|
const series = agg.latest?.num?.match(/^[A-Za-z]+/)?.[0] ?? "";
|
|
36
|
-
const familyName =
|
|
36
|
+
const familyName = `${P().publisher.name} ${series} ${agg.family}`.trim();
|
|
37
37
|
const latest = agg.latest ? `The latest certificate in the snapshot is ${agg.latest.num} (holder ${agg.latest.holder}, model "${agg.latest.model}"${agg.latest.year ? `, issued ${agg.latest.year}` : ""}, status ${agg.latest.status}).` : "No certificate rows are present in the snapshot.";
|
|
38
38
|
const link = agg.latest?.pdf_key ? ` Its document: https://www.oimlsmart.org/cert-pdf/${agg.latest.pdf_key}` : "";
|
|
39
39
|
return [
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
registerAggregateIntent,
|
|
8
8
|
registerNote,
|
|
9
9
|
searchRegister
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ECOYO7EX.js";
|
|
11
11
|
import {
|
|
12
12
|
TOOL_DECLARATION,
|
|
13
13
|
bindConstraintByQuantities,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
tableRetyped,
|
|
33
33
|
toolNote,
|
|
34
34
|
verdictNote
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-363Q6FOL.js";
|
|
36
36
|
import {
|
|
37
37
|
NO_CONTEXT,
|
|
38
38
|
STAGE_NAMES,
|
|
@@ -2097,7 +2097,8 @@ async function handleAsk(env, ctx, req, tier, key) {
|
|
|
2097
2097
|
const linkLine = agg.latest?.pdf_key ? `
|
|
2098
2098
|
|
|
2099
2099
|
[The latest certificate's document](${`/cert-pdf/${agg.latest.pdf_key}`}) is on file.` : "";
|
|
2100
|
-
const
|
|
2100
|
+
const series = agg.latest?.num?.match(/^[A-Za-z]+/)?.[0] ?? "R";
|
|
2101
|
+
const answer2 = aggIntent === "count" ? `The ${P().publisher.name} ${series} ${agg.family} family holds **${agg.count} certificate${agg.count === 1 ? "" : "s"}** in the ${P().publisher.name}-CS register snapshot (${agg.valid} valid${agg.suspended ? `, ${agg.suspended} suspended` : ""}).
|
|
2101
2102
|
|
|
2102
2103
|
Certificates are issued per recommendation family \u2014 the register carries no edition dimension, so the 2021 you named does not narrow the count. The register is a snapshot rather than live certification status.` : `${latestLine}${linkLine}
|
|
2103
2104
|
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
handleMemories,
|
|
5
5
|
scoreFaithfulness,
|
|
6
6
|
scoreJudge
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
} from "../../chunk-Y5T6V5CB.js";
|
|
8
|
+
import "../../chunk-ECOYO7EX.js";
|
|
9
9
|
import {
|
|
10
10
|
TOOLS_REGISTRY,
|
|
11
11
|
bindModelNode,
|
|
12
12
|
modelGroundingBlock
|
|
13
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-363Q6FOL.js";
|
|
14
14
|
import {
|
|
15
15
|
handleSearch
|
|
16
16
|
} from "../../chunk-5WITTJQD.js";
|
|
@@ -1073,13 +1073,13 @@ async function callToolOnce(env, ctx, _req, tier, key, name, args, t0) {
|
|
|
1073
1073
|
// stream:false forces the JSON lane (anon defaults to SSE)
|
|
1074
1074
|
body: JSON.stringify({ ...args, stream: false })
|
|
1075
1075
|
});
|
|
1076
|
-
const { runTool, TOOLS_REGISTRY: TOOLS_REGISTRY2 } = await import("../../tools-
|
|
1076
|
+
const { runTool, TOOLS_REGISTRY: TOOLS_REGISTRY2 } = await import("../../tools-5Y763UWT.js");
|
|
1077
1077
|
let payload;
|
|
1078
1078
|
if (TOOLS_REGISTRY2.some((t) => t.name === name && t.audiences.includes("mcp"))) {
|
|
1079
1079
|
const r = await runTool({ ...env, DB: env.DB }, { name, args }, "mcp");
|
|
1080
1080
|
payload = r ? { tool: r.name, query: r.query, result: r.output } : { error: { message: `tool ${name} returned nothing for the given arguments` } };
|
|
1081
1081
|
} else {
|
|
1082
|
-
const res = name === "ask" ? await (await import("../../ask-
|
|
1082
|
+
const res = name === "ask" ? await (await import("../../ask-A54GAMZR.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-VEGQBEFC.js")).handleSearch(env, ctx, inner, tier, key);
|
|
1083
1083
|
payload = await res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
|
|
1084
1084
|
}
|
|
1085
1085
|
telemetry(env, ctx, tier, `mcp:${name}`, null, !payload?.error, JSON.stringify(payload).length, await sha256Hex(`${name}:${JSON.stringify(args ?? {})}`), void 0, void 0, { durationMs: Date.now() - t0 });
|
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.144",
|
|
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",
|
|
@@ -807,8 +807,11 @@ let convEntities: Array<{ entity: string; kind: string }> = [];
|
|
|
807
807
|
const linkLine = agg.latest?.pdf_key
|
|
808
808
|
? `\n\n[The latest certificate's document](${`/cert-pdf/${agg.latest.pdf_key}`}) is on file.`
|
|
809
809
|
: "";
|
|
810
|
+
// the series letter comes from the data (the certificate numbers
|
|
811
|
+
// carry it: "R60/…") — the register's families are Recommendations
|
|
812
|
+
const series = agg.latest?.num?.match(/^[A-Za-z]+/)?.[0] ?? "R";
|
|
810
813
|
const answer = aggIntent === "count"
|
|
811
|
-
? `The ${P().publisher.name} ${agg.family} family holds **${agg.count} certificate${agg.count === 1 ? "" : "s"}** in the ${P().publisher.name}-CS register snapshot (${agg.valid} valid${agg.suspended ? `, ${agg.suspended} suspended` : ""}).\n\nCertificates are issued per recommendation family — the register carries no edition dimension, so the 2021 you named does not narrow the count. The register is a snapshot rather than live certification status.`
|
|
814
|
+
? `The ${P().publisher.name} ${series} ${agg.family} family holds **${agg.count} certificate${agg.count === 1 ? "" : "s"}** in the ${P().publisher.name}-CS register snapshot (${agg.valid} valid${agg.suspended ? `, ${agg.suspended} suspended` : ""}).\n\nCertificates are issued per recommendation family — the register carries no edition dimension, so the 2021 you named does not narrow the count. The register is a snapshot rather than live certification status.`
|
|
812
815
|
: `${latestLine}${linkLine}\n\nCertificates are issued per recommendation family — the register carries no edition dimension. The register is a snapshot rather than live certification status.`;
|
|
813
816
|
const block = aggregateBlock(agg);
|
|
814
817
|
registerBlock = block;
|
|
@@ -86,7 +86,7 @@ export function aggregateNote(agg: RegisterAggregate): string {
|
|
|
86
86
|
// name carries the series letter, which the certificate numbers
|
|
87
87
|
// themselves carry ("R60/…") — derived from the data, never hardcoded
|
|
88
88
|
const series = agg.latest?.num?.match(/^[A-Za-z]+/)?.[0] ?? "";
|
|
89
|
-
const familyName =
|
|
89
|
+
const familyName = `${P().publisher.name} ${series} ${agg.family}`.trim();
|
|
90
90
|
const latest = agg.latest
|
|
91
91
|
? `The latest certificate in the snapshot is ${agg.latest.num} (holder ${agg.latest.holder}, model "${agg.latest.model}"${agg.latest.year ? `, issued ${agg.latest.year}` : ""}, status ${agg.latest.status}).`
|
|
92
92
|
: "No certificate rows are present in the snapshot.";
|