Skip to main content

Module client

Module client 

Source
Expand description

Client for connecting to a microsandbox agent relay.

AgentClient communicates with agentd through an agent relay transport. During connection, the relay assigns a non-overlapping correlation ID range and sends the cached core.ready payload so the client can begin issuing commands immediately. Unix domain sockets are available with the uds feature; the stream feature drives the client over any AsyncRead + AsyncWrite byte stream (e.g. a caller-owned, pre-authenticated transport adapted to bytes).

Two API tiers share one socket and one reader task:

  • Raw (request_raw, stream_raw, send_raw) — exchange RawFrames. The client handles framing and correlation IDs; CBOR encoding/decoding is left to the caller. Use this when wrapping the client for other languages.
  • Typed (request, stream, send) — same primitives over Message; the SDK serializes payloads with CBOR.

Structs§

AgentClient
Client for communicating with agentd through the agent relay.

Enums§

AgentProtocol
Agent protocol generation spoken by a connected sandbox relay.