π OpenHands: AI-Driven Development
refactored all relative paths to absolute paths (#3495)
Mahmood Alhawaj6487175a3175
diff --git a/agenthub/__init__.py b/agenthub/__init__.pyindex 4c476b43be..d91f2d3ec2 100644--- a/agenthub/__init__.py+++ b/agenthub/__init__.py@@ -1,14 +1,13 @@from dotenv import load_dotenv+from agenthub.micro.agent import MicroAgent+from agenthub.micro.registry import all_microagentsfrom openhands.controller.agent import Agent-from .micro.agent import MicroAgent-from .micro.registry import all_microagents-load_dotenv()-from . import ( # noqa: E402+from agenthub import ( # noqa: E402browsing_agent,codeact_agent,codeact_swe_agent,diff --git a/agenthub/browsing_agent/__init__.py b/agenthub/browsing_agent/__init__.pyindex 6f25e3da81..5b32e8c826 100644--- a/agenthub/browsing_agent/__init__.py+++ b/agenthub/browsing_agent/__init__.py@@ -1,5 +1,4 @@+from agenthub.browsing_agent.browsing_agent import BrowsingAgentfrom openhands.controller.agent import Agent-from .browsing_agent import BrowsingAgent-Agent.register('BrowsingAgent', BrowsingAgent)diff --git a/agenthub/browsing_agent/prompt.py b/agenthub/browsing_agent/prompt.pyindex aa0e6b929f..468c1d52d3 100644--- a/agenthub/browsing_agent/prompt.py+++ b/agenthub/browsing_agent/prompt.py@@ -12,12 +12,11 @@ from browsergym.core.action.base import AbstractActionSetfrom browsergym.core.action.highlevel import HighLevelActionSetfrom browsergym.core.action.python import PythonActionSet-from openhands.runtime.browser.browser_env import BrowserEnv--from .utils import (+from agenthub.browsing_agent.utils import (ParseError,parse_html_tags_raise,)+from openhands.runtime.browser.browser_env import BrowserEnv@dataclassdiff --git a/agenthub/codeact_agent/__init__.py b/agenthub/codeact_agent/__init__.pyindex c8a924dc4b..db780e24d0 100644--- a/agenthub/codeact_agent/__init__.py+++ b/agenthub/codeact_agent/__init__.py@@ -1,5 +1,4 @@+from agenthub.codeact_agent.codeact_agent import CodeActAgentfrom openhands.controller.agent import Agent-from .codeact_agent import CodeActAgent-Agent.register('CodeActAgent', CodeActAgent)diff --git a/agenthub/codeact_swe_agent/__init__.py b/agenthub/codeact_swe_agent/__init__.pyindex b634777fbe..b0b3d3aae9 100644--- a/agenthub/codeact_swe_agent/__init__.py+++ b/agenthub/codeact_swe_agent/__init__.py@@ -1,5 +1,4 @@+from agenthub.codeact_swe_agent.codeact_swe_agent import CodeActSWEAgentfrom openhands.controller.agent import Agent-from .codeact_swe_agent import CodeActSWEAgent-Agent.register('CodeActSWEAgent', CodeActSWEAgent)diff --git a/agenthub/delegator_agent/__init__.py b/agenthub/delegator_agent/__init__.pyindex 16b6705763..4c420816fd 100644--- a/agenthub/delegator_agent/__init__.py+++ b/agenthub/delegator_agent/__init__.py@@ -1,5 +1,4 @@+from agenthub.delegator_agent.agent import DelegatorAgentfrom openhands.controller.agent import Agent-from .agent import DelegatorAgent-Agent.register('DelegatorAgent', DelegatorAgent)diff --git a/agenthub/dummy_agent/__init__.py b/agenthub/dummy_agent/__init__.pyindex 0a63c69129..5e7c39b7f5 100644--- a/agenthub/dummy_agent/__init__.py+++ b/agenthub/dummy_agent/__init__.py@@ -1,5 +1,4 @@+from agenthub.dummy_agent.agent import DummyAgentfrom openhands.controller.agent import Agent-from .agent import DummyAgent-Agent.register('DummyAgent', DummyAgent)diff --git a/agenthub/micro/agent.py b/agenthub/micro/agent.pyindex d444e121bc..4645d38cd9 100644--- a/agenthub/micro/agent.py+++ b/agenthub/micro/agent.py@@ -1,5 +1,7 @@from jinja2 import BaseLoader, Environment+from agenthub.micro.instructions import instructions+from agenthub.micro.registry import all_microagentsfrom openhands.controller.agent import Agentfrom openhands.controller.state.state import Statefrom openhands.core.config import AgentConfig@@ -11,9 +13,6 @@ from openhands.events.serialization.event import event_to_memoryfrom openhands.llm.llm import LLMfrom openhands.memory.history import ShortTermHistory-from .instructions import instructions-from .registry import all_microagents-def parse_response(orig_response: str) -> Action:# attempt to load the JSON dict from the responsediff --git a/agenthub/planner_agent/__init__.py b/agenthub/planner_agent/__init__.pyindex 385df5c001..3b97ae3b3c 100644--- a/agenthub/planner_agent/__init__.py+++ b/agenthub/planner_agent/__init__.py@@ -1,5 +1,4 @@+from agenthub.planner_agent.agent import PlannerAgentfrom openhands.controller.agent import Agent-from .agent import PlannerAgent-Agent.register('PlannerAgent', PlannerAgent)diff --git a/agenthub/planner_agent/agent.py b/agenthub/planner_agent/agent.pyindex 7f23b34cc5..6e53b8e43f 100644--- a/agenthub/planner_agent/agent.py+++ b/agenthub/planner_agent/agent.py@@ -1,3 +1,4 @@+from agenthub.planner_agent.prompt import get_prompt_and_imagesfrom agenthub.planner_agent.response_parser import PlannerResponseParserfrom openhands.controller.agent import Agentfrom openhands.controller.state.state import State@@ -6,8 +7,6 @@ from openhands.core.message import ImageContent, Message, TextContentfrom openhands.events.action import Action, AgentFinishActionfrom openhands.llm.llm import LLM-from .prompt import get_prompt_and_images-class PlannerAgent(Agent):VERSION = '1.0'diff --git a/evaluation/mint/tasks/__init__.py b/evaluation/mint/tasks/__init__.pyindex 410d89c016..4f6ac721ac 100644--- a/evaluation/mint/tasks/__init__.py+++ b/evaluation/mint/tasks/__init__.py@@ -1,6 +1,10 @@-from .base import Task-from .codegen import HumanEvalTask, MBPPTask-from .reasoning import MultipleChoiceTask, ReasoningTask, TheoremqaTask+from evaluation.mint.tasks.base import Task+from evaluation.mint.tasks.codegen import HumanEvalTask, MBPPTask+from evaluation.mint.tasks.reasoning import (+ MultipleChoiceTask,+ ReasoningTask,+ TheoremqaTask,+)__all__ = ['Task',diff --git a/evaluation/mint/tasks/codegen.py b/evaluation/mint/tasks/codegen.pyindex 1b40657b42..8a80594ce4 100644--- a/evaluation/mint/tasks/codegen.py+++ b/evaluation/mint/tasks/codegen.py@@ -2,7 +2,7 @@ import loggingfrom utils import check_correctness-from .base import Task+from evaluation.mint.tasks.base import TaskLOGGER = logging.getLogger('MINT')diff --git a/openhands/controller/__init__.py b/openhands/controller/__init__.pyindex 703cd40a56..c050e6e4dd 100644--- a/openhands/controller/__init__.py+++ b/openhands/controller/__init__.py@@ -1,4 +1,4 @@-from .agent_controller import AgentController+from openhands.controller.agent_controller import AgentController__all__ = ['AgentController',diff --git a/openhands/core/schema/__init__.py b/openhands/core/schema/__init__.pyindex 2fa4e1aa3e..370bf022f8 100644--- a/openhands/core/schema/__init__.py+++ b/openhands/core/schema/__init__.py@@ -1,7 +1,7 @@-from .action import ActionType-from .agent import AgentState-from .config import ConfigType-from .observation import ObservationType+from openhands.core.schema.action import ActionType+from openhands.core.schema.agent import AgentState+from openhands.core.schema.config import ConfigType+from openhands.core.schema.observation import ObservationType__all__ = ['ActionType',diff --git a/openhands/core/utils/__init__.py b/openhands/core/utils/__init__.pyindex 33012ec028..7cf6db84fd 100644--- a/openhands/core/utils/__init__.py+++ b/openhands/core/utils/__init__.py@@ -1,3 +1,3 @@-from .singleton import Singleton+from openhands.core.utils.singleton import Singleton__all__ = ['Singleton']diff --git a/openhands/events/__init__.py b/openhands/events/__init__.pyindex f128f86233..c1694dba4b 100644--- a/openhands/events/__init__.py+++ b/openhands/events/__init__.py@@ -1,5 +1,5 @@-from .event import Event, EventSource-from .stream import EventStream, EventStreamSubscriber+from openhands.events.event import Event, EventSource+from openhands.events.stream import EventStream, EventStreamSubscriber__all__ = ['Event',diff --git a/openhands/events/action/__init__.py b/openhands/events/action/__init__.pyindex 3a4baacb22..386d614c18 100644--- a/openhands/events/action/__init__.py+++ b/openhands/events/action/__init__.py@@ -1,17 +1,17 @@-from .action import Action, ActionConfirmationStatus-from .agent import (+from openhands.events.action.action import Action, ActionConfirmationStatus+from openhands.events.action.agent import (AgentDelegateAction,AgentFinishAction,AgentRejectAction,AgentSummarizeAction,ChangeAgentStateAction,)-from .browse import BrowseInteractiveAction, BrowseURLAction-from .commands import CmdRunAction, IPythonRunCellAction-from .empty import NullAction-from .files import FileReadAction, FileWriteAction-from .message import MessageAction-from .tasks import AddTaskAction, ModifyTaskAction+from openhands.events.action.browse import BrowseInteractiveAction, BrowseURLAction+from openhands.events.action.commands import CmdRunAction, IPythonRunCellAction+from openhands.events.action.empty import NullAction+from openhands.events.action.files import FileReadAction, FileWriteAction+from openhands.events.action.message import MessageAction+from openhands.events.action.tasks import AddTaskAction, ModifyTaskAction__all__ = ['Action',diff --git a/openhands/events/action/agent.py b/openhands/events/action/agent.pyindex e4b57dc5e9..f49f573ed6 100644--- a/openhands/events/action/agent.py+++ b/openhands/events/action/agent.py@@ -2,8 +2,7 @@ from dataclasses import dataclass, fieldfrom typing import Anyfrom openhands.core.schema import ActionType--from .action import Action+from openhands.events.action.action import Action@dataclassdiff --git a/openhands/events/action/browse.py b/openhands/events/action/browse.pyindex f3e949c021..441c863140 100644--- a/openhands/events/action/browse.py+++ b/openhands/events/action/browse.py@@ -2,8 +2,7 @@ from dataclasses import dataclassfrom typing import ClassVarfrom openhands.core.schema import ActionType--from .action import Action, ActionSecurityRisk+from openhands.events.action.action import Action, ActionSecurityRisk@dataclassdiff --git a/openhands/events/action/commands.py b/openhands/events/action/commands.pyindex 848aae23c2..41ad0104c4 100644--- a/openhands/events/action/commands.py+++ b/openhands/events/action/commands.py@@ -2,8 +2,11 @@ from dataclasses import dataclassfrom typing import ClassVarfrom openhands.core.schema import ActionType--from .action import Action, ActionConfirmationStatus, ActionSecurityRisk+from openhands.events.action.action import (+ Action,+ ActionConfirmationStatus,+ ActionSecurityRisk,+)@dataclassdiff --git a/openhands/events/action/empty.py b/openhands/events/action/empty.pyindex 1cb885ce05..32e0346001 100644--- a/openhands/events/action/empty.py+++ b/openhands/events/action/empty.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ActionType--from .action import Action+from openhands.events.action.action import Action@dataclassdiff --git a/openhands/events/action/files.py b/openhands/events/action/files.pyindex dd1bf277cc..f323fc9181 100644--- a/openhands/events/action/files.py+++ b/openhands/events/action/files.py@@ -2,8 +2,7 @@ from dataclasses import dataclassfrom typing import ClassVarfrom openhands.core.schema import ActionType--from .action import Action, ActionSecurityRisk+from openhands.events.action.action import Action, ActionSecurityRisk@dataclassdiff --git a/openhands/events/action/message.py b/openhands/events/action/message.pyindex d0586330ea..55fb21f359 100644--- a/openhands/events/action/message.py+++ b/openhands/events/action/message.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ActionType--from .action import Action, ActionSecurityRisk+from openhands.events.action.action import Action, ActionSecurityRisk@dataclassdiff --git a/openhands/events/action/tasks.py b/openhands/events/action/tasks.pyindex 95df784d35..b1f1c215f7 100644--- a/openhands/events/action/tasks.py+++ b/openhands/events/action/tasks.py@@ -1,8 +1,7 @@from dataclasses import dataclass, fieldfrom openhands.core.schema import ActionType--from .action import Action+from openhands.events.action.action import Action@dataclassdiff --git a/openhands/events/observation/__init__.py b/openhands/events/observation/__init__.pyindex fb498fcc38..7fac198d31 100644--- a/openhands/events/observation/__init__.py+++ b/openhands/events/observation/__init__.py@@ -1,13 +1,16 @@-from .agent import AgentStateChangedObservation-from .browse import BrowserOutputObservation-from .commands import CmdOutputObservation, IPythonRunCellObservation-from .delegate import AgentDelegateObservation-from .empty import NullObservation-from .error import ErrorObservation-from .files import FileReadObservation, FileWriteObservation-from .observation import Observation-from .reject import UserRejectObservation-from .success import SuccessObservation+from openhands.events.observation.agent import AgentStateChangedObservation+from openhands.events.observation.browse import BrowserOutputObservation+from openhands.events.observation.commands import (+ CmdOutputObservation,+ IPythonRunCellObservation,+)+from openhands.events.observation.delegate import AgentDelegateObservation+from openhands.events.observation.empty import NullObservation+from openhands.events.observation.error import ErrorObservation+from openhands.events.observation.files import FileReadObservation, FileWriteObservation+from openhands.events.observation.observation import Observation+from openhands.events.observation.reject import UserRejectObservation+from openhands.events.observation.success import SuccessObservation__all__ = ['Observation',diff --git a/openhands/events/observation/agent.py b/openhands/events/observation/agent.pyindex f18010e8da..802c23c378 100644--- a/openhands/events/observation/agent.py+++ b/openhands/events/observation/agent.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/browse.py b/openhands/events/observation/browse.pyindex f110f382a9..a337b5f260 100644--- a/openhands/events/observation/browse.py+++ b/openhands/events/observation/browse.py@@ -1,8 +1,7 @@from dataclasses import dataclass, fieldfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/commands.py b/openhands/events/observation/commands.pyindex 1ca7d09451..7f1d409d83 100644--- a/openhands/events/observation/commands.py+++ b/openhands/events/observation/commands.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/delegate.py b/openhands/events/observation/delegate.pyindex d5c68278fd..9e98c6b598 100644--- a/openhands/events/observation/delegate.py+++ b/openhands/events/observation/delegate.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/empty.py b/openhands/events/observation/empty.pyindex 3dcfe3ead9..9d7d0f18a7 100644--- a/openhands/events/observation/empty.py+++ b/openhands/events/observation/empty.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/error.py b/openhands/events/observation/error.pyindex 348b898be0..d3b5f0e9df 100644--- a/openhands/events/observation/error.py+++ b/openhands/events/observation/error.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/files.py b/openhands/events/observation/files.pyindex a1fc178f7a..8432393ff9 100644--- a/openhands/events/observation/files.py+++ b/openhands/events/observation/files.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/reject.py b/openhands/events/observation/reject.pyindex 2d97f853ef..3475b19319 100644--- a/openhands/events/observation/reject.py+++ b/openhands/events/observation/reject.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/observation/success.py b/openhands/events/observation/success.pyindex 269fe2345b..27ef979977 100644--- a/openhands/events/observation/success.py+++ b/openhands/events/observation/success.py@@ -1,8 +1,7 @@from dataclasses import dataclassfrom openhands.core.schema import ObservationType--from .observation import Observation+from openhands.events.observation.observation import Observation@dataclassdiff --git a/openhands/events/serialization/__init__.py b/openhands/events/serialization/__init__.pyindex ead1ec7369..67b9d30d08 100644--- a/openhands/events/serialization/__init__.py+++ b/openhands/events/serialization/__init__.py@@ -1,12 +1,12 @@-from .action import (+from openhands.events.serialization.action import (action_from_dict,)-from .event import (+from openhands.events.serialization.event import (event_from_dict,event_to_dict,event_to_memory,)-from .observation import (+from openhands.events.serialization.observation import (observation_from_dict,)diff --git a/openhands/events/serialization/event.py b/openhands/events/serialization/event.pyindex 9645c90df3..e653f508d1 100644--- a/openhands/events/serialization/event.py+++ b/openhands/events/serialization/event.py@@ -3,10 +3,9 @@ from datetime import datetimefrom openhands.events import Event, EventSourcefrom openhands.events.observation.observation import Observation--from .action import action_from_dict-from .observation import observation_from_dict-from .utils import remove_fields+from openhands.events.serialization.action import action_from_dict+from openhands.events.serialization.observation import observation_from_dict+from openhands.events.serialization.utils import remove_fields# TODO: move `content` into `extras`TOP_KEYS = ['id', 'timestamp', 'source', 'message', 'cause', 'action', 'observation']diff --git a/openhands/events/stream.py b/openhands/events/stream.pyindex c04de94b03..93dad1c534 100644--- a/openhands/events/stream.py+++ b/openhands/events/stream.py@@ -6,11 +6,10 @@ from typing import Callable, Iterablefrom openhands.core.logger import openhands_logger as loggerfrom openhands.core.utils import json+from openhands.events.event import Event, EventSourcefrom openhands.events.serialization.event import event_from_dict, event_to_dictfrom openhands.storage import FileStore-from .event import Event, EventSource-class EventStreamSubscriber(str, Enum):AGENT_CONTROLLER = 'agent_controller'diff --git a/openhands/memory/__init__.py b/openhands/memory/__init__.pyindex 9a705a24ac..0ce208cef5 100644--- a/openhands/memory/__init__.py+++ b/openhands/memory/__init__.py@@ -1,5 +1,5 @@-from .condenser import MemoryCondenser-from .history import ShortTermHistory-from .memory import LongTermMemory+from openhands.memory.condenser import MemoryCondenser+from openhands.memory.history import ShortTermHistory+from openhands.memory.memory import LongTermMemory__all__ = ['LongTermMemory', 'ShortTermHistory', 'MemoryCondenser']diff --git a/openhands/runtime/__init__.py b/openhands/runtime/__init__.pyindex a189cb13ea..97c212cc42 100644--- a/openhands/runtime/__init__.py+++ b/openhands/runtime/__init__.py@@ -1,14 +1,14 @@-from .e2b.sandbox import E2BBox+from openhands.runtime.e2b.sandbox import E2BBoxdef get_runtime_cls(name: str):# Local imports to avoid circular importsif name == 'eventstream':- from .client.runtime import EventStreamRuntime+ from openhands.runtime.client.runtime import EventStreamRuntimereturn EventStreamRuntimeelif name == 'e2b':- from .e2b.runtime import E2BRuntime+ from openhands.runtime.e2b.runtime import E2BRuntimereturn E2BRuntimeelse:diff --git a/openhands/runtime/browser/__init__.py b/openhands/runtime/browser/__init__.pyindex 5dcd63dbf6..2687e03c68 100644--- a/openhands/runtime/browser/__init__.py+++ b/openhands/runtime/browser/__init__.py@@ -1,3 +1,3 @@-from .utils import browse+from openhands.runtime.browser.utils import browse__all__ = ['browse']diff --git a/openhands/runtime/builder/__init__.py b/openhands/runtime/builder/__init__.pyindex dbd0067203..fcebb8a240 100644--- a/openhands/runtime/builder/__init__.py+++ b/openhands/runtime/builder/__init__.py@@ -1,4 +1,4 @@-from .base import RuntimeBuilder-from .docker import DockerRuntimeBuilder+from openhands.runtime.builder.base import RuntimeBuilder+from openhands.runtime.builder.docker import DockerRuntimeBuilder__all__ = ['RuntimeBuilder', 'DockerRuntimeBuilder']diff --git a/openhands/runtime/builder/docker.py b/openhands/runtime/builder/docker.pyindex 952df244d8..750ea8423e 100644--- a/openhands/runtime/builder/docker.py+++ b/openhands/runtime/builder/docker.py@@ -1,8 +1,7 @@import dockerfrom openhands.core.logger import openhands_logger as logger--from .base import RuntimeBuilder+from openhands.runtime.builder.base import RuntimeBuilderclass DockerRuntimeBuilder(RuntimeBuilder):diff --git a/openhands/runtime/e2b/runtime.py b/openhands/runtime/e2b/runtime.pyindex 8694c94636..852e419f68 100644--- a/openhands/runtime/e2b/runtime.py+++ b/openhands/runtime/e2b/runtime.py@@ -10,12 +10,11 @@ from openhands.events.observation import (Observation,)from openhands.events.stream import EventStream+from openhands.runtime.e2b.filestore import E2BFileStore+from openhands.runtime.e2b.sandbox import E2BSandboxfrom openhands.runtime.plugins import PluginRequirementfrom openhands.runtime.runtime import Runtime--from ..utils.files import insert_lines, read_lines-from .filestore import E2BFileStore-from .sandbox import E2BSandbox+from openhands.runtime.utils.files import insert_lines, read_linesclass E2BRuntime(Runtime):diff --git a/openhands/runtime/plugins/__init__.py b/openhands/runtime/plugins/__init__.pyindex fac44a3625..66bc499a11 100644--- a/openhands/runtime/plugins/__init__.py+++ b/openhands/runtime/plugins/__init__.py@@ -1,7 +1,10 @@# Requirements-from .agent_skills import AgentSkillsPlugin, AgentSkillsRequirement-from .jupyter import JupyterPlugin, JupyterRequirement-from .requirement import Plugin, PluginRequirement+from openhands.runtime.plugins.agent_skills import (+ AgentSkillsPlugin,+ AgentSkillsRequirement,+)+from openhands.runtime.plugins.jupyter import JupyterPlugin, JupyterRequirement+from openhands.runtime.plugins.requirement import Plugin, PluginRequirement__all__ = ['Plugin',diff --git a/openhands/runtime/plugins/agent_skills/__init__.py b/openhands/runtime/plugins/agent_skills/__init__.pyindex 69dd1e9621..01f9d7e028 100644--- a/openhands/runtime/plugins/agent_skills/__init__.py+++ b/openhands/runtime/plugins/agent_skills/__init__.py@@ -1,9 +1,8 @@from dataclasses import dataclass+from openhands.runtime.plugins.agent_skills import agentskillsfrom openhands.runtime.plugins.requirement import Plugin, PluginRequirement-from . import agentskills-@dataclassclass AgentSkillsRequirement(PluginRequirement):diff --git a/openhands/runtime/plugins/agent_skills/agentskills.py b/openhands/runtime/plugins/agent_skills/agentskills.pyindex 8984f8d135..dd34e3878d 100644--- a/openhands/runtime/plugins/agent_skills/agentskills.py+++ b/openhands/runtime/plugins/agent_skills/agentskills.py@@ -1,7 +1,7 @@from inspect import signature-from . import file_ops, file_reader-from .utils.dependency import import_functions+from openhands.runtime.plugins.agent_skills import file_ops, file_reader+from openhands.runtime.plugins.agent_skills.utils.dependency import import_functionsimport_functions(module=file_ops, function_names=file_ops.__all__, target_globals=globals()diff --git a/openhands/runtime/plugins/agent_skills/file_ops/__init__.py b/openhands/runtime/plugins/agent_skills/file_ops/__init__.pyindex daf2449f8c..26b38437a4 100644--- a/openhands/runtime/plugins/agent_skills/file_ops/__init__.py+++ b/openhands/runtime/plugins/agent_skills/file_ops/__init__.py@@ -1,5 +1,5 @@-from ..utils.dependency import import_functions-from . import file_ops+from openhands.runtime.plugins.agent_skills.file_ops import file_ops+from openhands.runtime.plugins.agent_skills.utils.dependency import import_functionsimport_functions(module=file_ops, function_names=file_ops.__all__, target_globals=globals()diff --git a/openhands/runtime/plugins/agent_skills/file_ops/file_ops.py b/openhands/runtime/plugins/agent_skills/file_ops/file_ops.pyindex 9e7a2188ab..f48e9bb872 100644--- a/openhands/runtime/plugins/agent_skills/file_ops/file_ops.py+++ b/openhands/runtime/plugins/agent_skills/file_ops/file_ops.py@@ -24,7 +24,7 @@ import tempfileif __package__ is None or __package__ == '':from aider import Linterelse:- from ..utils.aider import Linter+ from openhands.runtime.plugins.agent_skills.utils.aider import LinterCURRENT_FILE: str | None = NoneCURRENT_LINE = 1diff --git a/openhands/runtime/plugins/agent_skills/file_reader/__init__.py b/openhands/runtime/plugins/agent_skills/file_reader/__init__.pyindex b50d6fb19c..70d080a94d 100644--- a/openhands/runtime/plugins/agent_skills/file_reader/__init__.py+++ b/openhands/runtime/plugins/agent_skills/file_reader/__init__.py@@ -1,5 +1,5 @@-from ..utils.dependency import import_functions-from . import file_readers+from openhands.runtime.plugins.agent_skills.file_reader import file_readers+from openhands.runtime.plugins.agent_skills.utils.dependency import import_functionsimport_functions(module=file_readers, function_names=file_readers.__all__, target_globals=globals()diff --git a/openhands/runtime/plugins/agent_skills/file_reader/file_readers.py b/openhands/runtime/plugins/agent_skills/file_reader/file_readers.pyindex ab088ca1e6..ee41eab0e4 100644--- a/openhands/runtime/plugins/agent_skills/file_reader/file_readers.py+++ b/openhands/runtime/plugins/agent_skills/file_reader/file_readers.py@@ -25,7 +25,7 @@ import PyPDF2from pptx import Presentationfrom pylatexenc.latex2text import LatexNodes2Text-from ..utils.config import (+from openhands.runtime.plugins.agent_skills.utils.config import (_get_max_token,_get_openai_api_key,_get_openai_base_url,diff --git a/openhands/runtime/plugins/agent_skills/utils/aider/__init__.py b/openhands/runtime/plugins/agent_skills/utils/aider/__init__.pyindex d8a58af44d..15a4cb3172 100644--- a/openhands/runtime/plugins/agent_skills/utils/aider/__init__.py+++ b/openhands/runtime/plugins/agent_skills/utils/aider/__init__.py@@ -1,6 +1,9 @@if __package__ is None or __package__ == '':from linter import Linter, LintResultelse:- from .linter import Linter, LintResult+ from openhands.runtime.plugins.agent_skills.utils.aider.linter import (+ Linter,+ LintResult,+ )__all__ = ['Linter', 'LintResult']diff --git a/openhands/runtime/plugins/jupyter/__init__.py b/openhands/runtime/plugins/jupyter/__init__.pyindex 7245e25482..f816bdb305 100644--- a/openhands/runtime/plugins/jupyter/__init__.py+++ b/openhands/runtime/plugins/jupyter/__init__.py@@ -5,11 +5,10 @@ from dataclasses import dataclassfrom openhands.core.logger import openhands_logger as loggerfrom openhands.events.action import Action, IPythonRunCellActionfrom openhands.events.observation import IPythonRunCellObservation+from openhands.runtime.plugins.jupyter.execute_server import JupyterKernelfrom openhands.runtime.plugins.requirement import Plugin, PluginRequirementfrom openhands.runtime.utils import find_available_tcp_port-from .execute_server import JupyterKernel-@dataclassclass JupyterRequirement(PluginRequirement):diff --git a/openhands/runtime/utils/__init__.py b/openhands/runtime/utils/__init__.pyindex e1512a7e87..eca9436da6 100644--- a/openhands/runtime/utils/__init__.py+++ b/openhands/runtime/utils/__init__.py@@ -1,4 +1,4 @@-from .bash import split_bash_commands-from .system import find_available_tcp_port+from openhands.runtime.utils.bash import split_bash_commands+from openhands.runtime.utils.system import find_available_tcp_port__all__ = ['find_available_tcp_port', 'split_bash_commands']diff --git a/openhands/security/__init__.py b/openhands/security/__init__.pyindex 4d1ef4490c..0eaa19563d 100644--- a/openhands/security/__init__.py+++ b/openhands/security/__init__.py@@ -1,5 +1,5 @@-from .analyzer import SecurityAnalyzer-from .invariant.analyzer import InvariantAnalyzer+from openhands.security.analyzer import SecurityAnalyzer+from openhands.security.invariant.analyzer import InvariantAnalyzer__all__ = ['SecurityAnalyzer',diff --git a/openhands/security/invariant/__init__.py b/openhands/security/invariant/__init__.pyindex e2ad7f7698..9445ef804a 100644--- a/openhands/security/invariant/__init__.py+++ b/openhands/security/invariant/__init__.py@@ -1,4 +1,4 @@-from .analyzer import InvariantAnalyzer+from openhands.security.invariant.analyzer import InvariantAnalyzer__all__ = ['InvariantAnalyzer',diff --git a/openhands/server/auth/__init__.py b/openhands/server/auth/__init__.pyindex 20e969354e..0fe3ddd8cc 100644--- a/openhands/server/auth/__init__.py+++ b/openhands/server/auth/__init__.py@@ -1,3 +1,3 @@-from .auth import get_sid_from_token, sign_token+from openhands.server.auth.auth import get_sid_from_token, sign_token__all__ = ['get_sid_from_token', 'sign_token']diff --git a/openhands/server/session/__init__.py b/openhands/server/session/__init__.pyindex 383864a4b7..3ee03d9594 100644--- a/openhands/server/session/__init__.py+++ b/openhands/server/session/__init__.py@@ -1,4 +1,4 @@-from .manager import SessionManager-from .session import Session+from openhands.server.session.manager import SessionManager+from openhands.server.session.session import Session__all__ = ['Session', 'SessionManager']diff --git a/openhands/server/session/manager.py b/openhands/server/session/manager.pyindex e795daf221..074ca9b6e7 100644--- a/openhands/server/session/manager.py+++ b/openhands/server/session/manager.py@@ -5,10 +5,9 @@ from fastapi import WebSocketfrom openhands.core.config import AppConfigfrom openhands.core.logger import openhands_logger as logger+from openhands.server.session.session import Sessionfrom openhands.storage.files import FileStore-from .session import Session-class SessionManager:_sessions: dict[str, Session] = {}diff --git a/openhands/server/session/session.py b/openhands/server/session/session.pyindex 10415b4440..fd6a19c4ea 100644--- a/openhands/server/session/session.py+++ b/openhands/server/session/session.py@@ -20,10 +20,9 @@ from openhands.events.observation import (from openhands.events.serialization import event_from_dict, event_to_dictfrom openhands.events.stream import EventStreamSubscriberfrom openhands.llm.llm import LLM+from openhands.server.session.agent import AgentSessionfrom openhands.storage.files import FileStore-from .agent import AgentSession-DEL_DELT_SEC = 60 * 60 * 5diff --git a/openhands/storage/__init__.py b/openhands/storage/__init__.pyindex c863d3ddc2..57c164c29d 100644--- a/openhands/storage/__init__.py+++ b/openhands/storage/__init__.py@@ -1,7 +1,7 @@-from .files import FileStore-from .local import LocalFileStore-from .memory import InMemoryFileStore-from .s3 import S3FileStore+from openhands.storage.files import FileStore+from openhands.storage.local import LocalFileStore+from openhands.storage.memory import InMemoryFileStore+from openhands.storage.s3 import S3FileStoredef get_file_store(file_store: str, file_store_path: str | None = None) -> FileStore:diff --git a/openhands/storage/local.py b/openhands/storage/local.pyindex 6e30cdc4ea..38815bce1f 100644--- a/openhands/storage/local.py+++ b/openhands/storage/local.py@@ -2,8 +2,7 @@ import osimport shutilfrom openhands.core.logger import openhands_logger as logger--from .files import FileStore+from openhands.storage.files import FileStoreclass LocalFileStore(FileStore):diff --git a/openhands/storage/memory.py b/openhands/storage/memory.pyindex 1cb40b9099..4792b88f41 100644--- a/openhands/storage/memory.py+++ b/openhands/storage/memory.py@@ -1,8 +1,7 @@import osfrom openhands.core.logger import openhands_logger as logger--from .files import FileStore+from openhands.storage.files import FileStoreclass InMemoryFileStore(FileStore):diff --git a/openhands/storage/s3.py b/openhands/storage/s3.pyindex 4f6d3c4f5f..368b6f4ffb 100644--- a/openhands/storage/s3.py+++ b/openhands/storage/s3.py@@ -2,7 +2,7 @@ import osfrom minio import Minio-from .files import FileStore+from openhands.storage.files import FileStoreAWS_S3_ENDPOINT = 's3.amazonaws.com'