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:
parent
0157253145
commit
06a5cc484c
@ -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."
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user