"""Tool definitions: maps tool names to remote DB paths and version commands."""

from __future__ import annotations

# Tool definitions: name -> (remote_db_path, version_command)
# The remote_db_path uses ~ which will be expanded by the remote shell.
TOOL_DEFS: dict[str, tuple[str, list[str]]] = {
    "devin": (
        "~/.local/share/devin/cli/sessions.db",
        ["devin", "--version"],
    ),
    "opencode": (
        "~/.local/share/opencode/opencode.db",
        ["opencode", "--version"],
    ),
}


def get_supported_tools() -> list[str]:
    """Return the list of supported tool names."""
    return list(TOOL_DEFS.keys())


def get_tool_info(tool: str) -> tuple[str, list[str]] | None:
    """Get the remote DB path and version command for a tool.

    Args:
        tool: Tool name (e.g. "devin", "opencode").

    Returns:
        Tuple of (remote_db_path, version_command) or None if tool is unknown.
    """
    return TOOL_DEFS.get(tool)
