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