import type { BuiltTool } from '@n8n/agents';
import { type AgentJsonToolConfig } from '@n8n/api-types';
import type { 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 { InstrumentToolAdditionalData } from '../agent-runtime-instrumentation';
export interface WorkflowToolContext {
    workflowRepository: WorkflowRepository;
    workflowRunner: WorkflowRunner;
    activeExecutions: ActiveExecutions;
    projectId: string;
    webhookBaseUrl?: string;
    instrumentToolAdditionalData?: InstrumentToolAdditionalData;
}
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<string, unknown>): IPinData;
export declare function inferInputSchema(triggerNode: INode, triggerType: string): z.ZodObject<z.ZodRawShape>;
export declare function executeWorkflow(workflow: WorkflowEntity, triggerNode: INode, triggerType: string, inputData: Record<string, unknown>, context: WorkflowToolContext, allOutputs?: boolean, instrumentedToolName?: string): Promise<{
    executionId: string;
    status: string;
    data?: Record<string, unknown>;
    error?: string;
}>;
export declare function extractResult(executionId: string, allOutputs: boolean): Promise<{
    executionId: string;
    status: string;
    data?: Record<string, unknown>;
    error?: string;
}>;
export declare function resolveWorkflowTool(descriptor: Extract<AgentJsonToolConfig, {
    type: 'workflow';
}>, context: WorkflowToolContext): Promise<BuiltTool>;
export {};
