MAP Docs
MARS

Internals

Crate path, key types, adjacent protocols for MARS.

MARS (Multi-Agentic Registry Service) lives in protocols/mars-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "register_agent",
            "query_registry",
            "publish_manifest",
            "discovery",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "register_agent" => self.register_agent(payload, ctx).await,
            "query_registry" => self.query_registry(payload, ctx).await,
            "publish_manifest" => self.publish_manifest(payload, ctx).await,
            "discovery" => self.discovery(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 mars-lib --all-features

See also

On this page