Skip to content

Commit adc1440

Browse files
committed
sync: upstream v4.27.0 (alpha 1)
Establish the sync branch for upstream Vercel Chat 4.27.0 (release commit f55378a, Apr 30 2026). No feature ports yet — this bumps version to 0.4.27a1, sets UPSTREAM_PARITY = "4.27.0", and lays out the 22-commit port plan in CHANGELOG.md. Each substantive commit will land as its own PR matching the cadence used during the 4.26.0 sync (#64, #66, #67, #74, etc.). The fidelity workflow stays pinned to chat@4.26.0 until the first feature port lands or upstream publishes a chat@4.27.0 tag (only @chat-adapter/shared@4.27.0 was tagged on Apr 30; the chat package version was bumped via package.json only). Local fidelity against chat@4.26.0 still reports 0 missing. Against the new upstream there are 22 missing tests — the expected sync work. https://claude.ai/code/session_01FyMxQn2BEAzmwKS1GZczKj
1 parent 04c0658 commit adc1440

5 files changed

Lines changed: 85 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,76 @@
11
# Changelog
22

3+
## 0.4.27a1 (2026-05-07)
4+
5+
Alpha sync starter for upstream `4.27.0` (`vercel/chat` release commit
6+
`f55378a`, Apr 30 2026). **No feature ports in this release** — this is a
7+
parity-bookkeeping bump that establishes the sync branch, sets
8+
`UPSTREAM_PARITY = "4.27.0"`, and lays out the porting plan below. Each
9+
substantive commit lands as its own PR (matching the cadence used during
10+
the `4.26.0` sync: #64, #66, #67, #74, etc.).
11+
12+
### Upstream tagging note
13+
14+
Upstream cut versions for the entire monorepo on Apr 30 2026 (commit
15+
`f55378a`), bumping `packages/chat/package.json` from `4.26.0` to
16+
`4.27.0`. As of this writing only `@chat-adapter/shared@4.27.0` got a
17+
git tag — no `chat@4.27.0` tag was published. The fidelity workflow
18+
(`scripts/verify_test_fidelity.py`, `.github/workflows/lint.yml`)
19+
therefore stays pinned to `chat@4.26.0` until either the tag is
20+
published upstream or the first feature port lands and we move the pin
21+
to commit `f55378a` directly. Local devs running fidelity in baseline
22+
mode will see a `chat@4.26.0` vs `chat@4.27.0` mismatch — that's the
23+
intended in-flight signal.
24+
25+
### Sync scope (22 substantive upstream commits between `chat@4.26.0..f55378a`)
26+
27+
#### Core (`packages/chat/``src/chat_sdk/`)
28+
29+
- [ ] **`chat.getUser(adapter, userId)`** for cross-platform user lookups (#391, upstream commit `a520797`). Adapter-side: each adapter exposes `getUser`. Touches `chat.py`, `types.py` (`User` type extension), and every adapter (`slack`, `teams`, `gchat`, `telegram`, `discord`, `whatsapp`, `github`, `linear`).
30+
- [ ] **`ExternalSelect.initial_option` + `option_groups`** (#410, `70281dc`). Type extension in `types.py`; Slack adapter must serialize `option_groups` to Block Kit.
31+
- [ ] **`thread.post()` streaming options** (#388, `9093292`). New params plumb through `Thread.post``chat.py` orchestrator.
32+
- [ ] **Slack streaming team ID fix for interactive payloads** (#330, `8a0c7b3`). Bug fix in the Slack streaming path; check `adapters/slack/adapter.py` request-context plumbing.
33+
- [ ] **Bundled guide markdown + templates manifest** (#423, `b0ab804`). Decision: skip or copy `packages/chat/resources/guides/*.md` and `templates.json` verbatim. Probably skip — these are TS-monorepo authoring resources, not runtime behavior.
34+
- [x] **`concurrency.maxConcurrent` honored in `concurrent` strategy** (#419, `d630e6c`). Already addressed in the Python port — see the existing `ConcurrencyConfig.max_concurrent` row in `docs/UPSTREAM_SYNC.md` (we enforce via `asyncio.Semaphore` and reject misconfiguration). Upstream has now caught up; on this sync the divergence row downgrades from "silent correctness bug upstream" to "behavior parity restored".
35+
36+
#### Slack (`packages/adapter-slack/``src/chat_sdk/adapters/slack/`)
37+
38+
- [ ] **Slack Socket Mode support** (#162, `7e9d0fc`). Big — adds a persistent WebSocket transport alongside HTTP webhooks. Decision: in scope or follow-up? Mirrors the Discord Gateway gap already documented in non-parity ("HTTP interactions only").
39+
- [ ] **Dynamic `bot_token` resolver + custom `webhookVerifier`** (#421, `2531e9c`). Multi-workspace pattern; touches `SlackAdapter.__init__` and request handling.
40+
- [ ] **External-select Block Kit support** (#397, `a179b29`). Pairs with the core `option_groups` change above.
41+
- [ ] **Native `markdown_text` for outgoing messages** (#440, post-release — Apr 17). NOTE: this commit is post-`f55378a` so technically out of `4.27.0` scope, but listed here because the team often picks up post-release fixes.
42+
- [ ] **Link-preview unfurl metadata enrichment** (#395, `ded6f78`).
43+
- [ ] **`@mention` regex preserves email addresses** (#394, `c26ee6c`).
44+
- [ ] **Guard against empty `threadTs` (`invalid_thread_ts` fix)** (#292, `53c6b68`).
45+
46+
#### Teams (`packages/adapter-teams/``src/chat_sdk/adapters/teams/`)
47+
48+
- [ ] **Native streaming for DMs via `emit`** (#416, `ed46bae`). Currently the Python port falls back to `_fallback_stream` for Teams; native streaming would lift that.
49+
- [ ] **DM conversation ID resolution for Graph API** (#403, `4c24c94`). Bug fix.
50+
- [ ] **Teams SDK 2.0.8 + `User-Agent` header** (#415, `885a471`). TS-side dependency bump; Python equivalent is to verify our `botbuilder` pin and propagate `User-Agent` if not already.
51+
52+
#### Telegram
53+
54+
- [ ] **MarkdownV2 rendering fixes** (#407, `b9a1961`). Pairs with the streaming-chunk safety trim in #446 (post-`f55378a`).
55+
56+
#### Discord
57+
58+
- [ ] **Don't duplicate text when posting card messages** (#256, `7e5b447`). Confirm Python port's `discord/cards.py` doesn't have the same bug.
59+
60+
#### Out of scope for this Python port
61+
62+
- **`@chat-adapter/web`** — new package adding a browser chat UI for chat-sdk bots (#444). No browser runtime in chat-sdk-python.
63+
- **Documentation site changes**`apps/docs/`, README/changelog tweaks, dependency bumps.
64+
65+
### Workflow
66+
67+
1. This alpha PR establishes the sync. CI on this draft is intentionally not invoked (lint.yml is gated on `!github.event.pull_request.draft`).
68+
2. Each item above lands as its own PR, following the same pattern as the `4.26.0` cycle. Each port PR:
69+
- Updates the relevant `MAPPING` / fidelity coverage and removes its entries from `scripts/fidelity_baseline.json` if previously baselined.
70+
- Bumps lint.yml's pinned upstream ref to commit `f55378a` (or a later SHA if upstream cuts a `chat@4.27.0` tag in the meantime).
71+
- Adds an entry under the next `CHANGELOG` heading (`0.4.27a2`, `0.4.27a3`, …).
72+
3. Once all 22 items are ported (or explicitly documented as divergence in `docs/UPSTREAM_SYNC.md`), the final PR cuts `0.4.27` and switches CI back to strict fidelity at the upstream tag.
73+
374
## 0.4.26.3 (2026-05-07)
475

576
Python-only fix. No upstream version change.

CLAUDE.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Claude Code Quick Reference -- chat-sdk-python
22

33
## What is this?
4-
Python port of [Vercel Chat SDK](https://github.com/vercel/chat) (v4.26.0). Multi-platform async chat framework.
4+
Python port of [Vercel Chat SDK](https://github.com/vercel/chat) (porting v4.27.0; last fully-synced release `0.4.26.3` at upstream `4.26.0`). Multi-platform async chat framework.
55

66
## Key Commands
77
```bash
@@ -23,7 +23,8 @@ Our version embeds the upstream Vercel Chat version: `0.{upstream_major}.{upstre
2323
- `0.4.25` = synced to upstream `4.25.0`
2424
- `0.4.25.1` = Python-only fix on top of `4.25.0`
2525
- `0.4.26` = synced to upstream `4.26.0`
26-
- `0.4.26a1` = alpha while porting upstream `4.26.0`
26+
- `0.4.26.3` = last fully-synced release (Python-only fixes on top of `4.26.0`)
27+
- `0.4.27a1` = alpha while porting upstream `4.27.0` (current branch)
2728
- `UPSTREAM_PARITY` constant in `__init__.py` = programmatic access
2829

2930
## Architecture
@@ -106,16 +107,20 @@ will not pass CI.
106107

107108
**Fidelity check** (`scripts/verify_test_fidelity.py`) verifies every TS
108109
`it("...")` in the mapped core files has a matching Python `def test_*()`,
109-
pinned to `chat@4.26.0`. The `MAPPING` dict in that script is the
110-
authoritative scope list — it currently covers 8 of 17
111-
`packages/chat/src/*.test.ts` files (extending it is tracked as a
110+
pinned to `chat@4.26.0` (the last fully-synced upstream tag — `chat@4.27.0`
111+
is in flight; pin moves as ports land in this sync cycle). The `MAPPING`
112+
dict in that script is the authoritative scope list — it currently covers 8
113+
of 17 `packages/chat/src/*.test.ts` files (extending it is tracked as a
112114
follow-up). **CI runs `--strict`** (see `.github/workflows/lint.yml`):
113115
any missing translation in a mapped file fails the build, and a missing
114116
upstream checkout also fails (the script exits non-zero when any mapped
115117
TS file isn't found). Baseline mode (the default without `--strict`) is
116118
retained for local workflows where a few ports land in flight —
117119
regenerate via `--update-baseline` after documenting intentional
118-
divergence in `docs/UPSTREAM_SYNC.md`.
120+
divergence in `docs/UPSTREAM_SYNC.md`. During this sync cycle baseline
121+
mode reports a parity mismatch (baseline pinned at `chat@4.26.0`,
122+
`UPSTREAM_PARITY` says `4.27.0`); that's the intended signal until the
123+
sync lands.
119124

120125
Before the fidelity check can run locally, clone the pinned upstream
121126
checkout (same command CI uses in `lint.yml`):

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Multi-platform async chat SDK for Python. Port of [Vercel Chat](https://github.com/vercel/chat).
99

10-
> **Status: Alpha (0.4.26synced to [Vercel Chat 4.26.0](https://github.com/vercel/chat))** — API may change.
10+
> **Status: Alpha (0.4.27a1porting [Vercel Chat 4.27.0](https://github.com/vercel/chat))** — API may change. Last fully-synced release: `0.4.26.3` (parity with upstream `chat@4.26.0`). See [CHANGELOG.md](CHANGELOG.md) for the in-flight sync plan.
1111
1212
## Why chat-sdk?
1313

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "chat-sdk"
3-
version = "0.4.26.3"
3+
version = "0.4.27a1"
44
description = "Multi-platform async chat SDK for Python — port of Vercel Chat"
55
keywords = [
66
"chat",

src/chat_sdk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
)
186186

187187
# The upstream Vercel Chat version this release is synced to.
188-
UPSTREAM_PARITY = "4.26.0"
188+
UPSTREAM_PARITY = "4.27.0"
189189

190190
__all__ = [
191191
"UPSTREAM_PARITY",

0 commit comments

Comments
 (0)