/** * Chat pre-handler registry. * * A per-agent store of {@link ChatPreHandler}s, registered from * `Plugin.chatPreHandlers`. `drain` runs them in descending `priority` order * and returns the first non-null result. Handler state is isolated per agent. */ import type { ChatPreHandler, ChatPreHandlerContext, ChatPreHandlerResult } from "../types/chat-pre-handler.js"; export declare class ChatPreHandlerRegistry { private readonly byId; register(handler: ChatPreHandler): void; has(id: string): boolean; unregister(id: string): void; /** Handlers sorted by descending priority (ties keep insertion order). */ list(): ChatPreHandler[]; /** Run handlers by priority; the first non-null result wins. */ drain(ctx: ChatPreHandlerContext): Promise; }