>Glasses that can adapt to any prescription (not how glasses work) and are also sunglasses sometimes
Not sure about the "any prescription thing", but it's pretty trivial to make glasses that are "also sunglasses sometimes".
Both photochromatic lenses who darken in response to more light and glasses with variable ND filters exist (the former very common and trivial to find, the latter way more niche, but still commercially available, and cheap enough)