Expand description
The one place that maps a run’s derived state to the verb that continues
it. Both the CLI’s resume command and the server’s resume endpoint call
classify, so the two surfaces cannot drift on what a given state means.
The mapping is exactly this continuation rule:
- a parked run (suspended, or budget-exceeded) resumes with input;
- a crashed run (running, or interrupted mid model or tool step) recovers with no input;
- a run that needs reconciliation is refused, and its recorded write intent is the evidence a human resolves it with;
- a finished run (completed, failed, or operator-abandoned) is reported and left alone;
- an empty log is not a run at all.
This module holds only the decision, not the effect: it does no IO, drives
nothing, and prints nothing. The caller acts on the Disposition in the
way its surface calls for (an exit code and a report for the CLI, an HTTP
status and a JSON body for the server).
Enums§
- Disposition
- What to do with a run, decided from its derived state alone.
- Resume
Kind - Whether a resume should validate and expect an input, or run with none.
Functions§
- classify
- Maps a derived
RunStateto itsDisposition.