# Platform Service Discovery
# Provides service endpoint resolution based on platform target configuration

# Selective imports (ADR-025 Phase 3 Layer 2).
use lib_provisioning/platform/target.nu [
    get-platform-endpoint get-platform-service-config is-platform-service-enabled
    list-enabled-platform-services list-required-platform-services
]

# Get service endpoint from platform configuration
export def service-endpoint [service: string] {
    get-platform-endpoint $service
}

# Check if a service is available
export def is-service-available [service: string] {
    is-platform-service-enabled $service
}

# Get service configuration
export def service-config [service: string] {
    get-platform-service-config $service
}

# List all available services
export def list-services [] {
    list-enabled-platform-services
}

# List required services
export def list-required-services [] {
    list-required-platform-services
}
