diff --git a/openhands/agenthub/browsing_agent/browsing_agent.py b/openhands/agenthub/browsing_agent/browsing_agent.py index 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-V0 import os from browsergym.core.action.highlevel import HighLevelActionSet diff --git a/openhands/agenthub/browsing_agent/response_parser.py b/openhands/agenthub/browsing_agent/response_parser.py index 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-V0 import ast import re diff --git a/openhands/agenthub/browsing_agent/utils.py b/openhands/agenthub/browsing_agent/utils.py index 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-V0 import collections import re from warnings import warn diff --git a/openhands/agenthub/codeact_agent/codeact_agent.py b/openhands/agenthub/codeact_agent/codeact_agent.py index 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 os import sys from collections import deque diff --git a/openhands/agenthub/codeact_agent/function_calling.py b/openhands/agenthub/codeact_agent/function_calling.py index 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.py index 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-V0 from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk from openhands.agenthub.codeact_agent.tools.prompt import refine_prompt diff --git a/openhands/agenthub/codeact_agent/tools/browser.py b/openhands/agenthub/codeact_agent/tools/browser.py index 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-V0 from browsergym.core.action.highlevel import HighLevelActionSet from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk diff --git a/openhands/agenthub/codeact_agent/tools/condensation_request.py b/openhands/agenthub/codeact_agent/tools/condensation_request.py index 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-V0 from 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.py index 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-V0 from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk from openhands.llm.tool_names import FINISH_TOOL_NAME diff --git a/openhands/agenthub/codeact_agent/tools/ipython.py b/openhands/agenthub/codeact_agent/tools/ipython.py index 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-V0 from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk from 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.py index 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-V0 from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk from 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.py index 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-V0 import re import sys diff --git a/openhands/agenthub/codeact_agent/tools/security_utils.py b/openhands/agenthub/codeact_agent/tools/security_utils.py index 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.py index 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-V0 import os from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk diff --git a/openhands/agenthub/codeact_agent/tools/task_tracker.py b/openhands/agenthub/codeact_agent/tools/task_tracker.py index 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-V0 from litellm import ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk from openhands.llm.tool_names import TASK_TRACKER_TOOL_NAME diff --git a/openhands/agenthub/codeact_agent/tools/think.py b/openhands/agenthub/codeact_agent/tools/think.py index 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-V0 from 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.py index 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-V0 from typing import TypedDict from openhands.controller.agent import Agent diff --git a/openhands/agenthub/loc_agent/function_calling.py b/openhands/agenthub/loc_agent/function_calling.py index 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.py index 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-V0 from typing import TYPE_CHECKING import openhands.agenthub.loc_agent.function_calling as locagent_function_calling diff --git a/openhands/agenthub/loc_agent/tools/explore_structure.py b/openhands/agenthub/loc_agent/tools/explore_structure.py index 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-V0 from litellm import ( ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk, diff --git a/openhands/agenthub/loc_agent/tools/search_content.py b/openhands/agenthub/loc_agent/tools/search_content.py index 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-V0 from litellm import ( ChatCompletionToolParam, ChatCompletionToolParamFunctionChunk, diff --git a/openhands/agenthub/readonly_agent/function_calling.py b/openhands/agenthub/readonly_agent/function_calling.py index 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.py index 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 os diff --git a/openhands/agenthub/readonly_agent/tools/glob.py b/openhands/agenthub/readonly_agent/tools/glob.py index 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-V0 from 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.py index 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-V0 from 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.py index 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-V0 from 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.py index 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-V0 from browsergym.core.action.highlevel import HighLevelActionSet from browsergym.utils.obs import flatten_axtree_to_str diff --git a/openhands/controller/action_parser.py b/openhands/controller/action_parser.py index 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-V0 from abc import ABC, abstractmethod from typing import Any diff --git a/openhands/controller/agent.py b/openhands/controller/agent.py index 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 annotations from abc import ABC, abstractmethod diff --git a/openhands/controller/agent_controller.py b/openhands/controller/agent_controller.py index 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 annotations import asyncio diff --git a/openhands/controller/replay.py b/openhands/controller/replay.py index 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-V0 from __future__ import annotations from openhands.core.logger import openhands_logger as logger diff --git a/openhands/controller/state/control_flags.py b/openhands/controller/state/control_flags.py index 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-V0 from __future__ import annotations from dataclasses import dataclass diff --git a/openhands/controller/state/state.py b/openhands/controller/state/state.py index 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-V0 from __future__ import annotations import base64 diff --git a/openhands/controller/state/state_tracker.py b/openhands/controller/state/state_tracker.py index 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-V0 from openhands.controller.state.control_flags import ( BudgetControlFlag, IterationControlFlag, diff --git a/openhands/controller/stuck.py b/openhands/controller/stuck.py index 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-V0 from dataclasses import dataclass from typing import Optional diff --git a/openhands/core/config/__init__.py b/openhands/core/config/__init__.py index 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 AgentConfig from openhands.core.config.arg_utils import ( - get_cli_parser, get_evaluation_parser, get_headless_parser, ) -from openhands.core.config.cli_config import CLIConfig from 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.py index 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-V0 from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, ValidationError diff --git a/openhands/core/config/arg_utils.py b/openhands/core/config/arg_utils.py index 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 argparse diff --git a/openhands/core/config/cli_config.py b/openhands/core/config/cli_config.py deleted file mode 100644 index 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.py index 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-V0 from __future__ import annotations from typing import Literal, cast diff --git a/openhands/core/config/config_utils.py b/openhands/core/config/config_utils.py index 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-V0 from types import UnionType from typing import Any, get_args, get_origin diff --git a/openhands/core/config/extended_config.py b/openhands/core/config/extended_config.py index 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-V0 from typing import Any from pydantic import RootModel diff --git a/openhands/core/config/kubernetes_config.py b/openhands/core/config/kubernetes_config.py index 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-V0 from pydantic import BaseModel, ConfigDict, Field, ValidationError diff --git a/openhands/core/config/llm_config.py b/openhands/core/config/llm_config.py index 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-V0 from __future__ import annotations import os diff --git a/openhands/core/config/mcp_config.py b/openhands/core/config/mcp_config.py index 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-V0 from __future__ import annotations import os diff --git a/openhands/core/config/model_routing_config.py b/openhands/core/config/model_routing_config.py index 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-V0 from pydantic import BaseModel, ConfigDict, Field, ValidationError from openhands.core.config.llm_config import LLMConfig diff --git a/openhands/core/config/openhands_config.py b/openhands/core/config/openhands_config.py index 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-V0 import os from typing import Any, ClassVar @@ -5,7 +12,6 @@ from pydantic import BaseModel, ConfigDict, Field, SecretStr from openhands.core import logger from openhands.core.config.agent_config import AgentConfig -from openhands.core.config.cli_config import CLIConfig from 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.py index 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-V0 import os from pydantic import BaseModel, ConfigDict, Field, ValidationError, model_validator diff --git a/openhands/core/config/security_config.py b/openhands/core/config/security_config.py index 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-V0 from pydantic import BaseModel, ConfigDict, Field, ValidationError diff --git a/openhands/core/config/utils.py b/openhands/core/config/utils.py index 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-V0 import argparse import os import pathlib diff --git a/openhands/core/const/guide_url.py b/openhands/core/const/guide_url.py index 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-V0 TROUBLESHOOTING_URL = 'https://docs.all-hands.dev/usage/troubleshooting' diff --git a/openhands/core/download.py b/openhands/core/download.py index 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 download import openhands.agenthub # noqa F401 (we import this to get the agents registered) diff --git a/openhands/core/exceptions.py b/openhands/core/exceptions.py index 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.py index 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-V0 import copy import logging import os diff --git a/openhands/core/loop.py b/openhands/core/loop.py index 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-V0 import asyncio from openhands.controller import AgentController diff --git a/openhands/core/main.py b/openhands/core/main.py index 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-V0 import asyncio import json import os diff --git a/openhands/core/message.py b/openhands/core/message.py index 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-V0 from enum import Enum from typing import Any, Literal diff --git a/openhands/core/message_utils.py b/openhands/core/message_utils.py index 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-V0 from openhands.events.event import Event from openhands.llm.metrics import Metrics, TokenUsage diff --git a/openhands/core/schema/action.py b/openhands/core/schema/action.py index 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-V0 from enum import Enum diff --git a/openhands/core/schema/agent.py b/openhands/core/schema/agent.py index 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-V0 from enum import Enum diff --git a/openhands/core/schema/exit_reason.py b/openhands/core/schema/exit_reason.py index 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-V0 from enum import Enum diff --git a/openhands/core/schema/observation.py b/openhands/core/schema/observation.py index 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-V0 from enum import Enum diff --git a/openhands/core/setup.py b/openhands/core/setup.py index 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-V0 import hashlib import os import uuid diff --git a/openhands/llm/async_llm.py b/openhands/llm/async_llm.py index 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-V0 import asyncio from functools import partial from typing import Any, Callable diff --git a/openhands/llm/bedrock.py b/openhands/llm/bedrock.py index 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-V0 import boto3 from openhands.core.logger import openhands_logger as logger diff --git a/openhands/llm/debug_mixin.py b/openhands/llm/debug_mixin.py index 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-V0 from logging import DEBUG from typing import Any diff --git a/openhands/llm/fn_call_converter.py b/openhands/llm/fn_call_converter.py index 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 calling diff --git a/openhands/llm/llm.py b/openhands/llm/llm.py index 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 copy import os import time diff --git a/openhands/llm/llm_registry.py b/openhands/llm/llm_registry.py index 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-V0 import copy from typing import Any, Callable from uuid import uuid4 diff --git a/openhands/llm/llm_utils.py b/openhands/llm/llm_utils.py index 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-V0 import copy from typing import TYPE_CHECKING diff --git a/openhands/llm/metrics.py b/openhands/llm/metrics.py index 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-V0 import copy import time diff --git a/openhands/llm/model_features.py b/openhands/llm/model_features.py index 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-V0 from __future__ import annotations from dataclasses import dataclass diff --git a/openhands/llm/retry_mixin.py b/openhands/llm/retry_mixin.py index 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-V0 from typing import Any, Callable from tenacity import ( diff --git a/openhands/llm/router/base.py b/openhands/llm/router/base.py index 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-V0 import copy from abc import abstractmethod from typing import TYPE_CHECKING, Any, Callable diff --git a/openhands/llm/router/rule_based/impl.py b/openhands/llm/router/rule_based/impl.py index 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-V0 from openhands.core.config import AgentConfig from openhands.core.logger import openhands_logger as logger from openhands.core.message import Message diff --git a/openhands/llm/streaming_llm.py b/openhands/llm/streaming_llm.py index 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-V0 import asyncio from functools import partial from typing import Any, Callable diff --git a/openhands/llm/tool_names.py b/openhands/llm/tool_names.py index 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__.py index 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 os import warnings diff --git a/openhands/server/app.py b/openhands/server/app.py index 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 contextlib import warnings from contextlib import asynccontextmanager diff --git a/openhands/server/config/server_config.py b/openhands/server/config/server_config.py index 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 os from openhands.core.logger import openhands_logger as logger diff --git a/openhands/server/constants.py b/openhands/server/constants.py index 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.py index 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 annotations from abc import ABC, abstractmethod diff --git a/openhands/server/conversation_manager/docker_nested_conversation_manager.py b/openhands/server/conversation_manager/docker_nested_conversation_manager.py index 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 annotations import asyncio diff --git a/openhands/server/conversation_manager/standalone_conversation_manager.py b/openhands/server/conversation_manager/standalone_conversation_manager.py index 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 asyncio import time from dataclasses import dataclass, field diff --git a/openhands/server/conversation_manager/utils.py b/openhands/server/conversation_manager/utils.py index 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.py index 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, field from openhands.events.event_store_abc import EventStoreABC diff --git a/openhands/server/data_models/conversation_info.py b/openhands/server/data_models/conversation_info.py index 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, field from datetime import datetime, timezone diff --git a/openhands/server/data_models/conversation_info_result_set.py b/openhands/server/data_models/conversation_info_result_set.py index 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, field from openhands.server.data_models.conversation_info import ConversationInfo diff --git a/openhands/server/data_models/feedback.py b/openhands/server/data_models/feedback.py index 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 json from typing import Any, Literal diff --git a/openhands/server/dependencies.py b/openhands/server/dependencies.py index 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 os from fastapi import Depends, HTTPException, status diff --git a/openhands/server/file_config.py b/openhands/server/file_config.py index 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 os import re diff --git a/openhands/server/files.py b/openhands/server/files.py index 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.py index 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 os import socketio diff --git a/openhands/server/listen_socket.py b/openhands/server/listen_socket.py index 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 asyncio import os from typing import Any diff --git a/openhands/server/middleware.py b/openhands/server/middleware.py index 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 asyncio import os from collections import defaultdict diff --git a/openhands/server/mock/listen.py b/openhands/server/mock/listen.py index 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 uvicorn from fastapi import FastAPI, WebSocket diff --git a/openhands/server/monitoring.py b/openhands/server/monitoring.py index 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 OpenHandsConfig from openhands.events.event import Event diff --git a/openhands/server/routes/conversation.py b/openhands/server/routes/conversation.py index 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 uuid from fastapi import APIRouter, Depends, HTTPException, Request, status diff --git a/openhands/server/routes/feedback.py b/openhands/server/routes/feedback.py index 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, status from fastapi.responses import JSONResponse diff --git a/openhands/server/routes/files.py b/openhands/server/routes/files.py index 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 os from typing import Any diff --git a/openhands/server/routes/git.py b/openhands/server/routes/git.py index 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 MappingProxyType from typing import Annotated, cast diff --git a/openhands/server/routes/health.py b/openhands/server/routes/health.py index 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 FastAPI from openhands.runtime.utils.system_stats import get_system_info diff --git a/openhands/server/routes/manage_conversations.py b/openhands/server/routes/manage_conversations.py index 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 asyncio import base64 import itertools diff --git a/openhands/server/routes/public.py b/openhands/server/routes/public.py index 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 Any from fastapi import APIRouter diff --git a/openhands/server/routes/secrets.py b/openhands/server/routes/secrets.py index 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, status from fastapi.responses import JSONResponse diff --git a/openhands/server/routes/security.py b/openhands/server/routes/security.py index 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.py index 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, status from fastapi.responses import JSONResponse diff --git a/openhands/server/routes/trajectory.py b/openhands/server/routes/trajectory.py index 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, status from fastapi.responses import JSONResponse diff --git a/openhands/server/services/conversation_service.py b/openhands/server/services/conversation_service.py index 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 uuid from types import MappingProxyType from typing import Any diff --git a/openhands/server/services/conversation_stats.py b/openhands/server/services/conversation_stats.py index 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 base64 import pickle from threading import Lock diff --git a/openhands/server/session/agent_session.py b/openhands/server/session/agent_session.py index 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 asyncio import json import time diff --git a/openhands/server/session/conversation.py b/openhands/server/session/conversation.py index 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 asyncio from openhands.core.config import OpenHandsConfig diff --git a/openhands/server/session/conversation_init_data.py b/openhands/server/session/conversation_init_data.py index 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 Mapping from types import MappingProxyType diff --git a/openhands/server/session/session.py b/openhands/server/session/session.py index 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 asyncio import time from logging import LoggerAdapter diff --git a/openhands/server/settings.py b/openhands/server/settings.py index 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 annotations from pydantic import ( diff --git a/openhands/server/shared.py b/openhands/server/shared.py index 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 os import socketio diff --git a/openhands/server/static.py b/openhands/server/static.py index 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 StaticFiles from starlette.responses import Response from starlette.types import Scope diff --git a/openhands/server/types.py b/openhands/server/types.py index 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, abstractmethod from enum import Enum from typing import Any, ClassVar, Protocol diff --git a/openhands/server/user_auth/default_user_auth.py b/openhands/server/user_auth/default_user_auth.py index 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 dataclass from fastapi import Request diff --git a/openhands/server/user_auth/user_auth.py b/openhands/server/user_auth/user_auth.py index 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 annotations from abc import ABC, abstractmethod diff --git a/openhands/server/utils.py b/openhands/server/utils.py index 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 uuid from fastapi import Depends, HTTPException, Request, status