/**
 * CloudflareQuickProvider — Tier-1 zero-config Cloudflare quick tunnel.
 *
 * Extracted from the original `TunnelManager.startQuickTunnel()` so the
 * manager can drive multiple providers through the common
 * `TunnelProvider` interface. Behavior preserved verbatim where it
 * doesn't conflict with the spec's single-owner mandate:
 *
 *   - Owns: spawning `cloudflared` with --config-isolation; resolving
 *     when the quick-tunnel URL emits; tearing down on stop().
 *   - Does NOT own: retry/backoff, reconnect-on-disconnect, failure
 *     notification, episode/consent state. Those are the manager's
 *     responsibility now (per
 *     specs/dev-infrastructure/tunnel-failure-resilience.md Part 1's
 *     "single-owner mandate" that retires the old in-provider reconnect
 *     loop).
 *
 * Failure-mode classification is surfaced via the rejection Error's
 * `message`; the manager parses to `ProviderFailureReason`. This module
 * uses fixed substrings the manager recognizes:
 *   - "rate-limited" (Cloudflare 429 / 1015 detected from cloudflared stderr)
 *   - "binary-missing" (the bundled cloudflared binary path doesn't exist)
 *   - "timeout" (URL didn't emit within the start budget)
 *   - "process-exit code N" (child exited before URL emit)
 */
import type { TunnelProvider, TunnelProviderHandle, ProviderName, ProviderTier } from './TunnelProvider.js';
export interface CloudflareQuickProviderOptions {
    /** Local port to expose. */
    port: number;
    /** State directory for the quick-tunnel isolation config file. */
    stateDir: string;
    /** Start timeout in milliseconds (default: 30_000). */
    startTimeoutMs?: number;
}
/**
 * Classify a cloudflared quick-tunnel failure into a fixed-substring reason the
 * TunnelManager parses to a ProviderFailureReason. Pure + exported so the
 * decision boundary (esp. the Cloudflare 429/1015 rate-limit detection) is
 * unit-testable. Depends on the caller having captured cloudflared's real stderr
 * (the 'stderr' event) into `stderr` — otherwise the rate-limit text never
 * reaches the haystack and the classification falls through to generic.
 */
export declare function classifyQuickTunnelError(msg: string, stderr: string): Error;
export declare class CloudflareQuickProvider implements TunnelProvider {
    readonly name: ProviderName;
    readonly tier: ProviderTier;
    private readonly port;
    private readonly stateDir;
    private readonly startTimeoutMs;
    constructor(opts: CloudflareQuickProviderOptions);
    isAvailable(): Promise<boolean>;
    start(localPort: number): Promise<TunnelProviderHandle>;
    private startInner;
    private classifyError;
    private stopHandle;
}
//# sourceMappingURL=CloudflareQuickProvider.d.ts.map