Packages

Elixir-native LangChain, LangGraph, and DeepAgents for traceable LLM apps: OTP workflows, tools, memory, human-in-the-loop, streaming, custom clients/adapters, minimal deps, and WeaveScope tracing.

Current section

Files

Jump to
beam_weaver lib beam_weaver graph validation report.ex
Raw

lib/beam_weaver/graph/validation/report.ex

defmodule BeamWeaver.Graph.Validation.Report do
@moduledoc """
Accumulated graph validation diagnostics.
Public compile paths still return a single tagged `%BeamWeaver.Core.Error{}`.
The report exists for tooling and tests that need to show all known static
problems at once.
"""
defstruct diagnostics: []
@type diagnostic :: %{
type: atom(),
message: String.t(),
details: map()
}
@type t :: %__MODULE__{diagnostics: [diagnostic()]}
@spec new([diagnostic()]) :: t()
def new(diagnostics \\ []), do: %__MODULE__{diagnostics: diagnostics}
@spec ok?(t()) :: boolean()
def ok?(%__MODULE__{diagnostics: []}), do: true
def ok?(%__MODULE__{}), do: false
end