Commit Graph

444 Commits

Author SHA1 Message Date
Peter Steinberger
6f139dee2e perf: trim msteams authz graph mock 2026-04-24 00:09:16 +01:00
Peter Steinberger
bd49117a50 perf: slim msteams hot test imports 2026-04-24 00:04:48 +01:00
Peter Steinberger
e66a08658a perf: stub unused msteams handlers in invoke tests 2026-04-23 21:41:48 +01:00
Peter Steinberger
6f74763f1d perf: slim msteams store imports 2026-04-23 21:04:40 +01:00
Vincent Koc
e1840b8581 fix(msteams): bind global audience tokens to app id 2026-04-23 12:05:35 -07:00
Peter Steinberger
aa95428265 test(msteams): mock oauth token network guard 2026-04-23 11:44:24 +01:00
Peter Steinberger
b2472d6560 build: migrate schema deps to typebox 2026-04-23 04:59:42 +01:00
Peter Steinberger
de616055f7 perf(ci): trim preflight setup and stream test waits 2026-04-22 06:11:02 +01:00
Peter Steinberger
fd0970c077 refactor(channels): decouple presentation rendering 2026-04-21 21:29:44 +01:00
Peter Steinberger
3f274006cd refactor: share oauth callback flow 2026-04-21 01:07:09 +01:00
Peter Steinberger
039d1010fe test: fix landing gate helpers 2026-04-21 00:43:50 +01:00
Peter Steinberger
e2abd4bc62 test(ci): fix msteams and heartbeat red lanes 2026-04-20 23:33:49 +01:00
Peter Steinberger
85450b3da9 test: share msteams message handler mocks 2026-04-20 23:15:58 +01:00
Peter Steinberger
3f8ac729f2 test: share msteams runtime setup 2026-04-20 23:15:58 +01:00
Peter Steinberger
614d0348a5 test: share msteams sso handler setup 2026-04-20 23:04:10 +01:00
Peter Steinberger
8f4ec8e6ce test: share msteams revoke fallback helper 2026-04-20 22:17:34 +01:00
Peter Steinberger
8134fe737c test(extensions): move legacy schema assertions 2026-04-20 21:58:34 +01:00
Peter Steinberger
3a7a1f156d test(extensions): move remaining channel schema tests 2026-04-20 21:54:49 +01:00
Peter Steinberger
30eb467ec8 test: share msteams attachment fixtures 2026-04-20 21:52:13 +01:00
Peter Steinberger
51da1f70fa test: share msteams message handler fixtures 2026-04-20 21:52:13 +01:00
Peter Steinberger
a72f102259 refactor: share msteams token request flow 2026-04-20 15:45:41 +01:00
Peter Steinberger
0195da6b0e refactor: cache optional runtime imports 2026-04-18 20:45:26 +01:00
lukeboyett
c39314c14a fix(agents): prefer target agent's bound Matrix account for subagent spawns (#67508)
Merged via squash.

Prepared head SHA: 9300111038
Co-authored-by: lukeboyett <46942646+lukeboyett@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-18 14:02:53 -04:00
Peter Steinberger
df525b90f2 chore(lint): enable unnecessary type parameter rule 2026-04-18 18:31:13 +01:00
Peter Steinberger
66385670e4 refactor: reduce unnecessary dynamic imports 2026-04-18 16:15:33 +01:00
Peter Steinberger
c56b56e514 fix(msteams): harden security-sensitive flows (#65841)
* fix(msteams): validate participant graph params

* fix(msteams): restore media fetch ip guard

* fix(msteams): open delegated auth urls without shell
2026-04-15 22:30:23 -05:00
Gustavo Madeira Santana
78ac118427 fix(plugins): stabilize bundled setup runtimes (#67200)
Merged via squash.

Prepared head SHA: e8d6738fd0
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-15 12:35:18 -04:00
Pavan Kumar Gondhi
80b1fa17bf fix(msteams): enforce sender allowlist checks on SSO signin invokes [AI] (#66033)
* fix: address issue

* fix: address PR review feedback

* docs: add changelog entry for PR merge
2026-04-13 23:52:30 +05:30
pashpashpash
383c854313 CI: fix mainline regression blockers (#65269)
* MSTeams: align logger test expectations

* Gateway: fix CI follow-up regressions

* Config: refresh generated schema baseline

* VoiceCall: type webhook test doubles

* CI: retrigger blocker workflow

* CI: retrigger retry workflow

* Agents: fix current mainline agentic regressions

* Agents: type auth controller test mock

* CI: retrigger blocker validation

* Agents: repair OpenAI replay pairing order
2026-04-13 06:18:37 +09:00
Vincent Koc
b62251817e fix(msteams): restore graph media diagnostics 2026-04-12 09:17:09 +01:00
sudie-codes
2c211d171e fix(msteams): channel file attachments broken by overly-broad HTML fallback (#58617, #51749) (#64645)
* fix(msteams): gate channel attachment fallback on <attachment> tags (#58617, #51749)

* test(msteams): remove dead mock branch in graph.test.ts
2026-04-11 23:33:07 -05:00
Vincent Koc
37ddd018fb test(msteams): share reaction handler harness 2026-04-12 05:25:58 +01:00
Vincent Koc
d00ab06048 test(msteams): share thread handler test setup 2026-04-12 03:21:55 +01:00
sudie-codes
7e6b4d70b9 fix(msteams): accept SingleTenant sts.windows.net issuer in JWT validator (#64270) (#64641) 2026-04-11 21:19:41 -05:00
Tak Hoffman
9d126dc645 Fix active-memory recall runs when mx-claw is enabled (#65049)
* fix(active-memory): preserve parent channel context for recall runs

* fix(active-memory): keep recall runs on the resolved channel

* fix(active-memory): prefer resolved recall channel over wrapper hints

* fix(active-memory): trust explicit recall channel hints

* fix(active-memory): rank recall channel fallbacks by trust
2026-04-11 21:08:57 -05:00
Vincent Koc
f5bf733575 test(msteams): dedupe graph message coverage 2026-04-12 03:05:16 +01:00
sudie-codes
2084441b51 fix(msteams): SharePoint media fetch fails on Node 24+ (#63396) (#64652)
* fix(msteams): fix SharePoint media fetch on Node 24+ and stop swallowing errors (#63396)

* fix(msteams): extend Node 24 dispatcher fix to Bot Framework attachment view downloads
2026-04-11 19:53:26 -05:00
sudie-codes
f71ee71787 msteams: add group management actions (add/remove participant, rename) (#57530)
* msteams: add group management actions (addParticipant, removeParticipant, renameGroup)

* fix(msteams): restore group-management plugin contracts

* fix(msteams): satisfy plugin guardrails

* msteams: restore doctor adapter lost in main merge

* fix(msteams): restore message tool schema imports

* msteams: fix graph action routing and member paging

---------

Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-11 19:52:58 -05:00
Peter Steinberger
b41091ac7f fix: quiet extension unresolved import warnings 2026-04-11 21:25:24 +01:00
HDYA
26f633b604 feat(msteams): add federated credential support (certificate + managed identity) (#53615)
* feat(msteams): add federated authentication support (certificate + managed identity + workload identity)

* msteams: fix vitest 4.1.2 compat, type errors, and regenerate config baseline

* msteams: fix lint errors, update fetch allowlist, regenerate protocol Swift

* fix(msteams): gate secret-only delegated auth flows

* fix(ci): unblock gateway watch and install smoke

* fix(ci): restore mergeability for pr 53615

* fix(ci): restore channel registry helper typing

* fix(ci): refresh raw fetch guard allowlist

---------

Co-authored-by: Chudi Huang <Chudi.Huang@microsoft.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-11 13:29:22 -05:00
sudie-codes
ba1b8424f4 fix(msteams): wire CLI --media path into pending upload store (#49784) (#64646)
* fix(msteams): wire CLI --media path into FS-backed pending upload store (#49784)

* test(msteams): clean up temp dirs in pending-uploads-fs.test.ts

* test(msteams): satisfy pending upload fs lint

---------

Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-11 12:45:14 -05:00
Vincent Koc
8a7ad8f0e0 fix(msteams): remove reaction handler type cycle 2026-04-11 14:55:25 +01:00
Peter Steinberger
419ab38ea2 test(msteams): stabilize oauth expiry assertion 2026-04-11 14:07:21 +01:00
sudie-codes
355794c24a msteams: add reaction support with delegated auth and pagination helper (#51646)
* msteams: add reaction support (inbound handlers + outbound Graph API)

* msteams: address PR #51646 review feedback

* msteams: remove react from advertised actions (requires Delegated auth)

* msteams: address PR #51646 remaining review feedback (dmPolicy, groupPolicy, reactions auth)

- Fix 1: DM reaction authorization now uses resolveDmGroupAccessWithLists to enforce
  dmPolicy modes (open/disabled/allowlist/pairing), matching the message handler.
- Fix 2: Group policy in reaction handler already uses resolveDefaultGroupPolicy
  for global defaults; moved declaration earlier to share with DM path.
- Fix 3: Restore read-only "reactions" (list) action with listReactionsMSTeams,
  which uses GET and works with Application auth. Keep "react" (write) gated
  behind delegated-auth.

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

* msteams: add shared Graph pagination helper (fetchAllGraphPages)

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

* msteams: add OAuth2 delegated auth flow (PKCE + authorization code)

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

* msteams: integrate delegated auth (config, token storage, react enablement)

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

* msteams: fix critical bugs found in architect review

- Fix fetchGraphJson→postGraphJson for setReaction/unsetReaction (was sending GET instead of POST)
- Fix CSRF bypass in OAuth parseCallbackInput (missing state no longer falls back silently)
- Remove stale delegated-auth warning logs (delegated auth is now implemented)
- Add CSRF test case for parseCallbackInput

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

* msteams: fix 6 PR #51646 review blockers (PKCE/state separation, CSRF, imports, routing, delegated auth bootstrap)

* msteams: fix channel.runtime.ts duplicate imports + graph.ts test mock compat

* msteams: fix lint/boundary blockers revealed by CI after rebase

- token.ts/graph.test.ts: add curly braces around single-statement ifs
  (eslint/curly).
- oauth.flow.ts: rename unused parseCallbackInput param to _expectedState.
- reaction-handler.test.ts: rename unused buildDeps param to _runtime.
- send.reactions.ts: drop unnecessary non-null assertions on tuple entries.
- setup-surface.ts: drop empty-object spread fallback flagged by
  unicorn/no-useless-fallback-in-spread.
- graph.ts: move GraphPagedResponse/PaginatedResult type defs below
  requestGraph so the raw fetch() stays on line 47 to match the existing
  no-raw-channel-fetch allowlist entry.
- oauth.token.ts: route the Azure AD token exchange and refresh calls
  through fetchWithSsrFGuard (matches the pattern in sdk.ts), removing
  the unguarded raw fetch() callsites flagged by
  lint:tmp:no-raw-channel-fetch.

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

* fix(msteams): restore absolute Graph pagination helper

* fix(msteams): satisfy reaction handler lint

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-11 07:41:47 -05:00
sudie-codes
0f19271092 msteams: add message actions — pin, unpin, read, react, reactions (#53432)
* 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: fix reaction count undercount and remove unpin messageId fallback

* msteams: wire pinnedMessageId through CLI/tool schema, add channel pin beta warnings, add list-pins pagination

* msteams: address PR #53432 remaining review feedback

* fix(msteams): route channel actions via teamId/channelId path (#53432)

* msteams: add unpin pinnedMessageId test coverage (#53432)

* fix(msteams): keep graph routing scoped to graph actions

* fix(msteams): align graph routing context types

* msteams: route fetchGraphAbsoluteUrl through fetchWithSsrFGuard

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-10 20:25:57 -05:00
Peter Steinberger
85c7748520 lint: enable no extraneous class 2026-04-11 01:45:06 +01:00
Peter Steinberger
3e80bd33e4 refactor: simplify extension conversions 2026-04-11 01:37:23 +01:00
Tak Hoffman
32ad88da98 fix: avoid teams sso token key collisions 2026-04-10 19:29:09 -05:00
Peter Steinberger
270630ba35 refactor: simplify channel setup conversions 2026-04-11 01:11:05 +01:00
Peter Steinberger
11b0016e9e refactor: simplify provider channel conversions 2026-04-11 01:08:23 +01:00