export function sanitizeStepDefinition(step: T): T { if (typeof step !== 'string') { return step; } return step.replace(/\{([^|}]+)\|[^}]+}/g, '{$1}') as any; }