initial commit of protocol classes
updated to use protocol classes instead of raw json messages
added copyright headers
added AnsiStream.mode to override ansi detection