Documentation
¶
Index ¶
- Constants
- Variables
- 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
- type 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
- type StreamTarget
- type TargetEventResolver
Constants ¶
View Source
const MaxMatrixEventBodyBytes = 60000
Variables ¶
Functions ¶
func BuildConvertedEdit ¶
func BuildConvertedEdit(content *event.MessageEventContent, topLevelExtra map[string]any) *bridgev2.ConvertedEdit
BuildConvertedEdit wraps a message content payload into a single-part Matrix edit.
func EnsureDontRenderEdited ¶
func EnsureDontRenderEdited(edit *bridgev2.ConvertedEdit)
EnsureDontRenderEdited marks every edit part so clients can suppress "edited" UI chrome.
func ResolveTargetEventIDFromDB ¶
func ResolveTargetEventIDFromDB( ctx context.Context, bridge *bridgev2.Bridge, receiver networkid.UserLoginID, target StreamTarget, ) (id.EventID, error)
Types ¶
type StreamSession ¶
type StreamSession struct {
// contains filtered or unexported fields
}
func NewStreamSession ¶
func NewStreamSession(params StreamSessionParams) *StreamSession
func (*StreamSession) Descriptor ¶
func (s *StreamSession) Descriptor(ctx context.Context) (*event.BeeperStreamInfo, error)
func (*StreamSession) EmitPart ¶
func (s *StreamSession) EmitPart(ctx context.Context, part map[string]any)
func (*StreamSession) EnsureStarted ¶
func (s *StreamSession) EnsureStarted(ctx context.Context) (bool, error)
func (*StreamSession) FlushPending ¶
func (s *StreamSession) FlushPending(ctx context.Context) error
func (*StreamSession) IsClosed ¶
func (s *StreamSession) IsClosed() bool
type StreamSessionParams ¶
type StreamSessionParams struct {
TurnID string
AgentID string
GetStreamTarget func() StreamTarget
ResolveTargetEventID TargetEventResolver
GetTargetEventID func() id.EventID
GetRoomID func() id.RoomID
GetSuppressSend func() bool
GetStreamType func() string
NextSeq func() int
GetStreamPublisher func(ctx context.Context) (bridgev2.BeeperStreamPublisher, bool)
ClearTurnGate func()
SendHook func(turnID string, seq int, content map[string]any, txnID string) bool
Logger *zerolog.Logger
}
type StreamTarget ¶
StreamTarget identifies a bridgev2 message target using bridge-side message identity. Matrix event IDs are resolved from bridge DB rows when needed for Matrix-native relations.
func (StreamTarget) HasEditTarget ¶
func (t StreamTarget) HasEditTarget() bool
type TargetEventResolver ¶
Click to show internal directories.
Click to hide internal directories.