@konneal/engine 0.2.100 → 0.2.101

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,8 +1,8 @@
1
1
  import {
2
2
  handleAsk
3
- } from "./chunk-GYCUMFOA.js";
3
+ } from "./chunk-DMTRTW2Q.js";
4
4
  import "./chunk-QNLFNEI4.js";
5
- import "./chunk-BBKAETKM.js";
5
+ import "./chunk-Z3R34T7Q.js";
6
6
  import "./chunk-KNCRYAX3.js";
7
7
  import "./chunk-DTW4UW2E.js";
8
8
  import "./chunk-A3QHHUN5.js";
@@ -56,7 +56,7 @@ import {
56
56
  tokenBudget,
57
57
  understandQuery,
58
58
  usageTotal
59
- } from "./chunk-BBKAETKM.js";
59
+ } from "./chunk-Z3R34T7Q.js";
60
60
  import {
61
61
  embed,
62
62
  generateOnce,
@@ -6,7 +6,7 @@ import {
6
6
  sessionFrom,
7
7
  telemetry,
8
8
  understandQuery
9
- } from "./chunk-BBKAETKM.js";
9
+ } from "./chunk-Z3R34T7Q.js";
10
10
  import {
11
11
  portModelRunner
12
12
  } from "./chunk-KNCRYAX3.js";
@@ -22520,10 +22520,10 @@ var conceptGraph = {
22520
22520
  }
22521
22521
  }
22522
22522
  if (numbers.size) {
22523
- const gc = await lexicalWithin(c.env, c.rq || c.query, [...numbers], 12);
22523
+ const gc = await lexicalWithin(c.env, c.rq || c.query, [...numbers], 6);
22524
22524
  const seenIds0 = new Set(c.matches.map((m) => m.id));
22525
22525
  let merged0 = 0;
22526
- for (const m of gc.slice(0, 6)) {
22526
+ for (const m of gc.slice(0, 3)) {
22527
22527
  if (!seenIds0.has(m.id)) {
22528
22528
  c.matches.push({ id: m.id, score: m.score * THRESHOLDS.conceptGraphDiscount, metadata: m.metadata });
22529
22529
  seenIds0.add(m.id);
@@ -22547,9 +22547,9 @@ var graphLane = {
22547
22547
  const g = await c.lane["graph-lane"];
22548
22548
  const seenIds = new Set(c.matches.map((m) => m.id));
22549
22549
  let merged = 0;
22550
- for (const m of (g ?? []).slice(0, 10)) {
22550
+ for (const m of (g ?? []).slice(0, 5)) {
22551
22551
  if (!seenIds.has(m.id)) {
22552
- c.matches.push({ id: m.id, score: m.score * THRESHOLDS.graphLaneDiscount, metadata: m.metadata });
22552
+ c.matches.push({ id: m.id, score: m.score * THRESHOLDS.graphLaneDiscount * 0.5, metadata: m.metadata });
22553
22553
  seenIds.add(m.id);
22554
22554
  merged++;
22555
22555
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  handleSearch
3
- } from "./chunk-OREMF5LK.js";
4
- import "./chunk-BBKAETKM.js";
3
+ } from "./chunk-PIENBLFH.js";
4
+ import "./chunk-Z3R34T7Q.js";
5
5
  import "./chunk-KNCRYAX3.js";
6
6
  import "./chunk-DTW4UW2E.js";
7
7
  import "./chunk-A3QHHUN5.js";
@@ -4,7 +4,7 @@ import {
4
4
  handleMemories,
5
5
  scoreFaithfulness,
6
6
  scoreJudge
7
- } from "../../chunk-GYCUMFOA.js";
7
+ } from "../../chunk-DMTRTW2Q.js";
8
8
  import {
9
9
  TOOLS_REGISTRY,
10
10
  bindModelNode,
@@ -12,7 +12,7 @@ import {
12
12
  } from "../../chunk-QNLFNEI4.js";
13
13
  import {
14
14
  handleSearch
15
- } from "../../chunk-OREMF5LK.js";
15
+ } from "../../chunk-PIENBLFH.js";
16
16
  import {
17
17
  buildMessages,
18
18
  citations,
@@ -34,7 +34,7 @@ import {
34
34
  sessionFrom,
35
35
  telemetry,
36
36
  understandQuery
37
- } from "../../chunk-BBKAETKM.js";
37
+ } from "../../chunk-Z3R34T7Q.js";
38
38
  import {
39
39
  cfBlobs,
40
40
  embed,
@@ -996,7 +996,7 @@ async function callToolOnce(env, ctx, _req, tier, key, name, args, t0) {
996
996
  const r = await runTool({ ...env, DB: env.DB }, { name, args }, "mcp");
997
997
  payload = r ? { tool: r.name, query: r.query, result: r.output } : { error: { message: `tool ${name} returned nothing for the given arguments` } };
998
998
  } else {
999
- const res = name === "ask" ? await (await import("../../ask-KP42T6DH.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-4CBKKNBJ.js")).handleSearch(env, ctx, inner, tier, key);
999
+ const res = name === "ask" ? await (await import("../../ask-OVT3F2US.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-FC7IULRV.js")).handleSearch(env, ctx, inner, tier, key);
1000
1000
  payload = await res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
1001
1001
  }
1002
1002
  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.100",
30
+ "version": "0.2.101",
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",
@@ -54,10 +54,10 @@ export const conceptGraph: Stage = {
54
54
  // candidates rank by the corpus's own BM25 within the set — the
55
55
  // index filter this lane used returned empty for its whole life
56
56
  // (Vectorize metadata filtering is dead on this index)
57
- const gc = await lexicalWithin(c.env, c.rq || c.query, [...numbers], 12);
57
+ const gc = await lexicalWithin(c.env, c.rq || c.query, [...numbers], 6);
58
58
  const seenIds0 = new Set(c.matches.map((m: any) => m.id));
59
59
  let merged0 = 0;
60
- for (const m of gc.slice(0, 6)) {
60
+ for (const m of gc.slice(0, 3)) {
61
61
  if (!seenIds0.has(m.id)) {
62
62
  c.matches.push({ id: m.id, score: m.score * THRESHOLDS.conceptGraphDiscount, metadata: m.metadata });
63
63
  seenIds0.add(m.id);
@@ -23,9 +23,15 @@ export const graphLane: Stage = {
23
23
  const g = (await c.lane["graph-lane"]!) as any;
24
24
  const seenIds = new Set(c.matches.map((m: any) => m.id));
25
25
  let merged = 0;
26
- for (const m of (g ?? []).slice(0, 10)) {
26
+ // narrow by the reverted experiment's own law (rag#137): candidate-
27
+ // family flooding dilutes the pool — five candidates, and at HALF
28
+ // the lane discount so only family text the cross-encoder genuinely
29
+ // prefers survives the cut (the first breathing gate measured the
30
+ // flood signature: faithfulness sagging across unrelated legs and
31
+ // the typed blocks displaced from the context)
32
+ for (const m of (g ?? []).slice(0, 5)) {
27
33
  if (!seenIds.has(m.id)) {
28
- c.matches.push({ id: m.id, score: m.score * THRESHOLDS.graphLaneDiscount, metadata: m.metadata });
34
+ c.matches.push({ id: m.id, score: m.score * THRESHOLDS.graphLaneDiscount * 0.5, metadata: m.metadata });
29
35
  seenIds.add(m.id);
30
36
  merged++;
31
37
  }