@konneal/engine 0.2.141 → 0.2.143
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-WZCRMTTX.js → ask-4CYUZR4V.js} +3 -3
- package/dist/{certificates-TMYS7XLD.js → certificates-F5G7GRWK.js} +1 -1
- package/dist/{chunk-RKNN3WAV.js → chunk-363Q6FOL.js} +1 -1
- package/dist/{chunk-VTQ7FWRI.js → chunk-BDJ3ZBP5.js} +2 -2
- package/dist/{chunk-GBGRHXRU.js → chunk-ECOYO7EX.js} +3 -1
- package/dist/{tools-EZRLYLTM.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/certificates.ts +6 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleAsk
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-BDJ3ZBP5.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 };
|
|
@@ -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,
|
|
@@ -32,11 +32,13 @@ async function registerAggregate(db, family) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
function aggregateNote(agg) {
|
|
35
|
+
const series = agg.latest?.num?.match(/^[A-Za-z]+/)?.[0] ?? "";
|
|
36
|
+
const familyName = `${P().publisher.name} ${series} ${agg.family}`.trim();
|
|
35
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.";
|
|
36
38
|
const link = agg.latest?.pdf_key ? ` Its document: https://www.oimlsmart.org/cert-pdf/${agg.latest.pdf_key}` : "";
|
|
37
39
|
return [
|
|
38
40
|
`CERTIFICATE REGISTER \u2014 THIS NOTE ANSWERS THE QUESTION. Answer from THIS note; do not refuse for want of passages (the retrieval passages are irrelevant for register questions).`,
|
|
39
|
-
`The ${
|
|
41
|
+
`The ${familyName} family holds ${agg.count} certificate${agg.count === 1 ? "" : "s"} (${agg.valid} valid${agg.suspended ? `, ${agg.suspended} suspended` : ""}) \u2014 computed over the register snapshot; state these numbers verbatim.`,
|
|
40
42
|
latest + link,
|
|
41
43
|
"Certificates are issued per RECOMMENDATION FAMILY \u2014 the register carries no edition dimension, so an edition named in the question (e.g. 2021) does not narrow it; say so when the question names an edition. Qualify that the register is a snapshot, and cite the register."
|
|
42
44
|
].join("\n");
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
handleMemories,
|
|
5
5
|
scoreFaithfulness,
|
|
6
6
|
scoreJudge
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
7
|
+
} from "../../chunk-BDJ3ZBP5.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-4CYUZR4V.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.143",
|
|
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",
|
|
@@ -82,6 +82,11 @@ export async function registerAggregate(db: any, family: string): Promise<Regist
|
|
|
82
82
|
* model narrates, never recomputes. The edition disclaimer rides every
|
|
83
83
|
* family-scoped answer (the register has no edition dimension). */
|
|
84
84
|
export function aggregateNote(agg: RegisterAggregate): string {
|
|
85
|
+
// the register stores the family as digits ("60"); the user-facing
|
|
86
|
+
// name carries the series letter, which the certificate numbers
|
|
87
|
+
// themselves carry ("R60/…") — derived from the data, never hardcoded
|
|
88
|
+
const series = agg.latest?.num?.match(/^[A-Za-z]+/)?.[0] ?? "";
|
|
89
|
+
const familyName = `${P().publisher.name} ${series} ${agg.family}`.trim();
|
|
85
90
|
const latest = agg.latest
|
|
86
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}).`
|
|
87
92
|
: "No certificate rows are present in the snapshot.";
|
|
@@ -90,7 +95,7 @@ export function aggregateNote(agg: RegisterAggregate): string {
|
|
|
90
95
|
: "";
|
|
91
96
|
return [
|
|
92
97
|
`CERTIFICATE REGISTER — THIS NOTE ANSWERS THE QUESTION. Answer from THIS note; do not refuse for want of passages (the retrieval passages are irrelevant for register questions).`,
|
|
93
|
-
`The ${
|
|
98
|
+
`The ${familyName} family holds ${agg.count} certificate${agg.count === 1 ? "" : "s"} (${agg.valid} valid${agg.suspended ? `, ${agg.suspended} suspended` : ""}) — computed over the register snapshot; state these numbers verbatim.`,
|
|
94
99
|
latest + link,
|
|
95
100
|
"Certificates are issued per RECOMMENDATION FAMILY — the register carries no edition dimension, so an edition named in the question (e.g. 2021) does not narrow it; say so when the question names an edition. Qualify that the register is a snapshot, and cite the register.",
|
|
96
101
|
].join("\n");
|