@ue-shed/protocol 0.1.0-rc.1
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.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/contracts/asset-audits/v1/texture-preview.schema.json +74 -0
- package/contracts/authoring/README.md +25 -0
- package/contracts/authoring/v1/apply-request.schema.json +568 -0
- package/contracts/authoring/v1/apply-result.schema.json +1165 -0
- package/contracts/authoring/v1/save-request.schema.json +53 -0
- package/contracts/authoring/v1/save-result.schema.json +77 -0
- package/contracts/authoring/v1/table-list.schema.json +48 -0
- package/contracts/authoring/v1/table-snapshot.schema.json +497 -0
- package/contracts/authoring/v2/table-snapshot.schema.json +950 -0
- package/contracts/cameras/review/v1/README.md +39 -0
- package/contracts/cameras/review/v1/capture-request.schema.json +92 -0
- package/contracts/cameras/review/v1/capture-response.schema.json +158 -0
- package/contracts/cameras/review/v1/fixtures/capture-failure.json +13 -0
- package/contracts/cameras/review/v1/fixtures/capture-legacy.json +17 -0
- package/contracts/cameras/review/v1/fixtures/capture-projected.json +33 -0
- package/contracts/cameras/review/v1/fixtures/capture-request-valid.json +21 -0
- package/contracts/cameras/review/v1/fixtures/capture-unprojectable.json +22 -0
- package/contracts/cameras/review/v1/fixtures/invalid-capture-request-bad-fov.json +21 -0
- package/contracts/cameras/review/v1/fixtures/invalid-capture-response-projected-without-margins.json +27 -0
- package/contracts/cameras/review/v1/fixtures/invalid-selection-unknown-code.json +11 -0
- package/contracts/cameras/review/v1/fixtures/selection-selected.json +15 -0
- package/contracts/cameras/review/v1/fixtures/selection-subject-not-found.json +11 -0
- package/contracts/cameras/review/v1/selection-response.schema.json +103 -0
- package/contracts/cameras/v1/README.md +33 -0
- package/contracts/editor-session/v1/README.md +11 -0
- package/contracts/editor-session/v1/command-response.schema.json +44 -0
- package/contracts/editor-session/v1/fixtures/command-accepted.json +6 -0
- package/contracts/editor-session/v1/fixtures/command-already-satisfied.json +6 -0
- package/contracts/editor-session/v1/fixtures/command-rejected.json +9 -0
- package/contracts/editor-session/v1/fixtures/state-paused.json +4 -0
- package/contracts/editor-session/v1/fixtures/state-running.json +4 -0
- package/contracts/editor-session/v1/fixtures/state-starting.json +4 -0
- package/contracts/editor-session/v1/fixtures/state-stopped.json +4 -0
- package/contracts/editor-session/v1/fixtures/state-stopping.json +4 -0
- package/contracts/editor-session/v1/state-response.schema.json +64 -0
- package/contracts/observatory/v1/README.md +78 -0
- package/contracts/observatory/v1/fixtures/bad-magic-then-valid.bin +0 -0
- package/contracts/observatory/v1/fixtures/fragmented-concat.bin +0 -0
- package/contracts/observatory/v1/fixtures/heartbeat.bin +0 -0
- package/contracts/observatory/v1/fixtures/mismatched-payload-length.bin +0 -0
- package/contracts/observatory/v1/fixtures/oversized-record-count.bin +0 -0
- package/contracts/observatory/v1/fixtures/reset.bin +0 -0
- package/contracts/observatory/v1/fixtures/truncated.bin +0 -0
- package/contracts/observatory/v1/fixtures/two-records.bin +0 -0
- package/contracts/observatory/v1/fixtures/unsupported-version.bin +0 -0
- package/dist/authoring-review.d.ts +679 -0
- package/dist/authoring-review.d.ts.map +1 -0
- package/dist/authoring-review.js +90 -0
- package/dist/authoring-review.js.map +1 -0
- package/dist/authoring.d.ts +889 -0
- package/dist/authoring.d.ts.map +1 -0
- package/dist/authoring.js +350 -0
- package/dist/authoring.js.map +1 -0
- package/dist/cameras.d.ts +184 -0
- package/dist/cameras.d.ts.map +1 -0
- package/dist/cameras.js +72 -0
- package/dist/cameras.js.map +1 -0
- package/dist/companion.d.ts +33 -0
- package/dist/companion.d.ts.map +1 -0
- package/dist/companion.js +18 -0
- package/dist/companion.js.map +1 -0
- package/dist/editor-play-session.d.ts +278 -0
- package/dist/editor-play-session.d.ts.map +1 -0
- package/dist/editor-play-session.js +56 -0
- package/dist/editor-play-session.js.map +1 -0
- package/dist/index.d.ts +146 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Map Review capture contract v1
|
|
2
|
+
|
|
3
|
+
The checked-in JSON Schemas in this directory are the language-neutral authority for the stable
|
|
4
|
+
editor wire surface shared by TypeScript and UEShedCameras: capture request/response and selection /
|
|
5
|
+
subject-inspection response. TypeScript Effect codecs in `@ue-shed/cameras` and the Unreal C++
|
|
6
|
+
companion must remain conformant with them.
|
|
7
|
+
|
|
8
|
+
Portable Review Set / Capture Run documents and Workbench IPC remain TypeScript-owned Effect schemas
|
|
9
|
+
in `@ue-shed/cameras`. They are deliberately outside this JSON authority while Map Review authoring
|
|
10
|
+
recovery, live preview, and World Scout streaming plans remain active.
|
|
11
|
+
|
|
12
|
+
The control-plane request asks a separately enabled editor capability to resolve one actor subject,
|
|
13
|
+
realize one approved perspective pose transiently, and write one Pure PNG into the project's bounded
|
|
14
|
+
review staging directory. The response reports the staged path, effective dimensions, resolved map
|
|
15
|
+
and subject, duration, and map-package dirty state before and after capture.
|
|
16
|
+
|
|
17
|
+
The staged file is not durable evidence. A trusted host validates that the path is beneath
|
|
18
|
+
`Saved/UEShed/ReviewStaging`, hashes and copies the PNG into an immutable Capture Run, then deletes the
|
|
19
|
+
staged file. The editor capability never accepts an arbitrary output path.
|
|
20
|
+
|
|
21
|
+
Requests and responses declare `ue-shed-review-capture` contract major version 1. Expected failures
|
|
22
|
+
are structured, include recovery guidance and retry safety, and never masquerade as captured images.
|
|
23
|
+
|
|
24
|
+
`selection-response.schema.json` defines the adjacent editor-only spatial-authoring observation. It
|
|
25
|
+
returns one selected actor's normalized bounds and optional active perspective viewport, or a typed
|
|
26
|
+
no-selection, multiple-selection, or editor-unavailable failure. The same schema file also documents
|
|
27
|
+
subject-inspection failures (`map_mismatch`, `subject_not_found`); TypeScript keeps ambient selection
|
|
28
|
+
and subject-inspection as separate Effect unions that both conform to this JSON envelope. Candidate
|
|
29
|
+
generation and approval are deliberately outside this wire contract.
|
|
30
|
+
|
|
31
|
+
Change a wire shape in this order:
|
|
32
|
+
|
|
33
|
+
1. Edit the authoritative JSON Schema and add or update language-neutral conformance fixtures.
|
|
34
|
+
2. Update the Effect runtime schema until `pnpm --filter @ue-shed/cameras contract:check` passes.
|
|
35
|
+
3. Update the UEShedCameras producer and run `pnpm check:unreal` (review lane) on a trusted UE 5.7
|
|
36
|
+
runner with Remote Control connected.
|
|
37
|
+
4. Switch consumers only after both producers pass.
|
|
38
|
+
|
|
39
|
+
Do not generate these files from TypeScript. That would reverse the authority established by ADR 0002.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ue-shed.dev/contracts/cameras/review/v1/capture-request.schema.json",
|
|
4
|
+
"title": "UE Shed Map Review capture request v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"contract",
|
|
9
|
+
"operationId",
|
|
10
|
+
"viewId",
|
|
11
|
+
"expectedMapPath",
|
|
12
|
+
"subject",
|
|
13
|
+
"approvedPose",
|
|
14
|
+
"resolution"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"contract": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["name", "version"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"name": { "const": "ue-shed-review-capture" },
|
|
23
|
+
"version": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["major", "minor"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"major": { "const": 1 },
|
|
29
|
+
"minor": { "type": "integer", "minimum": 0 }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"operationId": { "type": "string", "format": "uuid" },
|
|
35
|
+
"viewId": { "$ref": "#/$defs/safeId" },
|
|
36
|
+
"expectedMapPath": { "type": "string", "minLength": 1 },
|
|
37
|
+
"subject": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": ["kind", "actorPath"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"kind": { "const": "actor_path" },
|
|
43
|
+
"actorPath": { "type": "string", "minLength": 1 },
|
|
44
|
+
"diagnosticLabel": { "type": "string", "minLength": 1 }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"approvedPose": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["aspectRatio", "fieldOfViewDegrees", "location", "projection", "rotation"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"aspectRatio": { "const": "16:9" },
|
|
53
|
+
"fieldOfViewDegrees": { "type": "number", "minimum": 5, "maximum": 170 },
|
|
54
|
+
"projection": { "const": "perspective" },
|
|
55
|
+
"location": { "$ref": "#/$defs/vector" },
|
|
56
|
+
"rotation": { "$ref": "#/$defs/rotation" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"resolution": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["width", "height"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"width": { "type": "integer", "minimum": 160, "maximum": 3840 },
|
|
65
|
+
"height": { "type": "integer", "minimum": 90, "maximum": 2160 }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"$defs": {
|
|
70
|
+
"safeId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
|
|
71
|
+
"vector": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["x", "y", "z"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"x": { "type": "number" },
|
|
77
|
+
"y": { "type": "number" },
|
|
78
|
+
"z": { "type": "number" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"rotation": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["pitch", "yaw", "roll"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"pitch": { "type": "number" },
|
|
87
|
+
"yaw": { "type": "number" },
|
|
88
|
+
"roll": { "type": "number" }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ue-shed.dev/contracts/cameras/review/v1/capture-response.schema.json",
|
|
4
|
+
"title": "UE Shed Map Review capture response v1",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"contract",
|
|
10
|
+
"status",
|
|
11
|
+
"operationId",
|
|
12
|
+
"viewId",
|
|
13
|
+
"actorPath",
|
|
14
|
+
"mapPath",
|
|
15
|
+
"stagingPath",
|
|
16
|
+
"width",
|
|
17
|
+
"height",
|
|
18
|
+
"captureDurationMs",
|
|
19
|
+
"mapPackageDirtyBefore",
|
|
20
|
+
"mapPackageDirtyAfter"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"contract": { "$ref": "#/$defs/contract" },
|
|
24
|
+
"status": { "const": "captured" },
|
|
25
|
+
"operationId": { "type": "string", "minLength": 1 },
|
|
26
|
+
"viewId": { "$ref": "#/$defs/safeId" },
|
|
27
|
+
"actorPath": { "type": "string", "minLength": 1 },
|
|
28
|
+
"mapPath": { "type": "string", "minLength": 1 },
|
|
29
|
+
"stagingPath": { "type": "string", "minLength": 1 },
|
|
30
|
+
"width": { "type": "integer", "minimum": 1 },
|
|
31
|
+
"height": { "type": "integer", "minimum": 1 },
|
|
32
|
+
"captureDurationMs": { "type": "number", "minimum": 0 },
|
|
33
|
+
"mapPackageDirtyBefore": { "type": "boolean" },
|
|
34
|
+
"mapPackageDirtyAfter": { "type": "boolean" },
|
|
35
|
+
"subjectProjection": { "$ref": "#/$defs/subjectProjection" }
|
|
36
|
+
},
|
|
37
|
+
"allOf": [
|
|
38
|
+
{
|
|
39
|
+
"if": {
|
|
40
|
+
"required": ["contract"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"contract": {
|
|
43
|
+
"required": ["version"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"version": {
|
|
46
|
+
"required": ["minor"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"minor": { "minimum": 1 }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"then": { "required": ["subjectProjection"] }
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"type": "object",
|
|
62
|
+
"required": [
|
|
63
|
+
"contract",
|
|
64
|
+
"status",
|
|
65
|
+
"operationId",
|
|
66
|
+
"viewId",
|
|
67
|
+
"code",
|
|
68
|
+
"message",
|
|
69
|
+
"recovery",
|
|
70
|
+
"retrySafe"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"contract": { "$ref": "#/$defs/contract" },
|
|
74
|
+
"status": { "const": "failed" },
|
|
75
|
+
"operationId": { "type": "string" },
|
|
76
|
+
"viewId": { "type": "string" },
|
|
77
|
+
"code": { "type": "string", "minLength": 1 },
|
|
78
|
+
"message": { "type": "string", "minLength": 1 },
|
|
79
|
+
"recovery": { "type": "string", "minLength": 1 },
|
|
80
|
+
"retrySafe": { "type": "boolean" }
|
|
81
|
+
},
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"$defs": {
|
|
86
|
+
"contract": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": ["name", "version"],
|
|
90
|
+
"properties": {
|
|
91
|
+
"name": { "const": "ue-shed-review-capture" },
|
|
92
|
+
"version": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"required": ["major", "minor"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"major": { "const": 1 },
|
|
98
|
+
"minor": { "type": "integer", "minimum": 0 }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"safeId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" },
|
|
104
|
+
"projectedBounds": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": ["minX", "minY", "maxX", "maxY"],
|
|
108
|
+
"properties": {
|
|
109
|
+
"minX": { "type": "number" },
|
|
110
|
+
"minY": { "type": "number" },
|
|
111
|
+
"maxX": { "type": "number" },
|
|
112
|
+
"maxY": { "type": "number" }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"projectionMargins": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": ["left", "right", "top", "bottom"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"left": { "type": "number" },
|
|
121
|
+
"right": { "type": "number" },
|
|
122
|
+
"top": { "type": "number" },
|
|
123
|
+
"bottom": { "type": "number" }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"subjectProjection": {
|
|
127
|
+
"oneOf": [
|
|
128
|
+
{
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": ["status", "viewportStatus", "normalizedBounds", "margins"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"status": { "const": "projected" },
|
|
134
|
+
"viewportStatus": {
|
|
135
|
+
"enum": [
|
|
136
|
+
"fully_within_viewport",
|
|
137
|
+
"partially_outside_viewport",
|
|
138
|
+
"fully_outside_viewport"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"normalizedBounds": { "$ref": "#/$defs/projectedBounds" },
|
|
142
|
+
"margins": { "$ref": "#/$defs/projectionMargins" }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "object",
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"required": ["status", "code", "message"],
|
|
149
|
+
"properties": {
|
|
150
|
+
"status": { "const": "unprojectable" },
|
|
151
|
+
"code": { "enum": ["behind_camera", "near_plane_crossing"] },
|
|
152
|
+
"message": { "type": "string", "minLength": 1 }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 0 }
|
|
5
|
+
},
|
|
6
|
+
"status": "failed",
|
|
7
|
+
"operationId": "33333333-3333-4333-8333-333333333333",
|
|
8
|
+
"viewId": "structure-context",
|
|
9
|
+
"code": "invalid_request",
|
|
10
|
+
"message": "Review capture request is not valid JSON.",
|
|
11
|
+
"recovery": "Validate the request against contract version 1.",
|
|
12
|
+
"retrySafe": false
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 0 }
|
|
5
|
+
},
|
|
6
|
+
"status": "captured",
|
|
7
|
+
"operationId": "capture-legacy",
|
|
8
|
+
"viewId": "structure-context",
|
|
9
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject",
|
|
10
|
+
"mapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
11
|
+
"stagingPath": "C:/fixture/Saved/UEShed/ReviewStaging/capture-legacy/pure.png",
|
|
12
|
+
"width": 1280,
|
|
13
|
+
"height": 720,
|
|
14
|
+
"captureDurationMs": 9.5,
|
|
15
|
+
"mapPackageDirtyBefore": false,
|
|
16
|
+
"mapPackageDirtyAfter": false
|
|
17
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 1 }
|
|
5
|
+
},
|
|
6
|
+
"status": "captured",
|
|
7
|
+
"operationId": "capture-1",
|
|
8
|
+
"viewId": "structure-context",
|
|
9
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject",
|
|
10
|
+
"mapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
11
|
+
"stagingPath": "C:/fixture/Saved/UEShed/ReviewStaging/capture-1/pure.png",
|
|
12
|
+
"width": 1280,
|
|
13
|
+
"height": 720,
|
|
14
|
+
"captureDurationMs": 12.5,
|
|
15
|
+
"mapPackageDirtyBefore": false,
|
|
16
|
+
"mapPackageDirtyAfter": false,
|
|
17
|
+
"subjectProjection": {
|
|
18
|
+
"status": "projected",
|
|
19
|
+
"viewportStatus": "fully_within_viewport",
|
|
20
|
+
"normalizedBounds": {
|
|
21
|
+
"minX": 0.25,
|
|
22
|
+
"minY": 0.2,
|
|
23
|
+
"maxX": 0.75,
|
|
24
|
+
"maxY": 0.8
|
|
25
|
+
},
|
|
26
|
+
"margins": {
|
|
27
|
+
"left": 0.25,
|
|
28
|
+
"right": 0.25,
|
|
29
|
+
"top": 0.2,
|
|
30
|
+
"bottom": 0.2
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 1 }
|
|
5
|
+
},
|
|
6
|
+
"operationId": "11111111-1111-4111-8111-111111111111",
|
|
7
|
+
"viewId": "structure-context",
|
|
8
|
+
"expectedMapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
9
|
+
"subject": {
|
|
10
|
+
"kind": "actor_path",
|
|
11
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject"
|
|
12
|
+
},
|
|
13
|
+
"approvedPose": {
|
|
14
|
+
"aspectRatio": "16:9",
|
|
15
|
+
"fieldOfViewDegrees": 70,
|
|
16
|
+
"projection": "perspective",
|
|
17
|
+
"location": { "x": 100, "y": 200, "z": 300 },
|
|
18
|
+
"rotation": { "pitch": -20, "yaw": 45, "roll": 0 }
|
|
19
|
+
},
|
|
20
|
+
"resolution": { "width": 1280, "height": 720 }
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 1 }
|
|
5
|
+
},
|
|
6
|
+
"status": "captured",
|
|
7
|
+
"operationId": "capture-2",
|
|
8
|
+
"viewId": "structure-context",
|
|
9
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject",
|
|
10
|
+
"mapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
11
|
+
"stagingPath": "C:/fixture/Saved/UEShed/ReviewStaging/capture-2/pure.png",
|
|
12
|
+
"width": 1280,
|
|
13
|
+
"height": 720,
|
|
14
|
+
"captureDurationMs": 10.5,
|
|
15
|
+
"mapPackageDirtyBefore": false,
|
|
16
|
+
"mapPackageDirtyAfter": false,
|
|
17
|
+
"subjectProjection": {
|
|
18
|
+
"status": "unprojectable",
|
|
19
|
+
"code": "near_plane_crossing",
|
|
20
|
+
"message": "A subject-bounds corner crosses the transient capture near plane."
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 1 }
|
|
5
|
+
},
|
|
6
|
+
"operationId": "22222222-2222-4222-8222-222222222222",
|
|
7
|
+
"viewId": "structure-context",
|
|
8
|
+
"expectedMapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
9
|
+
"subject": {
|
|
10
|
+
"kind": "actor_path",
|
|
11
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject"
|
|
12
|
+
},
|
|
13
|
+
"approvedPose": {
|
|
14
|
+
"aspectRatio": "16:9",
|
|
15
|
+
"fieldOfViewDegrees": 1,
|
|
16
|
+
"projection": "perspective",
|
|
17
|
+
"location": { "x": 0, "y": 0, "z": 0 },
|
|
18
|
+
"rotation": { "pitch": 0, "yaw": 0, "roll": 0 }
|
|
19
|
+
},
|
|
20
|
+
"resolution": { "width": 1280, "height": 720 }
|
|
21
|
+
}
|
package/contracts/cameras/review/v1/fixtures/invalid-capture-response-projected-without-margins.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-capture",
|
|
4
|
+
"version": { "major": 1, "minor": 1 }
|
|
5
|
+
},
|
|
6
|
+
"status": "captured",
|
|
7
|
+
"operationId": "capture-bad-projection",
|
|
8
|
+
"viewId": "structure-context",
|
|
9
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject",
|
|
10
|
+
"mapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
11
|
+
"stagingPath": "C:/fixture/Saved/UEShed/ReviewStaging/capture-bad/pure.png",
|
|
12
|
+
"width": 1280,
|
|
13
|
+
"height": 720,
|
|
14
|
+
"captureDurationMs": 12.5,
|
|
15
|
+
"mapPackageDirtyBefore": false,
|
|
16
|
+
"mapPackageDirtyAfter": false,
|
|
17
|
+
"subjectProjection": {
|
|
18
|
+
"status": "projected",
|
|
19
|
+
"viewportStatus": "fully_within_viewport",
|
|
20
|
+
"normalizedBounds": {
|
|
21
|
+
"minX": 0.2,
|
|
22
|
+
"minY": 0.2,
|
|
23
|
+
"maxX": 0.8,
|
|
24
|
+
"maxY": 0.8
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-selection",
|
|
4
|
+
"version": { "major": 1, "minor": 0 }
|
|
5
|
+
},
|
|
6
|
+
"status": "failed",
|
|
7
|
+
"code": "not_a_real_failure",
|
|
8
|
+
"message": "Invented failure code.",
|
|
9
|
+
"recovery": "Do not accept unknown codes.",
|
|
10
|
+
"retrySafe": false
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-selection",
|
|
4
|
+
"version": { "major": 1, "minor": 0 }
|
|
5
|
+
},
|
|
6
|
+
"status": "selected",
|
|
7
|
+
"actorPath": "/Game/Fixture/Cameras/L_CameraLoad.L_CameraLoad:PersistentLevel.ReviewSubject",
|
|
8
|
+
"displayName": "ReviewSubject",
|
|
9
|
+
"mapPath": "/Game/Fixture/Cameras/L_CameraLoad",
|
|
10
|
+
"bounds": {
|
|
11
|
+
"center": { "x": 0, "y": 0, "z": 100 },
|
|
12
|
+
"extent": { "x": 50, "y": 50, "z": 100 },
|
|
13
|
+
"rotation": { "pitch": 0, "yaw": 0, "roll": 0 }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": {
|
|
3
|
+
"name": "ue-shed-review-selection",
|
|
4
|
+
"version": { "major": 1, "minor": 0 }
|
|
5
|
+
},
|
|
6
|
+
"status": "failed",
|
|
7
|
+
"code": "subject_not_found",
|
|
8
|
+
"message": "The persisted review subject was not found.",
|
|
9
|
+
"recovery": "Restore the subject or discard this authoring session.",
|
|
10
|
+
"retrySafe": true
|
|
11
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ue-shed.dev/contracts/cameras/review/v1/selection-response.schema.json",
|
|
4
|
+
"title": "UE Shed Review Selection Response v1",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["contract", "status", "actorPath", "displayName", "mapPath", "bounds"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"contract": { "$ref": "#/$defs/contract" },
|
|
12
|
+
"status": { "const": "selected" },
|
|
13
|
+
"actorPath": { "type": "string", "minLength": 1 },
|
|
14
|
+
"displayName": { "type": "string", "minLength": 1 },
|
|
15
|
+
"mapPath": { "type": "string", "minLength": 1 },
|
|
16
|
+
"bounds": { "$ref": "#/$defs/bounds" },
|
|
17
|
+
"editorView": { "$ref": "#/$defs/pose" }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["contract", "status", "code", "message", "recovery", "retrySafe"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"contract": { "$ref": "#/$defs/contract" },
|
|
26
|
+
"status": { "const": "failed" },
|
|
27
|
+
"code": {
|
|
28
|
+
"enum": [
|
|
29
|
+
"no_selection",
|
|
30
|
+
"multiple_selection",
|
|
31
|
+
"editor_unavailable",
|
|
32
|
+
"map_mismatch",
|
|
33
|
+
"subject_not_found"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"message": { "type": "string", "minLength": 1 },
|
|
37
|
+
"recovery": { "type": "string", "minLength": 1 },
|
|
38
|
+
"retrySafe": { "type": "boolean" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"$defs": {
|
|
43
|
+
"contract": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["name", "version"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"name": { "const": "ue-shed-review-selection" },
|
|
49
|
+
"version": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["major", "minor"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"major": { "const": 1 },
|
|
55
|
+
"minor": { "type": "integer", "minimum": 0 }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"vector": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["x", "y", "z"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"x": { "type": "number" },
|
|
66
|
+
"y": { "type": "number" },
|
|
67
|
+
"z": { "type": "number" }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"rotation": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["pitch", "roll", "yaw"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"pitch": { "type": "number" },
|
|
76
|
+
"roll": { "type": "number" },
|
|
77
|
+
"yaw": { "type": "number" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"bounds": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["center", "extent", "rotation"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"center": { "$ref": "#/$defs/vector" },
|
|
86
|
+
"extent": { "$ref": "#/$defs/vector" },
|
|
87
|
+
"rotation": { "$ref": "#/$defs/rotation" }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"pose": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": ["aspectRatio", "fieldOfViewDegrees", "location", "projection", "rotation"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"aspectRatio": { "const": "16:9" },
|
|
96
|
+
"fieldOfViewDegrees": { "type": "number", "minimum": 5, "maximum": 170 },
|
|
97
|
+
"location": { "$ref": "#/$defs/vector" },
|
|
98
|
+
"projection": { "const": "perspective" },
|
|
99
|
+
"rotation": { "$ref": "#/$defs/rotation" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Camera live-frame contract v1
|
|
2
|
+
|
|
3
|
+
The live path is a byte stream of fixed-size 128-byte little-endian headers followed immediately by
|
|
4
|
+
`payloadLength` bytes. Receivers must resynchronize on the ASCII magic `USCF`, reject unsupported
|
|
5
|
+
versions and dimensions, and cap payloads before allocating. A reconnect starts a new session ID;
|
|
6
|
+
frames from an old session are disposable.
|
|
7
|
+
|
|
8
|
+
| Offset | Type | Field |
|
|
9
|
+
| -----: | ------- | ---------------------------------------------------- |
|
|
10
|
+
| 0 | char[4] | `USCF` magic |
|
|
11
|
+
| 4 | u16 | version (`1`) |
|
|
12
|
+
| 6 | u16 | header length (`128`) |
|
|
13
|
+
| 8 | u32 | flags: bit 0 sRGB, bit 1 BGRA8 |
|
|
14
|
+
| 12 | u32 | width |
|
|
15
|
+
| 16 | u32 | height |
|
|
16
|
+
| 20 | u32 | row pitch in bytes (payload is tightly packed in v1) |
|
|
17
|
+
| 24 | u32 | payload length |
|
|
18
|
+
| 28 | u32 | stable fixture camera index |
|
|
19
|
+
| 32 | u64 | per-camera sequence |
|
|
20
|
+
| 40 | f64 | Unreal world seconds at capture request |
|
|
21
|
+
| 48 | f64 | producer monotonic milliseconds at capture request |
|
|
22
|
+
| 56 | f64 | GPU readback latency in milliseconds |
|
|
23
|
+
| 64 | u8[16] | producer ID |
|
|
24
|
+
| 80 | u8[16] | session ID |
|
|
25
|
+
| 96 | u8[16] | camera ID |
|
|
26
|
+
| 112 | u32 | cumulative readback/staging drops |
|
|
27
|
+
| 116 | u32 | cumulative latest-frame transport replacements |
|
|
28
|
+
| 120 | u32 | reserved, zero |
|
|
29
|
+
| 124 | u32 | reserved, zero |
|
|
30
|
+
|
|
31
|
+
The payload is top-to-bottom, tightly packed BGRA8. Live buffers are bounded and latest-frame-wins;
|
|
32
|
+
sequence gaps are expected and observable. The control plane owns camera listing, schedule tuning,
|
|
33
|
+
pause/focus, and health. This binary stream never carries durable evidence.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Unreal editor play-session contract v1
|
|
2
|
+
|
|
3
|
+
These JSON Schemas are the language-neutral authority for observing and controlling a local Unreal
|
|
4
|
+
Editor play session. Commands are idempotent and return the state observed immediately after the
|
|
5
|
+
request. Lifecycle completion remains observable through subsequent state queries.
|
|
6
|
+
|
|
7
|
+
`play` means Play In Editor and `simulate` means Simulate In Editor. Version 1 targets one local,
|
|
8
|
+
single-process session in the active level viewport. Standalone and multiplayer launch profiles are
|
|
9
|
+
outside this contract.
|
|
10
|
+
|
|
11
|
+
The JSON fixtures are shared examples for TypeScript and Unreal-side conformance tests.
|