processor

package
v0.117.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package processor manages the prompt execution lifecycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirtyFileChecker added in v0.96.0

type DirtyFileChecker interface {
	CountDirtyFiles(ctx context.Context) (int, error)
}

DirtyFileChecker counts dirty files in a git working tree.

func NewDirtyFileChecker added in v0.96.0

func NewDirtyFileChecker(repoDir string) DirtyFileChecker

NewDirtyFileChecker creates a DirtyFileChecker that runs git status on the host.

type GitLockChecker added in v0.102.0

type GitLockChecker interface {
	Exists() bool
}

GitLockChecker checks whether .git/index.lock exists in the working tree.

func NewGitLockChecker added in v0.102.0

func NewGitLockChecker(repoDir string) GitLockChecker

NewGitLockChecker creates a GitLockChecker for the given repo directory.

type Processor

type Processor interface {
	Process(ctx context.Context) error
	ProcessQueue(ctx context.Context) error
	// ResumeExecuting resumes any prompts still in "executing" state on startup.
	// Called once by the runner before the normal event loop begins.
	// For each executing prompt, it reattaches to the running container and drives
	// the prompt to completion through the normal post-execution flow.
	ResumeExecuting(ctx context.Context) error
}

Processor processes queued prompts.

func NewProcessor

func NewProcessor(
	queueDir string,
	completedDir string,
	logDir string,
	projectName string,
	exec executor.Executor,
	promptManager prompt.Manager,
	releaser git.Releaser,
	versionGetter version.Getter,
	ready <-chan struct{},
	pr bool,
	workflow config.Workflow,
	brancher git.Brancher,
	prCreator git.PRCreator,
	cloner git.Cloner,
	worktreer git.Worktreer,
	prMerger git.PRMerger,
	autoMerge bool,
	autoRelease bool,
	autoReview bool,
	autoCompleter spec.AutoCompleter,
	specLister spec.Lister,
	validationCommand string,
	validationPrompt string,
	testCommand string,
	verificationGate bool,
	n notifier.Notifier,
	containerCounter executor.ContainerCounter,
	maxContainers int,
	additionalInstructions string,
	containerLock containerlock.ContainerLock,
	containerChecker executor.ContainerChecker,
	dirtyFileThreshold int,
	dirtyFileChecker DirtyFileChecker,
	gitLockChecker GitLockChecker,
	autoRetryLimit int,
	maxPromptDuration time.Duration,
) Processor

NewProcessor creates a new Processor.

Jump to

Keyboard shortcuts

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