Commit Graph

816 Commits

Author SHA1 Message Date
Mr.NightQ
b1d03b4057 fix: keep Telegram command sync process-local (#66730) (thanks @nightq)
* fix: use process-scoped cache for Telegram command sync to fix missing menu after restart

Fixes openclaw#66714, openclaw#66682

Root cause: The command hash cache was persisted to disk across gateway
restarts. When the hash matched (commands unchanged), setMyCommands was
skipped entirely. But Telegram bot commands can be cleared by external
factors, so the cached state becomes stale after restart.

Fix: Replace file-based hash cache with a process-scoped Map. This preserves
the rapid-restart rate-limit protection within a single process, but ensures
commands are always re-registered after a gateway restart.

* fix(telegram): drop stale async command cache calls

* fix: keep Telegram command sync process-local (#66730) (thanks @nightq)

---------

Co-authored-by: nightq <zengwei@nightq.cn>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-15 08:02:23 +05:30
François Martin
734bb9c2e7 Telegram/documents: sanitize binary payloads to prevent prompt input inflation (#66877)
Merged via squash.

Prepared head SHA: 09a87c184f
Co-authored-by: martinfrancois <14319020+martinfrancois@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-14 20:53:00 -04:00
Vincent Koc
97ee0c6fd3 perf(migrations): trim legacy migration and bind cold paths 2026-04-15 00:38:45 +01:00
Josh Avant
1769fb2aa1 fix(secrets): align SecretRef inspect/strict behavior across preload/runtime paths (#66818)
* Config: add inspect/strict SecretRef string resolver

* CLI: pass resolved/source config snapshots to plugin preload

* Slack: keep HTTP route registration config-only

* Providers: normalize SecretRef handling for auth and web tools

* Secrets: add Exa web search target to registry and docs

* Telegram: resolve env SecretRef tokens at runtime

* Agents: resolve custom provider env SecretRef ids

* Providers: fail closed on blocked SecretRef fallback

* Telegram: enforce env SecretRef policy for runtime token refs

* Status/Providers/Telegram: tighten SecretRef preload and fallback handling

* Providers: enforce env SecretRef policy checks in fallback auth paths

* fix: add SecretRef lifecycle changelog entry (#66818) (thanks @joshavant)
2026-04-14 17:59:28 -05:00
Vincent Koc
2aaa17dc6f fix(ci): restore main typecheck 2026-04-14 18:53:14 +01:00
OfflynAI
3a371a32e2 fix: filter telegram binary caption text (#66663) (thanks @joelnishanth)
* Telegram: filter binary content from msg.caption to prevent token explosion (#66647)

When a user sends a binary document (e.g. .mobi, .epub) via Telegram, raw
binary bytes can leak into msg.caption. getTelegramTextParts() passes this
through to the LLM prompt, causing catastrophic token explosion (~460K tokens).

Add isBinaryContent() that detects non-printable control characters (0x00-0x08,
0x0E-0x1F) and use it to sanitize the text in getTelegramTextParts() before it
reaches the prompt pipeline. When binary content is detected, the text and
entities are both replaced with empty values so the message is still processed
(media placeholder still works) but the binary junk is dropped.

Made-with: Cursor

* fix: distill telegram binary caption filtering

* fix: filter telegram binary caption text (#66663) (thanks @joelnishanth)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-14 22:14:50 +05:30
Vincent Koc
e58d50b7a8 fix(telegram): trust explicit proxy DNS for media downloads (#66461) 2026-04-14 10:42:33 +01:00
VACInc
26e80cc6cc [codex] Telegram: unblock status commands behind busy turns (#66226)
* Telegram: unblock status commands behind busy turns

* fix(telegram): keep export-session on topic lane

* Update CHANGELOG.md

---------

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-14 08:57:07 +01:00
Luke
0abe64a4ff Agents: clarify local model context preflight (#66236)
Merged via squash.

Prepared head SHA: 11bfaf15f6
Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com>
Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com>
Reviewed-by: @ImLukeF
2026-04-14 15:38:10 +10:00
Peter Steinberger
55604a9a91 test: keep telegram cache boundary compatible 2026-04-13 20:50:11 -07:00
Peter Steinberger
df84225504 test: align post-rebase full-suite drift 2026-04-13 20:49:39 -07:00
Peter Steinberger
d4f556a052 fix: align latest main type drift 2026-04-13 20:49:39 -07:00
Ayaan Zaidi
3c501d3554 test: remove timer dependency from telegram topic cache tests 2026-04-14 08:58:07 +05:30
Ayaan Zaidi
556905a3f4 fix: restore pnpm check 2026-04-14 08:48:15 +05:30
Ayaan Zaidi
c91d3d4537 fix(telegram): persist topic cache via default runtime 2026-04-14 08:32:27 +05:30
Ayaan Zaidi
4f92b1fbb0 fix(telegram): allow topic cache without session runtime 2026-04-14 08:32:27 +05:30
Ayaan Zaidi
59afcf9922 test(telegram): cover topic-name cache reload 2026-04-14 08:32:27 +05:30
Ayaan Zaidi
ad181b2361 fix(telegram): persist topic-name cache 2026-04-14 08:32:27 +05:30
Vincent Koc
955270fb73 fix(ci): repair telegram ui and watch regressions 2026-04-13 23:49:59 +01:00
Vincent Koc
94779b4fb1 fix(ci): repair telegram topic cache typing 2026-04-13 23:33:41 +01:00
Vincent Koc
8ab89989c2 fix(ci): restore plugin-local whatsapp deps 2026-04-13 23:26:25 +01:00
Vincent Koc
f3283a330b fix(ci): repair extension boundary contracts 2026-04-13 22:37:25 +01:00
Ptah.ai
8c43768e27 fix: expose telegram topic names in agent context (#65973) (thanks @ptahdunbar)
* feat(telegram): expose forum topic names in agent context

Telegram Bot API does not provide a method to look up forum topic names
by thread ID. This adds an in-memory LRU cache that learns topic names
from service messages (forum_topic_created, forum_topic_edited,
forum_topic_closed, forum_topic_reopened) and seeds from
reply_to_message.forum_topic_created as a fallback for pre-existing
topics.

The resolved topic name is surfaced as:
- TopicName in MsgContext (available to {{TopicName}} in templates)
- topic_name in the agent prompt metadata block
- topicName in plugin hook event metadata

Includes unit tests for the topic-name-cache module (11 tests including
eviction and read-recency).

Known limitation: cache is in-memory only; after a restart it falls back
to the creation-time name until a rename event is observed.

* refactor(telegram): distill topic name flow

* fix: expose telegram topic names in agent context (#65973) (thanks @ptahdunbar)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-13 23:38:14 +05:30
Mariano
a56dbae80b test(telegram): add inbound retry regressions (#66075)
Merged via squash.

Prepared head SHA: 175cd25889
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-13 20:07:23 +02:00
Vincent Koc
77f1ea0de8 fix(telegram): retry failed approval callbacks 2026-04-13 18:00:38 +01:00
Vincent Koc
aa017bf9dd fix(telegram): retry failed model selections 2026-04-13 17:57:05 +01:00
Vincent Koc
88111453cb fix(telegram): retry failed model browser callbacks 2026-04-13 17:42:06 +01:00
Vincent Koc
1f7f8b02d0 fix(telegram): retry failed pagination preflight 2026-04-13 17:38:02 +01:00
Vincent Koc
f1ec7a75f6 fix(telegram): retry failed plugin binding callbacks 2026-04-13 17:34:59 +01:00
Vincent Koc
0c5471ef8e fix(telegram): retry failed commands pagination callbacks 2026-04-13 17:26:55 +01:00
Vincent Koc
a78d922acf fix(telegram): retry failed model callbacks 2026-04-13 17:24:51 +01:00
Vincent Koc
ab143a754c fix(telegram): retry failed reaction updates 2026-04-13 17:19:46 +01:00
Vincent Koc
8628d05ecd fix(telegram): retry failed group migration updates 2026-04-13 17:16:39 +01:00
Vincent Koc
7c71255948 fix(telegram): defer replay commit until update succeeds 2026-04-13 17:03:17 +01:00
Vincent Koc
54eaf85ea2 fix(telegram): block watermark advancement past failed updates 2026-04-13 16:52:03 +01:00
Vincent Koc
c441dcd47a fix(telegram): avoid leaking thread binding persist cleanup 2026-04-13 16:39:05 +01:00
Vincent Koc
9fc36837b4 fix(telegram): swallow update watermark persistence failures 2026-04-13 16:31:13 +01:00
Peter Steinberger
e4841d767d test: stabilize loaded full-suite checks 2026-04-12 11:52:56 -07:00
Peter Steinberger
a8e140e395 chore: bump version to 2026.4.12 2026-04-12 10:37:18 -07:00
Tak Hoffman
847739d82c Fix dreaming replay, repair polluted artifacts, and gate wiki tabs (#65138)
* fix(active-memory): preserve parent channel context for recall runs

* fix(active-memory): keep recall runs on the resolved channel

* fix(active-memory): prefer resolved recall channel over wrapper hints

* fix(active-memory): trust explicit recall channel hints

* fix(active-memory): rank recall channel fallbacks by trust

* Fix dreaming replay and recovery flows

* fix: prevent dreaming event loss and diary write races

* chore: add changelog entry for memory fixes

* fix: harden dreaming repair and diary writes

* fix: harden dreaming artifact archive naming
2026-04-12 00:25:11 -05:00
Vincent Koc
c3c13ea381 test(telegram): dedupe exec approval resolver cases 2026-04-12 05:27:10 +01:00
Neelabh Kumar
22b53a4973 fix: unblock Telegram approval callback deadlock (#64979) (thanks @nk3750)
* fix(telegram): bypass sequentializer for approval callback_queries

Approval callback_queries from clicking inline buttons get the same
sequential key as the blocked agent turn (telegram:<chatId>), causing a
deadlock: the callback can't run because the lane is held, and the lane
can't release because it's waiting for the callback.

Give approval callbacks a separate lane (telegram:<chatId>:approval),
same pattern as abort requests (telegram:<chatId>:control) and btw
requests (telegram:<chatId>:btw).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style(telegram): trim approval lane comments

* fix: unblock Telegram approval callback deadlock (#64979) (thanks @nk3750)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-12 09:56:44 +05:30
Vincent Koc
45147d5ce3 test(extensions): dedupe bundled entry smoke tests 2026-04-12 03:09:18 +01:00
Vincent Koc
462d8e3bc0 fix(cycles): narrow channel runtime surface 2026-04-11 19:30:33 +01:00
HDYA
26f633b604 feat(msteams): add federated credential support (certificate + managed identity) (#53615)
* feat(msteams): add federated authentication support (certificate + managed identity + workload identity)

* msteams: fix vitest 4.1.2 compat, type errors, and regenerate config baseline

* msteams: fix lint errors, update fetch allowlist, regenerate protocol Swift

* fix(msteams): gate secret-only delegated auth flows

* fix(ci): unblock gateway watch and install smoke

* fix(ci): restore mergeability for pr 53615

* fix(ci): restore channel registry helper typing

* fix(ci): refresh raw fetch guard allowlist

---------

Co-authored-by: Chudi Huang <Chudi.Huang@microsoft.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-11 13:29:22 -05:00
Tak Hoffman
958c34e82c feat(qa-lab): Add proxy capture stack and QA Lab inspector (#64895)
* Add proxy capture core and CLI

* Expand transport capture coverage

* Add QA Lab capture backend

* Refine QA Lab capture UI

* Fix proxy capture review feedback

* Fix proxy run cleanup and TTS capture

* Fix proxy capture transport follow-ups

* Fix debug proxy CONNECT target parsing

* Harden QA Lab asset path containment
2026-04-11 12:34:57 -05:00
Peter Steinberger
5915d7cb6b perf: optimize messaging plugin tests 2026-04-11 13:55:07 +01:00
Vincent Koc
81535d394d fix(cycles): repair broken type surfaces 2026-04-11 13:42:17 +01:00
Peter Steinberger
1ab6e5dbf0 chore(release): bump version to 2026.4.11 2026-04-11 04:51:17 +01:00
Peter Steinberger
e11d902b7d fix(ci): stop telegram debounce media leak 2026-04-11 03:36:48 +01:00