Documentation
¶
Index ¶
- Variables
- func ContextWithInbox(ctx context.Context, ib Inbox) context.Context
- type Attachment
- type Buffered
- func (b *Buffered) ActiveProducers() int
- func (b *Buffered) Close()
- func (b *Buffered) Closed() bool
- func (b *Buffered) Drain() []Message
- func (b *Buffered) Len() int
- func (b *Buffered) Push(msg Message) error
- func (b *Buffered) RegisterProducer(name string) *ProducerHandle
- func (b *Buffered) Wait(ctx context.Context) bool
- type Expander
- type Inbox
- type Message
- type Origin
- type Priority
- type ProducerHandle
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInboxClosed = errors.New("inbox closed") ErrInboxFull = errors.New("inbox full") )
Functions ¶
Types ¶
type Attachment ¶
type Buffered ¶
type Buffered struct {
// contains filtered or unexported fields
}
func NewBuffered ¶
func (*Buffered) ActiveProducers ¶
func (*Buffered) RegisterProducer ¶
func (b *Buffered) RegisterProducer(name string) *ProducerHandle
type Expander ¶
type Inbox ¶
type Inbox interface {
Push(msg Message) error
Drain() []Message
Close()
Closed() bool
Len() int
Wait(ctx context.Context) bool
RegisterProducer(name string) *ProducerHandle
ActiveProducers() int
}
func FromContext ¶
FromContext returns the session inbox attached to ctx, if any.
type Message ¶
type Message struct {
Message *aop.Message
Origin Origin
Priority Priority
Attachments []Attachment
Meta map[string]any
CreatedAt time.Time
}
func NewMessage ¶
func NewSystemMessage ¶
func NewUserMessage ¶
func (Message) ToMessages ¶
ToMessages converts an inbox Message to LLM-bound aop messages. User-origin messages with no attachments pass through unchanged. All other origins get a metadata envelope so the LLM knows the source.
func (Message) WithPriority ¶
type ProducerHandle ¶
type ProducerHandle struct {
// contains filtered or unexported fields
}
func (*ProducerHandle) Done ¶
func (h *ProducerHandle) Done()
Click to show internal directories.
Click to hide internal directories.