repl protocol