hermes-agent/tests/tools
Teknium 2a62514d17
feat: add 'View full command' option to dangerous command approval (#887)
When a dangerous command is detected and the user is prompted for
approval, long commands are truncated (80 chars in fallback, 70 chars
in the TUI). Users had no way to see the full command before deciding.

This adds a 'View full command' option across all approval interfaces:

- CLI fallback (tools/approval.py): [v]iew option in the prompt menu.
  Shows the full command and re-prompts for approval decision.
- CLI TUI (cli.py): 'Show full command' choice in the arrow-key
  selection panel. Expands the command display in-place and removes
  the view option after use.
- CLI callbacks (callbacks.py): 'view' choice added to the list when
  the command exceeds 70 characters.
- Gateway (gateway/run.py): 'full', 'show', 'view' responses reveal
  the complete command while keeping the approval pending.

Includes 7 new tests covering view-then-approve, view-then-deny,
short command fallthrough, and double-view behavior.

Closes community feedback about the 80-char cap on dangerous commands.
2026-03-12 06:27:21 -07:00
..
__init__.py
test_approval.py feat: add 'View full command' option to dangerous command approval (#887) 2026-03-12 06:27:21 -07:00
test_browser_console.py fix: update all test mocks for call_llm migration 2026-03-11 21:06:54 -07:00
test_checkpoint_manager.py feat: filesystem checkpoints and /rollback command 2026-03-10 00:49:15 -07:00
test_clarify_tool.py
test_clipboard.py fix: resolve merge conflict with main in clipboard.py 2026-03-09 03:50:29 +03:00
test_code_execution.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
test_cron_prompt_injection.py
test_cronjob_tools.py
test_daytona_environment.py fix(daytona): use shell timeout wrapper instead of broken SDK exec timeout 2026-03-05 13:12:41 -08:00
test_debug_helpers.py
test_delegate.py feat: configurable subagent provider:model with full credential resolution 2026-03-11 06:12:21 -07:00
test_docker_find.py fix: Docker backend fails when docker is not in PATH (macOS gateway) 2026-03-10 20:45:13 -07:00
test_file_operations.py fix: search_files now reports error for non-existent paths instead of silent empty results 2026-03-08 16:47:20 -07:00
test_file_tools_live.py fix: skip hanging tests + add global test timeout 2026-03-12 01:23:28 -07:00
test_file_tools.py merge: resolve file_tools.py conflict with origin/main 2026-03-09 13:21:46 +03:00
test_force_dangerous_override.py fix: prevent --force from overriding dangerous verdict in should_allow_install 2026-03-04 18:10:18 +03:00
test_fuzzy_match.py
test_hidden_dir_filter.py fix: use Path.parts for hidden directory filter in skill listing 2026-03-04 18:34:16 +03:00
test_homeassistant_tool.py
test_interrupt.py fix: eliminate 3x SQLite message duplication in gateway sessions (#860) 2026-03-10 15:22:44 -07:00
test_mcp_tool.py merge: resolve conflicts with origin/main 2026-03-12 00:29:04 -07:00
test_memory_tool.py test: strengthen assertions in skill_manager + memory_tool (batch 3) 2026-03-05 18:51:43 -08:00
test_modal_sandbox_fixes.py fix: skip tests when atroposlib/minisweagent unavailable in CI 2026-03-11 06:52:55 -07:00
test_parse_env_var.py test(terminal): add tests for env var validation in _get_env_config 2026-03-11 02:59:12 -07:00
test_patch_parser.py
test_process_registry.py
test_read_loop_detection.py fix: improve read-loop detection — consecutive-only, correct thresholds, fix bugs 2026-03-10 16:25:41 -07:00
test_registry.py fix: catch exceptions from check_fn in is_toolset_available() 2026-03-04 14:22:30 -08:00
test_rl_training_tool.py fix: call _stop_training_run on early-return failure paths 2026-03-10 17:09:51 -07:00
test_send_message_tool.py fix(gateway): isolate telegram forum topic sessions 2026-03-11 09:15:34 +01:00
test_session_search.py fix: update all test mocks for call_llm migration 2026-03-11 21:06:54 -07:00
test_skill_manager_tool.py test: strengthen assertions in skill_manager + memory_tool (batch 3) 2026-03-05 18:51:43 -08:00
test_skill_view_path_check.py
test_skill_view_traversal.py
test_skills_guard.py Merge PR #388: fix --force bypassing dangerous verdict in should_allow_install 2026-03-04 19:19:57 -08:00
test_skills_hub_clawhub.py
test_skills_hub.py
test_skills_sync.py fix: prevent data loss in skills sync on copy/update failure 2026-03-07 03:58:32 +03:00
test_skills_tool.py Revert "feat: skill prerequisites — hide skills with unmet runtime dependencies" 2026-03-08 03:58:13 -07:00
test_symlink_prefix_confusion.py
test_terminal_disk_usage.py
test_todo_tool.py fix: update test_non_empty_has_markers to match todo filtering behavior 2026-03-08 23:07:38 +03:00
test_vision_tools.py fix: update all test mocks for call_llm migration 2026-03-11 21:06:54 -07:00
test_web_tools_config.py test: comprehensive tests for model metadata + firecrawl config 2026-03-05 18:22:39 -08:00
test_windows_compat.py
test_write_deny.py
test_yolo_mode.py Merge PR #724: feat: --yolo flag to bypass all approval prompts 2026-03-10 20:56:30 -07:00