import { StreamSubmitOptions } from "./types.cjs";

//#region src/stream/submit-coordinator.d.ts
/**
 * Queued submission entry mirrored from the server-side run queue.
 *
 * Surfaces the deferred submission to UI consumers via
 * {@link StreamController.queueStore}.
 */
interface SubmissionQueueEntry<StateType extends object = Record<string, unknown>> {
  /** Stable id minted on enqueue (uuidv7 — sortable by creation time). */
  readonly id: string;
  /** Original submit input, narrowed to the partial state shape. */
  readonly values: Partial<StateType> | null | undefined;
  /** Original submit options, minus the strategy slot which is reset on drain. */
  readonly options?: StreamSubmitOptions<StateType>;
  /** Wall-clock timestamp at enqueue. */
  readonly createdAt: Date;
}
/**
 * Read-only snapshot of the queue. The queue store hands this out
 * directly; consumers must not mutate the array.
 */
type SubmissionQueueSnapshot<StateType extends object = Record<string, unknown>> = ReadonlyArray<SubmissionQueueEntry<StateType>>;
//#endregion
export { SubmissionQueueEntry, SubmissionQueueSnapshot };
//# sourceMappingURL=submit-coordinator.d.cts.map