@kumwe/studio-protocol 0.1.0-alpha.10
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/LICENSE +21 -0
- package/README.md +77 -0
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/dist/generated/schema-models.d.ts +1968 -0
- package/dist/generated/schema-models.d.ts.map +1 -0
- package/dist/generated/schema-models.js +76 -0
- package/dist/generated/schema-models.js.map +1 -0
- package/dist/guards.d.ts +7 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +374 -0
- package/dist/guards.js.map +1 -0
- package/dist/host-failure.d.ts +16 -0
- package/dist/host-failure.d.ts.map +1 -0
- package/dist/host-failure.js +27 -0
- package/dist/host-failure.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas.d.ts +50 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +144 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.d.ts +1256 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -0
- package/schemas/authoring-message-catalog.schema.json +45 -0
- package/schemas/authoring-web-vector.schema.json +236 -0
- package/schemas/binding-projection-vector.schema.json +127 -0
- package/schemas/block-definition.schema.json +227 -0
- package/schemas/blueprint.schema.json +273 -0
- package/schemas/canonical-vector.schema.json +65 -0
- package/schemas/command-vector.schema.json +68 -0
- package/schemas/command.schema.json +410 -0
- package/schemas/common.schema.json +222 -0
- package/schemas/content-model.schema.json +216 -0
- package/schemas/corpus-manifest.schema.json +48 -0
- package/schemas/design-vocabulary.schema.json +91 -0
- package/schemas/entry.schema.json +32 -0
- package/schemas/field-adapter.schema.json +51 -0
- package/schemas/host-capabilities.schema.json +65 -0
- package/schemas/host-error.schema.json +42 -0
- 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 +199 -0
- package/schemas/inspector.schema.json +44 -0
- package/schemas/manifest.json +246 -0
- package/schemas/media-asset.schema.json +83 -0
- package/schemas/media-reference.schema.json +112 -0
- package/schemas/media-upload-grant.schema.json +48 -0
- package/schemas/media-upload-session.schema.json +109 -0
- package/schemas/media-vector.schema.json +123 -0
- package/schemas/migration.schema.json +41 -0
- package/schemas/pattern.schema.json +50 -0
- package/schemas/plugin-manifest.schema.json +126 -0
- package/schemas/preview-message.schema.json +583 -0
- package/schemas/preview-vector.schema.json +52 -0
- package/schemas/provenance.schema.json +57 -0
- package/schemas/renderer-web-vector.schema.json +160 -0
- package/schemas/rich-text-projection.schema.json +79 -0
- package/schemas/rich-text.schema.json +323 -0
- package/schemas/schema-profile-vector.schema.json +133 -0
- package/schemas/schema-profile.schema.json +201 -0
- package/schemas/studio-chart.schema.json +35 -0
- package/schemas/studio-config.schema.json +244 -0
- package/schemas/studio-drawing.schema.json +44 -0
- package/schemas/studio-money.schema.json +16 -0
- package/schemas/studio-presentation.schema.json +31 -0
- package/schemas/studio-release.schema.json +81 -0
- package/schemas/studio-table.schema.json +27 -0
- package/schemas/theme.schema.json +164 -0
- package/schemas/unresolved-contribution.schema.json +50 -0
- package/studio-release.json +18 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/block-definition.schema.json",
|
|
4
|
+
"title": "Studio block definition",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"type",
|
|
11
|
+
"version",
|
|
12
|
+
"revision",
|
|
13
|
+
"owner",
|
|
14
|
+
"label",
|
|
15
|
+
"category",
|
|
16
|
+
"propertySchema",
|
|
17
|
+
"slots",
|
|
18
|
+
"ports",
|
|
19
|
+
"editingModes",
|
|
20
|
+
"themeControls",
|
|
21
|
+
"rendererRequirements",
|
|
22
|
+
"accessibility"
|
|
23
|
+
],
|
|
24
|
+
"properties": {
|
|
25
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
26
|
+
"kind": { "const": "block-definition" },
|
|
27
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
28
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
29
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
30
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
31
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
32
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
33
|
+
"category": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
34
|
+
"icon": {
|
|
35
|
+
"oneOf": [
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["kind", "value"],
|
|
40
|
+
"properties": {
|
|
41
|
+
"kind": { "const": "symbol" },
|
|
42
|
+
"value": {
|
|
43
|
+
"oneOf": [
|
|
44
|
+
{ "$ref": "common.schema.json#/$defs/localName" },
|
|
45
|
+
{ "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": ["kind", "path", "integrity"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": { "const": "asset" },
|
|
56
|
+
"path": { "$ref": "common.schema.json#/$defs/packageRelativePath" },
|
|
57
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"propertySchema": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"minProperties": 1,
|
|
65
|
+
"maxProperties": 500,
|
|
66
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" }
|
|
67
|
+
},
|
|
68
|
+
"propertyControls": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"maxItems": 500,
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["property", "control"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"property": { "$ref": "common.schema.json#/$defs/localName" },
|
|
77
|
+
"control": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
78
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
79
|
+
"help": { "$ref": "common.schema.json#/$defs/messageReference" }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"slots": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"maxItems": 100,
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["id", "label", "minimum", "maximum", "ordered", "accepts"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"id": { "$ref": "common.schema.json#/$defs/localName" },
|
|
92
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
93
|
+
"minimum": { "type": "integer", "minimum": 0, "maximum": 10000 },
|
|
94
|
+
"maximum": { "type": "integer", "minimum": 0, "maximum": 10000 },
|
|
95
|
+
"ordered": { "type": "boolean" },
|
|
96
|
+
"accepts": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["types"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"types": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"minItems": 1,
|
|
104
|
+
"maxItems": 1000,
|
|
105
|
+
"uniqueItems": true,
|
|
106
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"ports": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"maxItems": 100,
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": ["id", "label", "valueType", "required", "multiple"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"id": { "$ref": "common.schema.json#/$defs/localName" },
|
|
122
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
123
|
+
"valueType": {
|
|
124
|
+
"oneOf": [
|
|
125
|
+
{
|
|
126
|
+
"enum": [
|
|
127
|
+
"text",
|
|
128
|
+
"rich-text",
|
|
129
|
+
"boolean",
|
|
130
|
+
"integer",
|
|
131
|
+
"decimal",
|
|
132
|
+
"money",
|
|
133
|
+
"date",
|
|
134
|
+
"date-time",
|
|
135
|
+
"media",
|
|
136
|
+
"resource"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{ "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"required": { "type": "boolean" },
|
|
143
|
+
"multiple": { "type": "boolean" },
|
|
144
|
+
"authoring": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"properties": {
|
|
148
|
+
"control": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
149
|
+
"profile": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
150
|
+
"readOnly": { "type": "boolean" }
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"editingModes": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"minItems": 1,
|
|
159
|
+
"maxItems": 2,
|
|
160
|
+
"uniqueItems": true,
|
|
161
|
+
"items": { "enum": ["blueprint", "content"] }
|
|
162
|
+
},
|
|
163
|
+
"themeControls": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"maxItems": 100,
|
|
166
|
+
"uniqueItems": true,
|
|
167
|
+
"items": { "$ref": "common.schema.json#/$defs/localName" }
|
|
168
|
+
},
|
|
169
|
+
"rendererRequirements": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"minItems": 1,
|
|
172
|
+
"maxItems": 100,
|
|
173
|
+
"items": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"additionalProperties": false,
|
|
176
|
+
"required": ["surface", "capability", "versions"],
|
|
177
|
+
"properties": {
|
|
178
|
+
"surface": { "enum": ["web", "email", "document", "native", "preview"] },
|
|
179
|
+
"capability": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
180
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"accessibility": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": ["category", "accessibleName", "keyboard", "reducedMotion", "outputChecks"],
|
|
188
|
+
"properties": {
|
|
189
|
+
"category": {
|
|
190
|
+
"enum": [
|
|
191
|
+
"structural",
|
|
192
|
+
"landmark",
|
|
193
|
+
"interactive",
|
|
194
|
+
"media",
|
|
195
|
+
"text",
|
|
196
|
+
"decorative",
|
|
197
|
+
"data-display",
|
|
198
|
+
"composite"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
"accessibleName": {
|
|
202
|
+
"enum": ["not-applicable", "required-property", "required-binding", "derived"]
|
|
203
|
+
},
|
|
204
|
+
"keyboard": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
205
|
+
"reducedMotion": { "enum": ["not-applicable", "required", "disable-motion"] },
|
|
206
|
+
"outputChecks": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"minItems": 1,
|
|
209
|
+
"maxItems": 100,
|
|
210
|
+
"uniqueItems": true,
|
|
211
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"fallback": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"additionalProperties": false,
|
|
218
|
+
"required": ["type", "versions", "lossless"],
|
|
219
|
+
"properties": {
|
|
220
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
221
|
+
"versions": { "$ref": "common.schema.json#/$defs/versionRange" },
|
|
222
|
+
"lossless": { "type": "boolean", "const": true }
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/blueprint.schema.json",
|
|
4
|
+
"title": "Studio Blueprint",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contractVersion",
|
|
9
|
+
"kind",
|
|
10
|
+
"id",
|
|
11
|
+
"version",
|
|
12
|
+
"revision",
|
|
13
|
+
"owner",
|
|
14
|
+
"status",
|
|
15
|
+
"label",
|
|
16
|
+
"model",
|
|
17
|
+
"dependencyLock",
|
|
18
|
+
"roots"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
22
|
+
"kind": { "const": "blueprint" },
|
|
23
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
24
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
25
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
26
|
+
"owner": { "$ref": "common.schema.json#/$defs/ownerReference" },
|
|
27
|
+
"status": { "enum": ["draft", "published", "retired"] },
|
|
28
|
+
"label": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
29
|
+
"description": { "$ref": "common.schema.json#/$defs/messageReference" },
|
|
30
|
+
"model": { "$ref": "common.schema.json#/$defs/lockedArtifactReference" },
|
|
31
|
+
"dependencyLock": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["theme", "blocks"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"theme": { "$ref": "common.schema.json#/$defs/lockedArtifactReference" },
|
|
37
|
+
"blocks": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"maxItems": 1000,
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["type", "version", "revision"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
46
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
47
|
+
"revision": { "$ref": "common.schema.json#/$defs/revision" },
|
|
48
|
+
"integrity": { "$ref": "common.schema.json#/$defs/integrity" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"plugins": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"maxItems": 100,
|
|
55
|
+
"items": { "$ref": "common.schema.json#/$defs/lockedArtifactReference" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"roots": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"minItems": 0,
|
|
62
|
+
"maxItems": 10000,
|
|
63
|
+
"items": { "$ref": "#/$defs/node" }
|
|
64
|
+
},
|
|
65
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
66
|
+
},
|
|
67
|
+
"allOf": [
|
|
68
|
+
{
|
|
69
|
+
"if": {
|
|
70
|
+
"properties": { "status": { "const": "published" } },
|
|
71
|
+
"required": ["status"]
|
|
72
|
+
},
|
|
73
|
+
"then": {
|
|
74
|
+
"properties": {
|
|
75
|
+
"roots": { "type": "array", "minItems": 1 }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"$defs": {
|
|
81
|
+
"sizeRoleAxis": { "enum": ["inline", "block"] },
|
|
82
|
+
"node": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": false,
|
|
85
|
+
"required": ["id", "type", "version", "properties", "bindings", "slots", "authoring"],
|
|
86
|
+
"properties": {
|
|
87
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
88
|
+
"type": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
89
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
90
|
+
"properties": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"maxProperties": 500,
|
|
93
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
|
|
94
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
95
|
+
},
|
|
96
|
+
"bindings": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"maxProperties": 100,
|
|
99
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
100
|
+
"additionalProperties": { "$ref": "#/$defs/binding" }
|
|
101
|
+
},
|
|
102
|
+
"slots": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"maxProperties": 100,
|
|
105
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
106
|
+
"additionalProperties": {
|
|
107
|
+
"type": "array",
|
|
108
|
+
"maxItems": 10000,
|
|
109
|
+
"items": { "$ref": "#/$defs/node" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"responsive": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"maxProperties": 100,
|
|
115
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
116
|
+
"additionalProperties": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"maxProperties": 20,
|
|
119
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
120
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"sizeRoles": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"maxProperties": 2,
|
|
126
|
+
"propertyNames": { "$ref": "#/$defs/sizeRoleAxis" },
|
|
127
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/localName" }
|
|
128
|
+
},
|
|
129
|
+
"responsiveSizeRoles": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"maxProperties": 2,
|
|
132
|
+
"propertyNames": { "$ref": "#/$defs/sizeRoleAxis" },
|
|
133
|
+
"additionalProperties": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"maxProperties": 20,
|
|
136
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
137
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/localName" }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"authoring": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": ["mode"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"mode": { "enum": ["locked", "content", "variant", "structural", "designer"] },
|
|
146
|
+
"allowedBlocks": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"maxItems": 1000,
|
|
149
|
+
"uniqueItems": true,
|
|
150
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
151
|
+
},
|
|
152
|
+
"requiredPermission": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
153
|
+
"slots": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"maxProperties": 100,
|
|
156
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/localName" },
|
|
157
|
+
"additionalProperties": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["composable"],
|
|
161
|
+
"properties": {
|
|
162
|
+
"composable": { "const": true },
|
|
163
|
+
"allowedBlocks": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"maxItems": 1000,
|
|
166
|
+
"uniqueItems": true,
|
|
167
|
+
"items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"extensions": { "$ref": "common.schema.json#/$defs/extensions" }
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"binding": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"required": ["source", "transforms", "onNull", "onError"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"source": { "$ref": "#/$defs/bindingSource" },
|
|
183
|
+
"transforms": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"maxItems": 20,
|
|
186
|
+
"items": { "$ref": "#/$defs/transform" }
|
|
187
|
+
},
|
|
188
|
+
"onNull": { "enum": ["empty", "hide", "fallback", "error"] },
|
|
189
|
+
"onError": { "enum": ["hide", "fallback", "error"] },
|
|
190
|
+
"fallback": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"bindingSource": {
|
|
194
|
+
"oneOf": [
|
|
195
|
+
{
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"required": ["kind", "fieldPath"],
|
|
199
|
+
"properties": {
|
|
200
|
+
"kind": { "const": "entry-field" },
|
|
201
|
+
"fieldPath": {
|
|
202
|
+
"type": "array",
|
|
203
|
+
"minItems": 1,
|
|
204
|
+
"maxItems": 32,
|
|
205
|
+
"items": { "$ref": "common.schema.json#/$defs/localName" }
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": false,
|
|
212
|
+
"required": ["kind", "key"],
|
|
213
|
+
"properties": {
|
|
214
|
+
"kind": { "const": "context-value" },
|
|
215
|
+
"key": { "$ref": "common.schema.json#/$defs/qualifiedName" }
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"type": "object",
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"required": ["kind", "value"],
|
|
222
|
+
"properties": {
|
|
223
|
+
"kind": { "const": "static-value" },
|
|
224
|
+
"value": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"type": "object",
|
|
229
|
+
"additionalProperties": false,
|
|
230
|
+
"required": ["kind", "resourceType", "id"],
|
|
231
|
+
"properties": {
|
|
232
|
+
"kind": { "const": "resource-reference" },
|
|
233
|
+
"resourceType": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
234
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" }
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"type": "object",
|
|
239
|
+
"additionalProperties": false,
|
|
240
|
+
"required": ["kind", "query", "version", "parameters"],
|
|
241
|
+
"properties": {
|
|
242
|
+
"kind": { "const": "query-reference" },
|
|
243
|
+
"query": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
244
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
245
|
+
"parameters": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"maxProperties": 50,
|
|
248
|
+
"propertyNames": {
|
|
249
|
+
"$ref": "common.schema.json#/$defs/safeJsonMemberName"
|
|
250
|
+
},
|
|
251
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
"transform": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"additionalProperties": false,
|
|
260
|
+
"required": ["operator", "version", "arguments"],
|
|
261
|
+
"properties": {
|
|
262
|
+
"operator": { "$ref": "common.schema.json#/$defs/qualifiedName" },
|
|
263
|
+
"version": { "$ref": "common.schema.json#/$defs/semanticVersion" },
|
|
264
|
+
"arguments": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"maxProperties": 20,
|
|
267
|
+
"propertyNames": { "$ref": "common.schema.json#/$defs/safeJsonMemberName" },
|
|
268
|
+
"additionalProperties": { "$ref": "common.schema.json#/$defs/jsonValue" }
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/canonical-vector.schema.json",
|
|
4
|
+
"title": "Studio canonical serialization vector",
|
|
5
|
+
"description": "One canonical serialization case: a bounded JSON value and either the exact canonical string it serializes to with the digest of its UTF-8 bytes, or the stable reason the canonical form refuses it. Checksums across the contract are computed over exactly these bytes, so an implementation that reproduces this corpus computes the same digests as every other - which is what makes a vendored-corpus check and a stored-document round-trip comparable across languages.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["contractVersion", "kind", "id", "description", "value", "expect"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractVersion": {
|
|
11
|
+
"$ref": "common.schema.json#/$defs/contractVersion"
|
|
12
|
+
},
|
|
13
|
+
"kind": {
|
|
14
|
+
"const": "canonical-vector"
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"$ref": "common.schema.json#/$defs/stableId"
|
|
18
|
+
},
|
|
19
|
+
"description": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 500
|
|
23
|
+
},
|
|
24
|
+
"value": {
|
|
25
|
+
"description": "The input value. Deliberately looser than the canonical JSON value shape so a rejection vector can carry a value the canonical form refuses, such as a forbidden member name. Values the canonical form cannot represent at all - non-finite numbers, undefined - are not expressible in JSON and are proven in implementation tests rather than here."
|
|
26
|
+
},
|
|
27
|
+
"expect": {
|
|
28
|
+
"oneOf": [
|
|
29
|
+
{
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["canonical", "digest"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"canonical": {
|
|
35
|
+
"description": "The exact canonical string, byte for byte.",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"maxLength": 20000
|
|
38
|
+
},
|
|
39
|
+
"digest": {
|
|
40
|
+
"description": "The SRI-style sha256 digest of the canonical UTF-8 bytes.",
|
|
41
|
+
"$ref": "common.schema.json#/$defs/integrity"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["rejected"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"rejected": {
|
|
51
|
+
"description": "The stable reason the canonical form refuses the value.",
|
|
52
|
+
"enum": ["depth-exceeded", "forbidden-member"]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"maximumDepth": {
|
|
59
|
+
"description": "The depth bound to serialize under. Absent means the contract default of 64.",
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 1,
|
|
62
|
+
"maximum": 64
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kumwe.org/studio/v1/command-vector.schema.json",
|
|
4
|
+
"title": "Studio canonical command vector",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["contractVersion", "kind", "id", "description", "initial", "command", "expect"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
|
|
10
|
+
"kind": { "const": "command-vector" },
|
|
11
|
+
"id": { "$ref": "common.schema.json#/$defs/stableId" },
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 500
|
|
16
|
+
},
|
|
17
|
+
"mode": {
|
|
18
|
+
"enum": ["blueprint", "content", "hybrid", "model", "read-only"]
|
|
19
|
+
},
|
|
20
|
+
"initial": { "$ref": "blueprint.schema.json" },
|
|
21
|
+
"command": { "$ref": "command.schema.json" },
|
|
22
|
+
"expect": {
|
|
23
|
+
"oneOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": ["document"],
|
|
28
|
+
"properties": {
|
|
29
|
+
"document": { "$ref": "blueprint.schema.json" }
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["errorCode"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"errorCode": { "$ref": "#/$defs/commandErrorCode" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"inverse": { "$ref": "command.schema.json" }
|
|
43
|
+
},
|
|
44
|
+
"$defs": {
|
|
45
|
+
"commandErrorCode": {
|
|
46
|
+
"enum": [
|
|
47
|
+
"artifact-not-draft",
|
|
48
|
+
"binding-not-found",
|
|
49
|
+
"duplicate-field",
|
|
50
|
+
"duplicate-node",
|
|
51
|
+
"illegal-move",
|
|
52
|
+
"invalid-batch",
|
|
53
|
+
"invalid-id-map",
|
|
54
|
+
"invalid-index",
|
|
55
|
+
"invalid-order",
|
|
56
|
+
"locale-mismatch",
|
|
57
|
+
"mode-forbidden",
|
|
58
|
+
"node-not-found",
|
|
59
|
+
"parent-not-found",
|
|
60
|
+
"property-not-found",
|
|
61
|
+
"read-only-session",
|
|
62
|
+
"stale-generation",
|
|
63
|
+
"stale-state",
|
|
64
|
+
"unsupported-command"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|