import type { FinalizedMsgContext } from "../templating.js";
import type { DispatchMiddleware } from "./dispatch-middleware.js";
/** Identical to `dispatch-from-config.ts:isInboundAudioContext`. */
export declare function isInboundAudioContext(ctx: FinalizedMsgContext): boolean;
/** The scratch key under which this middleware stores its result. */
export declare const AUDIO_CONTEXT_SCRATCH_KEY: "inboundAudio";
/**
 * Returns a DispatchMiddleware that detects whether the inbound message
 * is an audio message. Sets `input.scratch[AUDIO_CONTEXT_SCRATCH_KEY]`
 * to `true` or `false`. Always proceeds.
 */
export declare function withAudioContextDetection(): DispatchMiddleware;
/** Type-safe reader. Returns `false` when the middleware hasn't run. */
export declare function readInboundAudioFromScratch(scratch: Record<string, unknown>): boolean;
