Aside from things like simple voltage sensors, it's absolutely not uncommon that you get integrating power meters that monitor the net power flowing out of a battery.
The question how these sensors talk to the OS is a different one, and will differ from model to model.
However, usually, the firmware in your laptop will talk to your sensors, process these values, and present them over a proprietary or standard interface (e.g. ACPI) to your OS.
PCIe is almost certainly not involved as main link – that's way too expensive to get a few bits every minute across. Electrically, expect I²C, variants like SMBUS, plain SPI, 3.3V UARTs, possibly USB, and all other kind of things with which you could connect a platform controller (which really is just a MCU) with sensors.