# `Backplane.CDP.Client`

Bounded, single-command Chrome DevTools Protocol connections to local Chrome.

Discovery always uses the configured loopback port. Each operation owns its
connection in a separate process and never replays a command after a failure.

# `command`

```elixir
@spec command(pos_integer(), :browser | String.t(), String.t(), map()) ::
  {:ok, map()} | {:error, String.t()}
```

# `page_socket_url`

Returns a validated loopback WebSocket endpoint for a page target.

# `pages`

```elixir
@spec pages(pos_integer()) :: {:ok, [map()]} | {:error, String.t()}
```

# `send_command`

Sends a CDP command on the connection owned by the current callback.

# `stream_command`

Consumes matching events as a command runs, acknowledging each event after
`consume` returns `:ok`. The callback may stop the command with `{:error, message}`.
Other events are discarded for this command, and the response is never replayed.

# `wait_for_event`

Waits for a protocol event on the current bounded connection.

# `with_connection`

Runs related commands on one bounded connection, preserving session-scoped object IDs.

---

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