@konneal/engine 0.2.111 → 0.2.112
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.
|
@@ -2145,13 +2145,13 @@ ${summary}` }] : [],
|
|
|
2145
2145
|
...readAs() ? [{ type: "read", read: readAs() }] : [],
|
|
2146
2146
|
{ type: "citations", citations: citations2, context_applied: draftCtxApplied, ...draftPayload ? { draft: draftPayload } : {}, quota },
|
|
2147
2147
|
{ type: "token", v: verdict.answer },
|
|
2148
|
-
{ type: "done", model, query_hash: queryHash2, context_applied: draftCtxApplied, read: readAs() }
|
|
2148
|
+
{ type: "done", model, query_hash: queryHash2, context_applied: draftCtxApplied, read: readAs(), ...ablate ? { ablate } : {} }
|
|
2149
2149
|
],
|
|
2150
2150
|
corsHeaders(req)
|
|
2151
2151
|
);
|
|
2152
2152
|
}
|
|
2153
2153
|
const tq2 = await chargeAnswerTokens(env, bucketId, void 0, q.query.length, verdict.answer.length);
|
|
2154
|
-
return json({ answer: verdict.answer, citations: citations2, model, query_hash: queryHash2, follow_ups: [], context_applied: draftCtxApplied, read: readAs(), ...draftPayload ? { draft: draftPayload } : {}, quota: { ...quota, ...tq2 } });
|
|
2154
|
+
return json({ answer: verdict.answer, citations: citations2, model, query_hash: queryHash2, follow_ups: [], context_applied: draftCtxApplied, read: readAs(), ...draftPayload ? { draft: draftPayload } : {}, ...ablate ? { ablate } : {}, quota: { ...quota, ...tq2 } });
|
|
2155
2155
|
}
|
|
2156
2156
|
if (apiCallIntent) {
|
|
2157
2157
|
const callCtxApplied = declaredCtx ? appliedContext(declaredCtx, null) : NO_CONTEXT;
|
|
@@ -2173,13 +2173,13 @@ ${summary}` }] : [],
|
|
|
2173
2173
|
...readAs() ? [{ type: "read", read: readAs() }] : [],
|
|
2174
2174
|
{ type: "citations", citations: [], context_applied: callCtxApplied, ...draftPayload ? { draft: draftPayload } : {}, quota },
|
|
2175
2175
|
{ type: "token", v: verdict.answer },
|
|
2176
|
-
{ type: "done", model, query_hash: queryHash2, context_applied: callCtxApplied, read: readAs() }
|
|
2176
|
+
{ type: "done", model, query_hash: queryHash2, context_applied: callCtxApplied, read: readAs(), ...ablate ? { ablate } : {} }
|
|
2177
2177
|
],
|
|
2178
2178
|
corsHeaders(req)
|
|
2179
2179
|
);
|
|
2180
2180
|
}
|
|
2181
2181
|
const tq2 = await chargeAnswerTokens(env, bucketId, void 0, q.query.length, verdict.answer.length);
|
|
2182
|
-
return json({ answer: verdict.answer, citations: [], model, query_hash: queryHash2, follow_ups: [], context_applied: callCtxApplied, read: readAs(), ...draftPayload ? { draft: draftPayload } : {}, quota: { ...quota, ...tq2 } });
|
|
2182
|
+
return json({ answer: verdict.answer, citations: [], model, query_hash: queryHash2, follow_ups: [], context_applied: callCtxApplied, read: readAs(), ...draftPayload ? { draft: draftPayload } : {}, ...ablate ? { ablate } : {}, quota: { ...quota, ...tq2 } });
|
|
2183
2183
|
}
|
|
2184
2184
|
let liveRecords;
|
|
2185
2185
|
let accountNote;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
handleMemories,
|
|
5
5
|
scoreFaithfulness,
|
|
6
6
|
scoreJudge
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-25VMZ7WE.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-
|
|
1003
|
+
const res = name === "ask" ? await (await import("../../ask-FFDCQXAA.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.
|
|
30
|
+
"version": "0.2.112",
|
|
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",
|
|
@@ -861,13 +861,13 @@ let convEntities: Array<{ entity: string; kind: string }> = [];
|
|
|
861
861
|
...(readAs() ? [{ type: "read", read: readAs() }] : []),
|
|
862
862
|
{ type: "citations", citations, context_applied: draftCtxApplied, ...(draftPayload ? { draft: draftPayload } : {}), quota, },
|
|
863
863
|
{ type: "token", v: verdict.answer },
|
|
864
|
-
{ type: "done", model, query_hash: queryHash, context_applied: draftCtxApplied, read: readAs() },
|
|
864
|
+
{ type: "done", model, query_hash: queryHash, context_applied: draftCtxApplied, read: readAs(), ...(ablate ? { ablate } : {}) },
|
|
865
865
|
],
|
|
866
866
|
corsHeaders(req),
|
|
867
867
|
);
|
|
868
868
|
}
|
|
869
869
|
const tq = await chargeAnswerTokens(env, bucketId, undefined, q.query.length, verdict.answer.length);
|
|
870
|
-
return json({ answer: verdict.answer, citations, model, query_hash: queryHash, follow_ups: [], context_applied: draftCtxApplied, read: readAs(), ...(draftPayload ? { draft: draftPayload } : {}), quota: { ...quota, ...tq } });
|
|
870
|
+
return json({ answer: verdict.answer, citations, model, query_hash: queryHash, follow_ups: [], context_applied: draftCtxApplied, read: readAs(), ...(draftPayload ? { draft: draftPayload } : {}), ...(ablate ? { ablate } : {}), quota: { ...quota, ...tq } });
|
|
871
871
|
}
|
|
872
872
|
|
|
873
873
|
// ── The api_call draft (TODO.ai-platform/09) — the operations
|
|
@@ -899,13 +899,13 @@ let convEntities: Array<{ entity: string; kind: string }> = [];
|
|
|
899
899
|
...(readAs() ? [{ type: "read", read: readAs() }] : []),
|
|
900
900
|
{ type: "citations", citations: [], context_applied: callCtxApplied, ...(draftPayload ? { draft: draftPayload } : {}), quota, },
|
|
901
901
|
{ type: "token", v: verdict.answer },
|
|
902
|
-
{ type: "done", model, query_hash: queryHash, context_applied: callCtxApplied, read: readAs() },
|
|
902
|
+
{ type: "done", model, query_hash: queryHash, context_applied: callCtxApplied, read: readAs(), ...(ablate ? { ablate } : {}) },
|
|
903
903
|
],
|
|
904
904
|
corsHeaders(req),
|
|
905
905
|
);
|
|
906
906
|
}
|
|
907
907
|
const tq = await chargeAnswerTokens(env, bucketId, undefined, q.query.length, verdict.answer.length);
|
|
908
|
-
return json({ answer: verdict.answer, citations: [], model, query_hash: queryHash, follow_ups: [], context_applied: callCtxApplied, read: readAs(), ...(draftPayload ? { draft: draftPayload } : {}), quota: { ...quota, ...tq } });
|
|
908
|
+
return json({ answer: verdict.answer, citations: [], model, query_hash: queryHash, follow_ups: [], context_applied: callCtxApplied, read: readAs(), ...(draftPayload ? { draft: draftPayload } : {}), ...(ablate ? { ablate } : {}), quota: { ...quota, ...tq } });
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
// (declared before the retrieval try: the account block, the refusal
|