failurehandler

package
v0.199.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: BSD-2-Clause Imports: 9 Imported by: 1 module, 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 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,
	reportParser report.Parser,
) 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