Commit Graph

369 Commits

Author SHA1 Message Date
Peter Steinberger
f9b1079283 build: cut 2026.3.28 stable 2026-03-29 02:33:41 +01:00
Peter Steinberger
3d69ad8308 fix: preserve Teams Entra JWT fallback on legacy validator errors 2026-03-29 09:15:13 +09:00
Brad Groux
dc382b09be fix(msteams): accept strict Bot Framework and Entra service tokens (#56631)
* msteams: log policy-based inbound drops at info level

* fix(msteams): validate Bot Framework and Entra service token issuers

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-03-28 18:04:00 -05:00
Peter Steinberger
587e18cd3f chore: prepare 2026.3.28-beta.1 release 2026-03-28 22:24:51 +00:00
Peter Steinberger
8a24cbf450 chore: bump version to 2026.3.28 2026-03-28 22:05:21 +00:00
Brad Groux
6b0e74000d fix(msteams): add blockStreaming config and progressive delivery (#56134)
- Add blockStreaming and blockStreamingCoalesceDefaults to MSTeams channel plugin (was the only channel missing it)
- Wire disableBlockStreaming flag in reply dispatcher from config
- Flush pending messages immediately during generation when blockStreaming is enabled
- Add comprehensive tests for schema validation and progressive flush behavior

Refs #56041
2026-03-27 23:53:24 -05:00
Tak Hoffman
4ec51f2d5f fix(regression): align msteams send helper runtime usage 2026-03-27 21:46:42 -05:00
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
Peter Steinberger
1bf8d69d95 refactor(msteams): share conversation store helpers 2026-03-28 02:26:48 +00:00
Tak Hoffman
e57342c7f2 fix(regression): restore msteams cold-runtime chunking 2026-03-27 21:21:40 -05:00
Peter Steinberger
2926c25e10 fix: prefer freshest Teams DM reference (#54702) (thanks @gumclaw) 2026-03-28 02:04:51 +00:00
gumclaw
a717819f78 msteams: align memory store user resolution 2026-03-28 02:04:51 +00:00
gumclaw
28eb5ece14 msteams: prefer freshest personal conversation reference 2026-03-28 02:04:51 +00:00
Peter Steinberger
72ba2b3653 chore: bump version metadata to 2026.3.27 2026-03-28 02:00:22 +00:00
Peter Steinberger
992b30604d refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
Peter Steinberger
ed055f44ae refactor: route plugin runtime through bundled seams 2026-03-27 16:40:27 +00:00
Peter Steinberger
87dddb818d fix(ci): restore plugin runtime boundaries 2026-03-27 14:38:40 +00:00
Peter Steinberger
66a2e72bee fix: restore CI runtime seams 2026-03-27 14:07:01 +00:00
Tak Hoffman
3e121edf20 fix(msteams): normalize memory store conversation ids 2026-03-26 22:29:46 -05:00
Peter Steinberger
10527ff8a3 build: refresh deps and vitest cache lanes 2026-03-27 02:26:07 +00:00
Tak Hoffman
5404b0eaa6 fix(msteams): preserve timezone on memory upsert 2026-03-26 21:06:16 -05:00
Peter Steinberger
14b3360c22 chore: bump versions to 2026.3.26 2026-03-27 02:03:22 +00:00
Peter Steinberger
40bd36e35d refactor: move channel config metadata into plugin-owned manifests 2026-03-27 01:59:30 +00:00
Peter Steinberger
ba60154826 fix: unify upload-file message actions 2026-03-27 01:04:01 +00:00
Peter Steinberger
be328e6cd1 test: dedupe extension channel fixtures 2026-03-26 19:47:27 +00:00
Peter Steinberger
c4048aea41 test: share msteams monitor and pi runner fixtures 2026-03-26 15:40:51 +00:00
Peter Steinberger
5c3e018492 refactor: dedupe msteams graph actions 2026-03-26 14:45:53 +00:00
Jacob Tomlinson
c5415a474b fix(msteams): align feedback invoke authorization (#55108)
* msteams: align feedback invoke authorization

* msteams: fix feedback allowlist regressions

* msteams: tighten feedback group authorization
2026-03-26 11:51:43 +00:00
sudie-codes
6329edfb8d msteams: add search message action (#54832)
* msteams: add pin/unpin, list-pins, and read message actions

Wire up Graph API endpoints for message read, pin, unpin, and list-pins
in the MS Teams extension, following the same patterns as edit/delete.

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

* msteams: address PR review comments for pin/unpin/read actions

- Handle 204 No Content in postGraphJson (Graph mutations may return empty body)
- Strip conversation:/user: prefixes in resolveConversationPath to avoid Graph 404s
- Remove dead variable in channel pin branch
- Rename unpin param from messageId to pinnedMessageId for semantic clarity
- Accept both pinnedMessageId and messageId in unpin action handler for compat

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

* msteams: resolve user targets + add User-Agent to Graph helpers

- Resolve user:<aadId> targets to actual conversation IDs via conversation
  store before Graph API calls (fixes 404 for DM-context actions)
- Add User-Agent header to postGraphJson/deleteGraphRequest for consistency
  with fetchGraphJson after rebase onto main

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

* msteams: resolve DM targets to Graph chat IDs + expose pin IDs

- Prefer cached graphChatId over Bot Framework conversation IDs for user
  targets; throw descriptive error when no Graph-compatible ID is available
- Add `id` field to list-pins rows so default formatters surface the pinned
  resource ID needed for the unpin flow

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

* msteams: add react and reactions (list) message actions

* msteams: add search message action via Graph API

* msteams: fix search query injection, add ConsistencyLevel header, use manual query string

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 01:09:53 -05:00
sudie-codes
8c852d86f7 msteams: fetch thread history via Graph API for channel replies (#51643)
* msteams: fetch thread history via Graph API for channel replies

* msteams: address PR #51643 review feedback

- Wrap resolveTeamGroupId Graph call in try/catch, fall back to raw
  conversationTeamId when Team.ReadBasic.All permission is missing
- Remove dead fetchChatMessages function (exported but never called)
- Add JSDoc documenting oldest-50-replies Graph API limitation

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

* msteams: address thread history PR review comments

* msteams: only cache team group IDs on successful Graph lookup

Avoid caching raw conversationTeamId as a Graph team GUID when the
/teams/{id} lookup fails — the raw ID may be a Bot Framework conversation
key, not a valid GUID, causing silent thread-history failures for the
entire cache TTL.

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-26 01:09:33 -05:00
Tak Hoffman
79fbcfc03b fix(ci): restore main green 2026-03-25 16:17:42 -05:00
Peter Steinberger
1c82b06645 test: collapse msteams state and monitor suites 2026-03-25 05:57:02 +00:00
Peter Steinberger
e53809035e test: collapse msteams graph suites 2026-03-25 05:57:02 +00:00
Peter Steinberger
b99b521a92 test: collapse msteams helper suites 2026-03-25 05:57:02 +00:00
Peter Steinberger
6f6468027a refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
Peter Steinberger
27448c3113 refactor(msteams): split reply and reflection helpers 2026-03-24 10:02:49 -07:00
Peter Steinberger
e727ad6898 fix(msteams): harden feedback reflection follow-ups 2026-03-24 09:50:04 -07:00
Ayaan Zaidi
0a04ef494d fix: merge explicit reply config overrides onto fresh config 2026-03-24 18:52:04 +05:30
Peter Steinberger
fd0fa97952 refactor: centralize plugin install config policy 2026-03-23 23:07:40 -07:00
Peter Steinberger
0f84aac487 fix: stabilize matrix and teams ci assertions 2026-03-24 05:29:05 +00:00
Peter Steinberger
ef6821a4ca fix: restore teams sdk adapter contracts 2026-03-24 05:17:34 +00:00
Sid Uppal
cd90130877 msteams: implement Teams AI agent UX best practices (#51808)
Migrates the Teams extension from @microsoft/agents-hosting to the official Teams SDK (@microsoft/teams.apps + @microsoft/teams.api) and implements Microsoft's AI UX best practices for Teams agents.

- AI-generated label on all bot messages (Teams native badge + thumbs up/down)
- Streaming responses in 1:1 chats via Teams streaminfo protocol
- Welcome card with configurable prompt starters on bot install
- Feedback with reflective learning (negative feedback triggers background reflection)
- Typing indicators for personal + group chats (disabled for channels)
- Informative status updates (progress bar while LLM processes)
- JWT validation via Teams SDK createServiceTokenValidator
- User-Agent: teams.ts[apps]/<sdk-version> OpenClaw/<version> on outbound requests
- Fix copy-pasted image downloads (smba.trafficmanager.net auth allowlist)
- Pre-parse auth gate (reject unauthenticated requests before body parsing)
- Reflection dispatcher lifecycle fix (prevent leaked dispatchers)
- Colon-safe session filenames (Windows compatibility)
- Cooldown cache eviction (prevent unbounded memory growth)

Closes #51806
2026-03-23 22:03:39 -07:00
sudie-codes
6e970010f7 msteams: add message edit and delete support (#49925)
- Add edit/delete action handlers with toolContext.currentChannelId
  fallback for in-thread edits/deletes without explicit target
- Add editMessageMSTeams/deleteMessageMSTeams to channel runtime
- Add updateActivity/deleteActivity to SendContext and MSTeamsTurnContext
- Extend content param with text/content/message fallback chain
- Update test mocks for new SendContext shape

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 23:42:04 -05:00
sudie-codes
9f5d286caf msteams: extract structured quote/reply context (#51647)
* msteams: extract structured quote/reply context from Teams HTML attachments

* msteams: address PR #51647 review feedback
2026-03-23 23:41:51 -05:00
Vincent Koc
e9078b3ff6 fix(msteams): isolate probe test env credentials 2026-03-23 08:00:54 -07:00
Peter Steinberger
0b58829364 test: fix ci env-sensitive assertions 2026-03-23 07:27:03 +00:00
Vincent Koc
218663c956 test(msteams): await async setup status lines 2026-03-22 20:59:28 -07:00
Peter Steinberger
339a67262d test: clear msteams gate drift for gateway probe auth landing (#52513) (thanks @CodeForgeNet) 2026-03-22 19:14:44 -07:00
Vincent Koc
9ffde8efb2 style(format): fix msteams test drift 2026-03-22 19:13:01 -07:00
Vincent Koc
8ff277d2a2 test(msteams): cover poll and file-card helpers 2026-03-22 19:09:59 -07:00