Files
OpenHands/opendevin/runtime/plugins/requirement.py
Xingyao Wang e6fa5b5df0 chore: remove unused plugin mixin (#3332)
* remove unused plugin mixin

* remove unused field

* remove unused comments
2024-08-09 20:50:49 -04:00

32 lines
662 B
Python

from abc import abstractmethod
from dataclasses import dataclass
from opendevin.events.action import Action
from opendevin.events.observation import Observation
class Plugin:
"""Base class for a plugin.
This will be initialized by the runtime client, which will run inside docker.
"""
name: str
@abstractmethod
async def initialize(self, username: str):
"""Initialize the plugin."""
pass
@abstractmethod
async def run(self, action: Action) -> Observation:
"""Run the plugin for a given action."""
pass
@dataclass
class PluginRequirement:
"""Requirement for a plugin."""
name: str