@kumwe/studio-protocol 0.1.0-alpha.5 → 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.
@@ -31,7 +31,20 @@
31
31
  "minimum": 0
32
32
  },
33
33
  "type": {
34
- "$ref": "common.schema.json#/$defs/qualifiedName"
34
+ "enum": [
35
+ "studio.preview/activated",
36
+ "studio.preview/dispose",
37
+ "studio.preview/error",
38
+ "studio.preview/measure",
39
+ "studio.preview/measurements",
40
+ "studio.preview/ready",
41
+ "studio.preview/reload",
42
+ "studio.preview/render",
43
+ "studio.preview/rendered",
44
+ "studio.preview/select",
45
+ "studio.preview/teardown",
46
+ "studio.preview/viewport"
47
+ ]
35
48
  },
36
49
  "payload": {
37
50
  "type": "object",
@@ -239,6 +252,12 @@
239
252
  }
240
253
  ],
241
254
  "$defs": {
255
+ "previewMarker": {
256
+ "description": "A deterministic marker for one node in a canonical draft: the draft digest followed by its zero-based Blueprint preorder ordinal.",
257
+ "type": "string",
258
+ "pattern": "^studio\\.preview/node/[0-9a-f]{64}/(?:0|[1-9][0-9]{0,4})(?![\\s\\S])",
259
+ "maxLength": 90
260
+ },
242
261
  "ready": {
243
262
  "type": "object",
244
263
  "additionalProperties": false,
@@ -262,7 +281,7 @@
262
281
  "render": {
263
282
  "type": "object",
264
283
  "additionalProperties": false,
265
- "required": ["artifactId", "draftDigest", "viewport"],
284
+ "required": ["artifactId", "draftDigest", "draftRevision", "requestId", "viewport"],
266
285
  "properties": {
267
286
  "artifactId": {
268
287
  "$ref": "common.schema.json#/$defs/stableId"
@@ -274,6 +293,10 @@
274
293
  "draftRevision": {
275
294
  "$ref": "common.schema.json#/$defs/revision"
276
295
  },
296
+ "requestId": {
297
+ "$ref": "common.schema.json#/$defs/stableId",
298
+ "description": "A session-unique render attempt identifier. Retries use a new identifier even when draft and viewport are unchanged."
299
+ },
277
300
  "viewport": {
278
301
  "$ref": "common.schema.json#/$defs/localName"
279
302
  }
@@ -282,24 +305,29 @@
282
305
  "rendered": {
283
306
  "type": "object",
284
307
  "additionalProperties": false,
285
- "required": ["draftDigest", "markers", "diagnostics"],
308
+ "required": ["requestId", "draftDigest", "markers", "markerMap", "diagnostics"],
286
309
  "properties": {
287
310
  "draftDigest": {
288
311
  "type": "string",
289
312
  "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
290
313
  },
314
+ "requestId": {
315
+ "$ref": "common.schema.json#/$defs/stableId",
316
+ "description": "The exact render attempt this response settles."
317
+ },
291
318
  "markers": {
292
319
  "type": "array",
293
320
  "maxItems": 100000,
321
+ "uniqueItems": true,
294
322
  "items": {
295
- "$ref": "common.schema.json#/$defs/stableId"
323
+ "$ref": "#/$defs/previewMarker"
296
324
  }
297
325
  },
298
326
  "markerMap": {
299
327
  "type": "object",
300
328
  "maxProperties": 100000,
301
329
  "propertyNames": {
302
- "$ref": "common.schema.json#/$defs/stableId"
330
+ "$ref": "#/$defs/previewMarker"
303
331
  },
304
332
  "additionalProperties": {
305
333
  "$ref": "common.schema.json#/$defs/stableId"
@@ -334,13 +362,16 @@
334
362
  "required": ["requestId", "markers"],
335
363
  "properties": {
336
364
  "requestId": {
337
- "$ref": "common.schema.json#/$defs/stableId"
365
+ "$ref": "common.schema.json#/$defs/stableId",
366
+ "description": "A session-unique measurement attempt identifier, never reused for another render or measurement."
338
367
  },
339
368
  "markers": {
340
369
  "type": "array",
370
+ "minItems": 1,
341
371
  "maxItems": 1000,
372
+ "uniqueItems": true,
342
373
  "items": {
343
- "$ref": "common.schema.json#/$defs/stableId"
374
+ "$ref": "#/$defs/previewMarker"
344
375
  }
345
376
  }
346
377
  }
@@ -361,7 +392,7 @@
361
392
  "type": "object",
362
393
  "maxProperties": 1000,
363
394
  "propertyNames": {
364
- "$ref": "common.schema.json#/$defs/stableId"
395
+ "$ref": "#/$defs/previewMarker"
365
396
  },
366
397
  "additionalProperties": {
367
398
  "type": "array",
@@ -375,8 +406,9 @@
375
406
  "unknown": {
376
407
  "type": "array",
377
408
  "maxItems": 1000,
409
+ "uniqueItems": true,
378
410
  "items": {
379
- "$ref": "common.schema.json#/$defs/stableId"
411
+ "$ref": "#/$defs/previewMarker"
380
412
  }
381
413
  },
382
414
  "viewport": {
@@ -492,8 +524,8 @@
492
524
  "enum": ["activate", "context-menu", "focus"]
493
525
  },
494
526
  "marker": {
495
- "description": "The opaque marker the renderer associated with the region. It carries nothing beyond the node identity the render already published.",
496
- "$ref": "common.schema.json#/$defs/stableId"
527
+ "description": "A marker from the renderer's currently accepted inventory. The channel drops invented and stale markers.",
528
+ "$ref": "#/$defs/previewMarker"
497
529
  }
498
530
  }
499
531
  },
@@ -519,7 +551,7 @@
519
551
  "height": {
520
552
  "description": "Bounded CSS-pixel height.",
521
553
  "type": "integer",
522
- "minimum": 120,
554
+ "minimum": 240,
523
555
  "maximum": 10000
524
556
  },
525
557
  "width": {
@@ -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,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
  }