@thehammer/template-verification 0.2.12 → 0.2.13

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +16 -5
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -117,8 +117,10 @@ export interface Correction {
117
117
  * The extracted (pipeline) candidate — carries provenance: confidence, reasoning, citation.
118
118
  *
119
119
  * SG-392: the host's BASE render (`data.__meta`) ships only `value`/`confidence`/
120
- * `state` plus the two `_count` integers below `reasoning`/`basis`/`sources`/
121
- * `history` are `undefined` there, and NOTHING IN THIS LIBRARY FILLS THEM IN ANY
120
+ * `state` plus the two `_count` integers below (`sources`/`history` are `undefined`
121
+ * there) — `reasoning` and `verbatim` (SG-325) ship in both light and full mode, being
122
+ * short per-field strings rather than per-attempt arrays. NOTHING IN THIS LIBRARY FILLS
123
+ * `sources`/`history` IN ANY
122
124
  * MORE. They used to be lazy-fetched by the in-letter Inspector dialog, which is
123
125
  * deleted; the embedding app reads a data point's full detail against its own
124
126
  * session instead. A real production render was shipping every field's
@@ -132,8 +134,16 @@ export interface ExtractedCandidate {
132
134
  value: unknown;
133
135
  confidence: number | null;
134
136
  reasoning?: string | null;
135
- /** verbatim | inferred — replaces the retired cited_text/cited_text_verified pair (SG-181). */
136
- basis?: "verbatim" | "inferred" | null;
137
+ /**
138
+ * What the page literally says for this field — the two-value model (SG-323/SG-324/
139
+ * SG-325), replacing the retired `basis` discriminator (`verbatim` | `inferred`) the
140
+ * model used to classify its own output with, non-deterministically. `value` above is
141
+ * the inferred/normalized reading (or this same string when inference returned null);
142
+ * `verbatim` is never a provenance flag on `value` — both are first-class and either
143
+ * (or both) may be null. Consumers show them side by side, never hide `verbatim` when
144
+ * it equals `value`, and never reintroduce a quote-vs-derived badge.
145
+ */
146
+ verbatim?: string | null;
137
147
  sources?: VerificationSource[];
138
148
  /** Cheap `sources?.length` equivalent — present even when `sources` itself is not (SG-392). */
139
149
  sources_count?: number;
@@ -178,7 +188,8 @@ export interface VerificationHistoryEntry {
178
188
  value: unknown;
179
189
  confidence: number | null;
180
190
  reasoning?: string | null;
181
- basis?: "verbatim" | "inferred" | null;
191
+ /** See {@link ExtractedCandidate.verbatim} the same two-value model, per recorded attempt. */
192
+ verbatim?: string | null;
182
193
  state?: "present" | "absent" | "removed" | "failed" | null;
183
194
  /** True for the single live/winning attempt; false for losers/FAILED/superseded values. */
184
195
  is_chosen: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/template-verification",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "Read-write verification overlay for rendered template apps — per-data-point confidence, discrepancy, 3-source resolution (override > extracted > claim), inline edit, and a recursive comparison page. Consumes the host's __meta sidecar; fetches nothing.",
5
5
  "license": "MIT",
6
6
  "type": "module",