add-rpc
Installation
SKILL.md
Adding RPC Calls Guide
Overview
Wave Terminal uses a WebSocket-based RPC (Remote Procedure Call) system for communication between different components. The RPC system allows the frontend, backend, electron main process, remote servers, and terminal blocks to communicate with each other through well-defined commands.
This guide covers how to add a new RPC command to the system.
Key Files
pkg/wshrpc/wshrpctypes.go- RPC interface and type definitionspkg/wshrpc/wshserver/wshserver.go- Main server implementation (most common)emain/emain-wsh.ts- Electron main process implementationfrontend/app/store/tabrpcclient.ts- Frontend tab implementationpkg/wshrpc/wshremote/wshremote.go- Remote server implementationfrontend/app/view/term/term-wsh.tsx- Terminal block implementation