The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(cron): name the Bot Chat policy platform; drop a no-op pop
kshitijk4poor3da502b67ab3
diff --git a/cron/bot_chat_delivery.py b/cron/bot_chat_delivery.pyindex 97ee0888194..cdb6a2f7020 100644--- a/cron/bot_chat_delivery.py+++ b/cron/bot_chat_delivery.py@@ -99,10 +99,11 @@ def _drain(root: Path) -> None:home = Path(record["home"])# A failure notice queued before the target profile opted out is settled as# suppressed at drain time; the policy is the owner's, read from its own config.+ from cron.scheduler_delivery import BOT_CHAT_POLICY_PLATFORMfrom gateway.warning_notifications import warning_notifications_enabledfrom hermes_cli.config_effective import load_user_config_effectiveif (record.get("for_failure")- and not warning_notifications_enabled("tui", load_user_config_effective(home / "config.yaml"))):+ and not warning_notifications_enabled(BOT_CHAT_POLICY_PLATFORM, load_user_config_effective(home / "config.yaml"))):record.update(status="suppressed", error=None)atomic_json_write(path, record, fsync_dir=True, mode=0o600)continuediff --git a/cron/scheduler_delivery.py b/cron/scheduler_delivery.pyindex 124f9672f87..ce97bf4aff2 100644--- a/cron/scheduler_delivery.py+++ b/cron/scheduler_delivery.py@@ -719,7 +719,6 @@ def _deliver_to_bot_chat(job: dict, content: str, profile: str, *, deferred: Optjob_id = job.get("id", "?")profile_label = profile or "(own)"- job.pop("_notification_all_targets_suppressed", None)message = (f'[Cronjob "{job.get("name", job_id)}" output — scheduled job, not the user. 'f"Review it, act on anything that needs action, and summarize "@@ -734,7 +733,7 @@ def _deliver_to_bot_chat(job: dict, content: str, profile: str, *, deferred: Optfrom gateway.warning_notifications import warning_notifications_enabledfrom hermes_cli.config_effective import load_user_config_effectivesuppress_notification = for_failure and not warning_notifications_enabled(- "tui", load_user_config_effective(home / "config.yaml"))+ BOT_CHAT_POLICY_PLATFORM, load_user_config_effective(home / "config.yaml"))if deferred is not None and not (home / "state.db").is_file():return f"bot-chat delivery target no longer exists: {home}; do not resend"# run_one_job/claim_fire attach the durable execution id before delivery. The@@ -891,6 +890,8 @@ _ROUTING_TOKENS = frozenset({"all"})# Pseudo-platform: deliver output as a real inbound turn into a profile's "Bot Chat" (not a mirror).# ``bot-chat`` = own profile; ``bot-chat:<name>`` = named profile on THIS machine.BOT_CHAT_PLATFORM = "bot-chat"+# Bot Chat is the TUI/Desktop transcript, so its warning policy is display.platforms.tui.+BOT_CHAT_POLICY_PLATFORM = "tui"def parse_bot_chat_deliver_token(part: str) -> Optional[str]: