MAP Docs
MAXIM

Internals

Crate path, key types, adjacent protocols for MAXIM.

MAXIM (Multi-Agent eXecutive Interpretation & Mandate) lives in protocols/maxim-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.

Source

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

ProtocolModule contract

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

    fn operations(&self) -> Vec<&'static str> {
        vec![
            "deliberate_dilemma",
            "constitutional_interpretation",
            "mandate_enforcement",
            "health_check",
            "metrics",
        ]
    }

    async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
        -> Result<Response, ProtocolError>
    {
        match op {
            "deliberate_dilemma" => self.deliberate_dilemma(payload, ctx).await,
            "constitutional_interpretation" => self.constitutional_interpretation(payload, ctx).await,
            "mandate_enforcement" => self.mandate_enforcement(payload, ctx).await,
            "health_check" => self.health_check(payload, ctx).await,
            "metrics" => self.metrics(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 maxim-lib --all-features

See also

On this page