"""Shared API response helpers.""" from __future__ import annotations from typing import Any def envelope(data: Any, *, success: bool = True, error: str | None = None) -> dict: """Wrap API response data in a standard envelope format.""" return {"success": success, "data": data, "error": error}