hal_available: Check whether the active backend's transport is ready

View source: R/find-cli.R

hal_availableR Documentation

Check whether the active backend's transport is ready

Description

Dispatches by backend:

  • vscode: bridge port file exists and ⁠/version⁠ responds.

  • copilot: Copilot CLI binary found and --version succeeds.

  • claude: Claude CLI binary found and --version succeeds.

Usage

hal_available(backend = NULL)

Arguments

backend

Optional backend id ("vscode", "copilot", "claude"). If NULL, uses the resolved default for this session.

Details

Honors the hal.backend option / explicit argument so callers can probe a specific backend without switching the session default.

Value

TRUE if the backend's transport is reachable, FALSE otherwise.

See Also

HalChat, hal_models(), hal_bridge_status() for richer vscode-backend diagnostics.

Examples

hal_available()
## Not run: 
hal_available(backend = "vscode")
hal_available(backend = "claude")

## End(Not run)


hal documentation built on Oct. 6, 2026, 5:07 p.m.