There are different definitions for $x^y$ that usually coincide. But you are seeing an instance of where the conventions do not agree.
In one convention, $x^y$ literally means $e^{y\ln(x)}$, because it can be easier to give solid definitions for $\ln()$ and $e^{()}$ first. In this convention alone a negative base is never permitted.
In this convention, when $y$ is a positive integer, then $x^y$ turns out to be exactly the same value as $\overbrace{x\cdot x\cdot\cdots\cdot x}^{y\text{ times}}$. That's nice. It agrees with the elementary school meaning for an exponent that is a positive integer. Some conventions then extend this and agree that $x^y=\overbrace{x\cdot x\cdot\cdots\cdot x}^{y\text{ times}}$ when $y$ is a positive integer even when $x$ is negative. So then you get things like $(-\pi)^{1}=-\pi$. But just under that extended convention.
And then there are even more issues with conventions about having $0$ as an exponent. Just look up posts about $0^0$ on this site to get a taste. But anyway, in some of those extended conventions, there is meaning for things like $(-\pi/2)^0$.
A CAS like WolframAlpha is likely to work under the convention that $x^y=e^{y\ln(x)}$ with no extensions to that convention unless you go out of your way to let the CAS know that $y$ may be an integer. With $y$ being the transcendental function $\cos(x)$, it's no surprise if the CAS doesn't think about it as an integer.