@openplanr/protocol 0.8.0 → 0.10.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 (70) hide show
  1. package/README.md +9 -0
  2. package/package.json +17 -1
  3. package/registries/commands.json +22 -22
  4. package/registries/skills.json +136 -58
  5. package/registry/v1.17.0/commands.json +88 -0
  6. package/schemas/v1.16.0/artifact-envelope.schema.json +408 -0
  7. package/schemas/v1.16.0/design-review-bundle.schema.json +590 -0
  8. package/schemas/v1.17.0/artifact-paste-v2.schema.json +52 -0
  9. package/schemas/v1.17.0/artifact-room-append-v3.schema.json +159 -0
  10. package/schemas/v1.17.0/artifact-room-create-v3.schema.json +111 -0
  11. package/schemas/v1.17.0/artifact-room-descriptor-v3.schema.json +92 -0
  12. package/schemas/v1.17.0/artifact-room-event-v3.schema.json +130 -0
  13. package/schemas/v1.17.0/artifact-room-management-v3.schema.json +47 -0
  14. package/schemas/v1.17.0/artifact-room-read-page-v3.schema.json +308 -0
  15. package/schemas/v1.17.0/company-resource-manifest.schema.json +128 -0
  16. package/schemas/v1.17.0/company-resource-upload-prepare.schema.json +164 -0
  17. package/schemas/v1.17.0/company-resource-upload-receipt.schema.json +63 -0
  18. package/schemas/v1.17.0/company-resource-upload-status.schema.json +123 -0
  19. package/schemas/v1.17.0/diagram-authoring-bundle.schema.json +1117 -0
  20. package/schemas/v1.17.0/diagram-edit-transaction.schema.json +3295 -0
  21. package/schemas/v1.17.0/diagram-presentation.schema.json +37 -0
  22. package/schemas/v1.17.0/diagram-review-bundle.schema.json +2439 -0
  23. package/schemas/v1.17.0/encrypted-resource-manifest.schema.json +131 -0
  24. package/schemas/v1.17.0/encrypted-upload-commit.schema.json +38 -0
  25. package/schemas/v1.17.0/encrypted-upload-prepare.schema.json +234 -0
  26. package/schemas/v1.17.0/encrypted-upload-receipt.schema.json +54 -0
  27. package/schemas/v1.17.0/encrypted-upload-status.schema.json +129 -0
  28. package/schemas/v1.17.0/encrypted-workspace-event-v2.schema.json +79 -0
  29. package/schemas/v1.17.0/encrypted-workspace-v2.schema.json +91 -0
  30. package/schemas/v1.17.0/enterprise-agent-handoff.schema.json +985 -0
  31. package/schemas/v1.17.0/enterprise-artifact-revision.schema.json +115 -0
  32. package/schemas/v1.17.0/enterprise-change-proposal.schema.json +379 -0
  33. package/schemas/v1.17.0/enterprise-evidence-reference.schema.json +159 -0
  34. package/schemas/v1.17.0/enterprise-review-thread.schema.json +298 -0
  35. package/schemas/v1.17.0/enterprise-sync-state.schema.json +189 -0
  36. package/schemas/v1.17.0/preview-bridge-message.schema.json +197 -0
  37. package/schemas/v1.17.0/resource-catalog.schema.json +145 -0
  38. package/schemas/v1.17.0/sharing-crypto-aad.schema.json +36 -0
  39. package/schemas/v1.17.0/workspace-management-v2.schema.json +45 -0
  40. package/schemas/v1.17.0/workspace-rotation-v2.schema.json +61 -0
  41. package/schemas/v1.18.0/runtime-lock.schema.json +122 -0
  42. package/src/bounded-json-data.d.mts +2 -0
  43. package/src/bounded-json-data.mjs +56 -0
  44. package/src/browser-contracts.d.mts +14 -1
  45. package/src/browser-contracts.mjs +16 -0
  46. package/src/canonical-json.mjs +17 -16
  47. package/src/contracts.d.mts +1 -1
  48. package/src/contracts.mjs +97 -3
  49. package/src/diagram-authoring-contracts.d.mts +12 -0
  50. package/src/diagram-authoring-contracts.mjs +174 -1
  51. package/src/enterprise-contract-validation.d.mts +44 -0
  52. package/src/enterprise-contract-validation.mjs +279 -0
  53. package/src/enterprise-contracts.mjs +25 -231
  54. package/src/enterprise-resource-contracts.d.mts +72 -0
  55. package/src/enterprise-resource-contracts.mjs +202 -0
  56. package/src/generated/artifact-envelope-metadata.mjs +769 -0
  57. package/src/generated/canonical-registries.mjs +158 -80
  58. package/src/index.d.mts +21 -0
  59. package/src/index.mjs +23 -0
  60. package/src/large-object-contracts.d.mts +107 -0
  61. package/src/large-object-contracts.mjs +473 -0
  62. package/src/large-object-limits.d.mts +16 -0
  63. package/src/large-object-limits.mjs +17 -0
  64. package/src/registries.mjs +1 -0
  65. package/src/review-experience-contracts.d.mts +1 -0
  66. package/src/review-experience-contracts.mjs +25 -4
  67. package/src/sharing-security-contracts.d.mts +63 -0
  68. package/src/sharing-security-contracts.mjs +403 -0
  69. package/src/studio-presentation-contracts.d.mts +92 -0
  70. package/src/studio-presentation-contracts.mjs +287 -0
@@ -0,0 +1,2439 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-review-bundle.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-review-bundle",
6
+ "version": "1.17.0"
7
+ },
8
+ "type": "object",
9
+ "properties": {
10
+ "kind": {
11
+ "const": "openplanr-diagram-review-bundle"
12
+ },
13
+ "schemaVersion": {
14
+ "const": "1.1.0"
15
+ },
16
+ "diagramId": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 160
20
+ },
21
+ "title": {
22
+ "type": "string",
23
+ "maxLength": 8192
24
+ },
25
+ "source": {
26
+ "type": "object",
27
+ "properties": {
28
+ "kind": {
29
+ "enum": [
30
+ "manifest",
31
+ "authoring"
32
+ ]
33
+ },
34
+ "digest": {
35
+ "type": "string",
36
+ "pattern": "^sha256:[a-f0-9]{64}$"
37
+ }
38
+ },
39
+ "required": [
40
+ "kind",
41
+ "digest"
42
+ ],
43
+ "additionalProperties": false
44
+ },
45
+ "rendering": {
46
+ "type": "object",
47
+ "properties": {
48
+ "id": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "maxLength": 160
52
+ },
53
+ "version": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 160
57
+ },
58
+ "fontFamily": {
59
+ "const": "Inter"
60
+ }
61
+ },
62
+ "required": [
63
+ "id",
64
+ "version",
65
+ "fontFamily"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "summary": {
70
+ "type": "string",
71
+ "maxLength": 8192
72
+ },
73
+ "grammar": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 160
77
+ },
78
+ "colorScheme": {
79
+ "enum": [
80
+ "light",
81
+ "dark"
82
+ ]
83
+ },
84
+ "scene": {
85
+ "type": "object",
86
+ "properties": {
87
+ "svg": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "maxLength": 5242880
91
+ },
92
+ "width": {
93
+ "type": "number",
94
+ "exclusiveMinimum": 0,
95
+ "maximum": 16384
96
+ },
97
+ "height": {
98
+ "type": "number",
99
+ "exclusiveMinimum": 0,
100
+ "maximum": 16384
101
+ },
102
+ "items": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "properties": {
107
+ "id": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 160
111
+ },
112
+ "label": {
113
+ "type": "string",
114
+ "maxLength": 8192
115
+ },
116
+ "kind": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 160
120
+ },
121
+ "x": {
122
+ "type": "number"
123
+ },
124
+ "y": {
125
+ "type": "number"
126
+ }
127
+ },
128
+ "required": [
129
+ "id",
130
+ "label",
131
+ "kind",
132
+ "x",
133
+ "y"
134
+ ],
135
+ "additionalProperties": false
136
+ },
137
+ "maxItems": 10000
138
+ },
139
+ "relations": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "properties": {
144
+ "id": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "maxLength": 160
148
+ },
149
+ "from": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 160
153
+ },
154
+ "to": {
155
+ "type": "string",
156
+ "minLength": 1,
157
+ "maxLength": 160
158
+ },
159
+ "label": {
160
+ "type": "string",
161
+ "maxLength": 8192
162
+ },
163
+ "kind": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "maxLength": 160
167
+ }
168
+ },
169
+ "required": [
170
+ "id",
171
+ "from",
172
+ "to",
173
+ "label",
174
+ "kind"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ "maxItems": 10000
179
+ }
180
+ },
181
+ "required": [
182
+ "svg",
183
+ "width",
184
+ "height",
185
+ "items",
186
+ "relations"
187
+ ],
188
+ "additionalProperties": false
189
+ },
190
+ "authored": {
191
+ "oneOf": [
192
+ {
193
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
194
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-authoring-bundle.schema.json",
195
+ "x-openplanr-contract": {
196
+ "id": "diagram-authoring-bundle",
197
+ "version": "1.13.0"
198
+ },
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "properties": {
202
+ "kind": {
203
+ "const": "diagram-authoring-bundle"
204
+ },
205
+ "schemaVersion": {
206
+ "const": "1.0.0"
207
+ },
208
+ "protocolVersion": {
209
+ "const": "1.13.0"
210
+ },
211
+ "diagramId": {
212
+ "type": "string",
213
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
214
+ "minLength": 1,
215
+ "maxLength": 128
216
+ },
217
+ "document": {
218
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
219
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-document.schema.json",
220
+ "x-openplanr-contract": {
221
+ "id": "diagram-document",
222
+ "version": "1.13.0"
223
+ },
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "properties": {
227
+ "kind": {
228
+ "const": "planr-diagram"
229
+ },
230
+ "schemaVersion": {
231
+ "const": "1.0.0"
232
+ },
233
+ "protocolVersion": {
234
+ "const": "1.13.0"
235
+ },
236
+ "diagramId": {
237
+ "type": "string",
238
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
239
+ "minLength": 1,
240
+ "maxLength": 128
241
+ },
242
+ "title": {
243
+ "type": "string",
244
+ "minLength": 0,
245
+ "maxLength": 4096
246
+ },
247
+ "summary": {
248
+ "type": "string",
249
+ "minLength": 0,
250
+ "maxLength": 4096
251
+ },
252
+ "audience": {
253
+ "enum": [
254
+ "engineer",
255
+ "executive",
256
+ "mixed"
257
+ ]
258
+ },
259
+ "grammar": {
260
+ "type": "object",
261
+ "additionalProperties": false,
262
+ "properties": {
263
+ "id": {
264
+ "enum": [
265
+ "flowchart",
266
+ "process",
267
+ "swimlane",
268
+ "architecture"
269
+ ]
270
+ },
271
+ "version": {
272
+ "const": "1.0.0"
273
+ }
274
+ },
275
+ "required": [
276
+ "id",
277
+ "version"
278
+ ]
279
+ },
280
+ "nodes": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "object",
284
+ "additionalProperties": false,
285
+ "properties": {
286
+ "id": {
287
+ "type": "string",
288
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
289
+ "minLength": 1,
290
+ "maxLength": 128
291
+ },
292
+ "label": {
293
+ "type": "string",
294
+ "minLength": 0,
295
+ "maxLength": 4096
296
+ },
297
+ "kind": {
298
+ "enum": [
299
+ "process",
300
+ "start",
301
+ "end",
302
+ "decision",
303
+ "data-store",
304
+ "component"
305
+ ]
306
+ },
307
+ "description": {
308
+ "anyOf": [
309
+ {
310
+ "type": "null"
311
+ },
312
+ {
313
+ "type": "string",
314
+ "minLength": 0,
315
+ "maxLength": 4096
316
+ }
317
+ ]
318
+ }
319
+ },
320
+ "required": [
321
+ "id",
322
+ "label",
323
+ "kind",
324
+ "description"
325
+ ]
326
+ },
327
+ "minItems": 0,
328
+ "maxItems": 4096
329
+ },
330
+ "relations": {
331
+ "type": "array",
332
+ "items": {
333
+ "type": "object",
334
+ "additionalProperties": false,
335
+ "properties": {
336
+ "id": {
337
+ "type": "string",
338
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
339
+ "minLength": 1,
340
+ "maxLength": 128
341
+ },
342
+ "from": {
343
+ "type": "string",
344
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
345
+ "minLength": 1,
346
+ "maxLength": 128
347
+ },
348
+ "to": {
349
+ "type": "string",
350
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
351
+ "minLength": 1,
352
+ "maxLength": 128
353
+ },
354
+ "kind": {
355
+ "enum": [
356
+ "association",
357
+ "dependency",
358
+ "flow",
359
+ "message",
360
+ "transition"
361
+ ]
362
+ },
363
+ "direction": {
364
+ "enum": [
365
+ "forward",
366
+ "both",
367
+ "none"
368
+ ]
369
+ },
370
+ "label": {
371
+ "anyOf": [
372
+ {
373
+ "type": "null"
374
+ },
375
+ {
376
+ "type": "string",
377
+ "minLength": 0,
378
+ "maxLength": 4096
379
+ }
380
+ ]
381
+ },
382
+ "weight": {
383
+ "anyOf": [
384
+ {
385
+ "type": "null"
386
+ },
387
+ {
388
+ "type": "number",
389
+ "minimum": 0,
390
+ "maximum": 1000000
391
+ }
392
+ ]
393
+ }
394
+ },
395
+ "required": [
396
+ "id",
397
+ "from",
398
+ "to",
399
+ "kind",
400
+ "direction",
401
+ "label",
402
+ "weight"
403
+ ]
404
+ },
405
+ "minItems": 0,
406
+ "maxItems": 8192
407
+ },
408
+ "groups": {
409
+ "type": "array",
410
+ "items": {
411
+ "type": "object",
412
+ "additionalProperties": false,
413
+ "properties": {
414
+ "id": {
415
+ "type": "string",
416
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
417
+ "minLength": 1,
418
+ "maxLength": 128
419
+ },
420
+ "label": {
421
+ "type": "string",
422
+ "minLength": 0,
423
+ "maxLength": 4096
424
+ },
425
+ "members": {
426
+ "type": "array",
427
+ "items": {
428
+ "type": "string",
429
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
430
+ "minLength": 1,
431
+ "maxLength": 128
432
+ },
433
+ "minItems": 0,
434
+ "maxItems": 10000,
435
+ "uniqueItems": true
436
+ }
437
+ },
438
+ "required": [
439
+ "id",
440
+ "label",
441
+ "members"
442
+ ]
443
+ },
444
+ "minItems": 0,
445
+ "maxItems": 1024
446
+ },
447
+ "lanes": {
448
+ "type": "array",
449
+ "items": {
450
+ "type": "object",
451
+ "additionalProperties": false,
452
+ "properties": {
453
+ "id": {
454
+ "type": "string",
455
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
456
+ "minLength": 1,
457
+ "maxLength": 128
458
+ },
459
+ "label": {
460
+ "type": "string",
461
+ "minLength": 0,
462
+ "maxLength": 4096
463
+ },
464
+ "members": {
465
+ "type": "array",
466
+ "items": {
467
+ "type": "string",
468
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
469
+ "minLength": 1,
470
+ "maxLength": 128
471
+ },
472
+ "minItems": 0,
473
+ "maxItems": 10000,
474
+ "uniqueItems": true
475
+ }
476
+ },
477
+ "required": [
478
+ "id",
479
+ "label",
480
+ "members"
481
+ ]
482
+ },
483
+ "minItems": 0,
484
+ "maxItems": 256
485
+ },
486
+ "events": {
487
+ "type": "array",
488
+ "items": false,
489
+ "minItems": 0,
490
+ "maxItems": 0
491
+ },
492
+ "series": {
493
+ "type": "array",
494
+ "items": false,
495
+ "minItems": 0,
496
+ "maxItems": 0
497
+ },
498
+ "axes": {
499
+ "type": "array",
500
+ "items": false,
501
+ "minItems": 0,
502
+ "maxItems": 0
503
+ },
504
+ "sets": {
505
+ "type": "array",
506
+ "items": false,
507
+ "minItems": 0,
508
+ "maxItems": 0
509
+ },
510
+ "annotations": {
511
+ "type": "array",
512
+ "items": {
513
+ "type": "object",
514
+ "additionalProperties": false,
515
+ "properties": {
516
+ "id": {
517
+ "type": "string",
518
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
519
+ "minLength": 1,
520
+ "maxLength": 128
521
+ },
522
+ "text": {
523
+ "type": "string",
524
+ "minLength": 0,
525
+ "maxLength": 4096
526
+ },
527
+ "targetId": {
528
+ "anyOf": [
529
+ {
530
+ "type": "null"
531
+ },
532
+ {
533
+ "type": "string",
534
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
535
+ "minLength": 1,
536
+ "maxLength": 128
537
+ }
538
+ ]
539
+ }
540
+ },
541
+ "required": [
542
+ "id",
543
+ "text",
544
+ "targetId"
545
+ ]
546
+ },
547
+ "minItems": 0,
548
+ "maxItems": 1024
549
+ },
550
+ "emphasis": {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "object",
554
+ "additionalProperties": false,
555
+ "properties": {
556
+ "targetId": {
557
+ "type": "string",
558
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
559
+ "minLength": 1,
560
+ "maxLength": 128
561
+ },
562
+ "level": {
563
+ "enum": [
564
+ "primary",
565
+ "secondary",
566
+ "muted"
567
+ ]
568
+ }
569
+ },
570
+ "required": [
571
+ "targetId",
572
+ "level"
573
+ ]
574
+ },
575
+ "minItems": 0,
576
+ "maxItems": 1024
577
+ },
578
+ "laneOrder": {
579
+ "type": "array",
580
+ "items": {
581
+ "type": "string",
582
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
583
+ "minLength": 1,
584
+ "maxLength": 128
585
+ },
586
+ "minItems": 0,
587
+ "maxItems": 10000,
588
+ "uniqueItems": true
589
+ },
590
+ "accessibility": {
591
+ "type": "object",
592
+ "additionalProperties": false,
593
+ "properties": {
594
+ "title": {
595
+ "type": "string",
596
+ "minLength": 0,
597
+ "maxLength": 4096
598
+ },
599
+ "description": {
600
+ "type": "string",
601
+ "minLength": 0,
602
+ "maxLength": 4096
603
+ },
604
+ "readingOrder": {
605
+ "type": "array",
606
+ "items": {
607
+ "type": "string",
608
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
609
+ "minLength": 1,
610
+ "maxLength": 128
611
+ },
612
+ "minItems": 0,
613
+ "maxItems": 10000,
614
+ "uniqueItems": true
615
+ }
616
+ },
617
+ "required": [
618
+ "title",
619
+ "description",
620
+ "readingOrder"
621
+ ]
622
+ },
623
+ "documentDigest": {
624
+ "type": "string",
625
+ "pattern": "^sha256:[a-f0-9]{64}$"
626
+ }
627
+ },
628
+ "required": [
629
+ "kind",
630
+ "schemaVersion",
631
+ "protocolVersion",
632
+ "diagramId",
633
+ "title",
634
+ "summary",
635
+ "audience",
636
+ "grammar",
637
+ "nodes",
638
+ "relations",
639
+ "groups",
640
+ "lanes",
641
+ "events",
642
+ "series",
643
+ "axes",
644
+ "sets",
645
+ "annotations",
646
+ "emphasis",
647
+ "laneOrder",
648
+ "accessibility",
649
+ "documentDigest"
650
+ ]
651
+ },
652
+ "presentation": {
653
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
654
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-presentation.schema.json",
655
+ "x-openplanr-contract": {
656
+ "id": "diagram-presentation",
657
+ "version": "1.13.0"
658
+ },
659
+ "type": "object",
660
+ "additionalProperties": false,
661
+ "properties": {
662
+ "kind": {
663
+ "const": "diagram-presentation"
664
+ },
665
+ "schemaVersion": {
666
+ "const": "1.0.0"
667
+ },
668
+ "protocolVersion": {
669
+ "const": "1.13.0"
670
+ },
671
+ "diagramId": {
672
+ "type": "string",
673
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
674
+ "minLength": 1,
675
+ "maxLength": 128
676
+ },
677
+ "semanticDigest": {
678
+ "type": "string",
679
+ "pattern": "^sha256:[a-f0-9]{64}$"
680
+ },
681
+ "coordinateSystem": {
682
+ "const": "global-canvas"
683
+ },
684
+ "layout": {
685
+ "type": "object",
686
+ "additionalProperties": false,
687
+ "properties": {
688
+ "direction": {
689
+ "enum": [
690
+ "top-down",
691
+ "left-right",
692
+ "right-left",
693
+ "bottom-up"
694
+ ]
695
+ },
696
+ "detailTier": {
697
+ "enum": [
698
+ "simplified",
699
+ "balanced",
700
+ "faithful"
701
+ ]
702
+ }
703
+ },
704
+ "required": [
705
+ "direction",
706
+ "detailTier"
707
+ ]
708
+ },
709
+ "theme": {
710
+ "type": "object",
711
+ "additionalProperties": false,
712
+ "properties": {
713
+ "themeId": {
714
+ "enum": [
715
+ "paper",
716
+ "slate",
717
+ "midnight"
718
+ ]
719
+ },
720
+ "mode": {
721
+ "enum": [
722
+ "light",
723
+ "dark",
724
+ "auto"
725
+ ]
726
+ }
727
+ },
728
+ "required": [
729
+ "themeId",
730
+ "mode"
731
+ ]
732
+ },
733
+ "elements": {
734
+ "type": "array",
735
+ "items": {
736
+ "type": "object",
737
+ "additionalProperties": false,
738
+ "properties": {
739
+ "elementId": {
740
+ "type": "string",
741
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
742
+ "minLength": 1,
743
+ "maxLength": 128
744
+ },
745
+ "bounds": {
746
+ "anyOf": [
747
+ {
748
+ "type": "null"
749
+ },
750
+ {
751
+ "type": "object",
752
+ "additionalProperties": false,
753
+ "properties": {
754
+ "x": {
755
+ "type": "number",
756
+ "minimum": -1000000,
757
+ "maximum": 1000000
758
+ },
759
+ "y": {
760
+ "type": "number",
761
+ "minimum": -1000000,
762
+ "maximum": 1000000
763
+ },
764
+ "width": {
765
+ "type": "number",
766
+ "minimum": 0.01,
767
+ "maximum": 1000000
768
+ },
769
+ "height": {
770
+ "type": "number",
771
+ "minimum": 0.01,
772
+ "maximum": 1000000
773
+ }
774
+ },
775
+ "required": [
776
+ "x",
777
+ "y",
778
+ "width",
779
+ "height"
780
+ ]
781
+ }
782
+ ]
783
+ },
784
+ "route": {
785
+ "anyOf": [
786
+ {
787
+ "type": "null"
788
+ },
789
+ {
790
+ "type": "object",
791
+ "additionalProperties": false,
792
+ "properties": {
793
+ "mode": {
794
+ "enum": [
795
+ "automatic",
796
+ "manual"
797
+ ]
798
+ },
799
+ "strategy": {
800
+ "enum": [
801
+ "straight",
802
+ "orthogonal"
803
+ ]
804
+ },
805
+ "from": {
806
+ "type": "object",
807
+ "additionalProperties": false,
808
+ "properties": {
809
+ "side": {
810
+ "enum": [
811
+ "top",
812
+ "right",
813
+ "bottom",
814
+ "left"
815
+ ]
816
+ },
817
+ "offset": {
818
+ "type": "number",
819
+ "minimum": 0,
820
+ "maximum": 1
821
+ }
822
+ },
823
+ "required": [
824
+ "side",
825
+ "offset"
826
+ ]
827
+ },
828
+ "to": {
829
+ "type": "object",
830
+ "additionalProperties": false,
831
+ "properties": {
832
+ "side": {
833
+ "enum": [
834
+ "top",
835
+ "right",
836
+ "bottom",
837
+ "left"
838
+ ]
839
+ },
840
+ "offset": {
841
+ "type": "number",
842
+ "minimum": 0,
843
+ "maximum": 1
844
+ }
845
+ },
846
+ "required": [
847
+ "side",
848
+ "offset"
849
+ ]
850
+ },
851
+ "points": {
852
+ "type": "array",
853
+ "items": {
854
+ "type": "object",
855
+ "additionalProperties": false,
856
+ "properties": {
857
+ "x": {
858
+ "type": "number",
859
+ "minimum": -1000000,
860
+ "maximum": 1000000
861
+ },
862
+ "y": {
863
+ "type": "number",
864
+ "minimum": -1000000,
865
+ "maximum": 1000000
866
+ }
867
+ },
868
+ "required": [
869
+ "x",
870
+ "y"
871
+ ]
872
+ },
873
+ "minItems": 0,
874
+ "maxItems": 256
875
+ }
876
+ },
877
+ "required": [
878
+ "mode",
879
+ "strategy",
880
+ "from",
881
+ "to",
882
+ "points"
883
+ ]
884
+ }
885
+ ]
886
+ },
887
+ "label": {
888
+ "anyOf": [
889
+ {
890
+ "type": "null"
891
+ },
892
+ {
893
+ "type": "object",
894
+ "additionalProperties": false,
895
+ "properties": {
896
+ "x": {
897
+ "type": "number",
898
+ "minimum": -1000000,
899
+ "maximum": 1000000
900
+ },
901
+ "y": {
902
+ "type": "number",
903
+ "minimum": -1000000,
904
+ "maximum": 1000000
905
+ },
906
+ "width": {
907
+ "type": "number",
908
+ "minimum": 0.01,
909
+ "maximum": 1000000
910
+ }
911
+ },
912
+ "required": [
913
+ "x",
914
+ "y",
915
+ "width"
916
+ ]
917
+ }
918
+ ]
919
+ },
920
+ "zIndex": {
921
+ "type": "integer",
922
+ "minimum": 0,
923
+ "maximum": 10000
924
+ },
925
+ "appearance": {
926
+ "type": "object",
927
+ "additionalProperties": false,
928
+ "properties": {
929
+ "shape": {
930
+ "enum": [
931
+ "rectangle",
932
+ "rounded-rectangle",
933
+ "ellipse",
934
+ "diamond",
935
+ "cylinder",
936
+ "text",
937
+ "container",
938
+ "connector"
939
+ ]
940
+ },
941
+ "fill": {
942
+ "enum": [
943
+ "surface",
944
+ "accent",
945
+ "success",
946
+ "warning",
947
+ "danger",
948
+ "transparent"
949
+ ]
950
+ },
951
+ "stroke": {
952
+ "enum": [
953
+ "default",
954
+ "accent",
955
+ "muted",
956
+ "danger",
957
+ "none"
958
+ ]
959
+ },
960
+ "strokeWidth": {
961
+ "type": "number",
962
+ "minimum": 0,
963
+ "maximum": 16
964
+ },
965
+ "strokeStyle": {
966
+ "enum": [
967
+ "solid",
968
+ "dashed",
969
+ "dotted"
970
+ ]
971
+ },
972
+ "fontSize": {
973
+ "type": "integer",
974
+ "minimum": 8,
975
+ "maximum": 72
976
+ },
977
+ "textAlign": {
978
+ "enum": [
979
+ "left",
980
+ "center",
981
+ "right"
982
+ ]
983
+ }
984
+ },
985
+ "required": [
986
+ "shape",
987
+ "fill",
988
+ "stroke",
989
+ "strokeWidth",
990
+ "strokeStyle",
991
+ "fontSize",
992
+ "textAlign"
993
+ ]
994
+ },
995
+ "locks": {
996
+ "type": "object",
997
+ "additionalProperties": false,
998
+ "properties": {
999
+ "position": {
1000
+ "type": "boolean"
1001
+ },
1002
+ "size": {
1003
+ "type": "boolean"
1004
+ },
1005
+ "route": {
1006
+ "type": "boolean"
1007
+ }
1008
+ },
1009
+ "required": [
1010
+ "position",
1011
+ "size",
1012
+ "route"
1013
+ ]
1014
+ }
1015
+ },
1016
+ "required": [
1017
+ "elementId",
1018
+ "bounds",
1019
+ "route",
1020
+ "label",
1021
+ "zIndex",
1022
+ "appearance",
1023
+ "locks"
1024
+ ]
1025
+ },
1026
+ "minItems": 0,
1027
+ "maxItems": 10000
1028
+ },
1029
+ "presentationDigest": {
1030
+ "type": "string",
1031
+ "pattern": "^sha256:[a-f0-9]{64}$"
1032
+ }
1033
+ },
1034
+ "required": [
1035
+ "kind",
1036
+ "schemaVersion",
1037
+ "protocolVersion",
1038
+ "diagramId",
1039
+ "semanticDigest",
1040
+ "coordinateSystem",
1041
+ "layout",
1042
+ "theme",
1043
+ "elements",
1044
+ "presentationDigest"
1045
+ ]
1046
+ },
1047
+ "originalSource": {
1048
+ "anyOf": [
1049
+ {
1050
+ "type": "null"
1051
+ },
1052
+ {
1053
+ "type": "object",
1054
+ "additionalProperties": false,
1055
+ "properties": {
1056
+ "format": {
1057
+ "const": "mermaid"
1058
+ },
1059
+ "text": {
1060
+ "type": "string",
1061
+ "minLength": 0,
1062
+ "maxLength": 1048576
1063
+ },
1064
+ "sourceDigest": {
1065
+ "type": "string",
1066
+ "pattern": "^sha256:[a-f0-9]{64}$"
1067
+ }
1068
+ },
1069
+ "required": [
1070
+ "format",
1071
+ "text",
1072
+ "sourceDigest"
1073
+ ]
1074
+ }
1075
+ ]
1076
+ },
1077
+ "sourceMap": {
1078
+ "anyOf": [
1079
+ {
1080
+ "type": "null"
1081
+ },
1082
+ {
1083
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1084
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-source-map.schema.json",
1085
+ "x-openplanr-contract": {
1086
+ "id": "diagram-source-map",
1087
+ "version": "1.13.0"
1088
+ },
1089
+ "type": "object",
1090
+ "additionalProperties": false,
1091
+ "properties": {
1092
+ "kind": {
1093
+ "const": "diagram-source-map"
1094
+ },
1095
+ "schemaVersion": {
1096
+ "const": "1.0.0"
1097
+ },
1098
+ "protocolVersion": {
1099
+ "const": "1.13.0"
1100
+ },
1101
+ "diagramId": {
1102
+ "type": "string",
1103
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1104
+ "minLength": 1,
1105
+ "maxLength": 128
1106
+ },
1107
+ "semanticDigest": {
1108
+ "type": "string",
1109
+ "pattern": "^sha256:[a-f0-9]{64}$"
1110
+ },
1111
+ "sourceDigest": {
1112
+ "type": "string",
1113
+ "pattern": "^sha256:[a-f0-9]{64}$"
1114
+ },
1115
+ "sourceByteLength": {
1116
+ "type": "integer",
1117
+ "minimum": 0,
1118
+ "maximum": 1048576
1119
+ },
1120
+ "encoding": {
1121
+ "const": "utf-8"
1122
+ },
1123
+ "parser": {
1124
+ "type": "object",
1125
+ "additionalProperties": false,
1126
+ "properties": {
1127
+ "id": {
1128
+ "type": "string",
1129
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1130
+ "maxLength": 64
1131
+ },
1132
+ "version": {
1133
+ "type": "string",
1134
+ "minLength": 1,
1135
+ "maxLength": 64
1136
+ }
1137
+ },
1138
+ "required": [
1139
+ "id",
1140
+ "version"
1141
+ ]
1142
+ },
1143
+ "certificationVersion": {
1144
+ "const": "flowchart-copy-v1"
1145
+ },
1146
+ "entries": {
1147
+ "type": "array",
1148
+ "items": {
1149
+ "type": "object",
1150
+ "additionalProperties": false,
1151
+ "properties": {
1152
+ "sourceId": {
1153
+ "anyOf": [
1154
+ {
1155
+ "type": "null"
1156
+ },
1157
+ {
1158
+ "type": "string",
1159
+ "minLength": 1,
1160
+ "maxLength": 128
1161
+ }
1162
+ ]
1163
+ },
1164
+ "elementIds": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "string",
1168
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1169
+ "minLength": 1,
1170
+ "maxLength": 128
1171
+ },
1172
+ "minItems": 0,
1173
+ "maxItems": 10000,
1174
+ "uniqueItems": true
1175
+ },
1176
+ "range": {
1177
+ "anyOf": [
1178
+ {
1179
+ "type": "null"
1180
+ },
1181
+ {
1182
+ "type": "object",
1183
+ "additionalProperties": false,
1184
+ "properties": {
1185
+ "startByte": {
1186
+ "type": "integer",
1187
+ "minimum": 0,
1188
+ "maximum": 1048576
1189
+ },
1190
+ "endByte": {
1191
+ "type": "integer",
1192
+ "minimum": 0,
1193
+ "maximum": 1048576
1194
+ }
1195
+ },
1196
+ "required": [
1197
+ "startByte",
1198
+ "endByte"
1199
+ ]
1200
+ }
1201
+ ]
1202
+ },
1203
+ "construct": {
1204
+ "type": "string",
1205
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1206
+ "maxLength": 64
1207
+ },
1208
+ "confidence": {
1209
+ "enum": [
1210
+ "exact",
1211
+ "ambiguous"
1212
+ ]
1213
+ },
1214
+ "losses": {
1215
+ "type": "array",
1216
+ "items": {
1217
+ "type": "string",
1218
+ "minLength": 1,
1219
+ "maxLength": 512
1220
+ },
1221
+ "minItems": 0,
1222
+ "maxItems": 64
1223
+ }
1224
+ },
1225
+ "required": [
1226
+ "sourceId",
1227
+ "elementIds",
1228
+ "range",
1229
+ "construct",
1230
+ "confidence",
1231
+ "losses"
1232
+ ]
1233
+ },
1234
+ "minItems": 0,
1235
+ "maxItems": 10000
1236
+ }
1237
+ },
1238
+ "required": [
1239
+ "kind",
1240
+ "schemaVersion",
1241
+ "protocolVersion",
1242
+ "diagramId",
1243
+ "semanticDigest",
1244
+ "sourceDigest",
1245
+ "sourceByteLength",
1246
+ "encoding",
1247
+ "parser",
1248
+ "certificationVersion",
1249
+ "entries"
1250
+ ]
1251
+ }
1252
+ ]
1253
+ },
1254
+ "bundleDigest": {
1255
+ "type": "string",
1256
+ "pattern": "^sha256:[a-f0-9]{64}$"
1257
+ }
1258
+ },
1259
+ "required": [
1260
+ "kind",
1261
+ "schemaVersion",
1262
+ "protocolVersion",
1263
+ "diagramId",
1264
+ "document",
1265
+ "presentation",
1266
+ "originalSource",
1267
+ "sourceMap",
1268
+ "bundleDigest"
1269
+ ]
1270
+ },
1271
+ {
1272
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1273
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-authoring-bundle.schema.json",
1274
+ "x-openplanr-contract": {
1275
+ "id": "diagram-authoring-bundle",
1276
+ "version": "1.17.0"
1277
+ },
1278
+ "type": "object",
1279
+ "additionalProperties": false,
1280
+ "properties": {
1281
+ "kind": {
1282
+ "const": "diagram-authoring-bundle"
1283
+ },
1284
+ "schemaVersion": {
1285
+ "const": "1.1.0"
1286
+ },
1287
+ "protocolVersion": {
1288
+ "const": "1.17.0"
1289
+ },
1290
+ "diagramId": {
1291
+ "type": "string",
1292
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1293
+ "minLength": 1,
1294
+ "maxLength": 128
1295
+ },
1296
+ "document": {
1297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1298
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-document.schema.json",
1299
+ "x-openplanr-contract": {
1300
+ "id": "diagram-document",
1301
+ "version": "1.13.0"
1302
+ },
1303
+ "type": "object",
1304
+ "additionalProperties": false,
1305
+ "properties": {
1306
+ "kind": {
1307
+ "const": "planr-diagram"
1308
+ },
1309
+ "schemaVersion": {
1310
+ "const": "1.0.0"
1311
+ },
1312
+ "protocolVersion": {
1313
+ "const": "1.13.0"
1314
+ },
1315
+ "diagramId": {
1316
+ "type": "string",
1317
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1318
+ "minLength": 1,
1319
+ "maxLength": 128
1320
+ },
1321
+ "title": {
1322
+ "type": "string",
1323
+ "minLength": 0,
1324
+ "maxLength": 4096
1325
+ },
1326
+ "summary": {
1327
+ "type": "string",
1328
+ "minLength": 0,
1329
+ "maxLength": 4096
1330
+ },
1331
+ "audience": {
1332
+ "enum": [
1333
+ "engineer",
1334
+ "executive",
1335
+ "mixed"
1336
+ ]
1337
+ },
1338
+ "grammar": {
1339
+ "type": "object",
1340
+ "additionalProperties": false,
1341
+ "properties": {
1342
+ "id": {
1343
+ "enum": [
1344
+ "flowchart",
1345
+ "process",
1346
+ "swimlane",
1347
+ "architecture"
1348
+ ]
1349
+ },
1350
+ "version": {
1351
+ "const": "1.0.0"
1352
+ }
1353
+ },
1354
+ "required": [
1355
+ "id",
1356
+ "version"
1357
+ ]
1358
+ },
1359
+ "nodes": {
1360
+ "type": "array",
1361
+ "items": {
1362
+ "type": "object",
1363
+ "additionalProperties": false,
1364
+ "properties": {
1365
+ "id": {
1366
+ "type": "string",
1367
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1368
+ "minLength": 1,
1369
+ "maxLength": 128
1370
+ },
1371
+ "label": {
1372
+ "type": "string",
1373
+ "minLength": 0,
1374
+ "maxLength": 4096
1375
+ },
1376
+ "kind": {
1377
+ "enum": [
1378
+ "process",
1379
+ "start",
1380
+ "end",
1381
+ "decision",
1382
+ "data-store",
1383
+ "component"
1384
+ ]
1385
+ },
1386
+ "description": {
1387
+ "anyOf": [
1388
+ {
1389
+ "type": "null"
1390
+ },
1391
+ {
1392
+ "type": "string",
1393
+ "minLength": 0,
1394
+ "maxLength": 4096
1395
+ }
1396
+ ]
1397
+ }
1398
+ },
1399
+ "required": [
1400
+ "id",
1401
+ "label",
1402
+ "kind",
1403
+ "description"
1404
+ ]
1405
+ },
1406
+ "minItems": 0,
1407
+ "maxItems": 4096
1408
+ },
1409
+ "relations": {
1410
+ "type": "array",
1411
+ "items": {
1412
+ "type": "object",
1413
+ "additionalProperties": false,
1414
+ "properties": {
1415
+ "id": {
1416
+ "type": "string",
1417
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1418
+ "minLength": 1,
1419
+ "maxLength": 128
1420
+ },
1421
+ "from": {
1422
+ "type": "string",
1423
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1424
+ "minLength": 1,
1425
+ "maxLength": 128
1426
+ },
1427
+ "to": {
1428
+ "type": "string",
1429
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1430
+ "minLength": 1,
1431
+ "maxLength": 128
1432
+ },
1433
+ "kind": {
1434
+ "enum": [
1435
+ "association",
1436
+ "dependency",
1437
+ "flow",
1438
+ "message",
1439
+ "transition"
1440
+ ]
1441
+ },
1442
+ "direction": {
1443
+ "enum": [
1444
+ "forward",
1445
+ "both",
1446
+ "none"
1447
+ ]
1448
+ },
1449
+ "label": {
1450
+ "anyOf": [
1451
+ {
1452
+ "type": "null"
1453
+ },
1454
+ {
1455
+ "type": "string",
1456
+ "minLength": 0,
1457
+ "maxLength": 4096
1458
+ }
1459
+ ]
1460
+ },
1461
+ "weight": {
1462
+ "anyOf": [
1463
+ {
1464
+ "type": "null"
1465
+ },
1466
+ {
1467
+ "type": "number",
1468
+ "minimum": 0,
1469
+ "maximum": 1000000
1470
+ }
1471
+ ]
1472
+ }
1473
+ },
1474
+ "required": [
1475
+ "id",
1476
+ "from",
1477
+ "to",
1478
+ "kind",
1479
+ "direction",
1480
+ "label",
1481
+ "weight"
1482
+ ]
1483
+ },
1484
+ "minItems": 0,
1485
+ "maxItems": 8192
1486
+ },
1487
+ "groups": {
1488
+ "type": "array",
1489
+ "items": {
1490
+ "type": "object",
1491
+ "additionalProperties": false,
1492
+ "properties": {
1493
+ "id": {
1494
+ "type": "string",
1495
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1496
+ "minLength": 1,
1497
+ "maxLength": 128
1498
+ },
1499
+ "label": {
1500
+ "type": "string",
1501
+ "minLength": 0,
1502
+ "maxLength": 4096
1503
+ },
1504
+ "members": {
1505
+ "type": "array",
1506
+ "items": {
1507
+ "type": "string",
1508
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1509
+ "minLength": 1,
1510
+ "maxLength": 128
1511
+ },
1512
+ "minItems": 0,
1513
+ "maxItems": 10000,
1514
+ "uniqueItems": true
1515
+ }
1516
+ },
1517
+ "required": [
1518
+ "id",
1519
+ "label",
1520
+ "members"
1521
+ ]
1522
+ },
1523
+ "minItems": 0,
1524
+ "maxItems": 1024
1525
+ },
1526
+ "lanes": {
1527
+ "type": "array",
1528
+ "items": {
1529
+ "type": "object",
1530
+ "additionalProperties": false,
1531
+ "properties": {
1532
+ "id": {
1533
+ "type": "string",
1534
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1535
+ "minLength": 1,
1536
+ "maxLength": 128
1537
+ },
1538
+ "label": {
1539
+ "type": "string",
1540
+ "minLength": 0,
1541
+ "maxLength": 4096
1542
+ },
1543
+ "members": {
1544
+ "type": "array",
1545
+ "items": {
1546
+ "type": "string",
1547
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1548
+ "minLength": 1,
1549
+ "maxLength": 128
1550
+ },
1551
+ "minItems": 0,
1552
+ "maxItems": 10000,
1553
+ "uniqueItems": true
1554
+ }
1555
+ },
1556
+ "required": [
1557
+ "id",
1558
+ "label",
1559
+ "members"
1560
+ ]
1561
+ },
1562
+ "minItems": 0,
1563
+ "maxItems": 256
1564
+ },
1565
+ "events": {
1566
+ "type": "array",
1567
+ "items": false,
1568
+ "minItems": 0,
1569
+ "maxItems": 0
1570
+ },
1571
+ "series": {
1572
+ "type": "array",
1573
+ "items": false,
1574
+ "minItems": 0,
1575
+ "maxItems": 0
1576
+ },
1577
+ "axes": {
1578
+ "type": "array",
1579
+ "items": false,
1580
+ "minItems": 0,
1581
+ "maxItems": 0
1582
+ },
1583
+ "sets": {
1584
+ "type": "array",
1585
+ "items": false,
1586
+ "minItems": 0,
1587
+ "maxItems": 0
1588
+ },
1589
+ "annotations": {
1590
+ "type": "array",
1591
+ "items": {
1592
+ "type": "object",
1593
+ "additionalProperties": false,
1594
+ "properties": {
1595
+ "id": {
1596
+ "type": "string",
1597
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1598
+ "minLength": 1,
1599
+ "maxLength": 128
1600
+ },
1601
+ "text": {
1602
+ "type": "string",
1603
+ "minLength": 0,
1604
+ "maxLength": 4096
1605
+ },
1606
+ "targetId": {
1607
+ "anyOf": [
1608
+ {
1609
+ "type": "null"
1610
+ },
1611
+ {
1612
+ "type": "string",
1613
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1614
+ "minLength": 1,
1615
+ "maxLength": 128
1616
+ }
1617
+ ]
1618
+ }
1619
+ },
1620
+ "required": [
1621
+ "id",
1622
+ "text",
1623
+ "targetId"
1624
+ ]
1625
+ },
1626
+ "minItems": 0,
1627
+ "maxItems": 1024
1628
+ },
1629
+ "emphasis": {
1630
+ "type": "array",
1631
+ "items": {
1632
+ "type": "object",
1633
+ "additionalProperties": false,
1634
+ "properties": {
1635
+ "targetId": {
1636
+ "type": "string",
1637
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1638
+ "minLength": 1,
1639
+ "maxLength": 128
1640
+ },
1641
+ "level": {
1642
+ "enum": [
1643
+ "primary",
1644
+ "secondary",
1645
+ "muted"
1646
+ ]
1647
+ }
1648
+ },
1649
+ "required": [
1650
+ "targetId",
1651
+ "level"
1652
+ ]
1653
+ },
1654
+ "minItems": 0,
1655
+ "maxItems": 1024
1656
+ },
1657
+ "laneOrder": {
1658
+ "type": "array",
1659
+ "items": {
1660
+ "type": "string",
1661
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1662
+ "minLength": 1,
1663
+ "maxLength": 128
1664
+ },
1665
+ "minItems": 0,
1666
+ "maxItems": 10000,
1667
+ "uniqueItems": true
1668
+ },
1669
+ "accessibility": {
1670
+ "type": "object",
1671
+ "additionalProperties": false,
1672
+ "properties": {
1673
+ "title": {
1674
+ "type": "string",
1675
+ "minLength": 0,
1676
+ "maxLength": 4096
1677
+ },
1678
+ "description": {
1679
+ "type": "string",
1680
+ "minLength": 0,
1681
+ "maxLength": 4096
1682
+ },
1683
+ "readingOrder": {
1684
+ "type": "array",
1685
+ "items": {
1686
+ "type": "string",
1687
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1688
+ "minLength": 1,
1689
+ "maxLength": 128
1690
+ },
1691
+ "minItems": 0,
1692
+ "maxItems": 10000,
1693
+ "uniqueItems": true
1694
+ }
1695
+ },
1696
+ "required": [
1697
+ "title",
1698
+ "description",
1699
+ "readingOrder"
1700
+ ]
1701
+ },
1702
+ "documentDigest": {
1703
+ "type": "string",
1704
+ "pattern": "^sha256:[a-f0-9]{64}$"
1705
+ }
1706
+ },
1707
+ "required": [
1708
+ "kind",
1709
+ "schemaVersion",
1710
+ "protocolVersion",
1711
+ "diagramId",
1712
+ "title",
1713
+ "summary",
1714
+ "audience",
1715
+ "grammar",
1716
+ "nodes",
1717
+ "relations",
1718
+ "groups",
1719
+ "lanes",
1720
+ "events",
1721
+ "series",
1722
+ "axes",
1723
+ "sets",
1724
+ "annotations",
1725
+ "emphasis",
1726
+ "laneOrder",
1727
+ "accessibility",
1728
+ "documentDigest"
1729
+ ]
1730
+ },
1731
+ "presentation": {
1732
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1733
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-presentation.schema.json",
1734
+ "x-openplanr-contract": {
1735
+ "id": "diagram-presentation",
1736
+ "version": "1.13.0"
1737
+ },
1738
+ "type": "object",
1739
+ "additionalProperties": false,
1740
+ "properties": {
1741
+ "kind": {
1742
+ "const": "diagram-presentation"
1743
+ },
1744
+ "schemaVersion": {
1745
+ "const": "1.0.0"
1746
+ },
1747
+ "protocolVersion": {
1748
+ "const": "1.13.0"
1749
+ },
1750
+ "diagramId": {
1751
+ "type": "string",
1752
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1753
+ "minLength": 1,
1754
+ "maxLength": 128
1755
+ },
1756
+ "semanticDigest": {
1757
+ "type": "string",
1758
+ "pattern": "^sha256:[a-f0-9]{64}$"
1759
+ },
1760
+ "coordinateSystem": {
1761
+ "const": "global-canvas"
1762
+ },
1763
+ "layout": {
1764
+ "type": "object",
1765
+ "additionalProperties": false,
1766
+ "properties": {
1767
+ "direction": {
1768
+ "enum": [
1769
+ "top-down",
1770
+ "left-right",
1771
+ "right-left",
1772
+ "bottom-up"
1773
+ ]
1774
+ },
1775
+ "detailTier": {
1776
+ "enum": [
1777
+ "simplified",
1778
+ "balanced",
1779
+ "faithful"
1780
+ ]
1781
+ }
1782
+ },
1783
+ "required": [
1784
+ "direction",
1785
+ "detailTier"
1786
+ ]
1787
+ },
1788
+ "theme": {
1789
+ "type": "object",
1790
+ "additionalProperties": false,
1791
+ "properties": {
1792
+ "themeId": {
1793
+ "enum": [
1794
+ "paper",
1795
+ "slate",
1796
+ "midnight"
1797
+ ]
1798
+ },
1799
+ "mode": {
1800
+ "enum": [
1801
+ "light",
1802
+ "dark",
1803
+ "auto"
1804
+ ]
1805
+ }
1806
+ },
1807
+ "required": [
1808
+ "themeId",
1809
+ "mode"
1810
+ ]
1811
+ },
1812
+ "elements": {
1813
+ "type": "array",
1814
+ "items": {
1815
+ "type": "object",
1816
+ "additionalProperties": false,
1817
+ "properties": {
1818
+ "elementId": {
1819
+ "type": "string",
1820
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1821
+ "minLength": 1,
1822
+ "maxLength": 128
1823
+ },
1824
+ "bounds": {
1825
+ "anyOf": [
1826
+ {
1827
+ "type": "null"
1828
+ },
1829
+ {
1830
+ "type": "object",
1831
+ "additionalProperties": false,
1832
+ "properties": {
1833
+ "x": {
1834
+ "type": "number",
1835
+ "minimum": -1000000,
1836
+ "maximum": 1000000
1837
+ },
1838
+ "y": {
1839
+ "type": "number",
1840
+ "minimum": -1000000,
1841
+ "maximum": 1000000
1842
+ },
1843
+ "width": {
1844
+ "type": "number",
1845
+ "minimum": 0.01,
1846
+ "maximum": 1000000
1847
+ },
1848
+ "height": {
1849
+ "type": "number",
1850
+ "minimum": 0.01,
1851
+ "maximum": 1000000
1852
+ }
1853
+ },
1854
+ "required": [
1855
+ "x",
1856
+ "y",
1857
+ "width",
1858
+ "height"
1859
+ ]
1860
+ }
1861
+ ]
1862
+ },
1863
+ "route": {
1864
+ "anyOf": [
1865
+ {
1866
+ "type": "null"
1867
+ },
1868
+ {
1869
+ "type": "object",
1870
+ "additionalProperties": false,
1871
+ "properties": {
1872
+ "mode": {
1873
+ "enum": [
1874
+ "automatic",
1875
+ "manual"
1876
+ ]
1877
+ },
1878
+ "strategy": {
1879
+ "enum": [
1880
+ "straight",
1881
+ "orthogonal"
1882
+ ]
1883
+ },
1884
+ "from": {
1885
+ "type": "object",
1886
+ "additionalProperties": false,
1887
+ "properties": {
1888
+ "side": {
1889
+ "enum": [
1890
+ "top",
1891
+ "right",
1892
+ "bottom",
1893
+ "left"
1894
+ ]
1895
+ },
1896
+ "offset": {
1897
+ "type": "number",
1898
+ "minimum": 0,
1899
+ "maximum": 1
1900
+ }
1901
+ },
1902
+ "required": [
1903
+ "side",
1904
+ "offset"
1905
+ ]
1906
+ },
1907
+ "to": {
1908
+ "type": "object",
1909
+ "additionalProperties": false,
1910
+ "properties": {
1911
+ "side": {
1912
+ "enum": [
1913
+ "top",
1914
+ "right",
1915
+ "bottom",
1916
+ "left"
1917
+ ]
1918
+ },
1919
+ "offset": {
1920
+ "type": "number",
1921
+ "minimum": 0,
1922
+ "maximum": 1
1923
+ }
1924
+ },
1925
+ "required": [
1926
+ "side",
1927
+ "offset"
1928
+ ]
1929
+ },
1930
+ "points": {
1931
+ "type": "array",
1932
+ "items": {
1933
+ "type": "object",
1934
+ "additionalProperties": false,
1935
+ "properties": {
1936
+ "x": {
1937
+ "type": "number",
1938
+ "minimum": -1000000,
1939
+ "maximum": 1000000
1940
+ },
1941
+ "y": {
1942
+ "type": "number",
1943
+ "minimum": -1000000,
1944
+ "maximum": 1000000
1945
+ }
1946
+ },
1947
+ "required": [
1948
+ "x",
1949
+ "y"
1950
+ ]
1951
+ },
1952
+ "minItems": 0,
1953
+ "maxItems": 256
1954
+ }
1955
+ },
1956
+ "required": [
1957
+ "mode",
1958
+ "strategy",
1959
+ "from",
1960
+ "to",
1961
+ "points"
1962
+ ]
1963
+ }
1964
+ ]
1965
+ },
1966
+ "label": {
1967
+ "anyOf": [
1968
+ {
1969
+ "type": "null"
1970
+ },
1971
+ {
1972
+ "type": "object",
1973
+ "additionalProperties": false,
1974
+ "properties": {
1975
+ "x": {
1976
+ "type": "number",
1977
+ "minimum": -1000000,
1978
+ "maximum": 1000000
1979
+ },
1980
+ "y": {
1981
+ "type": "number",
1982
+ "minimum": -1000000,
1983
+ "maximum": 1000000
1984
+ },
1985
+ "width": {
1986
+ "type": "number",
1987
+ "minimum": 0.01,
1988
+ "maximum": 1000000
1989
+ }
1990
+ },
1991
+ "required": [
1992
+ "x",
1993
+ "y",
1994
+ "width"
1995
+ ]
1996
+ }
1997
+ ]
1998
+ },
1999
+ "zIndex": {
2000
+ "type": "integer",
2001
+ "minimum": 0,
2002
+ "maximum": 10000
2003
+ },
2004
+ "appearance": {
2005
+ "type": "object",
2006
+ "additionalProperties": false,
2007
+ "properties": {
2008
+ "shape": {
2009
+ "enum": [
2010
+ "rectangle",
2011
+ "rounded-rectangle",
2012
+ "ellipse",
2013
+ "diamond",
2014
+ "cylinder",
2015
+ "text",
2016
+ "container",
2017
+ "connector"
2018
+ ]
2019
+ },
2020
+ "fill": {
2021
+ "enum": [
2022
+ "surface",
2023
+ "accent",
2024
+ "success",
2025
+ "warning",
2026
+ "danger",
2027
+ "transparent"
2028
+ ]
2029
+ },
2030
+ "stroke": {
2031
+ "enum": [
2032
+ "default",
2033
+ "accent",
2034
+ "muted",
2035
+ "danger",
2036
+ "none"
2037
+ ]
2038
+ },
2039
+ "strokeWidth": {
2040
+ "type": "number",
2041
+ "minimum": 0,
2042
+ "maximum": 16
2043
+ },
2044
+ "strokeStyle": {
2045
+ "enum": [
2046
+ "solid",
2047
+ "dashed",
2048
+ "dotted"
2049
+ ]
2050
+ },
2051
+ "fontSize": {
2052
+ "type": "integer",
2053
+ "minimum": 8,
2054
+ "maximum": 72
2055
+ },
2056
+ "textAlign": {
2057
+ "enum": [
2058
+ "left",
2059
+ "center",
2060
+ "right"
2061
+ ]
2062
+ }
2063
+ },
2064
+ "required": [
2065
+ "shape",
2066
+ "fill",
2067
+ "stroke",
2068
+ "strokeWidth",
2069
+ "strokeStyle",
2070
+ "fontSize",
2071
+ "textAlign"
2072
+ ]
2073
+ },
2074
+ "locks": {
2075
+ "type": "object",
2076
+ "additionalProperties": false,
2077
+ "properties": {
2078
+ "position": {
2079
+ "type": "boolean"
2080
+ },
2081
+ "size": {
2082
+ "type": "boolean"
2083
+ },
2084
+ "route": {
2085
+ "type": "boolean"
2086
+ }
2087
+ },
2088
+ "required": [
2089
+ "position",
2090
+ "size",
2091
+ "route"
2092
+ ]
2093
+ }
2094
+ },
2095
+ "required": [
2096
+ "elementId",
2097
+ "bounds",
2098
+ "route",
2099
+ "label",
2100
+ "zIndex",
2101
+ "appearance",
2102
+ "locks"
2103
+ ]
2104
+ },
2105
+ "minItems": 0,
2106
+ "maxItems": 10000
2107
+ },
2108
+ "presentationDigest": {
2109
+ "type": "string",
2110
+ "pattern": "^sha256:[a-f0-9]{64}$"
2111
+ }
2112
+ },
2113
+ "required": [
2114
+ "kind",
2115
+ "schemaVersion",
2116
+ "protocolVersion",
2117
+ "diagramId",
2118
+ "semanticDigest",
2119
+ "coordinateSystem",
2120
+ "layout",
2121
+ "theme",
2122
+ "elements",
2123
+ "presentationDigest"
2124
+ ]
2125
+ },
2126
+ "originalSource": {
2127
+ "anyOf": [
2128
+ {
2129
+ "type": "null"
2130
+ },
2131
+ {
2132
+ "type": "object",
2133
+ "additionalProperties": false,
2134
+ "properties": {
2135
+ "format": {
2136
+ "const": "mermaid"
2137
+ },
2138
+ "text": {
2139
+ "type": "string",
2140
+ "minLength": 0,
2141
+ "maxLength": 1048576
2142
+ },
2143
+ "sourceDigest": {
2144
+ "type": "string",
2145
+ "pattern": "^sha256:[a-f0-9]{64}$"
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "format",
2150
+ "text",
2151
+ "sourceDigest"
2152
+ ]
2153
+ }
2154
+ ]
2155
+ },
2156
+ "sourceMap": {
2157
+ "anyOf": [
2158
+ {
2159
+ "type": "null"
2160
+ },
2161
+ {
2162
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2163
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-source-map.schema.json",
2164
+ "x-openplanr-contract": {
2165
+ "id": "diagram-source-map",
2166
+ "version": "1.13.0"
2167
+ },
2168
+ "type": "object",
2169
+ "additionalProperties": false,
2170
+ "properties": {
2171
+ "kind": {
2172
+ "const": "diagram-source-map"
2173
+ },
2174
+ "schemaVersion": {
2175
+ "const": "1.0.0"
2176
+ },
2177
+ "protocolVersion": {
2178
+ "const": "1.13.0"
2179
+ },
2180
+ "diagramId": {
2181
+ "type": "string",
2182
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2183
+ "minLength": 1,
2184
+ "maxLength": 128
2185
+ },
2186
+ "semanticDigest": {
2187
+ "type": "string",
2188
+ "pattern": "^sha256:[a-f0-9]{64}$"
2189
+ },
2190
+ "sourceDigest": {
2191
+ "type": "string",
2192
+ "pattern": "^sha256:[a-f0-9]{64}$"
2193
+ },
2194
+ "sourceByteLength": {
2195
+ "type": "integer",
2196
+ "minimum": 0,
2197
+ "maximum": 1048576
2198
+ },
2199
+ "encoding": {
2200
+ "const": "utf-8"
2201
+ },
2202
+ "parser": {
2203
+ "type": "object",
2204
+ "additionalProperties": false,
2205
+ "properties": {
2206
+ "id": {
2207
+ "type": "string",
2208
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2209
+ "maxLength": 64
2210
+ },
2211
+ "version": {
2212
+ "type": "string",
2213
+ "minLength": 1,
2214
+ "maxLength": 64
2215
+ }
2216
+ },
2217
+ "required": [
2218
+ "id",
2219
+ "version"
2220
+ ]
2221
+ },
2222
+ "certificationVersion": {
2223
+ "const": "flowchart-copy-v1"
2224
+ },
2225
+ "entries": {
2226
+ "type": "array",
2227
+ "items": {
2228
+ "type": "object",
2229
+ "additionalProperties": false,
2230
+ "properties": {
2231
+ "sourceId": {
2232
+ "anyOf": [
2233
+ {
2234
+ "type": "null"
2235
+ },
2236
+ {
2237
+ "type": "string",
2238
+ "minLength": 1,
2239
+ "maxLength": 128
2240
+ }
2241
+ ]
2242
+ },
2243
+ "elementIds": {
2244
+ "type": "array",
2245
+ "items": {
2246
+ "type": "string",
2247
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2248
+ "minLength": 1,
2249
+ "maxLength": 128
2250
+ },
2251
+ "minItems": 0,
2252
+ "maxItems": 10000,
2253
+ "uniqueItems": true
2254
+ },
2255
+ "range": {
2256
+ "anyOf": [
2257
+ {
2258
+ "type": "null"
2259
+ },
2260
+ {
2261
+ "type": "object",
2262
+ "additionalProperties": false,
2263
+ "properties": {
2264
+ "startByte": {
2265
+ "type": "integer",
2266
+ "minimum": 0,
2267
+ "maximum": 1048576
2268
+ },
2269
+ "endByte": {
2270
+ "type": "integer",
2271
+ "minimum": 0,
2272
+ "maximum": 1048576
2273
+ }
2274
+ },
2275
+ "required": [
2276
+ "startByte",
2277
+ "endByte"
2278
+ ]
2279
+ }
2280
+ ]
2281
+ },
2282
+ "construct": {
2283
+ "type": "string",
2284
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2285
+ "maxLength": 64
2286
+ },
2287
+ "confidence": {
2288
+ "enum": [
2289
+ "exact",
2290
+ "ambiguous"
2291
+ ]
2292
+ },
2293
+ "losses": {
2294
+ "type": "array",
2295
+ "items": {
2296
+ "type": "string",
2297
+ "minLength": 1,
2298
+ "maxLength": 512
2299
+ },
2300
+ "minItems": 0,
2301
+ "maxItems": 64
2302
+ }
2303
+ },
2304
+ "required": [
2305
+ "sourceId",
2306
+ "elementIds",
2307
+ "range",
2308
+ "construct",
2309
+ "confidence",
2310
+ "losses"
2311
+ ]
2312
+ },
2313
+ "minItems": 0,
2314
+ "maxItems": 10000
2315
+ }
2316
+ },
2317
+ "required": [
2318
+ "kind",
2319
+ "schemaVersion",
2320
+ "protocolVersion",
2321
+ "diagramId",
2322
+ "semanticDigest",
2323
+ "sourceDigest",
2324
+ "sourceByteLength",
2325
+ "encoding",
2326
+ "parser",
2327
+ "certificationVersion",
2328
+ "entries"
2329
+ ]
2330
+ }
2331
+ ]
2332
+ },
2333
+ "bundleDigest": {
2334
+ "type": "string",
2335
+ "pattern": "^sha256:[a-f0-9]{64}$"
2336
+ },
2337
+ "studioPresentation": {
2338
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2339
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-presentation.schema.json",
2340
+ "x-openplanr-contract": {
2341
+ "id": "diagram-presentation",
2342
+ "version": "1.17.0"
2343
+ },
2344
+ "type": "object",
2345
+ "additionalProperties": false,
2346
+ "required": [
2347
+ "kind",
2348
+ "schemaVersion",
2349
+ "palette",
2350
+ "theme",
2351
+ "fontFamily"
2352
+ ],
2353
+ "properties": {
2354
+ "kind": {
2355
+ "const": "openplanr-diagram-presentation"
2356
+ },
2357
+ "schemaVersion": {
2358
+ "const": "2.0.0"
2359
+ },
2360
+ "palette": {
2361
+ "const": "openplanr-brand-v2"
2362
+ },
2363
+ "theme": {
2364
+ "enum": [
2365
+ "light",
2366
+ "dark"
2367
+ ]
2368
+ },
2369
+ "fontFamily": {
2370
+ "const": "Inter"
2371
+ }
2372
+ }
2373
+ }
2374
+ },
2375
+ "required": [
2376
+ "kind",
2377
+ "schemaVersion",
2378
+ "protocolVersion",
2379
+ "diagramId",
2380
+ "document",
2381
+ "presentation",
2382
+ "originalSource",
2383
+ "sourceMap",
2384
+ "bundleDigest",
2385
+ "studioPresentation"
2386
+ ]
2387
+ }
2388
+ ]
2389
+ },
2390
+ "presentation": {
2391
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2392
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-presentation.schema.json",
2393
+ "x-openplanr-contract": {
2394
+ "id": "diagram-presentation",
2395
+ "version": "1.17.0"
2396
+ },
2397
+ "type": "object",
2398
+ "additionalProperties": false,
2399
+ "required": [
2400
+ "kind",
2401
+ "schemaVersion",
2402
+ "palette",
2403
+ "theme",
2404
+ "fontFamily"
2405
+ ],
2406
+ "properties": {
2407
+ "kind": {
2408
+ "const": "openplanr-diagram-presentation"
2409
+ },
2410
+ "schemaVersion": {
2411
+ "const": "2.0.0"
2412
+ },
2413
+ "palette": {
2414
+ "const": "openplanr-brand-v2"
2415
+ },
2416
+ "theme": {
2417
+ "enum": [
2418
+ "light",
2419
+ "dark"
2420
+ ]
2421
+ },
2422
+ "fontFamily": {
2423
+ "const": "Inter"
2424
+ }
2425
+ }
2426
+ }
2427
+ },
2428
+ "required": [
2429
+ "kind",
2430
+ "schemaVersion",
2431
+ "diagramId",
2432
+ "title",
2433
+ "source",
2434
+ "rendering",
2435
+ "scene",
2436
+ "presentation"
2437
+ ],
2438
+ "additionalProperties": false
2439
+ }