"""Platform-wide semantic registry.

This is the canonical place modules register entity metadata (fields,
relations, labels). It re-exports the registry the AI layer already
owns so we have one source of truth and no future "extract from ai/"
refactor.

Modules SHOULD import from here, not from ``simorgh.apps.ai.semantic``:

    from simorgh.core.semantic import EntitySpec, FieldSpec, register_entity

The AI layer still owns the implementation because that is where the
shape was first crystallised; everything else just consumes the same
registry.
"""

from __future__ import annotations

from simorgh.apps.ai.semantic import (
    EntitySpec,
    FieldSpec,
    RelationSpec,
    SemanticError,
    get_entity,
    list_entities,
    register_entity,
    reset_for_tests,
    serialize_entity,
)

__all__ = (
    "EntitySpec",
    "FieldSpec",
    "RelationSpec",
    "SemanticError",
    "get_entity",
    "list_entities",
    "register_entity",
    "reset_for_tests",
    "serialize_entity",
)
