bridge

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReconnectBaseDelay = 500 * time.Millisecond
	DefaultReconnectMaxDelay  = 15 * time.Second
)

Variables

This section is empty.

Functions

func ActorAddress

func ActorAddress(networkID string, actor protocol.Actor) string

func ChatID

func ChatID(networkID string, target protocol.Target, fallbackMessageID ...string) string

func DisplayName

func DisplayName(agent bridgeconfig.AgentConfig) string

func ParseMentions

func ParseMentions(text string) []string

func RenderCompactBootstrapMessage

func RenderCompactBootstrapMessage(networkID string, target protocol.Target, includeSessionHeader bool) string

func RenderCompactInboundMessage

func RenderCompactInboundMessage(
	networkID string,
	message *protocol.Message,
	includeSessionHeader bool,
) string

func RenderDataPart

func RenderDataPart(data map[string]any) (string, bool)

func RenderInboundText

func RenderInboundText(message *protocol.Message) string

func RenderMessageBody

func RenderMessageBody(message *protocol.Message) string

func SenderName

func SenderName(actor protocol.Actor) string

func ShouldBootstrap added in v0.1.13

func ShouldBootstrap(mode bridgeconfig.WakeConfig) bool

func ShouldWake added in v0.1.13

func ShouldWake(mode bridgeconfig.WakeConfig, target protocol.Target, mentions []string, agent bridgeconfig.AgentConfig) bool

func ShouldWakeDirect added in v0.1.13

func ShouldWakeDirect(mode bridgeconfig.WakeConfig) bool

func ShouldWakeDirectMessage added in v0.1.14

func ShouldWakeDirectMessage(
	config *bridgeconfig.DMConfig,
	networkID string,
	agent bridgeconfig.AgentConfig,
	message *protocol.Message,
) bool

ShouldWakeDirectMessage applies the shared direct-message admission policy used by every bridge adapter. An empty sender allowlist preserves ordinary social DM behavior. A configured allowlist switches to the stricter control boundary: the server must have bound the sender to its credential and the authoritative event topology must be exactly {sender,self} on this network.

func ShouldWakeForNetwork added in v0.1.13

func ShouldWakeForNetwork(
	mode bridgeconfig.WakeConfig,
	target protocol.Target,
	mentions []string,
	networkID string,
	agent bridgeconfig.AgentConfig,
) bool

func TargetPrefix

func TargetPrefix(target protocol.Target, sender string) string

Types

type Backoff

type Backoff struct {
	// contains filtered or unexported fields
}

func NewBackoff

func NewBackoff(base time.Duration, max time.Duration) *Backoff

func (*Backoff) Delay

func (b *Backoff) Delay(attempt int) time.Duration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL