There have been sensors on the B line for a long time. They are visible between the rails at most grade crossings between BU West and Chestnut Hill Ave (and maybe all the way to BC - I don't recall that stretch).
They are embedded in concrete slabs between the rails, about 2' x 4', usually with a single small wire leading out to a metal in-ground box with a cover that says MBTA or BTD (Boston Transportation Dept.) or sometimes "Mass Highway". Since it's a single wire, it seems to be an inductive loop sensor just like what's embedded in the asphalt to detect autos at most intersections. The old AVI antennas / pickup loops were just wires caulked into wooden frames which are now all gone, but the traffic signal pickups remain.
The boston.com article says:
where BTD controls signals on two pieces of the road -- from Kenmore to the BU Bridge and from Warren Street to Lake Street
...but I disagree. There aren't any left between Kenmore and the bridge, except for one on the outbound side right at the Route 2 crossing and one that's sitting idle outside the inbound rails by Guitar Center. (That one got pulled out during the BU Central station rebuild and never put back.) Also, there are lots between BU West and Warren St., but perhaps are not hooked up.
Whether or not the pickup of a trolley by the sensor actually works is up to the BTD. It would have to be programmed into the signal control computer at each intersection whether or not to act on the presence of a trolley.
A side note: the ID tags that are used by the station announcement system are visible usually 25 yards or so before and usually after a station, right between the rails. Look for a small plastic box mounted on a crosstie, about the size of a cigarette lighter, with a printed label that has the stop name on it. I'm quite certain they are RFID tags similar to the MassPike FastLane transponders.