class NaviError(Exception):
"""Base exception for all navi errors."""
class SessionNotFound(NaviError):
def __init__(self, session_id: str):
super().__init__(f"Session not found: {session_id}")
self.session_id = session_id
class ProfileNotFound(NaviError):
def __init__(self, profile_id: str):
super().__init__(f"Profile not found: {profile_id}")
self.profile_id = profile_id
class ToolNotFound(NaviError):
def __init__(self, tool_name: str):
super().__init__(f"Tool not found: {tool_name}")
self.tool_name = tool_name
class ToolExecutionError(NaviError):
def __init__(self, tool_name: str, reason: str):
super().__init__(f"Tool '{tool_name}' failed: {reason}")
self.tool_name = tool_name
class LLMBackendError(NaviError):
pass
class MaxIterationsReached(NaviError):
def __init__(self, limit: int):
super().__init__(f"Agent reached max iterations limit ({limit})")
self.limit = limit