pub async fn ensure_started(
browser: Option<String>,
headless: bool,
no_wait: bool,
wait_timeout: u64,
) -> Result<StartResult>Expand description
Ensure a browser of the requested kind is running and registered.
This is the programmatic form of browser-control start: it reuses the
most recent live registry row for the selected kind, otherwise launches a
new browser with the same default profile semantics as the CLI command.
When no kind is requested, selection follows the same order the MCP
server uses at startup (see crate::cli::mcp::resolve_browser):
the persisted default (browser-control set default ...) > the most
recent live registered browser > an installed kind that already has a
live process > the hardcoded chromium-first detection order.