hermes-agent/tests
lila dd69f16c3e
feat(gateway): expose subagent tool calls and thinking to user (fixes #169) (#186)
When subagents run via delegate_task, the user now sees real-time
progress instead of silence:

CLI: tree-view activity lines print above the delegation spinner
  🔀 Delegating: research quantum computing
     ├─ 💭 "I'll search for papers first..."
     ├─ 🔍 web_search  "quantum computing"
     ├─ 📖 read_file  "paper.pdf"
     └─ ⠹ working... (18.2s)

Gateway (Telegram/Discord): batched progress summaries sent every
5 tool calls to avoid message spam. Remaining tools flushed on
subagent completion.

Changes:
- agent/display.py: add KawaiiSpinner.print_above() to print
  status lines above an active spinner without disrupting animation.
  Uses captured stdout (self._out) so it works inside the child's
  redirect_stdout(devnull).

- tools/delegate_tool.py: add _build_child_progress_callback()
  that creates a per-child callback relaying tool calls and
  thinking events to the parent's spinner (CLI) or progress
  queue (gateway). Each child gets its own callback instance,
  so parallel subagents don't share state. Includes _flush()
  for gateway batch completion.

- run_agent.py: fire tool_progress_callback with '_thinking'
  event when the model produces text content. Guarded by
  _delegate_depth > 0 so only subagents fire this (prevents
  gateway spam from main agent). REASONING_SCRATCHPAD/think/
  reasoning XML tags are stripped before display.

Tests: 21 new tests covering print_above, callback builder,
thinking relay, SCRATCHPAD filtering, batching, flush, thread
isolation, delegate_depth guard, and prefix handling.
2026-02-28 23:18:00 -08:00
..
agent feat(gateway): expose subagent tool calls and thinking to user (fixes #169) (#186) 2026-02-28 23:18:00 -08:00
cron Merge pull request #62 from 0xbyt4/test/expand-coverage-2 2026-02-27 01:47:30 -08:00
gateway fix(gateway): prevent TTS voice messages from accumulating across turns 2026-02-28 03:38:27 -05:00
hermes_cli test: enhance session source tests and add validation for chat types 2026-02-26 00:53:57 -08:00
integration test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
tools feat(tests): add live integration tests for file operations and shell noise filtering 2026-02-28 22:57:58 -08:00
__init__.py A bit of restructuring for simplicity and organization 2025-10-01 23:29:25 +00:00
conftest.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_413_compression.py fix(agent): enhance 413 error handling and improve conversation history management in tests 2026-02-27 23:04:32 -08:00
test_auth_codex_provider.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_cli_init.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_cli_provider_resolution.py Add OpenAI Codex provider runtime and responses integration (without .agent/PLANS.md) 2026-02-25 18:20:38 -08:00
test_codex_execution_paths.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_codex_models.py Harden Codex auth refresh and responses compatibility 2026-02-25 19:27:54 -08:00
test_external_credential_detection.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_flush_memories_codex.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_hermes_state.py test: add unit tests for 8 untested modules 2026-02-26 13:27:58 +03:00
test_model_tools.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_provider_parity.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_run_agent.py fix(agent): update error message for unsupported Anthropic API endpoints to clarify usage of OpenRouter 2026-02-27 23:23:31 -08:00
test_run_agent_codex_responses.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
test_runtime_provider_resolution.py Add OpenAI Codex provider runtime and responses integration (without .agent/PLANS.md) 2026-02-25 18:20:38 -08:00
test_toolset_distributions.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_toolsets.py test: add unit tests for 8 untested modules 2026-02-26 13:27:58 +03:00