//! Host-adapter dispatch and shared env aliases for telemetry readers.
//!
//! Lifeloop owns: the env-var alias table (`LIFELOOP_*` over `CCD_*`)
//! used to locate harness telemetry artifacts.
//!
//! This file does **not** own role/primary-worker/supervisor selection
//! semantics — that lives in the manifest registry (issue #6).

use super::EnvAlias;

/// `CCD_HOST_ADAPTER` / `LIFELOOP_HOST_ADAPTER` — names the adapter id
/// the caller wants telemetry resolved against. Per-adapter routing is
/// the manifest registry's job; this alias is exposed so clients
/// migrating from CCD's host-adapter env conventions can do so.
pub const HOST_ADAPTER_ALIASES: &[EnvAlias] = &[EnvAlias {
    lifeloop: "LIFELOOP_HOST_ADAPTER",
    ccd_compat: "CCD_HOST_ADAPTER",
}];

/// Resolve the explicit host-adapter selection, if set.
pub fn explicit_host_adapter() -> Option<String> {
    super::resolve_env_string(HOST_ADAPTER_ALIASES)
}
