Missing capability — queued/debounced messages lose attachment fetch callbacks.
The gap
Upstream `Adapter` interface exposes an optional `rehydrateAttachment(attachment)` hook. When `Chat` dequeues a message (in `"queue"` / `"debounce"` concurrency strategies), it calls `adapter.rehydrateAttachment()` on each attachment to restore the `fetchData` callback, which was dropped during JSON serialization.
Python has:
- No `rehydrate_attachment` on any adapter
- `Chat._rehydrate_message` takes no `adapter` parameter (see `src/chat_sdk/chat.py:1911`)
- Rehydrated attachments are plain dicts with no `fetch_data` callable
Downstream effect: handlers in queue/debounce mode can't fetch attachment bytes, because the callback is gone.
Upstream references
- `vercel-chat/packages/chat/src/chat.ts:2313-2365` — `rehydrateMessage(raw, adapter?)` calls `adapter?.rehydrateAttachment?.(att)`
- `vercel-chat/packages/chat/src/types.ts` — `rehydrateAttachment?(attachment: Attachment): Attachment` on `Adapter` interface
- Individual adapter implementations (Slack, Teams, Discord, GitHub, etc.) — each re-attaches the platform-specific fetch callback
Fix (two PRs, can be parallelized)
Part A — protocol
- Add `rehydrate_attachment?: Callable[[Attachment], Attachment]` to the `Adapter` protocol in `src/chat_sdk/types.py`
- Update `_rehydrate_message` signature in `chat.py:1911` to accept `adapter: Adapter | None = None`
- Update callers (`chat.py:1685`, `chat.py:1715`) to pass the active adapter
- After reconstructing the message, call `adapter.rehydrate_attachment(att)` on each attachment if the method exists
Part B — per-adapter implementations
Slack, Teams, Discord, GitHub, Google Chat, Telegram, WhatsApp, Linear — each implements `rehydrate_attachment` to re-attach platform-specific download logic.
Impact
- chinchill-api uses `concurrency="drop"`, unaffected today
- Any consumer switching to `"queue"` or `"debounce"` with attachment-handling handlers will find attachments unreadable post-dequeue
Acceptance
Missing capability — queued/debounced messages lose attachment fetch callbacks.
The gap
Upstream `Adapter` interface exposes an optional `rehydrateAttachment(attachment)` hook. When `Chat` dequeues a message (in `"queue"` / `"debounce"` concurrency strategies), it calls `adapter.rehydrateAttachment()` on each attachment to restore the `fetchData` callback, which was dropped during JSON serialization.
Python has:
Downstream effect: handlers in queue/debounce mode can't fetch attachment bytes, because the callback is gone.
Upstream references
Fix (two PRs, can be parallelized)
Part A — protocol
Part B — per-adapter implementations
Slack, Teams, Discord, GitHub, Google Chat, Telegram, WhatsApp, Linear — each implements `rehydrate_attachment` to re-attach platform-specific download logic.
Impact
Acceptance