# `Spectre.Operation.Event`
[🔗](https://github.com/elchemista/spectre/blob/0.3.0/lib/spectre/operation/event.ex#L1)

Committed event envelope shared by Work, Vigil and external controllers.

# `t`

```elixir
@type t() :: %Spectre.Operation.Event{
  agent_id: String.t(),
  artifact: term(),
  causation_id: String.t() | nil,
  correlation_id: String.t(),
  id: String.t(),
  loop_id: String.t(),
  loop_kind: :work | :vigil | :directive,
  metadata: map(),
  payload: term(),
  provenance: map(),
  revision: non_neg_integer(),
  timestamp: non_neg_integer(),
  type: atom()
}
```

# `new`

```elixir
@spec new(Spectre.Operation.Loop.t(), atom(), keyword()) :: t()
```

# `to_input`

```elixir
@spec to_input(t()) :: Spectre.Input.t()
```

Converts a committed event into a normal typed router input.

# `validate`

```elixir
@spec validate(t()) :: :ok | {:error, term()}
```

---

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