Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(deps): pin agent-security to 38db5a4 (no Detours submodule)

caozhenhua000062ba2b4fc9fc
diff --git a/tests/unit_tests/agentserver/test_logging_config_uvicorn_optional.py b/tests/unit_tests/agentserver/test_logging_config_uvicorn_optional.py
index 00acf7f25c..8e7beee093 100644
--- a/tests/unit_tests/agentserver/test_logging_config_uvicorn_optional.py
+++ b/tests/unit_tests/agentserver/test_logging_config_uvicorn_optional.py
@@ -8,7 +8,6 @@ patch_uvicorn_logging 在导入期无条件被 configure_logging 调用; 若硬
from __future__ import annotations
-import inspect
import sys
import pytest
@@ -19,21 +18,19 @@ from jiuwenbox.logging_config import LOG_FORMAT, patch_uvicorn_logging
def test_patch_uvicorn_logging_noop_when_uvicorn_missing(monkeypatch):
"""uvicorn 不可导入时 (裸系统 python runner) 调用应静默返回, 不抛."""
import builtins
+ import inspect
- # CI 安装的 agent-security jiuwenbox 若尚未合入 ImportError 兜底, 跳过本断言;
- # 仓库内 tracked 副本与后续 pin 有兜底后再回归。
- if "except ImportError" not in inspect.getsource(patch_uvicorn_logging):
- pytest.skip("installed jiuwenbox.patch_uvicorn_logging lacks ImportError guard")
+ assert "except ImportError" in inspect.getsource(patch_uvicorn_logging)
for key in list(sys.modules):
if key == "uvicorn" or key.startswith("uvicorn."):
monkeypatch.delitem(sys.modules, key, raising=False)
real_import = builtins.__import__
- def block_uvicorn(name, globals=None, locals=None, fromlist=(), level=0):
+ def block_uvicorn(name, *args, **kwargs):
if name == "uvicorn" or name.startswith("uvicorn."):
raise ImportError("No module named 'uvicorn'")
- return real_import(name, globals, locals, fromlist, level)
+ return real_import(name, *args, **kwargs)
monkeypatch.setattr(builtins, "__import__", block_uvicorn)
patch_uvicorn_logging() # no raise
diff --git a/tests/unit_tests/common/test_todo_sandbox_integration.py b/tests/unit_tests/common/test_todo_sandbox_integration.py
index 1513361bc0..1111b51f44 100644
--- a/tests/unit_tests/common/test_todo_sandbox_integration.py
+++ b/tests/unit_tests/common/test_todo_sandbox_integration.py
@@ -23,19 +23,11 @@ from jiuwenbox.server.auth import BearerTokenAuthMiddleware
from jiuwenbox.server.routes import sandbox as routes
from jiuwenbox.server.runtime.process import ProcessRuntime
from jiuwenbox.server.sandbox_manager import (
+ CodePolicyDenialError,
SandboxManager,
SandboxNotFoundError,
SandboxStateError,
)
-
-try:
- from jiuwenbox.server.sandbox_manager import CodePolicyDenialError
-except ImportError: # pragma: no cover - older agent-security jiuwenbox pin
- # 86e8d62 等无 Detours 的 pin 尚无此类;CI 钉死后跳过本集成模块。
- pytest.skip(
- "CodePolicyDenialError requires newer jiuwenbox than locked agent-security",
- allow_module_level=True,
- )
from jiuwenbox.supervisor.daemon_ipc import (
LISTENER_FD_ENV,
REQUEST_TYPE_SHUTDOWN,
diff --git a/uv.lock b/uv.lock
index 9680e264a4..61ea54152a 100644
--- a/uv.lock
+++ b/uv.lock
@@ -57,7 +57,7 @@ wheels = [
[[package]]
name = "agent-shield"
version = "0.1.0"
-source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=agent_shield&rev=develop#86e8d62e33e24ddd327639bdd32017dda0a1c1cb" }
+source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=agent_shield&rev=develop#38db5a46327c11e21efc40d7f541d05ea120e08a" }
dependencies = [
{ name = "pyyaml" },
]
@@ -65,7 +65,7 @@ dependencies = [
[[package]]
name = "agent-ssas"
version = "0.1.0"
-source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=agent_ssas&rev=develop#86e8d62e33e24ddd327639bdd32017dda0a1c1cb" }
+source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=agent_ssas&rev=develop#38db5a46327c11e21efc40d7f541d05ea120e08a" }
dependencies = [
{ name = "pyyaml" },
]
@@ -2170,7 +2170,7 @@ wheels = [
[[package]]
name = "jiuwenbox"
version = "0.1.0"
-source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=jiuwenbox&rev=develop#86e8d62e33e24ddd327639bdd32017dda0a1c1cb" }
+source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=jiuwenbox&rev=develop#38db5a46327c11e21efc40d7f541d05ea120e08a" }
dependencies = [
{ name = "fastapi" },
{ name = "httpx" },
@@ -5459,7 +5459,7 @@ wheels = [
[[package]]
name = "security-mask"
version = "0.1.0"
-source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=foundation&rev=develop#86e8d62e33e24ddd327639bdd32017dda0a1c1cb" }
+source = { git = "https://gitcode.com/openJiuwen/agent-security.git?subdirectory=foundation&rev=develop#38db5a46327c11e21efc40d7f541d05ea120e08a" }
[[package]]
name = "setuptools"