CouncilEx.Diagram.Sequence (CouncilEx v0.1.0)

Copy Markdown View Source

Renders a council as a Mermaid sequenceDiagram showing interaction over time: which seat receives what, how each response (R1, R2, …) flows into later rounds, and where peers are hidden or anonymized.

Seats are identified by their member id only — never by model.

Summary

Functions

Render a captured run as a sequence diagram. events is the ordered list of PubSub event tuples (e.g. drained from the run topic). :member_token events are ignored. Pass the council (module or struct) as the 2nd arg to annotate round notes with each round's static contract; omit for a structural view.

Render a council (module or %DynamicCouncil{}) as a sequence diagram.

Functions

from_events(events, council \\ nil)

@spec from_events([tuple()], module() | CouncilEx.DynamicCouncil.t() | nil) ::
  String.t()

Render a captured run as a sequence diagram. events is the ordered list of PubSub event tuples (e.g. drained from the run topic). :member_token events are ignored. Pass the council (module or struct) as the 2nd arg to annotate round notes with each round's static contract; omit for a structural view.

from_spec(council)

@spec from_spec(module() | CouncilEx.DynamicCouncil.t()) :: String.t()

Render a council (module or %DynamicCouncil{}) as a sequence diagram.