sotashimozono_obsidian-remo.../mobile/tests
sotashimozono 2b8cdfa0ee feat(mobile): implement WsRpcClient, WsRpcConnection, WsRemoteFsClient
Closes #216.

WsRpcClient (#mobile/src/transport/WsRpcClient.ts)
- JSON-RPC 2.0 over WsChannel with id-correlated pending map
- 30 s configurable call timeout; pending calls reject on close
- onNotification() for server-push messages; onClose() disposers
- No Node.js deps — TextEncoder/TextDecoder throughout

WsRpcConnection (mobile/src/transport/WsRpcConnection.ts)
- Static connect() factory: WsChannel + auth RPC + server.info RPC
- queueBeforeOpen:true so frames queued while socket is still opening
- waitForOpen() races open/error/close events; short-circuits if OPEN
- Exposes .rpc (WsRpcClient) and .serverInfo (ServerInfo) as readonly

WsRemoteFsClient (mobile/src/adapter/WsRemoteFsClient.ts)
- Mirrors desktop RpcRemoteFsClient with Uint8Array instead of Buffer
- btoa/atob base64 helpers (browser-native, no Node.js)
- All fs.* methods: stat, exists, list, readBinary, readBinaryRange,
  writeBinary, mkdirp, remove, rmdir, rename, copy
- isAlive() / onClose() delegate to WsRpcClient

Tests: 24 passing across 3 test files.
2026-05-02 11:26:41 +09:00
..
WsRemoteFsClient.test.ts feat(mobile): implement WsRpcClient, WsRpcConnection, WsRemoteFsClient 2026-05-02 11:26:41 +09:00
WsRpcClient.test.ts feat(mobile): implement WsRpcClient, WsRpcConnection, WsRemoteFsClient 2026-05-02 11:26:41 +09:00
WsRpcConnection.test.ts feat(mobile): implement WsRpcClient, WsRpcConnection, WsRemoteFsClient 2026-05-02 11:26:41 +09:00