Meanwhile you can probably connect HTML client to already existing open-source non-HTML bot [1] using its bot-as-a-proxy feature. Adding automation stuff directly to HTML client shouldn't be hard, assuming network protocol handling and state keeping already provided for you.