@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.
- package/CHANGELOG.md +15 -0
- package/README.md +52 -0
- package/dist/index.d.ts +2839 -0
- package/dist/index.js +555 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema/adr-frontmatter.json +61 -0
- package/dist/json-schema/content-frontmatter.json +166 -0
- package/dist/json-schema/cost-envelope.json +53 -0
- package/dist/json-schema/cross-ref-report.json +110 -0
- package/dist/json-schema/decay-config.json +72 -0
- package/dist/json-schema/external-mcp-endpoint.json +102 -0
- package/dist/json-schema/external-mcp-registry.json +119 -0
- package/dist/json-schema/forged-lockfile.json +107 -0
- package/dist/json-schema/mcp-tool-request.json +66 -0
- package/dist/json-schema/mcp-tool-response.json +131 -0
- package/dist/json-schema/model-family-registry.json +111 -0
- package/dist/json-schema/model-family-resolution.json +89 -0
- package/dist/json-schema/recipe-manifest.json +389 -0
- package/dist/json-schema/registry.json +95 -0
- package/dist/json-schema/revoked-recipe-entry.json +43 -0
- package/dist/json-schema/revoked-recipes-list.json +65 -0
- package/dist/json-schema/scorecard-report.json +128 -0
- package/dist/json-schema/service-declaration.json +165 -0
- package/dist/json-schema/telemetry-event.json +379 -0
- package/dist/json-schema/warehouse-index.json +131 -0
- package/dist/json-schema/warehouse-meta.json +260 -0
- package/package.json +46 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/forged-lockfile",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"forged-lockfile": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema_version": {
|
|
8
|
+
"type": "number",
|
|
9
|
+
"const": 1
|
|
10
|
+
},
|
|
11
|
+
"forged_at": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"format": "date-time"
|
|
14
|
+
},
|
|
15
|
+
"forged_by_nx_version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
18
|
+
},
|
|
19
|
+
"recipe": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"name": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
29
|
+
},
|
|
30
|
+
"sha": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^[a-f0-9]{7,64}$"
|
|
33
|
+
},
|
|
34
|
+
"signature": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"provenance": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "uri"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": [
|
|
44
|
+
"name",
|
|
45
|
+
"version",
|
|
46
|
+
"sha",
|
|
47
|
+
"signature",
|
|
48
|
+
"provenance"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
},
|
|
52
|
+
"warehouses_consumed": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"name": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
60
|
+
},
|
|
61
|
+
"sha": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"pattern": "^[a-f0-9]{7,64}$"
|
|
64
|
+
},
|
|
65
|
+
"version": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"name",
|
|
72
|
+
"sha"
|
|
73
|
+
],
|
|
74
|
+
"additionalProperties": false
|
|
75
|
+
},
|
|
76
|
+
"minItems": 1
|
|
77
|
+
},
|
|
78
|
+
"inputs": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": {}
|
|
81
|
+
},
|
|
82
|
+
"model_families_used": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
"default": []
|
|
88
|
+
},
|
|
89
|
+
"sbom_hash": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"schema_version",
|
|
96
|
+
"forged_at",
|
|
97
|
+
"forged_by_nx_version",
|
|
98
|
+
"recipe",
|
|
99
|
+
"warehouses_consumed",
|
|
100
|
+
"inputs",
|
|
101
|
+
"sbom_hash"
|
|
102
|
+
],
|
|
103
|
+
"additionalProperties": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
107
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/mcp-tool-request",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"mcp-tool-request": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema_version": {
|
|
8
|
+
"type": "number",
|
|
9
|
+
"const": 1
|
|
10
|
+
},
|
|
11
|
+
"request_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
14
|
+
},
|
|
15
|
+
"caller": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"kind": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": [
|
|
21
|
+
"nx-cli",
|
|
22
|
+
"agent",
|
|
23
|
+
"dashboard",
|
|
24
|
+
"test"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"session_id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
30
|
+
},
|
|
31
|
+
"user": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"kind"
|
|
37
|
+
],
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
},
|
|
40
|
+
"tool": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
43
|
+
},
|
|
44
|
+
"args": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": {}
|
|
47
|
+
},
|
|
48
|
+
"timeout_ms": {
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"exclusiveMinimum": 0,
|
|
51
|
+
"maximum": 30000,
|
|
52
|
+
"default": 5000
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"schema_version",
|
|
57
|
+
"request_id",
|
|
58
|
+
"caller",
|
|
59
|
+
"tool",
|
|
60
|
+
"args"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
66
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/mcp-tool-response",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"mcp-tool-response": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"schema_version": {
|
|
8
|
+
"type": "number",
|
|
9
|
+
"const": 1
|
|
10
|
+
},
|
|
11
|
+
"request_id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
14
|
+
},
|
|
15
|
+
"warehouse": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
18
|
+
},
|
|
19
|
+
"tool": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
22
|
+
},
|
|
23
|
+
"ok": {
|
|
24
|
+
"type": "boolean"
|
|
25
|
+
},
|
|
26
|
+
"latency_ms": {
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 0
|
|
29
|
+
},
|
|
30
|
+
"data": {},
|
|
31
|
+
"error": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"code": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"message": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"retryable": {
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"required": [
|
|
45
|
+
"code",
|
|
46
|
+
"message",
|
|
47
|
+
"retryable"
|
|
48
|
+
],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"warnings": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"code": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": [
|
|
59
|
+
"stale",
|
|
60
|
+
"draft-content",
|
|
61
|
+
"low-confidence",
|
|
62
|
+
"tier-mismatch",
|
|
63
|
+
"deprecated",
|
|
64
|
+
"tier_confinement_violation",
|
|
65
|
+
"citation_stripped",
|
|
66
|
+
"token_budget_trimmed"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"message": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"code",
|
|
75
|
+
"message"
|
|
76
|
+
],
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
},
|
|
79
|
+
"default": []
|
|
80
|
+
},
|
|
81
|
+
"citations": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"warehouse": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
89
|
+
},
|
|
90
|
+
"id": {
|
|
91
|
+
"anyOf": [
|
|
92
|
+
{
|
|
93
|
+
"type": "string",
|
|
94
|
+
"pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"title": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"url": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"format": "uri"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"warehouse",
|
|
112
|
+
"id"
|
|
113
|
+
],
|
|
114
|
+
"additionalProperties": false
|
|
115
|
+
},
|
|
116
|
+
"default": []
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": [
|
|
120
|
+
"schema_version",
|
|
121
|
+
"request_id",
|
|
122
|
+
"warehouse",
|
|
123
|
+
"tool",
|
|
124
|
+
"ok",
|
|
125
|
+
"latency_ms"
|
|
126
|
+
],
|
|
127
|
+
"additionalProperties": false
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
131
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/model-family-registry",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"model-family-registry": {
|
|
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
|
+
"resolutions": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"family": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[a-z0-9-]+:[a-z0-9-]+$"
|
|
23
|
+
},
|
|
24
|
+
"id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1
|
|
27
|
+
},
|
|
28
|
+
"tier": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"flagship",
|
|
32
|
+
"premium",
|
|
33
|
+
"balanced",
|
|
34
|
+
"fast",
|
|
35
|
+
"small"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"context_window": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"exclusiveMinimum": 0
|
|
41
|
+
},
|
|
42
|
+
"pricing": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"input_per_million_tokens_usd": {
|
|
46
|
+
"type": "number",
|
|
47
|
+
"minimum": 0
|
|
48
|
+
},
|
|
49
|
+
"output_per_million_tokens_usd": {
|
|
50
|
+
"type": "number",
|
|
51
|
+
"minimum": 0
|
|
52
|
+
},
|
|
53
|
+
"cached_input_per_million_tokens_usd": {
|
|
54
|
+
"type": "number",
|
|
55
|
+
"minimum": 0
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": [
|
|
59
|
+
"input_per_million_tokens_usd",
|
|
60
|
+
"output_per_million_tokens_usd"
|
|
61
|
+
],
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
},
|
|
64
|
+
"price_ceiling_usd_per_million_tokens": {
|
|
65
|
+
"type": "number",
|
|
66
|
+
"exclusiveMinimum": 0
|
|
67
|
+
},
|
|
68
|
+
"deprecates_at": {
|
|
69
|
+
"anyOf": [
|
|
70
|
+
{
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "null"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"status": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"enum": [
|
|
82
|
+
"current",
|
|
83
|
+
"deprecating",
|
|
84
|
+
"deprecated",
|
|
85
|
+
"preview"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"family",
|
|
91
|
+
"id",
|
|
92
|
+
"tier",
|
|
93
|
+
"context_window",
|
|
94
|
+
"pricing",
|
|
95
|
+
"deprecates_at",
|
|
96
|
+
"status"
|
|
97
|
+
],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": [
|
|
103
|
+
"schema_version",
|
|
104
|
+
"generated_at",
|
|
105
|
+
"resolutions"
|
|
106
|
+
],
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
111
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/model-family-resolution",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"model-family-resolution": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"family": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[a-z0-9-]+:[a-z0-9-]+$"
|
|
10
|
+
},
|
|
11
|
+
"id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1
|
|
14
|
+
},
|
|
15
|
+
"tier": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"flagship",
|
|
19
|
+
"premium",
|
|
20
|
+
"balanced",
|
|
21
|
+
"fast",
|
|
22
|
+
"small"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"context_window": {
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"exclusiveMinimum": 0
|
|
28
|
+
},
|
|
29
|
+
"pricing": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"input_per_million_tokens_usd": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"minimum": 0
|
|
35
|
+
},
|
|
36
|
+
"output_per_million_tokens_usd": {
|
|
37
|
+
"type": "number",
|
|
38
|
+
"minimum": 0
|
|
39
|
+
},
|
|
40
|
+
"cached_input_per_million_tokens_usd": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"minimum": 0
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": [
|
|
46
|
+
"input_per_million_tokens_usd",
|
|
47
|
+
"output_per_million_tokens_usd"
|
|
48
|
+
],
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
},
|
|
51
|
+
"price_ceiling_usd_per_million_tokens": {
|
|
52
|
+
"type": "number",
|
|
53
|
+
"exclusiveMinimum": 0
|
|
54
|
+
},
|
|
55
|
+
"deprecates_at": {
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{
|
|
58
|
+
"type": "string",
|
|
59
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "null"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"status": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"enum": [
|
|
69
|
+
"current",
|
|
70
|
+
"deprecating",
|
|
71
|
+
"deprecated",
|
|
72
|
+
"preview"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"family",
|
|
78
|
+
"id",
|
|
79
|
+
"tier",
|
|
80
|
+
"context_window",
|
|
81
|
+
"pricing",
|
|
82
|
+
"deprecates_at",
|
|
83
|
+
"status"
|
|
84
|
+
],
|
|
85
|
+
"additionalProperties": false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
89
|
+
}
|