@decantr/verifier 3.1.0 → 3.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/verifier",
3
- "version": "3.1.0",
3
+ "version": "3.4.0",
4
4
  "description": "Shared verification, typed findings, graph anchors, Project Health, and evidence schemas for Decantr",
5
5
  "keywords": [
6
6
  "decantr",
@@ -39,6 +39,8 @@
39
39
  "./schema/project-health-report.v1.json": "./schema/project-health-report.v1.json",
40
40
  "./schema/decantr-ci-report.v1.json": "./schema/decantr-ci-report.v1.json",
41
41
  "./schema/evidence-bundle.v1.json": "./schema/evidence-bundle.v1.json",
42
+ "./schema/evidence-bundle.v2.json": "./schema/evidence-bundle.v2.json",
43
+ "./schema/runtime-probe-payload.v2.json": "./schema/runtime-probe-payload.v2.json",
42
44
  "./schema/scan-report.v1.json": "./schema/scan-report.v1.json",
43
45
  "./schema/workspace-health-report.v1.json": "./schema/workspace-health-report.v1.json",
44
46
  "./schema/file-critique-report.v1.json": "./schema/file-critique-report.v1.json",
@@ -57,8 +59,8 @@
57
59
  "dependencies": {
58
60
  "entities": "^8.0.0",
59
61
  "typescript": "^6.0.3",
60
- "@decantr/essence-spec": "3.1.0",
61
- "@decantr/core": "3.1.0"
62
+ "@decantr/core": "3.4.0",
63
+ "@decantr/essence-spec": "3.4.0"
62
64
  },
63
65
  "devDependencies": {
64
66
  "ajv": "^8.20.0",
@@ -0,0 +1,436 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/evidence-bundle.v2.json",
4
+ "title": "Decantr Evidence Bundle v2",
5
+ "description": "Forward-compatible Evidence Bundle schema for evidence-tier summaries, runtime probe payloads, local artifacts, graph anchors, and repair context. v1 remains valid and unchanged.",
6
+ "type": "object",
7
+ "required": [
8
+ "$schema",
9
+ "generatedAt",
10
+ "project",
11
+ "toolchain",
12
+ "privacy",
13
+ "evidenceTier",
14
+ "health",
15
+ "provenance",
16
+ "assertions",
17
+ "findings"
18
+ ],
19
+ "properties": {
20
+ "$schema": {
21
+ "const": "https://decantr.ai/schemas/evidence-bundle.v2.json"
22
+ },
23
+ "generatedAt": {
24
+ "type": "string",
25
+ "format": "date-time"
26
+ },
27
+ "project": {
28
+ "type": "object",
29
+ "required": ["id", "rootLabel"],
30
+ "properties": {
31
+ "id": { "type": "string" },
32
+ "rootLabel": { "type": "string" },
33
+ "projectPath": { "type": ["string", "null"] },
34
+ "workflowMode": { "type": ["string", "null"] },
35
+ "adoptionMode": { "type": ["string", "null"] }
36
+ },
37
+ "additionalProperties": false
38
+ },
39
+ "toolchain": {
40
+ "type": "object",
41
+ "required": ["verifierVersion"],
42
+ "properties": {
43
+ "verifierVersion": { "type": ["string", "null"] },
44
+ "cliVersion": { "type": ["string", "null"] },
45
+ "mcpServerVersion": { "type": ["string", "null"] }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "privacy": {
50
+ "type": "object",
51
+ "required": [
52
+ "localOnly",
53
+ "sourceIncluded",
54
+ "redactedFields",
55
+ "screenshotsLocalOnly",
56
+ "hostedUploadAllowed"
57
+ ],
58
+ "properties": {
59
+ "localOnly": { "type": "boolean" },
60
+ "sourceIncluded": { "const": false },
61
+ "redactedFields": { "type": "array", "items": { "type": "string" } },
62
+ "screenshotsLocalOnly": { "type": "boolean" },
63
+ "hostedUploadAllowed": { "type": "boolean" }
64
+ },
65
+ "additionalProperties": false
66
+ },
67
+ "evidenceTier": {
68
+ "$ref": "#/$defs/evidenceTier"
69
+ },
70
+ "health": {
71
+ "type": "object",
72
+ "required": ["status", "score", "errorCount", "warnCount", "infoCount", "findingCount"],
73
+ "properties": {
74
+ "status": { "type": "string", "enum": ["healthy", "warning", "error"] },
75
+ "score": { "type": "integer", "minimum": 0, "maximum": 100 },
76
+ "errorCount": { "type": "integer", "minimum": 0 },
77
+ "warnCount": { "type": "integer", "minimum": 0 },
78
+ "infoCount": { "type": "integer", "minimum": 0 },
79
+ "findingCount": { "type": "integer", "minimum": 0 }
80
+ },
81
+ "additionalProperties": false
82
+ },
83
+ "provenance": {
84
+ "type": "object",
85
+ "required": [
86
+ "essence",
87
+ "packManifest",
88
+ "reviewPack",
89
+ "graphSnapshot",
90
+ "graphManifest",
91
+ "graphDiff",
92
+ "contractCapsule"
93
+ ],
94
+ "properties": {
95
+ "essence": { "$ref": "#/$defs/provenanceEntry" },
96
+ "packManifest": { "$ref": "#/$defs/provenanceEntry" },
97
+ "reviewPack": { "$ref": "#/$defs/provenanceEntry" },
98
+ "graphSnapshot": { "$ref": "#/$defs/provenanceEntry" },
99
+ "graphManifest": { "$ref": "#/$defs/provenanceEntry" },
100
+ "graphDiff": { "$ref": "#/$defs/provenanceEntry" },
101
+ "contractCapsule": { "$ref": "#/$defs/provenanceEntry" },
102
+ "workspaceConfig": { "$ref": "#/$defs/provenanceEntry" },
103
+ "designTokens": { "$ref": "#/$defs/provenanceEntry" },
104
+ "runtimeProbe": { "$ref": "#/$defs/provenanceEntry" },
105
+ "visualManifest": { "$ref": "#/$defs/provenanceEntry" }
106
+ },
107
+ "additionalProperties": false
108
+ },
109
+ "assertions": {
110
+ "type": "array",
111
+ "items": { "$ref": "#/$defs/assertion" }
112
+ },
113
+ "findings": {
114
+ "type": "array",
115
+ "items": { "$ref": "#/$defs/finding" }
116
+ },
117
+ "runtimeProbe": {
118
+ "anyOf": [
119
+ { "$ref": "https://decantr.ai/schemas/runtime-probe-payload.v2.json" },
120
+ { "type": "null" }
121
+ ]
122
+ },
123
+ "artifacts": {
124
+ "type": "array",
125
+ "items": { "$ref": "#/$defs/evidenceArtifact" }
126
+ },
127
+ "dashboard": {
128
+ "type": "object",
129
+ "required": ["safeToUpload", "retentionClass", "redactionNotes"],
130
+ "properties": {
131
+ "safeToUpload": { "type": "boolean" },
132
+ "retentionClass": {
133
+ "type": "string",
134
+ "enum": ["local-only", "team-report", "public-benchmark"]
135
+ },
136
+ "redactionNotes": { "type": "array", "items": { "type": "string" } }
137
+ },
138
+ "additionalProperties": false
139
+ },
140
+ "browser": {
141
+ "type": "object",
142
+ "required": ["enabled", "status", "baseUrl", "screenshots", "findings"],
143
+ "properties": {
144
+ "enabled": { "type": "boolean" },
145
+ "status": {
146
+ "type": "string",
147
+ "enum": ["not_requested", "unavailable", "passed", "failed"]
148
+ },
149
+ "baseUrl": { "type": ["string", "null"] },
150
+ "screenshots": { "type": "array", "items": { "type": "string" } },
151
+ "findings": { "type": "array", "items": { "type": "string" } }
152
+ },
153
+ "additionalProperties": false
154
+ },
155
+ "designTokens": {
156
+ "type": "object",
157
+ "required": ["source", "status", "compared", "matched", "missing"],
158
+ "properties": {
159
+ "source": { "type": "string" },
160
+ "status": { "type": "string", "enum": ["not_requested", "passed", "warning", "error"] },
161
+ "compared": { "type": "integer", "minimum": 0 },
162
+ "matched": { "type": "integer", "minimum": 0 },
163
+ "missing": { "type": "array", "items": { "type": "string" } }
164
+ },
165
+ "additionalProperties": false
166
+ }
167
+ },
168
+ "additionalProperties": false,
169
+ "$defs": {
170
+ "evidenceTier": {
171
+ "type": "object",
172
+ "required": ["schemaVersion", "stage", "status", "capabilities", "coverage", "confidence"],
173
+ "properties": {
174
+ "schemaVersion": { "const": 2 },
175
+ "stage": {
176
+ "type": "string",
177
+ "enum": ["static", "graph", "runtime", "visual", "repair", "proof"]
178
+ },
179
+ "status": { "type": "string", "enum": ["healthy", "warning", "error", "incomplete"] },
180
+ "capabilities": {
181
+ "type": "array",
182
+ "items": {
183
+ "type": "string",
184
+ "enum": [
185
+ "static-audit",
186
+ "project-health",
187
+ "typed-graph",
188
+ "runtime-probe",
189
+ "browser-evidence",
190
+ "visual-baseline",
191
+ "repair-plan",
192
+ "benchmark-replay"
193
+ ]
194
+ }
195
+ },
196
+ "coverage": {
197
+ "type": "object",
198
+ "required": [
199
+ "declaredRoutes",
200
+ "runtimeRoutesChecked",
201
+ "findingsAnchored",
202
+ "findingsWithRepairPlan",
203
+ "runtimeProbeCount",
204
+ "visualArtifactCount"
205
+ ],
206
+ "properties": {
207
+ "declaredRoutes": { "type": "integer", "minimum": 0 },
208
+ "runtimeRoutesChecked": { "type": "integer", "minimum": 0 },
209
+ "findingsAnchored": { "type": "integer", "minimum": 0 },
210
+ "findingsWithRepairPlan": { "type": "integer", "minimum": 0 },
211
+ "runtimeProbeCount": { "type": "integer", "minimum": 0 },
212
+ "visualArtifactCount": { "type": "integer", "minimum": 0 }
213
+ },
214
+ "additionalProperties": false
215
+ },
216
+ "confidence": {
217
+ "type": "object",
218
+ "required": ["level", "score", "reasons"],
219
+ "properties": {
220
+ "level": { "type": "string", "enum": ["low", "moderate", "high"] },
221
+ "score": { "type": "number", "minimum": 0, "maximum": 1 },
222
+ "reasons": { "type": "array", "items": { "type": "string" } }
223
+ },
224
+ "additionalProperties": false
225
+ }
226
+ },
227
+ "additionalProperties": false
228
+ },
229
+ "provenanceEntry": {
230
+ "type": "object",
231
+ "required": ["path", "present", "hash", "generatedAt"],
232
+ "properties": {
233
+ "path": { "type": "string" },
234
+ "present": { "type": "boolean" },
235
+ "hash": { "type": ["string", "null"] },
236
+ "generatedAt": { "type": ["string", "null"] }
237
+ },
238
+ "additionalProperties": false
239
+ },
240
+ "assertion": {
241
+ "type": "object",
242
+ "required": ["id", "category", "status", "severity", "message", "evidence", "rule"],
243
+ "properties": {
244
+ "id": { "type": "string" },
245
+ "category": {
246
+ "type": "string",
247
+ "enum": [
248
+ "route",
249
+ "shell",
250
+ "region",
251
+ "interaction",
252
+ "accessibility",
253
+ "design-token",
254
+ "context",
255
+ "policy",
256
+ "runtime",
257
+ "visual"
258
+ ]
259
+ },
260
+ "status": { "type": "string", "enum": ["passed", "failed", "not_applicable"] },
261
+ "severity": { "type": "string", "enum": ["error", "warn", "info"] },
262
+ "message": { "type": "string" },
263
+ "evidence": { "type": "array", "items": { "type": "string" } },
264
+ "target": { "type": "string" },
265
+ "rule": { "type": "string" },
266
+ "suggestedFix": { "type": "string" },
267
+ "graph": {
268
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/graphAnchor"
269
+ }
270
+ },
271
+ "additionalProperties": false
272
+ },
273
+ "finding": {
274
+ "type": "object",
275
+ "required": [
276
+ "id",
277
+ "source",
278
+ "category",
279
+ "severity",
280
+ "message",
281
+ "evidence",
282
+ "remediationSummary",
283
+ "commands",
284
+ "promptCommand"
285
+ ],
286
+ "properties": {
287
+ "id": { "type": "string" },
288
+ "code": {
289
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
290
+ },
291
+ "source": {
292
+ "type": "string",
293
+ "enum": [
294
+ "audit",
295
+ "assertion",
296
+ "browser",
297
+ "check",
298
+ "brownfield",
299
+ "design-token",
300
+ "style-bridge",
301
+ "graph",
302
+ "runtime",
303
+ "pack",
304
+ "interaction",
305
+ "visual",
306
+ "benchmark"
307
+ ]
308
+ },
309
+ "category": { "type": "string" },
310
+ "severity": { "type": "string", "enum": ["error", "warn", "info"] },
311
+ "message": { "type": "string" },
312
+ "evidence": { "type": "array", "items": { "type": "string" } },
313
+ "target": { "type": "string" },
314
+ "rule": { "type": "string" },
315
+ "suggestedFix": { "type": "string" },
316
+ "graph": {
317
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/graphAnchor"
318
+ },
319
+ "repair": {
320
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/repairAction"
321
+ },
322
+ "repairPlan": { "$ref": "#/$defs/repairPlan" },
323
+ "runtimeProbeIds": { "type": "array", "items": { "type": "string" } },
324
+ "artifactIds": { "type": "array", "items": { "type": "string" } },
325
+ "remediationSummary": { "type": "string" },
326
+ "commands": { "type": "array", "items": { "type": "string" } },
327
+ "promptCommand": { "type": "string" }
328
+ },
329
+ "additionalProperties": false
330
+ },
331
+ "repairPlan": {
332
+ "type": "object",
333
+ "required": [
334
+ "id",
335
+ "findingId",
336
+ "severity",
337
+ "source",
338
+ "category",
339
+ "actions",
340
+ "evidence",
341
+ "readTargets",
342
+ "preserve",
343
+ "avoid",
344
+ "commands"
345
+ ],
346
+ "properties": {
347
+ "id": { "type": "string" },
348
+ "findingId": { "type": "string" },
349
+ "diagnosticCode": { "type": ["string", "null"] },
350
+ "repairId": { "type": ["string", "null"] },
351
+ "severity": { "type": "string", "enum": ["error", "warn", "info"] },
352
+ "source": {
353
+ "type": "string",
354
+ "enum": [
355
+ "audit",
356
+ "assertion",
357
+ "browser",
358
+ "check",
359
+ "brownfield",
360
+ "design-token",
361
+ "style-bridge",
362
+ "graph",
363
+ "runtime",
364
+ "pack",
365
+ "interaction",
366
+ "visual",
367
+ "benchmark"
368
+ ]
369
+ },
370
+ "category": { "type": "string" },
371
+ "graphAnchor": {
372
+ "anyOf": [
373
+ { "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/graphAnchor" },
374
+ { "type": "null" }
375
+ ]
376
+ },
377
+ "actions": { "type": "array", "items": { "$ref": "#/$defs/repairPlanAction" } },
378
+ "evidence": { "type": "array", "items": { "$ref": "#/$defs/repairPlanEvidence" } },
379
+ "readTargets": { "type": "array", "items": { "type": "string" } },
380
+ "preserve": { "type": "array", "items": { "type": "string" } },
381
+ "avoid": { "type": "array", "items": { "type": "string" } },
382
+ "commands": { "type": "array", "items": { "type": "string" } }
383
+ },
384
+ "additionalProperties": false
385
+ },
386
+ "repairPlanAction": {
387
+ "type": "object",
388
+ "required": ["id", "kind", "description"],
389
+ "properties": {
390
+ "id": { "type": "string" },
391
+ "kind": { "type": "string" },
392
+ "target": { "type": ["string", "null"] },
393
+ "description": { "type": "string" },
394
+ "payload": { "type": "object", "additionalProperties": true }
395
+ },
396
+ "additionalProperties": false
397
+ },
398
+ "repairPlanEvidence": {
399
+ "type": "object",
400
+ "required": ["id", "text"],
401
+ "properties": {
402
+ "id": { "type": "string" },
403
+ "text": { "type": "string" }
404
+ },
405
+ "additionalProperties": false
406
+ },
407
+ "evidenceArtifact": {
408
+ "type": "object",
409
+ "required": ["id", "kind", "path", "localOnly"],
410
+ "properties": {
411
+ "id": { "type": "string" },
412
+ "kind": {
413
+ "type": "string",
414
+ "enum": [
415
+ "evidence-bundle",
416
+ "runtime-probe",
417
+ "project-health",
418
+ "graph-snapshot",
419
+ "visual-manifest",
420
+ "screenshot",
421
+ "baseline-diff",
422
+ "repair-prompt",
423
+ "benchmark-transcript"
424
+ ]
425
+ },
426
+ "path": { "type": "string" },
427
+ "hash": { "type": ["string", "null"] },
428
+ "route": { "type": ["string", "null"] },
429
+ "findingId": { "type": ["string", "null"] },
430
+ "localOnly": { "type": "boolean" },
431
+ "redacted": { "type": "boolean" }
432
+ },
433
+ "additionalProperties": false
434
+ }
435
+ }
436
+ }