MAP Docs
MIM

Internals

Crate path, key types, adjacent protocols for MIM.

MIM (Multi-Agentic Interoperable Messaging) lives in protocols/mim-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "message_send",
            "message_receive",
            "queuing",
            "dedup_check",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "message_send" => self.message_send(payload, ctx).await,
            "message_receive" => self.message_receive(payload, ctx).await,
            "queuing" => self.queuing(payload, ctx).await,
            "dedup_check" => self.dedup_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 mim-lib --all-features

See also

On this page