<?php

declare(strict_types=1);

namespace Drupal\flowdrop_session\DTO;

/**
 * Options for the chat-turn verb.
 *
 * Consumed by executeTurn() on
 * {@see \Drupal\flowdrop_session\Service\SessionTurnServiceInterface}.
 *
 * - wait   — block until the pipeline reaches a stop and return the final
 *            turn status. PHP callers only (drush, tests, queue workers);
 *            HTTP callers must not wait — the session turn events are the
 *            completion signal. Same caveat as LaunchOptions::wait.
 * - inputs — extra named workflow inputs merged with the message. Resolved
 *            through the workflow's declared input ports (same path as
 *            message metadata inputs).
 */
final class TurnOptions {

  /**
   * Constructs turn options.
   *
   * @param bool $wait
   *   Whether to process the turn inline and wait for a stop.
   * @param array<string, mixed> $inputs
   *   Additional named workflow inputs.
   */
  public function __construct(
    public readonly bool $wait = FALSE,
    public readonly array $inputs = [],
  ) {}

}
