mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
25 lines
775 B
Python
25 lines
775 B
Python
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')
|