from typing import Dict, Any, Tuple, Callable, Optional
from app.core.tools.base import BaseToolPlugin

class MeshInspectDriftTool(BaseToolPlugin):
    @property
    def name(self) -> str:
        return "mesh_inspect_drift"

    def prepare_task(self, args: Dict[str, Any], context: Dict[str, Any]) -> Tuple[Optional[Callable], Dict[str, Any]]:
        node_id = context.get("node_id")
        resolved_sid = context.get("session_id")
        assistant = context.get("assistant")
        
        if not assistant:
             return None, {"success": False, "error": "Orchestrator not available"}

        return assistant.inspect_drift, {
            "node_id": node_id,
            "path": args.get("path"),
            "session_id": resolved_sid
        }
