Provides serialization and deserialization of commands and responses using uPickle's JSON support. All protocol types are serialized polymorphically based on their runtime type.
== Usage Example ==
val command: WorkspaceAgentCommand = ReadFileCommand("cmd-1", "/path/to/file.txt", None, None)
val json = ProtocolCodec.encodeAgentCommand(command)
val decoded = ProtocolCodec.decodeAgentCommand(json)