beswarm 0.1.94__py3-none-any.whl → 0.1.95__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 +1 -1
- beswarm/aient/src/aient/utils/scripts.py +5 -5
- {beswarm-0.1.94.dist-info → beswarm-0.1.95.dist-info}/METADATA +1 -1
- {beswarm-0.1.94.dist-info → beswarm-0.1.95.dist-info}/RECORD +6 -6
- {beswarm-0.1.94.dist-info → beswarm-0.1.95.dist-info}/WHEEL +0 -0
- {beswarm-0.1.94.dist-info → beswarm-0.1.95.dist-info}/top_level.txt +0 -0
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.
|
7
|
+
version="1.1.37",
|
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",
|
@@ -241,11 +241,11 @@ import fnmatch
|
|
241
241
|
# 从环境变量 'SANDBOX_READONLY_PATHS' 读取只读路径列表(可以是文件或目录)。
|
242
242
|
# 示例: export SANDBOX_READONLY_PATHS="/path/to/file.txt:/path/to/dir"
|
243
243
|
readonly_paths_str = os.getenv('SANDBOX_READONLY_PATHS', '')
|
244
|
-
READONLY_PATHS = [p for p in readonly_paths_str.split(
|
244
|
+
READONLY_PATHS = [p for p in readonly_paths_str.split(':') if p]
|
245
245
|
|
246
246
|
# 新增: 从环境变量 'SANDBOX_NO_READ_PATHS' 读取禁止读取的路径列表
|
247
247
|
no_read_paths_str = os.getenv('SANDBOX_NO_READ_PATHS', '')
|
248
|
-
NO_READ_PATHS = [p for p in no_read_paths_str.split(
|
248
|
+
NO_READ_PATHS = [p for p in no_read_paths_str.split(':') if p]
|
249
249
|
|
250
250
|
# --- 子进程注入代码 (更智能的版本) ---
|
251
251
|
INJECTION_CODE = """
|
@@ -258,12 +258,12 @@ import fnmatch
|
|
258
258
|
# 1. 从环境变量中获取沙箱规则并设置补丁
|
259
259
|
# 子进程从和父进程完全相同的环境变量中读取配置
|
260
260
|
readonly_paths_str = os.getenv('SANDBOX_READONLY_PATHS', '')
|
261
|
-
readonly_paths = [os.path.abspath(p) for p in readonly_paths_str.split(
|
261
|
+
readonly_paths = [os.path.abspath(p) for p in readonly_paths_str.split(':') if p]
|
262
262
|
|
263
263
|
# 优先使用执行命令专用的禁止读取路径
|
264
264
|
no_read_paths_str = os.getenv('SANDBOX_EXEC_NO_READ_PATHS', '/**/*beswarm*/**')
|
265
265
|
|
266
|
-
no_read_paths = [os.path.abspath(p) for p in no_read_paths_str.split(
|
266
|
+
no_read_paths = [os.path.abspath(p) for p in no_read_paths_str.split(':') if p]
|
267
267
|
original_open = builtins.open
|
268
268
|
|
269
269
|
def _is_path_protected(target_path):
|
@@ -418,7 +418,7 @@ class Sandbox:
|
|
418
418
|
|
419
419
|
def _update_env_var(self, var_name, path_list):
|
420
420
|
"""辅助函数,用于更新环境变量,确保子进程能继承最新的沙箱规则。"""
|
421
|
-
os.environ[var_name] =
|
421
|
+
os.environ[var_name] = ':'.join(path_list)
|
422
422
|
|
423
423
|
def add_readonly_path(self, path: str):
|
424
424
|
"""动态添加一个新的只读路径。如果沙箱因此从非激活状态变为激活状态,则会启用沙箱。"""
|
@@ -2,7 +2,7 @@ beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
|
|
2
2
|
beswarm/prompt.py,sha256=cBz8sSmFj0edIGOZjCMg0rg3pFXQYo8xGvXSA8Py1hg,31591
|
3
3
|
beswarm/utils.py,sha256=lm0drN1ebXM9haoKaW2DLzJJRCOpLmiJ864mH4jAdB4,6697
|
4
4
|
beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
|
5
|
-
beswarm/aient/setup.py,sha256=
|
5
|
+
beswarm/aient/setup.py,sha256=doYVg4_gy-oGtvS_FbdIjgSOq3RGu-oGnTQVNXi2xOs,487
|
6
6
|
beswarm/aient/src/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
|
7
7
|
beswarm/aient/src/aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
|
8
8
|
beswarm/aient/src/aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
|
@@ -39,7 +39,7 @@ beswarm/aient/src/aient/plugins/websearch.py,sha256=FsUxM9GL4AAjmYJ8TS2jSqv4qfCA
|
|
39
39
|
beswarm/aient/src/aient/plugins/write_file.py,sha256=7spYxloI_aUbeANEQK-oXrGPoBqSfsD7sdfMAWlNxhU,3656
|
40
40
|
beswarm/aient/src/aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
41
|
beswarm/aient/src/aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
|
42
|
-
beswarm/aient/src/aient/utils/scripts.py,sha256=
|
42
|
+
beswarm/aient/src/aient/utils/scripts.py,sha256=h7EA2xBydUF_wdZLsPgjCq4Egdycx1gf2qrdrm0I7y0,40909
|
43
43
|
beswarm/aient/test/chatgpt.py,sha256=Hvl7FuDt1c74N5TVBmhErOPvJbJJzA7FNp5VoZM4u30,4957
|
44
44
|
beswarm/aient/test/claude.py,sha256=IyB4qI1eJLwlSfDNSnt2FhbQWYyBighHUjJxEXc3osQ,1095
|
45
45
|
beswarm/aient/test/test.py,sha256=rldnoLQdtRR8IKFSIzTti7eIK2MpPMoi9gL5qD8_K44,29
|
@@ -134,7 +134,7 @@ beswarm/tools/search_arxiv.py,sha256=GpuIOYX8T0iRC-X-hmuR9AUJVn15WWZq864DaoC7BUc
|
|
134
134
|
beswarm/tools/search_web.py,sha256=w0T0aCqOVlb6Of5hn_TtpnrGXo6bMtw2aKZdkrYjycI,12069
|
135
135
|
beswarm/tools/think.py,sha256=WLw-7jNIsnS6n8MMSYUin_f-BGLENFmnKM2LISEp0co,1760
|
136
136
|
beswarm/tools/worker.py,sha256=4gII0s83gXf8Y453NK4Cs7tLyN89b2q0v9vic92RlrU,18579
|
137
|
-
beswarm-0.1.
|
138
|
-
beswarm-0.1.
|
139
|
-
beswarm-0.1.
|
140
|
-
beswarm-0.1.
|
137
|
+
beswarm-0.1.95.dist-info/METADATA,sha256=LvVLKQMO-irTnZIwvg5SRKQvS4eOZfEgNICXD_uVuIE,3584
|
138
|
+
beswarm-0.1.95.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
139
|
+
beswarm-0.1.95.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
|
140
|
+
beswarm-0.1.95.dist-info/RECORD,,
|
File without changes
|
File without changes
|