"""Memory client stub."""

from __future__ import annotations

from typing import Any


class MemoryClient:
    """Stub client for memory integration."""

    def __init__(self, base_url: str) -> None:
        self.base_url = base_url

    async def start_session(self, *, tenant_id: str, user_id: str, session_id: str) -> dict[str, Any]:
        """Load conscious memories for a session."""
        return {"conscious": [{"summary": f"prior context for {user_id}"}]}

    async def auto_retrieve(
        self,
        *,
        tenant_id: str,
        user_id: str,
        session_id: str,
        prompt: str,
    ) -> dict[str, Any]:
        """Retrieve relevant memories for a prompt."""
        del prompt
        return {"snippets": [{"text": f"memory for {tenant_id}/{session_id}"}]}

    async def ingest_interaction(
        self,
        *,
        tenant_id: str,
        user_id: str,
        session_id: str,
        user_prompt: str,
        agent_response: str,
    ) -> dict[str, Any]:
        """Ingest the latest interaction into memory."""
        return {
            "tenant_id": tenant_id,
            "user_id": user_id,
            "session_id": session_id,
            "prompt": user_prompt,
            "response": agent_response,
        }
