# `SquidSonar.Router`
[🔗](https://github.com/dark-trench/squid_sonar/blob/main/lib/squid_sonar/router.ex#L1)

Router helpers for mounting SquidSonar inside a Phoenix application.

The host owns its endpoint, authentication, layout, and deployment topology.
SquidSonar contributes only the LiveView routes under the requested path.

# `__options__`

```elixir
@spec __options__(
  String.t(),
  keyword()
) :: {atom(), keyword(), keyword()}
```

Normalizes mount options for the generated SquidSonar route block.

# `__session__`

```elixir
@spec __session__(Plug.Conn.t() | map(), String.t(), String.t(), String.t()) :: map()
```

Builds the LiveView session with the default manual-control actor.

# `__session__`

```elixir
@spec __session__(Plug.Conn.t() | map(), String.t(), String.t(), String.t(), term()) ::
  map()
```

Builds the LiveView session and resolves the configured manual-control actor.

# `__session__`

```elixir
@spec __session__(
  Plug.Conn.t() | map(),
  String.t(),
  String.t(),
  String.t(),
  term(),
  term(),
  term()
) :: map()
```

Builds the LiveView session and resolves host-provided runtime spec options.

# `__session__`

```elixir
@spec __session__(
  Plug.Conn.t() | map(),
  String.t(),
  String.t(),
  String.t(),
  term(),
  term(),
  term(),
  term()
) :: map()
```

Builds the LiveView session and resolves host-provided runtime spec catalog options.

# `default_control_actor`

```elixir
@spec default_control_actor() :: map()
```

Returns the default manual-control actor used when the host does not provide one.

# `squid_sonar`
*macro* 

Mounts SquidSonar under the given path.

    scope "/" do
      pipe_through [:browser]

      squid_sonar "/sonar"
    end

Supported options:

  * `:as` - route helper name for the mounted LiveView session.
  * `:socket_path` - LiveView socket path used by the host application.
    Defaults to `"/live"`.
  * `:transport` - LiveView client transport. Use `"websocket"` or
    `"longpoll"`. Defaults to `"websocket"`.
  * `:control_actor` - actor persisted with Squidie manual approval and
    resume actions. Pass a non-empty binary, a non-empty map, or an MFA tuple
    `{module, function, args}`. MFA callbacks receive the current `conn` as
    their first argument.
  * `:runtime_specs` - host-approved workflow catalog used by the dashboard
    start drawer. Pass a keyword list or map of stable keys to workflow modules
    or runtime specs, or an MFA tuple `{module, function, args}`. Workflow
    module entries start through `Squidie.start/3`; runtime spec entries start
    through `Squidie.start_spec/3`.
  * `:runtime_spec` - single runtime-authored workflow spec used by the
    dashboard start drawer. Prefer `:runtime_specs` for new integrations.
    Pass a map/struct or an MFA tuple `{module, function, args}`.
  * `:action_registry` - host-owned action registry passed to
    `Squidie.start_spec/3` for runtime spec entries. Pass a map, keyword list,
    or MFA tuple.
  * `:saved_specs` - host-owned saved workflow spec records surfaced by
    SquidSonar. Pass a keyword list or map of stable keys to saved-spec
    metadata, or an MFA tuple `{module, function, args}`. The host owns
    persistence, approval, action registry policy, and activation decisions.

---

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