worker

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 16 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveLogRegistry added in v0.0.5

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

ActiveLogRegistry manages live log buffers for all running executions. Both Manager (worker executions) and Feeder (bee executions) write to it. It is safe for concurrent use by multiple goroutines.

func NewActiveLogRegistry added in v0.0.5

func NewActiveLogRegistry() *ActiveLogRegistry

NewActiveLogRegistry returns an empty registry.

func (*ActiveLogRegistry) Get added in v0.0.5

func (r *ActiveLogRegistry) Get(id string) (string, bool)

Get returns the current accumulated content for id. Returns ("", false) if no active buffer exists for that id.

func (*ActiveLogRegistry) Register added in v0.0.5

func (r *ActiveLogRegistry) Register(id string) func(line string)

Register creates a new log buffer for the given execution ID and returns a function that callers use to append lines. If id is already registered (a bug), Register logs a warning and returns a no-op function — it does NOT panic.

func (*ActiveLogRegistry) Unregister added in v0.0.5

func (r *ActiveLogRegistry) Unregister(id string)

Unregister removes the log buffer for id. Safe to call even if id is absent.

type Manager

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

func NewManager

func NewManager(
	workerBaseDir string,
	bc config.BeeConfig,
	ws *store.WorkerStore,
	es *store.ExecutionStore,
	logRegistry *ActiveLogRegistry,
) *Manager

func (*Manager) CreateWorker

func (m *Manager) CreateWorker(
	name, description, memory string,
	workDir string,
) (model.Worker, error)

func (*Manager) DeleteWorker

func (m *Manager) DeleteWorker(id string, deleteWorkDir bool) error

func (*Manager) ExecuteWorker

func (m *Manager) ExecuteWorker(ctx context.Context, workerID, triggerInput, sessionID string) (model.WorkerExecution, error)

ExecuteWorker runs a worker. When sessionID is non-empty, it resumes the existing Claude session (resume=true); otherwise it starts a fresh session.

func (*Manager) StopExecution

func (m *Manager) StopExecution(executionID string) error

Jump to

Keyboard shortcuts

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