Skip to main content

Module remote

Module remote 

Source
Expand description

Remote client support for rpi --connect.

rpi is a Rust replacement for the TS pi CLI, not a wrapper around it, so this module owns rpi’s own wire contract instead of depending on any external implementation. The design borrows the shape of the TS packages/coding-agent/src/modes/rpc/ layer (commands on stdin, responses + events on stdout, a session abstraction the UI can render), but every type here is native Rust.

Pieces:

The client itself (--connect) is built on top of these types: a TCP JSONL connection, a remote session that folds the event stream into a transcript, and a terminal UI that renders it. The client holds no local agent resources — no provider, tools, extensions, or session files.

Modules§

client
TCP JSON-RPC client for the rpi --server endpoint.
protocol
Shared wire protocol for rpi’s headless RPC mode (--mode rpc, the server) and the remote client (--connect).
session
Client-side session model: folds the server’s event stream into a render-friendly transcript plus a small amount of session state.
tui
Terminal UI for rpi --connect: renders a remote session’s transcript and forwards input as protocol commands.