beswarm 0.2.41__py3-none-any.whl → 0.2.42__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 CHANGED
@@ -124,10 +124,10 @@ class InstructionAgent(BaseAgent):
124
124
 
125
125
  self.broker.publish({"status": "new_message", "result": "\n🤖 指令智能体:\n" + raw_response}, self.status_topic)
126
126
 
127
- self.last_instruction = raw_response
128
127
  instruction = extract_xml_content(raw_response, "instructions")
129
128
  if instruction:
130
129
  if len(message["conversation"]) == 1:
130
+ instruction = re.sub(r'^<task_complete>([\D\d\s]+)<\/task_complete>$', '', instruction, flags=re.MULTILINE)
131
131
  instruction = (
132
132
  "任务描述:\n"
133
133
  f"<goal>{self.goal}</goal>\n\n"
@@ -145,9 +145,11 @@ class InstructionAgent(BaseAgent):
145
145
  f"{instruction}"
146
146
  )
147
147
  self.broker.publish({"instruction": instruction, "conversation": message["conversation"]}, self.publish_topic)
148
+ self.last_instruction = None
148
149
  else:
149
150
  self.logger.error("\n❌ 指令智能体生成的指令不符合要求,正在重新生成。")
150
151
  self.broker.publish(message, self.error_topic)
152
+ self.last_instruction = raw_response
151
153
 
152
154
 
153
155
  class WorkerAgent(BaseAgent):
beswarm/prompt.py CHANGED
@@ -106,7 +106,7 @@ instruction_system_prompt = """
106
106
  所有回复必须使用中文。
107
107
  运行工作智能体的系统信息:{os_version}
108
108
  你的工作目录为:{workspace_path},请在指令中使用绝对路径。所有操作必须基于工作目录。
109
- 禁止在工作目录之外进行任何操作。你当前运行目录不一定就是工作目录。禁止默认你当前就在工作目录。
109
+ 除了任务目标里面明确提到的目录,禁止在工作目录之外进行任何操作。你当前运行目录不一定就是工作目录。禁止默认你当前就在工作目录。
110
110
 
111
111
  当前时间:{current_time}
112
112
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.2.41
3
+ Version: 0.2.42
4
4
  Summary: MAS
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,11 +1,11 @@
1
1
  beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
2
2
  beswarm/broker.py,sha256=RtnQZVbhf25acUHahNBiaS5FGxcrj0rhBhkon9gFY_M,9873
3
3
  beswarm/core.py,sha256=_J_LPc0HZFQTLGHy021OMEh2WbsjL_hc6jxd2engpyY,216
4
- beswarm/prompt.py,sha256=5JMfOuXWHscsaeDzwBn223mj9N85eAQdOHXQZk7zeWE,32238
4
+ beswarm/prompt.py,sha256=n0a1a6NThIxAYSkisg1sEKjvz2w0tozpKL4BIplaAkI,32286
5
5
  beswarm/taskmanager.py,sha256=_v1lNHu9WpKK2ial22hvEVPzMJBUiaKTSUbXOxpEYlU,12119
6
6
  beswarm/utils.py,sha256=S9jEtht0hTZbjZ2Hk24p4Ip41R69BogOkYS6fgPKY2Y,8219
7
7
  beswarm/agents/chatgroup.py,sha256=4QTjTjssFDvS2kI5A58TdN92BWjL-XaNzrcd36pTQGQ,11939
8
- beswarm/agents/planact.py,sha256=BFUbz_e1PxZ-_Z6eYRhqejidmWTFo1CI1JWxFV6nTWo,17299
8
+ beswarm/agents/planact.py,sha256=NyZankMtcivZBvIj_EYCTlQky_E1J8q6D0B2WK9RMlc,17468
9
9
  beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
10
10
  beswarm/aient/setup.py,sha256=Mq1M05mT9_UYBK2jk5mP_sLxKQAolcuh8PYXexfj-XU,487
11
11
  beswarm/aient/src/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
@@ -143,7 +143,7 @@ beswarm/tools/search_web.py,sha256=LhgXOSHL9fwxg5T2AAOV4TTJkcJVLogsfRJW2faPvDE,1
143
143
  beswarm/tools/subtasks.py,sha256=8RmDhpyjDI3vhwfVhh6HQZIv-OZ0mI3e27zS3FnF09E,7881
144
144
  beswarm/tools/worker.py,sha256=auoAEeg8U_Q59dlyM2nv9cAJIWG3PuR8oy7Bp2cM2S0,1993
145
145
  beswarm/tools/write_csv.py,sha256=-r5OghcvjCg00hY0YQbp6u31VIJLrgaqDIvczAFoqDE,1470
146
- beswarm-0.2.41.dist-info/METADATA,sha256=OBUu8wl3eJH4n5s4lV9NLisFY6LsQBPK8O7zON4Arf4,3878
147
- beswarm-0.2.41.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
- beswarm-0.2.41.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
149
- beswarm-0.2.41.dist-info/RECORD,,
146
+ beswarm-0.2.42.dist-info/METADATA,sha256=76D76l0hTy9sKoCemriewCdrY6hqypBlnGi3X793tgo,3878
147
+ beswarm-0.2.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
148
+ beswarm-0.2.42.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
149
+ beswarm-0.2.42.dist-info/RECORD,,