hermes-agent/tests/tools
Teknium 4433b83378
feat(web): add Parallel as alternative web search/extract backend (#1696)
* feat(web): add Parallel as alternative web search/extract backend

Adds Parallel (parallel.ai) as a drop-in alternative to Firecrawl for
web_search and web_extract tools using the official parallel-web SDK.

- Backend selection via WEB_SEARCH_BACKEND env var (auto/parallel/firecrawl)
- Auto mode prefers Firecrawl when both keys present; Parallel when sole backend
- web_crawl remains Firecrawl-only with clear error when unavailable
- Lazy SDK imports, interrupt support, singleton clients
- 16 new unit tests for backend selection and client config

Co-authored-by: s-jag <s-jag@users.noreply.github.com>

* fix: add PARALLEL_API_KEY to config registry and fix web_crawl policy tests

Follow-up for Parallel backend integration:
- Add PARALLEL_API_KEY to OPTIONAL_ENV_VARS (hermes doctor, env blocklist)
- Add to set_config_value api_keys list (hermes config set)
- Add to doctor keys display
- Fix 2 web_crawl policy tests that didn't set FIRECRAWL_API_KEY
  (needed now that web_crawl has a Firecrawl availability guard)

* refactor: explicit backend selection via hermes tools, not auto-detect

Replace the auto-detect backend selection with explicit user choice:
- hermes tools saves WEB_SEARCH_BACKEND to .env when user picks a provider
- _get_backend() reads the explicit choice first
- Fallback only for manual/legacy config (uses whichever key is present)
- _is_provider_active() shows [active] for the selected web backend
- Updated tests, docs, and .env.example to remove 'auto' mode language

* refactor: use config.yaml for web backend, not env var

Match the TTS/browser pattern — web.backend is stored in config.yaml
(set by hermes tools), not as a WEB_SEARCH_BACKEND env var.

- _load_web_config() reads web: section from config.yaml
- _get_backend() reads web.backend from config, falls back to key detection
- _configure_provider() saves to config dict (saved to config.yaml)
- _is_provider_active() reads from config dict
- Removed WEB_SEARCH_BACKEND from .env.example, set_config_value, docs
- Updated all tests to mock _load_web_config instead of env vars

---------

Co-authored-by: s-jag <s-jag@users.noreply.github.com>
2026-03-17 04:02:02 -07:00
..
__init__.py
test_approval.py fix(security): harden terminal safety and sandbox file writes (#1653) 2026-03-17 02:22:12 -07:00
test_browser_cleanup.py Fix browser cleanup consistency and screenshot recovery 2026-03-14 11:28:26 -07:00
test_browser_console.py fix: add browser_console to browser toolset and core tools list (#1084) 2026-03-17 02:02:57 -07:00
test_checkpoint_manager.py fix: reduce file tool log noise 2026-03-13 22:14:00 -07:00
test_clarify_tool.py
test_clipboard.py fix(cli): respect HERMES_HOME in all remaining hardcoded ~/.hermes paths 2026-03-13 21:32:53 -07:00
test_code_execution.py test: cover repo-root imports in execute_code sandbox 2026-03-14 21:41:12 -07:00
test_command_guards.py fix: preserve current approval semantics for tirith guard 2026-03-14 00:17:04 -07:00
test_cron_prompt_injection.py
test_cronjob_tools.py fix(tools): remove unnecessary crontab requirement from cronjob tool (#1638) 2026-03-17 01:40:02 -07:00
test_daytona_environment.py
test_debug_helpers.py
test_delegate.py fix: thread safety for concurrent subagent delegation (#1672) 2026-03-17 02:53:33 -07:00
test_docker_environment.py fix(docker): add explicit env allowlist for container credentials (#1436) 2026-03-17 02:34:35 -07:00
test_docker_find.py
test_file_operations.py
test_file_tools_live.py
test_file_tools.py fix: reduce file tool log noise 2026-03-13 22:14:00 -07:00
test_file_write_safety.py fix(security): harden terminal safety and sandbox file writes (#1653) 2026-03-17 02:22:12 -07:00
test_force_dangerous_override.py fix(skills): honor policy table for dangerous verdicts 2026-03-14 11:27:02 -07:00
test_fuzzy_match.py
test_hidden_dir_filter.py
test_homeassistant_tool.py
test_honcho_tools.py fix(honcho): isolate session routing for multi-user gateway (#1500) 2026-03-16 00:23:47 -07:00
test_interrupt.py
test_local_env_blocklist.py fix(security): block sandbox backend creds from subprocess env (#1264) 2026-03-17 02:20:42 -07:00
test_local_persistent.py simplify docstrings, fix some bugs 2026-03-15 01:20:42 +05:30
test_mcp_probe.py feat: interactive MCP tool configuration in hermes tools (#1694) 2026-03-17 03:48:44 -07:00
test_mcp_tool_issue_948.py fix(mcp): resolve npx stdio connection failures (#1291) 2026-03-14 05:44:00 -07:00
test_mcp_tool.py test: align Hermes setup and full-suite expectations (#1710) 2026-03-17 04:01:37 -07:00
test_memory_tool.py fix: tighten memory and session recall guidance 2026-03-14 11:36:47 -07:00
test_mixture_of_agents_tool.py refactor: tighten MoA traceback logging scope (#1307) 2026-03-14 07:53:56 -07:00
test_modal_sandbox_fixes.py fix(docker): gate cwd workspace mount behind config 2026-03-16 05:20:56 -07:00
test_parse_env_var.py fix(docker): add explicit env allowlist for container credentials (#1436) 2026-03-17 02:34:35 -07:00
test_patch_parser.py test: cover pipe characters in v4a patch apply 2026-03-14 03:54:46 -07:00
test_process_registry.py fix(gateway): persist watcher metadata in checkpoint for crash recovery (#1706) 2026-03-17 03:52:15 -07:00
test_read_loop_detection.py
test_registry.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
test_rl_training_tool.py
test_search_hidden_dirs.py fix: exclude hidden directories from find/grep search backends (#1558) 2026-03-17 02:02:57 -07:00
test_send_message_tool.py feat(telegram): auto-detect HTML tags and use parse_mode=HTML in send_message (#1709) 2026-03-17 03:56:06 -07:00
test_session_search.py fix: tighten memory and session recall guidance 2026-03-14 11:36:47 -07:00
test_singularity_preflight.py fix(tests): use case-insensitive regex in singularity preflight tests 2026-03-16 19:01:39 +03:00
test_skill_manager_tool.py
test_skill_view_path_check.py
test_skill_view_traversal.py
test_skills_guard.py fix(skills): honor policy table for dangerous verdicts 2026-03-14 11:27:02 -07:00
test_skills_hub_clawhub.py fix: improve clawhub skill search matching 2026-03-14 23:15:04 -07:00
test_skills_hub.py feat: add NeuTTS optional skill + local TTS provider backend 2026-03-17 02:13:34 -07:00
test_skills_sync.py
test_skills_tool.py
test_ssh_environment.py merge: resolve conflicts with origin/main (SSH preflight check) 2026-03-15 21:13:40 -07:00
test_symlink_prefix_confusion.py
test_terminal_disk_usage.py
test_terminal_requirements.py fix: clearer terminal backend requirement errors 2026-03-14 06:04:39 -07:00
test_terminal_tool_requirements.py fix: worktree-aware minisweagent path discovery + clean up requirements check (#1248) 2026-03-13 23:39:51 -07:00
test_tirith_security.py fix: send_animation metadata, MarkdownV2 inline code splitting, tirith cosign-free install (#1626) 2026-03-16 23:39:41 -07:00
test_todo_tool.py
test_transcription_tools.py fix: restore local STT fallback for gateway voice notes 2026-03-15 21:51:40 -07:00
test_transcription.py fix: propagate STT disable through shared transcription config 2026-03-14 22:09:59 -07:00
test_vision_tools.py refactor: unify vision backend gating 2026-03-14 20:22:13 -07:00
test_voice_cli_integration.py fix: voice pipeline hardening — 7 bug fixes with tests 2026-03-14 14:27:21 +03:00
test_voice_mode.py fix: voice pipeline hardening — 7 bug fixes with tests 2026-03-14 14:27:21 +03:00
test_web_tools_config.py feat(web): add Parallel as alternative web search/extract backend (#1696) 2026-03-17 04:02:02 -07:00
test_website_policy.py feat(web): add Parallel as alternative web search/extract backend (#1696) 2026-03-17 04:02:02 -07:00
test_windows_compat.py
test_write_deny.py
test_yolo_mode.py fix(security): harden terminal safety and sandbox file writes (#1653) 2026-03-17 02:22:12 -07:00