Protective diodes for a start, current monitors, firmware code with limits...Let me flip the question. How could a direct DC link (pack, contactor, port) not support bidirectional current flow?
I'm not saying that it can't; but that doesn't mean that it can either. Hence the question.
There are vehicles that can do this, but all the ones that I am aware of were all designed for it.