Add cosy definition in a module.
More on the protocol, but not finished.