Commit Graph

19348 Commits

Author SHA1 Message Date
Vincent Koc 114ff23f2a perf(config): skip shell env fallback for explicit empty vars 2026-04-13 19:09:11 +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
Vincent Koc ab4efa47b5 perf(cron): keep skill filter runtime lazy 2026-04-13 18:58:32 +01:00
Vincent Koc 28787985c4 perf(cron): lazy-load delivery runtime helpers 2026-04-13 18:55:54 +01:00
Mariano Belinky fbdbd998d3 fix(session): clear stale thread route on system events 2026-04-13 19:55:15 +02:00
Vincent Koc a372e4a152 perf(agents): isolate agent scope config helpers 2026-04-13 18:49:25 +01:00
Vincent Koc 117ae85bf5 perf(agents): isolate thinking default helper 2026-04-13 18:39:38 +01:00
Vincent Koc 5b11985439 perf(cron): lazy-load external content runtime 2026-04-13 18:34:04 +01:00
Vincent Koc a5980df101 perf(cron): lazy-load run executor runtime 2026-04-13 18:30:54 +01:00
Vincent Koc c70be4b4af perf(sessions): isolate reset policy helpers 2026-04-13 18:28:53 +01:00
Vincent Koc b6abd68a29 perf(channels): split hot-path message channel normalization 2026-04-13 18:22:12 +01:00
Mariano 527895f036 Gateway/sessions: preserve shared session route on system events (#66073)
Merged via squash.

Prepared head SHA: 314a93578ec9fce465ca94d0a90d6f642e5e4a05
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 19:19:58 +02:00
Vincent Koc 907df51478 perf(cron): use narrow verbose-level runtime seam 2026-04-13 18:14:23 +01:00
Vincent Koc 93ce76afe3 perf(agents): use lightweight model fallback selection helpers 2026-04-13 18:12:09 +01:00
Vincent Koc 241349cdc5 perf(cron): use lightweight model selection resolver 2026-04-13 18:12:09 +01:00
Vincent Koc 3df3981e26 perf(cron): drop stale skill snapshot runtime exports 2026-04-13 18:12:09 +01:00
Vincent Koc d1e3ed3743 fix(plugins): serialize interactive callback dedupe 2026-04-13 18:04:28 +01:00
Vincent Koc 6d85dda336 test(cron): mock skills snapshot runtime seam 2026-04-13 18:02:09 +01:00
Vincent Koc 8f3e2296f9 perf(cron): use narrow bound-account lookup 2026-04-13 17:57:47 +01:00
Vincent Koc df4c086c52 perf(cron): narrow execution and skill runtime imports 2026-04-13 17:52:19 +01:00
Vincent Koc 31233a1995 perf(sessions): use loaded thread-info seam 2026-04-13 17:49:46 +01:00
Vincent Koc b2589ac451 perf(cron): use read-only allow-from store seam 2026-04-13 17:47:05 +01:00
Vincent Koc fdf7dbd6eb perf(channels): read bundled channel metadata directly 2026-04-13 17:43:36 +01:00
Vincent Koc 139a3f49fe perf(cron): lazy-load delivery logger runtime 2026-04-13 17:37:29 +01:00
Vincent Koc 96a6f55da8 perf(utils): isolate message channel normalization 2026-04-13 17:34:46 +01:00
Vincent Koc be68309e7b perf(outbound): narrow loaded target channel reads 2026-04-13 17:34:27 +01:00
Vincent Koc eed595bba9 perf(channels): isolate loaded target parsing 2026-04-13 17:28:09 +01:00
Mariano b42c999633 fix(heartbeat): preserve Telegram topic routing for isolated heartbeats (#66035)
Merged via squash.

Prepared head SHA: 83b986a4c342a7d75a9446918f1bd992152d1900
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 18:26:19 +02:00
Vincent Koc bde246e7af perf(auth-profiles): narrow source check path imports 2026-04-13 17:23:59 +01:00
Vincent Koc 3ceba442b7 perf(plugins): isolate manifest registry cache state 2026-04-13 17:21:21 +01:00
Vincent Koc da3977e681 perf(agents): narrow failover helper imports 2026-04-13 17:21:21 +01:00
Vincent Koc 6eb04c8aab perf(outbound): isolate id-like target resolution 2026-04-13 17:17:26 +01:00
Vincent Koc 08ca248378 perf(outbound): use loaded-only channel plugin reads 2026-04-13 17:12:27 +01:00
Vincent Koc ae3d731810 perf(outbound): use read-only channel registry seam 2026-04-13 17:05:53 +01:00
Vincent Koc 019f32cdb8 perf(cron): lazy-load skills snapshot runtime 2026-04-13 17:00:22 +01:00
Vincent Koc a8977cde64 perf(cron): lazy-load delivery subagent registry 2026-04-13 16:57:46 +01:00
Vincent Koc 7daa0d047a perf(cron): use session store read path 2026-04-13 16:54:25 +01:00
Vincent Koc 101c16b0b1 perf(cron): lazy-load context and catalog lookups 2026-04-13 16:53:32 +01:00
Vincent Koc 95517edaeb perf(agents): keep model fallback auth runtime cold 2026-04-13 16:50:30 +01:00
Vincent Koc 285bfb3f93 perf(cron): narrow live switch error import 2026-04-13 16:50:30 +01:00
Vincent Koc eddcf722da perf(cron): trim unused runtime barrel exports 2026-04-13 16:45:08 +01:00
Vincent Koc e157c83c65 fix(runtime): avoid leaking detached cleanup promises 2026-04-13 16:42:31 +01:00
Bob 74f2c4a56b fix: stop repeated unknown-tool loops (#65922)
Merged via squash.

Prepared head SHA: f352a270a6c0f36888223314ee279c42cff05408
Reviewed-by: @osolmaz
2026-04-13 17:42:11 +02:00
Vincent Koc 21d850dd66 perf(cron): lazy-load embedded runtime branch 2026-04-13 16:41:14 +01:00
Vincent Koc 35176f3cb7 perf(cron): isolate runtime-heavy seams 2026-04-13 16:38:26 +01:00
Vincent Koc df27091f5f fix(auto-reply): avoid leaking inbound debounce cleanup 2026-04-13 16:36:03 +01:00
Vincent Koc 7c91d0dbc9 fix(auto-reply): release inbound dedupe after dispatch errors 2026-04-13 16:34:35 +01:00
Vincent Koc 66ea85f9d4 perf(cron): narrow session runtime imports 2026-04-13 16:33:36 +01:00
Vincent Koc 2bc031c357 perf(cron): keep auth profile runtime cold 2026-04-13 16:30:28 +01:00
Vincent Koc 6a8704cf26 fix(tasks): avoid leaking scheduled sweep failures 2026-04-13 16:26:55 +01:00