-
Notifications
You must be signed in to change notification settings - Fork 5.9k
/
Copy pathaction.py
88 lines (64 loc) · 1.77 KB
/
action.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from enum import Enum
class ActionType(str, Enum):
MESSAGE = 'message'
"""Represents a message.
"""
START = 'start'
"""Starts a new development task OR send chat from the user. Only sent by the client.
"""
READ = 'read'
"""Reads the content of a file.
"""
WRITE = 'write'
"""Writes the content to a file.
"""
EDIT = 'edit'
"""Edits a file by providing a draft.
"""
RUN = 'run'
"""Runs a command.
"""
RUN_IPYTHON = 'run_ipython'
"""Runs a IPython cell.
"""
BROWSE = 'browse'
"""Opens a web page.
"""
BROWSE_INTERACTIVE = 'browse_interactive'
"""Interact with the browser instance.
"""
DELEGATE = 'delegate'
"""Delegates a task to another agent.
"""
THINK = 'think'
"""Logs a thought.
"""
FINISH = 'finish'
"""If you're absolutely certain that you've completed your task and have tested your work,
use the finish action to stop working.
"""
REJECT = 'reject'
"""If you're absolutely certain that you cannot complete the task with given requirements,
use the reject action to stop working.
"""
NULL = 'null'
PAUSE = 'pause'
"""Pauses the task.
"""
RESUME = 'resume'
"""Resumes the task.
"""
STOP = 'stop'
"""Stops the task. Must send a start action to restart a new task.
"""
CHANGE_AGENT_STATE = 'change_agent_state'
PUSH = 'push'
"""Push a branch to github."""
SEND_PR = 'send_pr'
"""Send a PR to github."""
RECALL = 'recall'
"""Retrieves content from a user workspace, microagent, or other source."""
CONDENSATION = 'condensation'
"""Condenses a list of events into a summary."""
MCP_CALL_TOOL = 'mcp_call_tool'
"""Calls a MCP tool."""