Enterprise software startup Cognition AI agreed to purchase Windsurf, a platform that enhances A.I.‑driven coding.