# `Spectre.Stack.Tools`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/stack/tools.ex#L1)

Immutable tool descriptors returned by `c:Spectre.Stack.Installable.tools/1`.

A descriptor declares a helper name and a closed set of operations. It does
not execute an adapter or grant authority. Cognitive operations declare their
retry policy; governed operations name a host binding instead of an executor.

Adapter module availability is checked by the consumer at runtime, allowing
packages to compile their integration modules independently of the Stack.

# `descriptor`

```elixir
@type descriptor() :: %{
  contract: 1,
  adapter: module(),
  default: atom() | nil,
  operations: %{required(atom()) =&gt; operation()}
}
```

# `operation`

```elixir
@type operation() ::
  %{path: :cognitive, retry: :safe | :never, max_bytes: pos_integer()}
  | %{
      path: :governed,
      operation: atom() | binary() | tuple(),
      max_bytes: pos_integer()
    }
```

# `t`

```elixir
@type t() :: %{optional(atom()) =&gt; descriptor()}
```

# `table!`

```elixir
@spec table!([Spectre.Stack.Installation.t()]) :: map()
```

Builds a unique helper table from validated Stack installations.

# `validate!`

```elixir
@spec validate!(term()) :: t()
```

Validates descriptors without loading or invoking their adapters.

---

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