MAP Docs
MOTE

Internals

Crate path, key types, adjacent protocols for MOTE.

MOTE (Multi-Agent Operational Telemetry & Equipment) lives in protocols/mote-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

PathContains
protocols/mote-lib/src/lib.rsProtocolModule impl, operation dispatch
protocols/mote-lib/src/protocol.rscore protocol logic
protocols/mote-lib/src/types.rsrequest/response types (derive schemars::JsonSchema)
protocols/mote-lib/tests/unit + integration tests
schemas/mote/v1/published JSON Schemas

ProtocolModule contract

impl ProtocolModule for MoteProtocol {
    fn protocol_name(&self) -> &'static str { "MOTE" }
    fn version(&self) -> &'static str { "v1.0.0" }

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "sensor_read",
            "actuator_move",
            "actuator_set_state",
            "dispenser_dispense",
            "device_discovery",
            "health_check",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "sensor_read" => self.sensor_read(payload, ctx).await,
            "actuator_move" => self.actuator_move(payload, ctx).await,
            "actuator_set_state" => self.actuator_set_state(payload, ctx).await,
            "dispenser_dispense" => self.dispenser_dispense(payload, ctx).await,
            "device_discovery" => self.device_discovery(payload, ctx).await,
            "health_check" => self.health_check(payload, ctx).await,
            _ => Err(ProtocolError::UnknownOperation(op.into())),
        }
    }
}

Adjacent

RelationMembers
Consults
Records toMAX · MOTET · MOMENT
Subject toMAXIM · MOAT (cross-org) · MOOT (disputes)
Settled withMEAL · MANA · MADE

Status

Implemented · production-grade.

Tests

cargo test -p mote-lib --all-features

See also

On this page