beswarm 0.1.64__py3-none-any.whl → 0.1.65__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.
beswarm/aient/setup.py CHANGED
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
4
4
 
5
5
  setup(
6
6
  name="aient",
7
- version="1.1.17",
7
+ version="1.1.18",
8
8
  description="Aient: The Awakening of Agent.",
9
9
  long_description=Path.open(Path("README.md"), encoding="utf-8").read(),
10
10
  long_description_content_type="text/markdown",
@@ -185,6 +185,9 @@ def excute_command(command):
185
185
  # print(f"is_same: {is_same}", flush=True)
186
186
  # print(f"\n\n\n", flush=True)
187
187
  new_output_lines.append(line)
188
+ # 限制输出行数
189
+ if len(new_output_lines) > 500:
190
+ new_output_lines = new_output_lines[:250] + new_output_lines[-250:]
188
191
  final_output_log = "\n".join(new_output_lines)
189
192
  # print(f"output_lines: {len(new_output_lines)}")
190
193
 
beswarm/tools/__init__.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from .think import think
2
2
  from .edit_file import edit_file
3
3
  from .worker import worker, worker_gen
4
+ from .screenshot import save_screenshot_to_file
4
5
 
5
6
  from .search_arxiv import search_arxiv
6
7
  from .repomap import get_code_repo_map
@@ -45,4 +46,5 @@ __all__ = [
45
46
  "scroll_screen",
46
47
  "register_tool",
47
48
  "search_web",
49
+ "save_screenshot_to_file",
48
50
  ]
@@ -0,0 +1,34 @@
1
+ from ..aient.src.aient.plugins import register_tool
2
+
3
+ @register_tool()
4
+ def save_screenshot_to_file(save_path):
5
+ """
6
+ 截取当前屏幕并保存到指定路径
7
+
8
+ 参数:
9
+ save_path: 截图保存的完整路径,包括文件名和扩展名
10
+
11
+ 返回:
12
+ 成功返回True,失败返回False
13
+ """
14
+ try:
15
+ import os
16
+ import pyautogui
17
+
18
+ # 确保目标目录存在
19
+ save_dir = os.path.dirname(save_path)
20
+ if save_dir and not os.path.exists(save_dir):
21
+ os.makedirs(save_dir)
22
+
23
+ # 截取屏幕
24
+ screenshot = pyautogui.screenshot()
25
+ img_width, img_height = pyautogui.size()
26
+
27
+ # 保存截图到指定路径
28
+ screenshot.save(save_path)
29
+ return f"截图成功保存,尺寸: {img_width}x{img_height},保存路径: {save_path}"
30
+
31
+ except ImportError:
32
+ return "请安装所需库: pip install Pillow pyautogui"
33
+ except Exception as e:
34
+ return f"截取屏幕或保存图像时出错: {e}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.1.64
3
+ Version: 0.1.65
4
4
  Summary: MAS
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -1,7 +1,7 @@
1
1
  beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
2
2
  beswarm/utils.py,sha256=Z2Kuus2BLp9EHUC2ZNL9iUsb6NWnPj-MTA7SYzGyg24,1755
3
3
  beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
4
- beswarm/aient/setup.py,sha256=JlsLhJIFkt5a7CI_6K2Uu4M6-UXf84s3w3Qi1fr7UJ4,487
4
+ beswarm/aient/setup.py,sha256=0O5jHa4fdd3bgqlnZQCmYxkUHk7N5ndVu_xjoshAYxo,487
5
5
  beswarm/aient/src/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
6
6
  beswarm/aient/src/aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
7
7
  beswarm/aient/src/aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
@@ -25,7 +25,7 @@ beswarm/aient/src/aient/models/vertex.py,sha256=qVD5l1Q538xXUPulxG4nmDjXE1VoV4yu
25
25
  beswarm/aient/src/aient/plugins/__init__.py,sha256=p3KO6Aa3Lupos4i2SjzLQw1hzQTigOAfEHngsldrsyk,986
26
26
  beswarm/aient/src/aient/plugins/arXiv.py,sha256=yHjb6PS3GUWazpOYRMKMzghKJlxnZ5TX8z9F6UtUVow,1461
27
27
  beswarm/aient/src/aient/plugins/config.py,sha256=Vp6CG9ocdC_FAlCMEGtKj45xamir76DFxdJVvURNtog,6539
28
- beswarm/aient/src/aient/plugins/excute_command.py,sha256=huQSbNbeImV8BUIsQKE13BIhCAMr7aYRyXO4saE1dTI,10534
28
+ beswarm/aient/src/aient/plugins/excute_command.py,sha256=9t7RB8ikltZZRv8NcjoxfaD8FkPuWbJTZ2Vwk7hEwTA,10683
29
29
  beswarm/aient/src/aient/plugins/get_time.py,sha256=Ih5XIW5SDAIhrZ9W4Qe5Hs1k4ieKPUc_LAd6ySNyqZk,654
30
30
  beswarm/aient/src/aient/plugins/image.py,sha256=ZElCIaZznE06TN9xW3DrSukS7U3A5_cjk1Jge4NzPxw,2072
31
31
  beswarm/aient/src/aient/plugins/list_directory.py,sha256=JZVuImecMSfEv6jLqii-0uQJ1UCsrpMNmYlwW3PEDg4,1374
@@ -119,16 +119,17 @@ beswarm/queries/tree-sitter-languages/ruby-tags.scm,sha256=vIidsCeE2A0vdFN18yXKq
119
119
  beswarm/queries/tree-sitter-languages/rust-tags.scm,sha256=9ljM1nzhfPs_ZTRw7cr2P9ToOyhGcKkCoN4_HPXSWi4,1451
120
120
  beswarm/queries/tree-sitter-languages/scala-tags.scm,sha256=UxQjz80JIrrJ7Pm56uUnQyThfmQNvwk7aQzPNypB-Ao,1761
121
121
  beswarm/queries/tree-sitter-languages/typescript-tags.scm,sha256=OMdCeedPiA24ky82DpgTMKXK_l2ySTuF2zrQ2fJAi9E,1253
122
- beswarm/tools/__init__.py,sha256=1th0OE6oC_bC1_30XSegaIQ12clFXUqVre4vojfluZ4,1071
122
+ beswarm/tools/__init__.py,sha256=IJExt6D58d2yxBOjHVC6wYGhV7Pb7okmX61RvyqSCSY,1150
123
123
  beswarm/tools/click.py,sha256=TygaekCXTmU3fIu6Uom7ZcyzEgYMlCC_GX-5SmWHuLI,20762
124
124
  beswarm/tools/edit_file.py,sha256=xlAD0HB_xM0yZYc0eJwLE-9mAkywXa2UQPNHzG1OaW4,7664
125
125
  beswarm/tools/planner.py,sha256=lguBCS6kpwNPoXQvqH-WySabVubT82iyWOkJnjt6dXw,1265
126
126
  beswarm/tools/repomap.py,sha256=N09K0UgwjCN7Zjg_5TYlVsulp3n2fztYlS8twalChU8,45003
127
+ beswarm/tools/screenshot.py,sha256=u6t8FCgW5YHJ_Oc4coo8e0F3wTusWE_-H8dFh1rBq9Q,1011
127
128
  beswarm/tools/search_arxiv.py,sha256=9slwBemXjEqrd7-YgVmyMijPXlkhZCybEDRVhWVQ9B0,7937
128
129
  beswarm/tools/search_web.py,sha256=B24amOnGHnmdV_6S8bw8O2PdhZRRIDtJjg-wXcfP7dQ,11859
129
130
  beswarm/tools/think.py,sha256=WLw-7jNIsnS6n8MMSYUin_f-BGLENFmnKM2LISEp0co,1760
130
131
  beswarm/tools/worker.py,sha256=bZwMGUS4wt4yOleb2kKu0rCLHIJgPcokbCmh9bGMzXA,12679
131
- beswarm-0.1.64.dist-info/METADATA,sha256=KnWiUh0orLTMVypQqxxo-enfguZLdIWhVvJWCRj0tfE,3553
132
- beswarm-0.1.64.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
133
- beswarm-0.1.64.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
134
- beswarm-0.1.64.dist-info/RECORD,,
132
+ beswarm-0.1.65.dist-info/METADATA,sha256=mr83MLLQT52ThyzMx6WdwBalXIpjwQUgeeFRnFpQKE8,3553
133
+ beswarm-0.1.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
134
+ beswarm-0.1.65.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
135
+ beswarm-0.1.65.dist-info/RECORD,,