fix(slack): bound structured stream chunk fields - #886
Conversation
|
@dcbuild3r is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
| const lastCode = value.charCodeAt(end - 1); | ||
| if (lastCode >= 0xd800 && lastCode <= 0xdbff) { | ||
| end -= 1; |
Signed-off-by: dcbuild3r <dcbuilder@pm.me>
a346105 to
04cdec5
Compare
|
Thanks for this. Before merging I ran a probe against chat.appendStream with a live bot token to pin down the 256 rule from the docs. Slack accepted every case: title, details, and output at 300, 1,000, 4,000, 12,000, and 40,000 characters, ids at 300 and 1,000, plan titles at 1,000, 300-character titles under task_display_mode "plan", Could you share the payload and the error code you hit? If Slack enforces a limit in some condition I missed, I'd like to target that exactly rather than truncate fields Slack renders fine today. |
Summary
Slack limits structured task and plan fields to 256 characters. Truncate IDs, titles, and plan titles safely, and split oversized task details/output into stable continuation chunks so large tool results do not make native streaming fail. Preserve the prior part count on subsequent task updates so existing continuation cards can be updated consistently.
Test plan
Checklist