@mmnto/totem 1.64.0 → 1.64.2
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/artifacts/panel.d.ts +1919 -0
- package/dist/artifacts/panel.d.ts.map +1 -0
- package/dist/artifacts/panel.js +503 -0
- package/dist/artifacts/panel.js.map +1 -0
- package/dist/artifacts/panel.test.d.ts +15 -0
- package/dist/artifacts/panel.test.d.ts.map +1 -0
- package/dist/artifacts/panel.test.js +335 -0
- package/dist/artifacts/panel.test.js.map +1 -0
- package/dist/artifacts/post-checks-rules.d.ts +93 -0
- package/dist/artifacts/post-checks-rules.d.ts.map +1 -0
- package/dist/artifacts/post-checks-rules.js +307 -0
- package/dist/artifacts/post-checks-rules.js.map +1 -0
- package/dist/artifacts/post-checks-rules.test.d.ts +9 -0
- package/dist/artifacts/post-checks-rules.test.d.ts.map +1 -0
- package/dist/artifacts/post-checks-rules.test.js +258 -0
- package/dist/artifacts/post-checks-rules.test.js.map +1 -0
- package/dist/artifacts/post-checks.d.ts +102 -0
- package/dist/artifacts/post-checks.d.ts.map +1 -0
- package/dist/artifacts/post-checks.js +80 -0
- package/dist/artifacts/post-checks.js.map +1 -0
- package/dist/artifacts/post-checks.test.d.ts +12 -0
- package/dist/artifacts/post-checks.test.d.ts.map +1 -0
- package/dist/artifacts/post-checks.test.js +103 -0
- package/dist/artifacts/post-checks.test.js.map +1 -0
- package/dist/compiler-schema.d.ts +329 -0
- package/dist/compiler-schema.d.ts.map +1 -1
- package/dist/compiler-schema.js +136 -1
- package/dist/compiler-schema.js.map +1 -1
- package/dist/compiler-schema.test.js +136 -1
- package/dist/compiler-schema.test.js.map +1 -1
- package/dist/compiler.d.ts +2 -2
- package/dist/compiler.d.ts.map +1 -1
- package/dist/compiler.js +1 -1
- package/dist/compiler.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1919 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Panel synthesis — independent lanes, deterministic script aggregation
|
|
3
|
+
* (mmnto-ai/totem#2104, strategy#474 slice 5).
|
|
4
|
+
*
|
|
5
|
+
* A "panel" is N independent runs (lanes) of the same task over one immutable
|
|
6
|
+
* grounding bundle, each emitting a #2100 {@link RunArtifact} plus its #2103
|
|
7
|
+
* {@link PostCheckReport}. This module is the ENGINE: a pure, zero-LLM script
|
|
8
|
+
* (Tenet 9) that aggregates the lanes — group findings by `ruleName`, tally
|
|
9
|
+
* lane verdicts, surface divergence, and label vendor diversity HONESTLY — plus
|
|
10
|
+
* content-addressed storage for the resulting {@link PanelArtifact}. It does NOT
|
|
11
|
+
* run backends or dispatch lanes (the CLI runner is a deferred fast-follow), and
|
|
12
|
+
* it emits NO panel-level gate: the panel is a SENSOR (a verdict *distribution*,
|
|
13
|
+
* never a single accept/reject), leaving any gating policy to a later consumer.
|
|
14
|
+
*
|
|
15
|
+
* Diversity-labeling honesty is the load-bearing decision (strategy#474 / Prop
|
|
16
|
+
* 291 / Tenet 19): cross-VENDOR convergence is the strong signal, NOT vote count.
|
|
17
|
+
* The raw `providers[]` is always emitted lossless so a label can never overclaim
|
|
18
|
+
* rigor, and an unrecognized provider string trips a fail-loud `coarse` marker
|
|
19
|
+
* (see {@link classifyDiversity}).
|
|
20
|
+
*
|
|
21
|
+
* Schema-evolution policy mirrors {@link RunArtifactSchema} (F1): the reader is
|
|
22
|
+
* version-tolerant within major 1; a major bump needs a migration entry before
|
|
23
|
+
* the writer ships. Zod is the persisted-JSON boundary (read back from disk).
|
|
24
|
+
*/
|
|
25
|
+
import { z } from 'zod';
|
|
26
|
+
import type { PostCheckReport } from './post-checks.js';
|
|
27
|
+
import type { RunArtifact } from './schema.js';
|
|
28
|
+
/** The panel schemaVersion WRITTEN by this code. Readers accept any 1.x. */
|
|
29
|
+
export declare const PANEL_ARTIFACT_SCHEMA_VERSION = "1.0.0";
|
|
30
|
+
/** The major this reader understands; other majors need a migration entry. */
|
|
31
|
+
export declare const PANEL_ARTIFACT_KNOWN_MAJOR = 1;
|
|
32
|
+
/**
|
|
33
|
+
* The two honest diversity labels.
|
|
34
|
+
*
|
|
35
|
+
* `same-vendor-isolated` means **context-isolation, NOT rater-independence**: the
|
|
36
|
+
* lanes ran in isolated contexts but on one vendor family, so the panel's
|
|
37
|
+
* `verdictDistribution` is **N correlated samples, not N independent votes**
|
|
38
|
+
* (Prop 277 correlated-raters; strategy-claude PP2). A consumer must never read a
|
|
39
|
+
* same-vendor split as independent agreement. `cross-vendor` means ≥2 distinct
|
|
40
|
+
* provider families ran — the Tenet-19 strong-signal case — and is trustworthy
|
|
41
|
+
* only when `diversityConfidence === 'verified'` (see {@link classifyDiversity}).
|
|
42
|
+
*/
|
|
43
|
+
export declare const PanelDiversityClassSchema: z.ZodEnum<["cross-vendor", "same-vendor-isolated"]>;
|
|
44
|
+
export type PanelDiversityClass = z.infer<typeof PanelDiversityClassSchema>;
|
|
45
|
+
/**
|
|
46
|
+
* Honest vendor-diversity label for a panel. `providers[]` is ALWAYS present and
|
|
47
|
+
* lossless (per-lane, canonical laneId order) so no derived field can overclaim.
|
|
48
|
+
*/
|
|
49
|
+
export declare const PanelDiversitySchema: z.ZodObject<{
|
|
50
|
+
/** Per-lane provider strings, lossless, in canonical (laneId-sorted) order. */
|
|
51
|
+
providers: z.ZodArray<z.ZodString, "many">;
|
|
52
|
+
/** `new Set(providers).size` — a true cluster count ONLY while confidence is `verified`. */
|
|
53
|
+
distinctProviders: z.ZodNumber;
|
|
54
|
+
class: z.ZodEnum<["cross-vendor", "same-vendor-isolated"]>;
|
|
55
|
+
/** Sorted unique providers outside {@link KNOWN_PROVIDER_FAMILIES} — the overclaim risk. */
|
|
56
|
+
unrecognizedProviders: z.ZodArray<z.ZodString, "many">;
|
|
57
|
+
/** `verified` when every provider's family is known; `coarse` otherwise (don't trust `cross-vendor`). */
|
|
58
|
+
diversityConfidence: z.ZodEnum<["verified", "coarse"]>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
61
|
+
providers: string[];
|
|
62
|
+
distinctProviders: number;
|
|
63
|
+
unrecognizedProviders: string[];
|
|
64
|
+
diversityConfidence: "verified" | "coarse";
|
|
65
|
+
}, {
|
|
66
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
67
|
+
providers: string[];
|
|
68
|
+
distinctProviders: number;
|
|
69
|
+
unrecognizedProviders: string[];
|
|
70
|
+
diversityConfidence: "verified" | "coarse";
|
|
71
|
+
}>;
|
|
72
|
+
export type PanelDiversity = z.infer<typeof PanelDiversitySchema>;
|
|
73
|
+
/**
|
|
74
|
+
* One rule's outcome aggregated across all lanes. The dedup anchor is `ruleName`
|
|
75
|
+
* (PostCheckFinding has no path:line anchor); `messages` are preserved VERBATIM
|
|
76
|
+
* (Tenet 9 — no LLM rewrite) and sorted for determinism.
|
|
77
|
+
*/
|
|
78
|
+
export declare const SynthesisFindingSchema: z.ZodObject<{
|
|
79
|
+
ruleName: z.ZodString;
|
|
80
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
81
|
+
/** Lane verdict tally; the three keys always sum to `lanes.length` (absent lanes count as `abstain`). */
|
|
82
|
+
verdicts: z.ZodObject<{
|
|
83
|
+
pass: z.ZodNumber;
|
|
84
|
+
fail: z.ZodNumber;
|
|
85
|
+
abstain: z.ZodNumber;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
pass: number;
|
|
88
|
+
fail: number;
|
|
89
|
+
abstain: number;
|
|
90
|
+
}, {
|
|
91
|
+
pass: number;
|
|
92
|
+
fail: number;
|
|
93
|
+
abstain: number;
|
|
94
|
+
}>;
|
|
95
|
+
/** True IFF both `pass` and `fail` appear across lanes (`abstain` is neutral). */
|
|
96
|
+
divergent: z.ZodBoolean;
|
|
97
|
+
/** Verbatim lane messages (present lanes only), sorted. */
|
|
98
|
+
messages: z.ZodArray<z.ZodString, "many">;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
tier: "decidable" | "sensor";
|
|
101
|
+
ruleName: string;
|
|
102
|
+
verdicts: {
|
|
103
|
+
pass: number;
|
|
104
|
+
fail: number;
|
|
105
|
+
abstain: number;
|
|
106
|
+
};
|
|
107
|
+
divergent: boolean;
|
|
108
|
+
messages: string[];
|
|
109
|
+
}, {
|
|
110
|
+
tier: "decidable" | "sensor";
|
|
111
|
+
ruleName: string;
|
|
112
|
+
verdicts: {
|
|
113
|
+
pass: number;
|
|
114
|
+
fail: number;
|
|
115
|
+
abstain: number;
|
|
116
|
+
};
|
|
117
|
+
divergent: boolean;
|
|
118
|
+
messages: string[];
|
|
119
|
+
}>;
|
|
120
|
+
export type SynthesisFinding = z.infer<typeof SynthesisFindingSchema>;
|
|
121
|
+
/**
|
|
122
|
+
* The deterministic aggregation. SENSOR ONLY: a `verdictDistribution` tally (of
|
|
123
|
+
* each lane's own `PostCheckReport.isRejected`) plus per-rule findings and a
|
|
124
|
+
* divergence count — and deliberately NO panel-level `isRejected`/gate boolean.
|
|
125
|
+
* A bare tally invites the vote-counting Tenet 19 forbids, so consumers must
|
|
126
|
+
* lead with divergence + diversity; the tally is one subordinate raw signal.
|
|
127
|
+
*/
|
|
128
|
+
export declare const PanelSynthesisSchema: z.ZodObject<{
|
|
129
|
+
/** Tally of lane outcomes: `isRejected===false ⟹ accepted`, `true ⟹ rejected`. Sums to lane count. */
|
|
130
|
+
verdictDistribution: z.ZodObject<{
|
|
131
|
+
accepted: z.ZodNumber;
|
|
132
|
+
rejected: z.ZodNumber;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
rejected: number;
|
|
135
|
+
accepted: number;
|
|
136
|
+
}, {
|
|
137
|
+
rejected: number;
|
|
138
|
+
accepted: number;
|
|
139
|
+
}>;
|
|
140
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
141
|
+
ruleName: z.ZodString;
|
|
142
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
143
|
+
/** Lane verdict tally; the three keys always sum to `lanes.length` (absent lanes count as `abstain`). */
|
|
144
|
+
verdicts: z.ZodObject<{
|
|
145
|
+
pass: z.ZodNumber;
|
|
146
|
+
fail: z.ZodNumber;
|
|
147
|
+
abstain: z.ZodNumber;
|
|
148
|
+
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
pass: number;
|
|
150
|
+
fail: number;
|
|
151
|
+
abstain: number;
|
|
152
|
+
}, {
|
|
153
|
+
pass: number;
|
|
154
|
+
fail: number;
|
|
155
|
+
abstain: number;
|
|
156
|
+
}>;
|
|
157
|
+
/** True IFF both `pass` and `fail` appear across lanes (`abstain` is neutral). */
|
|
158
|
+
divergent: z.ZodBoolean;
|
|
159
|
+
/** Verbatim lane messages (present lanes only), sorted. */
|
|
160
|
+
messages: z.ZodArray<z.ZodString, "many">;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
tier: "decidable" | "sensor";
|
|
163
|
+
ruleName: string;
|
|
164
|
+
verdicts: {
|
|
165
|
+
pass: number;
|
|
166
|
+
fail: number;
|
|
167
|
+
abstain: number;
|
|
168
|
+
};
|
|
169
|
+
divergent: boolean;
|
|
170
|
+
messages: string[];
|
|
171
|
+
}, {
|
|
172
|
+
tier: "decidable" | "sensor";
|
|
173
|
+
ruleName: string;
|
|
174
|
+
verdicts: {
|
|
175
|
+
pass: number;
|
|
176
|
+
fail: number;
|
|
177
|
+
abstain: number;
|
|
178
|
+
};
|
|
179
|
+
divergent: boolean;
|
|
180
|
+
messages: string[];
|
|
181
|
+
}>, "many">;
|
|
182
|
+
/** `=== findings.filter(f => f.divergent).length`. */
|
|
183
|
+
divergences: z.ZodNumber;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
findings: {
|
|
186
|
+
tier: "decidable" | "sensor";
|
|
187
|
+
ruleName: string;
|
|
188
|
+
verdicts: {
|
|
189
|
+
pass: number;
|
|
190
|
+
fail: number;
|
|
191
|
+
abstain: number;
|
|
192
|
+
};
|
|
193
|
+
divergent: boolean;
|
|
194
|
+
messages: string[];
|
|
195
|
+
}[];
|
|
196
|
+
verdictDistribution: {
|
|
197
|
+
rejected: number;
|
|
198
|
+
accepted: number;
|
|
199
|
+
};
|
|
200
|
+
divergences: number;
|
|
201
|
+
}, {
|
|
202
|
+
findings: {
|
|
203
|
+
tier: "decidable" | "sensor";
|
|
204
|
+
ruleName: string;
|
|
205
|
+
verdicts: {
|
|
206
|
+
pass: number;
|
|
207
|
+
fail: number;
|
|
208
|
+
abstain: number;
|
|
209
|
+
};
|
|
210
|
+
divergent: boolean;
|
|
211
|
+
messages: string[];
|
|
212
|
+
}[];
|
|
213
|
+
verdictDistribution: {
|
|
214
|
+
rejected: number;
|
|
215
|
+
accepted: number;
|
|
216
|
+
};
|
|
217
|
+
divergences: number;
|
|
218
|
+
}>;
|
|
219
|
+
export type PanelSynthesis = z.infer<typeof PanelSynthesisSchema>;
|
|
220
|
+
/**
|
|
221
|
+
* A persisted copy of a {@link PostCheckFinding}. slice-4's report is plain TS
|
|
222
|
+
* (in-memory only); persisting the panel's audit inputs across the disk boundary
|
|
223
|
+
* needs a Zod boundary (codex #1). `context` is OMITTED from the persisted copy:
|
|
224
|
+
* it is rule-specific, unbounded, not JSON-safe by contract, and never load-bearing
|
|
225
|
+
* for synthesis (which keys on `ruleName`) — "constrain JSON-safe or omit", omitted.
|
|
226
|
+
*/
|
|
227
|
+
export declare const PersistedPostCheckFindingSchema: z.ZodObject<{
|
|
228
|
+
ruleName: z.ZodString;
|
|
229
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
230
|
+
verdict: z.ZodEnum<["pass", "fail", "abstain"]>;
|
|
231
|
+
message: z.ZodString;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
message: string;
|
|
234
|
+
tier: "decidable" | "sensor";
|
|
235
|
+
ruleName: string;
|
|
236
|
+
verdict: "pass" | "fail" | "abstain";
|
|
237
|
+
}, {
|
|
238
|
+
message: string;
|
|
239
|
+
tier: "decidable" | "sensor";
|
|
240
|
+
ruleName: string;
|
|
241
|
+
verdict: "pass" | "fail" | "abstain";
|
|
242
|
+
}>;
|
|
243
|
+
export type PersistedPostCheckFinding = z.infer<typeof PersistedPostCheckFindingSchema>;
|
|
244
|
+
/**
|
|
245
|
+
* A persisted copy of a {@link PostCheckReport}. The `isRejected` ADR-109
|
|
246
|
+
* invariant is re-validated here at BOTH write and read (codex #1): a stored
|
|
247
|
+
* report whose `isRejected` disagrees with its findings is a corrupt audit
|
|
248
|
+
* record and must be rejected loud, never trusted.
|
|
249
|
+
*/
|
|
250
|
+
export declare const PersistedPostCheckReportSchema: z.ZodEffects<z.ZodObject<{
|
|
251
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
252
|
+
ruleName: z.ZodString;
|
|
253
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
254
|
+
verdict: z.ZodEnum<["pass", "fail", "abstain"]>;
|
|
255
|
+
message: z.ZodString;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
message: string;
|
|
258
|
+
tier: "decidable" | "sensor";
|
|
259
|
+
ruleName: string;
|
|
260
|
+
verdict: "pass" | "fail" | "abstain";
|
|
261
|
+
}, {
|
|
262
|
+
message: string;
|
|
263
|
+
tier: "decidable" | "sensor";
|
|
264
|
+
ruleName: string;
|
|
265
|
+
verdict: "pass" | "fail" | "abstain";
|
|
266
|
+
}>, "many">;
|
|
267
|
+
isRejected: z.ZodBoolean;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
findings: {
|
|
270
|
+
message: string;
|
|
271
|
+
tier: "decidable" | "sensor";
|
|
272
|
+
ruleName: string;
|
|
273
|
+
verdict: "pass" | "fail" | "abstain";
|
|
274
|
+
}[];
|
|
275
|
+
isRejected: boolean;
|
|
276
|
+
}, {
|
|
277
|
+
findings: {
|
|
278
|
+
message: string;
|
|
279
|
+
tier: "decidable" | "sensor";
|
|
280
|
+
ruleName: string;
|
|
281
|
+
verdict: "pass" | "fail" | "abstain";
|
|
282
|
+
}[];
|
|
283
|
+
isRejected: boolean;
|
|
284
|
+
}>, {
|
|
285
|
+
findings: {
|
|
286
|
+
message: string;
|
|
287
|
+
tier: "decidable" | "sensor";
|
|
288
|
+
ruleName: string;
|
|
289
|
+
verdict: "pass" | "fail" | "abstain";
|
|
290
|
+
}[];
|
|
291
|
+
isRejected: boolean;
|
|
292
|
+
}, {
|
|
293
|
+
findings: {
|
|
294
|
+
message: string;
|
|
295
|
+
tier: "decidable" | "sensor";
|
|
296
|
+
ruleName: string;
|
|
297
|
+
verdict: "pass" | "fail" | "abstain";
|
|
298
|
+
}[];
|
|
299
|
+
isRejected: boolean;
|
|
300
|
+
}>;
|
|
301
|
+
export type PersistedPostCheckReport = z.infer<typeof PersistedPostCheckReportSchema>;
|
|
302
|
+
/**
|
|
303
|
+
* One persisted lane: its stable id, the #2100 run artifact, and the persisted
|
|
304
|
+
* #2103 report. The full inputs are stored (not just the aggregate) so a panel
|
|
305
|
+
* is re-auditable offline without re-running rules that may have since changed
|
|
306
|
+
* (codex #1 — the same immutability principle behind RunArtifact).
|
|
307
|
+
*/
|
|
308
|
+
export declare const PanelLaneSchema: z.ZodObject<{
|
|
309
|
+
laneId: z.ZodString;
|
|
310
|
+
artifact: z.ZodObject<{
|
|
311
|
+
schemaVersion: z.ZodEffects<z.ZodString, string, string>;
|
|
312
|
+
inputBundle: z.ZodObject<{
|
|
313
|
+
maskedPrompt: z.ZodString;
|
|
314
|
+
maskedSystemPrompt: z.ZodOptional<z.ZodString>;
|
|
315
|
+
diffScope: z.ZodOptional<z.ZodString>;
|
|
316
|
+
specContract: z.ZodOptional<z.ZodString>;
|
|
317
|
+
}, "strip", z.ZodTypeAny, {
|
|
318
|
+
maskedPrompt: string;
|
|
319
|
+
maskedSystemPrompt?: string | undefined;
|
|
320
|
+
diffScope?: string | undefined;
|
|
321
|
+
specContract?: string | undefined;
|
|
322
|
+
}, {
|
|
323
|
+
maskedPrompt: string;
|
|
324
|
+
maskedSystemPrompt?: string | undefined;
|
|
325
|
+
diffScope?: string | undefined;
|
|
326
|
+
specContract?: string | undefined;
|
|
327
|
+
}>;
|
|
328
|
+
inputHash: z.ZodString;
|
|
329
|
+
grounding: z.ZodObject<{
|
|
330
|
+
hash: z.ZodString;
|
|
331
|
+
provenanceSummary: z.ZodString;
|
|
332
|
+
bundle: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
items: z.ZodArray<z.ZodObject<{
|
|
334
|
+
provenance: z.ZodString;
|
|
335
|
+
contentHash: z.ZodString;
|
|
336
|
+
sourceType: z.ZodString;
|
|
337
|
+
filePath: z.ZodString;
|
|
338
|
+
sourceRepo: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
provenance: string;
|
|
341
|
+
contentHash: string;
|
|
342
|
+
sourceType: string;
|
|
343
|
+
filePath: string;
|
|
344
|
+
sourceRepo?: string | undefined;
|
|
345
|
+
}, {
|
|
346
|
+
provenance: string;
|
|
347
|
+
contentHash: string;
|
|
348
|
+
sourceType: string;
|
|
349
|
+
filePath: string;
|
|
350
|
+
sourceRepo?: string | undefined;
|
|
351
|
+
}>, "many">;
|
|
352
|
+
}, "strip", z.ZodTypeAny, {
|
|
353
|
+
items: {
|
|
354
|
+
provenance: string;
|
|
355
|
+
contentHash: string;
|
|
356
|
+
sourceType: string;
|
|
357
|
+
filePath: string;
|
|
358
|
+
sourceRepo?: string | undefined;
|
|
359
|
+
}[];
|
|
360
|
+
}, {
|
|
361
|
+
items: {
|
|
362
|
+
provenance: string;
|
|
363
|
+
contentHash: string;
|
|
364
|
+
sourceType: string;
|
|
365
|
+
filePath: string;
|
|
366
|
+
sourceRepo?: string | undefined;
|
|
367
|
+
}[];
|
|
368
|
+
}>>;
|
|
369
|
+
}, "strip", z.ZodTypeAny, {
|
|
370
|
+
hash: string;
|
|
371
|
+
provenanceSummary: string;
|
|
372
|
+
bundle?: {
|
|
373
|
+
items: {
|
|
374
|
+
provenance: string;
|
|
375
|
+
contentHash: string;
|
|
376
|
+
sourceType: string;
|
|
377
|
+
filePath: string;
|
|
378
|
+
sourceRepo?: string | undefined;
|
|
379
|
+
}[];
|
|
380
|
+
} | undefined;
|
|
381
|
+
}, {
|
|
382
|
+
hash: string;
|
|
383
|
+
provenanceSummary: string;
|
|
384
|
+
bundle?: {
|
|
385
|
+
items: {
|
|
386
|
+
provenance: string;
|
|
387
|
+
contentHash: string;
|
|
388
|
+
sourceType: string;
|
|
389
|
+
filePath: string;
|
|
390
|
+
sourceRepo?: string | undefined;
|
|
391
|
+
}[];
|
|
392
|
+
} | undefined;
|
|
393
|
+
}>;
|
|
394
|
+
backend: z.ZodObject<{
|
|
395
|
+
provider: z.ZodString;
|
|
396
|
+
model: z.ZodString;
|
|
397
|
+
qualifiedModel: z.ZodString;
|
|
398
|
+
admissionClass: z.ZodEnum<["completion_only", "self_grounding_agent"]>;
|
|
399
|
+
taskProfile: z.ZodString;
|
|
400
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
}, "strip", z.ZodTypeAny, {
|
|
402
|
+
provider: string;
|
|
403
|
+
model: string;
|
|
404
|
+
qualifiedModel: string;
|
|
405
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
406
|
+
taskProfile: string;
|
|
407
|
+
temperature?: number | undefined;
|
|
408
|
+
}, {
|
|
409
|
+
provider: string;
|
|
410
|
+
model: string;
|
|
411
|
+
qualifiedModel: string;
|
|
412
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
413
|
+
taskProfile: string;
|
|
414
|
+
temperature?: number | undefined;
|
|
415
|
+
}>;
|
|
416
|
+
output: z.ZodObject<{
|
|
417
|
+
content: z.ZodString;
|
|
418
|
+
metrics: z.ZodObject<{
|
|
419
|
+
inputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
420
|
+
outputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
421
|
+
cacheReadInputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
422
|
+
durationMs: z.ZodNumber;
|
|
423
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
424
|
+
}, "strip", z.ZodTypeAny, {
|
|
425
|
+
durationMs: number;
|
|
426
|
+
inputTokens?: number | null | undefined;
|
|
427
|
+
outputTokens?: number | null | undefined;
|
|
428
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
429
|
+
finishReason?: string | undefined;
|
|
430
|
+
}, {
|
|
431
|
+
durationMs: number;
|
|
432
|
+
inputTokens?: number | null | undefined;
|
|
433
|
+
outputTokens?: number | null | undefined;
|
|
434
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
435
|
+
finishReason?: string | undefined;
|
|
436
|
+
}>;
|
|
437
|
+
}, "strip", z.ZodTypeAny, {
|
|
438
|
+
content: string;
|
|
439
|
+
metrics: {
|
|
440
|
+
durationMs: number;
|
|
441
|
+
inputTokens?: number | null | undefined;
|
|
442
|
+
outputTokens?: number | null | undefined;
|
|
443
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
444
|
+
finishReason?: string | undefined;
|
|
445
|
+
};
|
|
446
|
+
}, {
|
|
447
|
+
content: string;
|
|
448
|
+
metrics: {
|
|
449
|
+
durationMs: number;
|
|
450
|
+
inputTokens?: number | null | undefined;
|
|
451
|
+
outputTokens?: number | null | undefined;
|
|
452
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
453
|
+
finishReason?: string | undefined;
|
|
454
|
+
};
|
|
455
|
+
}>;
|
|
456
|
+
admission: z.ZodOptional<z.ZodObject<{
|
|
457
|
+
outputContract: z.ZodOptional<z.ZodObject<{
|
|
458
|
+
citationsRequired: z.ZodOptional<z.ZodBoolean>;
|
|
459
|
+
verifyFallback: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
461
|
+
}, "strip", z.ZodTypeAny, {
|
|
462
|
+
citationsRequired?: boolean | undefined;
|
|
463
|
+
verifyFallback?: boolean | undefined;
|
|
464
|
+
schema?: Record<string, unknown> | undefined;
|
|
465
|
+
}, {
|
|
466
|
+
citationsRequired?: boolean | undefined;
|
|
467
|
+
verifyFallback?: boolean | undefined;
|
|
468
|
+
schema?: Record<string, unknown> | undefined;
|
|
469
|
+
}>>;
|
|
470
|
+
contextPolicy: z.ZodOptional<z.ZodObject<{
|
|
471
|
+
budget: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
}, "strip", z.ZodTypeAny, {
|
|
473
|
+
budget?: number | undefined;
|
|
474
|
+
}, {
|
|
475
|
+
budget?: number | undefined;
|
|
476
|
+
}>>;
|
|
477
|
+
runMetadata: z.ZodOptional<z.ZodObject<{
|
|
478
|
+
caller: z.ZodOptional<z.ZodString>;
|
|
479
|
+
command: z.ZodOptional<z.ZodString>;
|
|
480
|
+
codeBlind: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
+
}, "strip", z.ZodTypeAny, {
|
|
482
|
+
caller?: string | undefined;
|
|
483
|
+
command?: string | undefined;
|
|
484
|
+
codeBlind?: boolean | undefined;
|
|
485
|
+
}, {
|
|
486
|
+
caller?: string | undefined;
|
|
487
|
+
command?: string | undefined;
|
|
488
|
+
codeBlind?: boolean | undefined;
|
|
489
|
+
}>>;
|
|
490
|
+
}, "strip", z.ZodTypeAny, {
|
|
491
|
+
outputContract?: {
|
|
492
|
+
citationsRequired?: boolean | undefined;
|
|
493
|
+
verifyFallback?: boolean | undefined;
|
|
494
|
+
schema?: Record<string, unknown> | undefined;
|
|
495
|
+
} | undefined;
|
|
496
|
+
contextPolicy?: {
|
|
497
|
+
budget?: number | undefined;
|
|
498
|
+
} | undefined;
|
|
499
|
+
runMetadata?: {
|
|
500
|
+
caller?: string | undefined;
|
|
501
|
+
command?: string | undefined;
|
|
502
|
+
codeBlind?: boolean | undefined;
|
|
503
|
+
} | undefined;
|
|
504
|
+
}, {
|
|
505
|
+
outputContract?: {
|
|
506
|
+
citationsRequired?: boolean | undefined;
|
|
507
|
+
verifyFallback?: boolean | undefined;
|
|
508
|
+
schema?: Record<string, unknown> | undefined;
|
|
509
|
+
} | undefined;
|
|
510
|
+
contextPolicy?: {
|
|
511
|
+
budget?: number | undefined;
|
|
512
|
+
} | undefined;
|
|
513
|
+
runMetadata?: {
|
|
514
|
+
caller?: string | undefined;
|
|
515
|
+
command?: string | undefined;
|
|
516
|
+
codeBlind?: boolean | undefined;
|
|
517
|
+
} | undefined;
|
|
518
|
+
}>>;
|
|
519
|
+
createdAt: z.ZodString;
|
|
520
|
+
}, "strip", z.ZodTypeAny, {
|
|
521
|
+
createdAt: string;
|
|
522
|
+
schemaVersion: string;
|
|
523
|
+
inputBundle: {
|
|
524
|
+
maskedPrompt: string;
|
|
525
|
+
maskedSystemPrompt?: string | undefined;
|
|
526
|
+
diffScope?: string | undefined;
|
|
527
|
+
specContract?: string | undefined;
|
|
528
|
+
};
|
|
529
|
+
inputHash: string;
|
|
530
|
+
grounding: {
|
|
531
|
+
hash: string;
|
|
532
|
+
provenanceSummary: string;
|
|
533
|
+
bundle?: {
|
|
534
|
+
items: {
|
|
535
|
+
provenance: string;
|
|
536
|
+
contentHash: string;
|
|
537
|
+
sourceType: string;
|
|
538
|
+
filePath: string;
|
|
539
|
+
sourceRepo?: string | undefined;
|
|
540
|
+
}[];
|
|
541
|
+
} | undefined;
|
|
542
|
+
};
|
|
543
|
+
backend: {
|
|
544
|
+
provider: string;
|
|
545
|
+
model: string;
|
|
546
|
+
qualifiedModel: string;
|
|
547
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
548
|
+
taskProfile: string;
|
|
549
|
+
temperature?: number | undefined;
|
|
550
|
+
};
|
|
551
|
+
output: {
|
|
552
|
+
content: string;
|
|
553
|
+
metrics: {
|
|
554
|
+
durationMs: number;
|
|
555
|
+
inputTokens?: number | null | undefined;
|
|
556
|
+
outputTokens?: number | null | undefined;
|
|
557
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
558
|
+
finishReason?: string | undefined;
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
admission?: {
|
|
562
|
+
outputContract?: {
|
|
563
|
+
citationsRequired?: boolean | undefined;
|
|
564
|
+
verifyFallback?: boolean | undefined;
|
|
565
|
+
schema?: Record<string, unknown> | undefined;
|
|
566
|
+
} | undefined;
|
|
567
|
+
contextPolicy?: {
|
|
568
|
+
budget?: number | undefined;
|
|
569
|
+
} | undefined;
|
|
570
|
+
runMetadata?: {
|
|
571
|
+
caller?: string | undefined;
|
|
572
|
+
command?: string | undefined;
|
|
573
|
+
codeBlind?: boolean | undefined;
|
|
574
|
+
} | undefined;
|
|
575
|
+
} | undefined;
|
|
576
|
+
}, {
|
|
577
|
+
createdAt: string;
|
|
578
|
+
schemaVersion: string;
|
|
579
|
+
inputBundle: {
|
|
580
|
+
maskedPrompt: string;
|
|
581
|
+
maskedSystemPrompt?: string | undefined;
|
|
582
|
+
diffScope?: string | undefined;
|
|
583
|
+
specContract?: string | undefined;
|
|
584
|
+
};
|
|
585
|
+
inputHash: string;
|
|
586
|
+
grounding: {
|
|
587
|
+
hash: string;
|
|
588
|
+
provenanceSummary: string;
|
|
589
|
+
bundle?: {
|
|
590
|
+
items: {
|
|
591
|
+
provenance: string;
|
|
592
|
+
contentHash: string;
|
|
593
|
+
sourceType: string;
|
|
594
|
+
filePath: string;
|
|
595
|
+
sourceRepo?: string | undefined;
|
|
596
|
+
}[];
|
|
597
|
+
} | undefined;
|
|
598
|
+
};
|
|
599
|
+
backend: {
|
|
600
|
+
provider: string;
|
|
601
|
+
model: string;
|
|
602
|
+
qualifiedModel: string;
|
|
603
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
604
|
+
taskProfile: string;
|
|
605
|
+
temperature?: number | undefined;
|
|
606
|
+
};
|
|
607
|
+
output: {
|
|
608
|
+
content: string;
|
|
609
|
+
metrics: {
|
|
610
|
+
durationMs: number;
|
|
611
|
+
inputTokens?: number | null | undefined;
|
|
612
|
+
outputTokens?: number | null | undefined;
|
|
613
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
614
|
+
finishReason?: string | undefined;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
admission?: {
|
|
618
|
+
outputContract?: {
|
|
619
|
+
citationsRequired?: boolean | undefined;
|
|
620
|
+
verifyFallback?: boolean | undefined;
|
|
621
|
+
schema?: Record<string, unknown> | undefined;
|
|
622
|
+
} | undefined;
|
|
623
|
+
contextPolicy?: {
|
|
624
|
+
budget?: number | undefined;
|
|
625
|
+
} | undefined;
|
|
626
|
+
runMetadata?: {
|
|
627
|
+
caller?: string | undefined;
|
|
628
|
+
command?: string | undefined;
|
|
629
|
+
codeBlind?: boolean | undefined;
|
|
630
|
+
} | undefined;
|
|
631
|
+
} | undefined;
|
|
632
|
+
}>;
|
|
633
|
+
report: z.ZodEffects<z.ZodObject<{
|
|
634
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
635
|
+
ruleName: z.ZodString;
|
|
636
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
637
|
+
verdict: z.ZodEnum<["pass", "fail", "abstain"]>;
|
|
638
|
+
message: z.ZodString;
|
|
639
|
+
}, "strip", z.ZodTypeAny, {
|
|
640
|
+
message: string;
|
|
641
|
+
tier: "decidable" | "sensor";
|
|
642
|
+
ruleName: string;
|
|
643
|
+
verdict: "pass" | "fail" | "abstain";
|
|
644
|
+
}, {
|
|
645
|
+
message: string;
|
|
646
|
+
tier: "decidable" | "sensor";
|
|
647
|
+
ruleName: string;
|
|
648
|
+
verdict: "pass" | "fail" | "abstain";
|
|
649
|
+
}>, "many">;
|
|
650
|
+
isRejected: z.ZodBoolean;
|
|
651
|
+
}, "strip", z.ZodTypeAny, {
|
|
652
|
+
findings: {
|
|
653
|
+
message: string;
|
|
654
|
+
tier: "decidable" | "sensor";
|
|
655
|
+
ruleName: string;
|
|
656
|
+
verdict: "pass" | "fail" | "abstain";
|
|
657
|
+
}[];
|
|
658
|
+
isRejected: boolean;
|
|
659
|
+
}, {
|
|
660
|
+
findings: {
|
|
661
|
+
message: string;
|
|
662
|
+
tier: "decidable" | "sensor";
|
|
663
|
+
ruleName: string;
|
|
664
|
+
verdict: "pass" | "fail" | "abstain";
|
|
665
|
+
}[];
|
|
666
|
+
isRejected: boolean;
|
|
667
|
+
}>, {
|
|
668
|
+
findings: {
|
|
669
|
+
message: string;
|
|
670
|
+
tier: "decidable" | "sensor";
|
|
671
|
+
ruleName: string;
|
|
672
|
+
verdict: "pass" | "fail" | "abstain";
|
|
673
|
+
}[];
|
|
674
|
+
isRejected: boolean;
|
|
675
|
+
}, {
|
|
676
|
+
findings: {
|
|
677
|
+
message: string;
|
|
678
|
+
tier: "decidable" | "sensor";
|
|
679
|
+
ruleName: string;
|
|
680
|
+
verdict: "pass" | "fail" | "abstain";
|
|
681
|
+
}[];
|
|
682
|
+
isRejected: boolean;
|
|
683
|
+
}>;
|
|
684
|
+
}, "strip", z.ZodTypeAny, {
|
|
685
|
+
laneId: string;
|
|
686
|
+
artifact: {
|
|
687
|
+
createdAt: string;
|
|
688
|
+
schemaVersion: string;
|
|
689
|
+
inputBundle: {
|
|
690
|
+
maskedPrompt: string;
|
|
691
|
+
maskedSystemPrompt?: string | undefined;
|
|
692
|
+
diffScope?: string | undefined;
|
|
693
|
+
specContract?: string | undefined;
|
|
694
|
+
};
|
|
695
|
+
inputHash: string;
|
|
696
|
+
grounding: {
|
|
697
|
+
hash: string;
|
|
698
|
+
provenanceSummary: string;
|
|
699
|
+
bundle?: {
|
|
700
|
+
items: {
|
|
701
|
+
provenance: string;
|
|
702
|
+
contentHash: string;
|
|
703
|
+
sourceType: string;
|
|
704
|
+
filePath: string;
|
|
705
|
+
sourceRepo?: string | undefined;
|
|
706
|
+
}[];
|
|
707
|
+
} | undefined;
|
|
708
|
+
};
|
|
709
|
+
backend: {
|
|
710
|
+
provider: string;
|
|
711
|
+
model: string;
|
|
712
|
+
qualifiedModel: string;
|
|
713
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
714
|
+
taskProfile: string;
|
|
715
|
+
temperature?: number | undefined;
|
|
716
|
+
};
|
|
717
|
+
output: {
|
|
718
|
+
content: string;
|
|
719
|
+
metrics: {
|
|
720
|
+
durationMs: number;
|
|
721
|
+
inputTokens?: number | null | undefined;
|
|
722
|
+
outputTokens?: number | null | undefined;
|
|
723
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
724
|
+
finishReason?: string | undefined;
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
admission?: {
|
|
728
|
+
outputContract?: {
|
|
729
|
+
citationsRequired?: boolean | undefined;
|
|
730
|
+
verifyFallback?: boolean | undefined;
|
|
731
|
+
schema?: Record<string, unknown> | undefined;
|
|
732
|
+
} | undefined;
|
|
733
|
+
contextPolicy?: {
|
|
734
|
+
budget?: number | undefined;
|
|
735
|
+
} | undefined;
|
|
736
|
+
runMetadata?: {
|
|
737
|
+
caller?: string | undefined;
|
|
738
|
+
command?: string | undefined;
|
|
739
|
+
codeBlind?: boolean | undefined;
|
|
740
|
+
} | undefined;
|
|
741
|
+
} | undefined;
|
|
742
|
+
};
|
|
743
|
+
report: {
|
|
744
|
+
findings: {
|
|
745
|
+
message: string;
|
|
746
|
+
tier: "decidable" | "sensor";
|
|
747
|
+
ruleName: string;
|
|
748
|
+
verdict: "pass" | "fail" | "abstain";
|
|
749
|
+
}[];
|
|
750
|
+
isRejected: boolean;
|
|
751
|
+
};
|
|
752
|
+
}, {
|
|
753
|
+
laneId: string;
|
|
754
|
+
artifact: {
|
|
755
|
+
createdAt: string;
|
|
756
|
+
schemaVersion: string;
|
|
757
|
+
inputBundle: {
|
|
758
|
+
maskedPrompt: string;
|
|
759
|
+
maskedSystemPrompt?: string | undefined;
|
|
760
|
+
diffScope?: string | undefined;
|
|
761
|
+
specContract?: string | undefined;
|
|
762
|
+
};
|
|
763
|
+
inputHash: string;
|
|
764
|
+
grounding: {
|
|
765
|
+
hash: string;
|
|
766
|
+
provenanceSummary: string;
|
|
767
|
+
bundle?: {
|
|
768
|
+
items: {
|
|
769
|
+
provenance: string;
|
|
770
|
+
contentHash: string;
|
|
771
|
+
sourceType: string;
|
|
772
|
+
filePath: string;
|
|
773
|
+
sourceRepo?: string | undefined;
|
|
774
|
+
}[];
|
|
775
|
+
} | undefined;
|
|
776
|
+
};
|
|
777
|
+
backend: {
|
|
778
|
+
provider: string;
|
|
779
|
+
model: string;
|
|
780
|
+
qualifiedModel: string;
|
|
781
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
782
|
+
taskProfile: string;
|
|
783
|
+
temperature?: number | undefined;
|
|
784
|
+
};
|
|
785
|
+
output: {
|
|
786
|
+
content: string;
|
|
787
|
+
metrics: {
|
|
788
|
+
durationMs: number;
|
|
789
|
+
inputTokens?: number | null | undefined;
|
|
790
|
+
outputTokens?: number | null | undefined;
|
|
791
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
792
|
+
finishReason?: string | undefined;
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
admission?: {
|
|
796
|
+
outputContract?: {
|
|
797
|
+
citationsRequired?: boolean | undefined;
|
|
798
|
+
verifyFallback?: boolean | undefined;
|
|
799
|
+
schema?: Record<string, unknown> | undefined;
|
|
800
|
+
} | undefined;
|
|
801
|
+
contextPolicy?: {
|
|
802
|
+
budget?: number | undefined;
|
|
803
|
+
} | undefined;
|
|
804
|
+
runMetadata?: {
|
|
805
|
+
caller?: string | undefined;
|
|
806
|
+
command?: string | undefined;
|
|
807
|
+
codeBlind?: boolean | undefined;
|
|
808
|
+
} | undefined;
|
|
809
|
+
} | undefined;
|
|
810
|
+
};
|
|
811
|
+
report: {
|
|
812
|
+
findings: {
|
|
813
|
+
message: string;
|
|
814
|
+
tier: "decidable" | "sensor";
|
|
815
|
+
ruleName: string;
|
|
816
|
+
verdict: "pass" | "fail" | "abstain";
|
|
817
|
+
}[];
|
|
818
|
+
isRejected: boolean;
|
|
819
|
+
};
|
|
820
|
+
}>;
|
|
821
|
+
export type PanelLane = z.infer<typeof PanelLaneSchema>;
|
|
822
|
+
export declare const PanelArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
823
|
+
schemaVersion: z.ZodString;
|
|
824
|
+
/** Persisted lanes, canonical laneId order. At least one — a zero-lane panel is structurally meaningless. */
|
|
825
|
+
lanes: z.ZodArray<z.ZodObject<{
|
|
826
|
+
laneId: z.ZodString;
|
|
827
|
+
artifact: z.ZodObject<{
|
|
828
|
+
schemaVersion: z.ZodEffects<z.ZodString, string, string>;
|
|
829
|
+
inputBundle: z.ZodObject<{
|
|
830
|
+
maskedPrompt: z.ZodString;
|
|
831
|
+
maskedSystemPrompt: z.ZodOptional<z.ZodString>;
|
|
832
|
+
diffScope: z.ZodOptional<z.ZodString>;
|
|
833
|
+
specContract: z.ZodOptional<z.ZodString>;
|
|
834
|
+
}, "strip", z.ZodTypeAny, {
|
|
835
|
+
maskedPrompt: string;
|
|
836
|
+
maskedSystemPrompt?: string | undefined;
|
|
837
|
+
diffScope?: string | undefined;
|
|
838
|
+
specContract?: string | undefined;
|
|
839
|
+
}, {
|
|
840
|
+
maskedPrompt: string;
|
|
841
|
+
maskedSystemPrompt?: string | undefined;
|
|
842
|
+
diffScope?: string | undefined;
|
|
843
|
+
specContract?: string | undefined;
|
|
844
|
+
}>;
|
|
845
|
+
inputHash: z.ZodString;
|
|
846
|
+
grounding: z.ZodObject<{
|
|
847
|
+
hash: z.ZodString;
|
|
848
|
+
provenanceSummary: z.ZodString;
|
|
849
|
+
bundle: z.ZodOptional<z.ZodObject<{
|
|
850
|
+
items: z.ZodArray<z.ZodObject<{
|
|
851
|
+
provenance: z.ZodString;
|
|
852
|
+
contentHash: z.ZodString;
|
|
853
|
+
sourceType: z.ZodString;
|
|
854
|
+
filePath: z.ZodString;
|
|
855
|
+
sourceRepo: z.ZodOptional<z.ZodString>;
|
|
856
|
+
}, "strip", z.ZodTypeAny, {
|
|
857
|
+
provenance: string;
|
|
858
|
+
contentHash: string;
|
|
859
|
+
sourceType: string;
|
|
860
|
+
filePath: string;
|
|
861
|
+
sourceRepo?: string | undefined;
|
|
862
|
+
}, {
|
|
863
|
+
provenance: string;
|
|
864
|
+
contentHash: string;
|
|
865
|
+
sourceType: string;
|
|
866
|
+
filePath: string;
|
|
867
|
+
sourceRepo?: string | undefined;
|
|
868
|
+
}>, "many">;
|
|
869
|
+
}, "strip", z.ZodTypeAny, {
|
|
870
|
+
items: {
|
|
871
|
+
provenance: string;
|
|
872
|
+
contentHash: string;
|
|
873
|
+
sourceType: string;
|
|
874
|
+
filePath: string;
|
|
875
|
+
sourceRepo?: string | undefined;
|
|
876
|
+
}[];
|
|
877
|
+
}, {
|
|
878
|
+
items: {
|
|
879
|
+
provenance: string;
|
|
880
|
+
contentHash: string;
|
|
881
|
+
sourceType: string;
|
|
882
|
+
filePath: string;
|
|
883
|
+
sourceRepo?: string | undefined;
|
|
884
|
+
}[];
|
|
885
|
+
}>>;
|
|
886
|
+
}, "strip", z.ZodTypeAny, {
|
|
887
|
+
hash: string;
|
|
888
|
+
provenanceSummary: string;
|
|
889
|
+
bundle?: {
|
|
890
|
+
items: {
|
|
891
|
+
provenance: string;
|
|
892
|
+
contentHash: string;
|
|
893
|
+
sourceType: string;
|
|
894
|
+
filePath: string;
|
|
895
|
+
sourceRepo?: string | undefined;
|
|
896
|
+
}[];
|
|
897
|
+
} | undefined;
|
|
898
|
+
}, {
|
|
899
|
+
hash: string;
|
|
900
|
+
provenanceSummary: string;
|
|
901
|
+
bundle?: {
|
|
902
|
+
items: {
|
|
903
|
+
provenance: string;
|
|
904
|
+
contentHash: string;
|
|
905
|
+
sourceType: string;
|
|
906
|
+
filePath: string;
|
|
907
|
+
sourceRepo?: string | undefined;
|
|
908
|
+
}[];
|
|
909
|
+
} | undefined;
|
|
910
|
+
}>;
|
|
911
|
+
backend: z.ZodObject<{
|
|
912
|
+
provider: z.ZodString;
|
|
913
|
+
model: z.ZodString;
|
|
914
|
+
qualifiedModel: z.ZodString;
|
|
915
|
+
admissionClass: z.ZodEnum<["completion_only", "self_grounding_agent"]>;
|
|
916
|
+
taskProfile: z.ZodString;
|
|
917
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
918
|
+
}, "strip", z.ZodTypeAny, {
|
|
919
|
+
provider: string;
|
|
920
|
+
model: string;
|
|
921
|
+
qualifiedModel: string;
|
|
922
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
923
|
+
taskProfile: string;
|
|
924
|
+
temperature?: number | undefined;
|
|
925
|
+
}, {
|
|
926
|
+
provider: string;
|
|
927
|
+
model: string;
|
|
928
|
+
qualifiedModel: string;
|
|
929
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
930
|
+
taskProfile: string;
|
|
931
|
+
temperature?: number | undefined;
|
|
932
|
+
}>;
|
|
933
|
+
output: z.ZodObject<{
|
|
934
|
+
content: z.ZodString;
|
|
935
|
+
metrics: z.ZodObject<{
|
|
936
|
+
inputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
937
|
+
outputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
938
|
+
cacheReadInputTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
939
|
+
durationMs: z.ZodNumber;
|
|
940
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
941
|
+
}, "strip", z.ZodTypeAny, {
|
|
942
|
+
durationMs: number;
|
|
943
|
+
inputTokens?: number | null | undefined;
|
|
944
|
+
outputTokens?: number | null | undefined;
|
|
945
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
946
|
+
finishReason?: string | undefined;
|
|
947
|
+
}, {
|
|
948
|
+
durationMs: number;
|
|
949
|
+
inputTokens?: number | null | undefined;
|
|
950
|
+
outputTokens?: number | null | undefined;
|
|
951
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
952
|
+
finishReason?: string | undefined;
|
|
953
|
+
}>;
|
|
954
|
+
}, "strip", z.ZodTypeAny, {
|
|
955
|
+
content: string;
|
|
956
|
+
metrics: {
|
|
957
|
+
durationMs: number;
|
|
958
|
+
inputTokens?: number | null | undefined;
|
|
959
|
+
outputTokens?: number | null | undefined;
|
|
960
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
961
|
+
finishReason?: string | undefined;
|
|
962
|
+
};
|
|
963
|
+
}, {
|
|
964
|
+
content: string;
|
|
965
|
+
metrics: {
|
|
966
|
+
durationMs: number;
|
|
967
|
+
inputTokens?: number | null | undefined;
|
|
968
|
+
outputTokens?: number | null | undefined;
|
|
969
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
970
|
+
finishReason?: string | undefined;
|
|
971
|
+
};
|
|
972
|
+
}>;
|
|
973
|
+
admission: z.ZodOptional<z.ZodObject<{
|
|
974
|
+
outputContract: z.ZodOptional<z.ZodObject<{
|
|
975
|
+
citationsRequired: z.ZodOptional<z.ZodBoolean>;
|
|
976
|
+
verifyFallback: z.ZodOptional<z.ZodBoolean>;
|
|
977
|
+
schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
978
|
+
}, "strip", z.ZodTypeAny, {
|
|
979
|
+
citationsRequired?: boolean | undefined;
|
|
980
|
+
verifyFallback?: boolean | undefined;
|
|
981
|
+
schema?: Record<string, unknown> | undefined;
|
|
982
|
+
}, {
|
|
983
|
+
citationsRequired?: boolean | undefined;
|
|
984
|
+
verifyFallback?: boolean | undefined;
|
|
985
|
+
schema?: Record<string, unknown> | undefined;
|
|
986
|
+
}>>;
|
|
987
|
+
contextPolicy: z.ZodOptional<z.ZodObject<{
|
|
988
|
+
budget: z.ZodOptional<z.ZodNumber>;
|
|
989
|
+
}, "strip", z.ZodTypeAny, {
|
|
990
|
+
budget?: number | undefined;
|
|
991
|
+
}, {
|
|
992
|
+
budget?: number | undefined;
|
|
993
|
+
}>>;
|
|
994
|
+
runMetadata: z.ZodOptional<z.ZodObject<{
|
|
995
|
+
caller: z.ZodOptional<z.ZodString>;
|
|
996
|
+
command: z.ZodOptional<z.ZodString>;
|
|
997
|
+
codeBlind: z.ZodOptional<z.ZodBoolean>;
|
|
998
|
+
}, "strip", z.ZodTypeAny, {
|
|
999
|
+
caller?: string | undefined;
|
|
1000
|
+
command?: string | undefined;
|
|
1001
|
+
codeBlind?: boolean | undefined;
|
|
1002
|
+
}, {
|
|
1003
|
+
caller?: string | undefined;
|
|
1004
|
+
command?: string | undefined;
|
|
1005
|
+
codeBlind?: boolean | undefined;
|
|
1006
|
+
}>>;
|
|
1007
|
+
}, "strip", z.ZodTypeAny, {
|
|
1008
|
+
outputContract?: {
|
|
1009
|
+
citationsRequired?: boolean | undefined;
|
|
1010
|
+
verifyFallback?: boolean | undefined;
|
|
1011
|
+
schema?: Record<string, unknown> | undefined;
|
|
1012
|
+
} | undefined;
|
|
1013
|
+
contextPolicy?: {
|
|
1014
|
+
budget?: number | undefined;
|
|
1015
|
+
} | undefined;
|
|
1016
|
+
runMetadata?: {
|
|
1017
|
+
caller?: string | undefined;
|
|
1018
|
+
command?: string | undefined;
|
|
1019
|
+
codeBlind?: boolean | undefined;
|
|
1020
|
+
} | undefined;
|
|
1021
|
+
}, {
|
|
1022
|
+
outputContract?: {
|
|
1023
|
+
citationsRequired?: boolean | undefined;
|
|
1024
|
+
verifyFallback?: boolean | undefined;
|
|
1025
|
+
schema?: Record<string, unknown> | undefined;
|
|
1026
|
+
} | undefined;
|
|
1027
|
+
contextPolicy?: {
|
|
1028
|
+
budget?: number | undefined;
|
|
1029
|
+
} | undefined;
|
|
1030
|
+
runMetadata?: {
|
|
1031
|
+
caller?: string | undefined;
|
|
1032
|
+
command?: string | undefined;
|
|
1033
|
+
codeBlind?: boolean | undefined;
|
|
1034
|
+
} | undefined;
|
|
1035
|
+
}>>;
|
|
1036
|
+
createdAt: z.ZodString;
|
|
1037
|
+
}, "strip", z.ZodTypeAny, {
|
|
1038
|
+
createdAt: string;
|
|
1039
|
+
schemaVersion: string;
|
|
1040
|
+
inputBundle: {
|
|
1041
|
+
maskedPrompt: string;
|
|
1042
|
+
maskedSystemPrompt?: string | undefined;
|
|
1043
|
+
diffScope?: string | undefined;
|
|
1044
|
+
specContract?: string | undefined;
|
|
1045
|
+
};
|
|
1046
|
+
inputHash: string;
|
|
1047
|
+
grounding: {
|
|
1048
|
+
hash: string;
|
|
1049
|
+
provenanceSummary: string;
|
|
1050
|
+
bundle?: {
|
|
1051
|
+
items: {
|
|
1052
|
+
provenance: string;
|
|
1053
|
+
contentHash: string;
|
|
1054
|
+
sourceType: string;
|
|
1055
|
+
filePath: string;
|
|
1056
|
+
sourceRepo?: string | undefined;
|
|
1057
|
+
}[];
|
|
1058
|
+
} | undefined;
|
|
1059
|
+
};
|
|
1060
|
+
backend: {
|
|
1061
|
+
provider: string;
|
|
1062
|
+
model: string;
|
|
1063
|
+
qualifiedModel: string;
|
|
1064
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1065
|
+
taskProfile: string;
|
|
1066
|
+
temperature?: number | undefined;
|
|
1067
|
+
};
|
|
1068
|
+
output: {
|
|
1069
|
+
content: string;
|
|
1070
|
+
metrics: {
|
|
1071
|
+
durationMs: number;
|
|
1072
|
+
inputTokens?: number | null | undefined;
|
|
1073
|
+
outputTokens?: number | null | undefined;
|
|
1074
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1075
|
+
finishReason?: string | undefined;
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
admission?: {
|
|
1079
|
+
outputContract?: {
|
|
1080
|
+
citationsRequired?: boolean | undefined;
|
|
1081
|
+
verifyFallback?: boolean | undefined;
|
|
1082
|
+
schema?: Record<string, unknown> | undefined;
|
|
1083
|
+
} | undefined;
|
|
1084
|
+
contextPolicy?: {
|
|
1085
|
+
budget?: number | undefined;
|
|
1086
|
+
} | undefined;
|
|
1087
|
+
runMetadata?: {
|
|
1088
|
+
caller?: string | undefined;
|
|
1089
|
+
command?: string | undefined;
|
|
1090
|
+
codeBlind?: boolean | undefined;
|
|
1091
|
+
} | undefined;
|
|
1092
|
+
} | undefined;
|
|
1093
|
+
}, {
|
|
1094
|
+
createdAt: string;
|
|
1095
|
+
schemaVersion: string;
|
|
1096
|
+
inputBundle: {
|
|
1097
|
+
maskedPrompt: string;
|
|
1098
|
+
maskedSystemPrompt?: string | undefined;
|
|
1099
|
+
diffScope?: string | undefined;
|
|
1100
|
+
specContract?: string | undefined;
|
|
1101
|
+
};
|
|
1102
|
+
inputHash: string;
|
|
1103
|
+
grounding: {
|
|
1104
|
+
hash: string;
|
|
1105
|
+
provenanceSummary: string;
|
|
1106
|
+
bundle?: {
|
|
1107
|
+
items: {
|
|
1108
|
+
provenance: string;
|
|
1109
|
+
contentHash: string;
|
|
1110
|
+
sourceType: string;
|
|
1111
|
+
filePath: string;
|
|
1112
|
+
sourceRepo?: string | undefined;
|
|
1113
|
+
}[];
|
|
1114
|
+
} | undefined;
|
|
1115
|
+
};
|
|
1116
|
+
backend: {
|
|
1117
|
+
provider: string;
|
|
1118
|
+
model: string;
|
|
1119
|
+
qualifiedModel: string;
|
|
1120
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1121
|
+
taskProfile: string;
|
|
1122
|
+
temperature?: number | undefined;
|
|
1123
|
+
};
|
|
1124
|
+
output: {
|
|
1125
|
+
content: string;
|
|
1126
|
+
metrics: {
|
|
1127
|
+
durationMs: number;
|
|
1128
|
+
inputTokens?: number | null | undefined;
|
|
1129
|
+
outputTokens?: number | null | undefined;
|
|
1130
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1131
|
+
finishReason?: string | undefined;
|
|
1132
|
+
};
|
|
1133
|
+
};
|
|
1134
|
+
admission?: {
|
|
1135
|
+
outputContract?: {
|
|
1136
|
+
citationsRequired?: boolean | undefined;
|
|
1137
|
+
verifyFallback?: boolean | undefined;
|
|
1138
|
+
schema?: Record<string, unknown> | undefined;
|
|
1139
|
+
} | undefined;
|
|
1140
|
+
contextPolicy?: {
|
|
1141
|
+
budget?: number | undefined;
|
|
1142
|
+
} | undefined;
|
|
1143
|
+
runMetadata?: {
|
|
1144
|
+
caller?: string | undefined;
|
|
1145
|
+
command?: string | undefined;
|
|
1146
|
+
codeBlind?: boolean | undefined;
|
|
1147
|
+
} | undefined;
|
|
1148
|
+
} | undefined;
|
|
1149
|
+
}>;
|
|
1150
|
+
report: z.ZodEffects<z.ZodObject<{
|
|
1151
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
1152
|
+
ruleName: z.ZodString;
|
|
1153
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
1154
|
+
verdict: z.ZodEnum<["pass", "fail", "abstain"]>;
|
|
1155
|
+
message: z.ZodString;
|
|
1156
|
+
}, "strip", z.ZodTypeAny, {
|
|
1157
|
+
message: string;
|
|
1158
|
+
tier: "decidable" | "sensor";
|
|
1159
|
+
ruleName: string;
|
|
1160
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1161
|
+
}, {
|
|
1162
|
+
message: string;
|
|
1163
|
+
tier: "decidable" | "sensor";
|
|
1164
|
+
ruleName: string;
|
|
1165
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1166
|
+
}>, "many">;
|
|
1167
|
+
isRejected: z.ZodBoolean;
|
|
1168
|
+
}, "strip", z.ZodTypeAny, {
|
|
1169
|
+
findings: {
|
|
1170
|
+
message: string;
|
|
1171
|
+
tier: "decidable" | "sensor";
|
|
1172
|
+
ruleName: string;
|
|
1173
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1174
|
+
}[];
|
|
1175
|
+
isRejected: boolean;
|
|
1176
|
+
}, {
|
|
1177
|
+
findings: {
|
|
1178
|
+
message: string;
|
|
1179
|
+
tier: "decidable" | "sensor";
|
|
1180
|
+
ruleName: string;
|
|
1181
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1182
|
+
}[];
|
|
1183
|
+
isRejected: boolean;
|
|
1184
|
+
}>, {
|
|
1185
|
+
findings: {
|
|
1186
|
+
message: string;
|
|
1187
|
+
tier: "decidable" | "sensor";
|
|
1188
|
+
ruleName: string;
|
|
1189
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1190
|
+
}[];
|
|
1191
|
+
isRejected: boolean;
|
|
1192
|
+
}, {
|
|
1193
|
+
findings: {
|
|
1194
|
+
message: string;
|
|
1195
|
+
tier: "decidable" | "sensor";
|
|
1196
|
+
ruleName: string;
|
|
1197
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1198
|
+
}[];
|
|
1199
|
+
isRejected: boolean;
|
|
1200
|
+
}>;
|
|
1201
|
+
}, "strip", z.ZodTypeAny, {
|
|
1202
|
+
laneId: string;
|
|
1203
|
+
artifact: {
|
|
1204
|
+
createdAt: string;
|
|
1205
|
+
schemaVersion: string;
|
|
1206
|
+
inputBundle: {
|
|
1207
|
+
maskedPrompt: string;
|
|
1208
|
+
maskedSystemPrompt?: string | undefined;
|
|
1209
|
+
diffScope?: string | undefined;
|
|
1210
|
+
specContract?: string | undefined;
|
|
1211
|
+
};
|
|
1212
|
+
inputHash: string;
|
|
1213
|
+
grounding: {
|
|
1214
|
+
hash: string;
|
|
1215
|
+
provenanceSummary: string;
|
|
1216
|
+
bundle?: {
|
|
1217
|
+
items: {
|
|
1218
|
+
provenance: string;
|
|
1219
|
+
contentHash: string;
|
|
1220
|
+
sourceType: string;
|
|
1221
|
+
filePath: string;
|
|
1222
|
+
sourceRepo?: string | undefined;
|
|
1223
|
+
}[];
|
|
1224
|
+
} | undefined;
|
|
1225
|
+
};
|
|
1226
|
+
backend: {
|
|
1227
|
+
provider: string;
|
|
1228
|
+
model: string;
|
|
1229
|
+
qualifiedModel: string;
|
|
1230
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1231
|
+
taskProfile: string;
|
|
1232
|
+
temperature?: number | undefined;
|
|
1233
|
+
};
|
|
1234
|
+
output: {
|
|
1235
|
+
content: string;
|
|
1236
|
+
metrics: {
|
|
1237
|
+
durationMs: number;
|
|
1238
|
+
inputTokens?: number | null | undefined;
|
|
1239
|
+
outputTokens?: number | null | undefined;
|
|
1240
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1241
|
+
finishReason?: string | undefined;
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
admission?: {
|
|
1245
|
+
outputContract?: {
|
|
1246
|
+
citationsRequired?: boolean | undefined;
|
|
1247
|
+
verifyFallback?: boolean | undefined;
|
|
1248
|
+
schema?: Record<string, unknown> | undefined;
|
|
1249
|
+
} | undefined;
|
|
1250
|
+
contextPolicy?: {
|
|
1251
|
+
budget?: number | undefined;
|
|
1252
|
+
} | undefined;
|
|
1253
|
+
runMetadata?: {
|
|
1254
|
+
caller?: string | undefined;
|
|
1255
|
+
command?: string | undefined;
|
|
1256
|
+
codeBlind?: boolean | undefined;
|
|
1257
|
+
} | undefined;
|
|
1258
|
+
} | undefined;
|
|
1259
|
+
};
|
|
1260
|
+
report: {
|
|
1261
|
+
findings: {
|
|
1262
|
+
message: string;
|
|
1263
|
+
tier: "decidable" | "sensor";
|
|
1264
|
+
ruleName: string;
|
|
1265
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1266
|
+
}[];
|
|
1267
|
+
isRejected: boolean;
|
|
1268
|
+
};
|
|
1269
|
+
}, {
|
|
1270
|
+
laneId: string;
|
|
1271
|
+
artifact: {
|
|
1272
|
+
createdAt: string;
|
|
1273
|
+
schemaVersion: string;
|
|
1274
|
+
inputBundle: {
|
|
1275
|
+
maskedPrompt: string;
|
|
1276
|
+
maskedSystemPrompt?: string | undefined;
|
|
1277
|
+
diffScope?: string | undefined;
|
|
1278
|
+
specContract?: string | undefined;
|
|
1279
|
+
};
|
|
1280
|
+
inputHash: string;
|
|
1281
|
+
grounding: {
|
|
1282
|
+
hash: string;
|
|
1283
|
+
provenanceSummary: string;
|
|
1284
|
+
bundle?: {
|
|
1285
|
+
items: {
|
|
1286
|
+
provenance: string;
|
|
1287
|
+
contentHash: string;
|
|
1288
|
+
sourceType: string;
|
|
1289
|
+
filePath: string;
|
|
1290
|
+
sourceRepo?: string | undefined;
|
|
1291
|
+
}[];
|
|
1292
|
+
} | undefined;
|
|
1293
|
+
};
|
|
1294
|
+
backend: {
|
|
1295
|
+
provider: string;
|
|
1296
|
+
model: string;
|
|
1297
|
+
qualifiedModel: string;
|
|
1298
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1299
|
+
taskProfile: string;
|
|
1300
|
+
temperature?: number | undefined;
|
|
1301
|
+
};
|
|
1302
|
+
output: {
|
|
1303
|
+
content: string;
|
|
1304
|
+
metrics: {
|
|
1305
|
+
durationMs: number;
|
|
1306
|
+
inputTokens?: number | null | undefined;
|
|
1307
|
+
outputTokens?: number | null | undefined;
|
|
1308
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1309
|
+
finishReason?: string | undefined;
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
admission?: {
|
|
1313
|
+
outputContract?: {
|
|
1314
|
+
citationsRequired?: boolean | undefined;
|
|
1315
|
+
verifyFallback?: boolean | undefined;
|
|
1316
|
+
schema?: Record<string, unknown> | undefined;
|
|
1317
|
+
} | undefined;
|
|
1318
|
+
contextPolicy?: {
|
|
1319
|
+
budget?: number | undefined;
|
|
1320
|
+
} | undefined;
|
|
1321
|
+
runMetadata?: {
|
|
1322
|
+
caller?: string | undefined;
|
|
1323
|
+
command?: string | undefined;
|
|
1324
|
+
codeBlind?: boolean | undefined;
|
|
1325
|
+
} | undefined;
|
|
1326
|
+
} | undefined;
|
|
1327
|
+
};
|
|
1328
|
+
report: {
|
|
1329
|
+
findings: {
|
|
1330
|
+
message: string;
|
|
1331
|
+
tier: "decidable" | "sensor";
|
|
1332
|
+
ruleName: string;
|
|
1333
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1334
|
+
}[];
|
|
1335
|
+
isRejected: boolean;
|
|
1336
|
+
};
|
|
1337
|
+
}>, "many">;
|
|
1338
|
+
diversity: z.ZodObject<{
|
|
1339
|
+
/** Per-lane provider strings, lossless, in canonical (laneId-sorted) order. */
|
|
1340
|
+
providers: z.ZodArray<z.ZodString, "many">;
|
|
1341
|
+
/** `new Set(providers).size` — a true cluster count ONLY while confidence is `verified`. */
|
|
1342
|
+
distinctProviders: z.ZodNumber;
|
|
1343
|
+
class: z.ZodEnum<["cross-vendor", "same-vendor-isolated"]>;
|
|
1344
|
+
/** Sorted unique providers outside {@link KNOWN_PROVIDER_FAMILIES} — the overclaim risk. */
|
|
1345
|
+
unrecognizedProviders: z.ZodArray<z.ZodString, "many">;
|
|
1346
|
+
/** `verified` when every provider's family is known; `coarse` otherwise (don't trust `cross-vendor`). */
|
|
1347
|
+
diversityConfidence: z.ZodEnum<["verified", "coarse"]>;
|
|
1348
|
+
}, "strip", z.ZodTypeAny, {
|
|
1349
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
1350
|
+
providers: string[];
|
|
1351
|
+
distinctProviders: number;
|
|
1352
|
+
unrecognizedProviders: string[];
|
|
1353
|
+
diversityConfidence: "verified" | "coarse";
|
|
1354
|
+
}, {
|
|
1355
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
1356
|
+
providers: string[];
|
|
1357
|
+
distinctProviders: number;
|
|
1358
|
+
unrecognizedProviders: string[];
|
|
1359
|
+
diversityConfidence: "verified" | "coarse";
|
|
1360
|
+
}>;
|
|
1361
|
+
synthesis: z.ZodObject<{
|
|
1362
|
+
/** Tally of lane outcomes: `isRejected===false ⟹ accepted`, `true ⟹ rejected`. Sums to lane count. */
|
|
1363
|
+
verdictDistribution: z.ZodObject<{
|
|
1364
|
+
accepted: z.ZodNumber;
|
|
1365
|
+
rejected: z.ZodNumber;
|
|
1366
|
+
}, "strip", z.ZodTypeAny, {
|
|
1367
|
+
rejected: number;
|
|
1368
|
+
accepted: number;
|
|
1369
|
+
}, {
|
|
1370
|
+
rejected: number;
|
|
1371
|
+
accepted: number;
|
|
1372
|
+
}>;
|
|
1373
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
1374
|
+
ruleName: z.ZodString;
|
|
1375
|
+
tier: z.ZodEnum<["decidable", "sensor"]>;
|
|
1376
|
+
/** Lane verdict tally; the three keys always sum to `lanes.length` (absent lanes count as `abstain`). */
|
|
1377
|
+
verdicts: z.ZodObject<{
|
|
1378
|
+
pass: z.ZodNumber;
|
|
1379
|
+
fail: z.ZodNumber;
|
|
1380
|
+
abstain: z.ZodNumber;
|
|
1381
|
+
}, "strip", z.ZodTypeAny, {
|
|
1382
|
+
pass: number;
|
|
1383
|
+
fail: number;
|
|
1384
|
+
abstain: number;
|
|
1385
|
+
}, {
|
|
1386
|
+
pass: number;
|
|
1387
|
+
fail: number;
|
|
1388
|
+
abstain: number;
|
|
1389
|
+
}>;
|
|
1390
|
+
/** True IFF both `pass` and `fail` appear across lanes (`abstain` is neutral). */
|
|
1391
|
+
divergent: z.ZodBoolean;
|
|
1392
|
+
/** Verbatim lane messages (present lanes only), sorted. */
|
|
1393
|
+
messages: z.ZodArray<z.ZodString, "many">;
|
|
1394
|
+
}, "strip", z.ZodTypeAny, {
|
|
1395
|
+
tier: "decidable" | "sensor";
|
|
1396
|
+
ruleName: string;
|
|
1397
|
+
verdicts: {
|
|
1398
|
+
pass: number;
|
|
1399
|
+
fail: number;
|
|
1400
|
+
abstain: number;
|
|
1401
|
+
};
|
|
1402
|
+
divergent: boolean;
|
|
1403
|
+
messages: string[];
|
|
1404
|
+
}, {
|
|
1405
|
+
tier: "decidable" | "sensor";
|
|
1406
|
+
ruleName: string;
|
|
1407
|
+
verdicts: {
|
|
1408
|
+
pass: number;
|
|
1409
|
+
fail: number;
|
|
1410
|
+
abstain: number;
|
|
1411
|
+
};
|
|
1412
|
+
divergent: boolean;
|
|
1413
|
+
messages: string[];
|
|
1414
|
+
}>, "many">;
|
|
1415
|
+
/** `=== findings.filter(f => f.divergent).length`. */
|
|
1416
|
+
divergences: z.ZodNumber;
|
|
1417
|
+
}, "strip", z.ZodTypeAny, {
|
|
1418
|
+
findings: {
|
|
1419
|
+
tier: "decidable" | "sensor";
|
|
1420
|
+
ruleName: string;
|
|
1421
|
+
verdicts: {
|
|
1422
|
+
pass: number;
|
|
1423
|
+
fail: number;
|
|
1424
|
+
abstain: number;
|
|
1425
|
+
};
|
|
1426
|
+
divergent: boolean;
|
|
1427
|
+
messages: string[];
|
|
1428
|
+
}[];
|
|
1429
|
+
verdictDistribution: {
|
|
1430
|
+
rejected: number;
|
|
1431
|
+
accepted: number;
|
|
1432
|
+
};
|
|
1433
|
+
divergences: number;
|
|
1434
|
+
}, {
|
|
1435
|
+
findings: {
|
|
1436
|
+
tier: "decidable" | "sensor";
|
|
1437
|
+
ruleName: string;
|
|
1438
|
+
verdicts: {
|
|
1439
|
+
pass: number;
|
|
1440
|
+
fail: number;
|
|
1441
|
+
abstain: number;
|
|
1442
|
+
};
|
|
1443
|
+
divergent: boolean;
|
|
1444
|
+
messages: string[];
|
|
1445
|
+
}[];
|
|
1446
|
+
verdictDistribution: {
|
|
1447
|
+
rejected: number;
|
|
1448
|
+
accepted: number;
|
|
1449
|
+
};
|
|
1450
|
+
divergences: number;
|
|
1451
|
+
}>;
|
|
1452
|
+
/**
|
|
1453
|
+
* ISO-8601 emission time. EXCLUDED from the content address (identical panels
|
|
1454
|
+
* dedup regardless of when they ran) — observability only.
|
|
1455
|
+
*/
|
|
1456
|
+
createdAt: z.ZodString;
|
|
1457
|
+
}, "strip", z.ZodTypeAny, {
|
|
1458
|
+
createdAt: string;
|
|
1459
|
+
schemaVersion: string;
|
|
1460
|
+
lanes: {
|
|
1461
|
+
laneId: string;
|
|
1462
|
+
artifact: {
|
|
1463
|
+
createdAt: string;
|
|
1464
|
+
schemaVersion: string;
|
|
1465
|
+
inputBundle: {
|
|
1466
|
+
maskedPrompt: string;
|
|
1467
|
+
maskedSystemPrompt?: string | undefined;
|
|
1468
|
+
diffScope?: string | undefined;
|
|
1469
|
+
specContract?: string | undefined;
|
|
1470
|
+
};
|
|
1471
|
+
inputHash: string;
|
|
1472
|
+
grounding: {
|
|
1473
|
+
hash: string;
|
|
1474
|
+
provenanceSummary: string;
|
|
1475
|
+
bundle?: {
|
|
1476
|
+
items: {
|
|
1477
|
+
provenance: string;
|
|
1478
|
+
contentHash: string;
|
|
1479
|
+
sourceType: string;
|
|
1480
|
+
filePath: string;
|
|
1481
|
+
sourceRepo?: string | undefined;
|
|
1482
|
+
}[];
|
|
1483
|
+
} | undefined;
|
|
1484
|
+
};
|
|
1485
|
+
backend: {
|
|
1486
|
+
provider: string;
|
|
1487
|
+
model: string;
|
|
1488
|
+
qualifiedModel: string;
|
|
1489
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1490
|
+
taskProfile: string;
|
|
1491
|
+
temperature?: number | undefined;
|
|
1492
|
+
};
|
|
1493
|
+
output: {
|
|
1494
|
+
content: string;
|
|
1495
|
+
metrics: {
|
|
1496
|
+
durationMs: number;
|
|
1497
|
+
inputTokens?: number | null | undefined;
|
|
1498
|
+
outputTokens?: number | null | undefined;
|
|
1499
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1500
|
+
finishReason?: string | undefined;
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
admission?: {
|
|
1504
|
+
outputContract?: {
|
|
1505
|
+
citationsRequired?: boolean | undefined;
|
|
1506
|
+
verifyFallback?: boolean | undefined;
|
|
1507
|
+
schema?: Record<string, unknown> | undefined;
|
|
1508
|
+
} | undefined;
|
|
1509
|
+
contextPolicy?: {
|
|
1510
|
+
budget?: number | undefined;
|
|
1511
|
+
} | undefined;
|
|
1512
|
+
runMetadata?: {
|
|
1513
|
+
caller?: string | undefined;
|
|
1514
|
+
command?: string | undefined;
|
|
1515
|
+
codeBlind?: boolean | undefined;
|
|
1516
|
+
} | undefined;
|
|
1517
|
+
} | undefined;
|
|
1518
|
+
};
|
|
1519
|
+
report: {
|
|
1520
|
+
findings: {
|
|
1521
|
+
message: string;
|
|
1522
|
+
tier: "decidable" | "sensor";
|
|
1523
|
+
ruleName: string;
|
|
1524
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1525
|
+
}[];
|
|
1526
|
+
isRejected: boolean;
|
|
1527
|
+
};
|
|
1528
|
+
}[];
|
|
1529
|
+
diversity: {
|
|
1530
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
1531
|
+
providers: string[];
|
|
1532
|
+
distinctProviders: number;
|
|
1533
|
+
unrecognizedProviders: string[];
|
|
1534
|
+
diversityConfidence: "verified" | "coarse";
|
|
1535
|
+
};
|
|
1536
|
+
synthesis: {
|
|
1537
|
+
findings: {
|
|
1538
|
+
tier: "decidable" | "sensor";
|
|
1539
|
+
ruleName: string;
|
|
1540
|
+
verdicts: {
|
|
1541
|
+
pass: number;
|
|
1542
|
+
fail: number;
|
|
1543
|
+
abstain: number;
|
|
1544
|
+
};
|
|
1545
|
+
divergent: boolean;
|
|
1546
|
+
messages: string[];
|
|
1547
|
+
}[];
|
|
1548
|
+
verdictDistribution: {
|
|
1549
|
+
rejected: number;
|
|
1550
|
+
accepted: number;
|
|
1551
|
+
};
|
|
1552
|
+
divergences: number;
|
|
1553
|
+
};
|
|
1554
|
+
}, {
|
|
1555
|
+
createdAt: string;
|
|
1556
|
+
schemaVersion: string;
|
|
1557
|
+
lanes: {
|
|
1558
|
+
laneId: string;
|
|
1559
|
+
artifact: {
|
|
1560
|
+
createdAt: string;
|
|
1561
|
+
schemaVersion: string;
|
|
1562
|
+
inputBundle: {
|
|
1563
|
+
maskedPrompt: string;
|
|
1564
|
+
maskedSystemPrompt?: string | undefined;
|
|
1565
|
+
diffScope?: string | undefined;
|
|
1566
|
+
specContract?: string | undefined;
|
|
1567
|
+
};
|
|
1568
|
+
inputHash: string;
|
|
1569
|
+
grounding: {
|
|
1570
|
+
hash: string;
|
|
1571
|
+
provenanceSummary: string;
|
|
1572
|
+
bundle?: {
|
|
1573
|
+
items: {
|
|
1574
|
+
provenance: string;
|
|
1575
|
+
contentHash: string;
|
|
1576
|
+
sourceType: string;
|
|
1577
|
+
filePath: string;
|
|
1578
|
+
sourceRepo?: string | undefined;
|
|
1579
|
+
}[];
|
|
1580
|
+
} | undefined;
|
|
1581
|
+
};
|
|
1582
|
+
backend: {
|
|
1583
|
+
provider: string;
|
|
1584
|
+
model: string;
|
|
1585
|
+
qualifiedModel: string;
|
|
1586
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1587
|
+
taskProfile: string;
|
|
1588
|
+
temperature?: number | undefined;
|
|
1589
|
+
};
|
|
1590
|
+
output: {
|
|
1591
|
+
content: string;
|
|
1592
|
+
metrics: {
|
|
1593
|
+
durationMs: number;
|
|
1594
|
+
inputTokens?: number | null | undefined;
|
|
1595
|
+
outputTokens?: number | null | undefined;
|
|
1596
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1597
|
+
finishReason?: string | undefined;
|
|
1598
|
+
};
|
|
1599
|
+
};
|
|
1600
|
+
admission?: {
|
|
1601
|
+
outputContract?: {
|
|
1602
|
+
citationsRequired?: boolean | undefined;
|
|
1603
|
+
verifyFallback?: boolean | undefined;
|
|
1604
|
+
schema?: Record<string, unknown> | undefined;
|
|
1605
|
+
} | undefined;
|
|
1606
|
+
contextPolicy?: {
|
|
1607
|
+
budget?: number | undefined;
|
|
1608
|
+
} | undefined;
|
|
1609
|
+
runMetadata?: {
|
|
1610
|
+
caller?: string | undefined;
|
|
1611
|
+
command?: string | undefined;
|
|
1612
|
+
codeBlind?: boolean | undefined;
|
|
1613
|
+
} | undefined;
|
|
1614
|
+
} | undefined;
|
|
1615
|
+
};
|
|
1616
|
+
report: {
|
|
1617
|
+
findings: {
|
|
1618
|
+
message: string;
|
|
1619
|
+
tier: "decidable" | "sensor";
|
|
1620
|
+
ruleName: string;
|
|
1621
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1622
|
+
}[];
|
|
1623
|
+
isRejected: boolean;
|
|
1624
|
+
};
|
|
1625
|
+
}[];
|
|
1626
|
+
diversity: {
|
|
1627
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
1628
|
+
providers: string[];
|
|
1629
|
+
distinctProviders: number;
|
|
1630
|
+
unrecognizedProviders: string[];
|
|
1631
|
+
diversityConfidence: "verified" | "coarse";
|
|
1632
|
+
};
|
|
1633
|
+
synthesis: {
|
|
1634
|
+
findings: {
|
|
1635
|
+
tier: "decidable" | "sensor";
|
|
1636
|
+
ruleName: string;
|
|
1637
|
+
verdicts: {
|
|
1638
|
+
pass: number;
|
|
1639
|
+
fail: number;
|
|
1640
|
+
abstain: number;
|
|
1641
|
+
};
|
|
1642
|
+
divergent: boolean;
|
|
1643
|
+
messages: string[];
|
|
1644
|
+
}[];
|
|
1645
|
+
verdictDistribution: {
|
|
1646
|
+
rejected: number;
|
|
1647
|
+
accepted: number;
|
|
1648
|
+
};
|
|
1649
|
+
divergences: number;
|
|
1650
|
+
};
|
|
1651
|
+
}>, {
|
|
1652
|
+
createdAt: string;
|
|
1653
|
+
schemaVersion: string;
|
|
1654
|
+
lanes: {
|
|
1655
|
+
laneId: string;
|
|
1656
|
+
artifact: {
|
|
1657
|
+
createdAt: string;
|
|
1658
|
+
schemaVersion: string;
|
|
1659
|
+
inputBundle: {
|
|
1660
|
+
maskedPrompt: string;
|
|
1661
|
+
maskedSystemPrompt?: string | undefined;
|
|
1662
|
+
diffScope?: string | undefined;
|
|
1663
|
+
specContract?: string | undefined;
|
|
1664
|
+
};
|
|
1665
|
+
inputHash: string;
|
|
1666
|
+
grounding: {
|
|
1667
|
+
hash: string;
|
|
1668
|
+
provenanceSummary: string;
|
|
1669
|
+
bundle?: {
|
|
1670
|
+
items: {
|
|
1671
|
+
provenance: string;
|
|
1672
|
+
contentHash: string;
|
|
1673
|
+
sourceType: string;
|
|
1674
|
+
filePath: string;
|
|
1675
|
+
sourceRepo?: string | undefined;
|
|
1676
|
+
}[];
|
|
1677
|
+
} | undefined;
|
|
1678
|
+
};
|
|
1679
|
+
backend: {
|
|
1680
|
+
provider: string;
|
|
1681
|
+
model: string;
|
|
1682
|
+
qualifiedModel: string;
|
|
1683
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1684
|
+
taskProfile: string;
|
|
1685
|
+
temperature?: number | undefined;
|
|
1686
|
+
};
|
|
1687
|
+
output: {
|
|
1688
|
+
content: string;
|
|
1689
|
+
metrics: {
|
|
1690
|
+
durationMs: number;
|
|
1691
|
+
inputTokens?: number | null | undefined;
|
|
1692
|
+
outputTokens?: number | null | undefined;
|
|
1693
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1694
|
+
finishReason?: string | undefined;
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
admission?: {
|
|
1698
|
+
outputContract?: {
|
|
1699
|
+
citationsRequired?: boolean | undefined;
|
|
1700
|
+
verifyFallback?: boolean | undefined;
|
|
1701
|
+
schema?: Record<string, unknown> | undefined;
|
|
1702
|
+
} | undefined;
|
|
1703
|
+
contextPolicy?: {
|
|
1704
|
+
budget?: number | undefined;
|
|
1705
|
+
} | undefined;
|
|
1706
|
+
runMetadata?: {
|
|
1707
|
+
caller?: string | undefined;
|
|
1708
|
+
command?: string | undefined;
|
|
1709
|
+
codeBlind?: boolean | undefined;
|
|
1710
|
+
} | undefined;
|
|
1711
|
+
} | undefined;
|
|
1712
|
+
};
|
|
1713
|
+
report: {
|
|
1714
|
+
findings: {
|
|
1715
|
+
message: string;
|
|
1716
|
+
tier: "decidable" | "sensor";
|
|
1717
|
+
ruleName: string;
|
|
1718
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1719
|
+
}[];
|
|
1720
|
+
isRejected: boolean;
|
|
1721
|
+
};
|
|
1722
|
+
}[];
|
|
1723
|
+
diversity: {
|
|
1724
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
1725
|
+
providers: string[];
|
|
1726
|
+
distinctProviders: number;
|
|
1727
|
+
unrecognizedProviders: string[];
|
|
1728
|
+
diversityConfidence: "verified" | "coarse";
|
|
1729
|
+
};
|
|
1730
|
+
synthesis: {
|
|
1731
|
+
findings: {
|
|
1732
|
+
tier: "decidable" | "sensor";
|
|
1733
|
+
ruleName: string;
|
|
1734
|
+
verdicts: {
|
|
1735
|
+
pass: number;
|
|
1736
|
+
fail: number;
|
|
1737
|
+
abstain: number;
|
|
1738
|
+
};
|
|
1739
|
+
divergent: boolean;
|
|
1740
|
+
messages: string[];
|
|
1741
|
+
}[];
|
|
1742
|
+
verdictDistribution: {
|
|
1743
|
+
rejected: number;
|
|
1744
|
+
accepted: number;
|
|
1745
|
+
};
|
|
1746
|
+
divergences: number;
|
|
1747
|
+
};
|
|
1748
|
+
}, {
|
|
1749
|
+
createdAt: string;
|
|
1750
|
+
schemaVersion: string;
|
|
1751
|
+
lanes: {
|
|
1752
|
+
laneId: string;
|
|
1753
|
+
artifact: {
|
|
1754
|
+
createdAt: string;
|
|
1755
|
+
schemaVersion: string;
|
|
1756
|
+
inputBundle: {
|
|
1757
|
+
maskedPrompt: string;
|
|
1758
|
+
maskedSystemPrompt?: string | undefined;
|
|
1759
|
+
diffScope?: string | undefined;
|
|
1760
|
+
specContract?: string | undefined;
|
|
1761
|
+
};
|
|
1762
|
+
inputHash: string;
|
|
1763
|
+
grounding: {
|
|
1764
|
+
hash: string;
|
|
1765
|
+
provenanceSummary: string;
|
|
1766
|
+
bundle?: {
|
|
1767
|
+
items: {
|
|
1768
|
+
provenance: string;
|
|
1769
|
+
contentHash: string;
|
|
1770
|
+
sourceType: string;
|
|
1771
|
+
filePath: string;
|
|
1772
|
+
sourceRepo?: string | undefined;
|
|
1773
|
+
}[];
|
|
1774
|
+
} | undefined;
|
|
1775
|
+
};
|
|
1776
|
+
backend: {
|
|
1777
|
+
provider: string;
|
|
1778
|
+
model: string;
|
|
1779
|
+
qualifiedModel: string;
|
|
1780
|
+
admissionClass: "completion_only" | "self_grounding_agent";
|
|
1781
|
+
taskProfile: string;
|
|
1782
|
+
temperature?: number | undefined;
|
|
1783
|
+
};
|
|
1784
|
+
output: {
|
|
1785
|
+
content: string;
|
|
1786
|
+
metrics: {
|
|
1787
|
+
durationMs: number;
|
|
1788
|
+
inputTokens?: number | null | undefined;
|
|
1789
|
+
outputTokens?: number | null | undefined;
|
|
1790
|
+
cacheReadInputTokens?: number | null | undefined;
|
|
1791
|
+
finishReason?: string | undefined;
|
|
1792
|
+
};
|
|
1793
|
+
};
|
|
1794
|
+
admission?: {
|
|
1795
|
+
outputContract?: {
|
|
1796
|
+
citationsRequired?: boolean | undefined;
|
|
1797
|
+
verifyFallback?: boolean | undefined;
|
|
1798
|
+
schema?: Record<string, unknown> | undefined;
|
|
1799
|
+
} | undefined;
|
|
1800
|
+
contextPolicy?: {
|
|
1801
|
+
budget?: number | undefined;
|
|
1802
|
+
} | undefined;
|
|
1803
|
+
runMetadata?: {
|
|
1804
|
+
caller?: string | undefined;
|
|
1805
|
+
command?: string | undefined;
|
|
1806
|
+
codeBlind?: boolean | undefined;
|
|
1807
|
+
} | undefined;
|
|
1808
|
+
} | undefined;
|
|
1809
|
+
};
|
|
1810
|
+
report: {
|
|
1811
|
+
findings: {
|
|
1812
|
+
message: string;
|
|
1813
|
+
tier: "decidable" | "sensor";
|
|
1814
|
+
ruleName: string;
|
|
1815
|
+
verdict: "pass" | "fail" | "abstain";
|
|
1816
|
+
}[];
|
|
1817
|
+
isRejected: boolean;
|
|
1818
|
+
};
|
|
1819
|
+
}[];
|
|
1820
|
+
diversity: {
|
|
1821
|
+
class: "cross-vendor" | "same-vendor-isolated";
|
|
1822
|
+
providers: string[];
|
|
1823
|
+
distinctProviders: number;
|
|
1824
|
+
unrecognizedProviders: string[];
|
|
1825
|
+
diversityConfidence: "verified" | "coarse";
|
|
1826
|
+
};
|
|
1827
|
+
synthesis: {
|
|
1828
|
+
findings: {
|
|
1829
|
+
tier: "decidable" | "sensor";
|
|
1830
|
+
ruleName: string;
|
|
1831
|
+
verdicts: {
|
|
1832
|
+
pass: number;
|
|
1833
|
+
fail: number;
|
|
1834
|
+
abstain: number;
|
|
1835
|
+
};
|
|
1836
|
+
divergent: boolean;
|
|
1837
|
+
messages: string[];
|
|
1838
|
+
}[];
|
|
1839
|
+
verdictDistribution: {
|
|
1840
|
+
rejected: number;
|
|
1841
|
+
accepted: number;
|
|
1842
|
+
};
|
|
1843
|
+
divergences: number;
|
|
1844
|
+
};
|
|
1845
|
+
}>;
|
|
1846
|
+
export type PanelArtifact = z.infer<typeof PanelArtifactSchema>;
|
|
1847
|
+
/**
|
|
1848
|
+
* In-memory lane input to the pure aggregators: a stable `laneId`, the run
|
|
1849
|
+
* artifact, and slice-4's live {@link PostCheckReport}. The caller (a future CLI
|
|
1850
|
+
* runner) computes the report via `evaluatePostChecks`; this engine stays pure
|
|
1851
|
+
* over the precomputed pairs.
|
|
1852
|
+
*/
|
|
1853
|
+
export interface PanelLaneInput {
|
|
1854
|
+
laneId: string;
|
|
1855
|
+
artifact: RunArtifact;
|
|
1856
|
+
report: PostCheckReport;
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Label the vendor diversity of a panel from its per-lane provider strings.
|
|
1860
|
+
* Pure. The `class` is the mechanical reading of `distinctProviders`; the
|
|
1861
|
+
* `diversityConfidence` marker is whether that reading is trustworthy — `coarse`
|
|
1862
|
+
* means an unrecognized provider string is present, so a `cross-vendor` class
|
|
1863
|
+
* MUST NOT be taken as a confident independent-cluster claim (strategy-claude
|
|
1864
|
+
* PP1/OQ2 tripwire). See {@link KNOWN_PROVIDER_FAMILIES} for the invariant.
|
|
1865
|
+
*/
|
|
1866
|
+
export declare function classifyDiversity(providers: readonly string[]): PanelDiversity;
|
|
1867
|
+
/**
|
|
1868
|
+
* Aggregate N lanes into a {@link PanelSynthesis}. Pure, deterministic, zero-LLM.
|
|
1869
|
+
* Output is identical under any permutation of `lanes` (findings sorted by
|
|
1870
|
+
* `ruleName`; per-rule lanes walked in laneId order; messages sorted).
|
|
1871
|
+
*
|
|
1872
|
+
* Throws (fail-loud, never silently degrade — Tenet 4) on a corrupt input
|
|
1873
|
+
* contract: a lane with two findings sharing one `ruleName` (would masquerade as
|
|
1874
|
+
* cross-lane agreement — codex #2), or one `ruleName` carrying conflicting
|
|
1875
|
+
* `tier`s across lanes (a rule's tier is static — codex #9). A `ruleName` simply
|
|
1876
|
+
* ABSENT from some lanes is NOT an error: those lanes count as implicit
|
|
1877
|
+
* `abstain` (agy #4), so each finding's verdicts sum to `lanes.length`.
|
|
1878
|
+
*/
|
|
1879
|
+
export declare function synthesizePanel(lanes: readonly PanelLaneInput[]): PanelSynthesis;
|
|
1880
|
+
/**
|
|
1881
|
+
* Assemble a full {@link PanelArtifact} from lane inputs. Pure. Canonicalizes
|
|
1882
|
+
* lane order by `laneId` so the content address is stable regardless of caller /
|
|
1883
|
+
* completion order, derives diversity from the per-lane providers (same canonical
|
|
1884
|
+
* order), synthesizes, and validates the whole shape (which re-checks each
|
|
1885
|
+
* persisted report's ADR-109 invariant). `createdAt` is supplied by the caller
|
|
1886
|
+
* (this module reads no clock — determinism).
|
|
1887
|
+
*/
|
|
1888
|
+
export declare function assemblePanelArtifact(lanes: readonly PanelLaneInput[], createdAt: string): PanelArtifact;
|
|
1889
|
+
/** Absolute panels directory for a given absolute totem dir. */
|
|
1890
|
+
export declare function panelsDir(totemDirAbs: string): string;
|
|
1891
|
+
/**
|
|
1892
|
+
* Content address of a panel: deterministic hash over everything EXCEPT
|
|
1893
|
+
* `createdAt` (observability, not identity). The artifact is already canonical
|
|
1894
|
+
* (assemblePanelArtifact sorts lanes/findings/messages), so the address is a
|
|
1895
|
+
* pure function of the logical panel.
|
|
1896
|
+
*/
|
|
1897
|
+
export declare function computePanelArtifactContentHash(artifact: PanelArtifact): string;
|
|
1898
|
+
export interface SavePanelArtifactResult {
|
|
1899
|
+
/** The content address (= filename stem). */
|
|
1900
|
+
hash: string;
|
|
1901
|
+
/** Absolute path of the stored artifact. */
|
|
1902
|
+
path: string;
|
|
1903
|
+
/** True when an identical logical panel was already recorded (no write happened). */
|
|
1904
|
+
existed: boolean;
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* Persist a panel at its content address, write-if-absent. An existing file is
|
|
1908
|
+
* NEVER rewritten (append-only: first write wins). Validates on the way out so a
|
|
1909
|
+
* writer bug cannot poison the ledger with a record the reader would reject.
|
|
1910
|
+
*/
|
|
1911
|
+
export declare function writePanelArtifact(totemDirAbs: string, artifact: PanelArtifact): SavePanelArtifactResult;
|
|
1912
|
+
/**
|
|
1913
|
+
* Load + validate a panel by content address. Throws {@link TotemParseError} on
|
|
1914
|
+
* a missing file, corrupt JSON, schema violation, an unknown major with no
|
|
1915
|
+
* migration entry, or a persisted report whose `isRejected` invariant is broken
|
|
1916
|
+
* — loud, never a silent partial (Tenet 4).
|
|
1917
|
+
*/
|
|
1918
|
+
export declare function readPanelArtifact(totemDirAbs: string, hash: string): PanelArtifact;
|
|
1919
|
+
//# sourceMappingURL=panel.d.ts.map
|