Files
hermes-agent/tools
Teknium ee9f9c82a0 fix(gateway,cli): a skill's missing env var opens main's masked secret panel; the gateway saves it
Main's classic CLI registered set_secret_capture_callback in process: skill_view of a
skill whose required_environment_variables were missing opened the masked "Skill Setup
Required" panel and saved the answer to the profile .env. On the session authority the
skill runs in the gateway, where a gateway surface only returned the "secure secret
entry is not available" hint.

Gateway (generic, no CLI naming; usable by the TUI/Desktop too):
- gateway/session_secret_prompt.py: for a local viewer's turn the runner binds a
  turn-scoped capture callback (tools.skills_tool.bind_turn_secret_capture, a ContextVar
  so tool workers started with propagate_context_to_thread inherit it). It sends main's
  `secret` server→client request (SecretRequestParams -> ValueResult) through the same
  request/response machinery as the sudo prompt (session_sudo_prompt.ask_viewer), saves a
  non-empty answer with save_env_value_secure in the gateway, and returns main's result.
- tools/skills_tool_setup: a bound turn callback wins over the gateway-surface hint and
  the process-global slot. Messaging turns bind nothing: hint unchanged.

CLI: GatewayAgent answers a `secret` request with main's own panel (prompt_for_secret,
same lines) and returns the value in the JSON-RPC response; the panel's local .env save
is captured, so this process never writes .env.

LEDGER: CB-021, IPS-049 (W4).
(cherry picked from commit 23d28512108bc0469af2c7423f9c6e8e68e87258)
2026-10-12 22:48:29 -07:00
..
2026-10-08 19:54:07 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 21:38:05 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 19:42:29 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:36 +02:00