Currently coq.env.module M returns everything that is defined inside module M, however it seems that there is no api to retrieve currently existing definitions while inside an open section.
Existing coq.env.section api returns only variables that are going to be abstracted away when current section is closed.