docs(gateway): document exact silence tokens (#46105)
This commit is contained in:
@@ -300,7 +300,7 @@ cron:
|
||||
|
||||
### Silent suppression
|
||||
|
||||
If the agent's final response starts with `[SILENT]`, delivery is suppressed entirely. The output is still saved locally for audit (in `~/.hermes/cron/output/`), but no message is sent to the delivery target.
|
||||
If the agent's final response contains `[SILENT]`, delivery is suppressed entirely. The output is still saved locally for audit (in `~/.hermes/cron/output/`), but no message is sent to the delivery target.
|
||||
|
||||
This is useful for monitoring jobs that should only report when something is wrong:
|
||||
|
||||
@@ -309,7 +309,7 @@ Check if nginx is running. If everything is healthy, respond with only [SILENT].
|
||||
Otherwise, report the issue.
|
||||
```
|
||||
|
||||
Failed jobs always deliver regardless of the `[SILENT]` marker — only successful runs can be silenced.
|
||||
Failed jobs always deliver regardless of the `[SILENT]` marker — only successful runs can be silenced. For quiet monitoring jobs, prompt the agent to reply with only `[SILENT]` when there is nothing to report.
|
||||
|
||||
## Script timeout
|
||||
|
||||
|
||||
@@ -274,8 +274,8 @@ def _run_boot_agent(content: str) -> None:
|
||||
max_iterations=20,
|
||||
)
|
||||
result = agent.run_conversation(_build_prompt(content))
|
||||
response = result.get("final_response", "")
|
||||
if response and "[SILENT]" not in response:
|
||||
response = (result.get("final_response", "") or "").strip()
|
||||
if response.upper() not in {"[SILENT]", "SILENT", "NO_REPLY", "NO REPLY"}:
|
||||
logger.info("boot-md completed: %s", response[:200])
|
||||
else:
|
||||
logger.info("boot-md completed (nothing to report)")
|
||||
@@ -323,7 +323,7 @@ Watch the logs:
|
||||
hermes logs --follow --level INFO | grep boot-md
|
||||
```
|
||||
|
||||
You should see `Running BOOT.md (N chars)` followed by either `boot-md completed: ...` (summary of what the agent did) or `boot-md completed (nothing to report)` when the agent replied `[SILENT]`.
|
||||
You should see `Running BOOT.md (N chars)` followed by either `boot-md completed: ...` (summary of what the agent did) or `boot-md completed (nothing to report)` when the agent replied with an exact silence token such as `[SILENT]`.
|
||||
|
||||
Delete `~/.hermes/BOOT.md` to disable the checklist — the hook stays loaded but silently skips when the file isn't there.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user