refactor: split src/host-env.ts into focused modules
#3259
Merged
src/host-env.ts into focused modules
#3259