Walnut husk fly
The adult fly and larvae in your photos are the walnut husk maggot, scientific name: Rhagoletis suavis, Family Tephritidae. This species is common throughout most of eastern North America, and has undoubtedly been in Pennsylvania for some time. The walnut husk fly, Rhagoletis completa, is a different species or subspecies found primarily in the western US. The walnut husk maggot probably infests most walnut trees in the eastern US every year. The female fly lays eggs on the skin of the husk, and the larvae burrow into and feed on the husk tissues. They do not enter into the nut itself and don't affect the taste or quality of the nut meat in any way. But the feeding of the larvae does cause a staining of the shell and makes the slimy husks more difficult to remove from the shells. This can be a problem for commercial growers (very few in the east), but is usually of not much concern to homeowners harvesting from yard trees for personal use, so it is usually not worth trying to control these flies with pesticides. If you search for walnut husk fly on the internet, you will find lots of sites with information, but most pertain to commercial production in California and the west coast. The lack of extension bulletins and other sites for the eastern US is fairly indicative that walnut husk fly is not considered to be a real problem here.