Hdsh-gatekeeper
huajikano/dsh-gatekeeper
Inspects the model's streamed reply before it is committed and either discards it or holds it for review when it reads as a refusal, so that text does not stay in the session context. Detection combines built-in phrase rules (an opening refusal, a capability denial, policy wording, first-person intent, refusals quoted in reasoning) with a plain-text word list and optional regular expressions. Settings cover the detection range, the word list and a record list. Interception can sit at the llm/stream waterfall, at the HTTP fetch layer before encryption (not TLS decryption, and it cannot tell which session a call belongs to), at both, or in a preview mode that shows a transient preview while the original chunks stay in memory until the whole reply has been checked. The rules are heuristic and can miss phrasings, and a transient preview can briefly display the refused text.
1avant-hierSessions et messages