sig
  type failure_reason
  type progress = [ `Changed_state | `No_change ]
  type 'a transition_callback =
      ?log:string -> '-> Ketrew_target.t * Ketrew_target.Automaton.progress
  type severity = [ `Fatal | `Try_again ]
  type bookkeeping = { plugin_name : string; run_parameters : string; }
  type long_running_failure =
      Ketrew_target.Automaton.severity * string *
      Ketrew_target.Automaton.bookkeeping
  type long_running_action =
      (Ketrew_target.Automaton.bookkeeping,
       Ketrew_target.Automaton.long_running_failure)
      Pvem.Result.t
  type process_check =
      [ `Still_running of Ketrew_target.Automaton.bookkeeping
      | `Successful of Ketrew_target.Automaton.bookkeeping ]
  type process_status_check =
      (Ketrew_target.Automaton.process_check,
       Ketrew_target.Automaton.long_running_failure)
      Pvem.Result.t
  type condition_evaluation =
      (bool, Ketrew_target.Automaton.severity * string) Pvem.Result.t
  type dependencies_status =
      [ `All_succeeded
      | `At_least_one_failed of Ketrew_target.id list
      | `Still_processing ]
  type transition =
      [ `Activate of
          Ketrew_target.id list *
          unit Ketrew_target.Automaton.transition_callback
      | `Check_and_activate_dependencies of
          Ketrew_target.Automaton.dependencies_status
          Ketrew_target.Automaton.transition_callback
      | `Check_process of
          Ketrew_target.Automaton.bookkeeping *
          Ketrew_target.Automaton.process_status_check
          Ketrew_target.Automaton.transition_callback
      | `Do_nothing of unit Ketrew_target.Automaton.transition_callback
      | `Eval_condition of
          Ketrew_target.Condition.t *
          Ketrew_target.Automaton.condition_evaluation
          Ketrew_target.Automaton.transition_callback
      | `Kill of
          Ketrew_target.Automaton.bookkeeping *
          Ketrew_target.Automaton.long_running_action
          Ketrew_target.Automaton.transition_callback
      | `Start_running of
          Ketrew_target.Automaton.bookkeeping *
          Ketrew_target.Automaton.long_running_action
          Ketrew_target.Automaton.transition_callback ]
  val transition : Ketrew_target.t -> Ketrew_target.Automaton.transition
end