MAP Docs
MACS

Internals

Crate path, key types, adjacent protocols for MACS.

MACS (Multi-Agentic Access Control & Security) lives in protocols/macs-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "auth_negotiation",
            "generate_challenge",
            "verify_response",
            "authorization_request",
            "credential_verification",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "auth_negotiation" => self.auth_negotiation(payload, ctx).await,
            "generate_challenge" => self.generate_challenge(payload, ctx).await,
            "verify_response" => self.verify_response(payload, ctx).await,
            "authorization_request" => self.authorization_request(payload, ctx).await,
            "credential_verification" => self.credential_verification(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 macs-lib --all-features

See also

On this page