from sxth_mind.storage.base import BaseStorage
from sxth_mind.schemas import UserMind, ProjectMind, ConversationMemory, Nudge
class MyStorage(BaseStorage):
async def initialize(self) -> None:
"""Initialize the storage (create tables, connections, etc.)."""
pass
async def close(self) -> None:
"""Clean up resources."""
pass
# UserMind operations
async def get_user_mind(self, user_id: str) -> UserMind | None:
...
async def save_user_mind(self, user_mind: UserMind) -> None:
...
async def delete_user_mind(self, user_id: str) -> None:
...
# ProjectMind operations
async def get_project_mind(self, user_id: str, project_id: str) -> ProjectMind | None:
...
async def save_project_mind(self, project_mind: ProjectMind) -> None:
...
async def get_project_minds_for_user(self, user_id: str) -> list[ProjectMind]:
...
async def delete_project_mind(self, user_id: str, project_id: str) -> None:
...
# Memory operations
async def get_memory(self, project_mind_id: str) -> ConversationMemory | None:
...
async def save_memory(self, memory: ConversationMemory) -> None:
...
# Nudge operations
async def get_pending_nudges(self, user_id: str) -> list[Nudge]:
...
async def save_nudge(self, nudge: Nudge) -> None:
...