Universal dialogue engine with a middleware plugin architecture