bee

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 15 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
)
View Source
const DefaultPersona = `` /* 306-byte string literal not displayed */

DefaultPersona is the hardcoded bee persona content for CLAUDE.md.

Variables

This section is empty.

Functions

func WriteCLAUDEMD

func WriteCLAUDEMD(workDir, persona string) error

WriteCLAUDEMD creates the CLAUDE.md file in workDir with persona content only if it does not already exist. This preserves any user edits.

Types

type BeeProcess

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

BeeProcess represents a single short-lived bee Claude invocation.

func NewBeeProcess

func NewBeeProcess(cfg config.BeeConfig) *BeeProcess

NewBeeProcess creates a BeeProcess.

func (*BeeProcess) Run

func (p *BeeProcess) Run(ctx context.Context, workDir, prompt, sessionID string, resume bool) (*claude.Process, <-chan claude.Output, error)

Run spawns the bee process with the given prompt and returns a Process handle and output channel. If sessionID is non-empty and resume is true, passes --resume <sessionID>. If sessionID is non-empty and resume is false, passes --session-id <sessionID>.

type BeeRunner

type BeeRunner interface {
	Run(ctx context.Context, workDir, prompt, sessionID string, resume bool) (*claude.Process, <-chan claude.Output, error)
}

BeeRunner abstracts the bee process invocation (real or test double).

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 BeeRunner, workDir string, cfg config.BeeConfig) *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. Must be called synchronously at startup BEFORE TaskScheduler.RecoverRunning.

func (*Feeder) Run

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

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

Jump to

Keyboard shortcuts

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