"""Armorer Core package.

Re-exports public symbols so that ``from armorer.core import ArmorerCoreHandler``
and similar test-facing imports continue to work after the modularization.
"""

import subprocess  # noqa: F401 – tests patch armorer.core.subprocess
import time  # noqa: F401 – tests patch armorer.core.time

from armorer.core.singleton import (
    _is_pid_alive,
    _list_running_host_core_pids,
    _advisory_lock,
    _release_owned_pid_file,
    _claim_host_core_singleton,
)
from armorer.core.response import _normalize_core_response
from armorer.core.handler import (
    ArmorerCoreHandler,
    SupersededTaskError,
    OpenClawSetupExecutionError,
)
from armorer.core.entry import start_core

# Re-export symbols that the old monolithic core.py exposed at module level.
# Tests and production code may reference these via ``armorer.core.<symbol>``.
from armorer.agent import BaseAgent  # noqa: F401
from armorer.registry import AppRegistry, AppMetadata  # noqa: F401
from armorer.config import ConfigManager  # noqa: F401
from armorer.messaging.telegram import TelegramGateway, escape_markdown_v2  # noqa: F401
from armorer.skills import SkillManager  # noqa: F401
from armorer.catalog import resolve_playbook  # noqa: F401

__all__ = [
    "ArmorerCoreHandler",
    "SupersededTaskError",
    "OpenClawSetupExecutionError",
    "_is_pid_alive",
    "_list_running_host_core_pids",
    "_advisory_lock",
    "_release_owned_pid_file",
    "_claim_host_core_singleton",
    "_normalize_core_response",
    "start_core",
    "BaseAgent",
    "AppRegistry",
    "AppMetadata",
    "ConfigManager",
    "TelegramGateway",
    "escape_markdown_v2",
    "SkillManager",
    "resolve_playbook",
]
