Some questions/notes on collab

You’re expected to initially set this to the version that corresponds to the initial document you gave the state. There is no special ‘before anything was received’ state – you have to start synced with a given version, or the plugin won’t work at all (it only syncs incrementally, never resets to a given full state).

The one from which the new steps start, so that the server knows which version they are compatible with.

I’m not a fan of complicated special cased parameter types. I guess when you create an array from a single id, that’s your local client id? Would making the parameter optional and defaulting to ‘everything is local’ work for you?

I think going through receiveTransaction is simple enough in this case. And see this thread for some background on why things work the way they do.

receiveTransaction is written to not do useless rebasing when it doesn’t need to.

Yes, the docChanged property will tell you whether the document changed in a given transaction.