Address cpp:S5008 with borrowed stream session pointers, typed logger
writers, native module and function handles, and C callback adapters.
Preserve the native NVAPI resolver ABI and library ownership. Cover
move-only log builders, real loader failure paths, and resolver results.
Replace namespace configuration state with an application-owned store. Pass immutable startup settings into services, platform capture and encoder contexts, network helpers, CLI commands, and tray callbacks. Keep runtime credentials in synchronized snapshots and gamepad policy in its input owner.
Validation: UCRT64 sunshine, test_sunshine, audio-info, and sunshinesvc builds with tray support; 566 regression tests passed and 5 device/workflow tests skipped; strict production Doxygen, required clang-format, and CLI smoke checks passed. Full Linux/macOS builds, hardware coverage, and hosted Sonar reanalysis remain CI validation.