Second-year forward Sam Hauser has agreed to a three-year contract with the Celtics worth approximately $6 million, a league source told the Globe on Sunday. The first two years of the deal are fully guaranteed, the source said. The Celtics signed the sharpshooter from Virginia to a two-way contract last summer, and in February the deal was converted to an NBA contract after a collection of trades opened up several roster spots. Last week, Boston declined Hauser’s $1.6 million option for next season and made him a restricted free agent, making this multi-year deal possible.