rfabric-control-wire
The control wire of the rFabric realtime control bridge: one CBOR frame format,
version 2, carried on the room's data tracks (operator, inference server,
robot) and on the Unix socket between rfabricd and a follower.
This repository holds every codec but the operator app's:
| Path | What |
|---|---|
src/rfabric_control_wire/ |
Python package rfabric-control-wire (followers: rfabric-yam-bridge, lerobot-teleoperator-rfabricd) |
rust/ |
Rust crate rfabric-control-wire (lib rfabric_control_wire; rfabricd, the inference.serve room client) |
vectors/ |
Shared cases every codec decodes and re-encodes byte for byte, including the operator app's controlWire.ts |
Frame
A CBOR map with exactly these keys, encoded in this order:
| Key | Type | Meaning |
|---|---|---|
v |
uint | Control-wire version, 2 (VERSION). A frame with another or no v is dropped (VersionError / Error::Version). |
kind |
text | control, state, ack, mode |
seq |
uint | Increases by one per frame per (participant, track); receivers drop a seq not above the last accepted one. |
tsNs |
uint | Sender wall clock, ns since the Unix epoch; latency reporting only. |
payload |
map | payload.kind discriminates. |
On the Unix socket each frame is [u32 LE length][CBOR frame], at most 64 KiB
(MAX_FRAME_BYTES). A frame on a lossy room track encodes to at most 1200
bytes (MAX_LOSSY_FRAME_BYTES).
Encoding is deterministic: definite-length maps and arrays, map keys in the
order of the contract, integers in the shortest form, floats as float32 when
the value round-trips exactly through float32 and float64 otherwise (NaN as
the float64 0x7ff8000000000000), byte strings as major type 2.
Payloads
| Frame kind | payload.kind |
Python | Rust |
|---|---|---|---|
control |
joint_targets, joint_deltas, joint_velocity, end_effector_velocity, stop, home (operator sources), heartbeat (rfabricd → follower), action_chunk (inference source) |
parse_control_payload |
ControlPayload |
state |
snapshot |
parse_state_payload |
SnapshotPayload |
ack |
ping, pong, stop (a follower's stop ack) |
parse_ack_payload |
AckPayload |
mode |
capabilities (robot, follower and inference forms), takeover, release |
parse_mode_payload |
ModePayload |
Every typed payload encodes back with to_payload() (Python) or to_value()
(Rust). A payload that fails to parse raises PayloadError /
Error::Payload; a follower answers it by holding position.
snapshot:valuesandappliedare float32 little-endian bytes inEmbodiment.stateandEmbodiment.actionsorder. On the socket the follower sendskind,embodiment,values; rfabricd stampstick,applied,selectedand, when it changed,received: per control source its newest admitted chunk as[rosterIndex, seq, observationTick, receivedTick, receivedUs](ReceivedChunk),receivedUsthe robot's wall clock in microseconds at admission, the clock of the video frames'user_timestamp.action_chunk:rowsis row-major little-endian,i16orf32; a row concatenates the source's action groups.pack_rows/unpack_rowspack them;quantize_i16/dequantize_i16map one element over itslow..highbounds.embodiment(uint32) isembodiment_fingerprint(state, actions): FNV-1a 32 overs:<name>:<width>;...|a:<name>:<width>;....- Follower
capabilities:positionHold,home(each position group's home row) andvelocityScale(each group that takesjoint_velocity: per element, the physical speed in the group's units per second of normalised velocity 1).joint_velocityvalues are normalised to[-1, 1]; rfabricd bounds them in physical units throughvelocityScaleand sends them normalised again, so the follower's gain drives at most the group'smaxRate. A group withoutvelocityScaletakes nojoint_velocityin a session with motion limits.
Follower rules
conformance.MANDATORY_SAFETY_RULES: rfabricd sends one command per action
group per control tick; a heartbeat at least every 100 ms; the follower holds
position within 200 ms of a stall and on a malformed payload, and declares that
it holds position in capabilities.positionHold.
Vectors
vectors/frames.json ({name, hex, frame}; bytes in frame as
{"$bytes": "<hex>"}; a case with "reject": "version" must be dropped),
vectors/fingerprints.json and vectors/quantization.json are written by
uv run python scripts/generate_vectors.py and checked in. Regenerate only
after a contract change; every codec's vector test must then pass unchanged.
vectors/motion-limit-ramp.json is written by rfabricd's control arbiter test.
Gates
uv run pytest
uv run ruff check
uv run mypy src
cd rust
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features
The Rust crate's async framing (read_frame_async, write_frame_async) is
behind the tokio feature.
Metadata
Release files for rfabric-control-wire 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rfabric_control_wire-0.1.1.tar.gz | 16.4 kB | With provenance | Details for rfabric_control_wire-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rfabric_control_wire-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for rfabric_control_wire-0.1.1-py3-none-any.whl |
Total release size: 36.2 kB
Release files / rfabric_control_wire-0.1.1.tar.gz
| Download URL | rfabric_control_wire-0.1.1.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c8d133669cb3690b79cce14e15bca6cad32433627f49afb2e97932ca1b5dad6
|
|
BLAKE2b-256 checksum How to use checksums |
707818712e5ed0bb03c71d1e4a9e212bc8809b9ca4b989f12358fd9b69ebfb95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / rfabric_control_wire-0.1.1-py3-none-any.whl
| Download URL | rfabric_control_wire-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d915dcba41e21a0085362616a0e622f1e7140fa6d65ded6a3209513c7c0393f6
|
|
BLAKE2b-256 checksum How to use checksums |
a6068619d9f5f3ad256cb1caf6eb4bd7120263300ac58fa6f07d8b8b13a8c9aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for rfabric-control-wire 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rfabric_control_wire-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.