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