  For bi-Hilbertian $A$-bimodules, in the sense of Kajiwara--Pinzari--Watatani,
we construct a Kasparov module representing the extension class defining the
Cuntz--Pimsner algebra. The construction utilises a singular expectation which
is defined using the $C^*$-module version of the Jones index for bi-Hilbertian
bimodules. The Jones index data also determines a novel quasi-free dynamics and
KMS states on these Cuntz--Pimsner algebras.
