@konneal/engine 0.2.13 → 0.2.15

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-B4MH5IR2.js";
3
+ } from "./chunk-E5BXYZH6.js";
4
4
  import "./chunk-7UT76RQO.js";
5
5
  import "./chunk-EFQALN2Z.js";
6
6
  import "./chunk-DBBGOOMZ.js";
@@ -128,7 +128,10 @@ async function scoreJudge(ai, model, systemPrompt, userPrompt) {
128
128
  { role: "user", content: userPrompt }
129
129
  ],
130
130
  max_tokens: 6144,
131
- reasoning_effort: "low"
131
+ reasoning_effort: "low",
132
+ // the judge is a measurement: greedy decoding, no sampling
133
+ temperature: 0,
134
+ top_p: 1
132
135
  });
133
136
  const text = typeof res?.response === "string" ? res.response : res?.choices?.[0]?.message?.content;
134
137
  let score = null;
@@ -851,6 +851,8 @@ export interface components {
851
851
  AskRequest: {
852
852
  /** @description The question, at most 8000 characters. */
853
853
  query: string;
854
+ /** @description The caller's entitlement set: the licensed-standard keys this request may see, validated against the deployment's declared catalog. Absent or unknown keys mean the fail-closed default — an empty set — so licensed content never reaches an unentitled caller. Each key admits the chunks stamped with that standard's license and enables the machine verdicts computed from its condition sets. */
855
+ licensed_standards?: string[];
854
856
  /**
855
857
  * @description When true, the response is a server-sent event stream. The first event is the reading (how the service interpreted the question), then the citations, then the answer tokens, and finally the completion marker.
856
858
  * @default false
@@ -892,7 +894,7 @@ export interface components {
892
894
  /** Format: uri */
893
895
  url?: string;
894
896
  }[];
895
- /** @description The typed objects the answer carries, such as tables, verdicts and unit blocks. */
897
+ /** @description The typed objects the answer carries: tables, figures, condition-set verdicts, conformance verdicts and unit blocks. A verdict block's payload carries the machine evaluation — the verdict (pass, fail or void), one check per machine rule with its expression, the values bound from the question, and the individual result — plus, for condition-set membership, the matched severity set or the nearest set with the violated bands. The verdict is computed server-side; clients render it as data. */
896
898
  blocks?: Record<string, never>[];
897
899
  /** @description The model that generated the answer. */
898
900
  model?: string;
@@ -7,7 +7,7 @@ import {
7
7
  handleMemories,
8
8
  scoreJudge,
9
9
  standardForDocNumber
10
- } from "../../chunk-B4MH5IR2.js";
10
+ } from "../../chunk-E5BXYZH6.js";
11
11
  import {
12
12
  buildMessages,
13
13
  citations,
@@ -979,7 +979,7 @@ async function handleMcp(env, ctx, req, tier, key) {
979
979
  // stream:false forces the JSON lane (anon defaults to SSE)
980
980
  body: JSON.stringify({ ...args, stream: false })
981
981
  });
982
- const res = name === "ask" ? await (await import("../../ask-J3VYAEMM.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-RFKT7ZZY.js")).handleSearch(env, ctx, inner, tier, key);
982
+ const res = name === "ask" ? await (await import("../../ask-KYAZRMTS.js")).handleAsk(env, ctx, inner, tier, key) : await (await import("../../search-RFKT7ZZY.js")).handleSearch(env, ctx, inner, tier, key);
983
983
  return res.json().catch(() => ({ error: { message: "tool transport failed", status: res.status } }));
984
984
  });
985
985
  if (out.ok && "accepted" in out) return new Response(null, { status: 202 });
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "@oimlsmart/oiml-pubid": "^1.2.1"
35
35
  },
36
36
  "dependencies": {},
37
- "version": "0.2.13",
37
+ "version": "0.2.15",
38
38
  "description": "The Konneal engine: the publisher-agnostic build pipeline and API plane for standards intelligence (retrieval, answer contract, verdicts, evaluation).",
39
39
  "license": "BSD-3-Clause",
40
40
  "type": "module",
@@ -83,6 +83,12 @@ paths:
83
83
  For OIML R 60, /constraint/dead_load_max_geometry:
84
84
  with E_max 30000 v, is testing to D_max 26000 v valid?
85
85
  stream: false
86
+ severity-membership:
87
+ value:
88
+ query: Is 40 °C at 85 % RH a valid Test Cab severity per IEC 60068-2-78?
89
+ stream: false
90
+ licensed_standards:
91
+ - std:iec-60068-2-78
86
92
  responses:
87
93
  '200':
88
94
  description: The answer with citations and typed blocks.
@@ -1100,6 +1106,19 @@ components:
1100
1106
  query:
1101
1107
  type: string
1102
1108
  description: The question, at most 8000 characters.
1109
+ licensed_standards:
1110
+ type: array
1111
+ description: >-
1112
+ The caller's entitlement set: the licensed-standard keys this
1113
+ request may see, validated against the deployment's declared
1114
+ catalog. Absent or unknown keys mean the fail-closed default —
1115
+ an empty set — so licensed content never reaches an unentitled
1116
+ caller. Each key admits the chunks stamped with that
1117
+ standard's license and enables the machine verdicts computed
1118
+ from its condition sets.
1119
+ items:
1120
+ type: string
1121
+ example: "std:iec-60068-2-78"
1103
1122
  stream:
1104
1123
  type: boolean
1105
1124
  default: false
@@ -1157,8 +1176,15 @@ components:
1157
1176
  blocks:
1158
1177
  type: array
1159
1178
  description: >-
1160
- The typed objects the answer carries, such as tables, verdicts
1161
- and unit blocks.
1179
+ The typed objects the answer carries: tables, figures,
1180
+ condition-set verdicts, conformance verdicts and unit blocks.
1181
+ A verdict block's payload carries the machine evaluation —
1182
+ the verdict (pass, fail or void), one check per machine rule
1183
+ with its expression, the values bound from the question, and
1184
+ the individual result — plus, for condition-set membership,
1185
+ the matched severity set or the nearest set with the violated
1186
+ bands. The verdict is computed server-side; clients render it
1187
+ as data.
1162
1188
  items:
1163
1189
  type: object
1164
1190
  model:
@@ -67,6 +67,9 @@ export async function scoreJudge(
67
67
  ],
68
68
  max_tokens: 6144,
69
69
  reasoning_effort: "low",
70
+ // the judge is a measurement: greedy decoding, no sampling
71
+ temperature: 0,
72
+ top_p: 1,
70
73
  });
71
74
  const text = typeof res?.response === "string" ? res.response : res?.choices?.[0]?.message?.content;
72
75
  // reasoning models can emit {...} fragments before the verdict — the