Versions in this module Expand all Collapse all v0 v0.14.3 May 2, 2026 v0.14.2 Apr 26, 2026 v0.14.1 Apr 21, 2026 Changes in this version + const MaxBatchSize + const MaxLagMessages + const MaxMessageSize + const MaxMessagesPerSecond + const PingPeriod + const PollInterval + const PongWait + const WriteWait + type AckEvent struct + AckSeq int + ThreadID string + func ParseAck(event *Event) (*AckEvent, error) + type BatchEvent struct + HasMore bool + Messages []MessageEvent + ThreadID string + type BroadcastMessage struct + Message *messaging.Message + ThreadID string + type Connection struct + type ErrorEvent struct + Code string + Message string + type Event struct + Data json.RawMessage + Timestamp int64 + Type EventType + func NewBatchEvent(threadID string, messages []MessageEvent, hasMore bool) (*Event, error) + func NewErrorEvent(code, message string) (*Event, error) + func NewEvent(eventType EventType, data interface{}) (*Event, error) + func NewInboxMessageEvent(msg *InboxMessageEvent) (*Event, error) + func NewMessageEvent(msg *MessageEvent) (*Event, error) + func NewPingEvent() (*Event, error) + func NewPongEvent() (*Event, error) + func NewTaskStreamEvent(stream *TaskStreamEvent) (*Event, error) + func NewTelemetryEvent(telem *TelemetryEvent) (*Event, error) + func NewThreadStateEvent(threadID, status string, lastSeq int, updatedAt time.Time) (*Event, error) + func ParseEvent(data []byte) (*Event, error) + func (e *Event) ToJSON() ([]byte, error) + type EventType string + const EventTypeAck + const EventTypeBatch + const EventTypeError + const EventTypeInboxMessage + const EventTypeMessage + const EventTypePing + const EventTypePong + const EventTypeSubscribe + const EventTypeTaskStream + const EventTypeTelemetry + const EventTypeThreadState + type InboxMessageEvent struct + CorrelationID string + CreatedAt int64 + FromAgent string + ID string + MessageID string + MessageType string + Payload string + Status string + Title string + ToInbox string + type MessageEvent struct + Content string + CreatedAt int64 + FromID string + FromType string + ID string + Kind string + MessageSeq int + MetadataJSON string + Subject string + ThreadID string + ToID string + ToType string + type Server struct + func NewServer(store messaging.MessageStore) *Server + func (s *Server) BroadcastInboxMessage(msg *messaging.InboxMessage) + func (s *Server) BroadcastMessage(threadID string, msg *messaging.Message) + func (s *Server) BroadcastTaskEvent(stream *TaskStreamEvent) + func (s *Server) BroadcastTelemetry(telem *TelemetryEvent) + func (s *Server) GetConnectionCount() int + func (s *Server) HandleWebSocket(w http.ResponseWriter, r *http.Request) + func (s *Server) Run() + func (s *Server) SetToken(token string) + type SubscribeEvent struct + FromSeq int + ThreadID string + func ParseSubscribe(event *Event) (*SubscribeEvent, error) + type Subscription struct + FromSeq int + LastAckSeq int + SubscribedAt time.Time + ThreadID string + type TaskStreamEvent struct + AgentID string + Cost float64 + Directive string + DirectiveFull string + DurationSec int + ErrorMsg string + SourceType string + Status string + StreamType TaskStreamEventType + TaskID string + Text string + ThreadID string + TokensIn int + TokensOut int + ToolInput string + ToolName string + ToolOutput string + TurnNum int + Workspace string + type TaskStreamEventType string + const TaskStreamError + const TaskStreamStatus + const TaskStreamText + const TaskStreamToolResult + const TaskStreamToolUse + const TaskStreamTurnEnd + const TaskStreamTurnStart + type TelemetryEvent struct + Cost float64 + DurationSec int + InstanceID string + PID int + Status string + TokensIn int + TokensOut int + Turns int + type ThreadStateEvent struct + LastSeq int + Status string + ThreadID string + UpdatedAt int64