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(context): 主配置双名单豁免 image_get_run 轮询
Kinsame9dffd7881cd
diff --git a/jiuwenswarm/resources/config.yaml b/jiuwenswarm/resources/config.yamlindex 8ffa15ce23..2b31c570c1 100644--- a/jiuwenswarm/resources/config.yaml+++ b/jiuwenswarm/resources/config.yaml@@ -795,6 +795,13 @@ react:reasoning_preview_max_chars: 512 # 摘要里 reasoning 预览的最大字符数bailout_threshold: 3 # reasoning 规则压缩次数达此值后中止tool_args_bailout_threshold: 2 # 工具入参规则压缩次数达此值后终止+ # 豁免异步轮询作为断墙:image_get_run 直调与 invoke_tool 包装调用(按名豁免,脱离本段循环网,靠会话超时等兜底)+ ignored_tool_calls:+ - tool_name: image_get_run+ argument_equals: {}+ - tool_name: invoke_tool+ argument_equals:+ tool_name: image_get_run# Skills 在线自演进配置evolution:enabled: true # true = 启用在线 Skills 自演进(挂载后被动扫描始终开启)@@ -1045,6 +1052,8 @@ agent_ras:# Match the outer tool and selected top-level arguments exactly.# Add rules for other polling functions without exempting the whole tool.ignored_tool_calls:+ - tool_name: image_get_run+ argument_equals: {}- tool_name: invoke_toolargument_equals:tool_name: image_get_rundiff --git a/tests/unit_tests/resources/test_distributed_ignored_tool_calls_inherit.py b/tests/unit_tests/resources/test_distributed_ignored_tool_calls_inherit.pynew file mode 100644index 0000000000..97209ba9fd--- /dev/null+++ b/tests/unit_tests/resources/test_distributed_ignored_tool_calls_inherit.py@@ -0,0 +1,34 @@+# coding: utf-8+"""Distributed templates must not freeze ignored_tool_calls (inherit from main)."""+from __future__ import annotations++from pathlib import Path++import yaml++_RESOURCES = Path(__file__).resolve().parents[3] / "jiuwenswarm" / "resources"+_DISTRIBUTED_TEMPLATES = (+ "config.team.distributed.leader.yaml",+ "config.team.distributed.teammate.yaml",+)+++def _contains_ignored_tool_calls(node) -> bool:+ if isinstance(node, dict):+ if "ignored_tool_calls" in node:+ return True+ return any(_contains_ignored_tool_calls(v) for v in node.values())+ if isinstance(node, list):+ return any(_contains_ignored_tool_calls(v) for v in node)+ return False+++def test_distributed_templates_do_not_define_ignored_tool_calls():+ for name in _DISTRIBUTED_TEMPLATES:+ path = _RESOURCES / name+ assert path.is_file(), f"missing template: {path}"+ data = yaml.safe_load(path.read_text(encoding="utf-8")) or {}+ assert not _contains_ignored_tool_calls(data), (+ f"{name} must not define ignored_tool_calls "+ f"(inherit from main config.yaml to avoid freeze/drift)"+ )diff --git a/uv.lock b/uv.lockindex 97ae2da535..58cb7ded9b 100644--- a/uv.lock+++ b/uv.lock@@ -1,5 +1,5 @@version = 1-revision = 5+revision = 3requires-python = ">=3.11, <3.14"resolution-markers = ["python_full_version >= '3.13' and sys_platform == 'win32'",@@ -3510,7 +3510,7 @@ wheels = [[[package]]name = "openjiuwen"version = "0.1.16"-source = { git = "https://gitcode.com/openJiuwen/agent-core.git?rev=dev-stable#a132cd20c1718a62533579698a97d5a7193b0d91" }+source = { git = "https://gitcode.com/openJiuwen/agent-core.git?rev=dev-stable#12aa635059aa52cc851a6c0cc0ee56e71b164e70" }dependencies = [{ name = "aiofiles" },{ name = "aiohttp" },