@kumwe/studio-protocol 0.1.0-alpha.5 → 0.1.0-beta.2

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 (62) hide show
  1. package/README.md +72 -6
  2. package/THIRD_PARTY_NOTICES.md +9 -0
  3. package/dist/generated/schema-models.d.ts +2750 -0
  4. package/dist/generated/schema-models.d.ts.map +1 -0
  5. package/dist/generated/schema-models.js +1 -0
  6. package/dist/guards.d.ts +4 -1
  7. package/dist/guards.d.ts.map +1 -1
  8. package/dist/guards.js +1 -332
  9. package/dist/host-failure.d.ts +16 -0
  10. package/dist/host-failure.d.ts.map +1 -0
  11. package/dist/host-failure.js +1 -0
  12. package/dist/index.d.ts +7 -3
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -4
  15. package/dist/release.d.ts +8 -0
  16. package/dist/release.d.ts.map +1 -0
  17. package/dist/release.js +1 -0
  18. package/dist/schemas.d.ts +25 -0
  19. package/dist/schemas.d.ts.map +1 -1
  20. package/dist/schemas.js +1 -93
  21. package/dist/types.d.ts +447 -7
  22. package/dist/types.d.ts.map +1 -1
  23. package/dist/types.js +1 -3
  24. package/package.json +7 -3
  25. package/schemas/authoring-http-vector.schema.json +195 -0
  26. package/schemas/authoring-http.schema.json +505 -0
  27. package/schemas/authoring-message-catalog.schema.json +45 -0
  28. package/schemas/authoring-save.schema.json +188 -0
  29. package/schemas/authoring-session.schema.json +151 -0
  30. package/schemas/authoring-target.schema.json +160 -0
  31. package/schemas/authoring-web-vector.schema.json +236 -0
  32. package/schemas/binding-projection-vector.schema.json +127 -0
  33. package/schemas/block-definition.schema.json +10 -1
  34. package/schemas/common.schema.json +45 -0
  35. package/schemas/host-error.schema.json +22 -1
  36. package/schemas/host-operations.schema.json +16 -0
  37. package/schemas/host-sequence-vector.schema.json +342 -0
  38. package/schemas/host-vector.schema.json +2 -0
  39. package/schemas/manifest.json +120 -11
  40. package/schemas/plugin-manifest.schema.json +1 -0
  41. package/schemas/preview-message.schema.json +44 -12
  42. package/schemas/preview-vector.schema.json +52 -0
  43. package/schemas/renderer-web-vector.schema.json +273 -0
  44. package/schemas/reusable-content-type.schema.json +99 -0
  45. package/schemas/rich-text-projection.schema.json +12 -3
  46. package/schemas/rich-text.schema.json +156 -7
  47. package/schemas/schema-profile-vector.schema.json +133 -0
  48. package/schemas/schema-profile.schema.json +47 -7
  49. package/schemas/studio-browser-assets.schema.json +376 -0
  50. package/schemas/studio-chart.schema.json +35 -0
  51. package/schemas/studio-config.schema.json +1 -33
  52. package/schemas/studio-deployment.schema.json +347 -0
  53. package/schemas/studio-drawing.schema.json +44 -0
  54. package/schemas/studio-money.schema.json +16 -0
  55. package/schemas/studio-presentation.schema.json +31 -0
  56. package/schemas/studio-release.schema.json +125 -0
  57. package/schemas/studio-table.schema.json +27 -0
  58. package/studio-release.json +35 -0
  59. package/dist/guards.js.map +0 -1
  60. package/dist/index.js.map +0 -1
  61. package/dist/schemas.js.map +0 -1
  62. package/dist/types.js.map +0 -1
@@ -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
+ }
@@ -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
- "$ref": "#/$defs/schema",
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": "^#(?:/[^\\u0000-\\u001F\\u007F]*)?(?![\\s\\S])"
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": "common.schema.json#/$defs/jsonValue" },
63
- "default": { "$ref": "common.schema.json#/$defs/jsonValue" },
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
- "items": { "$ref": "common.schema.json#/$defs/jsonValue" }
92
+ "uniqueItems": true,
93
+ "items": { "$ref": "#/$defs/jsonValue" }
80
94
  },
81
95
  "examples": {
82
96
  "type": "array",
83
97
  "maxItems": 100,
84
- "items": { "$ref": "common.schema.json#/$defs/jsonValue" }
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
  }