  defmodule {{ behaviour_module }} do
    @moduledoc """
    Typed host interface for the `{{ trait_name }}` plugin bridge.

    A plugin handler module implements this behaviour and is registered with
    `{{ register_fn }}/2`. Each callback receives the decoded arguments for a
    trait method and returns the method's result. The dispatching GenServer
    passes the decoded `args` map to the callback for the corresponding method.
    """
{% for cb in callbacks %}

    @doc "Handle the `{{ cb.method }}` trait call."
    @callback {{ cb.name }}({{ cb.params_spec }}) :: {{ cb.return_spec }}
{% endfor %}
  end
