# `CommBus.Protocol.SectionRoles`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

Registry for mapping CommBus sections (e.g., :system, :pre_history) to downstream
message roles understood by provider pipelines.

Sections default to `:system` roles, but callers can register additional mappings
(for example, mapping `:memory` sections to `:assistant`). Overrides from pipeline
opts still take precedence, so projects can adjust behaviour per request.

# `mapping`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

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

# `role`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@type role() :: atom() | String.t()
```

# `section`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@type section() :: atom() | String.t()
```

# `default_roles`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec default_roles() :: mapping()
```

Returns the built-in section-role mapping.

# `delete`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec delete(section()) :: :ok | {:error, term()}
```

Removes a custom mapping for the provided section.

# `get`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec get() :: mapping()
```

Returns the currently configured section-role mapping.

# `put`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec put(section(), role()) :: :ok | {:error, term()}
```

Registers or updates a mapping between a section and a downstream role.

# `put_all`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec put_all(map() | keyword()) :: :ok
```

Registers multiple mappings at once.

# `reset`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec reset() :: :ok
```

Resets all mappings back to factory defaults.

# `resolve`
[🔗](https://github.com/fosferon/comm_bus/blob/v0.1.0/{path}#L{line})

```elixir
@spec resolve(map() | keyword()) :: mapping()
```

Returns the resolved mapping merged with optional overrides (map/keyword).

---

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