import type { BuiltTool } from '@n8n/agents'; import { type AgentJsonToolConfig } from '@n8n/api-types'; import type { UserRepository, WorkflowRepository, WorkflowEntity } from '@n8n/db'; import type { INode, IPinData } from 'n8n-workflow'; import { z } from 'zod'; import type { ActiveExecutions } from '../../../active-executions'; import type { WorkflowRunner } from '../../../workflow-runner'; import type { WorkflowFinderService } from '../../../workflows/workflow-finder.service'; export interface WorkflowToolContext { workflowRepository: WorkflowRepository; workflowRunner: WorkflowRunner; activeExecutions: ActiveExecutions; workflowFinderService: WorkflowFinderService; userRepository: UserRepository; userId: string; projectId?: string; webhookBaseUrl?: string; } interface DetectedTrigger { node: INode; triggerType: string; } export declare function detectTriggerNode(workflow: WorkflowEntity): DetectedTrigger; export declare function validateCompatibility(workflow: WorkflowEntity): void; export declare function normalizeTriggerInput(triggerNode: INode, triggerType: string, inputData: Record): IPinData; export declare function inferInputSchema(triggerNode: INode, triggerType: string): z.ZodObject; export declare function executeWorkflow(workflow: WorkflowEntity, triggerNode: INode, triggerType: string, inputData: Record, context: WorkflowToolContext, allOutputs?: boolean): Promise<{ executionId: string; status: string; data?: Record; error?: string; }>; export declare function extractResult(executionId: string, allOutputs: boolean): Promise<{ executionId: string; status: string; data?: Record; error?: string; }>; export declare function resolveWorkflowTool(descriptor: Extract, context: WorkflowToolContext): Promise; export {};