"""Core enumerations for ContextEngine.
Phase 0 frozen — these enums are used across all packages.
"""
from enum import Enum
class NodeStatus(str, Enum):
"""Status of a ContextNode in AGFS.
Corresponds to .meta.json status field.
Used by Repair Job to determine node health and recovery actions.
See CLAUDE.md §2 AGFS Directory Spec for write order semantics.
"""
PENDING = "PENDING"
ACTIVE = "ACTIVE"
BROKEN = "BROKEN"
class ContextType(str, Enum):
"""High-level classification of context content.
Used by TypedQuery for index-level filtering and by Planner for query routing.
"""
MEMORY = "MEMORY"
SKILL = "SKILL"
RESOURCE = "RESOURCE"
class EventType(str, Enum):
"""Types of outbox events for async processing.
Events are written to .outbox/{event_id}.json and processed by OutboxWorker.
"""
UPSERT_CONTEXT = "UPSERT_CONTEXT"
UPSERT_DIRECTORY = "UPSERT_DIRECTORY"
DELETE_CONTEXT = "DELETE_CONTEXT"
ARCHIVE_CONTEXT = "ARCHIVE_CONTEXT"
MOVE_CONTEXT = "MOVE_CONTEXT"
UPSERT_RELATION = "UPSERT_RELATION"
class RetrievalIntent(str, Enum):
"""Intent classification for retrieval queries.
Used by RetrievalIntentClassifier to categorize search queries
before vector search, enabling intent-aware retrieval instead of
raw semantic similarity search.
"""
BACKGROUND_SUPPLEMENT = "background_supplement"
HISTORICAL_DECISIONS = "historical_decisions"
OPEN_ITEMS = "open_items"
REUSABLE_SKILLS = "reusable_skills"
ENTITY_RELATIONS = "entity_relations"