fix: improve gateway secret capture guidance message

The old message referenced 'hermes setup' which doesn't handle
skill-specific env vars. Updated to direct users to load the skill
in the local CLI (which triggers the secure prompt) or add the key
to ~/.hermes/.env manually.
This commit is contained in:
teknium1 2026-03-13 04:10:15 -07:00
parent 0157253145
commit 06a5cc484c
5 changed files with 6 additions and 6 deletions

View File

@ -29,7 +29,7 @@ from gateway.session import SessionSource, build_session_key
GATEWAY_SECRET_CAPTURE_UNSUPPORTED_MESSAGE = (
"Secure secret entry is not supported over messaging. "
"Run `hermes setup` or update ~/.hermes/.env locally."
"Load this skill in the local CLI to be prompted, or add the key to ~/.hermes/.env manually."
)

View File

@ -192,7 +192,7 @@ Generate some audio.
msg = build_skill_invocation_message("/test-skill", "do stuff")
assert msg is not None
assert "hermes setup" in msg.lower()
assert "local cli" in msg.lower()
def test_preserves_remaining_remote_setup_warning(self, tmp_path, monkeypatch):
monkeypatch.setenv("TERMINAL_ENV", "ssh")

View File

@ -14,7 +14,7 @@ from gateway.platforms.base import (
class TestSecretCaptureGuidance:
def test_gateway_secret_capture_message_points_to_local_setup(self):
message = GATEWAY_SECRET_CAPTURE_UNSUPPORTED_MESSAGE
assert "hermes setup" in message.lower()
assert "local cli" in message.lower()
assert "~/.hermes/.env" in message

View File

@ -511,7 +511,7 @@ class TestSkillViewSecureSetupOnLoad:
result = json.loads(raw)
assert result["success"] is True
assert called["value"] is False
assert "hermes setup" in result["gateway_setup_hint"].lower()
assert "local cli" in result["gateway_setup_hint"].lower()
assert result["content"].startswith("---")
@ -845,7 +845,7 @@ class TestSkillViewPrerequisites:
raw = skill_view("backend-unknown")
result = json.loads(raw)
assert result["success"] is True
assert "hermes setup" in result["gateway_setup_hint"].lower()
assert "local cli" in result["gateway_setup_hint"].lower()
assert result["setup_needed"] is True
@pytest.mark.parametrize(

View File

@ -394,7 +394,7 @@ def _gateway_setup_hint() -> str:
return GATEWAY_SECRET_CAPTURE_UNSUPPORTED_MESSAGE
except Exception:
return "Secure secret entry is not available. Run `hermes setup` or update ~/.hermes/.env locally."
return "Secure secret entry is not available. Load this skill in the local CLI to be prompted, or add the key to ~/.hermes/.env manually."
def _build_setup_note(