# `Squidie.Runs.SpecPreview`
[🔗](https://github.com/dark-trench/squidie/blob/main/lib/squidie/runs/spec_preview.ex#L1)

Read-only execution-style preview for a runtime-authored workflow spec.

Preview values are intended for visual editors and host tooling that need to
inspect sample payload behavior before publishing or starting a durable run.

# `preview_node`

```elixir
@type preview_node() :: %{
  id: String.t(),
  step: atom(),
  action: atom() | String.t() | nil,
  status: :completed | :failed | :unsupported | :validation_error,
  input: map(),
  output: map() | nil,
  error: map() | nil,
  debug: map()
}
```

# `t`

```elixir
@type t() :: %Squidie.Runs.SpecPreview{
  definition_version: String.t() | nil,
  errors: [map()],
  nodes: [preview_node()],
  run_id: nil,
  status: :completed | :failed | :blocked | :invalid,
  trigger: atom() | nil,
  workflow: module()
}
```

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Converts a spec execution preview to a plain map for JSON encoding.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
