orchestration

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SpinnerFrames = []string{"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"}

SpinnerFrames for animated waiting display

Functions

func CountReviewIterations

func CountReviewIterations(ctx context.Context, database *db.DB, workID string) int

CountReviewIterations counts how many review iterations have been done for a work.

func ResetStuckProcessingTasks

func ResetStuckProcessingTasks(ctx context.Context, proj *project.Project, workID string) error

ResetStuckProcessingTasks resets any processing tasks back to pending. This is called when the orchestrator starts and finds tasks that were marked as processing from a previous run. When the orchestrator is killed while a task is running - the Claude process is also killed, but the task remains marked as processing in the database.

This function preserves partial bead progress by checking the actual bead status in beads.jsonl before resetting. Beads that are already closed are marked as completed in the task, not reset to pending.

func ResetTaskBeadsWithProgress

func ResetTaskBeadsWithProgress(ctx context.Context, proj *project.Project, taskID, workID string) (int, int, error)

ResetTaskBeadsWithProgress resets task bead statuses while preserving progress. It checks the actual bead status in beads.jsonl and only resets beads that are not already closed. Returns (preserved count, reset count, error). Also logs recovery events for audit trail.

func SpinnerWait

func SpinnerWait(msg string, duration time.Duration)

SpinnerWait displays an animated spinner with a message for the specified duration. The spinner updates every 100ms to create a smooth animation effect. Does not print a newline so the spinner can continue on the same line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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