@chrona-city/ugc-kit 1.5.9 → 1.5.11

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 (33) hide show
  1. package/README.md +95 -5
  2. package/contracts/ugc/public-runtime/v1/README.md +82 -5
  3. package/contracts/ugc/public-runtime/v1/archive.mjs +4 -3
  4. package/contracts/ugc/public-runtime/v1/manifest.mjs +56 -14
  5. package/contracts/ugc/public-runtime/v1/runtime-manifest.schema.json +186 -39
  6. package/contracts/ugc/public-runtime/v1/static-room-runtime.test.mjs +225 -0
  7. package/contracts/ugc/public-runtime/v1/target-compatibility.test.mjs +98 -0
  8. package/docs/harness-onboarding.md +55 -12
  9. package/docs/npm-creator.md +95 -12
  10. package/docs/runtime-download.md +87 -2
  11. package/lib/creator-cli.mjs +6 -4
  12. package/lib/creator-platform.mjs +2 -1
  13. package/lib/creator-toolchain-compat.mjs +9 -0
  14. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/public-runtime/v1/manifest.mjs +209 -0
  15. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/public-runtime/v1/runtime-manifest.schema.json +898 -0
  16. package/lib/host-ipc/distribution-static-room-semantic-contract/contracts/ugc/registry/v1/conformance/js/capability-resolver.mjs +191 -0
  17. package/lib/host-ipc/host-ipc.schema.json +18 -27
  18. package/lib/host-ipc/runtime-contract.mjs +7 -3
  19. package/lib/host-ipc/source-lock.json +16 -4
  20. package/lib/local-development.mjs +5 -2
  21. package/lib/runtime-host-client.mjs +11 -4
  22. package/lib/runtime-host.mjs +12 -3
  23. package/lib/runtime-install.mjs +12 -3
  24. package/node_modules/@esbuild/darwin-x64/README.md +3 -0
  25. package/node_modules/@esbuild/darwin-x64/bin/esbuild +0 -0
  26. package/node_modules/@esbuild/darwin-x64/package.json +20 -0
  27. package/node_modules/@esbuild/linux-x64/README.md +3 -0
  28. package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  29. package/node_modules/@esbuild/linux-x64/package.json +20 -0
  30. package/package.json +1 -1
  31. package/public-runtime.snapshot.lock.json +13 -5
  32. package/runtime-catalog.json +16 -16
  33. /package/lib/host-ipc/{distribution-document-tool-package-contract → distribution-static-room-semantic-contract}/contracts/ugc/creator-source/v1/tool-package.schema.json +0 -0
@@ -0,0 +1,898 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://contracts.chrona.dev/ugc/public-runtime/v1/runtime-manifest.schema.json",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schemaVersion",
8
+ "kind",
9
+ "apiVersion",
10
+ "runtimeId",
11
+ "executionTier",
12
+ "source",
13
+ "compatibility",
14
+ "entrypoints",
15
+ "files",
16
+ "archive",
17
+ "runtimeHash",
18
+ "targets"
19
+ ],
20
+ "properties": {
21
+ "schemaVersion": {
22
+ "enum": [
23
+ "1.0.0",
24
+ "1.1.0"
25
+ ]
26
+ },
27
+ "kind": {
28
+ "const": "public-local-runtime"
29
+ },
30
+ "apiVersion": {
31
+ "const": "1.0.0"
32
+ },
33
+ "runtimeId": {
34
+ "type": "string",
35
+ "pattern": "^runtime_[a-f0-9]{64}$"
36
+ },
37
+ "executionTier": {
38
+ "const": "public-untrusted"
39
+ },
40
+ "source": {
41
+ "oneOf": [
42
+ {
43
+ "type": "object",
44
+ "additionalProperties": false,
45
+ "required": [
46
+ "clientsCommitSha",
47
+ "publicNode",
48
+ "publicFlight"
49
+ ],
50
+ "properties": {
51
+ "clientsCommitSha": {
52
+ "$ref": "#/$defs/commit"
53
+ },
54
+ "publicNode": {
55
+ "$ref": "#/$defs/source"
56
+ },
57
+ "publicFlight": {
58
+ "$ref": "#/$defs/source"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": [
66
+ "clientsCommitSha",
67
+ "publicNode",
68
+ "contentRoom",
69
+ "documentAuthority"
70
+ ],
71
+ "properties": {
72
+ "clientsCommitSha": {
73
+ "$ref": "#/$defs/commit"
74
+ },
75
+ "publicNode": {
76
+ "$ref": "#/$defs/source"
77
+ },
78
+ "contentRoom": {
79
+ "$ref": "#/$defs/source"
80
+ },
81
+ "documentAuthority": {
82
+ "$ref": "#/$defs/source"
83
+ }
84
+ }
85
+ },
86
+ {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": [
90
+ "clientsCommitSha",
91
+ "publicNode",
92
+ "contentRoom"
93
+ ],
94
+ "properties": {
95
+ "clientsCommitSha": {
96
+ "$ref": "#/$defs/commit"
97
+ },
98
+ "publicNode": {
99
+ "$ref": "#/$defs/source"
100
+ },
101
+ "contentRoom": {
102
+ "$ref": "#/$defs/source"
103
+ }
104
+ }
105
+ }
106
+ ]
107
+ },
108
+ "compatibility": {
109
+ "oneOf": [
110
+ {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": [
114
+ "protocol",
115
+ "content",
116
+ "policyFiles",
117
+ "localContentContract"
118
+ ],
119
+ "properties": {
120
+ "protocol": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "major",
125
+ "schemaRevision"
126
+ ],
127
+ "properties": {
128
+ "major": {
129
+ "const": 1
130
+ },
131
+ "schemaRevision": {
132
+ "const": 2
133
+ }
134
+ }
135
+ },
136
+ "policyFiles": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": [
140
+ "worldScene",
141
+ "sceneRender"
142
+ ],
143
+ "properties": {
144
+ "worldScene": {
145
+ "$ref": "#/$defs/path"
146
+ },
147
+ "sceneRender": {
148
+ "$ref": "#/$defs/path"
149
+ }
150
+ }
151
+ },
152
+ "localContentContract": {
153
+ "$ref": "#/$defs/path"
154
+ },
155
+ "content": {
156
+ "type": "array",
157
+ "minItems": 1,
158
+ "maxItems": 8,
159
+ "uniqueItems": true,
160
+ "items": {
161
+ "$ref": "#/$defs/content"
162
+ }
163
+ }
164
+ }
165
+ },
166
+ {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "required": [
170
+ "protocol",
171
+ "content",
172
+ "policyFiles",
173
+ "localContentContract"
174
+ ],
175
+ "properties": {
176
+ "protocol": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": [
180
+ "major",
181
+ "schemaRevision"
182
+ ],
183
+ "properties": {
184
+ "major": {
185
+ "const": 1
186
+ },
187
+ "schemaRevision": {
188
+ "enum": [
189
+ 2,
190
+ 3
191
+ ]
192
+ }
193
+ }
194
+ },
195
+ "policyFiles": {
196
+ "type": "object",
197
+ "additionalProperties": false,
198
+ "required": [
199
+ "documentPresentation"
200
+ ],
201
+ "properties": {
202
+ "documentPresentation": {
203
+ "$ref": "#/$defs/path"
204
+ }
205
+ }
206
+ },
207
+ "localContentContract": {
208
+ "$ref": "#/$defs/path"
209
+ },
210
+ "content": {
211
+ "type": "array",
212
+ "minItems": 1,
213
+ "maxItems": 8,
214
+ "uniqueItems": true,
215
+ "items": {
216
+ "$ref": "#/$defs/documentContent"
217
+ }
218
+ }
219
+ }
220
+ }
221
+ ]
222
+ },
223
+ "entrypoints": {
224
+ "oneOf": [
225
+ {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": [
229
+ "api",
230
+ "browser",
231
+ "sandbox"
232
+ ],
233
+ "properties": {
234
+ "api": {
235
+ "const": "node/host.mjs"
236
+ },
237
+ "browser": {
238
+ "const": "web/index.html"
239
+ },
240
+ "sandbox": {
241
+ "const": "sandbox/public-content-bridge.html"
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "api",
250
+ "browser",
251
+ "sandbox"
252
+ ],
253
+ "properties": {
254
+ "api": {
255
+ "const": "node/host.mjs"
256
+ },
257
+ "browser": {
258
+ "const": "web/index.html"
259
+ },
260
+ "sandbox": {
261
+ "const": "sandbox/document-view.html"
262
+ }
263
+ }
264
+ }
265
+ ]
266
+ },
267
+ "files": {
268
+ "type": "array",
269
+ "minItems": 1,
270
+ "maxItems": 4096,
271
+ "items": {
272
+ "type": "object",
273
+ "additionalProperties": false,
274
+ "required": [
275
+ "path",
276
+ "bytes",
277
+ "sha256",
278
+ "role"
279
+ ],
280
+ "properties": {
281
+ "path": {
282
+ "$ref": "#/$defs/path"
283
+ },
284
+ "bytes": {
285
+ "type": "integer",
286
+ "minimum": 0,
287
+ "maximum": 33554432
288
+ },
289
+ "sha256": {
290
+ "$ref": "#/$defs/hash"
291
+ },
292
+ "role": {
293
+ "enum": [
294
+ "node",
295
+ "browser",
296
+ "sandbox",
297
+ "wasm",
298
+ "data",
299
+ "license"
300
+ ]
301
+ }
302
+ }
303
+ }
304
+ },
305
+ "archive": {
306
+ "type": "object",
307
+ "additionalProperties": false,
308
+ "required": [
309
+ "path",
310
+ "format",
311
+ "bytes",
312
+ "sha256"
313
+ ],
314
+ "properties": {
315
+ "path": {
316
+ "const": "runtime.zip"
317
+ },
318
+ "format": {
319
+ "const": "zip-store-v1"
320
+ },
321
+ "bytes": {
322
+ "type": "integer",
323
+ "minimum": 22,
324
+ "maximum": 268435456
325
+ },
326
+ "sha256": {
327
+ "$ref": "#/$defs/hash"
328
+ }
329
+ }
330
+ },
331
+ "runtimeHash": {
332
+ "$ref": "#/$defs/hash"
333
+ },
334
+ "targets": {
335
+ "type": "array",
336
+ "minItems": 1,
337
+ "maxItems": 4,
338
+ "uniqueItems": true,
339
+ "items": {
340
+ "$ref": "#/$defs/target"
341
+ }
342
+ }
343
+ },
344
+ "$defs": {
345
+ "hash": {
346
+ "type": "string",
347
+ "pattern": "^sha256:[a-f0-9]{64}$"
348
+ },
349
+ "commit": {
350
+ "type": "string",
351
+ "pattern": "^[a-f0-9]{40}$"
352
+ },
353
+ "path": {
354
+ "type": "string",
355
+ "maxLength": 512,
356
+ "pattern": "^[A-Za-z0-9_@-][A-Za-z0-9_@.-]*(/[A-Za-z0-9_@-][A-Za-z0-9_@.-]*)*$"
357
+ },
358
+ "source": {
359
+ "type": "object",
360
+ "additionalProperties": false,
361
+ "required": [
362
+ "commitSha",
363
+ "sourceHash",
364
+ "lockPath"
365
+ ],
366
+ "properties": {
367
+ "commitSha": {
368
+ "$ref": "#/$defs/commit"
369
+ },
370
+ "sourceHash": {
371
+ "$ref": "#/$defs/hash"
372
+ },
373
+ "lockPath": {
374
+ "$ref": "#/$defs/path"
375
+ }
376
+ }
377
+ },
378
+ "target": {
379
+ "oneOf": [
380
+ {
381
+ "$ref": "#/$defs/legacyTarget"
382
+ },
383
+ {
384
+ "$ref": "#/$defs/supportedTarget"
385
+ }
386
+ ]
387
+ },
388
+ "tool": {
389
+ "type": "object",
390
+ "additionalProperties": false,
391
+ "properties": {
392
+ "packageName": {
393
+ "$ref": "../../creator-source/v1/tool-package.schema.json"
394
+ },
395
+ "packageVersion": {
396
+ "$ref": "#/$defs/toolVersion"
397
+ },
398
+ "kitVersion": {
399
+ "$ref": "#/$defs/toolVersion"
400
+ },
401
+ "kitSnapshotHash": {
402
+ "$ref": "#/$defs/hash"
403
+ }
404
+ },
405
+ "required": [
406
+ "packageName",
407
+ "packageVersion",
408
+ "kitVersion",
409
+ "kitSnapshotHash"
410
+ ]
411
+ },
412
+ "contracts": {
413
+ "type": "object",
414
+ "additionalProperties": false,
415
+ "properties": {
416
+ "registryVersion": {
417
+ "$ref": "#/$defs/version"
418
+ },
419
+ "registryHash": {
420
+ "$ref": "#/$defs/hash"
421
+ },
422
+ "resolutionPolicyHash": {
423
+ "$ref": "#/$defs/hash"
424
+ },
425
+ "contractSetHashes": {
426
+ "type": "object",
427
+ "additionalProperties": false,
428
+ "properties": {
429
+ "localContent": {
430
+ "$ref": "#/$defs/hash"
431
+ },
432
+ "worldScene": {
433
+ "$ref": "#/$defs/hash"
434
+ }
435
+ },
436
+ "required": [
437
+ "localContent",
438
+ "worldScene"
439
+ ]
440
+ }
441
+ },
442
+ "required": [
443
+ "registryVersion",
444
+ "registryHash",
445
+ "resolutionPolicyHash",
446
+ "contractSetHashes"
447
+ ]
448
+ },
449
+ "toolVersion": {
450
+ "type": "string",
451
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-alpha\\.[1-9][0-9]*(?:\\.[1-9][0-9]*)?)?$(?![\\s\\S])"
452
+ },
453
+ "version": {
454
+ "type": "string",
455
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
456
+ },
457
+ "content": {
458
+ "type": "object",
459
+ "additionalProperties": false,
460
+ "required": [
461
+ "builderVersion",
462
+ "tool",
463
+ "contracts"
464
+ ],
465
+ "properties": {
466
+ "builderVersion": {
467
+ "const": "local-content@1.0.0"
468
+ },
469
+ "tool": {
470
+ "$ref": "#/$defs/tool"
471
+ },
472
+ "contracts": {
473
+ "$ref": "#/$defs/contracts"
474
+ }
475
+ }
476
+ },
477
+ "documentContracts": {
478
+ "type": "object",
479
+ "additionalProperties": false,
480
+ "properties": {
481
+ "registryVersion": {
482
+ "$ref": "#/$defs/version"
483
+ },
484
+ "registryHash": {
485
+ "$ref": "#/$defs/hash"
486
+ },
487
+ "resolutionPolicyHash": {
488
+ "$ref": "#/$defs/hash"
489
+ },
490
+ "contractSetHashes": {
491
+ "type": "object",
492
+ "additionalProperties": false,
493
+ "properties": {
494
+ "localContent": {
495
+ "$ref": "#/$defs/hash"
496
+ },
497
+ "worldScene": {
498
+ "$ref": "#/$defs/hash"
499
+ },
500
+ "documentPresentation": {
501
+ "$ref": "#/$defs/hash"
502
+ }
503
+ },
504
+ "required": [
505
+ "localContent",
506
+ "worldScene",
507
+ "documentPresentation"
508
+ ]
509
+ }
510
+ },
511
+ "required": [
512
+ "registryVersion",
513
+ "registryHash",
514
+ "resolutionPolicyHash",
515
+ "contractSetHashes"
516
+ ]
517
+ },
518
+ "documentContent": {
519
+ "type": "object",
520
+ "additionalProperties": false,
521
+ "required": [
522
+ "builderVersion",
523
+ "tool",
524
+ "contracts"
525
+ ],
526
+ "properties": {
527
+ "builderVersion": {
528
+ "const": "local-content@1.1.0"
529
+ },
530
+ "tool": {
531
+ "$ref": "#/$defs/tool"
532
+ },
533
+ "contracts": {
534
+ "$ref": "#/$defs/documentContracts"
535
+ }
536
+ }
537
+ },
538
+ "legacyTarget": {
539
+ "type": "object",
540
+ "additionalProperties": false,
541
+ "properties": {
542
+ "os": {
543
+ "type": "string",
544
+ "enum": [
545
+ "darwin",
546
+ "linux"
547
+ ]
548
+ },
549
+ "arch": {
550
+ "type": "string",
551
+ "enum": [
552
+ "arm64",
553
+ "x64"
554
+ ]
555
+ },
556
+ "nodeVersion": {
557
+ "const": "22.16.0"
558
+ }
559
+ },
560
+ "required": [
561
+ "os",
562
+ "arch",
563
+ "nodeVersion"
564
+ ]
565
+ },
566
+ "observedTarget": {
567
+ "type": "object",
568
+ "additionalProperties": false,
569
+ "properties": {
570
+ "os": {
571
+ "type": "string",
572
+ "enum": [
573
+ "darwin",
574
+ "linux"
575
+ ]
576
+ },
577
+ "arch": {
578
+ "type": "string",
579
+ "enum": [
580
+ "arm64",
581
+ "x64"
582
+ ]
583
+ },
584
+ "nodeVersion": {
585
+ "type": "string",
586
+ "maxLength": 48,
587
+ "pattern": "^[1-9][0-9]*\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$(?![\\s\\S])"
588
+ }
589
+ },
590
+ "required": [
591
+ "os",
592
+ "arch",
593
+ "nodeVersion"
594
+ ]
595
+ },
596
+ "supportedTarget": {
597
+ "type": "object",
598
+ "additionalProperties": false,
599
+ "required": [
600
+ "os",
601
+ "arch",
602
+ "nodeSupport"
603
+ ],
604
+ "properties": {
605
+ "os": {
606
+ "type": "string",
607
+ "enum": [
608
+ "darwin",
609
+ "linux"
610
+ ]
611
+ },
612
+ "arch": {
613
+ "type": "string",
614
+ "enum": [
615
+ "arm64",
616
+ "x64"
617
+ ]
618
+ },
619
+ "nodeSupport": {
620
+ "type": "object",
621
+ "additionalProperties": false,
622
+ "required": [
623
+ "schemaVersion",
624
+ "lines"
625
+ ],
626
+ "properties": {
627
+ "schemaVersion": {
628
+ "const": "1.0.0"
629
+ },
630
+ "lines": {
631
+ "type": "array",
632
+ "minItems": 1,
633
+ "maxItems": 4,
634
+ "items": {
635
+ "type": "object",
636
+ "additionalProperties": false,
637
+ "required": [
638
+ "major",
639
+ "minimum"
640
+ ],
641
+ "properties": {
642
+ "major": {
643
+ "type": "integer",
644
+ "minimum": 1,
645
+ "maximum": 9007199254740991
646
+ },
647
+ "minimum": {
648
+ "type": "string",
649
+ "maxLength": 48,
650
+ "pattern": "^[1-9][0-9]*\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$(?![\\s\\S])"
651
+ }
652
+ }
653
+ }
654
+ }
655
+ }
656
+ }
657
+ }
658
+ }
659
+ },
660
+ "allOf": [
661
+ {
662
+ "if": {
663
+ "properties": {
664
+ "schemaVersion": {
665
+ "const": "1.0.0"
666
+ }
667
+ }
668
+ },
669
+ "then": {
670
+ "properties": {
671
+ "source": {
672
+ "oneOf": [
673
+ {
674
+ "type": "object",
675
+ "additionalProperties": false,
676
+ "required": [
677
+ "clientsCommitSha",
678
+ "publicNode",
679
+ "publicFlight"
680
+ ],
681
+ "properties": {
682
+ "clientsCommitSha": {
683
+ "$ref": "#/$defs/commit"
684
+ },
685
+ "publicNode": {
686
+ "$ref": "#/$defs/source"
687
+ },
688
+ "publicFlight": {
689
+ "$ref": "#/$defs/source"
690
+ }
691
+ }
692
+ },
693
+ {
694
+ "type": "object",
695
+ "additionalProperties": false,
696
+ "required": [
697
+ "clientsCommitSha",
698
+ "publicNode",
699
+ "contentRoom"
700
+ ],
701
+ "properties": {
702
+ "clientsCommitSha": {
703
+ "$ref": "#/$defs/commit"
704
+ },
705
+ "publicNode": {
706
+ "$ref": "#/$defs/source"
707
+ },
708
+ "contentRoom": {
709
+ "$ref": "#/$defs/source"
710
+ }
711
+ }
712
+ }
713
+ ]
714
+ },
715
+ "compatibility": {
716
+ "type": "object",
717
+ "additionalProperties": false,
718
+ "required": [
719
+ "protocol",
720
+ "content",
721
+ "policyFiles",
722
+ "localContentContract"
723
+ ],
724
+ "properties": {
725
+ "protocol": {
726
+ "type": "object",
727
+ "additionalProperties": false,
728
+ "required": [
729
+ "major",
730
+ "schemaRevision"
731
+ ],
732
+ "properties": {
733
+ "major": {
734
+ "const": 1
735
+ },
736
+ "schemaRevision": {
737
+ "const": 2
738
+ }
739
+ }
740
+ },
741
+ "policyFiles": {
742
+ "type": "object",
743
+ "additionalProperties": false,
744
+ "required": [
745
+ "worldScene",
746
+ "sceneRender"
747
+ ],
748
+ "properties": {
749
+ "worldScene": {
750
+ "$ref": "#/$defs/path"
751
+ },
752
+ "sceneRender": {
753
+ "$ref": "#/$defs/path"
754
+ }
755
+ }
756
+ },
757
+ "localContentContract": {
758
+ "$ref": "#/$defs/path"
759
+ },
760
+ "content": {
761
+ "type": "array",
762
+ "minItems": 1,
763
+ "maxItems": 8,
764
+ "uniqueItems": true,
765
+ "items": {
766
+ "$ref": "#/$defs/content"
767
+ }
768
+ }
769
+ }
770
+ },
771
+ "entrypoints": {
772
+ "type": "object",
773
+ "additionalProperties": false,
774
+ "required": [
775
+ "api",
776
+ "browser",
777
+ "sandbox"
778
+ ],
779
+ "properties": {
780
+ "api": {
781
+ "const": "node/host.mjs"
782
+ },
783
+ "browser": {
784
+ "const": "web/index.html"
785
+ },
786
+ "sandbox": {
787
+ "const": "sandbox/public-content-bridge.html"
788
+ }
789
+ }
790
+ }
791
+ }
792
+ },
793
+ "else": {
794
+ "properties": {
795
+ "source": {
796
+ "type": "object",
797
+ "additionalProperties": false,
798
+ "required": [
799
+ "clientsCommitSha",
800
+ "publicNode",
801
+ "contentRoom",
802
+ "documentAuthority"
803
+ ],
804
+ "properties": {
805
+ "clientsCommitSha": {
806
+ "$ref": "#/$defs/commit"
807
+ },
808
+ "publicNode": {
809
+ "$ref": "#/$defs/source"
810
+ },
811
+ "contentRoom": {
812
+ "$ref": "#/$defs/source"
813
+ },
814
+ "documentAuthority": {
815
+ "$ref": "#/$defs/source"
816
+ }
817
+ }
818
+ },
819
+ "compatibility": {
820
+ "type": "object",
821
+ "additionalProperties": false,
822
+ "required": [
823
+ "protocol",
824
+ "content",
825
+ "policyFiles",
826
+ "localContentContract"
827
+ ],
828
+ "properties": {
829
+ "protocol": {
830
+ "type": "object",
831
+ "additionalProperties": false,
832
+ "required": [
833
+ "major",
834
+ "schemaRevision"
835
+ ],
836
+ "properties": {
837
+ "major": {
838
+ "const": 1
839
+ },
840
+ "schemaRevision": {
841
+ "enum": [
842
+ 2,
843
+ 3
844
+ ]
845
+ }
846
+ }
847
+ },
848
+ "policyFiles": {
849
+ "type": "object",
850
+ "additionalProperties": false,
851
+ "required": [
852
+ "documentPresentation"
853
+ ],
854
+ "properties": {
855
+ "documentPresentation": {
856
+ "$ref": "#/$defs/path"
857
+ }
858
+ }
859
+ },
860
+ "localContentContract": {
861
+ "$ref": "#/$defs/path"
862
+ },
863
+ "content": {
864
+ "type": "array",
865
+ "minItems": 1,
866
+ "maxItems": 8,
867
+ "uniqueItems": true,
868
+ "items": {
869
+ "$ref": "#/$defs/documentContent"
870
+ }
871
+ }
872
+ }
873
+ },
874
+ "entrypoints": {
875
+ "type": "object",
876
+ "additionalProperties": false,
877
+ "required": [
878
+ "api",
879
+ "browser",
880
+ "sandbox"
881
+ ],
882
+ "properties": {
883
+ "api": {
884
+ "const": "node/host.mjs"
885
+ },
886
+ "browser": {
887
+ "const": "web/index.html"
888
+ },
889
+ "sandbox": {
890
+ "const": "sandbox/document-view.html"
891
+ }
892
+ }
893
+ }
894
+ }
895
+ }
896
+ }
897
+ ]
898
+ }