openclaw/extensions
Sid Uppal 295d1de8d9
fix(msteams): reset stream state after tool calls to prevent message loss (#56071)
* fix(msteams): reset stream state after preparePayload suppresses delivery

When an agent uses tools mid-response (text → tool calls → more text),
the stream controller's preparePayload would suppress fallback delivery
for ALL text segments because streamReceivedTokens stayed true. This
caused the second text segment to be silently lost or duplicated.

Fix: after preparePayload suppresses delivery for a streamed segment,
finalize the stream and reset streamReceivedTokens so subsequent
segments use fallback delivery.

Fixes openclaw/openclaw#56040

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(msteams): guard preparePayload against finalized stream re-suppression

When onPartialReply fires after the stream is finalized (post-tool
partial tokens), streamReceivedTokens gets set back to true but the
stream can't deliver. Add stream.isFinalized check so a finalized
stream never suppresses fallback delivery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(msteams): await pending finalize in controller to prevent race

Store the fire-and-forget finalize promise from preparePayload and
await it in the controller's finalize() method. This ensures
markDispatchIdle waits for the in-flight stream finalization to
complete before context cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(msteams): add edge case tests for multi-round and media payloads

Add tests for 3+ tool call rounds (text → tool → text → tool → text)
and media+text payloads after stream finalization, covering the full
contract of preparePayload across all input types and cycle counts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 21:36:37 -05:00
..
acpx chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
amazon-bedrock chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
anthropic chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
anthropic-vertex fix: break plugin-sdk provider barrel recursion 2026-03-27 23:47:04 +00:00
bluebubbles refactor: trim bluebubbles runtime seams 2026-03-28 02:21:34 +00:00
brave chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
browser chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
byteplus chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
chutes chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
cloudflare-ai-gateway chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
copilot-proxy chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
deepgram chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
deepseek chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
device-pair fix(regression): allow external device pair approvals 2026-03-27 16:07:54 -05:00
diagnostics-otel chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
diffs chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
discord chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
duckduckgo chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
elevenlabs chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
exa chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
fal refactor: narrow provider runtime auth seams 2026-03-28 02:04:31 +00:00
feishu fix(regression): restore feishu cold-runtime chunking 2026-03-27 21:17:17 -05:00
firecrawl chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
github-copilot refactor: narrow provider runtime auth seams 2026-03-28 02:04:31 +00:00
google refactor: trim provider oauth runtime seams 2026-03-28 02:08:29 +00:00
googlechat fix(regression): restore googlechat cold-runtime chunking 2026-03-27 21:25:21 -05:00
groq chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
huggingface chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
image-generation-core chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
imessage chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
irc refactor: trim extension helper runtime seams 2026-03-28 02:12:05 +00:00
kilocode chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
kimi-coding refactor: narrow provider runtime auth seams 2026-03-28 02:04:31 +00:00
line test(line): isolate status probe fallback import state 2026-03-28 02:31:39 +00:00
litellm chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
llm-task chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
lobster chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
matrix fix(regression): restore matrix cold-runtime chunking 2026-03-27 21:14:38 -05:00
mattermost fix(regression): preserve mattermost reaction channel routing 2026-03-27 21:30:24 -05:00
media-understanding-core chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
memory-core chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
memory-lancedb refactor: trim extension helper runtime seams 2026-03-28 02:12:05 +00:00
microsoft chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
microsoft-foundry chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
minimax refactor: trim provider oauth runtime seams 2026-03-28 02:08:29 +00:00
mistral chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
modelstudio chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
moonshot chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
msteams fix(msteams): reset stream state after tool calls to prevent message loss (#56071) 2026-03-27 21:36:37 -05:00
nextcloud-talk refactor: trim extension helper runtime seams 2026-03-28 02:12:05 +00:00
nostr chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
nvidia chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
ollama refactor: narrow provider runtime auth seams 2026-03-28 02:04:31 +00:00
open-prose chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
openai refactor: trim provider oauth runtime seams 2026-03-28 02:08:29 +00:00
opencode chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
opencode-go chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
openrouter chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
openshell chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
perplexity chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
phone-control fix(regression): restore external phone control commands 2026-03-27 16:57:16 -05:00
qianfan chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
sglang chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
shared refactor: route plugin runtime through bundled seams 2026-03-27 16:40:27 +00:00
signal fix(regression): restore signal cold-runtime chunking 2026-03-27 21:28:18 -05:00
slack chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
speech-core chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
synology-chat chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
synthetic chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
talk-voice fix(regression): restore external talk voice updates 2026-03-27 16:05:22 -05:00
tavily chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
telegram refactor: route telegram env helpers through runtime-env 2026-03-28 02:34:11 +00:00
thread-ownership fix(extensions): route fetch calls through fetchWithSsrFGuard (#53929) 2026-03-26 02:04:54 -07:00
tlon refactor: trim secret and ssrf helper runtime seams 2026-03-28 02:25:28 +00:00
together chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
twitch chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
venice refactor: narrow provider runtime auth seams 2026-03-28 02:04:31 +00:00
vercel-ai-gateway chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
vllm chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
voice-call chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
volcengine chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
whatsapp fix(regression): restore whatsapp cold-runtime chunking 2026-03-27 21:23:18 -05:00
xai chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
xiaomi chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
zai chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
zalo refactor: trim extension helper runtime seams 2026-03-28 02:12:05 +00:00
zalouser fix(regression): restore zalouser cold-runtime chunking 2026-03-27 21:33:14 -05:00
.npmignore