Initial project structure
Scaffold all modules, route stubs, data models, and config. No logic implemented yet — all core methods raise NotImplementedError. Establishes the full directory layout matching the architecture in CLAUDE.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
34
fellowship/store/memory_store.py
Normal file
34
fellowship/store/memory_store.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""
|
||||
Memory store — SQLite-backed persistence for cross-session memory.
|
||||
Only active when a session is created with memory: new or memory: inherit:<token>.
|
||||
"""
|
||||
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
import aiosqlite
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
DB_PATH = "fellowship_memory.db"
|
||||
|
||||
|
||||
class MemoryStore:
|
||||
def __init__(self, db_path: str = DB_PATH) -> None:
|
||||
self.db_path = db_path
|
||||
|
||||
async def init(self) -> None:
|
||||
"""Create tables if they don't exist. Call once at startup."""
|
||||
raise NotImplementedError
|
||||
|
||||
async def save(self, session_token: str, memory: str) -> None:
|
||||
"""Persist a memory string for the given session token."""
|
||||
raise NotImplementedError
|
||||
|
||||
async def load(self, session_token: str) -> Optional[str]:
|
||||
"""Load the stored memory for the given session token, or None if absent."""
|
||||
raise NotImplementedError
|
||||
|
||||
async def delete(self, session_token: str) -> None:
|
||||
"""Delete memory for a session."""
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user