Three new socket tests passing:
- dispatchEvent: sends JSON-encoded event via wrapper.raw.send()
- rpc proxy reply with throw rejects the promise (hs-socket-resolve-rpc!)
- rpc reconnects: close listener sets closedFlag, _hsRpcCall creates fresh ws
Key fixes:
- _sent changed from JS Array to plain object {_len:0, 0:msg, ...} — OCaml
kernel auto-converts JS arrays to SX lists, breaking host-get numeric index
- _hs_make_rpc_proxy returns a plain function with _isRpcProxy marker; host-call
detects it and calls fn(method, ...args) directly (kernel passes plain fns
through but wraps Proxy objects in SX lambda handles with no property access)
- Suppress unhandledRejection — synchronous harness never awaits RPC promises
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>