import { TUNNEL_PROVIDER_IDS, isTunnelProviderId, tunnelProfileCredentialEnvKey, tunnelProviderDescriptor, type ActiveTunnelProvider, type TunnelProviderId } from './TunnelProviderCatalog'; export { TUNNEL_PROVIDER_IDS }; export declare const TUNNEL_PROVIDER_VALUES: readonly ["ngrok", "cloudflare", "sakura_frp", "frp"]; export type TunnelProfileProvider = TunnelProviderId; export type { ActiveTunnelProvider }; /** The canonical off value: an explicit "no tunnel" is a decision, not a missing value. */ export declare const TUNNEL_ACTIVE_PROFILE_NONE = "none"; export interface TunnelProfile { id: string; provider: TunnelProfileProvider; label?: string; publicUrl?: string; credentialEnvKey?: string; credentialConfigured?: boolean; /** * Provider parameters as stored by the settings API. * * They are carried rather than dropped so the runtime never silently loses a value the * API accepted, and so a provider that can honour one has it available; a parameter no * provider consumes is reported by `unconsumedProfileParameters()` instead of vanishing. */ parameters?: Record; } export interface TunnelProfileState { profiles: TunnelProfile[]; activeProfileId?: string; activeProfile?: TunnelProfile; inactiveProfiles: TunnelProfile[]; activeProvider: ActiveTunnelProvider; /** Why the requested profile is not active; missing when the state is unremarkable. */ activationError?: string; } type EnvLike = Record; /** * Resolves the tunnel profile state for a runtime environment. * * Authority rules (they are what stops a closed tunnel from coming back): * - `XPOD_TUNNEL_PROFILES` being **present** is authoritative — an empty list means "no * profiles", never "fall back to the legacy keys". * - `XPOD_TUNNEL_ACTIVE_PROFILE_ID` being **present** is authoritative — an empty value or * `none` means "explicitly off" and suppresses the legacy provider and the auto-pick. */ export declare function resolveTunnelProfileState(env: EnvLike): TunnelProfileState; export declare function selectActiveTunnelProfile(inputProfiles: readonly TunnelProfile[], activeProfileId?: string): TunnelProfileState; /** * Parameters a profile declares that no provider implementation consumes. * * Reporting them is what keeps the settings form from collecting values with no effect: * the fix is either to consume the parameter or to stop declaring the field. */ export declare function unconsumedProfileParameters(profile: Pick, consumed?: readonly string[]): string[]; export { isTunnelProviderId, tunnelProviderDescriptor, tunnelProfileCredentialEnvKey };