Support multiple inputs on a worker

This is preliminary work to support `dir` scheme