"""CLI Layer - Command Line Interface.

This layer handles:
- Command implementations for the 67 discovered commands
- Command-line argument parsing and validation
- User interaction and output formatting
- Delegates to Application layer for business logic

Responsibilities:
- Parse and validate CLI arguments
- Format output for terminal display
- Handle user prompts and interactions
- Convert between CLI and domain types
"""

from cleveragents.cli.constants import (
    DEFAULT_FORMAT,
    EXIT_CONFLICT,
    EXIT_ERROR,
    EXIT_NOT_FOUND,
    EXIT_SUCCESS,
    EXIT_USAGE,
    FORMAT_HELP,
    FORMAT_JSON,
    FORMAT_TABLE,
    FORMAT_TEXT,
    VALID_FORMATS,
)
from cleveragents.cli.errors import cli_error, cli_not_found, cli_warning
from cleveragents.cli.main import (
    app,
    cli,
    convert_exit_code,
    ensure_cli_commands_registered,
    main,
)

# NOTE: Subcommand registration is deferred to main() / main_callback()
# to avoid heavyweight imports for lightweight commands (version, info, diagnostics).

# Export main as main_cli for backward compatibility
main_cli = main

__all__ = [
    "DEFAULT_FORMAT",
    "EXIT_CONFLICT",
    "EXIT_ERROR",
    "EXIT_NOT_FOUND",
    "EXIT_SUCCESS",
    "EXIT_USAGE",
    "FORMAT_HELP",
    "FORMAT_JSON",
    "FORMAT_TABLE",
    "FORMAT_TEXT",
    "VALID_FORMATS",
    "app",
    "cli",
    "cli_error",
    "cli_not_found",
    "cli_warning",
    "convert_exit_code",
    "main",
    "main_cli",
]
