ReMe/reme_cli/enumeration/component_enum.py
jinli.yl 819443813b feat(components): add token counter and file-based utility components
- Introduce BaseAsTokenCounter and EstimatedAsTokenCounter for token estimation
- Add AsMsgStat and AsBlockStat schema for message statistics tracking
- Implement FileIO class with read/write/append/edit operations
- Create file utility functions for safe async file reading and truncation
- Add MemorySearch component for semantic search in memory files
- Register new component types in ComponentEnum and update imports
- Add constants for default host, port, and truncation limits
- Create BaseService abstract base class for service implementations
- Implement BaseStep with component accessors and lifecycle management
- Add proper __all__ exports for all new modules and components
2026-04-16 11:15:23 +08:00

37 lines
799 B
Python

"""Component enumeration module.
Defines the types of components that can be registered and used in the application.
"""
from enum import Enum
class ComponentEnum(str, Enum):
"""Enumeration of component types for dependency injection and registration.
This enum defines the various component categories that can be registered
in the application's component container. Each component type represents
a specific role or functionality within the system.
"""
BASE = "base"
AS_LLM = "as_llm"
AS_LLM_FORMATTER = "as_llm_formatter"
AS_TOKEN_COUNTER = "as_token_counter"
EMBEDDING_MODEL = "embedding_model"
FILE_STORE = "file_store"
FILE_WATCHER = "file_watcher"
SERVICE = "service"
CLIENT = "client"
STEP = "step"
JOB = "job"