@contextrail/assess 0.0.0-stage → 1.0.0-alpha.1
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/LICENSE +202 -0
- package/README.md +82 -2
- package/assets/brand/icon-dark.png +0 -0
- package/assets/brand/icon-light.png +0 -0
- package/dist/assess.d.ts +109 -0
- package/dist/assess.js +1548 -0
- package/dist/assessment.d.ts +566 -0
- package/dist/assessment.js +404 -0
- package/dist/budget.d.ts +24 -0
- package/dist/budget.js +52 -0
- package/dist/candidate.d.ts +147 -0
- package/dist/candidate.js +321 -0
- package/dist/change-summary.d.ts +33 -0
- package/dist/change-summary.js +26 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +406 -0
- package/dist/contracts.d.ts +99 -0
- package/dist/contracts.js +62 -0
- package/dist/diagnostics.d.ts +44 -0
- package/dist/diagnostics.js +412 -0
- package/dist/evidence.d.ts +73 -0
- package/dist/evidence.js +297 -0
- package/dist/feedback.d.ts +21 -0
- package/dist/feedback.js +140 -0
- package/dist/git.d.ts +40 -0
- package/dist/git.js +207 -0
- package/dist/github.d.ts +90 -0
- package/dist/github.js +1342 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/mcp.d.ts +28 -0
- package/dist/mcp.js +173 -0
- package/dist/pack.d.ts +160 -0
- package/dist/pack.js +377 -0
- package/dist/phases.d.ts +65 -0
- package/dist/phases.js +63 -0
- package/dist/planning.d.ts +64 -0
- package/dist/planning.js +135 -0
- package/dist/pr-context.d.ts +316 -0
- package/dist/pr-context.js +198 -0
- package/dist/prepare.d.ts +71 -0
- package/dist/prepare.js +335 -0
- package/dist/presentation.d.ts +309 -0
- package/dist/presentation.js +1026 -0
- package/dist/provider-diagnostics.d.ts +93 -0
- package/dist/provider-diagnostics.js +233 -0
- package/dist/providers.d.ts +45 -0
- package/dist/providers.js +291 -0
- package/dist/report-contract.d.ts +132 -0
- package/dist/report-contract.js +240 -0
- package/dist/results.d.ts +90 -0
- package/dist/results.js +128 -0
- package/dist/resume.d.ts +25 -0
- package/dist/resume.js +116 -0
- package/dist/source.d.ts +167 -0
- package/dist/source.js +675 -0
- package/dist/verification.d.ts +386 -0
- package/dist/verification.js +168 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +9 -0
- package/docs/README.md +24 -0
- package/docs/action-reference.md +85 -0
- package/docs/architecture.md +156 -0
- package/docs/configuration.md +83 -0
- package/docs/contributing.md +46 -0
- package/docs/getting-started.md +92 -0
- package/docs/github-actions.md +141 -0
- package/docs/operations.md +203 -0
- package/docs/review-results.md +173 -0
- package/docs/security.md +64 -0
- package/docs/standards.md +62 -0
- package/examples/assess-pull-request.yml +109 -0
- package/package.json +56 -5
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type Citation, type EvidenceLedger } from './evidence.js';
|
|
3
|
+
import { type AcceptedResult, type AssessmentEntry } from './results.js';
|
|
4
|
+
import { type PlanEntry } from './planning.js';
|
|
5
|
+
/** Follow-ups are pending human work, not artifact findings or proof of readiness. */
|
|
6
|
+
declare const followUpSchema: z.ZodObject<{
|
|
7
|
+
kind: z.ZodEnum<{
|
|
8
|
+
human_check: "human_check";
|
|
9
|
+
operational_check: "operational_check";
|
|
10
|
+
}>;
|
|
11
|
+
required: z.ZodBoolean;
|
|
12
|
+
explanation: z.ZodString;
|
|
13
|
+
action: z.ZodString;
|
|
14
|
+
passage: z.ZodObject<{
|
|
15
|
+
ref: z.ZodString;
|
|
16
|
+
quote: z.ZodString;
|
|
17
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
21
|
+
ref: z.ZodString;
|
|
22
|
+
quote: z.ZodString;
|
|
23
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strict>>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
declare const replacementSchema: z.ZodObject<{
|
|
28
|
+
path: z.ZodString;
|
|
29
|
+
blob: z.ZodString;
|
|
30
|
+
startLine: z.ZodNumber;
|
|
31
|
+
endLine: z.ZodNumber;
|
|
32
|
+
before: z.ZodString;
|
|
33
|
+
replacement: z.ZodString;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
export declare const assessmentSchema: z.ZodObject<{
|
|
36
|
+
assessments: z.ZodArray<z.ZodObject<{
|
|
37
|
+
result: z.ZodObject<{
|
|
38
|
+
assessmentId: z.ZodString;
|
|
39
|
+
revisionOf: z.ZodNullable<z.ZodNumber>;
|
|
40
|
+
disposition: z.ZodEnum<{
|
|
41
|
+
evaluated: "evaluated";
|
|
42
|
+
observed: "observed";
|
|
43
|
+
not_applicable: "not_applicable";
|
|
44
|
+
unresolved: "unresolved";
|
|
45
|
+
}>;
|
|
46
|
+
adherence: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodNull]>;
|
|
47
|
+
confidence: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodNull]>;
|
|
48
|
+
confidenceReason: z.ZodString;
|
|
49
|
+
finding: z.ZodEnum<{
|
|
50
|
+
none: "none";
|
|
51
|
+
binding_violation: "binding_violation";
|
|
52
|
+
behavioral_defect: "behavioral_defect";
|
|
53
|
+
guidance_departure: "guidance_departure";
|
|
54
|
+
}>;
|
|
55
|
+
explanation: z.ZodString;
|
|
56
|
+
consequence: z.ZodString;
|
|
57
|
+
correction: z.ZodString;
|
|
58
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
59
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
60
|
+
ref: z.ZodString;
|
|
61
|
+
quote: z.ZodString;
|
|
62
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
}, z.core.$strict>>;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
followUps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
67
|
+
kind: z.ZodEnum<{
|
|
68
|
+
human_check: "human_check";
|
|
69
|
+
operational_check: "operational_check";
|
|
70
|
+
}>;
|
|
71
|
+
required: z.ZodBoolean;
|
|
72
|
+
explanation: z.ZodString;
|
|
73
|
+
action: z.ZodString;
|
|
74
|
+
passage: z.ZodObject<{
|
|
75
|
+
ref: z.ZodString;
|
|
76
|
+
quote: z.ZodString;
|
|
77
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strict>;
|
|
80
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
81
|
+
ref: z.ZodString;
|
|
82
|
+
quote: z.ZodString;
|
|
83
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strict>>;
|
|
86
|
+
}, z.core.$strict>>>;
|
|
87
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
88
|
+
checkId: z.ZodString;
|
|
89
|
+
disposition: z.ZodEnum<{
|
|
90
|
+
evaluated: "evaluated";
|
|
91
|
+
not_applicable: "not_applicable";
|
|
92
|
+
unresolved: "unresolved";
|
|
93
|
+
}>;
|
|
94
|
+
explanation: z.ZodString;
|
|
95
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
96
|
+
ref: z.ZodString;
|
|
97
|
+
quote: z.ZodString;
|
|
98
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
contraryEvidence: z.ZodString;
|
|
102
|
+
missingEvidence: z.ZodString;
|
|
103
|
+
}, z.core.$strict>>;
|
|
104
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
105
|
+
classification: z.ZodEnum<{
|
|
106
|
+
binding_violation: "binding_violation";
|
|
107
|
+
behavioral_defect: "behavioral_defect";
|
|
108
|
+
guidance_departure: "guidance_departure";
|
|
109
|
+
}>;
|
|
110
|
+
checkIds: z.ZodArray<z.ZodString>;
|
|
111
|
+
locationRefs: z.ZodArray<z.ZodObject<{
|
|
112
|
+
ref: z.ZodString;
|
|
113
|
+
quote: z.ZodString;
|
|
114
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
}, z.core.$strict>>;
|
|
117
|
+
explanation: z.ZodString;
|
|
118
|
+
consequence: z.ZodString;
|
|
119
|
+
correction: z.ZodString;
|
|
120
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
121
|
+
proposedReplacement: z.ZodNullable<z.ZodObject<{
|
|
122
|
+
path: z.ZodString;
|
|
123
|
+
blob: z.ZodString;
|
|
124
|
+
startLine: z.ZodNumber;
|
|
125
|
+
endLine: z.ZodNumber;
|
|
126
|
+
before: z.ZodString;
|
|
127
|
+
replacement: z.ZodString;
|
|
128
|
+
}, z.core.$strict>>;
|
|
129
|
+
}, z.core.$strict>>;
|
|
130
|
+
}, z.core.$strict>>;
|
|
131
|
+
}, z.core.$strict>;
|
|
132
|
+
/** One investigation authors passage-backed checks together with each criterion judgment. */
|
|
133
|
+
export declare const assessmentSubmissionSchema: z.ZodObject<{
|
|
134
|
+
assessments: z.ZodArray<z.ZodObject<{
|
|
135
|
+
result: z.ZodObject<{
|
|
136
|
+
assessmentId: z.ZodString;
|
|
137
|
+
revisionOf: z.ZodNullable<z.ZodNumber>;
|
|
138
|
+
disposition: z.ZodEnum<{
|
|
139
|
+
evaluated: "evaluated";
|
|
140
|
+
observed: "observed";
|
|
141
|
+
not_applicable: "not_applicable";
|
|
142
|
+
unresolved: "unresolved";
|
|
143
|
+
}>;
|
|
144
|
+
adherence: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodNull]>;
|
|
145
|
+
confidence: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodNull]>;
|
|
146
|
+
confidenceReason: z.ZodString;
|
|
147
|
+
finding: z.ZodEnum<{
|
|
148
|
+
none: "none";
|
|
149
|
+
binding_violation: "binding_violation";
|
|
150
|
+
behavioral_defect: "behavioral_defect";
|
|
151
|
+
guidance_departure: "guidance_departure";
|
|
152
|
+
}>;
|
|
153
|
+
explanation: z.ZodString;
|
|
154
|
+
consequence: z.ZodString;
|
|
155
|
+
correction: z.ZodString;
|
|
156
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
157
|
+
citations: z.ZodArray<z.ZodObject<{
|
|
158
|
+
ref: z.ZodString;
|
|
159
|
+
quote: z.ZodString;
|
|
160
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
}, z.core.$strict>>;
|
|
163
|
+
}, z.core.$strict>;
|
|
164
|
+
followUps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
165
|
+
kind: z.ZodEnum<{
|
|
166
|
+
human_check: "human_check";
|
|
167
|
+
operational_check: "operational_check";
|
|
168
|
+
}>;
|
|
169
|
+
required: z.ZodBoolean;
|
|
170
|
+
explanation: z.ZodString;
|
|
171
|
+
action: z.ZodString;
|
|
172
|
+
passage: z.ZodObject<{
|
|
173
|
+
ref: z.ZodString;
|
|
174
|
+
quote: z.ZodString;
|
|
175
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
179
|
+
ref: z.ZodString;
|
|
180
|
+
quote: z.ZodString;
|
|
181
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
}, z.core.$strict>>;
|
|
184
|
+
}, z.core.$strict>>>;
|
|
185
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
186
|
+
disposition: z.ZodEnum<{
|
|
187
|
+
evaluated: "evaluated";
|
|
188
|
+
not_applicable: "not_applicable";
|
|
189
|
+
unresolved: "unresolved";
|
|
190
|
+
}>;
|
|
191
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
192
|
+
ref: z.ZodString;
|
|
193
|
+
quote: z.ZodString;
|
|
194
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
}, z.core.$strict>>;
|
|
197
|
+
explanation: z.ZodString;
|
|
198
|
+
contraryEvidence: z.ZodString;
|
|
199
|
+
missingEvidence: z.ZodString;
|
|
200
|
+
passage: z.ZodObject<{
|
|
201
|
+
ref: z.ZodString;
|
|
202
|
+
quote: z.ZodString;
|
|
203
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
}, z.core.$strict>;
|
|
206
|
+
interpretation: z.ZodString;
|
|
207
|
+
}, z.core.$strict>>;
|
|
208
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
209
|
+
explanation: z.ZodString;
|
|
210
|
+
consequence: z.ZodString;
|
|
211
|
+
correction: z.ZodString;
|
|
212
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
213
|
+
classification: z.ZodEnum<{
|
|
214
|
+
binding_violation: "binding_violation";
|
|
215
|
+
behavioral_defect: "behavioral_defect";
|
|
216
|
+
guidance_departure: "guidance_departure";
|
|
217
|
+
}>;
|
|
218
|
+
locationRefs: z.ZodArray<z.ZodObject<{
|
|
219
|
+
ref: z.ZodString;
|
|
220
|
+
quote: z.ZodString;
|
|
221
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
222
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
}, z.core.$strict>>;
|
|
224
|
+
proposedReplacement: z.ZodNullable<z.ZodObject<{
|
|
225
|
+
path: z.ZodString;
|
|
226
|
+
blob: z.ZodString;
|
|
227
|
+
startLine: z.ZodNumber;
|
|
228
|
+
endLine: z.ZodNumber;
|
|
229
|
+
before: z.ZodString;
|
|
230
|
+
replacement: z.ZodString;
|
|
231
|
+
}, z.core.$strict>>;
|
|
232
|
+
checkIndices: z.ZodArray<z.ZodNumber>;
|
|
233
|
+
}, z.core.$strict>>;
|
|
234
|
+
}, z.core.$strict>>;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
export declare const investigationSubmissionSchema: z.ZodObject<{
|
|
237
|
+
assessments: z.ZodArray<z.ZodObject<{
|
|
238
|
+
followUps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
239
|
+
kind: z.ZodEnum<{
|
|
240
|
+
human_check: "human_check";
|
|
241
|
+
operational_check: "operational_check";
|
|
242
|
+
}>;
|
|
243
|
+
required: z.ZodBoolean;
|
|
244
|
+
explanation: z.ZodString;
|
|
245
|
+
action: z.ZodString;
|
|
246
|
+
passage: z.ZodObject<{
|
|
247
|
+
ref: z.ZodString;
|
|
248
|
+
quote: z.ZodString;
|
|
249
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
250
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
}, z.core.$strict>;
|
|
252
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
253
|
+
ref: z.ZodString;
|
|
254
|
+
quote: z.ZodString;
|
|
255
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
}, z.core.$strict>>;
|
|
258
|
+
}, z.core.$strict>>>;
|
|
259
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
260
|
+
disposition: z.ZodEnum<{
|
|
261
|
+
evaluated: "evaluated";
|
|
262
|
+
not_applicable: "not_applicable";
|
|
263
|
+
unresolved: "unresolved";
|
|
264
|
+
}>;
|
|
265
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
266
|
+
ref: z.ZodString;
|
|
267
|
+
quote: z.ZodString;
|
|
268
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
}, z.core.$strict>>;
|
|
271
|
+
explanation: z.ZodString;
|
|
272
|
+
contraryEvidence: z.ZodString;
|
|
273
|
+
missingEvidence: z.ZodString;
|
|
274
|
+
passage: z.ZodObject<{
|
|
275
|
+
ref: z.ZodString;
|
|
276
|
+
quote: z.ZodString;
|
|
277
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
interpretation: z.ZodString;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
283
|
+
explanation: z.ZodString;
|
|
284
|
+
consequence: z.ZodString;
|
|
285
|
+
correction: z.ZodString;
|
|
286
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
287
|
+
classification: z.ZodEnum<{
|
|
288
|
+
binding_violation: "binding_violation";
|
|
289
|
+
behavioral_defect: "behavioral_defect";
|
|
290
|
+
guidance_departure: "guidance_departure";
|
|
291
|
+
}>;
|
|
292
|
+
locationRefs: z.ZodArray<z.ZodObject<{
|
|
293
|
+
ref: z.ZodString;
|
|
294
|
+
quote: z.ZodString;
|
|
295
|
+
start: z.ZodOptional<z.ZodNumber>;
|
|
296
|
+
end: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
}, z.core.$strict>>;
|
|
298
|
+
proposedReplacement: z.ZodNullable<z.ZodObject<{
|
|
299
|
+
path: z.ZodString;
|
|
300
|
+
blob: z.ZodString;
|
|
301
|
+
startLine: z.ZodNumber;
|
|
302
|
+
endLine: z.ZodNumber;
|
|
303
|
+
before: z.ZodString;
|
|
304
|
+
replacement: z.ZodString;
|
|
305
|
+
}, z.core.$strict>>;
|
|
306
|
+
checkIndices: z.ZodArray<z.ZodNumber>;
|
|
307
|
+
}, z.core.$strict>>;
|
|
308
|
+
result: z.ZodObject<{
|
|
309
|
+
assessmentId: z.ZodString;
|
|
310
|
+
disposition: z.ZodEnum<{
|
|
311
|
+
evaluated: "evaluated";
|
|
312
|
+
observed: "observed";
|
|
313
|
+
not_applicable: "not_applicable";
|
|
314
|
+
unresolved: "unresolved";
|
|
315
|
+
}>;
|
|
316
|
+
confidence: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodNull]>;
|
|
317
|
+
confidenceReason: z.ZodString;
|
|
318
|
+
explanation: z.ZodString;
|
|
319
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
320
|
+
}, z.core.$strict>;
|
|
321
|
+
}, z.core.$strict>>;
|
|
322
|
+
}, z.core.$strict>;
|
|
323
|
+
export declare const assessmentSelectionSchema: z.ZodObject<{
|
|
324
|
+
changeSummary: z.ZodNullable<z.ZodObject<{
|
|
325
|
+
overview: z.ZodString;
|
|
326
|
+
reviewFocus: z.ZodArray<z.ZodString>;
|
|
327
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
328
|
+
ref: z.ZodString;
|
|
329
|
+
startSegment: z.ZodNumber;
|
|
330
|
+
endSegment: z.ZodNumber;
|
|
331
|
+
}, z.core.$strict>>;
|
|
332
|
+
}, z.core.$strict>>;
|
|
333
|
+
assessments: z.ZodArray<z.ZodObject<{
|
|
334
|
+
result: z.ZodObject<{
|
|
335
|
+
assessmentId: z.ZodString;
|
|
336
|
+
disposition: z.ZodEnum<{
|
|
337
|
+
evaluated: "evaluated";
|
|
338
|
+
observed: "observed";
|
|
339
|
+
not_applicable: "not_applicable";
|
|
340
|
+
unresolved: "unresolved";
|
|
341
|
+
}>;
|
|
342
|
+
confidence: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodNull]>;
|
|
343
|
+
confidenceReason: z.ZodString;
|
|
344
|
+
explanation: z.ZodString;
|
|
345
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
346
|
+
}, z.core.$strict>;
|
|
347
|
+
followUps: z.ZodArray<z.ZodObject<{
|
|
348
|
+
kind: z.ZodEnum<{
|
|
349
|
+
human_check: "human_check";
|
|
350
|
+
operational_check: "operational_check";
|
|
351
|
+
}>;
|
|
352
|
+
required: z.ZodBoolean;
|
|
353
|
+
explanation: z.ZodString;
|
|
354
|
+
action: z.ZodString;
|
|
355
|
+
passage: z.ZodObject<{
|
|
356
|
+
ref: z.ZodString;
|
|
357
|
+
startSegment: z.ZodNumber;
|
|
358
|
+
endSegment: z.ZodNumber;
|
|
359
|
+
}, z.core.$strict>;
|
|
360
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
361
|
+
ref: z.ZodString;
|
|
362
|
+
startSegment: z.ZodNumber;
|
|
363
|
+
endSegment: z.ZodNumber;
|
|
364
|
+
}, z.core.$strict>>;
|
|
365
|
+
}, z.core.$strict>>;
|
|
366
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
367
|
+
disposition: z.ZodEnum<{
|
|
368
|
+
evaluated: "evaluated";
|
|
369
|
+
not_applicable: "not_applicable";
|
|
370
|
+
unresolved: "unresolved";
|
|
371
|
+
}>;
|
|
372
|
+
explanation: z.ZodString;
|
|
373
|
+
contraryEvidence: z.ZodString;
|
|
374
|
+
missingEvidence: z.ZodString;
|
|
375
|
+
interpretation: z.ZodString;
|
|
376
|
+
passage: z.ZodObject<{
|
|
377
|
+
ref: z.ZodString;
|
|
378
|
+
startSegment: z.ZodNumber;
|
|
379
|
+
endSegment: z.ZodNumber;
|
|
380
|
+
}, z.core.$strict>;
|
|
381
|
+
sourceRefs: z.ZodArray<z.ZodObject<{
|
|
382
|
+
ref: z.ZodString;
|
|
383
|
+
startSegment: z.ZodNumber;
|
|
384
|
+
endSegment: z.ZodNumber;
|
|
385
|
+
}, z.core.$strict>>;
|
|
386
|
+
}, z.core.$strict>>;
|
|
387
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
388
|
+
explanation: z.ZodString;
|
|
389
|
+
consequence: z.ZodString;
|
|
390
|
+
correction: z.ZodString;
|
|
391
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
392
|
+
classification: z.ZodEnum<{
|
|
393
|
+
binding_violation: "binding_violation";
|
|
394
|
+
behavioral_defect: "behavioral_defect";
|
|
395
|
+
guidance_departure: "guidance_departure";
|
|
396
|
+
}>;
|
|
397
|
+
proposedReplacement: z.ZodNullable<z.ZodObject<{
|
|
398
|
+
path: z.ZodString;
|
|
399
|
+
blob: z.ZodString;
|
|
400
|
+
startLine: z.ZodNumber;
|
|
401
|
+
endLine: z.ZodNumber;
|
|
402
|
+
before: z.ZodString;
|
|
403
|
+
replacement: z.ZodString;
|
|
404
|
+
}, z.core.$strict>>;
|
|
405
|
+
checkIndices: z.ZodArray<z.ZodNumber>;
|
|
406
|
+
locationRefs: z.ZodArray<z.ZodObject<{
|
|
407
|
+
ref: z.ZodString;
|
|
408
|
+
startSegment: z.ZodNumber;
|
|
409
|
+
endSegment: z.ZodNumber;
|
|
410
|
+
}, z.core.$strict>>;
|
|
411
|
+
}, z.core.$strict>>;
|
|
412
|
+
}, z.core.$strict>>;
|
|
413
|
+
}, z.core.$strict>;
|
|
414
|
+
export declare function validateAssessmentSubmission(input: unknown, entries: AssessmentEntry[], ledger: EvidenceLedger, structured?: Record<string, Array<{
|
|
415
|
+
path: string;
|
|
416
|
+
value: unknown;
|
|
417
|
+
}>>): AssessmentProposal;
|
|
418
|
+
export declare function revalidateProposal(proposal: AssessmentProposal, entries: AssessmentEntry[], ledger: EvidenceLedger, structured?: Record<string, Array<{
|
|
419
|
+
path: string;
|
|
420
|
+
value: unknown;
|
|
421
|
+
}>>): AssessmentProposal;
|
|
422
|
+
/** Canonical result evidence is the union of the checks the model actually authored. */
|
|
423
|
+
export declare function deriveAssessmentCitations(input: unknown, entries: AssessmentEntry[]): {
|
|
424
|
+
result: {
|
|
425
|
+
disposition: "evaluated" | "observed" | "not_applicable" | "unresolved";
|
|
426
|
+
citations: {
|
|
427
|
+
ref: string;
|
|
428
|
+
quote: string;
|
|
429
|
+
start?: number | undefined;
|
|
430
|
+
end?: number | undefined;
|
|
431
|
+
}[];
|
|
432
|
+
revisionOf: number | null;
|
|
433
|
+
confidence: 1 | 2 | 3 | null;
|
|
434
|
+
adherence: number | null;
|
|
435
|
+
finding: string;
|
|
436
|
+
consequence: string;
|
|
437
|
+
correction: string;
|
|
438
|
+
assessmentId: string;
|
|
439
|
+
confidenceReason: string;
|
|
440
|
+
explanation: string;
|
|
441
|
+
limitations: string[];
|
|
442
|
+
};
|
|
443
|
+
followUps: {
|
|
444
|
+
kind: "human_check" | "operational_check";
|
|
445
|
+
required: boolean;
|
|
446
|
+
explanation: string;
|
|
447
|
+
action: string;
|
|
448
|
+
passage: {
|
|
449
|
+
ref: string;
|
|
450
|
+
quote: string;
|
|
451
|
+
start?: number | undefined;
|
|
452
|
+
end?: number | undefined;
|
|
453
|
+
};
|
|
454
|
+
sourceRefs: {
|
|
455
|
+
ref: string;
|
|
456
|
+
quote: string;
|
|
457
|
+
start?: number | undefined;
|
|
458
|
+
end?: number | undefined;
|
|
459
|
+
}[];
|
|
460
|
+
}[];
|
|
461
|
+
checks: {
|
|
462
|
+
disposition: "evaluated" | "not_applicable" | "unresolved";
|
|
463
|
+
sourceRefs: {
|
|
464
|
+
ref: string;
|
|
465
|
+
quote: string;
|
|
466
|
+
start?: number | undefined;
|
|
467
|
+
end?: number | undefined;
|
|
468
|
+
}[];
|
|
469
|
+
explanation: string;
|
|
470
|
+
contraryEvidence: string;
|
|
471
|
+
missingEvidence: string;
|
|
472
|
+
passage: {
|
|
473
|
+
ref: string;
|
|
474
|
+
quote: string;
|
|
475
|
+
start?: number | undefined;
|
|
476
|
+
end?: number | undefined;
|
|
477
|
+
};
|
|
478
|
+
interpretation: string;
|
|
479
|
+
}[];
|
|
480
|
+
findings: {
|
|
481
|
+
explanation: string;
|
|
482
|
+
consequence: string;
|
|
483
|
+
correction: string;
|
|
484
|
+
limitations: string[];
|
|
485
|
+
classification: "binding_violation" | "behavioral_defect" | "guidance_departure";
|
|
486
|
+
locationRefs: {
|
|
487
|
+
ref: string;
|
|
488
|
+
quote: string;
|
|
489
|
+
start?: number | undefined;
|
|
490
|
+
end?: number | undefined;
|
|
491
|
+
}[];
|
|
492
|
+
proposedReplacement: {
|
|
493
|
+
path: string;
|
|
494
|
+
blob: string;
|
|
495
|
+
startLine: number;
|
|
496
|
+
endLine: number;
|
|
497
|
+
before: string;
|
|
498
|
+
replacement: string;
|
|
499
|
+
} | null;
|
|
500
|
+
checkIndices: number[];
|
|
501
|
+
}[];
|
|
502
|
+
};
|
|
503
|
+
export declare class AssessmentAccumulator {
|
|
504
|
+
private readonly entries;
|
|
505
|
+
private readonly ledger;
|
|
506
|
+
private readonly structured;
|
|
507
|
+
private readonly accepted;
|
|
508
|
+
constructor(entries: AssessmentEntry[], ledger: EvidenceLedger, structured?: Record<string, Array<{
|
|
509
|
+
path: string;
|
|
510
|
+
value: unknown;
|
|
511
|
+
}>>, seed?: AssessmentProposal[]);
|
|
512
|
+
submit(input: unknown): AssessmentProgress;
|
|
513
|
+
remaining(): string[];
|
|
514
|
+
snapshot(): AssessmentProposal[];
|
|
515
|
+
}
|
|
516
|
+
export type AssessmentProgress = {
|
|
517
|
+
complete: boolean;
|
|
518
|
+
newlyAccepted: string[];
|
|
519
|
+
alreadyAccepted: string[];
|
|
520
|
+
remaining: string[];
|
|
521
|
+
};
|
|
522
|
+
export type CheckAssessment = {
|
|
523
|
+
checkId: string;
|
|
524
|
+
assessmentId: string;
|
|
525
|
+
passageRef: Citation;
|
|
526
|
+
interpretation: string;
|
|
527
|
+
disposition: 'evaluated' | 'not_applicable' | 'unresolved';
|
|
528
|
+
sourceRefs: Citation[];
|
|
529
|
+
explanation: string;
|
|
530
|
+
contraryEvidence: string;
|
|
531
|
+
missingEvidence: string;
|
|
532
|
+
verified: boolean;
|
|
533
|
+
};
|
|
534
|
+
export type AssessmentFinding = {
|
|
535
|
+
findingId: string;
|
|
536
|
+
sourceFindingIds?: string[];
|
|
537
|
+
assessmentIds: string[];
|
|
538
|
+
checkIds: string[];
|
|
539
|
+
classification: 'binding_violation' | 'behavioral_defect' | 'guidance_departure';
|
|
540
|
+
locationRefs: Citation[];
|
|
541
|
+
explanation: string;
|
|
542
|
+
consequence: string;
|
|
543
|
+
correction: string;
|
|
544
|
+
limitations: string[];
|
|
545
|
+
proposedReplacement?: z.infer<typeof replacementSchema> & {
|
|
546
|
+
verified: boolean;
|
|
547
|
+
};
|
|
548
|
+
verified: boolean;
|
|
549
|
+
};
|
|
550
|
+
export type AssessmentFollowUp = Omit<z.infer<typeof followUpSchema>, 'passage' | 'sourceRefs'> & {
|
|
551
|
+
assessmentId: string;
|
|
552
|
+
passage: Citation;
|
|
553
|
+
sourceRefs: Citation[];
|
|
554
|
+
verified: boolean;
|
|
555
|
+
};
|
|
556
|
+
export type AssessmentProposal = {
|
|
557
|
+
observations?: import('./candidate.js').CandidateObservation[];
|
|
558
|
+
result: AcceptedResult;
|
|
559
|
+
checks: CheckAssessment[];
|
|
560
|
+
findings: AssessmentFinding[];
|
|
561
|
+
followUps?: AssessmentFollowUp[];
|
|
562
|
+
};
|
|
563
|
+
export declare function validateAssessments(input: unknown, plan: PlanEntry[], entries: AssessmentEntry[], ledger: EvidenceLedger): AssessmentProposal[];
|
|
564
|
+
/** Merge only exact supported issue accounts; no fuzzy semantic merge may erase a distinct issue. */
|
|
565
|
+
export declare function reconcileFindings(findings: AssessmentFinding[]): AssessmentFinding[];
|
|
566
|
+
export {};
|