Package:
@hexos/react-coreAbstract transport interface for client-server communication.
SSETransport is the default implementation using HTTP Server-Sent Events.
Related: AgentConfig configures the connection, TransportMessage is the outbound payload, TransportEvent is the inbound event type.
interface AgentTransport {
connect(config: AgentConfig): Promise<void>;
send(message: TransportMessage): void;
sendApproval(decision: ApprovalDecision): Promise<void>;
onMessage(callback: (event: TransportEvent) => void): () => void;
disconnect(): void;
}connect
(config: AgentConfig) => Promisesend
(message: TransportMessage) => voidsendApproval
(decision: ApprovalDecision) => PromiseonMessage
(callback: (event: TransportEvent) => void) => () => voiddisconnect
() => void