# `Wardrik.Operations.Snapshot`

Reads agents' status and logs for operations.

# `interrupts`

```elixir
@spec interrupts(map()) :: [map()]
```

Returns the calls the agent waits on a person for.

# `known`

```elixir
@spec known(Wardrik.t(), String.t()) :: :ok | {:error, Wardrik.Error.t()}
```

Returns `:ok` if the agent `id` exists, or a `not_found` error.

# `name`

```elixir
@spec name(String.t()) :: String.t()
```

Returns the agent `id`'s name. A conversation has its agent's name.

# `next_run`

```elixir
@spec next_run(Wardrik.t(), String.t()) :: String.t() | nil
```

Returns when the agent `id`'s next scheduled trigger runs, or `nil`.

# `next_runs`

```elixir
@spec next_runs(Wardrik.t(), String.t()) :: %{
  required(String.t()) =&gt; String.t() | nil
}
```

Returns when each of the agent `id`'s triggers runs next, by name. Webhooks are `nil`.

# `page`

```elixir
@spec page(Wardrik.Scope.t(), [String.t()], keyword()) ::
  {:ok, map()} | {:error, Wardrik.Error.t()}
```

Returns a page of the logs `patterns` cover.

# `placed`

```elixir
@spec placed(Wardrik.t(), String.t()) :: String.t() | nil
```

Returns the node the agent `id` runs on, or `nil` if it's asleep.

# `running`

```elixir
@spec running(Wardrik.t(), String.t()) :: {:ok, pid()} | {:error, Wardrik.Error.t()}
```

Returns the running agent `id`, or a `not_found` error if it's asleep.

# `state`

```elixir
@spec state(Wardrik.t(), String.t(), map()) :: String.t()
```

Returns `"asleep"` if the agent `id` isn't running, or else its `status/1`.

# `status`

```elixir
@spec status(map()) :: String.t()
```

Returns `"idle"`, `"running"`, or `"parked"` when waiting on a person.

# `stream`

```elixir
@spec stream(Wardrik.Scope.t(), [String.t()], keyword()) ::
  {:ok, Enumerable.t()} | {:error, Wardrik.Error.t()}
```

Streams the logs `patterns` cover.

# `summary`

```elixir
@spec summary(Wardrik.t(), String.t()) :: map()
```

Returns the agent `id`'s summary, as lists show it.

# `typed?`

```elixir
@spec typed?(map(), [String.t()] | nil) :: boolean()
```

Returns whether `event` is one of `types`. Always `true` if `types` is `nil`.

---

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