Metadata-Version: 2.4
Name: rfabric-control-wire
Version: 0.1.0
Summary: Wire format primitives for the rFabric realtime control bridge (UDS/CBOR Frame envelope + payload constants)
Project-URL: Homepage, https://rfabric.io
Project-URL: Repository, https://github.com/rfabric/rfabric
Author-email: rFabric <engineering@rfabric.io>
License: Apache-2.0
Keywords: cbor,rfabric,robotics,teleoperation,uds
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: cbor2<6.0.0,>=5.6.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# rfabric-control-wire

Wire-format primitives shared between every Python consumer of the rFabric
realtime control bridge.

The Rust agent (`rfabric-agent`) terminates the operator-side WebRTC data
channel and forwards length-prefixed CBOR `Frame`s onto a Unix-domain socket.
This package owns the Python side of that contract:

- `Frame`, `read_frame`, `write_frame` — length-prefixed CBOR framing.
- `CONTROL_KIND` / `STATE_KIND` / `MODE_KIND` / `ACK_KIND` — frame envelope
  kinds.
- `PAYLOAD_*` constants and lightweight payload dataclasses
  (`JointTargetsPayload`, `JointDeltasPayload`, `JointVelocityPayload`,
  `EndEffectorPayload`, `StopPayload`, `HomePayload`) — the discriminated set
  of `payload.kind` values an operator may send.

Consumers today: the lerobot teleoperator (`rfabric_remote`) and the
standalone YAM bridge (`rfabric-yam-bridge`). Anything else that wants to
implement a follower binds the same UDS, accepts the same frames, and uses
this package to decode them.

## Wire envelope

Each frame on the wire is

```
[ u32 little-endian length ][ CBOR-encoded Frame map ]
```

where the CBOR map carries `kind`, `seq`, `tsNs`, and `payload`. The same
shape is emitted by `agent-src/src/media/envelope.rs` and
`app/src/frontend/components/intervention/envelope.ts` — so this package is
the canonical Python mirror of that single contract.
