@crvouga/atlas 1.19.0 → 1.21.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/core/src/cli.d.ts +1 -1
  3. package/dist/core/src/cli.js +3 -0
  4. package/dist/reports/src/compose.d.ts +23 -1
  5. package/dist/reports/src/compose.js +29 -19
  6. package/dist/reports/src/report-cli.d.ts +13 -0
  7. package/dist/reports/src/report-cli.js +6 -4
  8. package/dist/reports/src/ui-catalog-cli.d.ts +10 -0
  9. package/dist/reports/src/ui-catalog-cli.js +391 -0
  10. package/dist/reports/src/ui-catalog-diff.d.ts +104 -0
  11. package/dist/reports/src/ui-catalog-diff.js +130 -0
  12. package/dist/reports/src/ui-catalog-export.d.ts +82 -0
  13. package/dist/reports/src/ui-catalog-export.js +221 -0
  14. package/dist/schema/src/api.d.ts +55 -0
  15. package/dist/schema/src/api.js +33 -0
  16. package/dist/schema/src/cli-results.d.ts +318 -1
  17. package/dist/schema/src/cli-results.js +89 -1
  18. package/dist/server/src/app.js +3 -1
  19. package/dist/server/src/openapi.d.ts +1 -1
  20. package/dist/server/src/openapi.js +24 -2
  21. package/dist/server/src/recording-verification.d.ts +34 -0
  22. package/dist/server/src/recording-verification.js +118 -0
  23. package/docs/agents.md +5 -0
  24. package/docs/reference/cli.md +56 -1
  25. package/docs/reference/http-api.md +52 -0
  26. package/docs/reference/reports.md +392 -0
  27. package/docs/reference/schema.md +82 -1
  28. package/docs/reference/server.md +39 -0
  29. package/docs/rich-evidence.md +12 -0
  30. package/docs/server.md +12 -0
  31. package/docs/ui-catalog.md +106 -12
  32. package/docs/ui.md +6 -1
  33. package/llms-full.txt +246 -11
  34. package/package.json +1 -1
  35. package/packages/schema/schemas/ui-catalog-diff-result.schema.json +201 -0
  36. package/packages/schema/schemas/ui-catalog-export-result.schema.json +83 -0
  37. package/packages/schema/schemas/ui-catalog-publish-result.schema.json +116 -0
  38. package/packages/schema/schemas/ui-catalog-status.schema.json +197 -0
  39. package/packages/server/openapi.json +527 -1
  40. package/packages/visualizer/src/catalog/Picture.tsx +32 -0
  41. package/packages/visualizer/src/catalog/UiCatalogCompare.tsx +289 -0
  42. package/packages/visualizer/src/catalog/UiCatalogPage.tsx +18 -28
  43. package/packages/visualizer/src/catalog/history.ts +61 -0
  44. package/packages/visualizer/src/catalog/search.ts +14 -3
  45. package/packages/visualizer/src/evidence/evidence-context.tsx +2 -1
  46. package/packages/visualizer/src/explorer/RunsView.tsx +32 -6
  47. package/packages/visualizer/src/explorer/catalog.tsx +24 -1
  48. package/packages/visualizer/src/explorer/recording-verification.ts +58 -0
@@ -0,0 +1,201 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/ui-catalog-diff-result.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "ok": {
7
+ "type": "boolean",
8
+ "description": "False when a layer or backend could not be read (the comparison may be wrong), or, with `--fail-on-change`, when anything differs. Otherwise true: a difference is not a failure by itself"
9
+ },
10
+ "from": {
11
+ "type": "object",
12
+ "properties": {
13
+ "sha": {
14
+ "type": "string"
15
+ },
16
+ "states": {
17
+ "type": "integer",
18
+ "minimum": 0,
19
+ "maximum": 9007199254740991
20
+ },
21
+ "layers": {
22
+ "type": "integer",
23
+ "minimum": 0,
24
+ "maximum": 9007199254740991
25
+ }
26
+ },
27
+ "required": [
28
+ "sha",
29
+ "states",
30
+ "layers"
31
+ ],
32
+ "additionalProperties": {}
33
+ },
34
+ "to": {
35
+ "type": "object",
36
+ "properties": {
37
+ "sha": {
38
+ "type": "string"
39
+ },
40
+ "states": {
41
+ "type": "integer",
42
+ "minimum": 0,
43
+ "maximum": 9007199254740991
44
+ },
45
+ "layers": {
46
+ "type": "integer",
47
+ "minimum": 0,
48
+ "maximum": 9007199254740991
49
+ }
50
+ },
51
+ "required": [
52
+ "sha",
53
+ "states",
54
+ "layers"
55
+ ],
56
+ "additionalProperties": {}
57
+ },
58
+ "summary": {
59
+ "type": "object",
60
+ "properties": {
61
+ "coverage": {
62
+ "type": "integer",
63
+ "minimum": 0,
64
+ "maximum": 9007199254740991,
65
+ "description": "Pairs that stand differently (captured against failed, for example)"
66
+ },
67
+ "picture": {
68
+ "type": "integer",
69
+ "minimum": 0,
70
+ "maximum": 9007199254740991,
71
+ "description": "Both captured, and the stored bytes differ. Not a measure of how many pixels"
72
+ },
73
+ "unverified": {
74
+ "type": "integer",
75
+ "minimum": 0,
76
+ "maximum": 9007199254740991,
77
+ "description": "Both captured, but a side has no content hash, so whether the picture changed is unknown"
78
+ },
79
+ "added": {
80
+ "type": "integer",
81
+ "minimum": 0,
82
+ "maximum": 9007199254740991,
83
+ "description": "Only `to` has it"
84
+ },
85
+ "removed": {
86
+ "type": "integer",
87
+ "minimum": 0,
88
+ "maximum": 9007199254740991,
89
+ "description": "Only `from` has it. Not a regression: the other side may not have run it"
90
+ },
91
+ "unchanged": {
92
+ "type": "integer",
93
+ "minimum": 0,
94
+ "maximum": 9007199254740991
95
+ },
96
+ "total": {
97
+ "type": "integer",
98
+ "minimum": 0,
99
+ "maximum": 9007199254740991
100
+ }
101
+ },
102
+ "required": [
103
+ "coverage",
104
+ "picture",
105
+ "unverified",
106
+ "added",
107
+ "removed",
108
+ "unchanged",
109
+ "total"
110
+ ],
111
+ "additionalProperties": {}
112
+ },
113
+ "changes": {
114
+ "type": "array",
115
+ "items": {
116
+ "type": "object",
117
+ "properties": {
118
+ "state": {
119
+ "type": "string"
120
+ },
121
+ "title": {
122
+ "type": "string"
123
+ },
124
+ "profile": {
125
+ "type": "string"
126
+ },
127
+ "change": {
128
+ "type": "string",
129
+ "enum": [
130
+ "coverage",
131
+ "picture",
132
+ "unverified",
133
+ "added",
134
+ "removed"
135
+ ]
136
+ },
137
+ "from": {
138
+ "anyOf": [
139
+ {
140
+ "type": "string",
141
+ "enum": [
142
+ "captured",
143
+ "failed",
144
+ "capturing",
145
+ "skipped",
146
+ "missing"
147
+ ]
148
+ },
149
+ {
150
+ "type": "null"
151
+ }
152
+ ]
153
+ },
154
+ "to": {
155
+ "anyOf": [
156
+ {
157
+ "type": "string",
158
+ "enum": [
159
+ "captured",
160
+ "failed",
161
+ "capturing",
162
+ "skipped",
163
+ "missing"
164
+ ]
165
+ },
166
+ {
167
+ "type": "null"
168
+ }
169
+ ]
170
+ }
171
+ },
172
+ "required": [
173
+ "state",
174
+ "title",
175
+ "profile",
176
+ "change",
177
+ "from",
178
+ "to"
179
+ ],
180
+ "additionalProperties": {}
181
+ },
182
+ "description": "Every pair that is not unchanged"
183
+ },
184
+ "notices": {
185
+ "type": "array",
186
+ "items": {
187
+ "type": "string"
188
+ },
189
+ "description": "What could not be read. Any makes `ok` false: an unreadable layer is unknown, never unchanged"
190
+ }
191
+ },
192
+ "required": [
193
+ "ok",
194
+ "from",
195
+ "to",
196
+ "summary",
197
+ "changes",
198
+ "notices"
199
+ ],
200
+ "additionalProperties": {}
201
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/ui-catalog-export-result.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "ok": {
7
+ "type": "boolean",
8
+ "const": true
9
+ },
10
+ "out": {
11
+ "type": "string",
12
+ "description": "The HTML file that was written"
13
+ },
14
+ "bytes": {
15
+ "type": "integer",
16
+ "minimum": 0,
17
+ "maximum": 9007199254740991,
18
+ "description": "Its size"
19
+ },
20
+ "states": {
21
+ "type": "integer",
22
+ "minimum": 0,
23
+ "maximum": 9007199254740991
24
+ },
25
+ "cells": {
26
+ "type": "integer",
27
+ "minimum": 0,
28
+ "maximum": 9007199254740991
29
+ },
30
+ "pictures": {
31
+ "type": "object",
32
+ "properties": {
33
+ "embedded": {
34
+ "type": "integer",
35
+ "minimum": 0,
36
+ "maximum": 9007199254740991
37
+ },
38
+ "embeddedBytes": {
39
+ "type": "integer",
40
+ "minimum": 0,
41
+ "maximum": 9007199254740991
42
+ },
43
+ "left": {
44
+ "type": "integer",
45
+ "minimum": 0,
46
+ "maximum": 9007199254740991,
47
+ "description": "Pictures not embedded (over the size limit, not stored, not an image, or `--images none`); each is listed on the page with the reason"
48
+ }
49
+ },
50
+ "required": [
51
+ "embedded",
52
+ "embeddedBytes",
53
+ "left"
54
+ ],
55
+ "additionalProperties": {}
56
+ },
57
+ "manifest": {
58
+ "description": "The JSON manifest written beside it with `--manifest`, or null",
59
+ "type": [
60
+ "string",
61
+ "null"
62
+ ]
63
+ },
64
+ "warnings": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string"
68
+ },
69
+ "description": "Backends and layers that could not be read, and pictures left out. The page says so too"
70
+ }
71
+ },
72
+ "required": [
73
+ "ok",
74
+ "out",
75
+ "bytes",
76
+ "states",
77
+ "cells",
78
+ "pictures",
79
+ "manifest",
80
+ "warnings"
81
+ ],
82
+ "additionalProperties": {}
83
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/ui-catalog-publish-result.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "ok": {
7
+ "type": "boolean",
8
+ "const": true,
9
+ "description": "True: the layer was written. A state whose picture could not be read is published as `failed` and named in `warnings`; it does not fail the command"
10
+ },
11
+ "store": {
12
+ "type": "string",
13
+ "description": "Where it was written: a folder, `s3://…` or a server URL"
14
+ },
15
+ "layer": {
16
+ "type": "object",
17
+ "properties": {
18
+ "id": {
19
+ "type": "string",
20
+ "description": "The layer id: 64 hex digits, the SHA-256 of its content. Publishing the same input again gives the same id"
21
+ },
22
+ "kind": {
23
+ "type": "string",
24
+ "enum": [
25
+ "ui-state",
26
+ "ui-plan"
27
+ ],
28
+ "description": "`ui-state`: captures (`publish`). `ui-plan`: the expected set (`plan`)"
29
+ },
30
+ "producer": {
31
+ "type": "string"
32
+ },
33
+ "environment": {
34
+ "type": [
35
+ "string",
36
+ "null"
37
+ ]
38
+ },
39
+ "parameters": {
40
+ "type": "object",
41
+ "propertyNames": {
42
+ "type": "string"
43
+ },
44
+ "additionalProperties": {
45
+ "type": "string"
46
+ },
47
+ "description": "The rest of the profile, such as `{ \"viewport\": \"390x844\" }`"
48
+ },
49
+ "states": {
50
+ "type": "integer",
51
+ "minimum": 0,
52
+ "maximum": 9007199254740991,
53
+ "description": "States in the layer"
54
+ },
55
+ "captured": {
56
+ "type": "integer",
57
+ "minimum": 0,
58
+ "maximum": 9007199254740991,
59
+ "description": "For `publish`: states that were captured (`passed`). Zero for a plan"
60
+ },
61
+ "failed": {
62
+ "type": "integer",
63
+ "minimum": 0,
64
+ "maximum": 9007199254740991,
65
+ "description": "For `publish`: states recorded as failed, including those whose picture could not be read"
66
+ },
67
+ "pictures": {
68
+ "type": "integer",
69
+ "minimum": 0,
70
+ "maximum": 9007199254740991,
71
+ "description": "Pictures stored in the layer"
72
+ },
73
+ "pictureBytes": {
74
+ "type": "integer",
75
+ "minimum": 0,
76
+ "maximum": 9007199254740991
77
+ },
78
+ "shard": {
79
+ "description": "The `--shard` label, which describes the layer and never splits its slot",
80
+ "type": [
81
+ "string",
82
+ "null"
83
+ ]
84
+ }
85
+ },
86
+ "required": [
87
+ "id",
88
+ "kind",
89
+ "producer",
90
+ "environment",
91
+ "parameters",
92
+ "states",
93
+ "captured",
94
+ "failed",
95
+ "pictures",
96
+ "pictureBytes",
97
+ "shard"
98
+ ],
99
+ "additionalProperties": {}
100
+ },
101
+ "warnings": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string"
105
+ },
106
+ "description": "What was skipped and why, such as a picture file that could not be read. Never fatal"
107
+ }
108
+ },
109
+ "required": [
110
+ "ok",
111
+ "store",
112
+ "layer",
113
+ "warnings"
114
+ ],
115
+ "additionalProperties": {}
116
+ }
@@ -0,0 +1,197 @@
1
+ {
2
+ "$id": "https://github.com/crvouga/atlas/schemas/ui-catalog-status.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "ok": {
7
+ "type": "boolean",
8
+ "description": "True only when the catalog holds a state and has no problem: nothing failed, nothing expected is missing, nothing is still being captured, and every backend and layer was read (otherwise the exit code is 1). Skipped cells are counted, not problems"
9
+ },
10
+ "summary": {
11
+ "type": "object",
12
+ "properties": {
13
+ "states": {
14
+ "type": "integer",
15
+ "minimum": 0,
16
+ "maximum": 9007199254740991
17
+ },
18
+ "profiles": {
19
+ "type": "integer",
20
+ "minimum": 0,
21
+ "maximum": 9007199254740991
22
+ },
23
+ "cells": {
24
+ "type": "integer",
25
+ "minimum": 0,
26
+ "maximum": 9007199254740991,
27
+ "description": "States counted once per profile"
28
+ },
29
+ "coverage": {
30
+ "type": "object",
31
+ "propertyNames": {
32
+ "type": "string",
33
+ "enum": [
34
+ "captured",
35
+ "failed",
36
+ "capturing",
37
+ "skipped",
38
+ "missing"
39
+ ]
40
+ },
41
+ "additionalProperties": {
42
+ "type": "integer",
43
+ "minimum": 0,
44
+ "maximum": 9007199254740991
45
+ },
46
+ "required": [
47
+ "captured",
48
+ "failed",
49
+ "capturing",
50
+ "skipped",
51
+ "missing"
52
+ ],
53
+ "description": "Cells by coverage"
54
+ },
55
+ "undeclared": {
56
+ "type": "integer",
57
+ "minimum": 0,
58
+ "maximum": 9007199254740991,
59
+ "description": "Captured cells no plan expects; zero when no plan exists"
60
+ },
61
+ "planned": {
62
+ "type": "boolean",
63
+ "description": "Whether any plan was published. Without one, `missing` is always zero because what should exist is unknown"
64
+ },
65
+ "surfaces": {
66
+ "type": "integer",
67
+ "minimum": 0,
68
+ "maximum": 9007199254740991
69
+ },
70
+ "uncoveredSurfaces": {
71
+ "type": "integer",
72
+ "minimum": 0,
73
+ "maximum": 9007199254740991
74
+ }
75
+ },
76
+ "required": [
77
+ "states",
78
+ "profiles",
79
+ "cells",
80
+ "coverage",
81
+ "undeclared",
82
+ "planned",
83
+ "surfaces",
84
+ "uncoveredSurfaces"
85
+ ],
86
+ "additionalProperties": {}
87
+ },
88
+ "profiles": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "properties": {
93
+ "key": {
94
+ "type": "string"
95
+ },
96
+ "label": {
97
+ "type": "string"
98
+ }
99
+ },
100
+ "required": [
101
+ "key",
102
+ "label"
103
+ ],
104
+ "additionalProperties": {}
105
+ }
106
+ },
107
+ "problems": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "object",
111
+ "properties": {
112
+ "kind": {
113
+ "type": "string",
114
+ "enum": [
115
+ "failed",
116
+ "missing",
117
+ "capturing",
118
+ "unavailable",
119
+ "unreadable",
120
+ "empty"
121
+ ],
122
+ "description": "`failed`: a capture was attempted and failed. `missing`: a plan expects it and nothing was captured. `capturing`: still being taken, so not known. `unavailable`: a backend could not be read. `unreadable`: a layer could not be read. `empty`: the catalog holds no state at all"
123
+ },
124
+ "state": {
125
+ "description": "The state id, for `failed`, `missing` and `capturing`",
126
+ "type": "string"
127
+ },
128
+ "profile": {
129
+ "description": "The profile label, for `failed`, `missing` and `capturing`",
130
+ "type": "string"
131
+ },
132
+ "detail": {
133
+ "description": "Why, when the producer said",
134
+ "type": "string"
135
+ }
136
+ },
137
+ "required": [
138
+ "kind"
139
+ ],
140
+ "additionalProperties": {}
141
+ }
142
+ },
143
+ "sources": {
144
+ "type": "object",
145
+ "properties": {
146
+ "layers": {
147
+ "type": "integer",
148
+ "minimum": 0,
149
+ "maximum": 9007199254740991
150
+ },
151
+ "backends": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "object",
155
+ "properties": {
156
+ "id": {
157
+ "type": "string"
158
+ },
159
+ "label": {
160
+ "type": "string"
161
+ },
162
+ "available": {
163
+ "type": "boolean"
164
+ }
165
+ },
166
+ "required": [
167
+ "id",
168
+ "label",
169
+ "available"
170
+ ],
171
+ "additionalProperties": {}
172
+ }
173
+ },
174
+ "notices": {
175
+ "type": "array",
176
+ "items": {
177
+ "type": "string"
178
+ }
179
+ }
180
+ },
181
+ "required": [
182
+ "layers",
183
+ "backends",
184
+ "notices"
185
+ ],
186
+ "additionalProperties": {}
187
+ }
188
+ },
189
+ "required": [
190
+ "ok",
191
+ "summary",
192
+ "profiles",
193
+ "problems",
194
+ "sources"
195
+ ],
196
+ "additionalProperties": {}
197
+ }