API Reference mcl_core v#1.0.0
View SourceModules
Public facade for mcl_core — the PQ-only over-mesh substrate.
Whether this service's advertise loop is alive, per capability, and what that means for /health.
OTP application entry point for mcl-core.
The macula mesh as a transport (docs/DESIGN.md §1.2, §3).
The bridge's handler for an exported capability the LAN serves (docs/DESIGN.md §3, mcl-core#7): each mesh call is forwarded into the LAN transport with caller set to the mesh caller, as macula verified it (macula_response:caller/0).
The bridge node's mark in its cluster (mcl-core#7): a process in the bridge group of mcl_core_bridge:scope/0, so every member finds this node with mcl_core_bridge:bridge_node/0. Started only on the bridge, by mcl_core_bridge_sup.
What finds the bridge on a LAN node (docs/DESIGN.md §3, mcl-core#7): the pg scope mcl_core_bridge:scope/0, on every LAN node, and on the bridge node its mcl_core_bridge_presence in that scope's bridge group.
Advertises a service''s capabilities on the mesh, and resolves other services' capabilities from the DHT.
Boot-time provider-authorization claim.
Backs the synthetic <service-name>.describe_capabilities mesh capability mcl_core:boot/2 advertises for any service exporting describe_rpc_capabilities/0 and/or describe_pubsub_capabilities/0 (see mcl_core_service's own moduledoc for both callbacks).
The guard''s counters, audit ring, and alert facts (mcl-om#13).
The guardian control surface (mcl-om#13): the get_limits / set_limits capabilities every mcl_core service exposes for mcl-sec-guard.
Per-procedure inbound limits + envelope, in persistent_term.
The inbound guard pipeline (mcl-om#13): a macula_response handler that runs every inbound call through the guard stages, in order, before delegating to the capability''s own handler.
Stage 2: the fixed-window request-rate limiter.
Stage 1: the payload-size cap.
The stage behaviour the inbound guard pipeline runs per request, in order.
Tracks the health of the services this node hosts: one, or several in a release that bundles them (mcl-om#8). Their verdicts combine into the node's, and a failing one is named.
Cowboy handler — GET /health.
Identity, seed and realm resolution for the mesh pool mcl_core_sup supervises alongside this gen_server.
<org>/info: who this service is, answered on every mcl_core node with no code in the service.
The LAN transport (docs/DESIGN.md §2): services on one LAN call and publish to each other over distributed Erlang, with no station.
One capability served on the LAN (docs/DESIGN.md §2.2).
The LAN entry point's challenges (docs/DESIGN.md §4.2, mcl-core#4).
The LAN entry point for clients that are not BEAM nodes (docs/DESIGN.md §4.2, mcl-core#4): Martha, lazymartha and macula-mcp reach the cluster's capabilities and topics as a named member, with no station.
The LAN entry point's GET /lan/v1/events?topic=T (mcl_core_lan_entry, docs/DESIGN.md §4.2, mcl-core#4): a topic's LAN events as server-sent events, to a member holding a token.
The LAN entry point's POST /lan/v1/challenge, /token and /call (mcl_core_lan_entry, docs/DESIGN.md §4.2, mcl-core#4).
The processes that serve hosted services on the LAN: one mcl_core_lan_capability per served capability and one mcl_core_lan_subscriber per subscription, each under the hosted service's key, so a second boot of a service replaces its own and no other service's.
Erlang terms as JSON for the LAN entry point (mcl-core#4).
The cluster's member list, lan_members in the LAN data dir (docs/DESIGN.md §4.2, mcl-core#4): the keys that may take a token at the LAN entry point.
This node's node id on the LAN: kept where mcl_core_lan:node_id/0 reads it, and joined to the pg group {node, NodeId}, which is how a call pinned to a node id (advertiser) finds that node.
The cluster's two secrets, in a node's LAN data dir (docs/DESIGN.md §2.1, DECIDED 2026-12-02 "Shared cookie + secret (Recommended)").
One subscription on the LAN (docs/DESIGN.md §2.3).
The LAN transport's tree (docs/DESIGN.md §2), started by mcl_core_sup only when the lan app env is configured.
The LAN entry point's token (docs/DESIGN.md §4.2, mcl-core#4).
Is this node an admitted member of this org? Cached, for a subscriber.
Proof that an identity authorised exactly this request, once: the asserted_by block of a payload (mcl-om#7, mcl-om#7).
The nonces of ownership proofs this node accepted in the last two minutes, so an identical proof is accepted once (mcl_core_ownership_proof).
Whether this service holds the D25 grant each of its org-namespaced procedures needs, and what that means for /health.
Publish onto the mesh via macula's supervised macula_publisher, instead of every service hand-rolling catch macula:publish(...).
Reconciles the desired subscription set against mcl_core_pubsub_sup's actual running children (piece D, guides/mesh_native_services.md).
Dynamic supervisor for this service's macula_subscriber children (piece D, guides/mesh_native_services.md).
The behaviour every mcl service implements.
Bridges macula's native {Module, Function} single-call handler convention into macula_response's per-request init/1 + handle_request/2 contract, for a handler that needs no per-request state — the common case for a service migrating a capability from bare macula:advertise/5 onto mcl_core_capabilities:register/1 (see CHANGELOG 0.24.0).
Run a side effect on exactly one node of a cluster (mcl-om#8, A3 package 3).
Top-level supervisor for mcl-core.
The transport boundary (docs/DESIGN.md §1.2).
Tolerant field lookup on a decoded mesh payload map (RPC/stream args, or a pubsub event payload), instead of every provider desk re-solving the same two gotchas independently.
The one way to test a capability: deliver the request the way a station does, then read the reply the way a client does (mcl-om#31).