/**
 * @module @arcis/node/middleware/telemetry
 * Bridges Arcis middleware decisions to a TelemetryClient.
 * Pattern 3 (two-layer): the client owns transport; this layer owns Express plumbing.
 */
import type { RequestHandler } from 'express';
import type { TelemetryClient } from '../telemetry/client';
import type { TelemetryDecision, TelemetrySeverity } from '../telemetry/types';
/** Marker that inner middleware writes to and the emitter reads from. */
export interface ArcisTelemetryMarker {
    vector?: string;
    rule?: string;
    severity?: TelemetrySeverity;
    matchedPattern?: string;
    reason?: string;
    /** Pre-decided decision. If absent, the emitter infers from response status. */
    decision?: TelemetryDecision;
}
declare module 'express-serve-static-core' {
    interface Request {
        /** Per-request marker populated by Arcis middlewares for telemetry attribution. */
        __arcis?: ArcisTelemetryMarker;
    }
}
/**
 * Express middleware that records a telemetry event for every request.
 * Captures latency from entry, hooks `res.on('finish')`, and infers the
 * final decision from response status + any `req.__arcis` marker.
 */
export declare function createTelemetryEmitter(client: TelemetryClient): RequestHandler;
/**
 * Wraps the sanitizer middleware so SecurityThreatError → req.__arcis marker.
 * The emitter on `finish` will then have vector/rule/severity attribution.
 */
export declare function tapSanitizerThreats(handler: RequestHandler): RequestHandler;
//# sourceMappingURL=telemetry.d.ts.map