test(agent): update tool registry test to match security policy

This commit is contained in:
qzl
2026-03-03 16:02:32 +08:00
parent f7df9d679f
commit ff85c1ab08
2 changed files with 5 additions and 3 deletions
@@ -22,6 +22,6 @@ class TestValidateToolSpec:
def test_srv_namespace_with_backend_is_valid(self):
validate_tool_spec({"name": "srv.search_docs", "execution_target": "backend"})
def test_other_namespace_is_valid(self):
validate_tool_spec({"name": "other.tool", "execution_target": "frontend"})
validate_tool_spec({"name": "other.tool", "execution_target": "backend"})
def test_other_namespace_is_rejected(self):
with pytest.raises(ValueError, match="must be in ui.* or srv.* namespace"):
validate_tool_spec({"name": "other.tool", "execution_target": "frontend"})
+2
View File
@@ -8,6 +8,8 @@ dependencies = [
"asyncpg>=0.31.0",
"basedpyright>=1.37.2",
"celery>=5.6.2",
"crewai>=1.6.1",
"crewai-tools>=1.6.1",
"email-validator>=2.3.0",
"fastapi>=0.128.0",
"pydantic>=2.11.0",