π OpenHands: AI-Driven Development
chore: Mark V0 legacy files with clear headers and V1 pointers (#12165)
Engel Nystd9d19043f19b
diff --git a/openhands/agenthub/browsing_agent/browsing_agent.py b/openhands/agenthub/browsing_agent/browsing_agent.pyindex cd1decd261..65071a2f11 100644--- a/openhands/agenthub/browsing_agent/browsing_agent.py+++ b/openhands/agenthub/browsing_agent/browsing_agent.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom browsergym.core.action.highlevel import HighLevelActionSetdiff --git a/openhands/agenthub/browsing_agent/response_parser.py b/openhands/agenthub/browsing_agent/response_parser.pyindex 1caacc0e4e..b7f7ee19ce 100644--- a/openhands/agenthub/browsing_agent/response_parser.py+++ b/openhands/agenthub/browsing_agent/response_parser.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import astimport rediff --git a/openhands/agenthub/browsing_agent/utils.py b/openhands/agenthub/browsing_agent/utils.pyindex ff08735aff..d5dc119933 100644--- a/openhands/agenthub/browsing_agent/utils.py+++ b/openhands/agenthub/browsing_agent/utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import collectionsimport refrom warnings import warndiff --git a/openhands/agenthub/codeact_agent/codeact_agent.py b/openhands/agenthub/codeact_agent/codeact_agent.pyindex 9dd814e9cf..d03f0f83a7 100644--- a/openhands/agenthub/codeact_agent/codeact_agent.py+++ b/openhands/agenthub/codeact_agent/codeact_agent.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# V1 replacement for this module lives in the Software Agent SDK.import osimport sysfrom collections import dequediff --git a/openhands/agenthub/codeact_agent/function_calling.py b/openhands/agenthub/codeact_agent/function_calling.pyindex 763b75ee53..dc17aac6c7 100644--- a/openhands/agenthub/codeact_agent/function_calling.py+++ b/openhands/agenthub/codeact_agent/function_calling.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""This file contains the function calling implementation for different actions.This is similar to the functionality of `CodeActResponseParser`.diff --git a/openhands/agenthub/codeact_agent/tools/bash.py b/openhands/agenthub/codeact_agent/tools/bash.pyindex b1113cb8c8..00a98f4e4d 100644--- a/openhands/agenthub/codeact_agent/tools/bash.py+++ b/openhands/agenthub/codeact_agent/tools/bash.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkfrom openhands.agenthub.codeact_agent.tools.prompt import refine_promptdiff --git a/openhands/agenthub/codeact_agent/tools/browser.py b/openhands/agenthub/codeact_agent/tools/browser.pyindex 78a7e503db..df1451ffd4 100644--- a/openhands/agenthub/codeact_agent/tools/browser.py+++ b/openhands/agenthub/codeact_agent/tools/browser.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from browsergym.core.action.highlevel import HighLevelActionSetfrom litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkdiff --git a/openhands/agenthub/codeact_agent/tools/condensation_request.py b/openhands/agenthub/codeact_agent/tools/condensation_request.pyindex e1a5754ffc..7862aab015 100644--- a/openhands/agenthub/codeact_agent/tools/condensation_request.py+++ b/openhands/agenthub/codeact_agent/tools/condensation_request.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk_CONDENSATION_REQUEST_DESCRIPTION = 'Request a condensation of the conversation history when the context becomes too long or when you need to focus on the most relevant information.'diff --git a/openhands/agenthub/codeact_agent/tools/finish.py b/openhands/agenthub/codeact_agent/tools/finish.pyindex 033d0f3df0..f5b9b70d71 100644--- a/openhands/agenthub/codeact_agent/tools/finish.py+++ b/openhands/agenthub/codeact_agent/tools/finish.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkfrom openhands.llm.tool_names import FINISH_TOOL_NAMEdiff --git a/openhands/agenthub/codeact_agent/tools/ipython.py b/openhands/agenthub/codeact_agent/tools/ipython.pyindex 07f6c006c3..28ee55d29a 100644--- a/openhands/agenthub/codeact_agent/tools/ipython.py+++ b/openhands/agenthub/codeact_agent/tools/ipython.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkfrom openhands.agenthub.codeact_agent.tools.security_utils import (diff --git a/openhands/agenthub/codeact_agent/tools/llm_based_edit.py b/openhands/agenthub/codeact_agent/tools/llm_based_edit.pyindex 18a2abaa3b..97e223aeeb 100644--- a/openhands/agenthub/codeact_agent/tools/llm_based_edit.py+++ b/openhands/agenthub/codeact_agent/tools/llm_based_edit.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkfrom openhands.agenthub.codeact_agent.tools.security_utils import (diff --git a/openhands/agenthub/codeact_agent/tools/prompt.py b/openhands/agenthub/codeact_agent/tools/prompt.pyindex 9a9ee8ab8a..9bd8cf941b 100644--- a/openhands/agenthub/codeact_agent/tools/prompt.py+++ b/openhands/agenthub/codeact_agent/tools/prompt.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import reimport sysdiff --git a/openhands/agenthub/codeact_agent/tools/security_utils.py b/openhands/agenthub/codeact_agent/tools/security_utils.pyindex 2829712e23..b7a45b03ad 100644--- a/openhands/agenthub/codeact_agent/tools/security_utils.py+++ b/openhands/agenthub/codeact_agent/tools/security_utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""Security utility constants for tool risk descriptions.This file contains standardized risk description text for various tools.diff --git a/openhands/agenthub/codeact_agent/tools/str_replace_editor.py b/openhands/agenthub/codeact_agent/tools/str_replace_editor.pyindex b5c67c1025..2adcef4987 100644--- a/openhands/agenthub/codeact_agent/tools/str_replace_editor.py+++ b/openhands/agenthub/codeact_agent/tools/str_replace_editor.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkdiff --git a/openhands/agenthub/codeact_agent/tools/task_tracker.py b/openhands/agenthub/codeact_agent/tools/task_tracker.pyindex 3bac10f4c6..ae556545b0 100644--- a/openhands/agenthub/codeact_agent/tools/task_tracker.py+++ b/openhands/agenthub/codeact_agent/tools/task_tracker.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunkfrom openhands.llm.tool_names import TASK_TRACKER_TOOL_NAMEdiff --git a/openhands/agenthub/codeact_agent/tools/think.py b/openhands/agenthub/codeact_agent/tools/think.pyindex 1986758012..f25d682c26 100644--- a/openhands/agenthub/codeact_agent/tools/think.py+++ b/openhands/agenthub/codeact_agent/tools/think.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk_THINK_DESCRIPTION = """Use the tool to think about something. It will not obtain new information or make any changes to the repository, but just log the thought. Use it when complex reasoning or brainstorming is needed.diff --git a/openhands/agenthub/dummy_agent/agent.py b/openhands/agenthub/dummy_agent/agent.pyindex 4d2531e03a..74d818d2ea 100644--- a/openhands/agenthub/dummy_agent/agent.py+++ b/openhands/agenthub/dummy_agent/agent.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from typing import TypedDictfrom openhands.controller.agent import Agentdiff --git a/openhands/agenthub/loc_agent/function_calling.py b/openhands/agenthub/loc_agent/function_calling.pyindex 06cb01fe49..b88cca5b57 100644--- a/openhands/agenthub/loc_agent/function_calling.py+++ b/openhands/agenthub/loc_agent/function_calling.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""This file contains the function calling implementation for different actions.This is similar to the functionality of `CodeActResponseParser`.diff --git a/openhands/agenthub/loc_agent/loc_agent.py b/openhands/agenthub/loc_agent/loc_agent.pyindex 516323d106..8dfe65226f 100644--- a/openhands/agenthub/loc_agent/loc_agent.py+++ b/openhands/agenthub/loc_agent/loc_agent.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from typing import TYPE_CHECKINGimport openhands.agenthub.loc_agent.function_calling as locagent_function_callingdiff --git a/openhands/agenthub/loc_agent/tools/explore_structure.py b/openhands/agenthub/loc_agent/tools/explore_structure.pyindex 47c0a91ed6..221aef0299 100644--- a/openhands/agenthub/loc_agent/tools/explore_structure.py+++ b/openhands/agenthub/loc_agent/tools/explore_structure.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import (ChatCompletionToolParam,ChatCompletionToolParamFunctionChunk,diff --git a/openhands/agenthub/loc_agent/tools/search_content.py b/openhands/agenthub/loc_agent/tools/search_content.pyindex 586b0ccf72..233cda3900 100644--- a/openhands/agenthub/loc_agent/tools/search_content.py+++ b/openhands/agenthub/loc_agent/tools/search_content.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import (ChatCompletionToolParam,ChatCompletionToolParamFunctionChunk,diff --git a/openhands/agenthub/readonly_agent/function_calling.py b/openhands/agenthub/readonly_agent/function_calling.pyindex fded8d324b..b047ee9ec9 100644--- a/openhands/agenthub/readonly_agent/function_calling.py+++ b/openhands/agenthub/readonly_agent/function_calling.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""This file contains the function calling implementation for different actions.This is similar to the functionality of `CodeActResponseParser`.diff --git a/openhands/agenthub/readonly_agent/readonly_agent.py b/openhands/agenthub/readonly_agent/readonly_agent.pyindex 2e9a54b416..af5965395a 100644--- a/openhands/agenthub/readonly_agent/readonly_agent.py+++ b/openhands/agenthub/readonly_agent/readonly_agent.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""ReadOnlyAgent - A specialized version of CodeActAgent that only uses read-only tools."""import osdiff --git a/openhands/agenthub/readonly_agent/tools/glob.py b/openhands/agenthub/readonly_agent/tools/glob.pyindex 202bed4f3b..85c5c5bd92 100644--- a/openhands/agenthub/readonly_agent/tools/glob.py+++ b/openhands/agenthub/readonly_agent/tools/glob.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk_GLOB_DESCRIPTION = """Fast file pattern matching tool.diff --git a/openhands/agenthub/readonly_agent/tools/grep.py b/openhands/agenthub/readonly_agent/tools/grep.pyindex 976e288c8c..d0695ac36a 100644--- a/openhands/agenthub/readonly_agent/tools/grep.py+++ b/openhands/agenthub/readonly_agent/tools/grep.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk_GREP_DESCRIPTION = """Fast content search tool.diff --git a/openhands/agenthub/readonly_agent/tools/view.py b/openhands/agenthub/readonly_agent/tools/view.pyindex 4ac3196702..ef8e5159a2 100644--- a/openhands/agenthub/readonly_agent/tools/view.py+++ b/openhands/agenthub/readonly_agent/tools/view.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk_VIEW_DESCRIPTION = """Reads a file or list directories from the local filesystem.diff --git a/openhands/agenthub/visualbrowsing_agent/visualbrowsing_agent.py b/openhands/agenthub/visualbrowsing_agent/visualbrowsing_agent.pyindex 0603da38f9..3f858b9c10 100644--- a/openhands/agenthub/visualbrowsing_agent/visualbrowsing_agent.py+++ b/openhands/agenthub/visualbrowsing_agent/visualbrowsing_agent.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from browsergym.core.action.highlevel import HighLevelActionSetfrom browsergym.utils.obs import flatten_axtree_to_strdiff --git a/openhands/controller/action_parser.py b/openhands/controller/action_parser.pyindex 4250f46f38..cb7d1e472f 100644--- a/openhands/controller/action_parser.py+++ b/openhands/controller/action_parser.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from abc import ABC, abstractmethodfrom typing import Anydiff --git a/openhands/controller/agent.py b/openhands/controller/agent.pyindex 71c18f8c25..cff5cda918 100644--- a/openhands/controller/agent.py+++ b/openhands/controller/agent.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# V1 replacement for this module lives in the Software Agent SDK.from __future__ import annotationsfrom abc import ABC, abstractmethoddiff --git a/openhands/controller/agent_controller.py b/openhands/controller/agent_controller.pyindex 0753f0a0a1..9948007208 100644--- a/openhands/controller/agent_controller.py+++ b/openhands/controller/agent_controller.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# V1 replacement for this module lives in the Software Agent SDK.from __future__ import annotationsimport asynciodiff --git a/openhands/controller/replay.py b/openhands/controller/replay.pyindex 4cfec767f4..98cfa477cc 100644--- a/openhands/controller/replay.py+++ b/openhands/controller/replay.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsfrom openhands.core.logger import openhands_logger as loggerdiff --git a/openhands/controller/state/control_flags.py b/openhands/controller/state/control_flags.pyindex c41cbb927a..bafeeff6b2 100644--- a/openhands/controller/state/control_flags.py+++ b/openhands/controller/state/control_flags.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsfrom dataclasses import dataclassdiff --git a/openhands/controller/state/state.py b/openhands/controller/state/state.pyindex e3690a2e53..94e6742b7c 100644--- a/openhands/controller/state/state.py+++ b/openhands/controller/state/state.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsimport base64diff --git a/openhands/controller/state/state_tracker.py b/openhands/controller/state/state_tracker.pyindex 4813ec798e..a7c6c915d3 100644--- a/openhands/controller/state/state_tracker.py+++ b/openhands/controller/state/state_tracker.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.controller.state.control_flags import (BudgetControlFlag,IterationControlFlag,diff --git a/openhands/controller/stuck.py b/openhands/controller/stuck.pyindex 092be02efe..27fde6c169 100644--- a/openhands/controller/stuck.py+++ b/openhands/controller/stuck.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from dataclasses import dataclassfrom typing import Optionaldiff --git a/openhands/core/config/__init__.py b/openhands/core/config/__init__.pyindex df7f745bef..af27a65ae2 100644--- a/openhands/core/config/__init__.py+++ b/openhands/core/config/__init__.py@@ -1,10 +1,8 @@from openhands.core.config.agent_config import AgentConfigfrom openhands.core.config.arg_utils import (- get_cli_parser,get_evaluation_parser,get_headless_parser,)-from openhands.core.config.cli_config import CLIConfigfrom openhands.core.config.config_utils import (OH_DEFAULT_AGENT,OH_MAX_ITERATIONS,@@ -34,7 +32,6 @@ __all__ = ['OH_DEFAULT_AGENT','OH_MAX_ITERATIONS','AgentConfig',- 'CLIConfig','OpenHandsConfig','MCPConfig','LLMConfig',@@ -49,7 +46,6 @@ __all__ = ['get_agent_config_arg','get_llm_config_arg','get_field_info',- 'get_cli_parser','get_headless_parser','get_evaluation_parser','parse_arguments',diff --git a/openhands/core/config/agent_config.py b/openhands/core/config/agent_config.pyindex b9b5873e9e..60315ed6fa 100644--- a/openhands/core/config/agent_config.py+++ b/openhands/core/config/agent_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsfrom pydantic import BaseModel, ConfigDict, Field, ValidationErrordiff --git a/openhands/core/config/arg_utils.py b/openhands/core/config/arg_utils.pyindex d39a4856e0..4b90aa16ad 100644--- a/openhands/core/config/arg_utils.py+++ b/openhands/core/config/arg_utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""Centralized command line argument configuration for OpenHands CLI and headless modes."""import argparsediff --git a/openhands/core/config/cli_config.py b/openhands/core/config/cli_config.pydeleted file mode 100644index 89b6829d3d..0000000000--- a/openhands/core/config/cli_config.py+++ /dev/null@@ -1,9 +0,0 @@-from pydantic import BaseModel, Field---class CLIConfig(BaseModel):- """Configuration for CLI-specific settings."""-- vi_mode: bool = Field(default=False)-- model_config = {'extra': 'forbid'}diff --git a/openhands/core/config/condenser_config.py b/openhands/core/config/condenser_config.pyindex 2045e9c9ee..afb2ee00bb 100644--- a/openhands/core/config/condenser_config.py+++ b/openhands/core/config/condenser_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsfrom typing import Literal, castdiff --git a/openhands/core/config/config_utils.py b/openhands/core/config/config_utils.pyindex 5dd5c5a98c..88c9853cf3 100644--- a/openhands/core/config/config_utils.py+++ b/openhands/core/config/config_utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from types import UnionTypefrom typing import Any, get_args, get_origindiff --git a/openhands/core/config/extended_config.py b/openhands/core/config/extended_config.pyindex b9616fec7e..ab5decc8a5 100644--- a/openhands/core/config/extended_config.py+++ b/openhands/core/config/extended_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from typing import Anyfrom pydantic import RootModeldiff --git a/openhands/core/config/kubernetes_config.py b/openhands/core/config/kubernetes_config.pyindex 706a51a29f..07d4a19746 100644--- a/openhands/core/config/kubernetes_config.py+++ b/openhands/core/config/kubernetes_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from pydantic import BaseModel, ConfigDict, Field, ValidationErrordiff --git a/openhands/core/config/llm_config.py b/openhands/core/config/llm_config.pyindex 8a5f704b36..0bb993b8ef 100644--- a/openhands/core/config/llm_config.py+++ b/openhands/core/config/llm_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsimport osdiff --git a/openhands/core/config/mcp_config.py b/openhands/core/config/mcp_config.pyindex dd25318d37..9f97624e82 100644--- a/openhands/core/config/mcp_config.py+++ b/openhands/core/config/mcp_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsimport osdiff --git a/openhands/core/config/model_routing_config.py b/openhands/core/config/model_routing_config.pyindex 9377a5b097..8f20abc0fa 100644--- a/openhands/core/config/model_routing_config.py+++ b/openhands/core/config/model_routing_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from pydantic import BaseModel, ConfigDict, Field, ValidationErrorfrom openhands.core.config.llm_config import LLMConfigdiff --git a/openhands/core/config/openhands_config.py b/openhands/core/config/openhands_config.pyindex 037cc7f3d3..82834aac35 100644--- a/openhands/core/config/openhands_config.py+++ b/openhands/core/config/openhands_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom typing import Any, ClassVar@@ -5,7 +12,6 @@ from pydantic import BaseModel, ConfigDict, Field, SecretStrfrom openhands.core import loggerfrom openhands.core.config.agent_config import AgentConfig-from openhands.core.config.cli_config import CLIConfigfrom openhands.core.config.config_utils import (DEFAULT_WORKSPACE_MOUNT_PATH_IN_SANDBOX,OH_DEFAULT_AGENT,@@ -119,7 +125,6 @@ class OpenHandsConfig(BaseModel):mcp_host: str = Field(default=f'localhost:{os.getenv("port", 3000)}')mcp: MCPConfig = Field(default_factory=MCPConfig)kubernetes: KubernetesConfig = Field(default_factory=KubernetesConfig)- cli: CLIConfig = Field(default_factory=CLIConfig)git_user_name: str = Field(default='openhands', description='Git user name for commits made by the agent')diff --git a/openhands/core/config/sandbox_config.py b/openhands/core/config/sandbox_config.pyindex 0576e6a397..4b9aa864ed 100644--- a/openhands/core/config/sandbox_config.py+++ b/openhands/core/config/sandbox_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom pydantic import BaseModel, ConfigDict, Field, ValidationError, model_validatordiff --git a/openhands/core/config/security_config.py b/openhands/core/config/security_config.pyindex 63067cf912..2200448082 100644--- a/openhands/core/config/security_config.py+++ b/openhands/core/config/security_config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from pydantic import BaseModel, ConfigDict, Field, ValidationErrordiff --git a/openhands/core/config/utils.py b/openhands/core/config/utils.pyindex e1752838ba..3953f2a513 100644--- a/openhands/core/config/utils.py+++ b/openhands/core/config/utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import argparseimport osimport pathlibdiff --git a/openhands/core/const/guide_url.py b/openhands/core/const/guide_url.pyindex 62af6e5475..dce7264aff 100644--- a/openhands/core/const/guide_url.py+++ b/openhands/core/const/guide_url.py@@ -1 +1,8 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0TROUBLESHOOTING_URL = 'https://docs.all-hands.dev/usage/troubleshooting'diff --git a/openhands/core/download.py b/openhands/core/download.pyindex 7d2392a63a..6e481054c5 100644--- a/openhands/core/download.py+++ b/openhands/core/download.py@@ -1,2 +1,9 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0# Run this file to trigger a model downloadimport openhands.agenthub # noqa F401 (we import this to get the agents registered)diff --git a/openhands/core/exceptions.py b/openhands/core/exceptions.pyindex 4d706e6aa5..21f25d45eb 100644--- a/openhands/core/exceptions.py+++ b/openhands/core/exceptions.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0# ============================================# Agent Exceptions# ============================================diff --git a/openhands/core/logger.py b/openhands/core/logger.pyindex b48759b352..2fabb6f350 100644--- a/openhands/core/logger.py+++ b/openhands/core/logger.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import copyimport loggingimport osdiff --git a/openhands/core/loop.py b/openhands/core/loop.pyindex ff7680488e..e89136dc97 100644--- a/openhands/core/loop.py+++ b/openhands/core/loop.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asynciofrom openhands.controller import AgentControllerdiff --git a/openhands/core/main.py b/openhands/core/main.pyindex 633fed3a17..6f785b09ab 100644--- a/openhands/core/main.py+++ b/openhands/core/main.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asyncioimport jsonimport osdiff --git a/openhands/core/message.py b/openhands/core/message.pyindex c5c026361d..cd3298b04a 100644--- a/openhands/core/message.py+++ b/openhands/core/message.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from enum import Enumfrom typing import Any, Literaldiff --git a/openhands/core/message_utils.py b/openhands/core/message_utils.pyindex 1235a58ae3..0d75ff9a4d 100644--- a/openhands/core/message_utils.py+++ b/openhands/core/message_utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.events.event import Eventfrom openhands.llm.metrics import Metrics, TokenUsagediff --git a/openhands/core/schema/action.py b/openhands/core/schema/action.pyindex 168689b0f9..c3d63b80df 100644--- a/openhands/core/schema/action.py+++ b/openhands/core/schema/action.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from enum import Enumdiff --git a/openhands/core/schema/agent.py b/openhands/core/schema/agent.pyindex 05fcae5288..8e46e181b2 100644--- a/openhands/core/schema/agent.py+++ b/openhands/core/schema/agent.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from enum import Enumdiff --git a/openhands/core/schema/exit_reason.py b/openhands/core/schema/exit_reason.pyindex ffae2505c7..8ba159bfbf 100644--- a/openhands/core/schema/exit_reason.py+++ b/openhands/core/schema/exit_reason.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from enum import Enumdiff --git a/openhands/core/schema/observation.py b/openhands/core/schema/observation.pyindex 3f0c71052c..dac675b929 100644--- a/openhands/core/schema/observation.py+++ b/openhands/core/schema/observation.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from enum import Enumdiff --git a/openhands/core/setup.py b/openhands/core/setup.pyindex 5cac8c3f72..28664dcf8d 100644--- a/openhands/core/setup.py+++ b/openhands/core/setup.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import hashlibimport osimport uuiddiff --git a/openhands/llm/async_llm.py b/openhands/llm/async_llm.pyindex a08958b957..8aa1be321a 100644--- a/openhands/llm/async_llm.py+++ b/openhands/llm/async_llm.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asynciofrom functools import partialfrom typing import Any, Callablediff --git a/openhands/llm/bedrock.py b/openhands/llm/bedrock.pyindex 62cfe1780a..fa284983f8 100644--- a/openhands/llm/bedrock.py+++ b/openhands/llm/bedrock.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import boto3from openhands.core.logger import openhands_logger as loggerdiff --git a/openhands/llm/debug_mixin.py b/openhands/llm/debug_mixin.pyindex 7438f455c4..3c0718b327 100644--- a/openhands/llm/debug_mixin.py+++ b/openhands/llm/debug_mixin.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from logging import DEBUGfrom typing import Anydiff --git a/openhands/llm/fn_call_converter.py b/openhands/llm/fn_call_converter.pyindex 826b278dc4..bea9eb81a9 100644--- a/openhands/llm/fn_call_converter.py+++ b/openhands/llm/fn_call_converter.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""Convert function calling messages to non-function calling messages and vice versa.This will inject prompts so that models that doesn't support function callingdiff --git a/openhands/llm/llm.py b/openhands/llm/llm.pyindex c786cfd6a3..1e53df4dc1 100644--- a/openhands/llm/llm.py+++ b/openhands/llm/llm.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# V1 replacement for this module lives in the Software Agent SDK.import copyimport osimport timediff --git a/openhands/llm/llm_registry.py b/openhands/llm/llm_registry.pyindex 941f80b9b3..38064bc070 100644--- a/openhands/llm/llm_registry.py+++ b/openhands/llm/llm_registry.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import copyfrom typing import Any, Callablefrom uuid import uuid4diff --git a/openhands/llm/llm_utils.py b/openhands/llm/llm_utils.pyindex c59c24d0bf..e1c7b17d67 100644--- a/openhands/llm/llm_utils.py+++ b/openhands/llm/llm_utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import copyfrom typing import TYPE_CHECKINGdiff --git a/openhands/llm/metrics.py b/openhands/llm/metrics.pyindex bacad0d0e5..0d1ba81499 100644--- a/openhands/llm/metrics.py+++ b/openhands/llm/metrics.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import copyimport timediff --git a/openhands/llm/model_features.py b/openhands/llm/model_features.pyindex f592f0bb98..15e84598c2 100644--- a/openhands/llm/model_features.py+++ b/openhands/llm/model_features.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from __future__ import annotationsfrom dataclasses import dataclassdiff --git a/openhands/llm/retry_mixin.py b/openhands/llm/retry_mixin.pyindex 3169d1313d..cf6dd037c5 100644--- a/openhands/llm/retry_mixin.py+++ b/openhands/llm/retry_mixin.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from typing import Any, Callablefrom tenacity import (diff --git a/openhands/llm/router/base.py b/openhands/llm/router/base.pyindex 84143b3785..8b8ef169a2 100644--- a/openhands/llm/router/base.py+++ b/openhands/llm/router/base.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import copyfrom abc import abstractmethodfrom typing import TYPE_CHECKING, Any, Callablediff --git a/openhands/llm/router/rule_based/impl.py b/openhands/llm/router/rule_based/impl.pyindex 81cb5bb3a4..a9672fa87e 100644--- a/openhands/llm/router/rule_based/impl.py+++ b/openhands/llm/router/rule_based/impl.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.core.config import AgentConfigfrom openhands.core.logger import openhands_logger as loggerfrom openhands.core.message import Messagediff --git a/openhands/llm/streaming_llm.py b/openhands/llm/streaming_llm.pyindex e7fa2ded80..bc1ede4b67 100644--- a/openhands/llm/streaming_llm.py+++ b/openhands/llm/streaming_llm.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asynciofrom functools import partialfrom typing import Any, Callablediff --git a/openhands/llm/tool_names.py b/openhands/llm/tool_names.pyindex 7b037847f2..62ec7637fb 100644--- a/openhands/llm/tool_names.py+++ b/openhands/llm/tool_names.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0"""Constants for tool names used in function calling."""EXECUTE_BASH_TOOL_NAME = 'execute_bash'diff --git a/openhands/server/__main__.py b/openhands/server/__main__.pyindex adf4ad0dbc..510a881fa5 100644--- a/openhands/server/__main__.py+++ b/openhands/server/__main__.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osimport warningsdiff --git a/openhands/server/app.py b/openhands/server/app.pyindex 5cee75b163..910d6961c7 100644--- a/openhands/server/app.py+++ b/openhands/server/app.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import contextlibimport warningsfrom contextlib import asynccontextmanagerdiff --git a/openhands/server/config/server_config.py b/openhands/server/config/server_config.pyindex 4175227267..abcbfce91e 100644--- a/openhands/server/config/server_config.py+++ b/openhands/server/config/server_config.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osfrom openhands.core.logger import openhands_logger as loggerdiff --git a/openhands/server/constants.py b/openhands/server/constants.pyindex 2f09bab748..8722e77fb3 100644--- a/openhands/server/constants.py+++ b/openhands/server/constants.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/."""Server constants."""ROOM_KEY = 'room:{sid}'diff --git a/openhands/server/conversation_manager/conversation_manager.py b/openhands/server/conversation_manager/conversation_manager.pyindex 8a120d8d22..90da2c5857 100644--- a/openhands/server/conversation_manager/conversation_manager.py+++ b/openhands/server/conversation_manager/conversation_manager.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from __future__ import annotationsfrom abc import ABC, abstractmethoddiff --git a/openhands/server/conversation_manager/docker_nested_conversation_manager.py b/openhands/server/conversation_manager/docker_nested_conversation_manager.pyindex 81aa4b4bea..a97907964e 100644--- a/openhands/server/conversation_manager/docker_nested_conversation_manager.py+++ b/openhands/server/conversation_manager/docker_nested_conversation_manager.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from __future__ import annotationsimport asynciodiff --git a/openhands/server/conversation_manager/standalone_conversation_manager.py b/openhands/server/conversation_manager/standalone_conversation_manager.pyindex 5da4e323cd..35913b16bf 100644--- a/openhands/server/conversation_manager/standalone_conversation_manager.py+++ b/openhands/server/conversation_manager/standalone_conversation_manager.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asyncioimport timefrom dataclasses import dataclass, fielddiff --git a/openhands/server/conversation_manager/utils.py b/openhands/server/conversation_manager/utils.pyindex e69de29bb2..e63b4adbe8 100644--- a/openhands/server/conversation_manager/utils.py+++ b/openhands/server/conversation_manager/utils.py@@ -0,0 +1,8 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.diff --git a/openhands/server/data_models/agent_loop_info.py b/openhands/server/data_models/agent_loop_info.pyindex c094c9dcfc..5f321151a5 100644--- a/openhands/server/data_models/agent_loop_info.py+++ b/openhands/server/data_models/agent_loop_info.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from dataclasses import dataclass, fieldfrom openhands.events.event_store_abc import EventStoreABCdiff --git a/openhands/server/data_models/conversation_info.py b/openhands/server/data_models/conversation_info.pyindex 5ca7b80b08..2c93cd1757 100644--- a/openhands/server/data_models/conversation_info.py+++ b/openhands/server/data_models/conversation_info.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from dataclasses import dataclass, fieldfrom datetime import datetime, timezonediff --git a/openhands/server/data_models/conversation_info_result_set.py b/openhands/server/data_models/conversation_info_result_set.pyindex 5f91f5f531..773d521acc 100644--- a/openhands/server/data_models/conversation_info_result_set.py+++ b/openhands/server/data_models/conversation_info_result_set.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from dataclasses import dataclass, fieldfrom openhands.server.data_models.conversation_info import ConversationInfodiff --git a/openhands/server/data_models/feedback.py b/openhands/server/data_models/feedback.pyindex 59f8a1dcc3..d6dcd125ff 100644--- a/openhands/server/data_models/feedback.py+++ b/openhands/server/data_models/feedback.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import jsonfrom typing import Any, Literaldiff --git a/openhands/server/dependencies.py b/openhands/server/dependencies.pyindex 0c1f6b1ec7..8e3ec3fcd3 100644--- a/openhands/server/dependencies.py+++ b/openhands/server/dependencies.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osfrom fastapi import Depends, HTTPException, statusdiff --git a/openhands/server/file_config.py b/openhands/server/file_config.pyindex 799bc21fe8..9e98575bb7 100644--- a/openhands/server/file_config.py+++ b/openhands/server/file_config.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osimport rediff --git a/openhands/server/files.py b/openhands/server/files.pyindex b0f6069f03..08e69177c7 100644--- a/openhands/server/files.py+++ b/openhands/server/files.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from pydantic import (BaseModel,)diff --git a/openhands/server/listen.py b/openhands/server/listen.pyindex e8ef7ce2ba..b77508b5a6 100644--- a/openhands/server/listen.py+++ b/openhands/server/listen.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osimport socketiodiff --git a/openhands/server/listen_socket.py b/openhands/server/listen_socket.pyindex 0fec3bd575..a1a9703975 100644--- a/openhands/server/listen_socket.py+++ b/openhands/server/listen_socket.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asyncioimport osfrom typing import Anydiff --git a/openhands/server/middleware.py b/openhands/server/middleware.pyindex e2bae700a7..dfc73e5b97 100644--- a/openhands/server/middleware.py+++ b/openhands/server/middleware.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asyncioimport osfrom collections import defaultdictdiff --git a/openhands/server/mock/listen.py b/openhands/server/mock/listen.pyindex 31b5fdb6b1..65c85733ef 100644--- a/openhands/server/mock/listen.py+++ b/openhands/server/mock/listen.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import uvicornfrom fastapi import FastAPI, WebSocketdiff --git a/openhands/server/monitoring.py b/openhands/server/monitoring.pyindex 2ff30744a8..1e450f6519 100644--- a/openhands/server/monitoring.py+++ b/openhands/server/monitoring.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from openhands.core.config.openhands_config import OpenHandsConfigfrom openhands.events.event import Eventdiff --git a/openhands/server/routes/conversation.py b/openhands/server/routes/conversation.pyindex 5892843d05..567d5fcda9 100644--- a/openhands/server/routes/conversation.py+++ b/openhands/server/routes/conversation.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import uuidfrom fastapi import APIRouter, Depends, HTTPException, Request, statusdiff --git a/openhands/server/routes/feedback.py b/openhands/server/routes/feedback.pyindex 2adc1855e2..d6444a907b 100644--- a/openhands/server/routes/feedback.py+++ b/openhands/server/routes/feedback.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi import APIRouter, Depends, Request, statusfrom fastapi.responses import JSONResponsediff --git a/openhands/server/routes/files.py b/openhands/server/routes/files.pyindex 5a012e5be6..7e3f114169 100644--- a/openhands/server/routes/files.py+++ b/openhands/server/routes/files.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osfrom typing import Anydiff --git a/openhands/server/routes/git.py b/openhands/server/routes/git.pyindex 7223c6fab6..3878561a0b 100644--- a/openhands/server/routes/git.py+++ b/openhands/server/routes/git.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from types import MappingProxyTypefrom typing import Annotated, castdiff --git a/openhands/server/routes/health.py b/openhands/server/routes/health.pyindex 2a1c6e5c0b..e0bb0501d2 100644--- a/openhands/server/routes/health.py+++ b/openhands/server/routes/health.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi import FastAPIfrom openhands.runtime.utils.system_stats import get_system_infodiff --git a/openhands/server/routes/manage_conversations.py b/openhands/server/routes/manage_conversations.pyindex b88c2851e2..69f7c747b0 100644--- a/openhands/server/routes/manage_conversations.py+++ b/openhands/server/routes/manage_conversations.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asyncioimport base64import itertoolsdiff --git a/openhands/server/routes/public.py b/openhands/server/routes/public.pyindex f345a1041b..5e8669dfa8 100644--- a/openhands/server/routes/public.py+++ b/openhands/server/routes/public.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from typing import Anyfrom fastapi import APIRouterdiff --git a/openhands/server/routes/secrets.py b/openhands/server/routes/secrets.pyindex 175d8863db..2f3910c998 100644--- a/openhands/server/routes/secrets.py+++ b/openhands/server/routes/secrets.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi import APIRouter, Depends, statusfrom fastapi.responses import JSONResponsediff --git a/openhands/server/routes/security.py b/openhands/server/routes/security.pyindex aebf976d57..4415253308 100644--- a/openhands/server/routes/security.py+++ b/openhands/server/routes/security.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi import (APIRouter,Depends,diff --git a/openhands/server/routes/settings.py b/openhands/server/routes/settings.pyindex 7a78ca7720..5707110d84 100644--- a/openhands/server/routes/settings.py+++ b/openhands/server/routes/settings.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi import APIRouter, Depends, statusfrom fastapi.responses import JSONResponsediff --git a/openhands/server/routes/trajectory.py b/openhands/server/routes/trajectory.pyindex 5f33e4c064..0b3d2c0f7e 100644--- a/openhands/server/routes/trajectory.py+++ b/openhands/server/routes/trajectory.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi import APIRouter, Depends, statusfrom fastapi.responses import JSONResponsediff --git a/openhands/server/services/conversation_service.py b/openhands/server/services/conversation_service.pyindex ac2e06b8cd..242ea56294 100644--- a/openhands/server/services/conversation_service.py+++ b/openhands/server/services/conversation_service.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import uuidfrom types import MappingProxyTypefrom typing import Anydiff --git a/openhands/server/services/conversation_stats.py b/openhands/server/services/conversation_stats.pyindex 178fb7b0f9..b2cf045ad3 100644--- a/openhands/server/services/conversation_stats.py+++ b/openhands/server/services/conversation_stats.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import base64import picklefrom threading import Lockdiff --git a/openhands/server/session/agent_session.py b/openhands/server/session/agent_session.pyindex 41c80ffbd1..1a42e3e817 100644--- a/openhands/server/session/agent_session.py+++ b/openhands/server/session/agent_session.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asyncioimport jsonimport timediff --git a/openhands/server/session/conversation.py b/openhands/server/session/conversation.pyindex 2301a33bf0..727566690c 100644--- a/openhands/server/session/conversation.py+++ b/openhands/server/session/conversation.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asynciofrom openhands.core.config import OpenHandsConfigdiff --git a/openhands/server/session/conversation_init_data.py b/openhands/server/session/conversation_init_data.pyindex c1bf660c28..2e10813157 100644--- a/openhands/server/session/conversation_init_data.py+++ b/openhands/server/session/conversation_init_data.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from collections.abc import Mappingfrom types import MappingProxyTypediff --git a/openhands/server/session/session.py b/openhands/server/session/session.pyindex 9c92838201..2e6e33d32c 100644--- a/openhands/server/session/session.py+++ b/openhands/server/session/session.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import asyncioimport timefrom logging import LoggerAdapterdiff --git a/openhands/server/settings.py b/openhands/server/settings.pyindex ebcadec932..01c6f2dbed 100644--- a/openhands/server/settings.py+++ b/openhands/server/settings.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from __future__ import annotationsfrom pydantic import (diff --git a/openhands/server/shared.py b/openhands/server/shared.pyindex 1f0d3a4c26..9800f3712b 100644--- a/openhands/server/shared.py+++ b/openhands/server/shared.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import osimport socketiodiff --git a/openhands/server/static.py b/openhands/server/static.pyindex 15557f9d76..82893a84cf 100644--- a/openhands/server/static.py+++ b/openhands/server/static.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from fastapi.staticfiles import StaticFilesfrom starlette.responses import Responsefrom starlette.types import Scopediff --git a/openhands/server/types.py b/openhands/server/types.pyindex 717a0a41ac..6809f8256a 100644--- a/openhands/server/types.py+++ b/openhands/server/types.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from abc import ABC, abstractmethodfrom enum import Enumfrom typing import Any, ClassVar, Protocoldiff --git a/openhands/server/user_auth/default_user_auth.py b/openhands/server/user_auth/default_user_auth.pyindex 8bc79af156..29d9f19531 100644--- a/openhands/server/user_auth/default_user_auth.py+++ b/openhands/server/user_auth/default_user_auth.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from dataclasses import dataclassfrom fastapi import Requestdiff --git a/openhands/server/user_auth/user_auth.py b/openhands/server/user_auth/user_auth.pyindex c61c9ceb8b..98b30f9a7a 100644--- a/openhands/server/user_auth/user_auth.py+++ b/openhands/server/user_auth/user_auth.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.from __future__ import annotationsfrom abc import ABC, abstractmethoddiff --git a/openhands/server/utils.py b/openhands/server/utils.pyindex 7910db00ce..efbf125c1b 100644--- a/openhands/server/utils.py+++ b/openhands/server/utils.py@@ -1,3 +1,11 @@+# IMPORTANT: LEGACY V0 CODE+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0+# This module belongs to the old V0 web server. The V1 application server lives under openhands/app_server/.import uuidfrom fastapi import Depends, HTTPException, Request, status