import type { PayloadMiddleware } from "./payload-middleware.js";
import type { TypingSignaler } from "./typing-mode.js";
export interface WithTypingSignalsOptions {
    /**
     * The TypingSignaler instance to call. Required — there's no sensible
     * default. Production wires the per-run signaler the chain creates.
     */
    signaler: Pick<TypingSignaler, "signalTextDelta" | "signalToolStart">;
    /**
     * If true, treat `block` payloads the same as `delta` for signaling.
     * Defaults to true (production behaviour). Set false to disable
     * signaling on block emits — useful for surfaces that only animate
     * on tokens, not on completed blocks.
     */
    signalOnBlock?: boolean;
}
/**
 * Returns a PayloadMiddleware that fires typing signals as side effects.
 * Pass-through delivery semantics — the middleware never drops or mutates.
 *
 * Per kind:
 *
 *   delta → signaler.signalTextDelta(payload.text)
 *   block → signaler.signalTextDelta(payload.text) when signalOnBlock=true
 *   tool  → signaler.signalToolStart()
 *   final → no signal
 *
 * If a signaler call throws, the error propagates (production behaviour:
 * signaling is best-effort but a thrown error indicates a real problem).
 * Callers can wrap with `withPayloadTrace` upstream to log signaling
 * failures without blocking delivery.
 */
export declare function withTypingSignals(opts: WithTypingSignalsOptions): PayloadMiddleware;
