openclaw/extensions/telegram
Peter Steinberger 931c7b40b2
fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792)
* fix(test): load compiled-subprocess declarations at collection

The first load of a compiled-subprocess declaration in a Vitest invocation
prepares the whole compiled worker generation (tens of seconds warm, minutes
cold). 387 test files first reached a declaration through an await import()
inside a test body or hook, so their first test or hook absorbed that
preparation and could time out.

Move those loads to collection at their owner: static subject imports,
static imports in the shared helpers that owned the lazy load, and a named
side-effect preload (src/test-utils/prepare-compiled-subprocesses.ts) for
suites that re-import their subject per test or whose first load happens in
production code they call. plugin-test-runtime keeps the host-capability
fixture lazy so its other consumers do not start loading that graph.
Document the rule in docs/help/testing/writing-tests.md.

335 of the 387 files now load their first declaration before collection
ends; 52 remain (48 extension tests needing an SDK preload, one package
test, three files over the line cap).

* fix(test): retain npm install fixture reuse

Preserve the existing failedSpawn reuse after merging main so the collection-time preload stays within the line-cap ratchet. Assertions and import ordering are unchanged.

* fix(test): keep memory-core facade cold-import assertion meaningful

The static subject import ran before beforeEach reset the loader mock, so the cold-import assertion passed vacuously. Restore the in-test subject imports after mock setup and preload the compiled-subprocess declaration during collection instead.
2026-10-01 11:42:59 -07:00
..
assets improve(plugins): give bundled logos consistent white icon tiles (#155259) 2026-09-23 19:09:26 -07:00
src fix(test): first test or hook times out while compiled worker subprocesses prepare (#162792) 2026-10-01 11:42:59 -07:00
account-inspect-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
AGENTS.md fix(telegram): deliver final replies through Telegram flood waits (#157349) 2026-09-25 02:57:17 +05:30
allow-from.ts refactor: simplify runtime adapters and remove obsolete code (#152277) 2026-09-18 19:35:45 -07:00
api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
channel-config-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
channel-plugin-api.ts
config-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
config-doctor-api.ts
contract-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
directory-contract-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
dispatch.test-api.ts fix: deliver final replies after unrelated plugin reloads (#160009) 2026-09-28 12:01:23 -04:00
doctor-contract-api.ts fix: preserve legacy delivery and Telegram queues during upgrades (#162206) 2026-09-30 20:14:51 -07:00
index.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
miniapp-api.ts
native-command.test-support.ts fix: recognize verified team admins as channel owners (#153508) 2026-09-21 19:56:45 -07:00
openclaw.plugin.json fix: preserve legacy delivery and Telegram queues during upgrades (#162206) 2026-09-30 20:14:51 -07:00
package.json chore(release): close out 2026.9.7 on main (#161587) 2026-09-29 22:39:14 -07:00
README.md fix: preserve legacy delivery and Telegram queues during upgrades (#162206) 2026-09-30 20:14:51 -07:00
runtime-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
runtime-setter-api.ts
secret-contract-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
security-audit-contract-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
session-key-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00
setup-entry.ts refactor: simplify runtime adapters and remove obsolete code (#152277) 2026-09-18 19:35:45 -07:00
setup-plugin-api.ts
test-api.ts test(telegram): remove rate waits from recovery fence (#151424) 2026-09-19 19:49:14 -07:00
tsconfig.json
update-offset-runtime-api.ts refactor(extensions): deslop large channel and browser plugins further (#159430) 2026-09-27 01:36:24 -07:00

Telegram

Talk to OpenClaw through a Telegram bot in direct messages, groups, channels, and topics. The plugin supports media, voice notes, reactions, polls, and native commands.

Get started

Create a bot with @BotFather, then add Telegram using openclaw channels add and provide the bot token. Verify the connection with openclaw channels status --probe.

Send your bot a message, then approve the resulting pairing request. Group access uses separate allowlists and mention settings; configure these before using the bot in a group.

Follow the Telegram setup guide for bot creation, pairing, and group permissions.

Upgrade legacy ingress state

Update-time Doctor and startup migration import remaining telegram/ingress-spool-<account>/*.json and .json.processing files into SQLite ingress. Pending updates retain their payload and receipt timestamp; old process claims return to pending replay. .json.failed files remain failed tombstones with their original failure time and are never automatically replayed.

Doctor backs up exact source bytes as .migrated files before normalization. Import receipts prevent duplicate replay after an interrupted cleanup, including after the corresponding queue rows have been consumed or pruned. Conflicting or malformed sources remain intact with a diagnostic; resolve the reported conflict and run openclaw doctor --fix. Keep the backups for recovery. Verified cleanup-only failures warn without blocking an upgrade.

Plugin developers can follow the Doctor ingress migration contract.