threadreadstate

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrThreadRetired = errors.New("thread read state retired")

Functions

This section is empty.

Types

type FlowerSnapshot

type FlowerSnapshot struct {
	ActivityRevision    int64
	LastMessageAtUnixMs int64
	ActivitySignature   string
	WaitingPromptID     string
}

type Record

type Record struct {
	EndpointID                string  `json:"endpoint_id"`
	ScopeID                   string  `json:"scope_id"`
	Surface                   Surface `json:"surface"`
	ThreadID                  string  `json:"thread_id"`
	LastSeenActivityRevision  int64   `json:"last_seen_activity_revision"`
	LastReadMessageAtUnixMs   int64   `json:"last_read_message_at_unix_ms"`
	LastSeenWaitingPromptID   string  `json:"last_seen_waiting_prompt_id"`
	LastReadUpdatedAtUnixS    int64   `json:"last_read_updated_at_unix_s"`
	LastSeenActivitySignature string  `json:"last_seen_activity_signature"`
	UpdatedAtUnixMs           int64   `json:"updated_at_unix_ms"`
}

type Store

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

func Open

func Open(path string) (*Store, error)

func (*Store) AdvanceFlower

func (s *Store) AdvanceFlower(
	ctx context.Context,
	endpointID string,
	userPublicID string,
	threadID string,
	snapshot FlowerSnapshot,
) (Record, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) EnsureFlower

func (s *Store) EnsureFlower(
	ctx context.Context,
	endpointID string,
	userPublicID string,
	snapshots map[string]FlowerSnapshot,
) (map[string]Record, error)

func (*Store) RetireFlowerThreadReadState added in v0.10.0

func (s *Store) RetireFlowerThreadReadState(ctx context.Context, endpointID string, threadID string) error

type Surface

type Surface string
const (
	SurfaceFlower Surface = "flower"
)

Jump to

Keyboard shortcuts

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