"""Command registry for initializing the command bus with handlers.

This module provides utilities for registering command handlers with the
command bus. It serves as the integration point between the CLI layer
and the application services layer.
"""

from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from cleveragents.cli.command_bus import CommandBus


def register_command_handlers(bus: "CommandBus") -> None:
    """Register all command handlers with the command bus.

    This function is called during application initialization to set up
    the command bus with handlers for all supported commands. Handlers
    are imported from the application services layer.

    Args:
        bus: The CommandBus instance to register handlers with
    """

    # Register handlers for plan commands
    # These handlers wrap service calls and are registered with the bus
    def handle_plan_command(command: object) -> object:
        """Handle plan-related commands."""
        # This will be implemented based on specific command types
        return None

    def handle_project_command(command: object) -> object:
        """Handle project-related commands."""
        # This will be implemented based on specific command types
        return None

    # Register handlers
    # bus.register_handler(PlanCommand, handle_plan_command)
    # bus.register_handler(ProjectCommand, handle_project_command)
