diff --git a/cron/scheduler_prompt.py b/cron/scheduler_prompt.py index f35e5dd95e..5151747bfd 100644 --- a/cron/scheduler_prompt.py +++ b/cron/scheduler_prompt.py @@ -197,6 +197,8 @@ _CRON_HINT = ( "final response and the system handles the rest. " "SILENT: If there is genuinely nothing new to report, respond " "with exactly \"[SILENT]\" (nothing else) to suppress delivery. " + "[SILENT] is a literal ASCII control token — never translate or " + "rephrase it, whatever language the rest of your answer uses. " "Never combine [SILENT] with content — either report your " "findings normally, or say [SILENT] and nothing more. " "RECURSION: This is a run of an EXISTING scheduled job — execute " diff --git a/tests/gateway/test_response_filters.py b/tests/gateway/test_response_filters.py index d79a180772..752deae9db 100644 --- a/tests/gateway/test_response_filters.py +++ b/tests/gateway/test_response_filters.py @@ -19,24 +19,15 @@ def test_autonomous_silence_accepts_marker_with_own_line_note(): assert is_autonomous_silence_response("[SILENT] No changes detected") -def test_translated_sentinel_suppresses_delivery(): - """Regression: a non-English lane answers the silence instruction in its own language. - - 2026-09-14 — a deepseek cron lane had nothing to report and answered the cron - instruction ("respond with exactly [SILENT]") with "[静默]". The control token - was not a known marker, so the whole token was delivered to the user's DM as - content. - """ +def test_translated_sentinel_is_silence_in_every_form_the_english_one_is(): + """#110935: a lane that answers the cron instruction in its own language translates the + sentinel; ``[静默]`` must suppress delivery exactly like ``[SILENT]`` (exact, own-line note, + reordered lines, bracketless, edge punctuation).""" assert is_intentional_silence_response("[静默]") - assert is_autonomous_silence_response("[静默]") - - -def test_translated_sentinel_takes_the_same_forms_as_the_english_one(): - """Same loose rule: own-line note, reordered lines, bracketless; the exact rule strips punctuation.""" + assert is_intentional_silence_response("**沉默**") assert is_autonomous_silence_response("[静默]\n\nNothing new this tick.") assert is_autonomous_silence_response("2 deals filtered\n\n[沉默]") assert is_autonomous_silence_response("静默") - assert is_intentional_silence_response("**沉默**") def test_prose_mentioning_the_translated_sentinel_is_delivered(): diff --git a/website/docs/user-guide/messaging/index.md b/website/docs/user-guide/messaging/index.md index ea9a505e80..58516bf71d 100644 --- a/website/docs/user-guide/messaging/index.md +++ b/website/docs/user-guide/messaging/index.md @@ -140,6 +140,7 @@ Supported tokens: - `SILENT` - `NO_REPLY` - `NO REPLY` +- `[静默]` / `静默` and `[沉默]` / `沉默` — the Chinese renderings a model produces when it translates the sentinel instead of emitting it literally Whitespace and case are normalized, but the whole final response must be the token. A sentence like "Use `[SILENT]` when nothing changed" is delivered normally. diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/index.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/index.md index f73c8e3ae1..6afaa0da90 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/index.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/messaging/index.md @@ -102,6 +102,22 @@ flowchart TB 每个平台适配器接收消息,通过每个聊天的会话存储进行路由,并将其分发给 AIAgent 处理。网关还运行 cron 调度器,每 60 秒触发一次以执行到期任务。 +## 有意静默令牌 + +在群聊、hooks 和自动化流程中,Hermes 支持显式的静默令牌。若 agent 的最终回复恰好只是一个受支持的令牌,网关会抑制外发投递,不向聊天发送任何内容。 + +支持的令牌: + +- `[SILENT]` +- `SILENT` +- `NO_REPLY` +- `NO REPLY` +- `[静默]` / `静默` 与 `[沉默]` / `沉默` —— 模型把哨兵翻译成中文而非原样输出时产生的形式 + +空白与大小写会被规范化,但整条最终回复必须只是该令牌。像"没有变化时请用 `[SILENT]`"这样的句子会正常投递。 + +静默只是投递层面的决定:Hermes 仍会把这条静默回复保存在会话记录中,因此对话依旧正常交替。失败的回合仍会以错误形式呈现;不会因为文本形似静默令牌而隐藏失败。 + ## 快速配置 配置消息平台最简单的方式是使用交互式向导: