Move more types to base stream_protocol.
Add stream attachments declarations.