@konneal/engine 0.2.110 → 0.2.111

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  handleAsk
3
- } from "./chunk-TNDH2QRT.js";
3
+ } from "./chunk-Y6X5WLCZ.js";
4
4
  import "./chunk-32UDKBA2.js";
5
5
  import "./chunk-2R7OVYAO.js";
6
6
  import "./chunk-TH5XGPD5.js";
@@ -4,7 +4,7 @@ import {
4
4
  handleMemories,
5
5
  scoreFaithfulness,
6
6
  scoreJudge
7
- } from "../../chunk-TNDH2QRT.js";
7
+ } from "../../chunk-Y6X5WLCZ.js";
8
8
  import {
9
9
  TOOLS_REGISTRY,
10
10
  bindModelNode,
@@ -1000,7 +1000,7 @@ async function callToolOnce(env, ctx, _req, tier, key, name, args, t0) {
1000
1000
  const r = await runTool({ ...env, DB: env.DB }, { name, args }, "mcp");
1001
1001
  payload = r ? { tool: r.name, query: r.query, result: r.output } : { error: { message: `tool ${name} returned nothing for the given arguments` } };
1002
1002
  } else {
1003
- const res = name === "ask" ? await (await import("../../ask-DBIGV3SY.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-HKGN7F3O.js")).handleSearch(env, ctx, inner, tier, key);
1003
+ const res = name === "ask" ? await (await import("../../ask-6FXTHCMS.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-HKGN7F3O.js")).handleSearch(env, ctx, inner, tier, key);
1004
1004
  payload = await res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
1005
1005
  }
1006
1006
  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.110",
30
+ "version": "0.2.111",
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",
@@ -56,14 +56,24 @@ export function routeFor(u: RouteFeatures | null, query: string): {
56
56
  if ((u?.sub_queries ?? []).length > 0) features.push("sub-queries");
57
57
  if (u?.process_intent) features.push("process-intent");
58
58
  if (words > ROUTE_FAST_WORD_CAP) features.push("long-question");
59
+ // a document scope (named in the question OR declared by a context
60
+ // chip — the chip writes the same understanding fields) NARROWS the
61
+ // candidate pool structurally: the dense filter does the scoping, and
62
+ // the sealed/narrowed pool needs every lane feeding it (the
63
+ // multi-query variants are its redundancy). The 2026-10-08 gate
64
+ // caught this class: ctx-entity-r60, chip-declared and routed fast,
65
+ // refused intermittently — a starved sealed pool (the 2026-09-08
66
+ // diagnosis's shape). Scoped questions ride deep until the grid
67
+ // prices the lanes against a sealed pool.
68
+ if (u?.doc_number) features.push("doc-scoped");
59
69
  if (features.length) return { route: "deep", features };
60
70
 
61
- // FAST — everything else: a question within the word cap rides the
62
- // fast registry. The conservative direction is structural here: the
63
- // long, the complex, the multi-perspective and the process-shaped all
64
- // routed deep above; under-routing costs accuracy, over-routing costs
65
- // only latency, and the grid prices both.
66
- if (u?.doc_number) features.push("doc-scoped");
71
+ // FAST — everything else: an UNscoped question within the word cap
72
+ // rides the fast registry. The conservative direction is structural
73
+ // here: the long, the complex, the multi-perspective, the
74
+ // process-shaped and the scoped all routed deep above; under-routing
75
+ // costs accuracy, over-routing costs only latency, and the grid
76
+ // prices both.
67
77
  if (u?.term) features.push("definitional");
68
78
  if ((u?.defined_terms ?? []).length > 0) features.push("terminology");
69
79
  features.push("short-question");
@@ -1390,8 +1390,8 @@ function routeFor(u, query) {
1390
1390
  if ((u?.sub_queries ?? []).length > 0) features.push("sub-queries");
1391
1391
  if (u?.process_intent) features.push("process-intent");
1392
1392
  if (words > ROUTE_FAST_WORD_CAP) features.push("long-question");
1393
- if (features.length) return { route: "deep", features };
1394
1393
  if (u?.doc_number) features.push("doc-scoped");
1394
+ if (features.length) return { route: "deep", features };
1395
1395
  if (u?.term) features.push("definitional");
1396
1396
  if ((u?.defined_terms ?? []).length > 0) features.push("terminology");
1397
1397
  features.push("short-question");