from __future__ import annotations

# Public re-exports (align with TS `src/index.ts`)

from .core.types import *  # noqa: F401,F403
from .core.convert import convert_messages_in, convert_messages_out, detect_message_format, is_text_input
from .core.modules.history import History
from .core.modules.build import build_prompt
from .core.modules.inputs import normalize_regexes, normalize_worldbooks
from .core.modules.regex import apply_regex, merge_regex_rules
from .core.modules.worldbook import get_active_entries
from .core.modules.assemble import assemble_tagged_prompt_list
from .core.modules.macro import replace_macros
from .core.modules.variables import (
    Variables,
    create_variable_context,
    get_global_var,
    get_var,
    get_variable_changes,
    process_variable_macros,
    set_global_var,
    set_var,
)
from .core.modules.pipeline import compile_tagged_stages, process_content_stages

# TS-style aliases (camelCase)
buildPrompt = build_prompt
convertMessagesIn = convert_messages_in
convertMessagesOut = convert_messages_out
detectMessageFormat = detect_message_format
isTextInput = is_text_input
normalizeRegexes = normalize_regexes
normalizeWorldbooks = normalize_worldbooks
getActiveEntries = get_active_entries
assembleTaggedPromptList = assemble_tagged_prompt_list
replaceMacros = replace_macros
applyRegex = apply_regex
mergeRegexRules = merge_regex_rules
createVariableContext = create_variable_context

# Channels namespace-like export (TS: export * as Channels)
from .core import channels as Channels  # noqa: E402

