beswarm 0.3.16__py3-none-any.whl → 0.3.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of beswarm might be problematic. Click here for more details.
- beswarm/agents/planact.py +11 -10
- {beswarm-0.3.16.dist-info → beswarm-0.3.17.dist-info}/METADATA +1 -1
- {beswarm-0.3.16.dist-info → beswarm-0.3.17.dist-info}/RECORD +6 -6
- {beswarm-0.3.16.dist-info → beswarm-0.3.17.dist-info}/WHEEL +0 -0
- {beswarm-0.3.16.dist-info → beswarm-0.3.17.dist-info}/entry_points.txt +0 -0
- {beswarm-0.3.16.dist-info → beswarm-0.3.17.dist-info}/top_level.txt +0 -0
beswarm/agents/planact.py
CHANGED
|
@@ -12,9 +12,9 @@ from ..broker import MessageBroker
|
|
|
12
12
|
from ..aient.aient.models import chatgpt
|
|
13
13
|
from ..aient.aient.plugins import get_function_call_list, registry
|
|
14
14
|
from ..prompt import worker_system_prompt, instruction_system_prompt, Goal
|
|
15
|
-
from ..utils import extract_xml_content, get_current_screen_image_message,
|
|
15
|
+
from ..utils import extract_xml_content, get_current_screen_image_message, register_mcp_tools, setup_logger
|
|
16
16
|
from ..aient.aient.models.chatgpt import ModelNotFoundError, TaskComplete, RetryFailedError, InputTokenCountExceededError, BadRequestError
|
|
17
|
-
from ..aient.aient.architext.architext import Messages,
|
|
17
|
+
from ..aient.aient.architext.architext import Messages, UserMessage, Texts
|
|
18
18
|
|
|
19
19
|
try:
|
|
20
20
|
from importlib import metadata
|
|
@@ -39,7 +39,7 @@ class BaseAgent:
|
|
|
39
39
|
self.config = agent_config
|
|
40
40
|
self.logger = agent_config.get("logger", None)
|
|
41
41
|
self.cache_messages = cache_messages
|
|
42
|
-
if cache_messages and isinstance(cache_messages, bool) and cache_messages
|
|
42
|
+
if cache_messages and isinstance(cache_messages, bool) and cache_messages:
|
|
43
43
|
self.cache_messages = Messages.load(self.pkl_file)
|
|
44
44
|
self.broker = broker
|
|
45
45
|
self.listen_topic = listen_topic
|
|
@@ -119,14 +119,14 @@ class InstructionAgent(BaseAgent):
|
|
|
119
119
|
raw_response = await self.agent.ask_async(instruction_prompt)
|
|
120
120
|
except ModelNotFoundError as e:
|
|
121
121
|
raise Exception(str(e))
|
|
122
|
-
except RetryFailedError
|
|
122
|
+
except RetryFailedError:
|
|
123
123
|
self.logger.error("❌ Commander retry failed, retrying...")
|
|
124
124
|
self.broker.publish(message, self.error_topic)
|
|
125
125
|
return
|
|
126
|
-
except InputTokenCountExceededError
|
|
126
|
+
except InputTokenCountExceededError:
|
|
127
127
|
self.broker.publish({"status": "error", "result": "The request body is too long, please try again."}, self.status_topic)
|
|
128
128
|
return
|
|
129
|
-
except BadRequestError
|
|
129
|
+
except BadRequestError:
|
|
130
130
|
self.broker.publish({"status": "error", "result": "Bad request error!"}, self.status_topic)
|
|
131
131
|
return
|
|
132
132
|
|
|
@@ -192,13 +192,13 @@ class WorkerAgent(BaseAgent):
|
|
|
192
192
|
except TaskComplete as e:
|
|
193
193
|
self.broker.publish({"status": "finished", "result": e.completion_message}, self.status_topic)
|
|
194
194
|
return
|
|
195
|
-
except InputTokenCountExceededError
|
|
195
|
+
except InputTokenCountExceededError:
|
|
196
196
|
self.broker.publish({"status": "error", "result": "The request body is too long, please try again."}, self.status_topic)
|
|
197
197
|
return
|
|
198
|
-
except BadRequestError
|
|
198
|
+
except BadRequestError:
|
|
199
199
|
self.broker.publish({"status": "error", "result": "Bad request error!"}, self.status_topic)
|
|
200
200
|
return
|
|
201
|
-
except RetryFailedError
|
|
201
|
+
except RetryFailedError:
|
|
202
202
|
self.logger.error("❌ Worker retry failed, retrying...")
|
|
203
203
|
self.broker.publish(message, self.error_topic)
|
|
204
204
|
return
|
|
@@ -261,7 +261,8 @@ class BrokerWorker:
|
|
|
261
261
|
all_mcp_tools = await self.mcp_manager.get_all_tools()
|
|
262
262
|
self.tools.extend([tool.name for tool in sum(all_mcp_tools.values(), [])])
|
|
263
263
|
self.tools = [item for item in self.tools if not isinstance(item, dict)]
|
|
264
|
-
if "task_complete" not in self.tools:
|
|
264
|
+
if "task_complete" not in self.tools:
|
|
265
|
+
self.tools.append("task_complete")
|
|
265
266
|
self.tools_json = [value for _, value in get_function_call_list(self.tools).items()]
|
|
266
267
|
|
|
267
268
|
def _task_status_subscriber(self, message: Dict):
|
|
@@ -7,7 +7,7 @@ beswarm/prompt.py,sha256=45onnyoY9plKM86KQefbPw5z9QJMn-mVnjlFQZcrjz0,34373
|
|
|
7
7
|
beswarm/taskmanager.py,sha256=2Uz_cthW9rWkQMJdzgsXAMlfN8Ni2Qj_DOq_L-p6XZc,12662
|
|
8
8
|
beswarm/utils.py,sha256=mtWzksvdar7dR8oRGvFBEAFXjigk4m1MD1arrx9wEuU,9157
|
|
9
9
|
beswarm/agents/chatgroup.py,sha256=PzrmRcDKAbB7cxL16nMod_CzPosDV6bfTmXxQVuv-AQ,12012
|
|
10
|
-
beswarm/agents/planact.py,sha256=
|
|
10
|
+
beswarm/agents/planact.py,sha256=_47F8GMyqswwE6AiHnPK1CTI_GifCyTkjIEWnXapYfQ,18655
|
|
11
11
|
beswarm/aient/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
|
|
12
12
|
beswarm/aient/aient/architext/architext/__init__.py,sha256=79Ih1151rfcqZdr7F8HSZSTs_iT2SKd1xCkehMsXeXs,19
|
|
13
13
|
beswarm/aient/aient/architext/architext/core.py,sha256=E5QTM0NNoHPxRawH_Lmb01azAAlmLlm0bPy5c78zG38,37972
|
|
@@ -121,8 +121,8 @@ beswarm/tools/subtasks.py,sha256=Fsf_542CkECcwFwxD-F38_IUsmk06xe1P7e6pBPTy4Y,128
|
|
|
121
121
|
beswarm/tools/worker.py,sha256=mQ1qdrQ8MgL99byAbTvxfEByFFGN9mty3UHqHjARMQ8,2331
|
|
122
122
|
beswarm/tools/write_csv.py,sha256=u0Hq18Ksfheb52MVtyLNCnSDHibITpsYBPs2ub7USYA,1466
|
|
123
123
|
beswarm/tools/write_file.py,sha256=L2coBqz-aRFxPBvJBrbWbUJhu7p3oKAAGb9R144bFtk,4926
|
|
124
|
-
beswarm-0.3.
|
|
125
|
-
beswarm-0.3.
|
|
126
|
-
beswarm-0.3.
|
|
127
|
-
beswarm-0.3.
|
|
128
|
-
beswarm-0.3.
|
|
124
|
+
beswarm-0.3.17.dist-info/METADATA,sha256=wcPDIaXQDEfhOuad0AwmMRsr7-AKYTv9aM_G462KovE,3878
|
|
125
|
+
beswarm-0.3.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
126
|
+
beswarm-0.3.17.dist-info/entry_points.txt,sha256=URK7Y4PDzBgxIecQnxsWTu4O-eaFa1CoAcNTWh5R7LM,45
|
|
127
|
+
beswarm-0.3.17.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
|
|
128
|
+
beswarm-0.3.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|