Abstract Base.prototype.prompt to support non-cli env.