AttractorEx (attractor_phoenix v0.1.0)

Copy Markdown View Source

Public entry point for the AttractorEx pipeline engine.

AttractorEx exposes the stable API for parsing, validating, executing, resuming, and serving DOT-defined Attractor pipelines.

Main APIs

Summary

Functions

Resumes execution from a checkpoint struct, map, or checkpoint.json path.

Parses, validates, and executes a pipeline graph from scratch.

Starts the lightweight Bandit-backed AttractorEx HTTP service.

Stops a previously started AttractorEx HTTP server.

Validates a DOT string or normalized graph and returns diagnostics.

Validates a DOT string or graph and raises on error-severity diagnostics.

Functions

resume(dot, checkpoint_or_path, opts \\ [])

@spec resume(String.t(), String.t() | map(), keyword()) ::
  {:ok, map()}
  | {:error, %{diagnostics: list()}}
  | {:error, %{error: String.t()}}

Resumes execution from a checkpoint struct, map, or checkpoint.json path.

run(dot, context \\ %{}, opts \\ [])

@spec run(String.t(), map(), keyword()) ::
  {:ok, map()}
  | {:error, %{diagnostics: list()}}
  | {:error, %{error: String.t()}}

Parses, validates, and executes a pipeline graph from scratch.

start_http_server(opts \\ [])

@spec start_http_server(keyword()) :: {:ok, pid()} | {:error, term()}

Starts the lightweight Bandit-backed AttractorEx HTTP service.

stop_http_server(server)

@spec stop_http_server(pid() | atom()) :: :ok

Stops a previously started AttractorEx HTTP server.

validate(input, opts \\ [])

@spec validate(
  String.t() | AttractorEx.Graph.t(),
  keyword()
) :: list() | {:error, %{error: String.t()}}

Validates a DOT string or normalized graph and returns diagnostics.

validate_or_raise(input, opts \\ [])

@spec validate_or_raise(
  String.t() | AttractorEx.Graph.t(),
  keyword()
) :: list()

Validates a DOT string or graph and raises on error-severity diagnostics.