```python
def tide_marks(levels: list) -> list:
    """Return the positions of every local peak in the list of water levels.
    
    A local peak is a position whose level is strictly greater than the level
    immediately before it and the level immediately after it. The first and
    last positions are never peaks.
    """
    if not isinstance(levels, list):
        raise ValueError("levels must be a list")
    
    n = len(levels)
    if n < 3:
        return []
    
    peaks = []
    for i in range(1, n - 1):
        if levels[i] > levels[i - 1] and levels[i] > levels[i + 1]:
            peaks.append(i)
    
    return peaks
```