Files
n8n/packages/@n8n/ai-workflow-builder.ee/evaluations/programmatic/evaluators/nodes.ts
T
olegandcubic-dev-ai[bot] f880a74d99 refactor(ai-builder): Implement unified evaluations harness (#23955)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-01-13 12:11:13 +00:00

16 lines
531 B
TypeScript

import type { INodeTypeDescription } from 'n8n-workflow';
import type { SimpleWorkflow } from '@/types';
import { validateNodes } from '@/validation/checks';
import type { SingleEvaluatorResult } from '@/validation/types';
import { calcSingleEvaluatorScore } from '../score';
export function evaluateNodes(
workflow: SimpleWorkflow,
nodeTypes: INodeTypeDescription[],
): SingleEvaluatorResult {
const violations = validateNodes(workflow, nodeTypes);
return { violations, score: calcSingleEvaluatorScore({ violations }) };
}