Skip to main content

Module graph

Module graph 

Expand description

Blueprint graph projection of a Sop.

Projects the linear step list plus routing metadata into a node/wire graph for visual editors (web node canvas, zerocode SOP pane) and text renderers. Pure projection: building a graph never mutates the SOP.

Structs§

GraphDiagnostic
A validation finding anchored to a step. Errors block saving (validate_sop_strict); warnings render but do not block.
GraphLayout
Deterministic auto-layout so every surface renders the same picture without a client-side layout engine.
GraphLegend
The canonical legend for the SOP canvas: flow-wire roles, pin classes, and run states. The single authority a surface reads to render a legend and per-handle/per-wire hover context, so no surface hardcodes these lists.
GraphNode
A node in the projected graph: one SOP step, or one synthetic trigger entry (step >= TRIGGER_NODE_BASE, trigger_index set).
GraphPin
One connection point on a node. Flow pins order execution; data pins carry the step’s declared input/output schema type.
GraphWire
A directed edge between two nodes. flow_role is set for flow wires; data wires carry the producer/consumer pin names instead.
LayoutGeometry
Canvas geometry carried on every serialized graph so the web canvas reads placement pitch from the wire instead of a local literal. The values are fixed by LayoutGeometry::CANONICAL; the struct rides on GraphLayout only to expose them to non-Rust surfaces.
LegendEntry
One legend row: a graph concept plus its human description. The stable key is the snake_case wire value the canvas maps tones/handles against.
NodePosition
Grid placement for one node: column = longest flow path from an entry, row = order of insertion within that column. x/y carry a persisted canvas coordinate when the node has been dragged; absent otherwise.
NodeRunOverlay
Run state for one step node. Trigger nodes carry no run state and are omitted from overlays.
RunOverlay
Live run state layered over a SopGraph, letting a canvas animate an execution without re-fetching the graph. Served by sops/run-overlay.
SopGraph
The full projected graph: nodes, wires, validation diagnostics, and a precomputed layout. Serialized as-is over RPC (sops/graph) and HTTP.

Enums§

FlowRole
Why a flow wire exists. Mirrors the StepRouting/StepFailure field it was derived from, so an editor can write edits back to the right place.
GraphSeverity
NodeKind
NodeRunState
Per-node execution state projected from a run’s step results.
PinClass
TextGraphFormat
Rendering style for render_graph_text.

Constants§

TRIGGER_NODE_BASE
Node-id offset for synthetic trigger nodes, keeping them disjoint from real step numbers. Trigger i gets node id TRIGGER_NODE_BASE + i.

Traits§

SopGraphExt
Projection constructors for the shared SopGraph type. SopGraph lives in zeroclaw-sop-graph, so the build logic that needs the runtime’s Sop/ToolSpec hangs off this extension trait instead of an inherent impl. Call sites keep using SopGraph::from_sop(..) with the trait in scope.

Functions§

render_graph_text
Render a graph as plain text for CLI output and agent-readable summaries. Diagnostics are appended as a trailing block in non-JSON formats.

Type Aliases§

ToolSpecs