@thehammer/template-verification 0.2.8 → 0.2.10
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.
- package/dist/components/AuditCallCard.vue.d.ts +1 -1
- package/dist/components/VerificationModal.vue.d.ts +14 -2
- package/dist/constants.d.ts +1 -1
- package/dist/context.d.ts +9 -13
- package/dist/index.d.ts +9 -7
- package/dist/lib/dataPointDetail.d.ts +41 -0
- package/dist/style.css +1 -1
- package/dist/template-verification.js +832 -983
- package/dist/types.d.ts +21 -2
- package/package.json +1 -1
- package/dist/components/ComparisonPage.vue.d.ts +0 -2
- package/dist/lib/audit.d.ts +0 -32
package/dist/types.d.ts
CHANGED
|
@@ -60,7 +60,21 @@ export interface VerificationSource {
|
|
|
60
60
|
/** The LLM call (ApiLog id) that produced this citation, via the source message. */
|
|
61
61
|
api_log_id?: number | string | null;
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The extracted (pipeline) candidate — carries provenance: confidence, reasoning, citation.
|
|
65
|
+
*
|
|
66
|
+
* SG-392: the host's BASE render (`data.__meta`) ships only `value`/`confidence`/
|
|
67
|
+
* `state` plus the two `_count` integers below — `reasoning`/`basis`/`sources`/
|
|
68
|
+
* `history` are `undefined` there. They populate only after
|
|
69
|
+
* `fetchDataPointDetail()` resolves for this field's anchor (see
|
|
70
|
+
* `VerificationModal.vue`, which fetches the instant the Inspector dialog opens
|
|
71
|
+
* and merges the result in). A real production render was shipping every field's
|
|
72
|
+
* full retry history — each carrying its own `sources[]`, each source carrying two
|
|
73
|
+
* full `StoredFile` objects — unconditionally, on every load (~9MB, WI-1090); this
|
|
74
|
+
* split is the fix. Every consumer here degrades gracefully on the undefined case
|
|
75
|
+
* (a length-based count/tooltip/scoreboard reads `*_count` first, `.length` as a
|
|
76
|
+
* fallback for a fixture/detail-response that already carries the full arrays).
|
|
77
|
+
*/
|
|
64
78
|
export interface ExtractedCandidate {
|
|
65
79
|
value: unknown;
|
|
66
80
|
confidence: number | null;
|
|
@@ -68,6 +82,8 @@ export interface ExtractedCandidate {
|
|
|
68
82
|
/** verbatim | inferred — replaces the retired cited_text/cited_text_verified pair (SG-181). */
|
|
69
83
|
basis?: "verbatim" | "inferred" | null;
|
|
70
84
|
sources?: VerificationSource[];
|
|
85
|
+
/** Cheap `sources?.length` equivalent — present even when `sources` itself is not (SG-392). */
|
|
86
|
+
sources_count?: number;
|
|
71
87
|
/**
|
|
72
88
|
* Extraction/citation-correction outcome (SG-189). 'failed' means extraction/
|
|
73
89
|
* citation-correction failed for this field; when 'failed', `reasoning` carries
|
|
@@ -80,9 +96,12 @@ export interface ExtractedCandidate {
|
|
|
80
96
|
* field, oldest first, including the live winner and every non-live loser / FAILED
|
|
81
97
|
* candidate / superseded value. The verification layer drills into this to show each
|
|
82
98
|
* attempt's timestamp, provenance, and confidence, with the chosen entry marked.
|
|
83
|
-
* Undefined for hosts predating SG-190
|
|
99
|
+
* Undefined for hosts predating SG-190, and (SG-392) for the base render — see
|
|
100
|
+
* this interface's own docblock.
|
|
84
101
|
*/
|
|
85
102
|
history?: VerificationHistoryEntry[];
|
|
103
|
+
/** Cheap `history?.length` equivalent — present even when `history` itself is not (SG-392). */
|
|
104
|
+
history_count?: number;
|
|
86
105
|
}
|
|
87
106
|
/**
|
|
88
107
|
* One recorded attempt in a field's extraction history (SG-190). Mirrors the extracted
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thehammer/template-verification",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
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",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
package/dist/lib/audit.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { DataPointAnchor } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* One sanitized LLM call from the host's token-sealed data-point audit endpoint
|
|
4
|
-
* (gpt-manager `TemplateRenderDataController::dataPointAudit`). Request/response
|
|
5
|
-
* are the raw JSON payloads the team owns; headers/stack traces never ship.
|
|
6
|
-
*/
|
|
7
|
-
export interface AuditLlmCall {
|
|
8
|
-
id: number | string;
|
|
9
|
-
service?: string | null;
|
|
10
|
-
endpoint?: string | null;
|
|
11
|
-
model?: string | null;
|
|
12
|
-
status_code?: number | null;
|
|
13
|
-
run_time_ms?: number | null;
|
|
14
|
-
started_at?: string | null;
|
|
15
|
-
request?: unknown;
|
|
16
|
-
response?: unknown;
|
|
17
|
-
/**
|
|
18
|
-
* Which pipeline stage this call belongs to (e.g. "Data Extraction Directive") —
|
|
19
|
-
* the TaskOrchestrator name the host resolved this call's TaskWorker back to.
|
|
20
|
-
* Null when the host could not attribute a stage (see gpt-manager's
|
|
21
|
-
* DataPointAuditService for the current Extraction-only attribution scope).
|
|
22
|
-
*/
|
|
23
|
-
stage?: string | null;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Lazy-fetch the LLM-call trace for one data point. The anchor's NEAREST object
|
|
27
|
-
* id + leaf field identify the attribute; the host re-resolves its sources
|
|
28
|
-
* server-side (the client never names ApiLog ids). Throws on a non-OK response —
|
|
29
|
-
* callers surface the failure state; an empty `data` array is a valid "no trace"
|
|
30
|
-
* result, not an error.
|
|
31
|
-
*/
|
|
32
|
-
export declare function fetchDataPointAudit(auditUrl: string, anchor: DataPointAnchor): Promise<AuditLlmCall[]>;
|