@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,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ue-shed.dev/contracts/editor-session/v1/command-response.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"contract": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": { "const": "unreal-editor-play-session" },
|
|
10
|
+
"version": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": { "major": { "const": 1 }, "minor": { "const": 0 } },
|
|
13
|
+
"required": ["major", "minor"],
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["name", "version"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
},
|
|
20
|
+
"command": { "enum": ["start_play", "start_simulate", "stop", "pause", "resume"] },
|
|
21
|
+
"outcome": { "enum": ["accepted", "already_satisfied", "rejected"] },
|
|
22
|
+
"state": { "$ref": "state-response.schema.json#/$defs/state" },
|
|
23
|
+
"code": { "enum": ["invalid_state", "unavailable", "unsupported"] },
|
|
24
|
+
"message": { "type": "string" },
|
|
25
|
+
"recovery": { "type": "string" }
|
|
26
|
+
},
|
|
27
|
+
"required": ["contract", "command", "outcome", "state"],
|
|
28
|
+
"allOf": [
|
|
29
|
+
{
|
|
30
|
+
"if": { "properties": { "outcome": { "const": "rejected" } } },
|
|
31
|
+
"then": { "required": ["code", "message", "recovery"] },
|
|
32
|
+
"else": {
|
|
33
|
+
"not": {
|
|
34
|
+
"anyOf": [
|
|
35
|
+
{ "required": ["code"] },
|
|
36
|
+
{ "required": ["message"] },
|
|
37
|
+
{ "required": ["recovery"] }
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contract": { "name": "unreal-editor-play-session", "version": { "major": 1, "minor": 0 } },
|
|
3
|
+
"command": "pause",
|
|
4
|
+
"outcome": "rejected",
|
|
5
|
+
"code": "invalid_state",
|
|
6
|
+
"message": "No play session is active.",
|
|
7
|
+
"recovery": "Start a play session, then retry pause.",
|
|
8
|
+
"state": { "status": "stopped" }
|
|
9
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ue-shed.dev/contracts/editor-session/v1/state-response.schema.json",
|
|
4
|
+
"$ref": "#/$defs/response",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"contract": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": { "const": "unreal-editor-play-session" },
|
|
10
|
+
"version": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": { "major": { "const": 1 }, "minor": { "const": 0 } },
|
|
13
|
+
"required": ["major", "minor"],
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["name", "version"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
},
|
|
20
|
+
"active": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"mode": { "enum": ["play", "simulate"] },
|
|
24
|
+
"sessionId": { "type": "string", "minLength": 1 }
|
|
25
|
+
},
|
|
26
|
+
"required": ["mode", "sessionId"]
|
|
27
|
+
},
|
|
28
|
+
"state": {
|
|
29
|
+
"oneOf": [
|
|
30
|
+
{
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": { "status": { "const": "stopped" } },
|
|
33
|
+
"required": ["status"],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"allOf": [
|
|
38
|
+
{ "$ref": "#/$defs/active" },
|
|
39
|
+
{
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"status": {
|
|
43
|
+
"enum": ["starting", "running", "paused", "stopping"]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": ["status"],
|
|
47
|
+
"additionalProperties": true
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"unevaluatedProperties": false
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"response": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"contract": { "$ref": "#/$defs/contract" },
|
|
58
|
+
"state": { "$ref": "#/$defs/state" }
|
|
59
|
+
},
|
|
60
|
+
"required": ["contract", "state"],
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Observatory actor-transform stream contract v1
|
|
2
|
+
|
|
3
|
+
The live path is a byte stream of fixed-size 96-byte little-endian headers followed immediately by
|
|
4
|
+
zero or more 48-byte transform records. Receivers must resynchronize on the ASCII magic `USOT`,
|
|
5
|
+
reject unsupported versions and lengths, and cap allocations before reading payloads. A reconnect
|
|
6
|
+
or catalog invalidation starts a new session/revision; records that do not match the retained
|
|
7
|
+
catalog must not be applied.
|
|
8
|
+
|
|
9
|
+
Header:
|
|
10
|
+
|
|
11
|
+
| Offset | Type | Field |
|
|
12
|
+
| -----: | ------- | --------------------------------------------------------- |
|
|
13
|
+
| 0 | char[4] | `USOT` magic |
|
|
14
|
+
| 4 | u16 | version, `1` |
|
|
15
|
+
| 6 | u16 | header length, `96` |
|
|
16
|
+
| 8 | u16 | record length, `48` |
|
|
17
|
+
| 10 | u16 | flags; bit 0 is reset/catalog-invalidated |
|
|
18
|
+
| 12 | u32 | record count, at most 16,384 |
|
|
19
|
+
| 16 | u32 | payload length, exactly `recordCount * 48` |
|
|
20
|
+
| 20 | u32 | reserved, zero |
|
|
21
|
+
| 24 | u64 | session-local packet sequence |
|
|
22
|
+
| 32 | f64 | Unreal world seconds at sampling |
|
|
23
|
+
| 40 | f64 | producer monotonic milliseconds at sampling |
|
|
24
|
+
| 48 | u8[16] | observation session ID |
|
|
25
|
+
| 64 | u64 | catalog revision |
|
|
26
|
+
| 72 | u32 | actors sampled |
|
|
27
|
+
| 76 | u32 | actors changed in this packet |
|
|
28
|
+
| 80 | u32 | cumulative producer replacements |
|
|
29
|
+
| 84 | u32 | sampling duration in microseconds, saturated at `u32` max |
|
|
30
|
+
| 88 | u64 | reserved, zero |
|
|
31
|
+
|
|
32
|
+
Record:
|
|
33
|
+
|
|
34
|
+
| Offset | Type | Field |
|
|
35
|
+
| -----: | ---- | ----------------------------------------- |
|
|
36
|
+
| 0 | u32 | stream-local actor index from the catalog |
|
|
37
|
+
| 4 | u32 | flags; reserved and zero in v1 |
|
|
38
|
+
| 8 | f64 | world X |
|
|
39
|
+
| 16 | f64 | world Y |
|
|
40
|
+
| 24 | f64 | world Z |
|
|
41
|
+
| 32 | f32 | roll degrees |
|
|
42
|
+
| 36 | f32 | pitch degrees |
|
|
43
|
+
| 40 | f32 | yaw degrees |
|
|
44
|
+
| 44 | u32 | reserved, zero |
|
|
45
|
+
|
|
46
|
+
## Limits
|
|
47
|
+
|
|
48
|
+
- Record count ≤ 16,384
|
|
49
|
+
- Header length = 96 bytes
|
|
50
|
+
- Record length = 48 bytes
|
|
51
|
+
- Payload length = `recordCount * 48` ≤ 786,432 bytes
|
|
52
|
+
- Host incremental decoders must bound undecoded buffered bytes (TypeScript decoder default:
|
|
53
|
+
one max packet plus 64 KiB slack). Excess input is discarded and counted as malformed before the
|
|
54
|
+
decoder resumes seeking magic.
|
|
55
|
+
|
|
56
|
+
## Semantics
|
|
57
|
+
|
|
58
|
+
- Little-endian only.
|
|
59
|
+
- An empty non-reset packet (`recordCount = 0`, flag bit 0 clear) is a heartbeat/health sample.
|
|
60
|
+
- A reset packet (flag bit 0 set) invalidates its catalog revision. Hosts retain the last visible
|
|
61
|
+
sample as stale, reacquire a complete catalog over Remote Control, then resume. Never apply a
|
|
62
|
+
record whose session ID, revision, or actor index does not match the retained catalog.
|
|
63
|
+
- Sequence is session-local and monotonic for applied packets. Gaps are expected under
|
|
64
|
+
latest-state-wins delivery and must be observable; they are not a decode error.
|
|
65
|
+
- A producer that replaces an unsent sparse packet must carry its changed indices forward until a
|
|
66
|
+
packet containing them has been delivered to the transport. Replacing one independent delta with
|
|
67
|
+
another would lose state and does not satisfy latest-state-wins semantics.
|
|
68
|
+
- Stream-local actor indices are compact aliases for one catalog revision only. They are never
|
|
69
|
+
durable actor identity and must not be persisted into Review Sets.
|
|
70
|
+
- This binary stream is a local data plane. It never carries durable Map Review evidence. Remote
|
|
71
|
+
Control remains the low-rate control plane for catalog negotiation, focus, and status.
|
|
72
|
+
|
|
73
|
+
## Fixtures
|
|
74
|
+
|
|
75
|
+
Binary fixtures under `fixtures/` cover valid two-record packets, fragmented concatenation,
|
|
76
|
+
heartbeat, reset, bad-magic resynchronization, unsupported version, oversized record count/payload,
|
|
77
|
+
mismatched payload length, and truncated input. Prefer regenerating them with the TypeScript
|
|
78
|
+
encoder in `@ue-shed/observatory` rather than editing offsets by hand.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|