Commit Graph

8 Commits

Author SHA1 Message Date
Eternity
f93ec8d609 fix(core): fix end_user_id reference and add task status tracking
- Fix write_router to use actual_end_user_id instead of end_user_id
- Add task status tracking via Redis in scheduler
- Expose task_id in memory write response
- Fix logging import path in scheduler
2026-04-22 18:06:14 +08:00
miao
f597139913 feat(memory-config): add V1 emotion and reflection engine config endpoints
Add read/update endpoints for emotion engine config (read_config_emotion, update_config_emotion)
Add read/update endpoints for reflection engine config (read_config_reflection, update_config_reflection)
Add EmotionConfigUpdateRequest and ReflectionConfigUpdateRequest schemas
Reuse emotion_config_controller and memory_reflection_controller with ownership verification
2026-04-17 17:35:19 +08:00
miao
ddfd81259a feat(memory-config): Add V1 memory config management API endpoints
-Add full CRUD endpoints for memory config via API Key auth (/v1/memory_config)
-Add V1 request schemas: ConfigCreateRequest, ConfigUpdateRequest, ConfigUpdateExtractedRequest, ConfigUpdateForgettingRequest
-Add config-workspace ownership verification
-Add scenes/simple, read_all_config, read_config_extracted query endpoints
-Add create_config, update_config, update_config_extracted, update_config_forgetting, delete_config mutation endpoints
-Reuse management-side controllers with pre-validation ownership checks
2026-04-16 19:05:24 +08:00
Ke Sun
010eff17cf feat(memory): Refactor memory API to support async task-based and sync operations
- Rename endpoints from write_api_service/read_api_service to write/read for clarity
- Add async task-based endpoints (/write, /read) that dispatch to Celery with fair locking
- Add task status polling endpoints (/write/status, /read/status) to check async operation results
- Add synchronous endpoints (/write/sync, /read/sync) for blocking operations with direct results
- Introduce TaskStatusResponse schema for task status polling responses
- Add MemoryWriteSyncResponse and MemoryReadSyncResponse schemas for sync operations
- Implement write_memory_sync and read_memory_sync methods in MemoryAPIService
- Remove await from async service calls in task-based endpoints (now handled by Celery)
- Add Query parameter import for task_id in status endpoints
- Update docstrings to clarify async vs sync behavior and task polling workflow
- Integrate task_service for retrieving Celery task results
2026-04-02 14:47:36 +08:00
Ke Sun
7ce29019f7 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
2026-04-01 15:06:26 +08:00
Ke Sun
891cfc2704 feat(end-user-api): add authenticated API endpoint for end user creation
- Should be merged  after v0.2.9
- Create new end_user_api_controller.py with POST /end_user/create endpoint
- Implement API Key authentication requirement with memory scope
- Add support for optional memory_config_id parameter with workspace default fallback
- Update memory_api_schema.py to remove workspace_id from request (now derived from API key auth)
- Add memory_config_id field to CreateEndUserResponse schema
- Register end_user_api_controller router in service module
- Migrate end user creation from unauthenticated to authenticated API flow
2026-03-30 16:50:56 +08:00
Ke Sun
e8ae46b286 feat(memory-api): add end user management and enhance memory API endpoints
- Add end_user_controller with unauthenticated endpoint for creating end users
- Implement get_or_create_end_user logic to handle duplicate end users by other_id
- Register end_user_controller router in main controller initialization
- Add list_memory_configs endpoint to retrieve all workspace memory configurations
- Update MemoryWriteRequest and MemoryReadRequest to make config_id required field
- Refactor memory API endpoints to parse request body directly instead of using Body parameter
- Add CreateEndUserRequest and CreateEndUserResponse schemas for end user creation
- Add ListConfigsResponse schema for configs listing endpoint
- Remove unused config_id and llm_model_id parameters from Neo4j write operation
- Update .gitignore to exclude redbear-mem-metrics and pitch-deck directories
2026-03-20 21:04:41 +08:00
Ke Sun
bf1dfd97f0 feat(memory-api): implement memory read/write API service endpoints
- Add MemoryAPIService with read_memory and write_memory methods for managing user memories
- Create memory_api_schema.py with request/response schemas for read and write operations
- Implement write_memory_api_service endpoint for storing memory content with configurable storage backends
- Implement read_memory_api_service endpoint for querying memories with context-aware responses
- Add memory-specific error codes (MEMORY_WRITE_FAILED, MEMORY_READ_FAILED, MEMORY_CONFIG_NOT_FOUND) to error_codes.py
2025-12-26 11:43:51 +08:00