thread

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package thread collects and aggregates messages across agent mailboxes by thread ID. It scans inbox and outbox directories, deduplicates by message ID, and returns entries sorted by timestamp.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	ID       string    `json:"id"`
	From     string    `json:"from"`
	To       []string  `json:"to"`
	Thread   string    `json:"thread"`
	Subject  string    `json:"subject"`
	Created  string    `json:"created"`
	Body     string    `json:"body,omitempty"`
	Priority string    `json:"priority,omitempty"`
	Kind     string    `json:"kind,omitempty"`
	Labels   []string  `json:"labels,omitempty"`
	RawTime  time.Time `json:"-"`
}

Entry is a thread message entry.

func Collect

func Collect(root, threadID string, agents []string, includeBody bool, onError func(path string, err error) error) ([]Entry, error)

Collect scans agent mailboxes and returns messages for a thread. onError is called when a message cannot be parsed; returning a non-nil error aborts the scan.

func (Entry) GetCreated added in v0.9.1

func (e Entry) GetCreated() string

func (Entry) GetID added in v0.9.1

func (e Entry) GetID() string

func (Entry) GetRawTime added in v0.9.1

func (e Entry) GetRawTime() time.Time

Jump to

Keyboard shortcuts

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