@decantr/verifier 1.1.1 → 2.1.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,7 +1,18 @@
1
1
  {
2
2
  "name": "@decantr/verifier",
3
- "version": "1.1.1",
3
+ "version": "2.1.0",
4
4
  "description": "Shared verification, critique, Project Health, and report-schema engine for Decantr",
5
+ "keywords": [
6
+ "decantr",
7
+ "decantr-ai",
8
+ "project-health",
9
+ "ui-verification",
10
+ "drift-detection",
11
+ "design-governance",
12
+ "ai-generated-ui",
13
+ "ci",
14
+ "critique"
15
+ ],
5
16
  "author": "Decantr AI",
6
17
  "license": "MIT",
7
18
  "bugs": {
@@ -24,6 +35,8 @@
24
35
  "./schema/verification-report.common.v1.json": "./schema/verification-report.common.v1.json",
25
36
  "./schema/project-audit-report.v1.json": "./schema/project-audit-report.v1.json",
26
37
  "./schema/project-health-report.v1.json": "./schema/project-health-report.v1.json",
38
+ "./schema/evidence-bundle.v1.json": "./schema/evidence-bundle.v1.json",
39
+ "./schema/workspace-health-report.v1.json": "./schema/workspace-health-report.v1.json",
27
40
  "./schema/file-critique-report.v1.json": "./schema/file-critique-report.v1.json",
28
41
  "./schema/showcase-shortlist-report.v1.json": "./schema/showcase-shortlist-report.v1.json"
29
42
  },
@@ -39,8 +52,8 @@
39
52
  },
40
53
  "dependencies": {
41
54
  "typescript": "^6.0.3",
42
- "@decantr/core": "1.0.6",
43
- "@decantr/essence-spec": "1.0.8"
55
+ "@decantr/core": "2.1.0",
56
+ "@decantr/essence-spec": "2.0.1"
44
57
  },
45
58
  "devDependencies": {
46
59
  "ajv": "^8.20.0",
@@ -0,0 +1,197 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/evidence-bundle.v1.json",
4
+ "title": "Decantr Evidence Bundle",
5
+ "type": "object",
6
+ "required": [
7
+ "$schema",
8
+ "generatedAt",
9
+ "project",
10
+ "toolchain",
11
+ "privacy",
12
+ "health",
13
+ "provenance",
14
+ "assertions",
15
+ "findings"
16
+ ],
17
+ "properties": {
18
+ "$schema": {
19
+ "const": "https://decantr.ai/schemas/evidence-bundle.v1.json"
20
+ },
21
+ "generatedAt": {
22
+ "type": "string",
23
+ "format": "date-time"
24
+ },
25
+ "project": {
26
+ "type": "object",
27
+ "required": ["id", "rootLabel"],
28
+ "properties": {
29
+ "id": { "type": "string" },
30
+ "rootLabel": { "type": "string" }
31
+ },
32
+ "additionalProperties": false
33
+ },
34
+ "toolchain": {
35
+ "type": "object",
36
+ "required": ["verifierVersion"],
37
+ "properties": {
38
+ "verifierVersion": { "type": ["string", "null"] }
39
+ },
40
+ "additionalProperties": false
41
+ },
42
+ "privacy": {
43
+ "type": "object",
44
+ "required": ["localOnly", "redactedFields", "screenshotsLocalOnly"],
45
+ "properties": {
46
+ "localOnly": { "type": "boolean" },
47
+ "redactedFields": { "type": "array", "items": { "type": "string" } },
48
+ "screenshotsLocalOnly": { "type": "boolean" }
49
+ },
50
+ "additionalProperties": false
51
+ },
52
+ "health": {
53
+ "type": "object",
54
+ "required": ["status", "score", "errorCount", "warnCount", "infoCount", "findingCount"],
55
+ "properties": {
56
+ "status": { "type": "string", "enum": ["healthy", "warning", "error"] },
57
+ "score": { "type": "integer", "minimum": 0, "maximum": 100 },
58
+ "errorCount": { "type": "integer", "minimum": 0 },
59
+ "warnCount": { "type": "integer", "minimum": 0 },
60
+ "infoCount": { "type": "integer", "minimum": 0 },
61
+ "findingCount": { "type": "integer", "minimum": 0 }
62
+ },
63
+ "additionalProperties": false
64
+ },
65
+ "provenance": {
66
+ "type": "object",
67
+ "required": ["essence", "packManifest", "reviewPack"],
68
+ "properties": {
69
+ "essence": { "$ref": "#/$defs/provenanceEntry" },
70
+ "packManifest": { "$ref": "#/$defs/provenanceEntry" },
71
+ "reviewPack": { "$ref": "#/$defs/provenanceEntry" },
72
+ "workspaceConfig": { "$ref": "#/$defs/provenanceEntry" },
73
+ "designTokens": { "$ref": "#/$defs/provenanceEntry" }
74
+ },
75
+ "additionalProperties": false
76
+ },
77
+ "assertions": {
78
+ "type": "array",
79
+ "items": { "$ref": "#/$defs/assertion" }
80
+ },
81
+ "findings": {
82
+ "type": "array",
83
+ "items": { "$ref": "#/$defs/finding" }
84
+ },
85
+ "browser": {
86
+ "type": "object",
87
+ "required": ["enabled", "status", "baseUrl", "screenshots", "findings"],
88
+ "properties": {
89
+ "enabled": { "type": "boolean" },
90
+ "status": {
91
+ "type": "string",
92
+ "enum": ["not_requested", "unavailable", "passed", "failed"]
93
+ },
94
+ "baseUrl": { "type": ["string", "null"] },
95
+ "screenshots": { "type": "array", "items": { "type": "string" } },
96
+ "findings": { "type": "array", "items": { "type": "string" } }
97
+ },
98
+ "additionalProperties": false
99
+ },
100
+ "designTokens": {
101
+ "type": "object",
102
+ "required": ["source", "status", "compared", "matched", "missing"],
103
+ "properties": {
104
+ "source": { "type": "string" },
105
+ "status": { "type": "string", "enum": ["not_requested", "passed", "warning", "error"] },
106
+ "compared": { "type": "integer", "minimum": 0 },
107
+ "matched": { "type": "integer", "minimum": 0 },
108
+ "missing": { "type": "array", "items": { "type": "string" } }
109
+ },
110
+ "additionalProperties": false
111
+ }
112
+ },
113
+ "additionalProperties": false,
114
+ "$defs": {
115
+ "provenanceEntry": {
116
+ "type": "object",
117
+ "required": ["path", "present", "hash", "generatedAt"],
118
+ "properties": {
119
+ "path": { "type": "string" },
120
+ "present": { "type": "boolean" },
121
+ "hash": { "type": ["string", "null"] },
122
+ "generatedAt": { "type": ["string", "null"] }
123
+ },
124
+ "additionalProperties": false
125
+ },
126
+ "assertion": {
127
+ "type": "object",
128
+ "required": ["id", "category", "status", "severity", "message", "evidence", "rule"],
129
+ "properties": {
130
+ "id": { "type": "string" },
131
+ "category": {
132
+ "type": "string",
133
+ "enum": [
134
+ "route",
135
+ "shell",
136
+ "region",
137
+ "interaction",
138
+ "accessibility",
139
+ "design-token",
140
+ "context",
141
+ "policy"
142
+ ]
143
+ },
144
+ "status": { "type": "string", "enum": ["passed", "failed", "not_applicable"] },
145
+ "severity": { "type": "string", "enum": ["error", "warn", "info"] },
146
+ "message": { "type": "string" },
147
+ "evidence": { "type": "array", "items": { "type": "string" } },
148
+ "target": { "type": "string" },
149
+ "rule": { "type": "string" },
150
+ "suggestedFix": { "type": "string" }
151
+ },
152
+ "additionalProperties": false
153
+ },
154
+ "finding": {
155
+ "type": "object",
156
+ "required": [
157
+ "id",
158
+ "source",
159
+ "category",
160
+ "severity",
161
+ "message",
162
+ "evidence",
163
+ "remediationSummary",
164
+ "commands",
165
+ "promptCommand"
166
+ ],
167
+ "properties": {
168
+ "id": { "type": "string" },
169
+ "source": {
170
+ "type": "string",
171
+ "enum": [
172
+ "audit",
173
+ "assertion",
174
+ "browser",
175
+ "check",
176
+ "brownfield",
177
+ "design-token",
178
+ "runtime",
179
+ "pack",
180
+ "interaction"
181
+ ]
182
+ },
183
+ "category": { "type": "string" },
184
+ "severity": { "type": "string", "enum": ["error", "warn", "info"] },
185
+ "message": { "type": "string" },
186
+ "evidence": { "type": "array", "items": { "type": "string" } },
187
+ "target": { "type": "string" },
188
+ "rule": { "type": "string" },
189
+ "suggestedFix": { "type": "string" },
190
+ "remediationSummary": { "type": "string" },
191
+ "commands": { "type": "array", "items": { "type": "string" } },
192
+ "promptCommand": { "type": "string" }
193
+ },
194
+ "additionalProperties": false
195
+ }
196
+ }
197
+ }
@@ -17,10 +17,7 @@
17
17
  "essence": {
18
18
  "anyOf": [
19
19
  {
20
- "$ref": "https://decantr.ai/schemas/essence.v2.json"
21
- },
22
- {
23
- "$ref": "https://decantr.ai/schemas/essence.v3.json"
20
+ "$ref": "https://decantr.ai/schemas/essence.v4.json"
24
21
  },
25
22
  {
26
23
  "type": "null"
@@ -207,7 +207,17 @@
207
207
  },
208
208
  "source": {
209
209
  "type": "string",
210
- "enum": ["audit", "check", "brownfield", "runtime", "pack", "interaction"]
210
+ "enum": [
211
+ "audit",
212
+ "assertion",
213
+ "browser",
214
+ "check",
215
+ "brownfield",
216
+ "design-token",
217
+ "runtime",
218
+ "pack",
219
+ "interaction"
220
+ ]
211
221
  },
212
222
  "category": {
213
223
  "$ref": "https://decantr.ai/schemas/verification-report.common.v1.json#/$defs/nonEmptyString"
@@ -0,0 +1,140 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://decantr.ai/schemas/workspace-health-report.v1.json",
4
+ "title": "Decantr Workspace Health Report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "$schema",
9
+ "generatedAt",
10
+ "workspaceRoot",
11
+ "changedOnly",
12
+ "since",
13
+ "summary",
14
+ "projects"
15
+ ],
16
+ "properties": {
17
+ "$schema": {
18
+ "const": "https://decantr.ai/schemas/workspace-health-report.v1.json"
19
+ },
20
+ "generatedAt": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ },
24
+ "workspaceRoot": {
25
+ "type": "string"
26
+ },
27
+ "changedOnly": {
28
+ "type": "boolean"
29
+ },
30
+ "since": {
31
+ "type": ["string", "null"]
32
+ },
33
+ "summary": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": [
37
+ "projectCount",
38
+ "checkedCount",
39
+ "healthyCount",
40
+ "warningCount",
41
+ "errorCount",
42
+ "failedCount"
43
+ ],
44
+ "properties": {
45
+ "projectCount": {
46
+ "type": "integer",
47
+ "minimum": 0
48
+ },
49
+ "checkedCount": {
50
+ "type": "integer",
51
+ "minimum": 0
52
+ },
53
+ "healthyCount": {
54
+ "type": "integer",
55
+ "minimum": 0
56
+ },
57
+ "warningCount": {
58
+ "type": "integer",
59
+ "minimum": 0
60
+ },
61
+ "errorCount": {
62
+ "type": "integer",
63
+ "minimum": 0
64
+ },
65
+ "failedCount": {
66
+ "type": "integer",
67
+ "minimum": 0
68
+ }
69
+ }
70
+ },
71
+ "projects": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "id",
78
+ "path",
79
+ "status",
80
+ "score",
81
+ "errorCount",
82
+ "warnCount",
83
+ "infoCount",
84
+ "findingCount",
85
+ "durationMs",
86
+ "changed",
87
+ "source",
88
+ "error"
89
+ ],
90
+ "properties": {
91
+ "id": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ },
95
+ "path": {
96
+ "type": "string",
97
+ "minLength": 1
98
+ },
99
+ "status": {
100
+ "enum": ["healthy", "warning", "error", "failed"]
101
+ },
102
+ "score": {
103
+ "type": "number",
104
+ "minimum": 0,
105
+ "maximum": 100
106
+ },
107
+ "errorCount": {
108
+ "type": "integer",
109
+ "minimum": 0
110
+ },
111
+ "warnCount": {
112
+ "type": "integer",
113
+ "minimum": 0
114
+ },
115
+ "infoCount": {
116
+ "type": "integer",
117
+ "minimum": 0
118
+ },
119
+ "findingCount": {
120
+ "type": "integer",
121
+ "minimum": 0
122
+ },
123
+ "durationMs": {
124
+ "type": "integer",
125
+ "minimum": 0
126
+ },
127
+ "changed": {
128
+ "type": "boolean"
129
+ },
130
+ "source": {
131
+ "enum": ["manifest", "auto"]
132
+ },
133
+ "error": {
134
+ "type": ["string", "null"]
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }