feat: migrate to Agno native HITL tool confirmation flow (#158)

Replace the homebrew regex-based tool extraction and manual dispatch
(tool_executor.py) with Agno's built-in Human-In-The-Loop confirmation:

- Toolkit(requires_confirmation_tools=...) marks dangerous tools
- agent.run() returns RunOutput with status=paused when confirmation needed
- RunRequirement.confirm()/reject() + agent.continue_run() resumes execution

Dashboard and Discord vendor both use the native flow. DuckDuckGo import
isolated so its absence doesn't kill all tools. Test stubs cleaned up
(agno is a real dependency, only truly optional packages stubbed).

1384 tests pass in parallel (~14s).

Co-authored-by: Trip T <trip@local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Whitestone
2026-03-09 21:54:04 -04:00
committed by GitHub
parent 574031a55c
commit 904a7c564e
18 changed files with 1317 additions and 85 deletions

View File

@@ -5,11 +5,15 @@ This caused socket read errors in production. The agno Ollama class uses
``timeout`` (not ``request_timeout``).
"""
import importlib
from unittest.mock import MagicMock, patch
def test_base_agent_sets_timeout():
"""BaseAgent creates Ollama with timeout=300."""
# Ensure module is loaded before patching — prevents xdist ordering issues
importlib.import_module("timmy.agents.base")
with patch("timmy.agents.base.Ollama") as mock_ollama, patch("timmy.agents.base.Agent"):
mock_ollama.return_value = MagicMock()