"""Route one normalized worker-dispatch request through its host port."""
from __future__ import annotations

from ..ports.worker_dispatch import (
    WorkerDispatchPlan,
    WorkerDispatchPort,
    WorkerDispatchRequest,
)


def dispatch_assignments(
    request: WorkerDispatchRequest,
    port: WorkerDispatchPort,
) -> WorkerDispatchPlan:
    return port.build_plan(request)
