I like your idea and I'd not heard of CoprocessorJS. If I had only a serial port for networking (e.g. the Mac Classic I wish I'd never parted with), I'd be tempted to emulate tail -f on the Mac side sending to the filesystem on the "remote" machine but not bi-directional. But, IIRC, AppleTalk to ethernet adaptors existed I think so maybe that's the route I'd go.
Writing on the Mac to a remote file for onward processing is cool, so have fun.