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

Conversational context assembly for LLM interactions.

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

```elixir
@spec assemble_prompt(CommBus.Conversation.t(), [CommBus.Entry.t()], keyword()) ::
  map()
```

Assemble prompt sections with injected context entries.

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

```elixir
@spec fit_budget([CommBus.Entry.t()], non_neg_integer()) :: [CommBus.Entry.t()]
```

Fit entries within a token budget using priority ordering.

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

```elixir
@spec render_template(String.t(), map(), keyword()) ::
  {:ok, CommBus.Template.RenderResult.t()}
  | {:error, CommBus.Template.RenderError.t()}
```

Render a Mustache template with metadata.

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

```elixir
@spec resolve_placeholders(String.t(), map(), keyword()) ::
  {:ok, String.t()} | {:error, term()}
```

Render a Mustache template with provided values.

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

```elixir
@spec scan_triggers([CommBus.Message.t()], [CommBus.Entry.t()], keyword()) :: [
  CommBus.Entry.t()
]
```

Scan conversation history for entries that match keyword triggers.

---

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