AttemptPlan

org.llm4s.agent.service.AttemptPlan
See theAttemptPlan companion object
@Experimental

What an attempt at a queue entry does to its thread (Stage 5 rule 4, design 4.55), decided after RunQueue.recordAttempt recorded the attempt's RunId and before the attempt touches the thread:

  • Start: none of the entry's runs committed - its input was never admitted, an earlier attempt having died before its first commit - so the attempt admits it: run (or the typed agent's run) for a start, resume for a resume.
  • Recover: the attempt recovers the thread - its entry's admitted run is the thread's latest and incomplete (Running), so a worker died mid-run; or the entry is a queued recover, whose attempts recover the thread until one of them commits (the owner's explicit transfer of the thread's recovery to the queue).
  • Close: the entry's input was admitted and the thread has moved on - its run reached rest, or the thread moved on through a direct recover, which applied the input once - so the attempt closes the entry with outcome, running nothing. That includes an admitted entry (QueueEntry.admitted) whose checkpoints the lookup no longer finds: a direct run's blocked turn retracted them (Commit.retractTurn), so the input must not run again.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Close(outcome: EntryOutcome)
case Recover extends AttemptPlan
case Start extends AttemptPlan