"""Convenience functions for creating tool sets."""

from __future__ import annotations

from pi_agents.agent.types import AgentTool
from pi_agents.coding_agent.tools.bash_tool import create_bash_tool
from pi_agents.coding_agent.tools.edit_tool import create_edit_tool
from pi_agents.coding_agent.tools.find_tool import create_find_tool
from pi_agents.coding_agent.tools.grep_tool import create_grep_tool
from pi_agents.coding_agent.tools.ls_tool import create_ls_tool
from pi_agents.coding_agent.tools.read_tool import create_read_tool
from pi_agents.coding_agent.tools.write_tool import create_write_tool


def create_coding_tools(cwd: str | None = None) -> list[AgentTool]:
    """Create the full set of coding tools."""
    return [
        create_read_tool(cwd),
        create_write_tool(cwd),
        create_edit_tool(cwd),
        create_bash_tool(cwd),
        create_find_tool(cwd),
        create_grep_tool(cwd),
        create_ls_tool(cwd),
    ]


def create_read_only_tools(cwd: str | None = None) -> list[AgentTool]:
    """Create read-only tools (no write/edit/bash)."""
    return [
        create_read_tool(cwd),
        create_find_tool(cwd),
        create_grep_tool(cwd),
        create_ls_tool(cwd),
    ]
