|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 0.4.26.1 (2026-04-23) |
| 4 | + |
| 5 | +Python-only follow-up on `0.4.26`. Still alpha — APIs may change. |
| 6 | + |
| 7 | +### Fixes |
| 8 | + |
| 9 | +- **Slack native streaming**: `SlackAdapter.stream()` no longer calls |
| 10 | + `AsyncWebClient.chat_stream(...)` without `await`. The unawaited coroutine |
| 11 | + returned a truthy object, and the first `streamer.append(...)` raised |
| 12 | + `AttributeError`, breaking native Slack streaming for any consumer using |
| 13 | + the default adapter. Issue #44. |
| 14 | +- **Teams divider renders at non-zero height**: empty `Container` with |
| 15 | + `separator: True` rendered as zero-height in the Teams UI. Dividers |
| 16 | + between siblings now hoist `separator: True` onto the following element; |
| 17 | + a trailing divider emits a minimal non-empty Container. Issue #45. |
| 18 | +- **`ConcurrencyConfig.max_concurrent` is now enforced**: consumers setting |
| 19 | + `concurrency=ConcurrencyConfig(strategy="concurrent", max_concurrent=N)` |
| 20 | + now actually get an `asyncio.Semaphore(N)` cap on in-flight handlers. |
| 21 | + Previously the field was accepted and ignored (upstream TS has the same |
| 22 | + gap). `None` / unset keeps the unbounded default. Issue #51. |
| 23 | + |
| 24 | +### Python-specific (divergence from upstream 4.26) |
| 25 | + |
| 26 | +- **Fallback streaming runtime robustness** (cluster of fixes): framework- |
| 27 | + agnostic `request.text()` handling now tolerates sync Flask-style |
| 28 | + requests (was raising `TypeError: object is not awaitable`). Handlers |
| 29 | + typed `Callable[..., Awaitable[None] | None]` may return sync (`None`) — |
| 30 | + the dispatcher now `await`s only when `inspect.isawaitable()` confirms, |
| 31 | + preventing runtime crashes on sync handlers. |
| 32 | +- **`max_concurrent` enforcement** (see above) — upstream accepts the |
| 33 | + config field but never enforces it; we do. |
| 34 | + |
| 35 | +### New public APIs |
| 36 | + |
| 37 | +- **`Chat.thread(thread_id, *, current_message=None)`**: new worker- |
| 38 | + reconstruction factory mirroring TS `chat.thread(threadId)`. Adapter is |
| 39 | + inferred from the thread-ID prefix; state and message history come from |
| 40 | + the Chat instance. `current_message` is preserved so Slack native |
| 41 | + streaming still works post-reconstruction. Issue #46. |
| 42 | +- **`SlackAdapter.current_token` / `current_client`**: public `@property` |
| 43 | + accessors for the request-context-bound bot token and a preconfigured |
| 44 | + `AsyncWebClient`. Replaces underscore access from consumer code making |
| 45 | + direct Slack Web API calls inside a handler (email resolution, user |
| 46 | + profile fetches, etc.). Issue #47. |
| 47 | + |
| 48 | +### Internals |
| 49 | + |
| 50 | +- **Pyrefly: 213 → 0 type errors**; baseline file removed. CI now enforces |
| 51 | + zero errors. Root causes fixed: 8-adapter `lock_scope: LockScope | None` |
| 52 | + protocol conformance; `_ChatSingleton` as `Protocol`; submodule-aware |
| 53 | + `replace-imports-with-any`; `NoReturn` on error re-raisers; |
| 54 | + `inspect.isawaitable` guards for duck-typed request handling and |
| 55 | + sync-or-async handler dispatch. No `Any` widening, no new `# type: |
| 56 | + ignore` lines beyond 10 at adapter event-construction sites where |
| 57 | + `thread=None`/`channel=None` get re-wrapped by `Chat` before handler |
| 58 | + dispatch (matches upstream TS's `Omit<>` partial-event pattern). |
| 59 | +- Test count: **3471 passed**, 2 skipped. |
| 60 | + |
| 61 | +### Known gaps (not fixed in this release) |
| 62 | + |
| 63 | +- `onOptionsLoad` handler for dynamic select dropdowns — issue #50 |
| 64 | +- `Thread.getParticipants()` method — issue #54 |
| 65 | +- `rehydrate_attachment` adapter hook for queue/debounce + attachments — |
| 66 | + issue #52 |
| 67 | +- 40 upstream tests without Python equivalents (Options Load, Plan variants, |
| 68 | + StreamingPlan options, getParticipants) — issue #53 |
| 69 | +- Discord native Gateway WebSocket (HTTP-only today) — issue #57 |
| 70 | +- Teams certificate-based mTLS auth — issue #58 |
| 71 | +- Google Chat file uploads (TODO upstream too) — issue #59 |
| 72 | + |
3 | 73 | ## 0.4.26 (2026-04-16) |
4 | 74 |
|
5 | 75 | Synced to [Vercel Chat 4.26.0](https://github.com/vercel/chat). |
|
0 commit comments