To answer your first question, the top level package.json is most useful for combining multiple extensions and sharing dependencies, and for the rancher dashboard build. The pkg/ is more specific to the individual extension. You'll notice that the rancher/dashboard repo follows a similar structure where there are several extensions baked in.