  We give several new perspectives on the Heegaard Floer Dehn surgery formulas
of Manolescu, Ozsv\'{a}th and Szab\'{o}. Our main result is a new exact
triangle in the Fukaya category of the torus which gives a new proof of these
formulas. This exact triangle is different from the one which appeared in
Ozsv\'{a}th and Szab\'{o}'s original proof. This exact triangle simplifies a
number of technical aspects in their proofs and also allows us to prove several
new results. A first application is an extensions of the link surgery formula
to arbitrary links in closed 3-manifolds, with no restrictions on the link
being null-homologous. A second application is a proof that the modules for
bordered manifolds with torus boundaries, defined by the author in a previous
paper, are invariants. Another application is a simple proof of a version of
the surgery formula which computes knot and link Floer complexes in terms of
subcubes of the link surgery hypercube. As a final application, we show that
the knot surgery algebra is homotopy equivalent to an endomorphism algebra of a
sum of two decorated Lagrangians in the torus, mirroring a result of Auroux
concerning the algebras of Lipshitz, Ozsv\'{a}th and Thurston.
