mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
* Added a push action * Tests * Add tests * Fix capitalization * Update * Fix typo * Fix integration tests * Added poetry.lock * Set lock * Fix action parsing * Update integration test output * Updated prompt * Update integration test * Add github token to default config --------- Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
84 lines
1.9 KiB
Python
84 lines
1.9 KiB
Python
from pydantic import BaseModel, Field
|
|
|
|
__all__ = [
|
|
'ActionType'
|
|
]
|
|
|
|
|
|
class ActionTypeSchema(BaseModel):
|
|
INIT: str = Field(default='initialize')
|
|
"""Initializes the agent. Only sent by client.
|
|
"""
|
|
|
|
START: str = Field(default='start')
|
|
"""Starts a new development task. Only sent by the client.
|
|
"""
|
|
|
|
READ: str = Field(default='read')
|
|
"""Reads the content of a file.
|
|
"""
|
|
|
|
WRITE: str = Field(default='write')
|
|
"""Writes the content to a file.
|
|
"""
|
|
|
|
RUN: str = Field(default='run')
|
|
"""Runs a command.
|
|
"""
|
|
|
|
KILL: str = Field(default='kill')
|
|
"""Kills a background command.
|
|
"""
|
|
|
|
BROWSE: str = Field(default='browse')
|
|
"""Opens a web page.
|
|
"""
|
|
|
|
RECALL: str = Field(default='recall')
|
|
"""Searches long-term memory
|
|
"""
|
|
|
|
THINK: str = Field(default='think')
|
|
"""Allows the agent to make a plan, set a goal, or record thoughts
|
|
"""
|
|
|
|
DELEGATE: str = Field(default='delegate')
|
|
"""Delegates a task to another agent.
|
|
"""
|
|
|
|
FINISH: str = Field(default='finish')
|
|
"""If you're absolutely certain that you've completed your task and have tested your work,
|
|
use the finish action to stop working.
|
|
"""
|
|
|
|
NULL: str = Field(default='null')
|
|
|
|
SUMMARIZE: str = Field(default='summarize')
|
|
|
|
ADD_TASK: str = Field(default='add_task')
|
|
|
|
MODIFY_TASK: str = Field(default='modify_task')
|
|
|
|
PAUSE: str = Field(default='pause')
|
|
"""Pauses the task.
|
|
"""
|
|
|
|
RESUME: str = Field(default='resume')
|
|
"""Resumes the task.
|
|
"""
|
|
|
|
STOP: str = Field(default='stop')
|
|
"""Stops the task. Must send a start action to restart a new task.
|
|
"""
|
|
|
|
CHANGE_TASK_STATE: str = Field(default='change_task_state')
|
|
|
|
PUSH: str = Field(default='push')
|
|
"""Push a branch to github."""
|
|
|
|
SEND_PR: str = Field(default='send_pr')
|
|
"""Send a PR to github."""
|
|
|
|
|
|
ActionType = ActionTypeSchema()
|