* Add Telegram auto mode polling and init username fallback
* Expose Telegram resetWebhook API
* Refine Telegram API to longPolling and safer auto mode
* Fix: Environment variable cleanup sets `process.env.VERCEL` to the string `"undefined"` (truthy) instead of removing it, leaking a truthy VERCEL env var into subsequent tests.
This commit fixes the issue reported at packages/adapter-telegram/src/index.test.ts:661
**Bug explanation:**
In the test "auto mode stays in webhook mode on serverless runtime" (line 622), the cleanup code in the `finally` block at line 662 uses `process.env.VERCEL = undefined` when the env var wasn't previously set. In Node.js, `process.env` coerces all values to strings, so `process.env.VERCEL = undefined` actually sets `process.env.VERCEL` to the string `"undefined"`. This is truthy (`Boolean("undefined")` === `true`).
This was verified empirically:
```
process.env.TEST_VAR = undefined;
typeof process.env.TEST_VAR // "string"
process.env.TEST_VAR // "undefined"
Boolean(process.env.TEST_VAR) // true
```
The consequence is that after this test runs, `process.env.VERCEL` remains set to the truthy string `"undefined"`, causing `isLikelyServerlessRuntime()` to return `true` for all subsequent tests that run in the same process. This could cause any auto-mode tests that follow to incorrectly detect a serverless runtime and behave differently than expected.
**Fix explanation:**
Changed `process.env.VERCEL = undefined` to `delete process.env.VERCEL`, which properly removes the environment variable from `process.env`. After `delete`, `process.env.VERCEL` is `undefined` (the actual undefined value, not the string), and `Boolean(process.env.VERCEL)` correctly returns `false`. This matches the standard pattern for cleaning up environment variables in Node.js tests.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: timolins <me@timo.sh>
* Fix lint: replace delete env cleanup with Reflect.deleteProperty
* Harden Telegram polling tests and polish polling docs
* Improve Telegram polling docs with clearer motivation and examples
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(chat, adapter-gchat): add disabled prop to Button
Google Chat Cards v2 natively supports `disabled` on buttons, but
`ButtonOptions` / `ButtonElement` didn't expose it. Add the prop to
the core type and thread it through the gchat adapter serializer.
Closes#149
Made-with: Cursor
* feat(adapter-discord): thread disabled prop through Discord button serializer
DiscordButton already had `disabled` in its type but convertButtonElement
never set it from ButtonElement. Wire it through so disabled buttons
render correctly on Discord too.
Made-with: Cursor
* feat(chat): allow disabling fallback streaming placeholder
Add ChatConfig options to delay initial post+edit placeholder and wait for real text before creating the streamed message. Improves ordering for Telegram and other fallback-streaming adapters.
Made-with: Cursor
* fix(chat): simplify fallback streaming placeholder
* Create fallback-streaming-placeholder.md
* Improve test
* Add new test
* Run fix
* Update streaming.mdx
---------
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
* fix(discord): add Partials.Channel to gateway client for DM support
The gateway client requests DirectMessages intent but doesn't include `Partials.Channel`, which discord.js requires to emit DM events. Without it, all DM `MessageCreate` events are silently dropped.
Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com>
* Create fix-discord-dm-partials.md
* Create gateway.test.ts
* Run fix
---------
Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
* refactor: replace broad googleapis dependency with specific packages
* fix: reorder imports in gchat adapter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Create tidy-groups-marry.md
---------
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>