# `Ash.Info.Manifest.Generator.CapabilitiesBuilder`
[🔗](https://github.com/ash-project/ash/blob/v3.27.8/lib/ash/info/manifest/generator/capabilities_builder.ex#L5)

Builds the top-level `%FilterCapabilities{}` and `%SortCapabilities{}` for a
manifest by enumerating Ash's builtin operators/functions and the app's
registered custom expressions.

# `build`

```elixir
@spec build(keyword()) ::
  {Ash.Info.Manifest.FilterCapabilities.t(),
   Ash.Info.Manifest.SortCapabilities.t()}
```

Build the global `%FilterCapabilities{}` and `%SortCapabilities{}` for a
manifest.

## Options

  * `:resources_by_data_layer` - Map of `%{data_layer_module => [resources]}`
    whose `functions/1` callback contributes additional predicate functions
    to the catalog. The first resource per data layer is used as the
    representative when invoking `functions/1` — required because some
    data-layer implementations (e.g. `AshPostgres.DataLayer`) read
    configuration off the resource and crash with `nil`. Each contributed
    `%Function{}` is tagged with `data_layer_module` so consumers can
    intersect against a resource's data layer.

Without `:resources_by_data_layer`, the catalog is the Ash builtins plus
the app's registered custom expressions.

---

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