Documentation
¶
Overview ¶
Package runner orchestrates the main dark-factory event loop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OneShotRunner ¶ added in v0.31.0
OneShotRunner processes all queued prompts and exits cleanly.
func NewOneShotRunner ¶ added in v0.31.0
func NewOneShotRunner( inboxDir string, inProgressDir string, completedDir string, logDir string, specsInboxDir string, specsInProgressDir string, specsCompletedDir string, specsLogDir string, promptManager PromptManager, locker lock.Locker, proc processor.Processor, specGen generator.SpecGenerator, currentDateTimeGetter libtime.CurrentDateTimeGetter, containerChecker executor.ContainerChecker, autoApprove bool, slugMigrator slugmigrator.Migrator, mover prompt.FileMover, startupLogger func(), ) OneShotRunner
NewOneShotRunner creates a new OneShotRunner. startupLogger is an optional func called after lock acquisition to emit the effective-config log line. Pass nil to skip the startup log.
type PromptManager ¶ added in v0.119.2
type PromptManager interface {
NormalizeFilenames(ctx context.Context, dir string) ([]prompt.Rename, error)
Load(ctx context.Context, path string) (*prompt.PromptFile, error)
ListQueued(ctx context.Context) ([]prompt.Prompt, error)
}
PromptManager is the subset of prompt.Manager that the runner package uses.
type Runner ¶
Runner orchestrates the main processing loop.
func NewRunner ¶
func NewRunner( inboxDir string, inProgressDir string, completedDir string, logDir string, specsInboxDir string, specsInProgressDir string, specsCompletedDir string, specsLogDir string, promptManager PromptManager, locker lock.Locker, watcher watcher.Watcher, processor processor.Processor, server server.Server, reviewPoller review.ReviewPoller, specWatcher specwatcher.SpecWatcher, projectName project.Name, containerChecker executor.ContainerChecker, n notifier.Notifier, slugMigrator slugmigrator.Migrator, currentDateTimeGetter libtime.CurrentDateTimeGetter, mover prompt.FileMover, maxPromptDuration time.Duration, containerStopper executor.ContainerStopper, startupLogger func(), hideGit bool, logWriter io.Writer, ) Runner
NewRunner creates a new Runner. startupLogger is an optional func called after lock acquisition to emit the effective-config log line. Pass nil to skip the startup log.
type StartupDeps ¶ added in v0.119.7
type StartupDeps struct {
InboxDir string
InProgressDir string
CompletedDir string
LogDir string
SpecsInboxDir string
SpecsInProgressDir string
SpecsCompletedDir string
SpecsLogDir string
PromptManager PromptManager
ContainerChecker executor.ContainerChecker
Notifier notifier.Notifier // may be nil (oneshot passes nil)
ProjectName string // may be empty (oneshot passes "")
SlugMigrator slugmigrator.Migrator
Mover prompt.FileMover
CurrentDateTimeGetter libtime.CurrentDateTimeGetter
}
StartupDeps carries every dependency the shared startup sequence needs. Both Runner and OneShotRunner populate this struct from their own fields before calling startupSequence.