import { Message } from "../chat/Message.js"; import { ChatResponseString } from "../chat/ChatResponse.js"; /** * Interceptor for processing messages before they are sent to the LLM. * Return modified messages or void to keep original. */ export type RequestInterceptor = (messages: Message[]) => Promise | Message[] | void; /** * Interceptor for processing LLM responses before they are returned to the user. * Return modified response or void to keep original. */ export type ResponseInterceptor = (response: ChatResponseString) => Promise | ChatResponseString | void; /** * Manages a chain of interceptors that can modify requests and responses. */ export declare class InterceptorChain { private requestInterceptors; private responseInterceptors; /** * Add a request interceptor to the chain. */ addRequestInterceptor(interceptor: RequestInterceptor): this; /** * Add a response interceptor to the chain. */ addResponseInterceptor(interceptor: ResponseInterceptor): this; /** * Execute all request interceptors in order. */ executeRequestInterceptors(messages: Message[]): Promise; /** * Execute all response interceptors in order. */ executeResponseInterceptors(response: ChatResponseString): Promise; /** * Clear all interceptors. */ clear(): void; /** * Get the number of registered interceptors. */ get size(): { request: number; response: number; }; } //# sourceMappingURL=InterceptorChain.d.ts.map