promptresumer

package
v0.135.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FailureNotifier

type FailureNotifier interface {
	NotifyFromReport(ctx context.Context, logFile string, promptPath string)
}

FailureNotifier is the subset of failurehandler.Handler used by Resumer.

type PromptManager

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

PromptManager is the subset of prompt.Manager used by Resumer.

type Resumer

type Resumer interface {
	ResumeAll(ctx context.Context) error
}

Resumer reattaches to and drives executing prompts to completion. Used once at daemon startup before the event loop.

func NewResumer

func NewResumer(
	promptManager PromptManager,
	exec executor.Executor,
	workflowExecutor WorkflowExecutor,
	completionReportValidator completionreport.Validator,
	failureNotifier FailureNotifier,
	queueDir string,
	completedDir string,
	logDir string,
	projectName string,
	maxPromptDuration time.Duration,
) Resumer

NewResumer creates a Resumer that reattaches to executing prompts on daemon startup.

type WorkflowExecutor

type WorkflowExecutor interface {
	ReconstructState(ctx context.Context, baseName string, pf *prompt.PromptFile) (bool, error)
	Complete(
		gitCtx context.Context,
		ctx context.Context,
		pf *prompt.PromptFile,
		title, promptPath, completedPath string,
	) error
}

WorkflowExecutor is the subset of processor.WorkflowExecutor used by Resumer. Uses plain string for baseName to avoid importing pkg/processor and creating a cycle. Go interface satisfaction is structural: wrap processor.WorkflowExecutor in an adapter at the factory boundary.

Jump to

Keyboard shortcuts

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