Expand description
RPC I/O adapters for different transport modes.
Port of Go’s pkg/wshutil/wshrpcio.go.
Provides adapters to convert between:
- Stream (JSON lines) ↔ message channels
- PTY (OSC-wrapped) ↔ message channels
- WebSocket (JSON packets) ↔ message channels
Functions§
- adapt_
msg_ ch_ to_ pty - Read messages from a channel and write them as OSC-escaped sequences to a PTY.
- adapt_
output_ ch_ to_ stream - Read messages from a channel and write them as JSON lines to a stream.
- adapt_
stream_ to_ msg_ ch - Read JSON lines from a stream and send them to a channel.