<?php

declare(strict_types=1);

namespace Drupal\flowdrop_interrupt\Enum;

/**
 * Direction of an interrupt relative to a pipeline.
 *
 * - **Outward**: created by a node inside a running pipeline asking for
 *   external resolution (HITL prompt, async sub-workflow completion, OAuth
 *   callback, etc.). The interrupt "belongs to" the pipeline and its
 *   `pipeline_id` is the owning pipeline.
 *
 * - **Inward**: created by an external party (API caller, watchdog,
 *   operator) targeting a pipeline. The interrupt does NOT belong to the
 *   pipeline; it acts on it. `target_pipeline_id` (added in a later phase)
 *   identifies the affected pipeline. Used for Cancel and Pause signals.
 *
 * Outward and inward interrupts are filtered separately in the inbox and
 * in orchestrator polling.
 *
 * @api
 */
enum InterruptDirection: string {

  case Outward = 'outward';
  case Inward = 'inward';

}
