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
| Path | Contains |
|---|---|
protocols/mim-lib/src/lib.rs | ProtocolModule impl, operation dispatch |
protocols/mim-lib/src/protocol.rs | core protocol logic |
protocols/mim-lib/src/types.rs | request/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
| Relation | Members |
|---|---|
| Consults | — |
| Records to | MAX · MOTET · MOMENT |
| Subject to | MAXIM · MOAT (cross-org) · MOOT (disputes) |
| Settled with | MEAL · MANA · MADE |
Status
Implemented · production-grade.
Tests
cargo test -p mim-lib --all-featuresSee also
ProtocolModuletrait — the contract- Engine pipeline — the 8 stages
- Plugins — author your own