MAP Docs
MEAL

Internals

Crate path, key types, adjacent protocols for MEAL.

MEAL (Multi-Agentic Evolution & Learning · Meter) lives in protocols/meal-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "meter",
            "statement",
            "reconcile",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "meter" => self.meter(payload, ctx).await,
            "statement" => self.statement(payload, ctx).await,
            "reconcile" => self.reconcile(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 meal-lib --all-features

See also

On this page