/**
 * Schema-driven data exchange with external service endpoints.
 *
 * Three pillars: endpoint + schema + identity.
 * Transport (fetch, Playwright, gRPC) is an implementation detail.
 * The value is schema enforcement and credential resolution —
 * validating both sides of the exchange and resolving auth from
 * the connection store at the last mile.
 */
/**
 * Validate data against a JSON Schema.
 *
 * Returns a list of human-readable error strings (empty when valid).
 */
export declare function validateSchema(data: unknown, schema: Record<string, unknown>): {
    valid: boolean;
    errors: string[];
};
/**
 * Exchange data with an external service endpoint under schema enforcement.
 *
 * 1. If request_schema provided, validate body before sending.
 *    On failure: return immediately (never send the request).
 * 2. Make the HTTP call (transport layer — currently Node.js fetch).
 * 3. Parse response body (JSON auto-detect).
 * 4. If response_schema provided, validate response after receiving.
 * 5. Return result with validated flag and any validation_errors.
 */
export declare function exchange(args: {
    endpoint?: string;
    url?: string;
    method: string;
    headers?: Record<string, string>;
    query?: Record<string, string>;
    body?: unknown;
    request_schema?: Record<string, unknown>;
    response_schema?: Record<string, unknown>;
    timeout_ms?: number;
    credential_provider?: string;
    credential_label?: string;
    auth_scheme?: string;
    auth_header?: string;
}): Promise<{
    status: number;
    data: unknown;
    headers: Record<string, string>;
    elapsed_ms: number;
    validated: boolean;
    validation_errors: string[];
}>;
