@konneal/engine 0.2.158 → 0.2.159
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.
|
@@ -2749,6 +2749,15 @@ Answer account questions from these records ONLY: name the record when you use i
|
|
|
2749
2749
|
const streamed = { total: streamedAnchors.total, violations: streamedRetyped ? ["table-retyped"] : streamedAnchors.violations };
|
|
2750
2750
|
if (streamed.violations.length > 0) {
|
|
2751
2751
|
console.log("anchors:", streamed.violations.length, "of", streamed.total, "unverified \u2014 not caching");
|
|
2752
|
+
try {
|
|
2753
|
+
live2.send({
|
|
2754
|
+
type: "contract",
|
|
2755
|
+
verified: streamed.total - streamed.violations.length,
|
|
2756
|
+
violations: streamed.violations.slice(0, 5),
|
|
2757
|
+
note: "the streamed answer carried unverified quote anchors \u2014 the json lane enforces this contract by regeneration; treat the quoted spans as unverified"
|
|
2758
|
+
});
|
|
2759
|
+
} catch {
|
|
2760
|
+
}
|
|
2752
2761
|
}
|
|
2753
2762
|
if (streamed.violations.length === 0 && canonical.length > 0 && !contextual && !declaredCtx && cacheableAnswer(canonical, refusalScope(answerCites(canonical))) && !ablate) {
|
|
2754
2763
|
ctx.waitUntil(
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
handleMemories,
|
|
5
5
|
scoreFaithfulness,
|
|
6
6
|
scoreJudge
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-CBSVUTFM.js";
|
|
8
8
|
import "../../chunk-ECOYO7EX.js";
|
|
9
9
|
import {
|
|
10
10
|
TOOLS_REGISTRY,
|
|
@@ -1124,7 +1124,7 @@ async function callToolOnce(env, ctx, _req, tier, key, name, args, t0) {
|
|
|
1124
1124
|
const r = await runTool({ ...env, DB: env.DB }, { name, args }, "mcp");
|
|
1125
1125
|
payload = r ? { tool: r.name, query: r.query, result: r.output } : { error: { message: `tool ${name} returned nothing for the given arguments` } };
|
|
1126
1126
|
} else {
|
|
1127
|
-
const res = name === "ask" ? await (await import("../../ask-
|
|
1127
|
+
const res = name === "ask" ? await (await import("../../ask-FUNBGZKM.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-GAU5SEZI.js")).handleSearch(env, ctx, inner, tier, key);
|
|
1128
1128
|
payload = await res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
|
|
1129
1129
|
}
|
|
1130
1130
|
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.159",
|
|
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",
|
|
@@ -1702,6 +1702,20 @@ let convEntities: Array<{ entity: string; kind: string }> = [];
|
|
|
1702
1702
|
const streamed = { total: streamedAnchors.total, violations: streamedRetyped ? ["table-retyped"] : streamedAnchors.violations };
|
|
1703
1703
|
if (streamed.violations.length > 0) {
|
|
1704
1704
|
console.log("anchors:", streamed.violations.length, "of", streamed.total, "unverified — not caching");
|
|
1705
|
+
// the streaming-contract event (TODO.sota/14.5, v1 — the
|
|
1706
|
+
// detection half): a mid-stream answer cannot regenerate, so
|
|
1707
|
+
// the violations are reported to the client as they are —
|
|
1708
|
+
// measured, never hidden — and the unverified answer never
|
|
1709
|
+
// enters the cache. The bounded restart still covers the
|
|
1710
|
+
// head class (narration, preamble).
|
|
1711
|
+
try {
|
|
1712
|
+
live!.send({
|
|
1713
|
+
type: "contract",
|
|
1714
|
+
verified: streamed.total - streamed.violations.length,
|
|
1715
|
+
violations: streamed.violations.slice(0, 5),
|
|
1716
|
+
note: "the streamed answer carried unverified quote anchors — the json lane enforces this contract by regeneration; treat the quoted spans as unverified",
|
|
1717
|
+
});
|
|
1718
|
+
} catch { /* the client may have closed; never block the close */ }
|
|
1705
1719
|
}
|
|
1706
1720
|
if (streamed.violations.length === 0 && canonical.length > 0 && !contextual && !declaredCtx && cacheableAnswer(canonical, refusalScope(answerCites(canonical))) && !ablate) {
|
|
1707
1721
|
ctx.waitUntil(
|