add-rpc

Integrate new RPC commands into Wave Terminal's communication layer.

22.0k|1.1k|Updated Jun 8, 2022
One-click install
npx skills add https://github.com/wavetermdev/waveterm --skill add-rpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-rpc
Source: https://github.com/wavetermdev/waveterm/tree/main/.kilocode/skills/add-rpc
Command: npx skills add https://github.com/wavetermdev/waveterm --skill add-rpc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide for developers to add new Remote Procedure Calls (RPC) to Wave Terminal, enabling new forms of communication and functionality between its various components.

Core Features & Use Cases

  • RPC Command Definition: Learn how to define new RPC methods, including request and response types, in the central interface.
  • Code Generation: Understand how to use the task generate command to automatically create necessary TypeScript bindings and Go helper code.
  • Implementation Guidance: Get detailed instructions on where and how to implement new RPC commands within the Wave Terminal architecture (main server, Electron, frontend, remote server, terminal block).
  • Streaming Commands: Learn how to implement commands that return data progressively using channels.
  • Use Case: A developer needs to add a new command to allow the frontend to request a list of active terminal sessions from the backend. This guide walks them through defining the GetActiveSessionsCommand, generating the types, and implementing the logic in the wshserver.go file.

Quick Start

Follow the steps in this guide to add a new RPC command to Wave Terminal.

Frequently Asked Questions about add-rpc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new RPC command to Wave Terminal?

To add a new RPC command to Wave Terminal, you define the request and response types in the central interface, run the `task generate` command to create TypeScript and Go bindings, and then implement the command logic across the relevant architectural components like the main server or frontend.

What is the process for generating TypeScript and Go bindings for a new RPC method?

Generating TypeScript and Go bindings for a new RPC method requires defining the interface first, then executing the `task generate` command, which automatically produces the necessary helper code for the Wave Terminal communication layer.

How do I implement streaming RPC patterns in Wave Terminal?

Streaming RPC patterns in Wave Terminal are implemented by using channels to return data progressively, allowing the frontend or remote servers to receive continuous updates from the backend command logic.

Where should RPC command logic be implemented in the Wave Terminal architecture?

RPC command logic in the Wave Terminal architecture should be implemented in specific components depending on the target, such as the main server (`wshserver.go`), the Electron process, the frontend, remote servers, or terminal blocks.

Can I define custom request and response types for Wave Terminal RPC commands?

Yes, you can define custom request and response types for Wave Terminal RPC commands by declaring them in the central interface before running the code generation step to establish the communication protocol contracts.

Does Wave Terminal support RPC communication between the frontend and the Electron process?

Yes, Wave Terminal supports RPC communication between the frontend and the Electron process, enabling new forms of functionality and data exchange across its various architectural components.