The one near the firewall is the manual fuel pump prime connector. I have used this once or twice. It's designed so that you can plug one end of a fused jumper into the positive battery terminal. It's used in conjunction with the Fuel Pressure Leakdown Test on chart A-5 of PFI diagnostics in the FSM. It's extremely helpful in trying to further investigate a problem found in Chart A-4 (power balance test).
You use it to pressurize the fuel pump, record the resulting pressure shown on a fuel pressure gauge, and then note the final pressure after going into the diagnostic and manually opening an injector.
Basically, it's supposed to help you disambiguate a spark issue from a leaky fuel injector.
No clue what the one at the alternator is, though.