hermes-agent/tests/agent
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: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_auxiliary_client.py fix: vision auto-detection now falls back to custom/local endpoints 2026-03-09 15:36:19 -07:00
test_context_compressor.py feat: call_llm/async_call_llm + config slots + migrate all consumers 2026-03-11 20:52:19 -07:00
test_model_metadata.py test: comprehensive tests for model metadata + firecrawl config 2026-03-05 18:22:39 -08:00
test_prompt_builder.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
test_prompt_caching.py test: add unit tests for 8 modules (batch 2) 2026-02-26 13:54:20 +03:00
test_redact.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
test_skill_commands.py feat: secure skill env setup on load (core #688) 2026-03-13 03:14:04 -07:00
test_subagent_progress.py fix(display): fix subagent progress tree-view visual nits 2026-02-28 23:29:49 -08:00