Expand description
Bidirectional streaming types
This module defines the core types for bidirectional communication in Plexus RPC. These types enable server-to-client requests during streaming execution, supporting interactive workflows like confirmations, prompts, and selection menus.
§Type System
The bidirectional system uses a generic type design that separates:
- Standard types (
StandardRequest/StandardResponse) for common UI patterns - Custom types that activations can define for domain-specific interactions
§Wire Format
All types use serde for serialization. The standard types use internally-tagged
enums for JSON-friendly wire format:
// StandardRequest::Confirm
{ "type": "confirm", "message": "Delete file?", "default": false }
// StandardResponse::Confirmed
{ "type": "confirmed", "value": true }§Error Handling
BidirError covers all failure modes:
- Transport doesn’t support bidirectional (
BidirError::NotSupported) - User cancelled (
BidirError::Cancelled) - Request timed out (
BidirError::Timeout) - Type/serialization errors
Structs§
- Select
Option - An option in a
StandardRequest::Selectrequest.
Enums§
- Bidir
Error - Error types for bidirectional communication
- Standard
Request - Standard request types for common interactive UI patterns.
- Standard
Response - Standard response types matching
StandardRequest.