@ue-shed/protocol 0.6.0 → 0.7.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 (33) hide show
  1. package/contracts/cameras/map-tile/v1/README.md +7 -0
  2. package/contracts/cameras/map-tile/v1/capture-response.schema.json +97 -25
  3. package/contracts/cameras/map-tile/v1/manifest.schema.json +136 -37
  4. package/contracts/cameras/map-tile/v1/plan.schema.json +132 -36
  5. package/contracts/cameras/map-tile/v1/release-result.schema.json +12 -0
  6. package/contracts/cameras/render/v1/README.md +33 -0
  7. package/contracts/cameras/render/v1/begin-result.schema.json +712 -0
  8. package/contracts/cameras/render/v1/capabilities.schema.json +201 -0
  9. package/contracts/cameras/render/v1/end-result.schema.json +185 -0
  10. package/contracts/cameras/render/v1/fixtures/frame-orthographic.json +31 -0
  11. package/contracts/cameras/render/v1/fixtures/frame-perspective.json +31 -0
  12. package/contracts/cameras/render/v1/fixtures/invalid-frame-mixed-projection.json +32 -0
  13. package/contracts/cameras/render/v1/fixtures/invalid-frame-size.json +31 -0
  14. package/contracts/cameras/render/v1/fixtures/invalid-session-backend-fields.json +40 -0
  15. package/contracts/cameras/render/v1/fixtures/invalid-session-budget.json +39 -0
  16. package/contracts/cameras/render/v1/fixtures/invalid-session-future.json +39 -0
  17. package/contracts/cameras/render/v1/fixtures/session-camera-regions.json +51 -0
  18. package/contracts/cameras/render/v1/fixtures/session-editor-viewport.json +40 -0
  19. package/contracts/cameras/render/v1/fixtures/session-scene-capture.json +39 -0
  20. package/contracts/cameras/render/v1/frame-evidence.schema.json +771 -0
  21. package/contracts/cameras/render/v1/frame-request.schema.json +219 -0
  22. package/contracts/cameras/render/v1/frame-status.schema.json +1076 -0
  23. package/contracts/cameras/render/v1/policy.schema.json +510 -0
  24. package/contracts/cameras/render/v1/preflight.schema.json +68 -0
  25. package/contracts/cameras/render/v1/review-inspection-request.schema.json +342 -0
  26. package/contracts/cameras/render/v1/review-inspection-result.schema.json +2030 -0
  27. package/contracts/cameras/render/v1/review-realization-request.schema.json +417 -0
  28. package/contracts/cameras/render/v1/review-realization-result.schema.json +454 -0
  29. package/contracts/cameras/render/v1/session-request.schema.json +617 -0
  30. package/contracts/cameras/review/v1/README.md +7 -0
  31. package/contracts/cameras/review/v1/capture-request.schema.json +247 -61
  32. package/contracts/cameras/review/v1/capture-response.schema.json +820 -192
  33. package/package.json +1 -1
@@ -0,0 +1,712 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ue-shed.dev/contracts/cameras/render/v1/begin-result.schema.json",
4
+ "anyOf": [
5
+ {
6
+ "type": "object",
7
+ "properties": {
8
+ "status": {
9
+ "type": "string",
10
+ "enum": ["opened"]
11
+ },
12
+ "sessionId": {
13
+ "type": "string",
14
+ "allOf": [
15
+ {
16
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
17
+ }
18
+ ]
19
+ },
20
+ "resolvedPolicy": {
21
+ "type": "object",
22
+ "properties": {
23
+ "renderer": {
24
+ "anyOf": [
25
+ {
26
+ "type": "object",
27
+ "properties": {
28
+ "kind": {
29
+ "type": "string",
30
+ "enum": ["editor_viewport"]
31
+ },
32
+ "strategy": {
33
+ "type": "string",
34
+ "enum": ["high_resolution_screenshot"]
35
+ },
36
+ "profile": {
37
+ "type": "string",
38
+ "enum": ["lit", "observation"]
39
+ },
40
+ "vignette": {
41
+ "type": "string",
42
+ "enum": ["project", "disabled"]
43
+ },
44
+ "fog": {
45
+ "type": "boolean"
46
+ },
47
+ "volumetricFog": {
48
+ "type": "boolean"
49
+ }
50
+ },
51
+ "required": [
52
+ "kind",
53
+ "strategy",
54
+ "profile",
55
+ "vignette",
56
+ "fog",
57
+ "volumetricFog"
58
+ ],
59
+ "additionalProperties": false
60
+ },
61
+ {
62
+ "type": "object",
63
+ "properties": {
64
+ "kind": {
65
+ "type": "string",
66
+ "enum": ["scene_capture"]
67
+ },
68
+ "profile": {
69
+ "type": "string",
70
+ "enum": [
71
+ "full_fidelity",
72
+ "seam_stable",
73
+ "scene_capture_defaults",
74
+ "observation"
75
+ ]
76
+ },
77
+ "lodDistanceScale": {
78
+ "type": "number",
79
+ "allOf": [
80
+ {
81
+ "minimum": 0.1,
82
+ "maximum": 100
83
+ }
84
+ ]
85
+ },
86
+ "fog": {
87
+ "type": "boolean"
88
+ },
89
+ "volumetricFog": {
90
+ "type": "boolean"
91
+ }
92
+ },
93
+ "required": [
94
+ "kind",
95
+ "profile",
96
+ "lodDistanceScale",
97
+ "fog",
98
+ "volumetricFog"
99
+ ],
100
+ "additionalProperties": false
101
+ }
102
+ ]
103
+ },
104
+ "exposure": {
105
+ "anyOf": [
106
+ {
107
+ "type": "object",
108
+ "properties": {
109
+ "mode": {
110
+ "type": "string",
111
+ "enum": ["project_auto"]
112
+ }
113
+ },
114
+ "required": ["mode"],
115
+ "additionalProperties": false
116
+ },
117
+ {
118
+ "type": "object",
119
+ "properties": {
120
+ "mode": {
121
+ "type": "string",
122
+ "enum": ["fixed_ev100"]
123
+ },
124
+ "ev100": {
125
+ "type": "number",
126
+ "allOf": [
127
+ {
128
+ "minimum": -20,
129
+ "maximum": 30
130
+ }
131
+ ]
132
+ },
133
+ "compensation": {
134
+ "type": "string",
135
+ "enum": ["project"]
136
+ }
137
+ },
138
+ "required": ["mode", "ev100", "compensation"],
139
+ "additionalProperties": false
140
+ },
141
+ {
142
+ "type": "object",
143
+ "properties": {
144
+ "mode": {
145
+ "type": "string",
146
+ "enum": ["meter_once"]
147
+ },
148
+ "referenceCamera": {
149
+ "type": "object",
150
+ "properties": {
151
+ "location": {
152
+ "type": "object",
153
+ "properties": {
154
+ "x": {
155
+ "type": "number"
156
+ },
157
+ "y": {
158
+ "type": "number"
159
+ },
160
+ "z": {
161
+ "type": "number"
162
+ }
163
+ },
164
+ "required": ["x", "y", "z"],
165
+ "additionalProperties": false
166
+ },
167
+ "rotation": {
168
+ "type": "object",
169
+ "properties": {
170
+ "pitch": {
171
+ "type": "number"
172
+ },
173
+ "roll": {
174
+ "type": "number"
175
+ },
176
+ "yaw": {
177
+ "type": "number"
178
+ }
179
+ },
180
+ "required": ["pitch", "roll", "yaw"],
181
+ "additionalProperties": false
182
+ },
183
+ "projection": {
184
+ "anyOf": [
185
+ {
186
+ "type": "object",
187
+ "properties": {
188
+ "kind": {
189
+ "type": "string",
190
+ "enum": ["perspective"]
191
+ },
192
+ "horizontalFieldOfView": {
193
+ "type": "number",
194
+ "allOf": [
195
+ {
196
+ "minimum": 5,
197
+ "maximum": 170
198
+ }
199
+ ]
200
+ }
201
+ },
202
+ "required": [
203
+ "kind",
204
+ "horizontalFieldOfView"
205
+ ],
206
+ "additionalProperties": false
207
+ },
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "kind": {
212
+ "type": "string",
213
+ "enum": ["orthographic"]
214
+ },
215
+ "width": {
216
+ "type": "number",
217
+ "allOf": [
218
+ {
219
+ "exclusiveMinimum": 0
220
+ },
221
+ {
222
+ "maximum": 1000000000
223
+ }
224
+ ]
225
+ }
226
+ },
227
+ "required": ["kind", "width"],
228
+ "additionalProperties": false
229
+ }
230
+ ]
231
+ }
232
+ },
233
+ "required": ["location", "rotation", "projection"],
234
+ "additionalProperties": false
235
+ },
236
+ "referenceSize": {
237
+ "type": "object",
238
+ "properties": {
239
+ "width": {
240
+ "type": "integer",
241
+ "allOf": [
242
+ {
243
+ "minimum": 16,
244
+ "maximum": 16384
245
+ }
246
+ ]
247
+ },
248
+ "height": {
249
+ "type": "integer",
250
+ "allOf": [
251
+ {
252
+ "minimum": 16,
253
+ "maximum": 16384
254
+ }
255
+ ]
256
+ }
257
+ },
258
+ "required": ["width", "height"],
259
+ "additionalProperties": false
260
+ },
261
+ "minimumFrames": {
262
+ "type": "integer",
263
+ "allOf": [
264
+ {
265
+ "minimum": 1,
266
+ "maximum": 4096
267
+ }
268
+ ]
269
+ }
270
+ },
271
+ "required": [
272
+ "mode",
273
+ "referenceCamera",
274
+ "referenceSize",
275
+ "minimumFrames"
276
+ ],
277
+ "additionalProperties": false
278
+ }
279
+ ]
280
+ },
281
+ "settling": {
282
+ "type": "object",
283
+ "properties": {
284
+ "minimumFrames": {
285
+ "type": "integer",
286
+ "allOf": [
287
+ {
288
+ "minimum": 1,
289
+ "maximum": 4096
290
+ }
291
+ ]
292
+ },
293
+ "timeoutMs": {
294
+ "type": "integer",
295
+ "allOf": [
296
+ {
297
+ "minimum": 1000,
298
+ "maximum": 900000
299
+ }
300
+ ]
301
+ },
302
+ "initialView": {
303
+ "type": "object",
304
+ "properties": {
305
+ "camera": {
306
+ "type": "object",
307
+ "properties": {
308
+ "location": {
309
+ "type": "object",
310
+ "properties": {
311
+ "x": {
312
+ "type": "number"
313
+ },
314
+ "y": {
315
+ "type": "number"
316
+ },
317
+ "z": {
318
+ "type": "number"
319
+ }
320
+ },
321
+ "required": ["x", "y", "z"],
322
+ "additionalProperties": false
323
+ },
324
+ "rotation": {
325
+ "type": "object",
326
+ "properties": {
327
+ "pitch": {
328
+ "type": "number"
329
+ },
330
+ "roll": {
331
+ "type": "number"
332
+ },
333
+ "yaw": {
334
+ "type": "number"
335
+ }
336
+ },
337
+ "required": ["pitch", "roll", "yaw"],
338
+ "additionalProperties": false
339
+ },
340
+ "projection": {
341
+ "anyOf": [
342
+ {
343
+ "type": "object",
344
+ "properties": {
345
+ "kind": {
346
+ "type": "string",
347
+ "enum": ["perspective"]
348
+ },
349
+ "horizontalFieldOfView": {
350
+ "type": "number",
351
+ "allOf": [
352
+ {
353
+ "minimum": 5,
354
+ "maximum": 170
355
+ }
356
+ ]
357
+ }
358
+ },
359
+ "required": [
360
+ "kind",
361
+ "horizontalFieldOfView"
362
+ ],
363
+ "additionalProperties": false
364
+ },
365
+ {
366
+ "type": "object",
367
+ "properties": {
368
+ "kind": {
369
+ "type": "string",
370
+ "enum": ["orthographic"]
371
+ },
372
+ "width": {
373
+ "type": "number",
374
+ "allOf": [
375
+ {
376
+ "exclusiveMinimum": 0
377
+ },
378
+ {
379
+ "maximum": 1000000000
380
+ }
381
+ ]
382
+ }
383
+ },
384
+ "required": ["kind", "width"],
385
+ "additionalProperties": false
386
+ }
387
+ ]
388
+ }
389
+ },
390
+ "required": ["location", "rotation", "projection"],
391
+ "additionalProperties": false
392
+ },
393
+ "size": {
394
+ "type": "object",
395
+ "properties": {
396
+ "width": {
397
+ "type": "integer",
398
+ "allOf": [
399
+ {
400
+ "minimum": 16,
401
+ "maximum": 16384
402
+ }
403
+ ]
404
+ },
405
+ "height": {
406
+ "type": "integer",
407
+ "allOf": [
408
+ {
409
+ "minimum": 16,
410
+ "maximum": 16384
411
+ }
412
+ ]
413
+ }
414
+ },
415
+ "required": ["width", "height"],
416
+ "additionalProperties": false
417
+ },
418
+ "minimumFrames": {
419
+ "type": "integer",
420
+ "allOf": [
421
+ {
422
+ "minimum": 1,
423
+ "maximum": 4096
424
+ }
425
+ ]
426
+ }
427
+ },
428
+ "required": ["camera", "size", "minimumFrames"],
429
+ "additionalProperties": false
430
+ }
431
+ },
432
+ "required": ["minimumFrames", "timeoutMs"],
433
+ "additionalProperties": false
434
+ },
435
+ "time": {
436
+ "type": "string",
437
+ "enum": ["live_editor", "freeze_materials_and_ticks"]
438
+ },
439
+ "preparation": {
440
+ "type": "object",
441
+ "properties": {
442
+ "geometry": {
443
+ "anyOf": [
444
+ {
445
+ "type": "object",
446
+ "properties": {
447
+ "mode": {
448
+ "type": "string",
449
+ "enum": ["preserve_loading"]
450
+ }
451
+ },
452
+ "required": ["mode"],
453
+ "additionalProperties": false
454
+ },
455
+ {
456
+ "type": "object",
457
+ "properties": {
458
+ "mode": {
459
+ "type": "string",
460
+ "enum": ["camera_regions"]
461
+ },
462
+ "maximumRegions": {
463
+ "type": "integer",
464
+ "allOf": [
465
+ {
466
+ "minimum": 1,
467
+ "maximum": 64
468
+ }
469
+ ]
470
+ },
471
+ "extent": {
472
+ "type": "object",
473
+ "properties": {
474
+ "x": {
475
+ "type": "number",
476
+ "allOf": [
477
+ {
478
+ "minimum": 0,
479
+ "maximum": 10000000
480
+ }
481
+ ]
482
+ },
483
+ "y": {
484
+ "type": "number",
485
+ "allOf": [
486
+ {
487
+ "minimum": 0,
488
+ "maximum": 10000000
489
+ }
490
+ ]
491
+ },
492
+ "z": {
493
+ "type": "number",
494
+ "allOf": [
495
+ {
496
+ "minimum": 0,
497
+ "maximum": 10000000
498
+ }
499
+ ]
500
+ }
501
+ },
502
+ "required": ["x", "y", "z"],
503
+ "additionalProperties": false
504
+ }
505
+ },
506
+ "required": ["mode", "maximumRegions", "extent"],
507
+ "additionalProperties": false
508
+ }
509
+ ]
510
+ },
511
+ "dataLayers": {
512
+ "type": "array",
513
+ "items": {
514
+ "type": "object",
515
+ "properties": {
516
+ "assetPath": {
517
+ "type": "string",
518
+ "allOf": [
519
+ {
520
+ "pattern": "^\\/[A-Za-z0-9_./-]+$"
521
+ },
522
+ {
523
+ "maxLength": 1024
524
+ }
525
+ ]
526
+ },
527
+ "loaded": {
528
+ "type": "boolean"
529
+ },
530
+ "visible": {
531
+ "type": "boolean"
532
+ }
533
+ },
534
+ "required": ["assetPath", "loaded", "visible"],
535
+ "additionalProperties": false
536
+ },
537
+ "allOf": [
538
+ {
539
+ "maxItems": 64
540
+ }
541
+ ]
542
+ }
543
+ },
544
+ "required": ["geometry", "dataLayers"],
545
+ "additionalProperties": false
546
+ }
547
+ },
548
+ "required": ["renderer", "exposure", "settling", "time", "preparation"],
549
+ "additionalProperties": false
550
+ }
551
+ },
552
+ "required": ["status", "sessionId", "resolvedPolicy"],
553
+ "additionalProperties": false
554
+ },
555
+ {
556
+ "type": "object",
557
+ "properties": {
558
+ "status": {
559
+ "type": "string",
560
+ "enum": ["failed"]
561
+ },
562
+ "code": {
563
+ "type": "string",
564
+ "enum": [
565
+ "invalid_policy",
566
+ "invalid_frame",
567
+ "invalid_region",
568
+ "unsupported_policy",
569
+ "unsupported_size",
570
+ "editor_required",
571
+ "rendering_unavailable",
572
+ "map_mismatch",
573
+ "project_mismatch",
574
+ "editor_busy",
575
+ "viewport_unavailable",
576
+ "viewport_locked",
577
+ "preparation_failed",
578
+ "preparation_budget_exceeded",
579
+ "frame_budget_exceeded",
580
+ "world_changed",
581
+ "lease_expired",
582
+ "settling_timeout",
583
+ "exposure_unavailable",
584
+ "capture_failed",
585
+ "artifact_invalid",
586
+ "restoration_failed",
587
+ "cancelled",
588
+ "session_unknown",
589
+ "session_closed",
590
+ "session_conflict",
591
+ "operation_unknown",
592
+ "operation_expired",
593
+ "operation_conflict"
594
+ ]
595
+ },
596
+ "message": {
597
+ "type": "string",
598
+ "allOf": [
599
+ {
600
+ "minLength": 1
601
+ },
602
+ {
603
+ "maxLength": 1024
604
+ }
605
+ ]
606
+ },
607
+ "recovery": {
608
+ "type": "string",
609
+ "allOf": [
610
+ {
611
+ "minLength": 1
612
+ },
613
+ {
614
+ "maxLength": 1024
615
+ }
616
+ ]
617
+ },
618
+ "sessionId": {
619
+ "type": "string",
620
+ "allOf": [
621
+ {
622
+ "minLength": 1
623
+ },
624
+ {
625
+ "maxLength": 1024
626
+ }
627
+ ]
628
+ },
629
+ "operationId": {
630
+ "type": "string",
631
+ "allOf": [
632
+ {
633
+ "minLength": 1
634
+ },
635
+ {
636
+ "maxLength": 1024
637
+ }
638
+ ]
639
+ },
640
+ "issues": {
641
+ "type": "array",
642
+ "items": {
643
+ "type": "object",
644
+ "properties": {
645
+ "code": {
646
+ "type": "string",
647
+ "allOf": [
648
+ {
649
+ "minLength": 1
650
+ },
651
+ {
652
+ "maxLength": 1024
653
+ }
654
+ ]
655
+ },
656
+ "path": {
657
+ "type": "string",
658
+ "allOf": [
659
+ {
660
+ "minLength": 1
661
+ },
662
+ {
663
+ "maxLength": 1024
664
+ }
665
+ ]
666
+ },
667
+ "message": {
668
+ "type": "string",
669
+ "allOf": [
670
+ {
671
+ "minLength": 1
672
+ },
673
+ {
674
+ "maxLength": 1024
675
+ }
676
+ ]
677
+ },
678
+ "recovery": {
679
+ "type": "string",
680
+ "allOf": [
681
+ {
682
+ "minLength": 1
683
+ },
684
+ {
685
+ "maxLength": 1024
686
+ }
687
+ ]
688
+ }
689
+ },
690
+ "required": ["code", "path", "message", "recovery"],
691
+ "additionalProperties": false
692
+ }
693
+ },
694
+ "restoration": {
695
+ "type": "string",
696
+ "enum": ["not_acquired", "restored", "failed"]
697
+ }
698
+ },
699
+ "required": [
700
+ "status",
701
+ "code",
702
+ "message",
703
+ "recovery",
704
+ "sessionId",
705
+ "issues",
706
+ "restoration"
707
+ ],
708
+ "additionalProperties": false
709
+ }
710
+ ],
711
+ "$defs": {}
712
+ }