bee

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// PollInterval is the fixed tick rate for both the Feeder and TaskScheduler.
	PollInterval = 500 * time.Millisecond

	// QueueWarnThreshold is the number of unprocessed messages that triggers a warning.
	QueueWarnThreshold = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeeProcess

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

BeeProcess wraps an EngineAdapter and injects a short-lived auth token into each Run call.

func NewBeeProcess

func NewBeeProcess(cfg config.BeeConfig, engine ai.EngineAdapter, envSvc *env.Service, sysStore sysConfigReader, engineCfg *enginecfg.Store) *BeeProcess

func (*BeeProcess) CollectTokenUsage added in v0.0.32

func (b *BeeProcess) CollectTokenUsage(ctx context.Context, sessionID string) ([]ai.TokenUsage, error)

func (*BeeProcess) Prepare added in v0.0.21

func (p *BeeProcess) Prepare(workDir string, opts ai.PrepareOptions) error

func (*BeeProcess) Run

func (p *BeeProcess) Run(ctx context.Context, workDir, prompt string, opts ai.RunOptions, logPath string) (ai.RunResult, error)

Run injects a bee auth token then delegates to the engine.

type FailureNotifier

type FailureNotifier interface {
	NotifyTaskFailure(ctx context.Context, target delivery.Target, info model.FailureInfo) error
}

FailureNotifier sends a notification to the user when a message is permanently failed.

type Feeder

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

Feeder polls platform_messages for unprocessed messages and feeds them to bee.

func NewFeeder

func NewFeeder(ms *store.MessageStore, ts *store.TaskStore, ss *store.SessionStore, es *store.ExecutionStore, runner ai.EngineAdapter, workDir string, cfg config.BeeConfig, engineCfg *enginecfg.Store, opts ...Option) *Feeder

NewFeeder creates a Feeder.

func (*Feeder) RecoverFeeding

func (f *Feeder) RecoverFeeding(ctx context.Context)

RecoverFeeding resets any messages stuck in 'feeding' status back to 'received' and deletes their associated pending tasks.

func (*Feeder) Run

func (f *Feeder) Run(ctx context.Context)

Run polls for unprocessed messages on each tick. Call in a goroutine.

func (*Feeder) StopSession added in v0.0.31

func (f *Feeder) StopSession(sessionKey string) bool

type Option

type Option func(*Feeder)

Option configures a Feeder.

func WithFailureNotifier

func WithFailureNotifier(n FailureNotifier) Option

WithFailureNotifier sets the notifier used to inform users when a message fails.

func WithWorkerDispatch added in v0.0.20

func WithWorkerDispatch(lookup *store.WorkerStore) Option

WithWorkerDispatch enables direct dispatch via "@workerName" or " workerName" prefix.

Jump to

Keyboard shortcuts

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