π OpenHands: AI-Driven Development
chore: add deprecation notices to all runtime directory files (#12772)
Tim O'Farrellf460057f5829
diff --git a/openhands/runtime/__init__.py b/openhands/runtime/__init__.pyindex eabb1c0ee3..f987ad3f2d 100644--- a/openhands/runtime/__init__.py+++ b/openhands/runtime/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import importlibfrom openhands.runtime.base import Runtimediff --git a/openhands/runtime/action_execution_server.py b/openhands/runtime/action_execution_server.pyindex 896b25ffe9..74eed44aa9 100644--- a/openhands/runtime/action_execution_server.py+++ b/openhands/runtime/action_execution_server.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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 is the main file for the runtime client.It is responsible for executing actions received from OpenHands backend and producing observations.diff --git a/openhands/runtime/base.py b/openhands/runtime/base.pyindex 62ac926921..37951eff33 100644--- a/openhands/runtime/base.py+++ b/openhands/runtime/base.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asyncioimport atexitimport copydiff --git a/openhands/runtime/browser/__init__.py b/openhands/runtime/browser/__init__.pyindex 2687e03c68..c6e285c154 100644--- a/openhands/runtime/browser/__init__.py+++ b/openhands/runtime/browser/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.runtime.browser.utils import browse__all__ = ['browse']diff --git a/openhands/runtime/browser/base64.py b/openhands/runtime/browser/base64.pyindex c5320aa8b8..05de3dbe86 100644--- a/openhands/runtime/browser/base64.py+++ b/openhands/runtime/browser/base64.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import base64import iodiff --git a/openhands/runtime/browser/browser_env.py b/openhands/runtime/browser/browser_env.pyindex c8d09d9c2b..bb6219a8a7 100644--- a/openhands/runtime/browser/browser_env.py+++ b/openhands/runtime/browser/browser_env.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import atexitimport jsonimport multiprocessingdiff --git a/openhands/runtime/browser/utils.py b/openhands/runtime/browser/utils.pyindex 378e3fea32..ffd92c6ce4 100644--- a/openhands/runtime/browser/utils.py+++ b/openhands/runtime/browser/utils.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import base64import datetimeimport osdiff --git a/openhands/runtime/builder/__init__.py b/openhands/runtime/builder/__init__.pyindex fcebb8a240..8398c49f74 100644--- a/openhands/runtime/builder/__init__.py+++ b/openhands/runtime/builder/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.runtime.builder.base import RuntimeBuilderfrom openhands.runtime.builder.docker import DockerRuntimeBuilderdiff --git a/openhands/runtime/builder/base.py b/openhands/runtime/builder/base.pyindex 6bc1155d7f..478dff7357 100644--- a/openhands/runtime/builder/base.py+++ b/openhands/runtime/builder/base.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import abcdiff --git a/openhands/runtime/builder/docker.py b/openhands/runtime/builder/docker.pyindex 5f0fb2027b..4afb5098e2 100644--- a/openhands/runtime/builder/docker.py+++ b/openhands/runtime/builder/docker.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import datetimeimport osimport subprocessdiff --git a/openhands/runtime/builder/remote.py b/openhands/runtime/builder/remote.pyindex 60dee570a8..820b89c3a6 100644--- a/openhands/runtime/builder/remote.py+++ b/openhands/runtime/builder/remote.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import base64import ioimport tarfilediff --git a/openhands/runtime/file_viewer_server.py b/openhands/runtime/file_viewer_server.pyindex dc86e03750..3760016842 100644--- a/openhands/runtime/file_viewer_server.py+++ b/openhands/runtime/file_viewer_server.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""A tiny, isolated server that provides only the /view endpoint from the action execution server.This server has no authentication and only listens to localhost traffic."""diff --git a/openhands/runtime/impl/__init__.py b/openhands/runtime/impl/__init__.pyindex 4398d70a3e..00e04d3a38 100644--- a/openhands/runtime/impl/__init__.py+++ b/openhands/runtime/impl/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""Runtime implementations for OpenHands."""from openhands.runtime.impl.action_execution.action_execution_client import (diff --git a/openhands/runtime/impl/action_execution/action_execution_client.py b/openhands/runtime/impl/action_execution/action_execution_client.pyindex 554a7bfd5b..4598e9e057 100644--- a/openhands/runtime/impl/action_execution/action_execution_client.py+++ b/openhands/runtime/impl/action_execution/action_execution_client.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osimport tempfileimport threadingdiff --git a/openhands/runtime/impl/cli/__init__.py b/openhands/runtime/impl/cli/__init__.pyindex ae3165ebfb..9b6285357d 100644--- a/openhands/runtime/impl/cli/__init__.py+++ b/openhands/runtime/impl/cli/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""CLI Runtime implementation for OpenHands."""from openhands.runtime.impl.cli.cli_runtime import CLIRuntimediff --git a/openhands/runtime/impl/cli/cli_runtime.py b/openhands/runtime/impl/cli/cli_runtime.pyindex ae4752c2a8..e657c9ffbb 100644--- a/openhands/runtime/impl/cli/cli_runtime.py+++ b/openhands/runtime/impl/cli/cli_runtime.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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 runtime runs commands locally using subprocess and performs file operations using Python's standard library.It does not implement browser functionality."""diff --git a/openhands/runtime/impl/docker/containers.py b/openhands/runtime/impl/docker/containers.pyindex 32a5ba1353..29af04ed4a 100644--- a/openhands/runtime/impl/docker/containers.py+++ b/openhands/runtime/impl/docker/containers.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import dockerdiff --git a/openhands/runtime/impl/docker/docker_runtime.py b/openhands/runtime/impl/docker/docker_runtime.pyindex 665edbea75..968e338725 100644--- a/openhands/runtime/impl/docker/docker_runtime.py+++ b/openhands/runtime/impl/docker/docker_runtime.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osimport platformimport typingdiff --git a/openhands/runtime/impl/kubernetes/kubernetes_runtime.py b/openhands/runtime/impl/kubernetes/kubernetes_runtime.pyindex 0ad2d4efe6..8850cd1fd5 100644--- a/openhands/runtime/impl/kubernetes/kubernetes_runtime.py+++ b/openhands/runtime/impl/kubernetes/kubernetes_runtime.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from functools import lru_cachefrom typing import Callablefrom uuid import UUIDdiff --git a/openhands/runtime/impl/local/__init__.py b/openhands/runtime/impl/local/__init__.pyindex 92ae64ebb1..0cf2dc4ea8 100644--- a/openhands/runtime/impl/local/__init__.py+++ b/openhands/runtime/impl/local/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""Local runtime implementation."""from openhands.runtime.impl.local.local_runtime import LocalRuntimediff --git a/openhands/runtime/impl/local/local_runtime.py b/openhands/runtime/impl/local/local_runtime.pyindex cf81b222eb..4f7804f705 100644--- a/openhands/runtime/impl/local/local_runtime.py+++ b/openhands/runtime/impl/local/local_runtime.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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 runtime runs the action_execution_server directly on the local machine without Docker."""import osdiff --git a/openhands/runtime/impl/remote/remote_runtime.py b/openhands/runtime/impl/remote/remote_runtime.pyindex 7cba38a8e2..f851550637 100644--- a/openhands/runtime/impl/remote/remote_runtime.py+++ b/openhands/runtime/impl/remote/remote_runtime.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import jsonimport loggingimport osdiff --git a/openhands/runtime/mcp/proxy/__init__.py b/openhands/runtime/mcp/proxy/__init__.pyindex 141a22e4ee..ae8d947977 100644--- a/openhands/runtime/mcp/proxy/__init__.py+++ b/openhands/runtime/mcp/proxy/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""MCP Proxy module for OpenHands."""from openhands.runtime.mcp.proxy.manager import MCPProxyManagerdiff --git a/openhands/runtime/mcp/proxy/manager.py b/openhands/runtime/mcp/proxy/manager.pyindex a9234de30b..21084344eb 100644--- a/openhands/runtime/mcp/proxy/manager.py+++ b/openhands/runtime/mcp/proxy/manager.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""MCP Proxy Manager for OpenHands.This module provides a manager class for handling FastMCP proxy instances,diff --git a/openhands/runtime/plugins/__init__.py b/openhands/runtime/plugins/__init__.pyindex e8a30ef04a..11f92ef843 100644--- a/openhands/runtime/plugins/__init__.py+++ b/openhands/runtime/plugins/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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# Requirementsfrom openhands.runtime.plugins.agent_skills import (AgentSkillsPlugin,diff --git a/openhands/runtime/plugins/agent_skills/__init__.py b/openhands/runtime/plugins/agent_skills/__init__.pyindex 6144abe1e1..7e2808a959 100644--- a/openhands/runtime/plugins/agent_skills/__init__.py+++ b/openhands/runtime/plugins/agent_skills/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from dataclasses import dataclassfrom openhands.events.action import Actiondiff --git a/openhands/runtime/plugins/agent_skills/agentskills.py b/openhands/runtime/plugins/agent_skills/agentskills.pyindex cef6d88b08..40cb315a28 100644--- a/openhands/runtime/plugins/agent_skills/agentskills.py+++ b/openhands/runtime/plugins/agent_skills/agentskills.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from inspect import signaturefrom openhands.runtime.plugins.agent_skills import file_ops, file_readerdiff --git a/openhands/runtime/plugins/agent_skills/file_editor/__init__.py b/openhands/runtime/plugins/agent_skills/file_editor/__init__.pyindex 971335eeea..67bbdcea4b 100644--- a/openhands/runtime/plugins/agent_skills/file_editor/__init__.py+++ b/openhands/runtime/plugins/agent_skills/file_editor/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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 imports a global singleton of the `EditTool` class as well as raw functions that exposeits __call__.The implementation of the `EditTool` class can be found at: https://github.com/OpenHands/openhands-aci/.diff --git a/openhands/runtime/plugins/agent_skills/file_ops/__init__.py b/openhands/runtime/plugins/agent_skills/file_ops/__init__.pyindex 26b38437a4..db75a71ca8 100644--- a/openhands/runtime/plugins/agent_skills/file_ops/__init__.py+++ b/openhands/runtime/plugins/agent_skills/file_ops/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.runtime.plugins.agent_skills.file_ops import file_opsfrom openhands.runtime.plugins.agent_skills.utils.dependency import import_functionsdiff --git a/openhands/runtime/plugins/agent_skills/file_ops/file_ops.py b/openhands/runtime/plugins/agent_skills/file_ops/file_ops.pyindex 640fcbb212..c8d3a75eeb 100644--- a/openhands/runtime/plugins/agent_skills/file_ops/file_ops.py+++ b/openhands/runtime/plugins/agent_skills/file_ops/file_ops.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""File operations module for OpenHands agent.This module provides a collection of file manipulation skills that enable the OpenHandsdiff --git a/openhands/runtime/plugins/agent_skills/file_reader/__init__.py b/openhands/runtime/plugins/agent_skills/file_reader/__init__.pyindex 70d080a94d..231d6bc8ed 100644--- a/openhands/runtime/plugins/agent_skills/file_reader/__init__.py+++ b/openhands/runtime/plugins/agent_skills/file_reader/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.runtime.plugins.agent_skills.file_reader import file_readersfrom openhands.runtime.plugins.agent_skills.utils.dependency import import_functionsdiff --git a/openhands/runtime/plugins/agent_skills/file_reader/file_readers.py b/openhands/runtime/plugins/agent_skills/file_reader/file_readers.pyindex 48aec78ad9..ac928eba9d 100644--- a/openhands/runtime/plugins/agent_skills/file_reader/file_readers.py+++ b/openhands/runtime/plugins/agent_skills/file_reader/file_readers.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""File reader skills for the OpenHands agent.This module provides various functions to parse and extract content from different file types,diff --git a/openhands/runtime/plugins/agent_skills/repo_ops/__init__.py b/openhands/runtime/plugins/agent_skills/repo_ops/__init__.pyindex d8df644022..1e2268e094 100644--- a/openhands/runtime/plugins/agent_skills/repo_ops/__init__.py+++ b/openhands/runtime/plugins/agent_skills/repo_ops/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.runtime.plugins.agent_skills.repo_ops import repo_opsfrom openhands.runtime.plugins.agent_skills.utils.dependency import import_functionsdiff --git a/openhands/runtime/plugins/agent_skills/repo_ops/repo_ops.py b/openhands/runtime/plugins/agent_skills/repo_ops/repo_ops.pyindex 89d1d45534..34d7a65ba1 100644--- a/openhands/runtime/plugins/agent_skills/repo_ops/repo_ops.py+++ b/openhands/runtime/plugins/agent_skills/repo_ops/repo_ops.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands_aci.indexing.locagent.tools import (explore_tree_structure,get_entity_contents,diff --git a/openhands/runtime/plugins/agent_skills/utils/config.py b/openhands/runtime/plugins/agent_skills/utils/config.pyindex 6bdf192fe8..948fd4d42e 100644--- a/openhands/runtime/plugins/agent_skills/utils/config.py+++ b/openhands/runtime/plugins/agent_skills/utils/config.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom openai import OpenAIdiff --git a/openhands/runtime/plugins/agent_skills/utils/dependency.py b/openhands/runtime/plugins/agent_skills/utils/dependency.pyindex 6143bd93e8..e0889fbb21 100644--- a/openhands/runtime/plugins/agent_skills/utils/dependency.py+++ b/openhands/runtime/plugins/agent_skills/utils/dependency.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from types import ModuleTypediff --git a/openhands/runtime/plugins/jupyter/__init__.py b/openhands/runtime/plugins/jupyter/__init__.pyindex 1baeaabdd2..b5660864bf 100644--- a/openhands/runtime/plugins/jupyter/__init__.py+++ b/openhands/runtime/plugins/jupyter/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asyncioimport osimport subprocessdiff --git a/openhands/runtime/plugins/jupyter/execute_server.py b/openhands/runtime/plugins/jupyter/execute_server.pyindex 6d974b5b75..b96c4e3154 100644--- a/openhands/runtime/plugins/jupyter/execute_server.py+++ b/openhands/runtime/plugins/jupyter/execute_server.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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#!/usr/bin/env python3import asynciodiff --git a/openhands/runtime/plugins/requirement.py b/openhands/runtime/plugins/requirement.pyindex 706d9b3fae..26446d143e 100644--- a/openhands/runtime/plugins/requirement.py+++ b/openhands/runtime/plugins/requirement.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from abc import abstractmethodfrom dataclasses import dataclassdiff --git a/openhands/runtime/plugins/vscode/__init__.py b/openhands/runtime/plugins/vscode/__init__.pyindex 865a69c987..80c56fbfa7 100644--- a/openhands/runtime/plugins/vscode/__init__.py+++ b/openhands/runtime/plugins/vscode/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import asyncioimport osimport shutildiff --git a/openhands/runtime/runtime_status.py b/openhands/runtime/runtime_status.pyindex 1c22d4acab..cecae128fd 100644--- a/openhands/runtime/runtime_status.py+++ b/openhands/runtime/runtime_status.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from enum import Enumdiff --git a/openhands/runtime/utils/__init__.py b/openhands/runtime/utils/__init__.pyindex 622a0b6095..3695a3069e 100644--- a/openhands/runtime/utils/__init__.py+++ b/openhands/runtime/utils/__init__.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from openhands.runtime.utils.system import (display_number_matrix,find_available_tcp_port,diff --git a/openhands/runtime/utils/bash.py b/openhands/runtime/utils/bash.pyindex 988873ad8a..66bc399a0a 100644--- a/openhands/runtime/utils/bash.py+++ b/openhands/runtime/utils/bash.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osimport reimport timediff --git a/openhands/runtime/utils/bash_constants.py b/openhands/runtime/utils/bash_constants.pyindex 6258014724..2ee33d7d65 100644--- a/openhands/runtime/utils/bash_constants.py+++ b/openhands/runtime/utils/bash_constants.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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# Common timeout message that can be used across different timeout scenariosTIMEOUT_MESSAGE_TEMPLATE = ("You may wait longer to see additional output by sending empty command '', "diff --git a/openhands/runtime/utils/command.py b/openhands/runtime/utils/command.pyindex affecc2575..d27525f858 100644--- a/openhands/runtime/utils/command.py+++ b/openhands/runtime/utils/command.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom openhands.core.config import OpenHandsConfigdiff --git a/openhands/runtime/utils/edit.py b/openhands/runtime/utils/edit.pyindex 7be5897ecf..37075a016a 100644--- a/openhands/runtime/utils/edit.py+++ b/openhands/runtime/utils/edit.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osimport reimport tempfilediff --git a/openhands/runtime/utils/file_viewer.py b/openhands/runtime/utils/file_viewer.pyindex 181e78ddd9..b3eb9b2d60 100644--- a/openhands/runtime/utils/file_viewer.py+++ b/openhands/runtime/utils/file_viewer.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""Utility module for generating file viewer HTML content."""import base64diff --git a/openhands/runtime/utils/files.py b/openhands/runtime/utils/files.pyindex 772293195a..5000bb10a4 100644--- a/openhands/runtime/utils/files.py+++ b/openhands/runtime/utils/files.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osfrom pathlib import Pathdiff --git a/openhands/runtime/utils/git_changes.py b/openhands/runtime/utils/git_changes.pyindex d53a9e8de4..1a83844cfd 100644--- a/openhands/runtime/utils/git_changes.py+++ b/openhands/runtime/utils/git_changes.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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#!/usr/bin/env python3"""Get git changes in the current working directory relative to the remote origin if possible.NOTE: Since this is run as a script, there should be no imports from project files!diff --git a/openhands/runtime/utils/git_diff.py b/openhands/runtime/utils/git_diff.pyindex eb9cfdf990..b42dc861e4 100644--- a/openhands/runtime/utils/git_diff.py+++ b/openhands/runtime/utils/git_diff.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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#!/usr/bin/env python3"""Get git diff in a single git file for the closest git repo in the file systemNOTE: Since this is run as a script, there should be no imports from project files!diff --git a/openhands/runtime/utils/git_handler.py b/openhands/runtime/utils/git_handler.pyindex 000acfb2d0..ba85aa34d1 100644--- a/openhands/runtime/utils/git_handler.py+++ b/openhands/runtime/utils/git_handler.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import jsonfrom dataclasses import dataclassfrom pathlib import Pathdiff --git a/openhands/runtime/utils/log_capture.py b/openhands/runtime/utils/log_capture.pyindex 9cca3658c7..9f4edf28bf 100644--- a/openhands/runtime/utils/log_capture.py+++ b/openhands/runtime/utils/log_capture.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import ioimport loggingfrom contextlib import asynccontextmanagerdiff --git a/openhands/runtime/utils/log_streamer.py b/openhands/runtime/utils/log_streamer.pyindex 022b85dfdb..455e87004a 100644--- a/openhands/runtime/utils/log_streamer.py+++ b/openhands/runtime/utils/log_streamer.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import threadingfrom typing import Callablediff --git a/openhands/runtime/utils/memory_monitor.py b/openhands/runtime/utils/memory_monitor.pyindex fe1209f751..5e2d6e58c8 100644--- a/openhands/runtime/utils/memory_monitor.py+++ b/openhands/runtime/utils/memory_monitor.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""Memory monitoring utilities for the runtime."""import threadingdiff --git a/openhands/runtime/utils/port_lock.py b/openhands/runtime/utils/port_lock.pyindex ea784451c9..0e655fa79a 100644--- a/openhands/runtime/utils/port_lock.py+++ b/openhands/runtime/utils/port_lock.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""File-based port locking system for preventing race conditions in port allocation."""import osdiff --git a/openhands/runtime/utils/request.py b/openhands/runtime/utils/request.pyindex 4cd50fff80..3c71b28325 100644--- a/openhands/runtime/utils/request.py+++ b/openhands/runtime/utils/request.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import jsonfrom typing import Anydiff --git a/openhands/runtime/utils/runtime_build.py b/openhands/runtime/utils/runtime_build.pyindex f4f5d8904e..60be727112 100644--- a/openhands/runtime/utils/runtime_build.py+++ b/openhands/runtime/utils/runtime_build.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import argparseimport hashlibimport osdiff --git a/openhands/runtime/utils/runtime_init.py b/openhands/runtime/utils/runtime_init.pyindex a042f549d5..31d8128f6d 100644--- a/openhands/runtime/utils/runtime_init.py+++ b/openhands/runtime/utils/runtime_init.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import osimport subprocessimport sysdiff --git a/openhands/runtime/utils/singleton.py b/openhands/runtime/utils/singleton.pyindex e69de29bb2..bca669783c 100644--- a/openhands/runtime/utils/singleton.py+++ b/openhands/runtime/utils/singleton.py@@ -0,0 +1,7 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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-V0diff --git a/openhands/runtime/utils/system.py b/openhands/runtime/utils/system.pyindex 171a6575c2..6734ddcb81 100644--- a/openhands/runtime/utils/system.py+++ b/openhands/runtime/utils/system.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0import randomimport socketimport timediff --git a/openhands/runtime/utils/system_stats.py b/openhands/runtime/utils/system_stats.pyindex dda66f907c..bc71ac7db3 100644--- a/openhands/runtime/utils/system_stats.py+++ b/openhands/runtime/utils/system_stats.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""Utilities for getting system resource statistics."""import timediff --git a/openhands/runtime/utils/tenacity_stop.py b/openhands/runtime/utils/tenacity_stop.pyindex d9aa83a613..2990f9e02b 100644--- a/openhands/runtime/utils/tenacity_stop.py+++ b/openhands/runtime/utils/tenacity_stop.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# This file is part of the legacy (V0) implementation of OpenHands and will be removed soon as we complete the migration to V1.+# OpenHands V1 uses the Software Agent SDK for the agentic core and runs a new application server. Please refer to:+# - V1 agentic core (SDK): https://github.com/OpenHands/software-agent-sdk+# - V1 application server (in this repo): openhands/app_server/+# Unless you are working on deprecation, please avoid extending this legacy file and consult the V1 codepaths above.+# Tag: Legacy-V0from tenacity import RetryCallStatefrom tenacity.stop import stop_basediff --git a/openhands/runtime/utils/windows_bash.py b/openhands/runtime/utils/windows_bash.pyindex 6771664939..4b93c9a36f 100644--- a/openhands/runtime/utils/windows_bash.py+++ b/openhands/runtime/utils/windows_bash.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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 provides a Windows-specific implementation for running commandsin a PowerShell session using the pythonnet library to interact with the .NETPowerShell SDK directly. This aims to provide a more robust and integrateddiff --git a/openhands/runtime/utils/windows_exceptions.py b/openhands/runtime/utils/windows_exceptions.pyindex 3863af6901..a7c3dab34a 100644--- a/openhands/runtime/utils/windows_exceptions.py+++ b/openhands/runtime/utils/windows_exceptions.py@@ -1,3 +1,10 @@+# IMPORTANT: LEGACY V0 CODE - Deprecated since version 1.0.0, scheduled for removal April 1, 2026+# 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"""Custom exceptions for Windows-specific runtime issues."""