@decantr/verifier 2.5.0 → 3.0.0-next.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.
@@ -0,0 +1,491 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/scan-report.v1.json",
4
+ "title": "Decantr Brownfield Scan Report",
5
+ "type": "object",
6
+ "required": [
7
+ "$schema",
8
+ "schemaVersion",
9
+ "generatedAt",
10
+ "input",
11
+ "source",
12
+ "confidence",
13
+ "applicability",
14
+ "project",
15
+ "routes",
16
+ "components",
17
+ "styling",
18
+ "staticHosting",
19
+ "assistant",
20
+ "pagesProbe",
21
+ "findings",
22
+ "recommendedCommands",
23
+ "privacy"
24
+ ],
25
+ "properties": {
26
+ "$schema": {
27
+ "const": "https://decantr.ai/schemas/scan-report.v1.json"
28
+ },
29
+ "schemaVersion": {
30
+ "const": "scan-report.v1"
31
+ },
32
+ "generatedAt": {
33
+ "type": "string",
34
+ "format": "date-time"
35
+ },
36
+ "input": {
37
+ "$ref": "#/$defs/scanInput"
38
+ },
39
+ "source": {
40
+ "type": "object",
41
+ "required": ["repository", "publishedSiteUrl"],
42
+ "properties": {
43
+ "repository": {
44
+ "anyOf": [
45
+ { "$ref": "#/$defs/repository" },
46
+ { "type": "null" }
47
+ ]
48
+ },
49
+ "publishedSiteUrl": {
50
+ "type": ["string", "null"]
51
+ }
52
+ },
53
+ "additionalProperties": false
54
+ },
55
+ "confidence": {
56
+ "type": "object",
57
+ "required": ["level", "score", "reasons"],
58
+ "properties": {
59
+ "level": {
60
+ "type": "string",
61
+ "enum": ["high", "medium", "low"]
62
+ },
63
+ "score": {
64
+ "type": "integer",
65
+ "minimum": 0,
66
+ "maximum": 100
67
+ },
68
+ "reasons": {
69
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ },
74
+ "applicability": {
75
+ "type": "object",
76
+ "required": ["status", "label", "reasons"],
77
+ "properties": {
78
+ "status": {
79
+ "type": "string",
80
+ "enum": ["strong_fit", "partial_fit", "not_applicable", "unknown"]
81
+ },
82
+ "label": {
83
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
84
+ },
85
+ "reasons": {
86
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
87
+ }
88
+ },
89
+ "additionalProperties": false
90
+ },
91
+ "project": {
92
+ "type": "object",
93
+ "required": [
94
+ "framework",
95
+ "frameworkVersion",
96
+ "packageManager",
97
+ "primaryLanguage",
98
+ "hasTypeScript",
99
+ "hasTailwind",
100
+ "hasDecantr",
101
+ "packageName"
102
+ ],
103
+ "properties": {
104
+ "framework": { "type": "string" },
105
+ "frameworkVersion": { "type": ["string", "null"] },
106
+ "packageManager": { "type": "string" },
107
+ "primaryLanguage": { "type": "string" },
108
+ "hasTypeScript": { "type": "boolean" },
109
+ "hasTailwind": { "type": "boolean" },
110
+ "hasDecantr": { "type": "boolean" },
111
+ "packageName": { "type": ["string", "null"] }
112
+ },
113
+ "additionalProperties": false
114
+ },
115
+ "routes": {
116
+ "type": "object",
117
+ "required": ["strategy", "count", "items"],
118
+ "properties": {
119
+ "strategy": { "type": "string" },
120
+ "count": {
121
+ "type": "integer",
122
+ "minimum": 0
123
+ },
124
+ "items": {
125
+ "type": "array",
126
+ "items": {
127
+ "$ref": "#/$defs/route"
128
+ }
129
+ }
130
+ },
131
+ "additionalProperties": false
132
+ },
133
+ "components": {
134
+ "type": "object",
135
+ "required": ["pageCount", "componentCount", "directories"],
136
+ "properties": {
137
+ "pageCount": {
138
+ "type": "integer",
139
+ "minimum": 0
140
+ },
141
+ "componentCount": {
142
+ "type": "integer",
143
+ "minimum": 0
144
+ },
145
+ "directories": {
146
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
147
+ }
148
+ },
149
+ "additionalProperties": false
150
+ },
151
+ "styling": {
152
+ "type": "object",
153
+ "required": [
154
+ "approach",
155
+ "configFile",
156
+ "cssVariableCount",
157
+ "colorTokenCount",
158
+ "darkMode",
159
+ "themeSignals"
160
+ ],
161
+ "properties": {
162
+ "approach": { "type": "string" },
163
+ "configFile": { "type": ["string", "null"] },
164
+ "cssVariableCount": {
165
+ "type": "integer",
166
+ "minimum": 0
167
+ },
168
+ "colorTokenCount": {
169
+ "type": "integer",
170
+ "minimum": 0
171
+ },
172
+ "darkMode": { "type": "boolean" },
173
+ "themeSignals": {
174
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
175
+ }
176
+ },
177
+ "additionalProperties": false
178
+ },
179
+ "staticHosting": {
180
+ "type": "object",
181
+ "required": ["githubPagesLikely", "evidence", "homepageUrl", "basePath", "hashRouting"],
182
+ "properties": {
183
+ "githubPagesLikely": { "type": "boolean" },
184
+ "evidence": {
185
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
186
+ },
187
+ "homepageUrl": { "type": ["string", "null"] },
188
+ "basePath": { "type": ["string", "null"] },
189
+ "hashRouting": { "type": "boolean" }
190
+ },
191
+ "additionalProperties": false
192
+ },
193
+ "assistant": {
194
+ "type": "object",
195
+ "required": ["ruleFiles"],
196
+ "properties": {
197
+ "ruleFiles": {
198
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ },
203
+ "graphPreview": {
204
+ "$ref": "#/$defs/graphPreview"
205
+ },
206
+ "pagesProbe": {
207
+ "anyOf": [
208
+ { "$ref": "#/$defs/publishedSiteProbe" },
209
+ { "type": "null" }
210
+ ]
211
+ },
212
+ "findings": {
213
+ "type": "array",
214
+ "items": {
215
+ "$ref": "#/$defs/finding"
216
+ }
217
+ },
218
+ "recommendedCommands": {
219
+ "type": "array",
220
+ "items": {
221
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
222
+ }
223
+ },
224
+ "privacy": {
225
+ "type": "object",
226
+ "required": ["sourceUploaded", "persistedByDecantr", "notes"],
227
+ "properties": {
228
+ "sourceUploaded": { "type": "boolean" },
229
+ "persistedByDecantr": { "type": "boolean" },
230
+ "notes": {
231
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
232
+ }
233
+ },
234
+ "additionalProperties": false
235
+ }
236
+ },
237
+ "additionalProperties": false,
238
+ "$defs": {
239
+ "scanInput": {
240
+ "type": "object",
241
+ "required": ["kind", "value"],
242
+ "properties": {
243
+ "kind": {
244
+ "type": "string",
245
+ "enum": ["local", "github-repo", "github-pages"]
246
+ },
247
+ "value": {
248
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
249
+ }
250
+ },
251
+ "additionalProperties": false
252
+ },
253
+ "repository": {
254
+ "type": "object",
255
+ "required": ["owner", "repo", "url"],
256
+ "properties": {
257
+ "owner": {
258
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
259
+ },
260
+ "repo": {
261
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
262
+ },
263
+ "url": {
264
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
265
+ },
266
+ "defaultBranch": {
267
+ "type": ["string", "null"]
268
+ }
269
+ },
270
+ "additionalProperties": false
271
+ },
272
+ "publishedSiteProbe": {
273
+ "type": "object",
274
+ "required": [
275
+ "url",
276
+ "finalUrl",
277
+ "checked",
278
+ "reachable",
279
+ "status",
280
+ "title",
281
+ "description",
282
+ "canonicalUrl",
283
+ "assetHints",
284
+ "routingHints",
285
+ "error"
286
+ ],
287
+ "properties": {
288
+ "url": {
289
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
290
+ },
291
+ "finalUrl": { "type": ["string", "null"] },
292
+ "checked": { "type": "boolean" },
293
+ "reachable": { "type": "boolean" },
294
+ "status": {
295
+ "type": ["integer", "null"],
296
+ "minimum": 100,
297
+ "maximum": 599
298
+ },
299
+ "title": { "type": ["string", "null"] },
300
+ "description": { "type": ["string", "null"] },
301
+ "canonicalUrl": { "type": ["string", "null"] },
302
+ "assetHints": {
303
+ "type": "object",
304
+ "required": ["rootRelative", "relative", "absolute", "samples"],
305
+ "properties": {
306
+ "rootRelative": {
307
+ "type": "integer",
308
+ "minimum": 0
309
+ },
310
+ "relative": {
311
+ "type": "integer",
312
+ "minimum": 0
313
+ },
314
+ "absolute": {
315
+ "type": "integer",
316
+ "minimum": 0
317
+ },
318
+ "samples": {
319
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
320
+ }
321
+ },
322
+ "additionalProperties": false
323
+ },
324
+ "routingHints": {
325
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
326
+ },
327
+ "error": { "type": ["string", "null"] }
328
+ },
329
+ "additionalProperties": false
330
+ },
331
+ "route": {
332
+ "type": "object",
333
+ "required": ["path", "file", "hasLayout"],
334
+ "properties": {
335
+ "path": {
336
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
337
+ },
338
+ "file": {
339
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
340
+ },
341
+ "hasLayout": { "type": "boolean" }
342
+ },
343
+ "additionalProperties": false
344
+ },
345
+ "graphPreview": {
346
+ "type": "object",
347
+ "required": [
348
+ "status",
349
+ "canPreview",
350
+ "readOnly",
351
+ "message",
352
+ "nextCommand",
353
+ "staleArtifacts",
354
+ "snapshot",
355
+ "capsule",
356
+ "diff"
357
+ ],
358
+ "properties": {
359
+ "status": {
360
+ "type": "string",
361
+ "enum": ["not_attached", "current", "stale", "needs_migration", "unavailable"]
362
+ },
363
+ "canPreview": { "type": "boolean" },
364
+ "readOnly": { "const": true },
365
+ "message": {
366
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
367
+ },
368
+ "nextCommand": { "type": ["string", "null"] },
369
+ "staleArtifacts": {
370
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
371
+ },
372
+ "snapshot": {
373
+ "anyOf": [
374
+ { "$ref": "#/$defs/graphPreviewSnapshot" },
375
+ { "type": "null" }
376
+ ]
377
+ },
378
+ "capsule": {
379
+ "anyOf": [
380
+ { "$ref": "#/$defs/graphPreviewCapsule" },
381
+ { "type": "null" }
382
+ ]
383
+ },
384
+ "diff": {
385
+ "anyOf": [
386
+ { "$ref": "#/$defs/graphPreviewDiff" },
387
+ { "type": "null" }
388
+ ]
389
+ }
390
+ },
391
+ "additionalProperties": false
392
+ },
393
+ "graphPreviewSnapshot": {
394
+ "type": "object",
395
+ "required": [
396
+ "id",
397
+ "schemaVersion",
398
+ "sourceHash",
399
+ "nodes",
400
+ "edges",
401
+ "findings",
402
+ "evidence",
403
+ "sourceArtifacts"
404
+ ],
405
+ "properties": {
406
+ "id": {
407
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
408
+ },
409
+ "schemaVersion": {
410
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
411
+ },
412
+ "sourceHash": {
413
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
414
+ },
415
+ "nodes": { "type": "integer", "minimum": 0 },
416
+ "edges": { "type": "integer", "minimum": 0 },
417
+ "findings": { "type": "integer", "minimum": 0 },
418
+ "evidence": { "type": "integer", "minimum": 0 },
419
+ "sourceArtifacts": { "type": "integer", "minimum": 0 }
420
+ },
421
+ "additionalProperties": false
422
+ },
423
+ "graphPreviewDiff": {
424
+ "type": "object",
425
+ "required": ["ops", "findingsAdded", "findingsResolved", "evidenceAdded"],
426
+ "properties": {
427
+ "ops": { "type": "integer", "minimum": 0 },
428
+ "findingsAdded": { "type": "integer", "minimum": 0 },
429
+ "findingsResolved": { "type": "integer", "minimum": 0 },
430
+ "evidenceAdded": { "type": "integer", "minimum": 0 }
431
+ },
432
+ "additionalProperties": false
433
+ },
434
+ "graphPreviewCapsule": {
435
+ "type": "object",
436
+ "required": [
437
+ "cacheKey",
438
+ "routes",
439
+ "components",
440
+ "tokens",
441
+ "localRules",
442
+ "styleBridge",
443
+ "sourceArtifacts",
444
+ "sourceArtifactLimit",
445
+ "sourceArtifactsTruncated",
446
+ "openFindings"
447
+ ],
448
+ "properties": {
449
+ "cacheKey": {
450
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
451
+ },
452
+ "routes": { "type": "integer", "minimum": 0 },
453
+ "components": { "type": "integer", "minimum": 0 },
454
+ "tokens": { "type": "integer", "minimum": 0 },
455
+ "localRules": { "type": "integer", "minimum": 0 },
456
+ "styleBridge": { "type": "integer", "minimum": 0 },
457
+ "sourceArtifacts": { "type": "integer", "minimum": 0 },
458
+ "sourceArtifactLimit": { "type": "integer", "minimum": 0 },
459
+ "sourceArtifactsTruncated": { "type": "boolean" },
460
+ "openFindings": { "type": "integer", "minimum": 0 }
461
+ },
462
+ "additionalProperties": false
463
+ },
464
+ "finding": {
465
+ "type": "object",
466
+ "required": ["id", "severity", "title", "message", "evidence"],
467
+ "properties": {
468
+ "id": {
469
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
470
+ },
471
+ "severity": {
472
+ "type": "string",
473
+ "enum": ["success", "info", "warn", "error"]
474
+ },
475
+ "title": {
476
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
477
+ },
478
+ "message": {
479
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
480
+ },
481
+ "evidence": {
482
+ "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
483
+ },
484
+ "recommendation": {
485
+ "type": "string"
486
+ }
487
+ },
488
+ "additionalProperties": false
489
+ }
490
+ }
491
+ }
@@ -13,6 +13,56 @@
13
13
  "type": "string"
14
14
  }
15
15
  },
16
+ "graphAnchor": {
17
+ "type": "object",
18
+ "required": [
19
+ "snapshot_id",
20
+ "source_hash",
21
+ "node_id",
22
+ "node_type",
23
+ "confidence",
24
+ "reason"
25
+ ],
26
+ "properties": {
27
+ "snapshot_id": {
28
+ "$ref": "#/$defs/nonEmptyString"
29
+ },
30
+ "source_hash": {
31
+ "$ref": "#/$defs/nonEmptyString"
32
+ },
33
+ "node_id": {
34
+ "$ref": "#/$defs/nonEmptyString"
35
+ },
36
+ "node_type": {
37
+ "$ref": "#/$defs/nonEmptyString"
38
+ },
39
+ "route": {
40
+ "type": "string"
41
+ },
42
+ "confidence": {
43
+ "type": "string",
44
+ "enum": ["exact", "inferred", "fallback"]
45
+ },
46
+ "reason": {
47
+ "$ref": "#/$defs/nonEmptyString"
48
+ }
49
+ },
50
+ "additionalProperties": false
51
+ },
52
+ "repairAction": {
53
+ "type": "object",
54
+ "required": ["id"],
55
+ "properties": {
56
+ "id": {
57
+ "$ref": "#/$defs/nonEmptyString"
58
+ },
59
+ "payload": {
60
+ "type": "object",
61
+ "additionalProperties": true
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ },
16
66
  "verificationFinding": {
17
67
  "type": "object",
18
68
  "required": ["id", "category", "severity", "message", "evidence"],
@@ -20,6 +70,9 @@
20
70
  "id": {
21
71
  "$ref": "#/$defs/nonEmptyString"
22
72
  },
73
+ "code": {
74
+ "$ref": "#/$defs/nonEmptyString"
75
+ },
23
76
  "category": {
24
77
  "$ref": "#/$defs/nonEmptyString"
25
78
  },
@@ -44,6 +97,12 @@
44
97
  },
45
98
  "suggestedFix": {
46
99
  "type": "string"
100
+ },
101
+ "graph": {
102
+ "$ref": "#/$defs/graphAnchor"
103
+ },
104
+ "repair": {
105
+ "$ref": "#/$defs/repairAction"
47
106
  }
48
107
  },
49
108
  "additionalProperties": false