@openplanr/protocol 0.4.0 → 0.6.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 (31) hide show
  1. package/README.md +12 -0
  2. package/package.json +9 -1
  3. package/registries/commands.json +8 -8
  4. package/registries/diagram-authoring-capabilities.json +660 -0
  5. package/registries/skills.json +12 -12
  6. package/schemas/v1.11.0/design-handoff-readiness.schema.json +398 -0
  7. package/schemas/v1.11.0/design-implementation-handoff.schema.json +518 -0
  8. package/schemas/v1.11.0/design-planning-lineage.schema.json +106 -0
  9. package/schemas/v1.13.0/diagram-authoring-bundle.schema.json +1079 -0
  10. package/schemas/v1.13.0/diagram-authoring-capabilities.schema.json +211 -0
  11. package/schemas/v1.13.0/diagram-change-proposal.schema.json +3296 -0
  12. package/schemas/v1.13.0/diagram-document.schema.json +435 -0
  13. package/schemas/v1.13.0/diagram-edit-transaction.schema.json +3193 -0
  14. package/schemas/v1.13.0/diagram-fidelity-report.schema.json +157 -0
  15. package/schemas/v1.13.0/diagram-manifest.schema.json +311 -0
  16. package/schemas/v1.13.0/diagram-presentation.schema.json +395 -0
  17. package/schemas/v1.13.0/diagram-publication-state.schema.json +107 -0
  18. package/schemas/v1.13.0/diagram-source-map.schema.json +170 -0
  19. package/src/browser-contracts.d.mts +3 -1
  20. package/src/browser-contracts.mjs +14 -2
  21. package/src/contracts.mjs +27 -1
  22. package/src/design-handoff-contracts.d.mts +92 -0
  23. package/src/design-handoff-contracts.mjs +338 -0
  24. package/src/diagram-authoring-contracts.d.mts +112 -0
  25. package/src/diagram-authoring-contracts.mjs +668 -0
  26. package/src/diagram-contracts.d.mts +1 -1
  27. package/src/diagram-contracts.mjs +7 -4
  28. package/src/generated/canonical-registries.mjs +20 -20
  29. package/src/generated/legacy-diagram-schema.mjs +767 -0
  30. package/src/index.d.mts +2 -0
  31. package/src/index.mjs +4 -0
@@ -0,0 +1,767 @@
1
+ // Generated from frozen Protocol 1.6 schemas. Do not edit.
2
+ const deepFreeze = (value) => {
3
+ if (value && typeof value === 'object' && !Object.isFrozen(value)) {
4
+ Object.values(value).forEach(deepFreeze);
5
+ Object.freeze(value);
6
+ }
7
+ return value;
8
+ };
9
+ export const LEGACY_DIAGRAM_DOCUMENT_SCHEMA = deepFreeze({
10
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
11
+ "$id": "https://openplanr.dev/schemas/v1.6.0/diagram-document.schema.json",
12
+ "x-openplanr-contract": {
13
+ "id": "diagram-document",
14
+ "version": "1.6.0"
15
+ },
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": [
19
+ "kind",
20
+ "schemaVersion",
21
+ "protocolVersion",
22
+ "documentVersion",
23
+ "digestAlgorithm",
24
+ "canonicalization",
25
+ "documentDigest",
26
+ "diagramId",
27
+ "title",
28
+ "summary",
29
+ "audience",
30
+ "grammar",
31
+ "layout",
32
+ "theme",
33
+ "source",
34
+ "nodes",
35
+ "relations",
36
+ "groups",
37
+ "lanes",
38
+ "events",
39
+ "series",
40
+ "axes",
41
+ "sets",
42
+ "annotations",
43
+ "emphasis",
44
+ "accessibility"
45
+ ],
46
+ "properties": {
47
+ "kind": {
48
+ "const": "planr-diagram"
49
+ },
50
+ "schemaVersion": {
51
+ "const": "1.0.0"
52
+ },
53
+ "protocolVersion": {
54
+ "const": "1.6.0"
55
+ },
56
+ "documentVersion": {
57
+ "type": "string",
58
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$"
59
+ },
60
+ "digestAlgorithm": {
61
+ "const": "sha256"
62
+ },
63
+ "canonicalization": {
64
+ "const": "rfc8785"
65
+ },
66
+ "documentDigest": {
67
+ "type": "string",
68
+ "pattern": "^sha256:[0-9a-f]{64}$"
69
+ },
70
+ "diagramId": {
71
+ "type": "string",
72
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
73
+ "maxLength": 128
74
+ },
75
+ "title": {
76
+ "type": "string",
77
+ "minLength": 1,
78
+ "maxLength": 16384,
79
+ "pattern": ".*\\S.*"
80
+ },
81
+ "summary": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "maxLength": 16384,
85
+ "pattern": ".*\\S.*"
86
+ },
87
+ "audience": {
88
+ "enum": [
89
+ "engineer",
90
+ "executive",
91
+ "mixed"
92
+ ]
93
+ },
94
+ "grammar": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "required": [
98
+ "id",
99
+ "version"
100
+ ],
101
+ "properties": {
102
+ "id": {
103
+ "type": "string",
104
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
105
+ "minLength": 1,
106
+ "maxLength": 128
107
+ },
108
+ "version": {
109
+ "const": "1.0.0"
110
+ }
111
+ }
112
+ },
113
+ "layout": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": [
117
+ "direction",
118
+ "detailTier"
119
+ ],
120
+ "properties": {
121
+ "direction": {
122
+ "enum": [
123
+ "top-down",
124
+ "left-right",
125
+ "right-left",
126
+ "bottom-up",
127
+ "radial"
128
+ ]
129
+ },
130
+ "detailTier": {
131
+ "enum": [
132
+ "simplified",
133
+ "balanced",
134
+ "faithful"
135
+ ]
136
+ }
137
+ }
138
+ },
139
+ "theme": {
140
+ "type": "object",
141
+ "additionalProperties": false,
142
+ "required": [
143
+ "themeId",
144
+ "mode"
145
+ ],
146
+ "properties": {
147
+ "themeId": {
148
+ "type": "string",
149
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
150
+ "minLength": 1,
151
+ "maxLength": 128
152
+ },
153
+ "mode": {
154
+ "enum": [
155
+ "light",
156
+ "dark",
157
+ "auto"
158
+ ]
159
+ }
160
+ }
161
+ },
162
+ "source": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": [
166
+ "format",
167
+ "path",
168
+ "digest"
169
+ ],
170
+ "properties": {
171
+ "format": {
172
+ "enum": [
173
+ "english",
174
+ "mermaid",
175
+ "excalidraw",
176
+ "planr-diagram"
177
+ ]
178
+ },
179
+ "path": {
180
+ "anyOf": [
181
+ {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "maxLength": 1024,
185
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//).+$"
186
+ },
187
+ {
188
+ "type": "null"
189
+ }
190
+ ]
191
+ },
192
+ "digest": {
193
+ "anyOf": [
194
+ {
195
+ "type": "string",
196
+ "pattern": "^sha256:[0-9a-f]{64}$"
197
+ },
198
+ {
199
+ "type": "null"
200
+ }
201
+ ]
202
+ }
203
+ }
204
+ },
205
+ "nodes": {
206
+ "type": "array",
207
+ "items": {
208
+ "type": "object",
209
+ "additionalProperties": false,
210
+ "required": [
211
+ "id",
212
+ "label",
213
+ "kind"
214
+ ],
215
+ "properties": {
216
+ "id": {
217
+ "type": "string",
218
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
219
+ "maxLength": 128
220
+ },
221
+ "label": {
222
+ "type": "string",
223
+ "minLength": 1,
224
+ "maxLength": 16384,
225
+ "pattern": ".*\\S.*"
226
+ },
227
+ "kind": {
228
+ "type": "string",
229
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
230
+ "minLength": 1,
231
+ "maxLength": 128
232
+ },
233
+ "description": {
234
+ "anyOf": [
235
+ {
236
+ "type": "string",
237
+ "minLength": 1,
238
+ "maxLength": 16384,
239
+ "pattern": ".*\\S.*"
240
+ },
241
+ {
242
+ "type": "null"
243
+ }
244
+ ]
245
+ },
246
+ "semanticPosition": {
247
+ "anyOf": [
248
+ {
249
+ "type": "object",
250
+ "additionalProperties": false,
251
+ "required": [
252
+ "horizontal",
253
+ "vertical",
254
+ "meaning"
255
+ ],
256
+ "properties": {
257
+ "horizontal": {
258
+ "type": "number",
259
+ "minimum": 0,
260
+ "maximum": 1
261
+ },
262
+ "vertical": {
263
+ "type": "number",
264
+ "minimum": 0,
265
+ "maximum": 1
266
+ },
267
+ "meaning": {
268
+ "type": "string",
269
+ "minLength": 1,
270
+ "maxLength": 16384,
271
+ "pattern": ".*\\S.*"
272
+ }
273
+ }
274
+ },
275
+ {
276
+ "type": "null"
277
+ }
278
+ ]
279
+ }
280
+ }
281
+ },
282
+ "minItems": 0,
283
+ "maxItems": 4096
284
+ },
285
+ "relations": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "object",
289
+ "additionalProperties": false,
290
+ "required": [
291
+ "id",
292
+ "from",
293
+ "to",
294
+ "kind"
295
+ ],
296
+ "properties": {
297
+ "id": {
298
+ "type": "string",
299
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
300
+ "maxLength": 128
301
+ },
302
+ "from": {
303
+ "type": "string",
304
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
305
+ "maxLength": 128
306
+ },
307
+ "to": {
308
+ "type": "string",
309
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
310
+ "maxLength": 128
311
+ },
312
+ "kind": {
313
+ "enum": [
314
+ "association",
315
+ "dependency",
316
+ "flow",
317
+ "message",
318
+ "transition",
319
+ "containment"
320
+ ]
321
+ },
322
+ "label": {
323
+ "anyOf": [
324
+ {
325
+ "type": "string",
326
+ "minLength": 1,
327
+ "maxLength": 16384,
328
+ "pattern": ".*\\S.*"
329
+ },
330
+ {
331
+ "type": "null"
332
+ }
333
+ ]
334
+ },
335
+ "weight": {
336
+ "anyOf": [
337
+ {
338
+ "type": "number",
339
+ "minimum": 0
340
+ },
341
+ {
342
+ "type": "null"
343
+ }
344
+ ]
345
+ }
346
+ }
347
+ },
348
+ "minItems": 0,
349
+ "maxItems": 8192
350
+ },
351
+ "groups": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "required": [
357
+ "id",
358
+ "label",
359
+ "members"
360
+ ],
361
+ "properties": {
362
+ "id": {
363
+ "type": "string",
364
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
365
+ "maxLength": 128
366
+ },
367
+ "label": {
368
+ "type": "string",
369
+ "minLength": 1,
370
+ "maxLength": 16384,
371
+ "pattern": ".*\\S.*"
372
+ },
373
+ "members": {
374
+ "type": "array",
375
+ "items": {
376
+ "type": "string",
377
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
378
+ "maxLength": 128
379
+ },
380
+ "minItems": 1,
381
+ "maxItems": 256,
382
+ "uniqueItems": true
383
+ }
384
+ }
385
+ },
386
+ "minItems": 0,
387
+ "maxItems": 1024
388
+ },
389
+ "lanes": {
390
+ "type": "array",
391
+ "items": {
392
+ "type": "object",
393
+ "additionalProperties": false,
394
+ "required": [
395
+ "id",
396
+ "label",
397
+ "members"
398
+ ],
399
+ "properties": {
400
+ "id": {
401
+ "type": "string",
402
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
403
+ "maxLength": 128
404
+ },
405
+ "label": {
406
+ "type": "string",
407
+ "minLength": 1,
408
+ "maxLength": 16384,
409
+ "pattern": ".*\\S.*"
410
+ },
411
+ "members": {
412
+ "type": "array",
413
+ "items": {
414
+ "type": "string",
415
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
416
+ "maxLength": 128
417
+ },
418
+ "minItems": 0,
419
+ "maxItems": 256,
420
+ "uniqueItems": true
421
+ }
422
+ }
423
+ },
424
+ "minItems": 0,
425
+ "maxItems": 256
426
+ },
427
+ "events": {
428
+ "type": "array",
429
+ "items": {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "required": [
433
+ "id",
434
+ "label",
435
+ "order"
436
+ ],
437
+ "properties": {
438
+ "id": {
439
+ "type": "string",
440
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
441
+ "maxLength": 128
442
+ },
443
+ "label": {
444
+ "type": "string",
445
+ "minLength": 1,
446
+ "maxLength": 16384,
447
+ "pattern": ".*\\S.*"
448
+ },
449
+ "order": {
450
+ "type": "integer",
451
+ "minimum": 0
452
+ },
453
+ "at": {
454
+ "anyOf": [
455
+ {
456
+ "type": "string",
457
+ "minLength": 1,
458
+ "maxLength": 128
459
+ },
460
+ {
461
+ "type": "null"
462
+ }
463
+ ]
464
+ }
465
+ }
466
+ },
467
+ "minItems": 0,
468
+ "maxItems": 4096
469
+ },
470
+ "series": {
471
+ "type": "array",
472
+ "items": {
473
+ "type": "object",
474
+ "additionalProperties": false,
475
+ "required": [
476
+ "id",
477
+ "label",
478
+ "values"
479
+ ],
480
+ "properties": {
481
+ "id": {
482
+ "type": "string",
483
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
484
+ "maxLength": 128
485
+ },
486
+ "label": {
487
+ "type": "string",
488
+ "minLength": 1,
489
+ "maxLength": 16384,
490
+ "pattern": ".*\\S.*"
491
+ },
492
+ "values": {
493
+ "type": "array",
494
+ "items": {
495
+ "type": "object",
496
+ "additionalProperties": false,
497
+ "required": [
498
+ "key",
499
+ "value"
500
+ ],
501
+ "properties": {
502
+ "key": {
503
+ "type": "string",
504
+ "minLength": 1,
505
+ "maxLength": 128
506
+ },
507
+ "value": {
508
+ "type": "number"
509
+ }
510
+ }
511
+ },
512
+ "minItems": 1,
513
+ "maxItems": 512
514
+ }
515
+ }
516
+ },
517
+ "minItems": 0,
518
+ "maxItems": 256
519
+ },
520
+ "axes": {
521
+ "type": "array",
522
+ "items": {
523
+ "type": "object",
524
+ "additionalProperties": false,
525
+ "required": [
526
+ "id",
527
+ "label",
528
+ "scale"
529
+ ],
530
+ "properties": {
531
+ "id": {
532
+ "type": "string",
533
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
534
+ "maxLength": 128
535
+ },
536
+ "label": {
537
+ "type": "string",
538
+ "minLength": 1,
539
+ "maxLength": 16384,
540
+ "pattern": ".*\\S.*"
541
+ },
542
+ "scale": {
543
+ "enum": [
544
+ "categorical",
545
+ "linear",
546
+ "logarithmic",
547
+ "ordinal",
548
+ "temporal"
549
+ ]
550
+ }
551
+ }
552
+ },
553
+ "minItems": 0,
554
+ "maxItems": 16
555
+ },
556
+ "sets": {
557
+ "type": "array",
558
+ "items": {
559
+ "type": "object",
560
+ "additionalProperties": false,
561
+ "required": [
562
+ "id",
563
+ "label",
564
+ "members"
565
+ ],
566
+ "properties": {
567
+ "id": {
568
+ "type": "string",
569
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
570
+ "maxLength": 128
571
+ },
572
+ "label": {
573
+ "type": "string",
574
+ "minLength": 1,
575
+ "maxLength": 16384,
576
+ "pattern": ".*\\S.*"
577
+ },
578
+ "members": {
579
+ "type": "array",
580
+ "items": {
581
+ "type": "string",
582
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
583
+ "maxLength": 128
584
+ },
585
+ "minItems": 1,
586
+ "maxItems": 256,
587
+ "uniqueItems": true
588
+ }
589
+ }
590
+ },
591
+ "minItems": 0,
592
+ "maxItems": 64
593
+ },
594
+ "annotations": {
595
+ "type": "array",
596
+ "items": {
597
+ "type": "object",
598
+ "additionalProperties": false,
599
+ "required": [
600
+ "id",
601
+ "text",
602
+ "targetId"
603
+ ],
604
+ "properties": {
605
+ "id": {
606
+ "type": "string",
607
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
608
+ "maxLength": 128
609
+ },
610
+ "text": {
611
+ "type": "string",
612
+ "minLength": 1,
613
+ "maxLength": 16384,
614
+ "pattern": ".*\\S.*"
615
+ },
616
+ "targetId": {
617
+ "anyOf": [
618
+ {
619
+ "type": "string",
620
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
621
+ "maxLength": 128
622
+ },
623
+ {
624
+ "type": "null"
625
+ }
626
+ ]
627
+ }
628
+ }
629
+ },
630
+ "minItems": 0,
631
+ "maxItems": 1024
632
+ },
633
+ "emphasis": {
634
+ "type": "array",
635
+ "items": {
636
+ "type": "object",
637
+ "additionalProperties": false,
638
+ "required": [
639
+ "targetId",
640
+ "level"
641
+ ],
642
+ "properties": {
643
+ "targetId": {
644
+ "type": "string",
645
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
646
+ "maxLength": 128
647
+ },
648
+ "level": {
649
+ "enum": [
650
+ "primary",
651
+ "secondary",
652
+ "muted"
653
+ ]
654
+ }
655
+ }
656
+ },
657
+ "minItems": 0,
658
+ "maxItems": 1024
659
+ },
660
+ "accessibility": {
661
+ "type": "object",
662
+ "additionalProperties": false,
663
+ "required": [
664
+ "title",
665
+ "description",
666
+ "readingOrder"
667
+ ],
668
+ "properties": {
669
+ "title": {
670
+ "type": "string",
671
+ "minLength": 1,
672
+ "maxLength": 16384,
673
+ "pattern": ".*\\S.*"
674
+ },
675
+ "description": {
676
+ "type": "string",
677
+ "minLength": 1,
678
+ "maxLength": 16384,
679
+ "pattern": ".*\\S.*"
680
+ },
681
+ "readingOrder": {
682
+ "type": "array",
683
+ "items": {
684
+ "type": "string",
685
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
686
+ "maxLength": 128
687
+ },
688
+ "minItems": 0,
689
+ "maxItems": 4096,
690
+ "uniqueItems": true
691
+ }
692
+ }
693
+ }
694
+ },
695
+ "anyOf": [
696
+ {
697
+ "properties": {
698
+ "nodes": {
699
+ "minItems": 1
700
+ }
701
+ }
702
+ },
703
+ {
704
+ "properties": {
705
+ "relations": {
706
+ "minItems": 1
707
+ }
708
+ }
709
+ },
710
+ {
711
+ "properties": {
712
+ "groups": {
713
+ "minItems": 1
714
+ }
715
+ }
716
+ },
717
+ {
718
+ "properties": {
719
+ "lanes": {
720
+ "minItems": 1
721
+ }
722
+ }
723
+ },
724
+ {
725
+ "properties": {
726
+ "events": {
727
+ "minItems": 1
728
+ }
729
+ }
730
+ },
731
+ {
732
+ "properties": {
733
+ "series": {
734
+ "minItems": 1
735
+ }
736
+ }
737
+ },
738
+ {
739
+ "properties": {
740
+ "axes": {
741
+ "minItems": 1
742
+ }
743
+ }
744
+ },
745
+ {
746
+ "properties": {
747
+ "sets": {
748
+ "minItems": 1
749
+ }
750
+ }
751
+ },
752
+ {
753
+ "properties": {
754
+ "annotations": {
755
+ "minItems": 1
756
+ }
757
+ }
758
+ },
759
+ {
760
+ "properties": {
761
+ "emphasis": {
762
+ "minItems": 1
763
+ }
764
+ }
765
+ }
766
+ ]
767
+ });