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
| Path | Contains |
|---|---|
protocols/macs-lib/src/lib.rs | ProtocolModule impl, operation dispatch |
protocols/macs-lib/src/protocol.rs | core protocol logic |
protocols/macs-lib/src/types.rs | request/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
| 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 macs-lib --all-featuresSee also
ProtocolModuletrait — the contract- Engine pipeline — the 8 stages
- Plugins — author your own