MANA
Internals
Crate path, key types, adjacent protocols for MANA.
MANA (Multi-Agentic Negotiation & Arbitration · Treasury) lives in protocols/mana-lib. This page covers where to find the implementation, the key Rust types, and how it composes with adjacent protocols.
Source
| Path | Contains |
|---|---|
protocols/mana-lib/src/lib.rs | ProtocolModule impl, operation dispatch |
protocols/mana-lib/src/protocol.rs | core protocol logic |
protocols/mana-lib/src/types.rs | request/response types (derive schemars::JsonSchema) |
protocols/mana-lib/tests/ | unit + integration tests |
schemas/mana/v1/ | published JSON Schemas |
ProtocolModule contract
impl ProtocolModule for ManaProtocol {
fn protocol_name(&self) -> &'static str { "MANA" }
fn version(&self) -> &'static str { "v1.0.0" }
fn operations(&self) -> Vec<&'static str> {
vec![
"agent_profile",
"service_advertisement",
"task_advertisement",
"bid_submission",
"negotiation",
"task_assignment",
"reputation_update",
"arbitration_open",
"arbitration_close",
]
}
async fn invoke(&self, op: &str, payload: Value, ctx: &InvokeContext)
-> Result<Response, ProtocolError>
{
match op {
"agent_profile" => self.agent_profile(payload, ctx).await,
"service_advertisement" => self.service_advertisement(payload, ctx).await,
"task_advertisement" => self.task_advertisement(payload, ctx).await,
"bid_submission" => self.bid_submission(payload, ctx).await,
"negotiation" => self.negotiation(payload, ctx).await,
"task_assignment" => self.task_assignment(payload, ctx).await,
"reputation_update" => self.reputation_update(payload, ctx).await,
"arbitration_open" => self.arbitration_open(payload, ctx).await,
"arbitration_close" => self.arbitration_close(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 mana-lib --all-featuresSee also
ProtocolModuletrait — the contract- Engine pipeline — the 8 stages
- Plugins — author your own