@decantr/verifier 1.0.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/README.md +56 -0
- package/dist/index.d.ts +238 -0
- package/dist/index.js +8523 -0
- package/dist/index.js.map +1 -0
- package/package.json +50 -0
- package/schema/file-critique-report.v1.json +46 -0
- package/schema/project-audit-report.v1.json +308 -0
- package/schema/showcase-shortlist-report.v1.json +378 -0
- package/schema/verification-report.common.v1.json +76 -0
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@decantr/verifier",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared verification, critique, and report-schema engine for Decantr",
|
|
5
|
+
"author": "Decantr AI",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/decantr-ai/decantr/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/decantr-ai/decantr.git",
|
|
13
|
+
"directory": "packages/verifier"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://decantr.ai",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./schema/verification-report.common.v1.json": "./schema/verification-report.common.v1.json",
|
|
25
|
+
"./schema/project-audit-report.v1.json": "./schema/project-audit-report.v1.json",
|
|
26
|
+
"./schema/file-critique-report.v1.json": "./schema/file-critique-report.v1.json",
|
|
27
|
+
"./schema/showcase-shortlist-report.v1.json": "./schema/showcase-shortlist-report.v1.json"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"schema"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsup",
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"test:watch": "vitest"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@decantr/core": "workspace:*",
|
|
43
|
+
"@decantr/essence-spec": "workspace:*",
|
|
44
|
+
"typescript": "^5.7.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"ajv": "^8.18.0",
|
|
48
|
+
"ajv-formats": "^3.0.1"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://decantr.ai/schemas/file-critique-report.v1.json",
|
|
4
|
+
"title": "Decantr File Critique Report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["$schema", "file", "overall", "scores", "findings", "focusAreas", "reviewPack"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"const": "https://decantr.ai/schemas/file-critique-report.v1.json"
|
|
10
|
+
},
|
|
11
|
+
"file": {
|
|
12
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
13
|
+
},
|
|
14
|
+
"overall": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"minimum": 0,
|
|
17
|
+
"maximum": 5
|
|
18
|
+
},
|
|
19
|
+
"scores": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/verificationScore"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"findings": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/verificationFinding"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"focusAreas": {
|
|
32
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/stringArray"
|
|
33
|
+
},
|
|
34
|
+
"reviewPack": {
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{
|
|
37
|
+
"$ref": "https://decantr.ai/schemas/review-pack.v1.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "null"
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://decantr.ai/schemas/project-audit-report.v1.json",
|
|
4
|
+
"title": "Decantr Project Audit Report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["$schema", "projectRoot", "valid", "essence", "reviewPack", "packManifest", "runtimeAudit", "findings", "summary"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"const": "https://decantr.ai/schemas/project-audit-report.v1.json"
|
|
10
|
+
},
|
|
11
|
+
"projectRoot": {
|
|
12
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
13
|
+
},
|
|
14
|
+
"valid": {
|
|
15
|
+
"type": "boolean"
|
|
16
|
+
},
|
|
17
|
+
"essence": {
|
|
18
|
+
"anyOf": [
|
|
19
|
+
{
|
|
20
|
+
"$ref": "https://decantr.ai/schemas/essence.v2.json"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"$ref": "https://decantr.ai/schemas/essence.v3.json"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "null"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"reviewPack": {
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"$ref": "https://decantr.ai/schemas/review-pack.v1.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "null"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"packManifest": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"$ref": "https://decantr.ai/schemas/pack-manifest.v1.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "null"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"runtimeAudit": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": [
|
|
53
|
+
"distPresent",
|
|
54
|
+
"indexPresent",
|
|
55
|
+
"checked",
|
|
56
|
+
"passed",
|
|
57
|
+
"rootDocumentOk",
|
|
58
|
+
"titleOk",
|
|
59
|
+
"langOk",
|
|
60
|
+
"viewportOk",
|
|
61
|
+
"charsetOk",
|
|
62
|
+
"cspSignalOk",
|
|
63
|
+
"inlineScriptCount",
|
|
64
|
+
"inlineEventHandlerCount",
|
|
65
|
+
"externalScriptsWithoutIntegrityCount",
|
|
66
|
+
"externalScriptsWithIntegrityMissingCrossoriginCount",
|
|
67
|
+
"externalStylesheetsWithoutIntegrityCount",
|
|
68
|
+
"externalStylesheetsWithIntegrityMissingCrossoriginCount",
|
|
69
|
+
"externalScriptsWithInsecureTransportCount",
|
|
70
|
+
"externalStylesheetsWithInsecureTransportCount",
|
|
71
|
+
"externalMediaSourcesWithInsecureTransportCount",
|
|
72
|
+
"externalBlankLinksWithoutRelCount",
|
|
73
|
+
"externalIframesWithoutSandboxCount",
|
|
74
|
+
"externalIframesWithInsecureTransportCount",
|
|
75
|
+
"jsEvalSignalCount",
|
|
76
|
+
"jsHtmlInjectionSignalCount",
|
|
77
|
+
"jsInsecureTransportSignalCount",
|
|
78
|
+
"jsSecretSignalCount",
|
|
79
|
+
"assetCount",
|
|
80
|
+
"assetsPassed",
|
|
81
|
+
"routeHintsChecked",
|
|
82
|
+
"routeHintsMatched",
|
|
83
|
+
"routeHintsCoverageOk",
|
|
84
|
+
"routeDocumentsChecked",
|
|
85
|
+
"routeDocumentsPassed",
|
|
86
|
+
"routeDocumentsHardenedCount",
|
|
87
|
+
"routeDocumentsCoverageOk",
|
|
88
|
+
"routeDocumentsHardeningOk",
|
|
89
|
+
"fullRouteCoverageOk",
|
|
90
|
+
"totalAssetBytes",
|
|
91
|
+
"jsAssetBytes",
|
|
92
|
+
"cssAssetBytes",
|
|
93
|
+
"largestAssetPath",
|
|
94
|
+
"largestAssetBytes",
|
|
95
|
+
"failures"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"distPresent": {
|
|
99
|
+
"type": "boolean"
|
|
100
|
+
},
|
|
101
|
+
"indexPresent": {
|
|
102
|
+
"type": "boolean"
|
|
103
|
+
},
|
|
104
|
+
"checked": {
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"passed": {
|
|
108
|
+
"type": ["boolean", "null"]
|
|
109
|
+
},
|
|
110
|
+
"rootDocumentOk": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"titleOk": {
|
|
114
|
+
"type": "boolean"
|
|
115
|
+
},
|
|
116
|
+
"langOk": {
|
|
117
|
+
"type": "boolean"
|
|
118
|
+
},
|
|
119
|
+
"viewportOk": {
|
|
120
|
+
"type": "boolean"
|
|
121
|
+
},
|
|
122
|
+
"charsetOk": {
|
|
123
|
+
"type": "boolean"
|
|
124
|
+
},
|
|
125
|
+
"cspSignalOk": {
|
|
126
|
+
"type": "boolean"
|
|
127
|
+
},
|
|
128
|
+
"inlineScriptCount": {
|
|
129
|
+
"type": "integer",
|
|
130
|
+
"minimum": 0
|
|
131
|
+
},
|
|
132
|
+
"inlineEventHandlerCount": {
|
|
133
|
+
"type": "integer",
|
|
134
|
+
"minimum": 0
|
|
135
|
+
},
|
|
136
|
+
"externalScriptsWithoutIntegrityCount": {
|
|
137
|
+
"type": "integer",
|
|
138
|
+
"minimum": 0
|
|
139
|
+
},
|
|
140
|
+
"externalScriptsWithIntegrityMissingCrossoriginCount": {
|
|
141
|
+
"type": "integer",
|
|
142
|
+
"minimum": 0
|
|
143
|
+
},
|
|
144
|
+
"externalStylesheetsWithoutIntegrityCount": {
|
|
145
|
+
"type": "integer",
|
|
146
|
+
"minimum": 0
|
|
147
|
+
},
|
|
148
|
+
"externalStylesheetsWithIntegrityMissingCrossoriginCount": {
|
|
149
|
+
"type": "integer",
|
|
150
|
+
"minimum": 0
|
|
151
|
+
},
|
|
152
|
+
"externalScriptsWithInsecureTransportCount": {
|
|
153
|
+
"type": "integer",
|
|
154
|
+
"minimum": 0
|
|
155
|
+
},
|
|
156
|
+
"externalStylesheetsWithInsecureTransportCount": {
|
|
157
|
+
"type": "integer",
|
|
158
|
+
"minimum": 0
|
|
159
|
+
},
|
|
160
|
+
"externalMediaSourcesWithInsecureTransportCount": {
|
|
161
|
+
"type": "integer",
|
|
162
|
+
"minimum": 0
|
|
163
|
+
},
|
|
164
|
+
"externalBlankLinksWithoutRelCount": {
|
|
165
|
+
"type": "integer",
|
|
166
|
+
"minimum": 0
|
|
167
|
+
},
|
|
168
|
+
"externalIframesWithoutSandboxCount": {
|
|
169
|
+
"type": "integer",
|
|
170
|
+
"minimum": 0
|
|
171
|
+
},
|
|
172
|
+
"externalIframesWithInsecureTransportCount": {
|
|
173
|
+
"type": "integer",
|
|
174
|
+
"minimum": 0
|
|
175
|
+
},
|
|
176
|
+
"jsEvalSignalCount": {
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"minimum": 0
|
|
179
|
+
},
|
|
180
|
+
"jsHtmlInjectionSignalCount": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 0
|
|
183
|
+
},
|
|
184
|
+
"jsInsecureTransportSignalCount": {
|
|
185
|
+
"type": "integer",
|
|
186
|
+
"minimum": 0
|
|
187
|
+
},
|
|
188
|
+
"jsSecretSignalCount": {
|
|
189
|
+
"type": "integer",
|
|
190
|
+
"minimum": 0
|
|
191
|
+
},
|
|
192
|
+
"assetCount": {
|
|
193
|
+
"type": "integer",
|
|
194
|
+
"minimum": 0
|
|
195
|
+
},
|
|
196
|
+
"assetsPassed": {
|
|
197
|
+
"type": "integer",
|
|
198
|
+
"minimum": 0
|
|
199
|
+
},
|
|
200
|
+
"routeHintsChecked": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"routeHintsMatched": {
|
|
207
|
+
"type": "integer",
|
|
208
|
+
"minimum": 0
|
|
209
|
+
},
|
|
210
|
+
"routeHintsCoverageOk": {
|
|
211
|
+
"type": "boolean"
|
|
212
|
+
},
|
|
213
|
+
"routeDocumentsChecked": {
|
|
214
|
+
"type": "integer",
|
|
215
|
+
"minimum": 0
|
|
216
|
+
},
|
|
217
|
+
"routeDocumentsPassed": {
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"minimum": 0
|
|
220
|
+
},
|
|
221
|
+
"routeDocumentsHardenedCount": {
|
|
222
|
+
"type": "integer",
|
|
223
|
+
"minimum": 0
|
|
224
|
+
},
|
|
225
|
+
"routeDocumentsCoverageOk": {
|
|
226
|
+
"type": "boolean"
|
|
227
|
+
},
|
|
228
|
+
"routeDocumentsHardeningOk": {
|
|
229
|
+
"type": "boolean"
|
|
230
|
+
},
|
|
231
|
+
"fullRouteCoverageOk": {
|
|
232
|
+
"type": "boolean"
|
|
233
|
+
},
|
|
234
|
+
"totalAssetBytes": {
|
|
235
|
+
"type": "integer",
|
|
236
|
+
"minimum": 0
|
|
237
|
+
},
|
|
238
|
+
"jsAssetBytes": {
|
|
239
|
+
"type": "integer",
|
|
240
|
+
"minimum": 0
|
|
241
|
+
},
|
|
242
|
+
"cssAssetBytes": {
|
|
243
|
+
"type": "integer",
|
|
244
|
+
"minimum": 0
|
|
245
|
+
},
|
|
246
|
+
"largestAssetPath": {
|
|
247
|
+
"type": ["string", "null"]
|
|
248
|
+
},
|
|
249
|
+
"largestAssetBytes": {
|
|
250
|
+
"type": "integer",
|
|
251
|
+
"minimum": 0
|
|
252
|
+
},
|
|
253
|
+
"failures": {
|
|
254
|
+
"type": "array",
|
|
255
|
+
"items": {
|
|
256
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"additionalProperties": false
|
|
261
|
+
},
|
|
262
|
+
"findings": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"items": {
|
|
265
|
+
"$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/verificationFinding"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"summary": {
|
|
269
|
+
"type": "object",
|
|
270
|
+
"required": ["errorCount", "warnCount", "infoCount", "essenceVersion", "reviewPackPresent", "packManifestPresent", "runtimeAuditChecked", "runtimePassed", "pageCount"],
|
|
271
|
+
"properties": {
|
|
272
|
+
"errorCount": {
|
|
273
|
+
"type": "integer",
|
|
274
|
+
"minimum": 0
|
|
275
|
+
},
|
|
276
|
+
"warnCount": {
|
|
277
|
+
"type": "integer",
|
|
278
|
+
"minimum": 0
|
|
279
|
+
},
|
|
280
|
+
"infoCount": {
|
|
281
|
+
"type": "integer",
|
|
282
|
+
"minimum": 0
|
|
283
|
+
},
|
|
284
|
+
"essenceVersion": {
|
|
285
|
+
"type": ["string", "null"]
|
|
286
|
+
},
|
|
287
|
+
"reviewPackPresent": {
|
|
288
|
+
"type": "boolean"
|
|
289
|
+
},
|
|
290
|
+
"packManifestPresent": {
|
|
291
|
+
"type": "boolean"
|
|
292
|
+
},
|
|
293
|
+
"runtimeAuditChecked": {
|
|
294
|
+
"type": "boolean"
|
|
295
|
+
},
|
|
296
|
+
"runtimePassed": {
|
|
297
|
+
"type": ["boolean", "null"]
|
|
298
|
+
},
|
|
299
|
+
"pageCount": {
|
|
300
|
+
"type": "integer",
|
|
301
|
+
"minimum": 0
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"additionalProperties": false
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"additionalProperties": false
|
|
308
|
+
}
|