pmset man page:
POWER SOURCE ARGUMENTS
-gwith a 'batt' or 'ps' argument will show the state of all attached power sources.
[…] Certain Apple battery calibration tools may temporarily disable battery charging, even though your Apple portable is plugged into AC power.
Such tools will never surprise you with this behavior; you will know it's happening. This state will be reflected in an additional line of output to 'batt' or 'ps' readings, including the
pidof the app inducing this behavior.
So, does any piece of publicly available software exist to force the battery not to charge?