Versions in this module Expand all Collapse all v0 v0.1.0 Mar 30, 2026 Changes in this version + type Bridge struct + func New(storagePath string, runID int) *Bridge + func (b *Bridge) Close() error + func (b *Bridge) Drain(ctx context.Context, target string, seenIDs map[string]bool) ([]*Message, error) + func (b *Bridge) DrainNew(ctx context.Context, target string, sinceID string) ([]*Message, error) + func (b *Bridge) GetByID(id string) (*Message, error) + func (b *Bridge) Open() error + func (b *Bridge) Send(ctx context.Context, msg *Message) (bool, error) + func (b *Bridge) SetLogger(log *slog.Logger) + func (b *Bridge) Status() *Status + type Message struct + Content string + From string + ID string + Iteration int + Metadata map[string]any + RunID int + Signal Signal + Timestamp time.Time + To string + Type MessageType + func NewMessage(msgType MessageType, from, to, content string) *Message + func NewResultMessage(from, to, result string) *Message + func NewReviewMessage(from, to, review string) *Message + func NewSignalMessage(from string, signal Signal, content string) *Message + func NewTaskMessage(from, to, task string) *Message + func (m *Message) IsDoneSignal() bool + func (m *Message) IsFailSignal() bool + func (m *Message) IsForAgent(agent string) bool + func (m *Message) IsPassSignal() bool + func (m *Message) WithMetadata(key string, value any) *Message + func (m *Message) WithRunInfo(runID, iteration int) *Message + type MessageType string + const TypeChat + const TypeResult + const TypeReview + const TypeSignal + const TypeTask + type Server struct + func NewServer(bridge *Bridge) *Server + func (s *Server) Addr() string + func (s *Server) Close() error + func (s *Server) ListenAndServe(ctx context.Context, addr string) error + func (s *Server) ServeIO(ctx context.Context, r io.Reader, w io.Writer) error + func (s *Server) ServeStdio(ctx context.Context) error + type Signal string + const SignalDone + const SignalFail + const SignalPass + type Status struct + ByAgent map[string]int + ByType map[MessageType]int + FailCount int + HasDoneSignal bool + PassCount int + TotalMessages int + func (s *Status) String() string + type Storage struct + func NewStorage(path string) *Storage + func (s *Storage) Append(msg *Message) error + func (s *Storage) Close() error + func (s *Storage) Exists() bool + func (s *Storage) Open() error + func (s *Storage) Path() string + func (s *Storage) ReadAll() ([]*Message, error) + func (s *Storage) ReadFiltered(filter func(*Message) bool) ([]*Message, error)