@nexural/schema 0.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.
@@ -0,0 +1,128 @@
1
+ {
2
+ "$ref": "#/definitions/scorecard-report",
3
+ "definitions": {
4
+ "scorecard-report": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 1
10
+ },
11
+ "generated_at": {
12
+ "type": "string",
13
+ "format": "date-time"
14
+ },
15
+ "warehouses": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "name": {
21
+ "type": "string",
22
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
23
+ },
24
+ "federation": {
25
+ "type": "string",
26
+ "enum": [
27
+ "factory",
28
+ "lifeops"
29
+ ]
30
+ },
31
+ "score": {
32
+ "type": "integer",
33
+ "minimum": 0,
34
+ "maximum": 100
35
+ },
36
+ "grade": {
37
+ "type": "string",
38
+ "enum": [
39
+ "S",
40
+ "A",
41
+ "B",
42
+ "C",
43
+ "D",
44
+ "F"
45
+ ]
46
+ },
47
+ "findings": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "object",
51
+ "properties": {
52
+ "category": {
53
+ "type": "string",
54
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
55
+ },
56
+ "severity": {
57
+ "type": "string",
58
+ "enum": [
59
+ "info",
60
+ "warn",
61
+ "error",
62
+ "critical"
63
+ ]
64
+ },
65
+ "message": {
66
+ "type": "string"
67
+ },
68
+ "file": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "required": [
73
+ "category",
74
+ "severity",
75
+ "message"
76
+ ],
77
+ "additionalProperties": false
78
+ }
79
+ }
80
+ },
81
+ "required": [
82
+ "name",
83
+ "federation",
84
+ "score",
85
+ "grade",
86
+ "findings"
87
+ ],
88
+ "additionalProperties": false
89
+ }
90
+ },
91
+ "aggregate": {
92
+ "type": "object",
93
+ "properties": {
94
+ "mean_score": {
95
+ "type": "number"
96
+ },
97
+ "median_score": {
98
+ "type": "number"
99
+ },
100
+ "below_80_count": {
101
+ "type": "integer",
102
+ "minimum": 0
103
+ },
104
+ "below_90_count": {
105
+ "type": "integer",
106
+ "minimum": 0
107
+ }
108
+ },
109
+ "required": [
110
+ "mean_score",
111
+ "median_score",
112
+ "below_80_count",
113
+ "below_90_count"
114
+ ],
115
+ "additionalProperties": false
116
+ }
117
+ },
118
+ "required": [
119
+ "schema_version",
120
+ "generated_at",
121
+ "warehouses",
122
+ "aggregate"
123
+ ],
124
+ "additionalProperties": false
125
+ }
126
+ },
127
+ "$schema": "http://json-schema.org/draft-07/schema#"
128
+ }
@@ -0,0 +1,165 @@
1
+ {
2
+ "$ref": "#/definitions/service-declaration",
3
+ "definitions": {
4
+ "service-declaration": {
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "id": {
10
+ "type": "string",
11
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
12
+ },
13
+ "runtime": {
14
+ "type": "string",
15
+ "const": "nextjs"
16
+ },
17
+ "language": {
18
+ "type": "string",
19
+ "const": "typescript"
20
+ },
21
+ "host": {
22
+ "type": "string",
23
+ "enum": [
24
+ "vercel",
25
+ "cloudflare-pages"
26
+ ]
27
+ }
28
+ },
29
+ "required": [
30
+ "id",
31
+ "runtime",
32
+ "language",
33
+ "host"
34
+ ],
35
+ "additionalProperties": false
36
+ },
37
+ {
38
+ "type": "object",
39
+ "properties": {
40
+ "id": {
41
+ "type": "string",
42
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
43
+ },
44
+ "runtime": {
45
+ "type": "string",
46
+ "const": "modal"
47
+ },
48
+ "language": {
49
+ "type": "string",
50
+ "const": "python"
51
+ },
52
+ "python_version": {
53
+ "type": "string",
54
+ "enum": [
55
+ "3.11",
56
+ "3.12"
57
+ ]
58
+ },
59
+ "deps": {
60
+ "type": "string"
61
+ },
62
+ "host": {
63
+ "type": "string",
64
+ "const": "modal"
65
+ },
66
+ "contract": {
67
+ "type": "string"
68
+ },
69
+ "gpu": {
70
+ "type": "string",
71
+ "enum": [
72
+ "none",
73
+ "t4",
74
+ "a10g",
75
+ "a100"
76
+ ],
77
+ "default": "none"
78
+ }
79
+ },
80
+ "required": [
81
+ "id",
82
+ "runtime",
83
+ "language",
84
+ "python_version",
85
+ "deps",
86
+ "host",
87
+ "contract"
88
+ ],
89
+ "additionalProperties": false
90
+ },
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "id": {
95
+ "type": "string",
96
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
97
+ },
98
+ "runtime": {
99
+ "type": "string",
100
+ "const": "railway"
101
+ },
102
+ "language": {
103
+ "type": "string",
104
+ "enum": [
105
+ "python",
106
+ "node"
107
+ ]
108
+ },
109
+ "deps": {
110
+ "type": "string"
111
+ },
112
+ "host": {
113
+ "type": "string",
114
+ "const": "railway"
115
+ },
116
+ "contract": {
117
+ "type": "string"
118
+ }
119
+ },
120
+ "required": [
121
+ "id",
122
+ "runtime",
123
+ "language",
124
+ "deps",
125
+ "host",
126
+ "contract"
127
+ ],
128
+ "additionalProperties": false
129
+ },
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "id": {
134
+ "type": "string",
135
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
136
+ },
137
+ "runtime": {
138
+ "type": "string",
139
+ "const": "cloudflare-worker"
140
+ },
141
+ "language": {
142
+ "type": "string",
143
+ "const": "typescript"
144
+ },
145
+ "host": {
146
+ "type": "string",
147
+ "const": "cloudflare"
148
+ },
149
+ "contract": {
150
+ "type": "string"
151
+ }
152
+ },
153
+ "required": [
154
+ "id",
155
+ "runtime",
156
+ "language",
157
+ "host"
158
+ ],
159
+ "additionalProperties": false
160
+ }
161
+ ]
162
+ }
163
+ },
164
+ "$schema": "http://json-schema.org/draft-07/schema#"
165
+ }
@@ -0,0 +1,379 @@
1
+ {
2
+ "$ref": "#/definitions/telemetry-event",
3
+ "definitions": {
4
+ "telemetry-event": {
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "schema_version": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "event_id": {
14
+ "type": "string",
15
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
16
+ },
17
+ "ts": {
18
+ "type": "string",
19
+ "format": "date-time"
20
+ },
21
+ "host": {
22
+ "type": "string"
23
+ },
24
+ "process": {
25
+ "type": "string",
26
+ "enum": [
27
+ "nx",
28
+ "router",
29
+ "warehouse-mcp",
30
+ "ci",
31
+ "cron"
32
+ ]
33
+ },
34
+ "session_id": {
35
+ "type": "string",
36
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
37
+ },
38
+ "kind": {
39
+ "type": "string",
40
+ "const": "tool_call"
41
+ },
42
+ "warehouse": {
43
+ "type": "string",
44
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
45
+ },
46
+ "tool": {
47
+ "type": "string",
48
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
49
+ },
50
+ "latency_ms": {
51
+ "type": "integer",
52
+ "minimum": 0
53
+ },
54
+ "ok": {
55
+ "type": "boolean"
56
+ },
57
+ "error_code": {
58
+ "type": "string"
59
+ }
60
+ },
61
+ "required": [
62
+ "schema_version",
63
+ "event_id",
64
+ "ts",
65
+ "host",
66
+ "process",
67
+ "kind",
68
+ "warehouse",
69
+ "tool",
70
+ "latency_ms",
71
+ "ok"
72
+ ],
73
+ "additionalProperties": false
74
+ },
75
+ {
76
+ "type": "object",
77
+ "properties": {
78
+ "schema_version": {
79
+ "type": "number",
80
+ "const": 1
81
+ },
82
+ "event_id": {
83
+ "type": "string",
84
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
85
+ },
86
+ "ts": {
87
+ "type": "string",
88
+ "format": "date-time"
89
+ },
90
+ "host": {
91
+ "type": "string"
92
+ },
93
+ "process": {
94
+ "type": "string",
95
+ "enum": [
96
+ "nx",
97
+ "router",
98
+ "warehouse-mcp",
99
+ "ci",
100
+ "cron"
101
+ ]
102
+ },
103
+ "session_id": {
104
+ "type": "string",
105
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
106
+ },
107
+ "kind": {
108
+ "type": "string",
109
+ "const": "nx_command"
110
+ },
111
+ "command": {
112
+ "type": "string",
113
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
114
+ },
115
+ "args_hash": {
116
+ "type": "string",
117
+ "pattern": "^[a-f0-9]{64}$"
118
+ },
119
+ "latency_ms": {
120
+ "type": "integer",
121
+ "minimum": 0
122
+ },
123
+ "exit_code": {
124
+ "type": "integer"
125
+ }
126
+ },
127
+ "required": [
128
+ "schema_version",
129
+ "event_id",
130
+ "ts",
131
+ "host",
132
+ "process",
133
+ "kind",
134
+ "command",
135
+ "args_hash",
136
+ "latency_ms",
137
+ "exit_code"
138
+ ],
139
+ "additionalProperties": false
140
+ },
141
+ {
142
+ "type": "object",
143
+ "properties": {
144
+ "schema_version": {
145
+ "type": "number",
146
+ "const": 1
147
+ },
148
+ "event_id": {
149
+ "type": "string",
150
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
151
+ },
152
+ "ts": {
153
+ "type": "string",
154
+ "format": "date-time"
155
+ },
156
+ "host": {
157
+ "type": "string"
158
+ },
159
+ "process": {
160
+ "type": "string",
161
+ "enum": [
162
+ "nx",
163
+ "router",
164
+ "warehouse-mcp",
165
+ "ci",
166
+ "cron"
167
+ ]
168
+ },
169
+ "session_id": {
170
+ "type": "string",
171
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
172
+ },
173
+ "kind": {
174
+ "type": "string",
175
+ "const": "decay_warn"
176
+ },
177
+ "warehouse": {
178
+ "type": "string",
179
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
180
+ },
181
+ "days_since_review": {
182
+ "type": "integer",
183
+ "minimum": 0
184
+ },
185
+ "decay_rate_days": {
186
+ "type": "integer",
187
+ "exclusiveMinimum": 0,
188
+ "maximum": 3650
189
+ },
190
+ "severity": {
191
+ "type": "string",
192
+ "enum": [
193
+ "warn",
194
+ "quarantine"
195
+ ]
196
+ }
197
+ },
198
+ "required": [
199
+ "schema_version",
200
+ "event_id",
201
+ "ts",
202
+ "host",
203
+ "process",
204
+ "kind",
205
+ "warehouse",
206
+ "days_since_review",
207
+ "decay_rate_days",
208
+ "severity"
209
+ ],
210
+ "additionalProperties": false
211
+ },
212
+ {
213
+ "type": "object",
214
+ "properties": {
215
+ "schema_version": {
216
+ "type": "number",
217
+ "const": 1
218
+ },
219
+ "event_id": {
220
+ "type": "string",
221
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
222
+ },
223
+ "ts": {
224
+ "type": "string",
225
+ "format": "date-time"
226
+ },
227
+ "host": {
228
+ "type": "string"
229
+ },
230
+ "process": {
231
+ "type": "string",
232
+ "enum": [
233
+ "nx",
234
+ "router",
235
+ "warehouse-mcp",
236
+ "ci",
237
+ "cron"
238
+ ]
239
+ },
240
+ "session_id": {
241
+ "type": "string",
242
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
243
+ },
244
+ "kind": {
245
+ "type": "string",
246
+ "const": "audit"
247
+ },
248
+ "op": {
249
+ "type": "string",
250
+ "enum": [
251
+ "decrypt",
252
+ "encrypt",
253
+ "key_rotate",
254
+ "key_lost",
255
+ "key_added"
256
+ ]
257
+ },
258
+ "warehouse": {
259
+ "type": "string",
260
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
261
+ },
262
+ "file_ulid": {
263
+ "type": "string",
264
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
265
+ },
266
+ "key_id": {
267
+ "type": "string"
268
+ },
269
+ "exit": {
270
+ "type": "integer"
271
+ }
272
+ },
273
+ "required": [
274
+ "schema_version",
275
+ "event_id",
276
+ "ts",
277
+ "host",
278
+ "process",
279
+ "kind",
280
+ "op",
281
+ "key_id",
282
+ "exit"
283
+ ],
284
+ "additionalProperties": false
285
+ },
286
+ {
287
+ "type": "object",
288
+ "properties": {
289
+ "schema_version": {
290
+ "type": "number",
291
+ "const": 1
292
+ },
293
+ "event_id": {
294
+ "type": "string",
295
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
296
+ },
297
+ "ts": {
298
+ "type": "string",
299
+ "format": "date-time"
300
+ },
301
+ "host": {
302
+ "type": "string"
303
+ },
304
+ "process": {
305
+ "type": "string",
306
+ "enum": [
307
+ "nx",
308
+ "router",
309
+ "warehouse-mcp",
310
+ "ci",
311
+ "cron"
312
+ ]
313
+ },
314
+ "session_id": {
315
+ "type": "string",
316
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
317
+ },
318
+ "kind": {
319
+ "type": "string",
320
+ "const": "cost_event"
321
+ },
322
+ "app": {
323
+ "type": "string",
324
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
325
+ },
326
+ "recipe": {
327
+ "type": "string",
328
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
329
+ },
330
+ "severity": {
331
+ "type": "string",
332
+ "enum": [
333
+ "warn",
334
+ "exceeded",
335
+ "circuit_break"
336
+ ]
337
+ },
338
+ "scope": {
339
+ "type": "string",
340
+ "enum": [
341
+ "per_request",
342
+ "per_user_day",
343
+ "per_app_day"
344
+ ]
345
+ },
346
+ "projected_usd": {
347
+ "type": "number",
348
+ "minimum": 0
349
+ },
350
+ "cap_usd": {
351
+ "type": "number",
352
+ "exclusiveMinimum": 0
353
+ },
354
+ "user_hash": {
355
+ "type": "string",
356
+ "pattern": "^[a-f0-9]{64}$"
357
+ }
358
+ },
359
+ "required": [
360
+ "schema_version",
361
+ "event_id",
362
+ "ts",
363
+ "host",
364
+ "process",
365
+ "kind",
366
+ "app",
367
+ "recipe",
368
+ "severity",
369
+ "scope",
370
+ "projected_usd",
371
+ "cap_usd"
372
+ ],
373
+ "additionalProperties": false
374
+ }
375
+ ]
376
+ }
377
+ },
378
+ "$schema": "http://json-schema.org/draft-07/schema#"
379
+ }