forked from cardosofelipe/fast-next-template
feat(context): Phase 1 - Foundation: Types, Config & Exceptions #79
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Define the foundational types, configuration, and exceptions for the Context Management Engine.
Parent Issue
Implementation Tasks
1. Create
config.pyContextSettingsPydantic settings class2. Create
exceptions.pyContextErrorbase exceptionBudgetExceededErrorTokenCountErrorCompressionErrorAssemblyTimeoutError3. Create
types/base.pyContextTypeenum (SYSTEM, KNOWLEDGE, CONVERSATION, TASK, TOOL)BaseContextabstract dataclassto_dict()serializationfrom_dict()deserialization4. Create Context Type Classes
types/system.py- SystemContexttypes/knowledge.py- KnowledgeContext (with score field)types/conversation.py- ConversationContext (with role field)types/task.py- TaskContexttypes/tool.py- ToolContext (with tool_name field)5. Create
__init__.py__all__Files to Create
Acceptance Criteria
Dependencies
Labels
phase-2,context,backend