Protocol defining CRUD interface for CompressionStore backends.
# Source: https://github.com/headroomlabs-ai/headroom | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Base protocol for CompressionStore backends.
This protocol defines the minimal interface that storage backends must implement.
The interface is intentionally simple - it only handles CRUD operations on entries.
Higher-level concerns (search, feedback, eviction policies) are handled by CompressionStore.
"""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
if TYPE_CHECKING:
from ..compression_store import CompressionEntry
@runtime_checkable
class CompressionStoreBackend(Protocol):
"""Protocol for CompressionStore s
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key