@kumwe/studio-protocol 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +8 -2
- package/dist/guards.d.ts +4 -1
- package/dist/guards.d.ts.map +1 -1
- package/dist/guards.js +108 -22
- package/dist/guards.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +10 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +30 -0
- package/dist/schemas.js.map +1 -1
- package/dist/types.d.ts +81 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/schemas/canonical-vector.schema.json +65 -0
- package/schemas/corpus-manifest.schema.json +48 -0
- package/schemas/field-adapter.schema.json +51 -0
- package/schemas/host-capabilities.schema.json +3 -2
- package/schemas/host-operations.schema.json +162 -0
- package/schemas/host-request.schema.json +71 -0
- package/schemas/host-result.schema.json +19 -0
- package/schemas/host-sequence-vector.schema.json +342 -0
- package/schemas/host-vector.schema.json +197 -0
- package/schemas/inspector.schema.json +44 -0
- package/schemas/manifest.json +63 -3
- package/schemas/media-upload-grant.schema.json +48 -0
- package/schemas/preview-message.schema.json +419 -62
- package/schemas/preview-vector.schema.json +52 -0
- package/schemas/schema-profile-vector.schema.json +133 -0
- package/schemas/schema-profile.schema.json +47 -7
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/schema-profile-vector.schema.json",
|
|
4
|
+
"title": "Studio property-schema profile conformance vector",
|
|
5
|
+
"description": "One portable admission or instance-validation assertion for studio.profile/schema-property. Rejection vectors deliberately carry schemas outside the profile, so the schema member is bounded JSON rather than a reference to the profile meta-schema.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "kind", "id", "description", "profile", "schema", "expect"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
11
|
+
"kind": { "const": "schema-profile-vector" },
|
|
12
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
13
|
+
"description": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"maxLength": 500
|
|
17
|
+
},
|
|
18
|
+
"profile": { "const": "studio.profile/schema-property" },
|
|
19
|
+
"boundary": { "$ref": "#/$defs/limitBoundary" },
|
|
20
|
+
"schema": {
|
|
21
|
+
"description": "The candidate schema. This is intentionally unconstrained so invalid-root and unsafe-member vectors remain expressible; the vector file itself remains bounded by the corpus size policy. Values JSON cannot represent are covered by implementation tests."
|
|
22
|
+
},
|
|
23
|
+
"expect": {
|
|
24
|
+
"oneOf": [
|
|
25
|
+
{
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["outcome", "instances"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"outcome": { "const": "accepted" },
|
|
31
|
+
"instances": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"minItems": 1,
|
|
34
|
+
"maxItems": 50,
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["value", "valid"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"value": { "$ref": "common.schema.json#/$defs/jsonValue" },
|
|
41
|
+
"valid": { "type": "boolean" },
|
|
42
|
+
"diagnostic": { "$ref": "#/$defs/instanceDiagnostic" }
|
|
43
|
+
},
|
|
44
|
+
"allOf": [
|
|
45
|
+
{
|
|
46
|
+
"if": { "properties": { "valid": { "const": true } } },
|
|
47
|
+
"then": { "properties": { "diagnostic": false } },
|
|
48
|
+
"else": {
|
|
49
|
+
"required": ["diagnostic"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"diagnostic": { "$ref": "#/$defs/instanceDiagnostic" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["outcome", "code", "schemaPath"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"outcome": { "const": "rejected" },
|
|
66
|
+
"code": {
|
|
67
|
+
"enum": [
|
|
68
|
+
"invalid-root",
|
|
69
|
+
"unsupported-keyword",
|
|
70
|
+
"invalid-keyword-value",
|
|
71
|
+
"unsafe-member",
|
|
72
|
+
"limit-exceeded",
|
|
73
|
+
"invalid-reference",
|
|
74
|
+
"recursive-schema"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"schemaPath": { "$ref": "#/$defs/jsonPointer" }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"$defs": {
|
|
84
|
+
"limitBoundary": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": ["limit", "position", "value"],
|
|
88
|
+
"properties": {
|
|
89
|
+
"limit": {
|
|
90
|
+
"enum": [
|
|
91
|
+
"maxAlternatives",
|
|
92
|
+
"maxDescriptionLength",
|
|
93
|
+
"maxEnumMembers",
|
|
94
|
+
"maxExamples",
|
|
95
|
+
"maxJsonDepth",
|
|
96
|
+
"maxJsonItems",
|
|
97
|
+
"maxJsonProperties",
|
|
98
|
+
"maxObjectKeyLength",
|
|
99
|
+
"maxPropertyNames",
|
|
100
|
+
"maxReferenceLength",
|
|
101
|
+
"maxReferences",
|
|
102
|
+
"maxSchemaBytes",
|
|
103
|
+
"maxSchemaDepth",
|
|
104
|
+
"maxSchemaMapProperties",
|
|
105
|
+
"maxSchemaNodes",
|
|
106
|
+
"maxTitleLength"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"position": { "enum": ["at-limit", "over-limit"] },
|
|
110
|
+
"value": { "type": "integer", "minimum": 1 }
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"instanceDiagnostic": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["instancePath", "keyword"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"instancePath": { "$ref": "#/$defs/jsonPointer" },
|
|
119
|
+
"keyword": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"minLength": 1,
|
|
122
|
+
"maxLength": 100,
|
|
123
|
+
"pattern": "^[A-Za-z$][A-Za-z0-9$]*(?![\\s\\S])"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"jsonPointer": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"maxLength": 1000,
|
|
130
|
+
"pattern": "^(?:/(?:[^~\\u0000-\\u001F\\u007F]|~[01])*)*(?![\\s\\S])"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://schemas.kumwe.org/studio/v1/schema-profile.schema.json",
|
|
4
4
|
"title": "Studio Schema Profile meta-schema",
|
|
5
|
-
"
|
|
5
|
+
"allOf": [
|
|
6
|
+
{ "$ref": "#/$defs/schema" },
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
|
|
10
|
+
"required": ["type", "additionalProperties"],
|
|
11
|
+
"properties": {
|
|
12
|
+
"type": { "const": "object" },
|
|
13
|
+
"additionalProperties": { "const": false }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
],
|
|
6
17
|
"$defs": {
|
|
7
18
|
"schema": {
|
|
8
19
|
"type": "object",
|
|
@@ -53,14 +64,14 @@
|
|
|
53
64
|
"$ref": {
|
|
54
65
|
"type": "string",
|
|
55
66
|
"maxLength": 500,
|
|
56
|
-
"pattern": "^#(?:/[
|
|
67
|
+
"pattern": "^#(?:/(?:[A-Za-z0-9._!$&'()*+,;=:@-]|~[01])*)*(?![\\s\\S])"
|
|
57
68
|
},
|
|
58
69
|
"$schema": { "const": "https://json-schema.org/draft/2020-12/schema" },
|
|
59
70
|
"additionalProperties": { "$ref": "#/$defs/subschema" },
|
|
60
71
|
"allOf": { "$ref": "#/$defs/schemaArray" },
|
|
61
72
|
"anyOf": { "$ref": "#/$defs/schemaArray" },
|
|
62
|
-
"const": { "$ref": "
|
|
63
|
-
"default": { "$ref": "
|
|
73
|
+
"const": { "$ref": "#/$defs/jsonValue" },
|
|
74
|
+
"default": { "$ref": "#/$defs/jsonValue" },
|
|
64
75
|
"dependentRequired": {
|
|
65
76
|
"type": "object",
|
|
66
77
|
"maxProperties": 512,
|
|
@@ -68,6 +79,7 @@
|
|
|
68
79
|
"additionalProperties": {
|
|
69
80
|
"type": "array",
|
|
70
81
|
"maxItems": 512,
|
|
82
|
+
"uniqueItems": true,
|
|
71
83
|
"items": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" }
|
|
72
84
|
}
|
|
73
85
|
},
|
|
@@ -75,13 +87,15 @@
|
|
|
75
87
|
"else": { "$ref": "#/$defs/subschema" },
|
|
76
88
|
"enum": {
|
|
77
89
|
"type": "array",
|
|
90
|
+
"minItems": 1,
|
|
78
91
|
"maxItems": 1024,
|
|
79
|
-
"
|
|
92
|
+
"uniqueItems": true,
|
|
93
|
+
"items": { "$ref": "#/$defs/jsonValue" }
|
|
80
94
|
},
|
|
81
95
|
"examples": {
|
|
82
96
|
"type": "array",
|
|
83
97
|
"maxItems": 100,
|
|
84
|
-
"items": { "$ref": "
|
|
98
|
+
"items": { "$ref": "#/$defs/jsonValue" }
|
|
85
99
|
},
|
|
86
100
|
"exclusiveMaximum": { "type": "number" },
|
|
87
101
|
"exclusiveMinimum": { "type": "number" },
|
|
@@ -105,6 +119,7 @@
|
|
|
105
119
|
"required": {
|
|
106
120
|
"type": "array",
|
|
107
121
|
"maxItems": 512,
|
|
122
|
+
"uniqueItems": true,
|
|
108
123
|
"items": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" }
|
|
109
124
|
},
|
|
110
125
|
"then": { "$ref": "#/$defs/subschema" },
|
|
@@ -127,6 +142,7 @@
|
|
|
127
142
|
},
|
|
128
143
|
"schemaArray": {
|
|
129
144
|
"type": "array",
|
|
145
|
+
"minItems": 1,
|
|
130
146
|
"maxItems": 64,
|
|
131
147
|
"items": { "$ref": "#/$defs/subschema" }
|
|
132
148
|
},
|
|
@@ -136,6 +152,25 @@
|
|
|
136
152
|
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
|
|
137
153
|
"additionalProperties": { "$ref": "#/$defs/schema" }
|
|
138
154
|
},
|
|
155
|
+
"jsonValue": {
|
|
156
|
+
"oneOf": [
|
|
157
|
+
{ "type": "null" },
|
|
158
|
+
{ "type": "boolean" },
|
|
159
|
+
{ "type": "number" },
|
|
160
|
+
{ "type": "string" },
|
|
161
|
+
{
|
|
162
|
+
"type": "array",
|
|
163
|
+
"maxItems": 10000,
|
|
164
|
+
"items": { "$ref": "#/$defs/jsonValue" }
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "object",
|
|
168
|
+
"maxProperties": 1000,
|
|
169
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
|
|
170
|
+
"additionalProperties": { "$ref": "#/$defs/jsonValue" }
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
139
174
|
"subschema": {
|
|
140
175
|
"oneOf": [{ "type": "boolean" }, { "$ref": "#/$defs/schema" }]
|
|
141
176
|
},
|
|
@@ -145,16 +180,21 @@
|
|
|
145
180
|
"limits": {
|
|
146
181
|
"const": {
|
|
147
182
|
"maxAlternatives": 64,
|
|
183
|
+
"maxDescriptionLength": 10000,
|
|
148
184
|
"maxEnumMembers": 1024,
|
|
185
|
+
"maxExamples": 100,
|
|
149
186
|
"maxJsonDepth": 64,
|
|
150
187
|
"maxJsonItems": 10000,
|
|
151
188
|
"maxJsonProperties": 1000,
|
|
152
189
|
"maxObjectKeyLength": 200,
|
|
190
|
+
"maxPropertyNames": 512,
|
|
191
|
+
"maxReferenceLength": 500,
|
|
153
192
|
"maxReferences": 128,
|
|
154
193
|
"maxSchemaBytes": 262144,
|
|
155
194
|
"maxSchemaDepth": 32,
|
|
156
195
|
"maxSchemaMapProperties": 512,
|
|
157
|
-
"maxSchemaNodes": 1024
|
|
196
|
+
"maxSchemaNodes": 1024,
|
|
197
|
+
"maxTitleLength": 1000
|
|
158
198
|
}
|
|
159
199
|
}
|
|
160
200
|
}
|