Under the terms of the deal, Lunar’s aggregation software will coordinate energy from assets installed by Sunrun to sell blocks of energy to utilities and on wholesale markets.