function defineChatMiddleware<TContext, TRequires, TProvides, TInterruptDefinitions>(middleware): DefinedChatMiddleware<TContext, TRequires, TProvides, TInterruptDefinitions>;Defined in: packages/ai/src/activities/chat/middleware/define.ts:27
Identity helper for authoring middleware with precise capability inference. Returns the middleware unchanged at runtime; only sharpens its type so the chat() array coverage check and createChatMiddleware builder can read the exact requires/provides.
TContext = unknown
TRequires extends readonly CapabilityHandle[] = readonly []
TProvides extends readonly CapabilityHandle[] = readonly []
TInterruptDefinitions extends AnyInterruptDefinition = never
ChatMiddleware<TContext, TInterruptDefinitions> & object
DefinedChatMiddleware<TContext, TRequires, TProvides, TInterruptDefinitions>