Here's the refactored package structure with clean separation of concerns, proper type hints, and a focused public API.

### 📁 `queue/__init__.py`
```python
"""Public API for the queue package."""
from .core import Job, JobQueue
from .priority import PriorityQueue
from .retry import process_with_retry

# Restricted public API as requested
__all__ = ["Job", "JobQueue"]
```

### 📁 `queue/core.py`
```python
"""Core data model and basic FIFO queue operations."""
import time
from dataclasses import dataclass, field
from typing import Any, Iterator, Optional


@dataclass
class Job:
    """Represents a unit of work to be processed."""
    id: str
    payload: Any
    priority: int = 5
    status: str = "pending"
    attempts: int = 0
    max_retries: int = 3
    created_at: float = field(default_factory=time.time)


class JobQueue:
    """Basic FIFO queue for Job instances."""
    
    def __init__(self) -> None:
        self._jobs: list[Job] = []

    def add(self, job: Job) -> None:
        """Add a job to the end of the queue."""
        self._jobs.append(job)

    def pop(self) -> Optional[Job]:
        """Remove and return the next job, or None if empty."""
        if not self._jobs:
            return None
        return self._jobs.pop(0)

    def __len__(self) -> int:
        return len(self._jobs)

    def __iter__(self) -> Iterator[Job]:
        return iter(self._jobs)
```

### 📁 `queue/priority.py`
```python
"""Priority queue implementation using a binary heap."""
import heapq
from typing import Optional

from .core import Job


class PriorityQueue:
    """Orders jobs by priority (lower number = higher priority)."""
    
    def __init__(self) -> None:
        self._heap: list[tuple[int, int, Job]] = []
        self._counter: int = 0  # Stable sort tie-breaker

    def add(self, job: Job) -> None:
        """Insert a job into the priority queue."""
        heapq.heappush(self._heap, (job.priority, self._counter, job))
        self._counter += 1

    def pop(self) -> Optional[Job]:
        """Remove and return the highest priority job, or None if empty."""
        if not self._heap:
            return None
        _, _, job = heapq.heappop(self._heap)
        return job

    def __len__(self) -> int:
        return len(self._heap)
```

### 📁 `queue/retry.py`
```python
"""Retry logic with exponential backoff."""
import time
from typing import Any, Callable, Optional

from .core import Job


def process_with_retry(
    job: Job,
    func: Callable[[Any], Any],
    max_retries: Optional[int] = None,
    base_delay: float = 1.0,
    max_delay: float = 60.0
) -> Any:
    """
    Execute a function with exponential backoff retry logic.
    
    Args:
        job: The job instance being processed.
        func: Callable that accepts job.payload.
        max_retries: Override job.max_retries.
        base_delay: Initial delay in seconds.
        max_delay: Maximum delay cap in seconds.
        
    Returns:
        The result of the function call.
        
    Raises:
        The last exception raised by func after all retries are exhausted.
    """
    retries = max_retries if max_retries is not None else job.max_retries
    delay = base_delay
    last_exception = None

    for attempt in range(1, retries + 1):
        try:
            result = func(job.payload)
            job.status = "completed"
            return result
        except Exception as e:
            last_exception = e
            job.attempts += 1
            if attempt < retries:
                time.sleep(delay)
                delay = min(delay * 2, max_delay)
            else:
                job.status = "failed"

    raise last_exception
```

### 🔑 Key Improvements
1. **Single Responsibility**: Each module handles exactly one concern (data/model, basic queue, priority ordering, retry logic).
2. **Type Safety**: Full type hints across all files using modern Python typing conventions.
3. **Stable Priority Ordering**: `PriorityQueue` uses a monotonic counter as a tie-breaker so equal-priority jobs maintain insertion order.
4. **Safe Backoff**: `process_with_retry` caps delays with `max_delay`, updates job state atomically, and preserves the original exception for debugging.
5. **Package-Ready**: Relative imports (`from .core import ...`) prevent circular dependency issues and work correctly when installed via `pip install -e .` or distributed.