hermes-agent/tests/hermes_cli
kshitijk4poor ccfbf42844 feat: secure skill env setup on load (core #688)
When a skill declares required_environment_variables in its YAML
frontmatter, missing env vars trigger a secure TUI prompt (identical
to the sudo password widget) when the skill is loaded. Secrets flow
directly to ~/.hermes/.env, never entering LLM context.

Key changes:
- New required_environment_variables frontmatter field for skills
- Secure TUI widget (masked input, 120s timeout)
- Gateway safety: messaging platforms show local setup guidance
- Legacy prerequisites.env_vars normalized into new format
- Remote backend handling: conservative setup_needed=True
- Env var name validation, file permissions hardened to 0o600
- Redact patterns extended for secret-related JSON fields
- 12 existing skills updated with prerequisites declarations
- ~48 new tests covering skip, timeout, gateway, remote backends
- Dynamic panel widget sizing (fixes hardcoded width from original PR)

Cherry-picked from PR #723 by kshitijk4poor, rebased onto current main
with conflict resolution.

Fixes #688

Co-authored-by: kshitijk4poor <kshitijk4poor@users.noreply.github.com>
2026-03-13 03:14:04 -07:00
..
__init__.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_claw.py feat: add 'hermes claw migrate' command + migration docs 2026-03-12 08:20:12 -07:00
test_coalesce_session_args.py fix(cli): handle unquoted multi-word session names in -c/--continue and -r/--resume 2026-03-09 21:36:29 -07:00
test_commands.py feat(cli): add /reasoning command for effort level and display toggle 2026-03-11 06:02:18 -07:00
test_config.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
test_doctor.py fix(doctor): treat configured honcho as available 2026-03-12 19:34:19 -07:00
test_model_validation.py fix: stop rejecting unlisted models, accept with warning instead 2026-03-12 16:02:35 -07:00
test_models.py test: enhance session source tests and add validation for chat types 2026-02-26 00:53:57 -08:00
test_session_browse.py feat: interactive session browser with search filtering (#718) 2026-03-08 17:42:50 -07:00
test_set_config_value.py chore: remove all NOUS_API_KEY references 2026-03-08 17:45:38 -07:00
test_setup.py fix: remove nous-api test + fix OAuth test index after nous-api removal 2026-03-12 00:51:30 -07:00
test_setup_openclaw_migration.py test: verify reloaded config drives setup after migration 2026-03-12 02:56:36 +05:30
test_skills_config.py refactor: extract shared curses checklist, fix skill discovery perf 2026-03-11 03:06:15 -07:00
test_skills_hub.py chore(skills): clean up PR #862 — simplify manifest guard, DRY up tests 2026-03-12 08:08:22 -07:00
test_skills_subparser.py fix(cli): resolve duplicate 'skills' subparser crash on Python 3.11+ 2026-03-11 00:50:39 -07:00
test_skin_engine.py feat: add data-driven skin/theme engine for CLI customization 2026-03-10 00:37:28 -07:00
test_tools_config.py Add tools summary flag to Hermes CLI 2026-03-09 16:50:53 +03:00