This is not an agent situation and they are not buying and selling 'in your name'. Rather a mutual fund is a corporation, usually a trust corporation, and its managers are acting in the name of that corporation, which is owned by its shareholders of which you are one. When the fund buys and sells investments, consistent with whatever policy or strategy it follows, it realizes capital gains and losses at the fund level, but in US when the fund has net gains for the year* it is required to distribute them to the shareholders to avoid a fund-level tax that would hurt its performance and make it unattractive to investors. Often you are provided the option to have these distributions, and the similar ones for received dividends and/or interest, automatically invested in additional shares, so you don't actually get the cash and spend it on groceries or cable TV or whatever, but still for tax purposes it was paid to you and then invested just as if it were actual new money you put in. (In at least many other countries, funds can choose whether to pay out earnings like this, or to keep them in the fund and effectively add them to your investment; these are labelled 'distributing' or 'accumulating' and that word is often included in the fund's name.) (* for this requirement (US) funds can elect to treat the year as running Nov-Oct, and AFAIK all do; that's why you almost always get cap gain distributions (if any) in Dec, when they have finished a complete accounting of the preceding 'year'. In contrast distributions of dividends and/or interest are usually done throughout the year, quarterly or monthly.)
Those (longterm) cap gain distributions were in fact paid to you and appeared on your periodic statements, even if as above you didn't actually take out the cash; the total on the 1099-DIV at the end of the year should match exactly the payments you received. The fact you don't know you received these distributions suggests you aren't looking at your statements or monitoring your account, and as a result they could have lost or stolen all your money and you wouldn't even be aware of it, which is not a good approach.
Note gain distributions do NOT go on 8949, which includes only capital property you directly hold and sell (or otherwise 'dispose' which includes events like a liquidation or acquisition that is NOT structured as purely stock-for-stock and qualified as a nontaxable event). Those gains, which I call 'direct' to distinguish them from distributions, are carried to Schedule D lines 1b-3 and 8b-10 (depending on term and reporting status), but gain distributions go instead on Schedule D line 13 (if you file it; if you have only distributions reported on 1099-DIV box 2a and nothing that goes on 8949 or other 'special' lines, you have the option to skip Schedule D and report directly on 1040 line 7).
Also note this treatment only applies to distributions of (net) longterm gains. If the fund has (net) shortterm gains, those also must be distributed, but they are reported and taxed as ordinary dividends (1099-DIV box 1 and Schedule B not Schedule D).
See Capital Gains and Capital Gain Distributions for a mutual fund?
Meaning of capital gain distribution
What is the relation and difference between capital gain distribution and capital gain?