# `AgentBlueprintProtocol.Bounds`
[🔗](https://github.com/baselabs/agent_blueprint_protocol/blob/v0.1.1/lib/agent_blueprint_protocol/bounds.ex#L1)

Parse ceilings for the bounded JSON decoder — resource-exhaustion guards,
distinct from the eight operational ceilings an artifact declares.

Every field is a positive integer. `maximum/0` is the immutable profile
ceiling. `new/1` derives a *tighter* profile: an override may only lower a
field, never raise it, so a portable input can never widen a host's parse
limits.

| field | meaning |
|---|---|
| `bytes` | maximum total input size |
| `depth` | maximum structural nesting |
| `members` | maximum members in one object |
| `items` | maximum items in one array |
| `nodes` | maximum total value nodes |
| `string` | maximum byte length of one string value |
| `key` | maximum byte length of one object key |
| `number_lexeme` | maximum byte length of one number's source lexeme |
Parse ceilings are decoder limits — the profile authorizes nothing.

# `error`

```elixir
@type error() :: :unknown_bound | {:ceiling, atom()}
```

# `t`

```elixir
@type t() :: %AgentBlueprintProtocol.Bounds{
  bytes: pos_integer(),
  depth: pos_integer(),
  items: pos_integer(),
  key: pos_integer(),
  members: pos_integer(),
  nodes: pos_integer(),
  number_lexeme: pos_integer(),
  string: pos_integer()
}
```

# `coerce`

```elixir
@spec coerce(t() | map()) :: {:ok, t()} | {:error, error()}
```

Validate and normalize a `Bounds` struct, or build one from an overrides map.

A struct is re-validated field-by-field, not trusted: a directly-constructed
`%Bounds{}` carrying a super-maximum (or non-positive) ceiling is rejected, so
the tighten-only invariant holds no matter how the struct was made.

# `maximum`

```elixir
@spec maximum() :: t()
```

The immutable profile maxima.

# `new`

```elixir
@spec new(map()) :: {:ok, t()} | {:error, error()}
```

A tighter profile from `overrides`. Each override key must be known and its
value a positive integer no greater than the corresponding maximum
(tighten-only). Omitted fields keep their maximum.

---

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