@kumwe/studio-protocol 0.1.0-alpha.5 → 0.1.0-rc.1

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/README.md +59 -4
  2. package/THIRD_PARTY_NOTICES.md +9 -0
  3. package/dist/generated/schema-models.d.ts +1968 -0
  4. package/dist/generated/schema-models.d.ts.map +1 -0
  5. package/dist/generated/schema-models.js +76 -0
  6. package/dist/generated/schema-models.js.map +1 -0
  7. package/dist/guards.d.ts +4 -1
  8. package/dist/guards.d.ts.map +1 -1
  9. package/dist/guards.js +72 -30
  10. package/dist/guards.js.map +1 -1
  11. package/dist/host-failure.d.ts +16 -0
  12. package/dist/host-failure.d.ts.map +1 -0
  13. package/dist/host-failure.js +27 -0
  14. package/dist/host-failure.js.map +1 -0
  15. package/dist/index.d.ts +6 -3
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +5 -3
  18. package/dist/index.js.map +1 -1
  19. package/dist/schemas.d.ts +17 -0
  20. package/dist/schemas.d.ts.map +1 -1
  21. package/dist/schemas.js +51 -0
  22. package/dist/schemas.js.map +1 -1
  23. package/dist/types.d.ts +123 -6
  24. package/dist/types.d.ts.map +1 -1
  25. package/dist/types.js +6 -1
  26. package/dist/types.js.map +1 -1
  27. package/package.json +6 -2
  28. package/schemas/authoring-message-catalog.schema.json +45 -0
  29. package/schemas/authoring-web-vector.schema.json +236 -0
  30. package/schemas/binding-projection-vector.schema.json +127 -0
  31. package/schemas/block-definition.schema.json +10 -1
  32. package/schemas/host-sequence-vector.schema.json +342 -0
  33. package/schemas/host-vector.schema.json +2 -0
  34. package/schemas/manifest.json +75 -6
  35. package/schemas/preview-message.schema.json +44 -12
  36. package/schemas/preview-vector.schema.json +52 -0
  37. package/schemas/renderer-web-vector.schema.json +160 -0
  38. package/schemas/rich-text-projection.schema.json +12 -3
  39. package/schemas/rich-text.schema.json +156 -7
  40. package/schemas/schema-profile-vector.schema.json +133 -0
  41. package/schemas/schema-profile.schema.json +47 -7
  42. package/schemas/studio-chart.schema.json +35 -0
  43. package/schemas/studio-drawing.schema.json +44 -0
  44. package/schemas/studio-money.schema.json +16 -0
  45. package/schemas/studio-presentation.schema.json +31 -0
  46. package/schemas/studio-release.schema.json +81 -0
  47. package/schemas/studio-table.schema.json +27 -0
  48. package/studio-release.json +28 -0
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/preview-vector.schema.json",
4
+ "title": "Studio preview identity conformance vector",
5
+ "description": "One complete Blueprint draft, its exact render-attempt identity, and the SHA-256 plus deterministic marker inventory every implementation must reproduce under the preview identity profile.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "contractVersion",
10
+ "kind",
11
+ "id",
12
+ "description",
13
+ "profile",
14
+ "protocolVersion",
15
+ "draft",
16
+ "render",
17
+ "expect"
18
+ ],
19
+ "properties": {
20
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
21
+ "kind": { "const": "preview-vector" },
22
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
23
+ "description": { "type": "string", "minLength": 1, "maxLength": 1000 },
24
+ "profile": { "const": "studio.profile/preview-identity-v1" },
25
+ "protocolVersion": { "const": "0.1.0-draft.2" },
26
+ "draft": { "$ref": "blueprint.schema.json" },
27
+ "render": { "$ref": "preview-message.schema.json#/$defs/render" },
28
+ "expect": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["draftDigest", "markers", "markerMap"],
32
+ "properties": {
33
+ "draftDigest": {
34
+ "type": "string",
35
+ "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
36
+ },
37
+ "markers": {
38
+ "type": "array",
39
+ "maxItems": 100000,
40
+ "uniqueItems": true,
41
+ "items": { "$ref": "preview-message.schema.json#/$defs/previewMarker" }
42
+ },
43
+ "markerMap": {
44
+ "type": "object",
45
+ "maxProperties": 100000,
46
+ "propertyNames": { "$ref": "preview-message.schema.json#/$defs/previewMarker" },
47
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/stableId" }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/renderer-web-vector.schema.json",
4
+ "title": "Studio renderer-web conformance vector",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["id", "coverage", "roots", "bindings", "media", "expect"],
8
+ "properties": {
9
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
10
+ "coverage": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["blockTypes", "behaviors", "presentation", "security"],
14
+ "properties": {
15
+ "blockTypes": {
16
+ "type": "array",
17
+ "maxItems": 100,
18
+ "uniqueItems": true,
19
+ "items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
20
+ },
21
+ "behaviors": {
22
+ "type": "array",
23
+ "maxItems": 50,
24
+ "uniqueItems": true,
25
+ "items": {
26
+ "enum": [
27
+ "accordion-native",
28
+ "countdown",
29
+ "dialog",
30
+ "lightbox",
31
+ "navigation-disclosure",
32
+ "notice-dismiss",
33
+ "popover",
34
+ "slideshow",
35
+ "tabs"
36
+ ]
37
+ }
38
+ },
39
+ "presentation": {
40
+ "type": "array",
41
+ "maxItems": 50,
42
+ "uniqueItems": true,
43
+ "items": {
44
+ "enum": [
45
+ "alignment",
46
+ "inverse",
47
+ "markers",
48
+ "motion",
49
+ "position",
50
+ "print",
51
+ "responsive-visibility",
52
+ "scrolling",
53
+ "sizing",
54
+ "spacing"
55
+ ]
56
+ }
57
+ },
58
+ "security": {
59
+ "type": "array",
60
+ "maxItems": 50,
61
+ "uniqueItems": true,
62
+ "items": {
63
+ "enum": [
64
+ "active-media-deny",
65
+ "blob-default-deny",
66
+ "escaped-text",
67
+ "safe-url-deny",
68
+ "typed-data-fallback"
69
+ ]
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "context": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "properties": { "allowBlobMedia": { "type": "boolean" } }
78
+ },
79
+ "roots": {
80
+ "type": "array",
81
+ "minItems": 1,
82
+ "maxItems": 100,
83
+ "items": { "$ref": "blueprint.schema.json#/$defs/node" }
84
+ },
85
+ "bindings": {
86
+ "type": "array",
87
+ "maxItems": 1000,
88
+ "items": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["nodeId", "port", "value"],
92
+ "properties": {
93
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
94
+ "port": { "$ref": "common.schema.json#/$defs/localName" },
95
+ "value": { "$ref": "common.schema.json#/$defs/jsonValue" }
96
+ }
97
+ }
98
+ },
99
+ "media": {
100
+ "type": "array",
101
+ "maxItems": 1000,
102
+ "items": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["assetId", "src", "altText"],
106
+ "properties": {
107
+ "assetId": { "$ref": "common.schema.json#/$defs/stableId" },
108
+ "src": { "type": "string", "minLength": 1, "maxLength": 2048 },
109
+ "altText": { "type": "string", "maxLength": 5000 },
110
+ "mediaType": { "type": "string", "maxLength": 255 },
111
+ "caption": { "type": "string", "maxLength": 20000 },
112
+ "width": { "type": "integer", "minimum": 1, "maximum": 100000 },
113
+ "height": { "type": "integer", "minimum": 1, "maximum": 100000 }
114
+ }
115
+ }
116
+ },
117
+ "expect": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": ["htmlContains", "htmlExcludes", "cssContains", "enhancements"],
121
+ "properties": {
122
+ "htmlContains": {
123
+ "type": "array",
124
+ "maxItems": 100,
125
+ "items": { "type": "string", "maxLength": 10000 }
126
+ },
127
+ "htmlExcludes": {
128
+ "type": "array",
129
+ "maxItems": 100,
130
+ "items": { "type": "string", "maxLength": 10000 }
131
+ },
132
+ "cssContains": {
133
+ "type": "array",
134
+ "maxItems": 100,
135
+ "items": { "type": "string", "maxLength": 10000 }
136
+ },
137
+ "enhancements": {
138
+ "type": "array",
139
+ "maxItems": 100,
140
+ "items": {
141
+ "enum": [
142
+ "chart",
143
+ "countdown",
144
+ "diagram",
145
+ "dialog",
146
+ "lightbox",
147
+ "math",
148
+ "motion",
149
+ "navigation",
150
+ "notice",
151
+ "popover",
152
+ "slideshow",
153
+ "tabs"
154
+ ]
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -24,7 +24,16 @@
24
24
  "additionalProperties": false,
25
25
  "required": ["type", "text", "spans", "embeds"],
26
26
  "properties": {
27
- "type": { "enum": ["heading", "horizontalRule", "paragraph"] },
27
+ "type": {
28
+ "enum": [
29
+ "checklistItem",
30
+ "codeBlock",
31
+ "heading",
32
+ "horizontalRule",
33
+ "paragraph",
34
+ "tableCell"
35
+ ]
36
+ },
28
37
  "text": {
29
38
  "type": "string",
30
39
  "maxLength": 250000
@@ -51,9 +60,9 @@
51
60
  "marks": {
52
61
  "type": "array",
53
62
  "minItems": 1,
54
- "maxItems": 4,
63
+ "maxItems": 5,
55
64
  "uniqueItems": true,
56
- "items": { "enum": ["bold", "code", "italic", "strike"] }
65
+ "items": { "enum": ["bold", "code", "highlight", "italic", "strike"] }
57
66
  }
58
67
  }
59
68
  },
@@ -24,7 +24,11 @@
24
24
  { "$ref": "#/$defs/blockquote" },
25
25
  { "$ref": "#/$defs/bulletList" },
26
26
  { "$ref": "#/$defs/orderedList" },
27
- { "$ref": "#/$defs/horizontalRule" }
27
+ { "$ref": "#/$defs/horizontalRule" },
28
+ { "$ref": "#/$defs/checklist" },
29
+ { "$ref": "#/$defs/table" },
30
+ { "$ref": "#/$defs/callout" },
31
+ { "$ref": "#/$defs/codeBlock" }
28
32
  ]
29
33
  },
30
34
  "paragraph": {
@@ -133,6 +137,131 @@
133
137
  "type": { "const": "horizontalRule" }
134
138
  }
135
139
  },
140
+ "checklist": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["type", "content"],
144
+ "properties": {
145
+ "type": { "const": "checklist" },
146
+ "content": {
147
+ "type": "array",
148
+ "minItems": 1,
149
+ "maxItems": 500,
150
+ "items": { "$ref": "#/$defs/checklistItem" }
151
+ }
152
+ }
153
+ },
154
+ "checklistItem": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": ["type", "attrs"],
158
+ "properties": {
159
+ "type": { "const": "checklistItem" },
160
+ "attrs": {
161
+ "type": "object",
162
+ "additionalProperties": false,
163
+ "required": ["checked", "level"],
164
+ "properties": {
165
+ "checked": { "type": "boolean" },
166
+ "level": { "type": "integer", "minimum": 0, "maximum": 4 }
167
+ }
168
+ },
169
+ "content": {
170
+ "type": "array",
171
+ "maxItems": 5000,
172
+ "items": { "$ref": "#/$defs/inline" }
173
+ }
174
+ }
175
+ },
176
+ "table": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": ["type", "attrs", "content"],
180
+ "properties": {
181
+ "type": { "const": "table" },
182
+ "attrs": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": ["header"],
186
+ "properties": { "header": { "type": "boolean" } }
187
+ },
188
+ "content": {
189
+ "type": "array",
190
+ "minItems": 1,
191
+ "maxItems": 200,
192
+ "items": { "$ref": "#/$defs/tableRow" }
193
+ }
194
+ }
195
+ },
196
+ "tableRow": {
197
+ "type": "object",
198
+ "additionalProperties": false,
199
+ "required": ["type", "content"],
200
+ "properties": {
201
+ "type": { "const": "tableRow" },
202
+ "content": {
203
+ "type": "array",
204
+ "minItems": 1,
205
+ "maxItems": 50,
206
+ "items": { "$ref": "#/$defs/tableCell" }
207
+ }
208
+ }
209
+ },
210
+ "tableCell": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": ["type"],
214
+ "properties": {
215
+ "type": { "const": "tableCell" },
216
+ "content": {
217
+ "type": "array",
218
+ "maxItems": 5000,
219
+ "items": { "$ref": "#/$defs/inline" }
220
+ }
221
+ }
222
+ },
223
+ "callout": {
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": ["type", "attrs", "content"],
227
+ "properties": {
228
+ "type": { "const": "callout" },
229
+ "attrs": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": ["tone"],
233
+ "properties": {
234
+ "tone": { "enum": ["danger", "info", "success", "warning"] }
235
+ }
236
+ },
237
+ "content": {
238
+ "type": "array",
239
+ "minItems": 1,
240
+ "maxItems": 5000,
241
+ "items": { "$ref": "#/$defs/block" }
242
+ }
243
+ }
244
+ },
245
+ "codeBlock": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": ["type", "attrs", "text"],
249
+ "properties": {
250
+ "type": { "const": "codeBlock" },
251
+ "attrs": {
252
+ "type": "object",
253
+ "additionalProperties": false,
254
+ "required": ["language"],
255
+ "properties": {
256
+ "language": {
257
+ "type": "string",
258
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9+_.#-]{0,63}$"
259
+ }
260
+ }
261
+ },
262
+ "text": { "type": "string", "maxLength": 250000 }
263
+ }
264
+ },
136
265
  "hardBreak": {
137
266
  "type": "object",
138
267
  "additionalProperties": false,
@@ -163,12 +292,32 @@
163
292
  "oneOf": [{ "$ref": "#/$defs/text" }, { "$ref": "#/$defs/hardBreak" }]
164
293
  },
165
294
  "mark": {
166
- "type": "object",
167
- "additionalProperties": false,
168
- "required": ["type"],
169
- "properties": {
170
- "type": { "enum": ["bold", "code", "italic", "strike"] }
171
- }
295
+ "oneOf": [
296
+ {
297
+ "type": "object",
298
+ "additionalProperties": false,
299
+ "required": ["type"],
300
+ "properties": {
301
+ "type": { "enum": ["bold", "code", "italic", "strike"] }
302
+ }
303
+ },
304
+ {
305
+ "type": "object",
306
+ "additionalProperties": false,
307
+ "required": ["type", "attrs"],
308
+ "properties": {
309
+ "type": { "const": "highlight" },
310
+ "attrs": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "required": ["tone"],
314
+ "properties": {
315
+ "tone": { "enum": ["accent", "danger", "info", "success", "warning"] }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ ]
172
321
  }
173
322
  }
174
323
  }
@@ -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
+ }