mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 04:51:42 +00:00
* fix(msteams): adopt durable ingress drain with ack gated on activity append Bot Framework webhooks acked before detached processing with no platform retry, silently losing inbound activities on a crash. Dispatchable activities (message + adaptiveCard/action invokes) now persist their raw JSON durably (event_id = activity.id per the @microsoft/teams.api uniqueness contract, lane = conversation.id) before the webhook 200; dispatch runs through the core drain with deferred claims through debounce, merged-flush fan-out adoption, gated-turn settlement, retry/dead-letter classification, and 30d/20k tombstones. Restart replay reconstructs proactive routing context. No inbound replay guard existed; the outbound echo cache is untouched. Twin check: messageUpdate/votes/consent/reactions run dedicated non-agent workflows and are excluded from the journal. Autoreview blocked by codex sandbox network in the build stage; full manual review performed. Part of the #109657 fleet adoption program (wave 2). * fix(msteams): close live-context races and double next() in drain dispatch Three defects found in landing review: the live turn context could swap a duplicate delivery's mutated activity in place of the journaled payload (dispatch now always uses the journaled activity, live context is transport surface only); the context registry installed entries after the durable append, leaking them when the drain consumed the claim first (install now precedes enqueue, tombstoned duplicates clean up, first delivery's context wins); and a failed next() in the message handler was invoked a second time from the catch fall-through (ran-flag guards it). * fix(msteams): uninstall a failed append's live context before retry Follow-up to the install-before-enqueue race fix: an enqueue rejection bypassed cleanup, so a retry with the same activity id dispatched the failed request's stale context. Uninstall is identity-guarded (only our context is removed, never a concurrent redelivery's fresh install) and covers both the throw and tombstoned-duplicate paths. Regression proves the retry's own context dispatches. * test(msteams): track the buffered dispatcher seam after main retired the settled variant * test(msteams): resolve dispatch union before catch for promise lint * test(msteams): explicit promise-returning mock for the promise-misuse lint * test(msteams): type the ingress accept mock promise-returning ReturnType<typeof vi.fn> types the implementation callback void-returning, so every promise-returning accept mock tripped typescript(no-misused-promises) in CI regardless of call-site shape. * test(msteams): restore compact async mock now that its type permits promises * test(msteams): extract gated-accept helper to stay under max-lines
OpenClaw Microsoft Teams
Official OpenClaw channel plugin for Microsoft Teams bot conversations.
Install from OpenClaw:
openclaw plugin add @openclaw/msteams
Configure the Teams bot credentials and trusted service URLs in OpenClaw, then connect the bot to the teams or chats where agents should operate.