import type { VpcAgentConfig } from '../../../lib/runtime-web/runtime-awake';
/**
 * VPC Agent client configuration.
 */
export interface VpcAgentClientConfig {
    /** VPC Agent endpoint URL */
    readonly url: string;
    /** Authentication method */
    readonly auth: 'iam' | 'api-key';
    /** API key (required if auth is 'api-key') */
    readonly apiKey?: string;
    /** Request timeout in milliseconds (default: 30000) */
    readonly timeoutMs?: number;
    /** Hosts to proxy through VPC Agent */
    readonly proxyHosts: string[];
    /** AWS region (for IAM auth) */
    readonly region?: string;
    /** AWS profile (for IAM auth) */
    readonly profile?: string;
}
/**
 * VPC Agent request payload.
 */
export interface VpcAgentRequestPayload {
    /** Target host */
    readonly host: string;
    /** Target port */
    readonly port: number;
    /** Protocol: 'tcp' or 'http' */
    readonly protocol: 'tcp' | 'http';
    /** Request data (base64 for TCP, plain for HTTP) */
    readonly data?: string;
    /** HTTP method */
    readonly method?: string;
    /** HTTP path */
    readonly path?: string;
    /** HTTP headers */
    readonly headers?: Record<string, string>;
    /** Request timeout */
    readonly timeoutMs?: number;
}
/**
 * VPC Agent response payload.
 */
export interface VpcAgentResponsePayload {
    /** Response data */
    readonly data?: string;
    /** HTTP status code */
    readonly statusCode?: number;
    /** HTTP headers */
    readonly headers?: Record<string, string>;
    /** Success flag */
    readonly success: boolean;
    /** Error message */
    readonly error?: string;
    /** Duration in milliseconds */
    readonly durationMs: number;
}
/**
 * Default configuration values.
 */
export declare const VPC_AGENT_CLIENT_DEFAULTS: {
    readonly TIMEOUT_MS: 30000;
};
/**
 * VPC Agent Client.
 *
 * Provides methods to proxy requests through the VPC Agent Lambda
 * for accessing private VPC resources from the developer's machine.
 *
 * @see Requirements 10.4
 *
 * @example
 * ```typescript
 * const client = new VpcAgentClient({
 *   url: 'https://vpc-agent.example.com',
 *   auth: 'api-key',
 *   apiKey: 'my-api-key',
 *   proxyHosts: ['rds.internal', 'redis.internal'],
 * });
 *
 * // TCP proxy (e.g., for database connections)
 * const response = await client.proxyTcp('rds.internal', 5432, Buffer.from('...'));
 *
 * // HTTP proxy
 * const httpResponse = await client.proxyHttp('api.internal', 8080, {
 *   method: 'GET',
 *   path: '/health',
 * });
 * ```
 */
export declare class VpcAgentClient {
    private readonly config;
    private readonly parsedUrl;
    /**
     * Create a new VpcAgentClient.
     *
     * @param config - Client configuration
     */
    constructor(config: VpcAgentClientConfig);
    /**
     * Check if a host should be proxied through VPC Agent.
     *
     * @param host - Host to check
     * @returns True if host should be proxied
     */
    shouldProxy(host: string): boolean;
    /**
     * Proxy a TCP connection through VPC Agent.
     *
     * Used for database connections (PostgreSQL, MySQL, Redis, etc.)
     * where raw TCP data needs to be forwarded.
     *
     * @param host - Target host
     * @param port - Target port
     * @param data - Data to send (will be base64 encoded)
     * @param timeoutMs - Request timeout
     * @returns Response from VPC Agent
     *
     * @see Requirements 10.4
     */
    proxyTcp(host: string, port: number, data?: Buffer, timeoutMs?: number): Promise<VpcAgentResponsePayload>;
    /**
     * Proxy an HTTP request through VPC Agent.
     *
     * Used for HTTP APIs running in the VPC.
     *
     * @param host - Target host
     * @param port - Target port
     * @param options - HTTP request options
     * @returns Response from VPC Agent
     *
     * @see Requirements 10.4
     */
    proxyHttp(host: string, port: number, options: {
        method: string;
        path: string;
        headers?: Record<string, string>;
        body?: string;
        timeoutMs?: number;
    }): Promise<VpcAgentResponsePayload>;
    /**
     * Send a request to the VPC Agent.
     *
     * @param payload - Request payload
     * @returns Response from VPC Agent
     * @private
     */
    private sendRequest;
    /**
     * Test connectivity to VPC Agent.
     *
     * Sends a simple request to verify the VPC Agent is reachable
     * and properly configured.
     *
     * @returns Test result
     */
    testConnectivity(): Promise<{
        success: boolean;
        message: string;
        durationMs: number;
    }>;
}
/**
 * Create a VPC Agent client from Live Dev configuration.
 *
 * @param vpcAgentConfig - VPC Agent configuration from Live Dev config
 * @param awsConfig - AWS configuration
 * @returns VPC Agent client or null if not configured
 *
 * @see Requirements 10.4
 */
export declare function createVpcAgentClient(vpcAgentConfig: VpcAgentConfig | undefined, awsConfig?: {
    region?: string;
    profile?: string;
}): VpcAgentClient | null;
/**
 * VPC Agent connection pool for managing multiple connections.
 *
 * Provides connection pooling and automatic reconnection for
 * database connections through the VPC Agent.
 */
export declare class VpcAgentConnectionPool {
    private readonly client;
    private readonly connections;
    private readonly maxConnections;
    private readonly connectionTtlMs;
    /**
     * Create a new connection pool.
     *
     * @param client - VPC Agent client
     * @param options - Pool options
     */
    constructor(client: VpcAgentClient, options?: {
        maxConnections?: number;
        connectionTtlMs?: number;
    });
    /**
     * Get or create a connection to a host.
     *
     * @param host - Target host
     * @param port - Target port
     * @returns Connection key
     */
    getConnection(host: string, port: number): string;
    /**
     * Send data through a connection.
     *
     * @param connectionKey - Connection key from getConnection()
     * @param data - Data to send
     * @returns Response from VPC Agent
     */
    send(connectionKey: string, data: Buffer): Promise<VpcAgentResponsePayload>;
    /**
     * Close a connection.
     *
     * @param connectionKey - Connection key
     */
    closeConnection(connectionKey: string): void;
    /**
     * Close all connections.
     */
    closeAll(): void;
    /**
     * Get pool statistics.
     */
    getStats(): {
        activeConnections: number;
        maxConnections: number;
    };
    /**
     * Clean up expired connections.
     * @private
     */
    private cleanupExpiredConnections;
}
