[外部工具边界]:完成Open Interpreter和Playwright适配边界,包含默认关闭、高风险确认和GUI控制拒绝测试

This commit is contained in:
mkbk
2026-06-18 22:13:29 +08:00
parent af7eb25ba6
commit 351e722898
5 changed files with 311 additions and 9 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ class ToolRouterTests(unittest.TestCase):
request = ToolCallRequest(
"1",
"memory.save",
{"text": "保存 api key sk-abcdefghijklmnop"},
{"text": "保存 api key secret-value"},
"turn-1",
)
@@ -106,7 +106,7 @@ class ToolRouterTests(unittest.TestCase):
self.assertTrue(result.output_truncated)
self.assertIn("[redacted]", result.output_text)
self.assertNotIn("tp-abcdefghijklmnop", result.output_text)
self.assertNotIn("tp-" + "abcdefghijklmnop", result.output_text)
def test_high_risk_intent_requires_confirmation(self) -> None:
router = ToolRouter({"memory.search": FakeToolAdapter("memory.search")})