Versions in this module Expand all Collapse all v0 v0.0.3 Mar 26, 2026 v0.0.1 Mar 24, 2026 Changes in this version + const MaxMatrixEventBodyBytes + var ErrClosed = errors.New("stream session closed") + var ErrNoPublisher = errors.New("stream session has no publisher") + var ErrNoRoomID = errors.New("stream session has no room id") + var ErrNoTargetEventID = errors.New("stream session has no target event id") + func BuildConvertedEdit(content *event.MessageEventContent, topLevelExtra map[string]any) *bridgev2.ConvertedEdit + func EnsureDontRenderEdited(edit *bridgev2.ConvertedEdit) + func ResolveTargetEventIDFromDB(ctx context.Context, bridge *bridgev2.Bridge, receiver networkid.UserLoginID, ...) (id.EventID, error) + func SplitAtMarkdownBoundary(text string, maxBytes int) (string, string) + type EndReason string + const EndReasonDisconnect + const EndReasonError + const EndReasonFinish + type StreamSession struct + func NewStreamSession(params StreamSessionParams) *StreamSession + func (s *StreamSession) Descriptor(ctx context.Context) (*event.BeeperStreamInfo, error) + func (s *StreamSession) EmitPart(ctx context.Context, part map[string]any) + func (s *StreamSession) End(ctx context.Context, _ EndReason) + func (s *StreamSession) EnsureStarted(ctx context.Context) (bool, error) + func (s *StreamSession) FlushPending(ctx context.Context) error + func (s *StreamSession) IsClosed() bool + func (s *StreamSession) Start(ctx context.Context, targetEventID id.EventID) error + type StreamSessionParams struct + AgentID string + ClearTurnGate func() + GetRoomID func() id.RoomID + GetStreamPublisher func(ctx context.Context) (bridgev2.BeeperStreamPublisher, bool) + GetStreamTarget func() StreamTarget + GetStreamType func() string + GetSuppressSend func() bool + GetTargetEventID func() id.EventID + Logger *zerolog.Logger + NextSeq func() int + ResolveTargetEventID TargetEventResolver + SendHook func(turnID string, seq int, content map[string]any, txnID string) bool + TurnID string + type StreamTarget struct + NetworkMessageID networkid.MessageID + PartID networkid.PartID + func (t StreamTarget) HasEditTarget() bool + type TargetEventResolver func(ctx context.Context, target StreamTarget) (id.EventID, error)