HostKit.Plan.ExecutionGraph (host_kit v0.1.0-beta.6)

Copy Markdown View Source

Builds an inspectable dependency graph for HostKit plan changes.

Summary

Functions

Returns true when the graph has no cycle diagnostics.

Builds an execution dependency graph from active plan changes.

Formats a concise text rendering of the execution graph.

Returns a JSON-safe map for machine-readable graph output.

Types

t()

@type t() :: %HostKit.Plan.ExecutionGraph{
  cycles: [[term()]],
  edges: [HostKit.Plan.ExecutionGraph.Edge.t()],
  layers: [[term()]],
  nodes: [HostKit.Plan.ExecutionGraph.Node.t()]
}

Functions

acyclic?(execution_graph)

@spec acyclic?(t()) :: boolean()

Returns true when the graph has no cycle diagnostics.

build(plan, opts \\ [])

@spec build(
  HostKit.Plan.t(),
  keyword()
) :: t()

Builds an execution dependency graph from active plan changes.

format(graph)

@spec format(t()) :: String.t()

Formats a concise text rendering of the execution graph.

to_json(graph)

@spec to_json(t()) :: map()

Returns a JSON-safe map for machine-readable graph output.