mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
32 lines
1.4 KiB
Python
32 lines
1.4 KiB
Python
# 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
|
|
from dataclasses import dataclass
|
|
|
|
from openhands.events.action import Action
|
|
from openhands.events.observation import Observation
|
|
from openhands.runtime.plugins.agent_skills import agentskills
|
|
from openhands.runtime.plugins.requirement import Plugin, PluginRequirement
|
|
|
|
|
|
@dataclass
|
|
class AgentSkillsRequirement(PluginRequirement):
|
|
name: str = 'agent_skills'
|
|
documentation: str = agentskills.DOCUMENTATION
|
|
|
|
|
|
class AgentSkillsPlugin(Plugin):
|
|
name: str = 'agent_skills'
|
|
|
|
async def initialize(self, username: str) -> None:
|
|
"""Initialize the plugin."""
|
|
pass
|
|
|
|
async def run(self, action: Action) -> Observation:
|
|
"""Run the plugin for a given action."""
|
|
raise NotImplementedError('AgentSkillsPlugin does not support run method')
|