Expand description
A no-iroh mcpmesh-local/1 client: connect the UDS, read the server’s Hello
first frame, assert the api name, then issue typed request/response frames. Distinct
from the CLI crate (cli/)’s ControlClient (which uses mcpmesh_net::framing) — this one links no
iroh, so kb and the host shell can use it. kb calls this to self-register
its [services.kb] socket backend with the running mcpmesh daemon.
Structs§
- Control
Client - A connected mcpmesh-local/1 client: the framed stream + the server’s
Hello. - Stream
Subscription - A live
Request::Subscribestream yielding typedStreamFrames (snapshot, then events/lagged notices) until the daemon side closes. Holds the connection’s write half for its lifetime — a subscriber only reads, but dropping the writer would half-close the socket. Drop the subscription to disconnect (there is no request channel back).
Enums§
- Client
Error - The error surface of the client — thin, so callers can
anyhow-wrap it.
Functions§
- connect_
control - Connect + complete the hello handshake, asserting the api name is
mcpmesh-local/1. - connect_
control_ default connect_controlat the platform default endpoint (crate::paths::default_endpoint): the quickstart front door — a consumer dials the running daemon without reimplementing the platform endpoint rule. Resolution failure surfaces asClientError::Io(NotFound), same as a daemon that is not running.- connect_
control_ io - Complete the mcpmesh-local/1 hello handshake over ALREADY-CONNECTED byte halves —
the transport-agnostic core of
connect_control, and the front door for in-process embedding (mcpmesh-node’sNode::controldials a tokio duplex through here).
Type Aliases§
- Control
Read - The client’s read half — boxed so ONE
ControlClientserves every transport (the platform socket/pipe viaconnect_control, or an embedder’s in-memory duplex viaconnect_control_io). - Control
Write - The client’s write half — see
ControlRead.