/**
 * Host trust tier classification.
 *
 * Classifies outbound HTTP request targets into one of three tiers before
 * the request is sent. Blocked hosts are denied pre-request with an
 * `SSRF_DENY` telemetry event. Unknown hosts receive `safe-text`
 * sanitization. Trusted hosts may opt into `none` sanitization via config.
 *
 * Trust tiers:
 *   - `trusted`  — Host is explicitly allowlisted. Sanitization may be relaxed.
 *   - `unknown`  — Host is not in any list; apply `safe-text` sanitization.
 *   - `blocked`  — Host matches an internal address, metadata endpoint, or
 *                  explicit blocklist entry. Request is denied pre-flight.
 *
 * SSRF protections detect:
 *   - Private IPv4 ranges (RFC 1918)
 *   - IPv6 loopback and link-local
 *   - Cloud metadata endpoints (169.254.x.x, metadata.google.internal, etc.)
 *   - Localhost variants
 *   - DNS rebinding patterns (encoded or obfuscated IP addresses)
 */
/**
 * Trust classification for an outbound request host.
 *
 * - `trusted`  — Explicitly allowlisted; sanitization may be relaxed.
 * - `unknown`  — Not in any list; standard `safe-text` sanitization applied.
 * - `blocked`  — Sensitive host; request denied pre-request.
 */
export type HostTrustTier = 'trusted' | 'unknown' | 'blocked';
/**
 * Result of classifying a host's trust tier.
 */
export interface TrustTierResult {
    /** The classified trust tier. */
    tier: HostTrustTier;
    /** Human-readable reason for the classification. */
    reason: string;
    /** True when the host matched an SSRF pattern specifically. */
    isSsrf: boolean;
}
/**
 * Configuration for host trust tier classification.
 */
export interface TrustTierConfig {
    /**
     * Hostnames or glob patterns that are explicitly trusted.
     * Trusted hosts may opt out of sanitization via fetch config.
     * Example: `['api.anthropic.com', '*.internal.example.com']`
     */
    trustedHosts?: string[] | undefined;
    /**
     * Hostnames or glob patterns that are explicitly blocked.
     * Blocked hosts are denied pre-request regardless of other config.
     */
    blockedHosts?: string[] | undefined;
}
/**
 * Telemetry event names emitted by the trust tier classifier.
 * These are the canonical runtime contract strings for host trust classification.
 */
export declare const TRUST_TIER_EVENTS: {
    /** Emitted when a host trust tier has been classified (all tiers). */
    readonly HOST_TRUST_TIER: "HOST_TRUST_TIER";
    /** Emitted when a request is denied due to SSRF detection. */
    readonly SSRF_DENY: "SSRF_DENY";
};
/**
 * Classify the trust tier of an outbound request host.
 *
 * Classification order (first match wins):
 *   1. Explicit blocklist → `blocked`
 *   2. SSRF patterns (private IPs, metadata endpoints, localhost) → `blocked`
 *   3. Encoded IP bypass attempts → `blocked`
 *   4. Explicit trustlist → `trusted`
 *   5. Default → `unknown`
 *
 * @param host   - Hostname or IP to classify (without port).
 * @param config - Trust tier configuration with optional allow/deny lists.
 * @returns      `TrustTierResult` with tier, reason, and SSRF flag.
 */
export declare function classifyHostTrustTier(host: string, config?: TrustTierConfig): TrustTierResult;
/**
 * Emit SSRF deny telemetry to the logger as a structured event.
 *
 * Emits a log entry with event name `SSRF_DENY` that can be consumed by
 * the telemetry pipeline. This fulfils the runtime contract for the
 * `SSRF_DENY` telemetry event in fetch sanitization.
 *
 * @param host     - The host that was denied.
 * @param url      - The full URL that was attempted.
 * @param reason   - Human-readable reason for the denial.
 */
export declare function emitSsrfDeny(host: string, url: string, reason: string): void;
/**
 * Emit host trust tier telemetry to the logger as a structured event.
 *
 * Emits a log entry with event name `HOST_TRUST_TIER` that can be consumed
 * by the telemetry pipeline. This fulfils the runtime contract for the
 * `HOST_TRUST_TIER` telemetry event in fetch sanitization.
 *
 * @param host   - The classified host.
 * @param url    - The full URL being fetched.
 * @param result - The trust tier classification result.
 */
export declare function emitHostTrustTier(host: string, url: string, result: TrustTierResult): void;
/**
 * Extract the hostname from a URL string for trust tier classification.
 *
 * Returns `null` if the URL cannot be parsed.
 *
 * @param url - Full URL string (e.g. `https://example.com/path`).
 * @returns   Hostname string (without port), or `null` on parse failure.
 */
export declare function extractHostname(url: string): string | null;
//# sourceMappingURL=trust-tiers.d.ts.map