# `Chronicle.Discovery.Report`
[🔗](https://github.com/Cratis/Chronicle.Elixir/blob/main/lib/chronicle/discovery/report.ex#L4)

What the client found, across every artifact kind `Chronicle.Artifacts` knows how to
discover: event types, event sources, reactors, reducers, declarative projections, read
models, constraints, webhooks, event store subscriptions, seeders, migrations, global
handlers and captures.

Built by `Chronicle.Client` at startup (`Chronicle.Client.discovery_report/1`), by
`Chronicle.Artifacts.report/1`, and by `mix chronicle.discover`.

# `t`

```elixir
@type t() :: %Chronicle.Discovery.Report{
  artifacts: [Chronicle.Discovery.Artifact.t()],
  has_run: boolean()
}
```

# `build`

```elixir
@spec build(map() | keyword()) :: t()
```

Builds a report from discovered or explicitly configured artifact module lists.

Accepts a map or keyword list with the same keys `Chronicle.Artifacts.discover/1` and
`Chronicle.Client`'s options use: `:event_types`, `:event_sources`, `:reactors`,
`:reducers`, `:projections`, `:read_models`, `:constraints`, `:webhooks`,
`:event_store_subscriptions`, `:seeders`, `:migrations`, `:global_handlers`, `:captures`.
Every key is optional and defaults to `[]`.

`:warn_defaulted_ids` (default `true`) controls whether a reactor, reducer or projection
whose id defaults to its module name emits the one-time warning described on
`Chronicle.Discovery.DefaultedIdWarning`.

# `count_of`

```elixir
@spec count_of(t(), Chronicle.Discovery.Artifact.kind()) :: non_neg_integer()
```

Counts artifacts of a given kind.

# `format`

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

A full, multi-line rendering of every artifact grouped by kind — suitable for a debug-level
log line or `mix chronicle.discover`'s output.

# `not_run`

```elixir
@spec not_run() :: t()
```

The report before discovery has completed.

# `of_kind`

```elixir
@spec of_kind(t(), Chronicle.Discovery.Artifact.kind()) :: [
  Chronicle.Discovery.Artifact.t()
]
```

Selects artifacts of a given kind.

# `summary`

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

A one-line, per-kind count summary — suitable for an info-level log line.

---

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