Skip to content

fix(hermes): turn ponytail off when the user types "stop ponytail" (#1167) - #1168

Open
szsunyuan wants to merge 1 commit into
DietrichGebert:mainfrom
szsunyuan:fix/hermes-stop-phrase
Open

szsunyuan wants to merge 1 commit into
DietrichGebert:mainfrom
szsunyuan:fix/hermes-stop-phrase

Conversation

@szsunyuan

Copy link
Copy Markdown
Contributor

Summary

  • The Hermes plugin ignored a typed "stop ponytail" or "normal mode". Its mode stayed on, bare /ponytail still reported the level, and after compaction _pre_llm_call re-injected the ruleset, so ponytail came back on by itself.
  • _pre_llm_call now reads user_message and applies the same standalone rule as isDeactivationCommand (hooks/ponytail-config.js). It switches the mode off, so the off notice from fix(hermes): send the off notice after /ponytail off (#1121) #1122 goes out once and compaction no longer brings the ruleset back.
  • In a gateway the mode is process-wide and Hermes never slash-gates plain chat. So rewrite_gateway_command rewrites the phrase to /ponytail off, which then passes the same access control as the command. INSTALL.md says so in one clause.

Closes #1167

Out of scope

  • Per-chat modes in a shared gateway: the mode stays process-wide, as /ponytail off already is.
  • Other adapters.

Test plan

  • node scripts/check-rule-copies.js
  • node scripts/check-versions.js
  • git diff --check
  • npm test: 145/145 root, 30/30 pi-extension
  • New test Hermes treats a typed "stop ponytail" like /ponytail off, and a gateway runs it as that command is red on upstream/main (null instead of { context: 'PONYTAIL MODE OFF' })
  • The Python rule gives the same answer as isDeactivationCommand on 14 phrases (case, trailing punctuation, extra words)
  • Not run in a live Hermes session. I read the gateway path in Hermes 32b77f51: a pre_gateway_dispatch rewrite replaces event.text, and plugin commands then go through _check_slash_access like built-ins.

The ruleset tells the user that "stop ponytail" or "normal mode" turns
ponytail off, and every hook host honors it. The Hermes plugin ignored
the phrase: its mode stayed on, bare /ponytail still reported the level,
and after compaction pre_llm_call re-injected the ruleset.

pre_llm_call now applies the same standalone rule as
isDeactivationCommand and switches off, so the off notice goes out once.
In a gateway, where plain chat is never slash-gated, the phrase is
rewritten to /ponytail off and passes the same access control as the
command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hermes: "stop ponytail" typed in chat doesn't turn ponytail off

1 participant