hermes-agent/tools
Teknium 7ac9088d5c
fix: Telegram streaming — config bridge, not-modified, flood control (#1782)
* fix: NameError in OpenCode provider setup (prompt_text -> prompt)

The OpenCode Zen and OpenCode Go setup sections used prompt_text()
which is undefined. All other providers correctly use the local
prompt() function defined in setup.py. Fixes crash during
'hermes setup' when selecting either OpenCode provider.

* fix: Telegram streaming — config bridge, not-modified, flood control

Three fixes for gateway streaming:

1. Bridge streaming config from config.yaml into gateway runtime.
   load_gateway_config() now reads the 'streaming' key from config.yaml
   (same pattern as session_reset, stt, etc.), matching the docs.
   Previously only gateway.json was read.

2. Handle 'Message is not modified' in Telegram edit_message().
   This Telegram API error fires when editing with identical content —
   a no-op, not a real failure. Previously it returned success=False
   which made the stream consumer disable streaming entirely.

3. Handle RetryAfter / flood control in Telegram edit_message().
   Fast providers can hit Telegram rate limits during streaming.
   Now waits the requested retry_after duration and retries once,
   instead of treating it as a fatal edit failure.

Also fixed double-edit on stream finish: the consumer now tracks
last-sent text and skips redundant edits, preventing the not-modified
error at the source.

* refactor: make config.yaml the primary gateway config source

Eliminates the per-key bridge pattern in load_gateway_config().
Previously gateway.json was the primary source and each config.yaml
key needed an individual bridge — easy to forget (streaming was
missing, causing garl4546's bug).

Now config.yaml is read first and its keys are mapped directly into
the GatewayConfig.from_dict() schema. gateway.json is kept as a
legacy fallback layer (loaded first, then overwritten by config.yaml
keys). If gateway.json exists, a log message suggests migrating.

Also:
- Removed dead save_gateway_config() (never called anywhere)
- Updated CLI help text and send_message error to reference
  config.yaml instead of gateway.json

---------

Co-authored-by: Test <test@test.com>
2026-03-17 10:51:54 -07:00
..
browser_providers feat(browser): multi-provider cloud browser support + Browser Use integration 2026-03-17 00:16:34 -07:00
environments merge: resolve conflicts with origin/main 2026-03-17 04:30:37 -07:00
neutts_samples refactor(tts): replace NeuTTS optional skill with built-in provider + setup flow 2026-03-17 02:33:12 -07:00
__init__.py feat: compress cron management into one tool 2026-03-14 12:21:50 -07:00
approval.py fix(security): harden terminal safety and sandbox file writes (#1653) 2026-03-17 02:22:12 -07:00
browser_tool.py fix(tools): browser handler safety + fuzzy_match docstring accuracy 2026-03-17 04:32:39 -07:00
checkpoint_manager.py feat: major /rollback improvements — enabled by default, diff preview, file-level restore, conversation undo, terminal checkpoints 2026-03-16 04:43:37 -07:00
clarify_tool.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
code_execution_tool.py fix: improve execute_code error logging and harden cleanup (#1623) 2026-03-16 23:13:26 -07:00
cronjob_tools.py feat: add SMS (Twilio) platform adapter 2026-03-17 03:14:53 -07:00
debug_helpers.py refactor: consolidate debug logging across tools with shared DebugSession class 2026-02-21 03:53:24 -08:00
delegate_tool.py fix: preserve parent agent's tool list after subagent delegation (#1778) 2026-03-17 10:31:38 -07:00
file_operations.py fix: make _is_write_denied robust to Path objects (#1678) 2026-03-17 02:57:02 -07:00
file_tools.py fix: prevent infinite 400 loop on context overflow + block prompt injection via cache files (#1630, #1558) 2026-03-17 01:50:59 -07:00
fuzzy_match.py fix(tools): browser handler safety + fuzzy_match docstring accuracy 2026-03-17 04:32:39 -07:00
homeassistant_tool.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
honcho_tools.py fix(honcho): isolate session routing for multi-user gateway (#1500) 2026-03-16 00:23:47 -07:00
image_generation_tool.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
interrupt.py feat: enhance interrupt handling and container resource configuration 2026-02-23 02:11:33 -08:00
mcp_tool.py feat: interactive MCP tool configuration in hermes tools (#1694) 2026-03-17 03:48:44 -07:00
memory_tool.py fix(memory): file-lock read-modify-write to prevent concurrent data loss 2026-03-17 04:19:11 -07:00
mixture_of_agents_tool.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
neutts_synth.py refactor(tts): replace NeuTTS optional skill with built-in provider + setup flow 2026-03-17 02:33:12 -07:00
openrouter_client.py refactor: route ad-hoc LLM consumers through centralized provider router 2026-03-11 20:02:36 -07:00
patch_parser.py fix(patch): use regex to detect line-number prefix to avoid corrupting pipe chars 2026-03-14 03:47:13 -07:00
process_registry.py fix(gateway): persist watcher metadata in checkpoint for crash recovery (#1706) 2026-03-17 03:52:15 -07:00
registry.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
rl_training_tool.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
send_message_tool.py fix: Telegram streaming — config bridge, not-modified, flood control (#1782) 2026-03-17 10:51:54 -07:00
session_search_tool.py fix(logging): improve error logging in session search tool (#1533) 2026-03-16 05:22:00 -07:00
skill_manager_tool.py Merge pull request #1537 from aydnOktay/improve/skill-manager-error-logging 2026-03-17 01:53:58 -07:00
skills_guard.py fix(skills): honor policy table for dangerous verdicts 2026-03-14 11:27:02 -07:00
skills_hub.py feat: add NeuTTS optional skill + local TTS provider backend 2026-03-17 02:13:34 -07:00
skills_sync.py fix: make skills manifest writes atomic 2026-03-08 23:53:57 -07:00
skills_tool.py fix: prevent infinite 400 loop on context overflow + block prompt injection via cache files (#1630, #1558) 2026-03-17 01:50:59 -07:00
terminal_tool.py fix(gateway): persist watcher metadata in checkpoint for crash recovery (#1706) 2026-03-17 03:52:15 -07:00
tirith_security.py fix: send_animation metadata, MarkdownV2 inline code splitting, tirith cosign-free install (#1626) 2026-03-16 23:39:41 -07:00
todo_tool.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
transcription_tools.py fix(stt): respect explicit provider config instead of env-var fallback (#1775) 2026-03-17 10:30:58 -07:00
tts_tool.py refactor(tts): replace NeuTTS optional skill with built-in provider + setup flow 2026-03-17 02:33:12 -07:00
vision_tools.py feat(tools): centralize tool emoji metadata in registry + skin integration 2026-03-15 20:21:21 -07:00
voice_mode.py fix: propagate STT disable through shared transcription config 2026-03-14 22:09:59 -07:00
web_tools.py feat(web): add Tavily as web search/extract/crawl backend (#1731) 2026-03-17 04:28:03 -07:00
website_policy.py fix: harden website blocklist — default off, TTL cache, fail-open, guarded imports 2026-03-17 03:11:26 -07:00