# `PtcRunner.SubAgent.Namespace.Data`
[🔗](https://github.com/andreasronge/ptc_runner/blob/main/lib/ptc_runner/sub_agent/namespace/data.ex#L1)

Renders the data/ namespace section.

# `render`

```elixir
@spec render(
  map(),
  keyword()
) :: String.t() | nil
```

Render data/ namespace section for USER message.

Returns `nil` for empty data maps, otherwise a formatted string with header
and entries showing type label and truncated sample.

## Options

- `:field_descriptions` - Map of field names to description strings
- `:context_signature` - Parsed signature for type information
- `:sample_limit` - Max items to show in collections (default: 3)
- `:sample_printable_limit` - Max chars for strings (default: 80)

## Examples

    iex> PtcRunner.SubAgent.Namespace.Data.render(%{})
    nil

    iex> PtcRunner.SubAgent.Namespace.Data.render(%{count: 42})
    ";; === data/ ===\ndata/count                    ; integer, sample: 42"

    iex> PtcRunner.SubAgent.Namespace.Data.render(%{_token: "secret"})
    ";; === data/ ===\ndata/_token                   ; string, sample: \"secret\""

    iex> PtcRunner.SubAgent.Namespace.Data.render(%{x: 5}, field_descriptions: %{x: "Input value"})
    ";; === data/ ===\ndata/x                        ; integer, sample: 5 -- Input value"

---

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