@openplanr/protocol 0.13.0 → 0.15.0

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 (34) hide show
  1. package/README.md +23 -0
  2. package/package.json +6 -2
  3. package/registries/commands.json +12 -12
  4. package/registries/roles.json +43 -133
  5. package/registries/skills.json +14 -14
  6. package/registries/task-kinds.json +2 -2
  7. package/schemas/v1.20.0/design-document.schema.json +379 -0
  8. package/schemas/v1.20.0/design-review-bundle.schema.json +692 -0
  9. package/schemas/v1.21.0/diagram-authoring-bundle.schema.json +1609 -0
  10. package/schemas/v1.21.0/diagram-edit-transaction.schema.json +4369 -0
  11. package/schemas/v1.21.0/diagram-review-bundle.schema.json +4047 -0
  12. package/schemas/v1.21.0/diagram-shape-definition.schema.json +457 -0
  13. package/schemas/v1.22.0/design-document.schema.json +506 -0
  14. package/schemas/v1.22.0/design-review-bundle.schema.json +822 -0
  15. package/schemas/v1.5.0/role-registry.schema.json +4 -1
  16. package/src/browser-contracts.d.mts +5 -1
  17. package/src/browser-contracts.mjs +27 -0
  18. package/src/contracts.mjs +39 -6
  19. package/src/design-contracts.d.mts +40 -2
  20. package/src/design-contracts.mjs +258 -17
  21. package/src/design-publication-contracts.mjs +3 -1
  22. package/src/diagram-authoring-contracts.d.mts +2 -0
  23. package/src/generated/canonical-registries.mjs +71 -161
  24. package/src/index.d.mts +7 -0
  25. package/src/index.mjs +7 -0
  26. package/src/json-schema.mjs +4 -0
  27. package/src/registries.mjs +20 -4
  28. package/src/review-experience-contracts.d.mts +2 -0
  29. package/src/review-experience-contracts.mjs +77 -5
  30. package/src/shape-library-contracts.d.mts +57 -0
  31. package/src/shape-library-contracts.mjs +266 -0
  32. package/src/studio-presentation-contracts.d.mts +50 -2
  33. package/src/studio-presentation-contracts.mjs +285 -4
  34. package/src/workspace-contracts.mjs +3 -3
@@ -0,0 +1,457 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.21.0/diagram-shape-definition.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-shape-definition",
6
+ "version": "1.21.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": [
11
+ "packId",
12
+ "packVersion",
13
+ "shapeId",
14
+ "definitionDigest",
15
+ "name",
16
+ "description",
17
+ "tags",
18
+ "primitives",
19
+ "attachment",
20
+ "textRegion",
21
+ "sizing"
22
+ ],
23
+ "properties": {
24
+ "packId": {
25
+ "type": "string",
26
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
27
+ "maxLength": 128
28
+ },
29
+ "packVersion": {
30
+ "type": "string",
31
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
32
+ "maxLength": 32
33
+ },
34
+ "shapeId": {
35
+ "type": "string",
36
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
37
+ "maxLength": 128
38
+ },
39
+ "definitionDigest": {
40
+ "type": "string",
41
+ "pattern": "^sha256:[a-f0-9]{64}$"
42
+ },
43
+ "name": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 128
47
+ },
48
+ "description": {
49
+ "type": "string",
50
+ "maxLength": 1024
51
+ },
52
+ "tags": {
53
+ "type": "array",
54
+ "maxItems": 16,
55
+ "uniqueItems": true,
56
+ "items": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 64
60
+ }
61
+ },
62
+ "primitives": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "maxItems": 32,
66
+ "items": {
67
+ "oneOf": [
68
+ {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": [
72
+ "type",
73
+ "x",
74
+ "y",
75
+ "width",
76
+ "height",
77
+ "radius",
78
+ "fill",
79
+ "stroke"
80
+ ],
81
+ "properties": {
82
+ "type": {
83
+ "const": "rect"
84
+ },
85
+ "x": {
86
+ "type": "number",
87
+ "minimum": 0,
88
+ "maximum": 1
89
+ },
90
+ "y": {
91
+ "type": "number",
92
+ "minimum": 0,
93
+ "maximum": 1
94
+ },
95
+ "width": {
96
+ "type": "number",
97
+ "exclusiveMinimum": 0,
98
+ "maximum": 1
99
+ },
100
+ "height": {
101
+ "type": "number",
102
+ "exclusiveMinimum": 0,
103
+ "maximum": 1
104
+ },
105
+ "radius": {
106
+ "type": "number",
107
+ "minimum": 0,
108
+ "maximum": 1
109
+ },
110
+ "fill": {
111
+ "enum": [
112
+ "fill",
113
+ "none"
114
+ ]
115
+ },
116
+ "stroke": {
117
+ "enum": [
118
+ "stroke",
119
+ "none"
120
+ ]
121
+ }
122
+ }
123
+ },
124
+ {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": [
128
+ "type",
129
+ "cx",
130
+ "cy",
131
+ "rx",
132
+ "ry",
133
+ "fill",
134
+ "stroke"
135
+ ],
136
+ "properties": {
137
+ "type": {
138
+ "const": "ellipse"
139
+ },
140
+ "cx": {
141
+ "type": "number",
142
+ "minimum": 0,
143
+ "maximum": 1
144
+ },
145
+ "cy": {
146
+ "type": "number",
147
+ "minimum": 0,
148
+ "maximum": 1
149
+ },
150
+ "rx": {
151
+ "type": "number",
152
+ "exclusiveMinimum": 0,
153
+ "maximum": 1
154
+ },
155
+ "ry": {
156
+ "type": "number",
157
+ "exclusiveMinimum": 0,
158
+ "maximum": 1
159
+ },
160
+ "fill": {
161
+ "enum": [
162
+ "fill",
163
+ "none"
164
+ ]
165
+ },
166
+ "stroke": {
167
+ "enum": [
168
+ "stroke",
169
+ "none"
170
+ ]
171
+ }
172
+ }
173
+ },
174
+ {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": [
178
+ "type",
179
+ "points",
180
+ "fill",
181
+ "stroke"
182
+ ],
183
+ "properties": {
184
+ "type": {
185
+ "const": "polygon"
186
+ },
187
+ "points": {
188
+ "type": "array",
189
+ "minItems": 3,
190
+ "maxItems": 32,
191
+ "items": {
192
+ "type": "object",
193
+ "additionalProperties": false,
194
+ "required": [
195
+ "x",
196
+ "y"
197
+ ],
198
+ "properties": {
199
+ "x": {
200
+ "type": "number",
201
+ "minimum": 0,
202
+ "maximum": 1
203
+ },
204
+ "y": {
205
+ "type": "number",
206
+ "minimum": 0,
207
+ "maximum": 1
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "fill": {
213
+ "enum": [
214
+ "fill",
215
+ "none"
216
+ ]
217
+ },
218
+ "stroke": {
219
+ "enum": [
220
+ "stroke",
221
+ "none"
222
+ ]
223
+ }
224
+ }
225
+ },
226
+ {
227
+ "type": "object",
228
+ "additionalProperties": false,
229
+ "required": [
230
+ "type",
231
+ "x1",
232
+ "y1",
233
+ "x2",
234
+ "y2",
235
+ "stroke"
236
+ ],
237
+ "properties": {
238
+ "type": {
239
+ "const": "line"
240
+ },
241
+ "x1": {
242
+ "type": "number",
243
+ "minimum": 0,
244
+ "maximum": 1
245
+ },
246
+ "y1": {
247
+ "type": "number",
248
+ "minimum": 0,
249
+ "maximum": 1
250
+ },
251
+ "x2": {
252
+ "type": "number",
253
+ "minimum": 0,
254
+ "maximum": 1
255
+ },
256
+ "y2": {
257
+ "type": "number",
258
+ "minimum": 0,
259
+ "maximum": 1
260
+ },
261
+ "stroke": {
262
+ "enum": [
263
+ "stroke",
264
+ "none"
265
+ ]
266
+ }
267
+ }
268
+ }
269
+ ]
270
+ }
271
+ },
272
+ "attachment": {
273
+ "oneOf": [
274
+ {
275
+ "type": "object",
276
+ "additionalProperties": false,
277
+ "required": [
278
+ "type",
279
+ "x",
280
+ "y",
281
+ "width",
282
+ "height",
283
+ "radius"
284
+ ],
285
+ "properties": {
286
+ "type": {
287
+ "const": "rect"
288
+ },
289
+ "x": {
290
+ "type": "number",
291
+ "minimum": 0,
292
+ "maximum": 1
293
+ },
294
+ "y": {
295
+ "type": "number",
296
+ "minimum": 0,
297
+ "maximum": 1
298
+ },
299
+ "width": {
300
+ "type": "number",
301
+ "exclusiveMinimum": 0,
302
+ "maximum": 1
303
+ },
304
+ "height": {
305
+ "type": "number",
306
+ "exclusiveMinimum": 0,
307
+ "maximum": 1
308
+ },
309
+ "radius": {
310
+ "type": "number",
311
+ "minimum": 0,
312
+ "maximum": 1
313
+ }
314
+ }
315
+ },
316
+ {
317
+ "type": "object",
318
+ "additionalProperties": false,
319
+ "required": [
320
+ "type",
321
+ "cx",
322
+ "cy",
323
+ "rx",
324
+ "ry"
325
+ ],
326
+ "properties": {
327
+ "type": {
328
+ "const": "ellipse"
329
+ },
330
+ "cx": {
331
+ "type": "number",
332
+ "minimum": 0,
333
+ "maximum": 1
334
+ },
335
+ "cy": {
336
+ "type": "number",
337
+ "minimum": 0,
338
+ "maximum": 1
339
+ },
340
+ "rx": {
341
+ "type": "number",
342
+ "exclusiveMinimum": 0,
343
+ "maximum": 1
344
+ },
345
+ "ry": {
346
+ "type": "number",
347
+ "exclusiveMinimum": 0,
348
+ "maximum": 1
349
+ }
350
+ }
351
+ },
352
+ {
353
+ "type": "object",
354
+ "additionalProperties": false,
355
+ "required": [
356
+ "type",
357
+ "points"
358
+ ],
359
+ "properties": {
360
+ "type": {
361
+ "const": "polygon"
362
+ },
363
+ "points": {
364
+ "type": "array",
365
+ "minItems": 3,
366
+ "maxItems": 32,
367
+ "items": {
368
+ "type": "object",
369
+ "additionalProperties": false,
370
+ "required": [
371
+ "x",
372
+ "y"
373
+ ],
374
+ "properties": {
375
+ "x": {
376
+ "type": "number",
377
+ "minimum": 0,
378
+ "maximum": 1
379
+ },
380
+ "y": {
381
+ "type": "number",
382
+ "minimum": 0,
383
+ "maximum": 1
384
+ }
385
+ }
386
+ }
387
+ }
388
+ }
389
+ }
390
+ ]
391
+ },
392
+ "textRegion": {
393
+ "type": "object",
394
+ "additionalProperties": false,
395
+ "required": [
396
+ "x",
397
+ "y",
398
+ "width",
399
+ "height"
400
+ ],
401
+ "properties": {
402
+ "x": {
403
+ "type": "number",
404
+ "minimum": 0,
405
+ "maximum": 1
406
+ },
407
+ "y": {
408
+ "type": "number",
409
+ "minimum": 0,
410
+ "maximum": 1
411
+ },
412
+ "width": {
413
+ "type": "number",
414
+ "exclusiveMinimum": 0,
415
+ "maximum": 1
416
+ },
417
+ "height": {
418
+ "type": "number",
419
+ "exclusiveMinimum": 0,
420
+ "maximum": 1
421
+ }
422
+ }
423
+ },
424
+ "sizing": {
425
+ "type": "object",
426
+ "additionalProperties": false,
427
+ "required": [
428
+ "width",
429
+ "height",
430
+ "minWidth",
431
+ "minHeight"
432
+ ],
433
+ "properties": {
434
+ "width": {
435
+ "type": "number",
436
+ "minimum": 1,
437
+ "maximum": 10000
438
+ },
439
+ "height": {
440
+ "type": "number",
441
+ "minimum": 1,
442
+ "maximum": 10000
443
+ },
444
+ "minWidth": {
445
+ "type": "number",
446
+ "minimum": 1,
447
+ "maximum": 10000
448
+ },
449
+ "minHeight": {
450
+ "type": "number",
451
+ "minimum": 1,
452
+ "maximum": 10000
453
+ }
454
+ }
455
+ }
456
+ }
457
+ }