Commit Graph

34 Commits

Author SHA1 Message Date
Peter Steinberger 1967e4c04d refactor(telegram): privatize internal plugin surfaces (#108026)
* refactor(telegram): privatize internal plugin surfaces

* chore(deadcode): refresh export baseline
2026-07-14 22:20:46 -07:00
Peter Steinberger d262cad41f refactor: burn down Matrix, Telegram, and outbound dead exports (#106153)
* refactor(matrix): remove unused internal exports

* refactor(telegram): remove unused internal exports

* refactor(matrix): remove stale thread binding imports

* refactor(outbound): remove unused internal exports

* style(outbound): format dead export cleanup
2026-07-13 04:39:58 -07:00
Josh Lehman 4c841ac575 refactor: remove Telegram session deps adapter (#96524)
* refactor: remove telegram session deps adapter

* test: update telegram session ratchet expectation
2026-06-24 11:37:19 -07:00
Josh Lehman f1b8827d20 refactor: route bundled plugin session callers through seam (#89129)
Merged via squash.

Prepared head SHA: 7975bc06ac
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-06-14 12:26:53 -07:00
Peter Steinberger efd1a9ace6 docs: document messaging extension sources 2026-06-04 22:03:15 -04:00
Peter Steinberger 60956ba6ac perf: narrow telegram bot test imports 2026-04-24 04:09:13 +01:00
Val Alexander 9ea5484fa1 fix: normalize opus 4.7 context window
Normalize Anthropic-owned Opus 4.7 context reporting to 1M while keeping inferred and bare discovery paths conservative.

- normalize Anthropic and claude-cli Opus 4.7 runtime/status context metadata to 1M
- keep inferred-provider and bare discovery ids on discovered conservative limits
- add regression coverage for provider, lookup, status, and discovery-cache paths
- keep the Telegram abort-signal wrapper typing narrow so changed-scope validation stays green
2026-04-22 14:58:16 -05:00
Peter Steinberger 95331e5cc5 fix(channels): thread runtime config through sends 2026-04-22 06:47:51 +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 9fc36837b4 fix(telegram): swallow update watermark persistence failures 2026-04-13 16:31:13 +01:00
Vincent Koc 3b6500ca20 fix(telegram): bypass bot handlers barrel 2026-04-10 10:00:24 +01:00
Vincent Koc 337fa8c956 fix(telegram): split bot option types 2026-04-10 08:16:28 +01:00
Peter Steinberger 179ccb952c refactor: dedupe telegram matrix lowercase helpers 2026-04-07 20:57:04 +01:00
Peter Steinberger ce19b6bf6a refactor: dedupe channel extension readers 2026-04-07 08:40:34 +01:00
Neerav Makwana 177e23801b fix(telegram): bound startup request timeouts (#61601) (thanks @neeravmakwana) 2026-04-06 13:20:15 +01:00
Vincent Koc 88d3b73c6d fix(types): annotate portable exported helper types 2026-04-04 03:57:47 +09:00
Peter Steinberger 14c863dc4a test: reduce telegram media harness imports 2026-04-03 18:33:47 +01:00
Peter Steinberger 4e22e75697 test: reduce telegram broad partial mocks 2026-04-03 12:01:10 +01:00
Vincent Koc 687030cbf2 perf(memory): trim matrix and telegram runtime seams 2026-04-02 10:18:56 +09:00
Peter Steinberger f7285e0a9e test: speed up extension suites 2026-03-31 02:25:02 +01:00
Peter Steinberger cce6d3bbb7 fix: resolve CI type and lint regressions 2026-03-30 04:51:33 +09:00
Peter Steinberger 0d98ce1065 refactor: add diagnostic and error runtime sdk seams 2026-03-28 06:26:38 +00:00
Ayaan Zaidi 6949e17429 refactor(telegram): simplify transport typing 2026-03-28 10:05:11 +05:30
Ayaan Zaidi efef319496 refactor(telegram): tighten chat action typings 2026-03-28 09:41:18 +05:30
Vincent Koc 80441baa15 perf(core): trim provider and inbound startup imports (#51927)
* fix(telegram): fail fast on stuck getUpdates

* perf(core): trim provider and inbound startup imports
2026-03-21 16:20:42 -07:00
Cypherm 6b4c24c2e5 feat(telegram): support custom apiRoot for alternative API endpoints (#48842)
* feat(telegram): support custom apiRoot for alternative API endpoints

Add `apiRoot` config option to allow users to specify custom Telegram Bot
API endpoints (e.g., self-hosted Bot API servers). Threads the configured
base URL through all Telegram API call sites: bot creation, send, probe,
audit, media download, and api-fetch. Extends SSRF policy to dynamically
trust custom apiRoot hostname for media downloads.

Closes #28535

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

* fix(telegram): thread apiRoot through allowFrom lookups

* fix(telegram): honor lookup transport and local file paths

* refactor(telegram): unify username lookup plumbing

* fix(telegram): restore doctor lookup imports

* fix: document Telegram apiRoot support (#48842) (thanks @Cypherm)

---------

Co-authored-by: Cypherm <28184436+Cypherm@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-21 10:10:38 +05:30
Peter Steinberger 62ddc9d9e0 refactor: consolidate plugin sdk surface 2026-03-20 19:24:10 +00:00
Josh Avant 68bc6effc0 Telegram: stabilize pairing/session/forum routing and reply formatting tests (#50155)
* Telegram: stabilize Area 2 DM and model callbacks

* Telegram: fix dispatch test deps wiring

* Telegram: stabilize area2 test harness and gate flaky sticker e2e

* Telegram: address review feedback on config reload and tests

* Telegram tests: use plugin-sdk reply dispatcher import

* Telegram tests: add routing reload regression and track sticker skips

* Telegram: add polling-session backoff regression test

* Telegram tests: mock loadWebMedia through plugin-sdk path

* Telegram: refresh native and callback routing config

* Telegram tests: fix compact callback config typing
2026-03-19 00:01:14 -05:00
Ayaan Zaidi b85d97f22c refactor(telegram): inject shared bot deps 2026-03-18 10:12:15 +05:30
Ayaan Zaidi 6aaf0d0f24 test(telegram): add bot runtime seam 2026-03-18 10:12:15 +05:30
Kwest OG 8139f83175 fix(telegram): persist sticky IPv4 fallback across polling restarts (fixes #48177) (#48282)
* fix(telegram): persist sticky IPv4 fallback across polling restarts (fixes #48177)

Hoist resolveTelegramTransport() out of createTelegramBot() so the
transport (and its sticky IPv4 fallback state) persists across polling
restarts. Previously, each polling restart created a new transport with
stickyIpv4FallbackEnabled=false, causing repeated IPv6 timeouts on
hosts with unstable IPv6 connectivity.

Changes:
- bot.ts: accept optional telegramTransport in TelegramBotOptions
- monitor.ts: resolve transport once before polling loop
- polling-session.ts: pass transport through to bot creation

AI-assisted (Claude Sonnet 4). Tested: tsc --noEmit clean.

* Update extensions/telegram/src/polling-session.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* style: fix oxfmt formatting in bot.ts

* test: cover telegram transport reuse across restarts

* fix: preserve telegram sticky IPv4 fallback across polling restarts (#48282) (thanks @yassinebkr)

---------

Co-authored-by: Yassine <yassinebkr@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-17 21:56:12 +05:30
Peter Steinberger 9ebe38b6e3 refactor: untangle remaining plugin sdk boundaries 2026-03-16 21:16:32 -07:00
scoootscooob e5bca0832f refactor: move Telegram channel implementation to extensions/ (#45635)
* refactor: move Telegram channel implementation to extensions/telegram/src/

Move all Telegram channel code (123 files + 10 bot/ files + 8 channel plugin
files) from src/telegram/ and src/channels/plugins/*/telegram.ts to
extensions/telegram/src/. Leave thin re-export shims at original locations so
cross-cutting src/ imports continue to resolve.

- Fix all relative import paths in moved files (../X/ -> ../../../src/X/)
- Fix vi.mock paths in 60 test files
- Fix inline typeof import() expressions
- Update tsconfig.plugin-sdk.dts.json rootDir to "." for cross-directory DTS
- Update write-plugin-sdk-entry-dts.ts for new rootDir structure
- Move channel plugin files with correct path remapping

* fix: support keyed telegram send deps

* fix: sync telegram extension copies with latest main

* fix: correct import paths and remove misplaced files in telegram extension

* fix: sync outbound-adapter with main (add sendTelegramPayloadMessages) and fix delivery.test import path
2026-03-14 02:50:17 -07:00