failurehandler

package
v0.137.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	// Handle is called when processPrompt returns an error.
	// If the context is cancelled it returns an error to propagate shutdown.
	// If the prompt was already moved to completed/ (post-execution failure) it returns an error to stop the daemon.
	// Otherwise it retries or marks the prompt failed and returns nil so the loop continues.
	Handle(ctx context.Context, promptPath string, err error) error
	// NotifyFromReport checks the completion report in logFile and fires a partial notification
	// if the report status is "partial".
	NotifyFromReport(ctx context.Context, logFile string, promptPath string)
}

Handler handles prompt-failure scenarios: deciding whether to retry or permanently fail a prompt.

func NewHandler

func NewHandler(
	promptManager PromptManager,
	n notifier.Notifier,
	completedDir string,
	projectName project.Name,
	autoRetryLimit int,
) Handler

NewHandler creates a new Handler.

type PromptManager

type PromptManager interface {
	Load(ctx context.Context, path string) (*prompt.PromptFile, error)
}

PromptManager is the subset of prompt.Manager used by the failure handler.

Jump to

Keyboard shortcuts

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