mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-30 13:34:50 +02:00
[eric] agents: convention fixes on merge surface (public cross-file helpers, pydantic approval memory, resolve_ask @typechecked)
This commit is contained in:
@@ -46,7 +46,7 @@ async def test_can_use_tool_deny_returns_deny():
|
||||
async def test_can_use_tool_ask_routes_through_approval():
|
||||
ctx = p_ctx()
|
||||
with patch.object(gate_hooks.path_gate, "maybe_override_policy", return_value=("ask", None)), \
|
||||
patch.object(gate_hooks, "p_resolve_ask", new=AsyncMock(return_value=ApprovalDecision(behavior="allow"))):
|
||||
patch.object(gate_hooks, "resolve_ask", new=AsyncMock(return_value=ApprovalDecision(behavior="allow"))):
|
||||
result = await gate_hooks.can_use_tool(ctx, "Write", {"file_path": "/x"}, None)
|
||||
assert isinstance(result, PermissionResultAllow)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user