// Recovery step types and recipe interface — the discriminated union of
// all named steps that can appear in a RecoveryRecipe.
//
// Step runners for each kind live in step-runners.mjs. The engine in
// engine.mjs iterates a recipe's steps array and dispatches each to the
// appropriate runner.
//
// A RecoveryRecipe is an ordered list of steps. Steps execute in order;
// the first failing step short-circuits to a 'failed' outcome.

/**
 * @typedef {{ kind: 'NotifyOperator', message?: string }}                NotifyOperatorStep
 * @typedef {{ kind: 'ResendTrustPrompt' }}                                ResendTrustPromptStep
 * @typedef {{ kind: 'WaitFor', durationMs: number }}                      WaitForStep
 * @typedef {{ kind: 'RestartTransport' }}                                 RestartTransportStep
 * @typedef {{ kind: 'ResendDispatch' }}                                   ResendDispatchStep
 * @typedef {{ kind: 'RestartWorker' }}                                    RestartWorkerStep
 * @typedef {{ kind: 'RestartMcpServer', serverName: string }}             RestartMcpServerStep
 * @typedef {{ kind: 'RetryHandshake', timeoutMs: number }}                RetryHandshakeStep
 * @typedef {{ kind: 'ReadPluginErrors' }}                                 ReadPluginErrorsStep
 * @typedef {{ kind: 'RestartPlugin', pluginName: string }}                RestartPluginStep
 * @typedef {{ kind: 'RebaseBranch' }}                                     RebaseBranchStep
 * @typedef {{ kind: 'CleanBuild' }}                                       CleanBuildStep
 *
 * @typedef {| NotifyOperatorStep
 *           | ResendTrustPromptStep
 *           | WaitForStep
 *           | RestartTransportStep
 *           | ResendDispatchStep
 *           | RestartWorkerStep
 *           | RestartMcpServerStep
 *           | RetryHandshakeStep
 *           | ReadPluginErrorsStep
 *           | RestartPluginStep
 *           | RebaseBranchStep
 *           | CleanBuildStep
 *           } RecoveryStep
 */

/**
 * @typedef {object} RecoveryRecipe
 * @property {string}          scenarioName  — human-readable name of the scenario
 * @property {RecoveryStep[]}  steps         — ordered list of steps to execute
 */

export {};
