Transport¶
Generated from strands_robots.core.contracts.Transport at build.
Publish and subscribe on a key space. put never raises into a control loop.
Shape: structural Protocol (runtime checkable): implement the members, import nothing.
Members¶
| signature | contract |
|---|---|
put(key: str, payload: Mapping[str, Any]) -> None |
Publish a JSON-serialisable payload; a dead transport drops it silently. |
declare_subscriber(key_expr: str, handler: Callable[[Sample], None]) -> SubHandle |
Route every sample matching key_expr to handler. |
is_alive() -> bool |
Whether the session is usable. |
close() -> None |
Tear the session down; idempotent. |
Sample¶
One inbound message: the key it arrived on and its decoded payload.
| member | contract |
|---|---|
key -> str property |
|
payload -> dict[str, Any] property |
SubHandle¶
An opaque subscription that can be torn down.
| member | contract |
|---|---|
undeclare() -> None |
Where it is used¶
Contracts return typed values and raise strands_robots.core.errors; the agent envelope
is built in tools/. The types they exchange are in strands_robots.core.types; the
frame they agree on is UnitFrame. Why the shapes are what they are:
VISION.md.