feat(memory): Add memory config API controller and end user info endpoints

- Create new memory_config_api_controller.py for dedicated memory configuration management
- Add /end_user/info GET endpoint to retrieve end user information (aliases, metadata)
- Add /end_user/info/update POST endpoint to update end user details
- Move /memory/configs endpoint from memory_api_controller to memory_config_api_controller
- Extract _get_current_user helper function to build user context from API key auth
- Support optional app_id parameter in end user creation with UUID validation
- Update service controller imports with alphabetical ordering and multi-line formatting
- Register memory_config_api_controller router in service module initialization
- Refactor memory_api_controller imports for consistency and clarity
This commit is contained in:
Ke Sun
2026-04-01 15:06:26 +08:00
parent 99ff07ccac
commit 7ce29019f7
7 changed files with 219 additions and 175 deletions

View File

@@ -8,6 +8,8 @@ This service validates inputs and delegates to MemoryAgentService for core memor
import uuid
from typing import Any, Dict, Optional
from sqlalchemy.orm import Session
from app.core.error_codes import BizCode
from app.core.exceptions import BusinessException, ResourceNotFoundException
from app.core.logging_config import get_logger
@@ -15,7 +17,6 @@ from app.models.app_model import App
from app.models.end_user_model import EndUser
from app.schemas.memory_config_schema import ConfigurationError
from app.services.memory_agent_service import MemoryAgentService
from sqlalchemy.orm import Session
logger = get_logger(__name__)