import type { BaseChatModel } from '@langchain/core/language_models/chat_models'; import type { BaseMessage } from '@langchain/core/messages'; import type { RunnableConfig } from '@langchain/core/runnables'; import type { Logger } from '@n8n/backend-common'; import { z } from 'zod'; import type { CoordinationLogEntry } from '../types/coordination'; import type { DiscoveryContext } from '../types/discovery-types'; import type { SimpleWorkflow } from '../types/workflow'; import type { ChatPayload } from '../workflow-builder-agent'; import { type IntrospectionEvent } from '../tools/introspect.tool'; export interface ResponderContext { messages: BaseMessage[]; coordinationLog: CoordinationLogEntry[]; discoveryContext?: DiscoveryContext | null; workflowJSON: SimpleWorkflow; workflowContext?: ChatPayload['workflowContext']; previousSummary?: string; } export interface ResponderResult { response: BaseMessage; introspectionEvents: IntrospectionEvent[]; } export interface ResponderAgentConfig { llm: BaseChatModel; enableIntrospection?: boolean; logger?: Logger; } export declare function createResponderAgent(config: ResponderAgentConfig): import("langchain").ReactAgent; discoveryContext: z.ZodNullable>; workflowJSON: z.ZodAny; previousSummary: z.ZodOptional; workflowContext: z.ZodOptional; }, "strip", z.ZodTypeAny, { coordinationLog: any[]; discoveryContext?: any; workflowJSON?: any; previousSummary?: string | undefined; workflowContext?: any; }, { coordinationLog: any[]; discoveryContext?: any; workflowJSON?: any; previousSummary?: string | undefined; workflowContext?: any; }>, readonly [import("langchain").AgentMiddleware; discoveryContext: z.ZodNullable>; workflowJSON: z.ZodAny; previousSummary: z.ZodOptional; workflowContext: z.ZodOptional; }, "strip", z.ZodTypeAny, { coordinationLog: any[]; discoveryContext?: any; workflowJSON?: any; previousSummary?: string | undefined; workflowContext?: any; }, { coordinationLog: any[]; discoveryContext?: any; workflowJSON?: any; previousSummary?: string | undefined; workflowContext?: any; }>, { coordinationLog: any[]; discoveryContext?: any; workflowJSON?: any; previousSummary?: string | undefined; workflowContext?: any; }, readonly (import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[]>], readonly (import("langchain").DynamicStructuredTool; source: z.ZodOptional; }, "strip", z.ZodTypeAny, { issue: string; category: "conflicting_instructions" | "incomplete_example" | "missing_guidance" | "other" | "unclear_node_description"; source?: string | undefined; }, { issue: string; category: "conflicting_instructions" | "incomplete_example" | "missing_guidance" | "other" | "unclear_node_description"; source?: string | undefined; }>, { issue: string; category: "conflicting_instructions" | "incomplete_example" | "missing_guidance" | "other" | "unclear_node_description"; source?: string | undefined; }, { issue: string; category: "conflicting_instructions" | "incomplete_example" | "missing_guidance" | "other" | "unclear_node_description"; source?: string | undefined; }, import("@langchain/langgraph").Command, string>, unknown, string> | import("@langchain/core/tools").ServerTool | import("@langchain/core/tools").ClientTool)[]>>; export type ResponderAgentType = ReturnType; export declare function invokeResponderAgent(agent: ResponderAgentType, context: ResponderContext, config?: RunnableConfig, options?: { enableIntrospection?: boolean; }): Promise;