Commit Graph

522 Commits

Author SHA1 Message Date
Peter Steinberger
d515009c53 fix(ci): stabilize auto-reply CI tests 2026-04-11 04:09:10 +01: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
Tak Hoffman
a9100a33c2 fix teams feedback learning filename collisions 2026-04-10 18:57:47 -05:00
Peter Steinberger
fe395cf045 test: isolate remaining extension network tests 2026-04-11 00:37:17 +01:00
Tak Hoffman
5d1f1d9362 fix: preserve reset hook sender policy context 2026-04-10 17:56:33 -05:00
Peter Steinberger
6bc7822ec7 refactor: simplify msteams allowlist prompt 2026-04-10 23:55:59 +01:00
Peter Steinberger
8025184168 refactor: simplify msteams credential prompts 2026-04-10 23:54:43 +01:00
Tak Hoffman
8e45398e1d fix: preserve outbound sender policy context 2026-04-10 17:48:58 -05:00
Peter Steinberger
a73dc477d7 style: apply oxfmt cleanup 2026-04-10 23:09:37 +01:00
Peter Steinberger
d236cb4680 chore: enable redundant type constituent checks 2026-04-10 21:23:40 +01:00
Peter Steinberger
bc27278d6d test: fix msteams thread parent fixture 2026-04-10 20:50:44 +01:00
sudie-codes
784318799b fix(msteams): handle fileConsent/invoke callback for bot-to-user file upload (#55386) (#64087)
* fix(msteams): update FileConsentCard after user accepts upload

- Adds consentCardActivityId to PendingUpload so the consent card
  activity can be replaced in-place after upload succeeds
- Uses context.updateActivity() to replace the FileConsentCard with
  the file info card; falls back to sendActivity if update fails
- Adds updateActivity to MSTeamsTurnContext type
- Fixes timer leak in pending-uploads: clears TTL setTimeout on
  explicit removal and on clearPendingUploads()
- Adds pending-uploads.test.ts covering all new timer/cleanup paths

* msteams: wire consentCardActivityId from send response + add happy-path updateActivity test

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

* fix(msteams): retry consent uploads end-to-end

---------

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 14:42:54 -05:00
sudie-codes
99f76ec4c6 fix(msteams): keep streaming alive during long tool chains via typing indicator (#59731) (#64088)
* fix(msteams): keep streaming alive during long tool chains via periodic typing (#59731)

* test(msteams): align thread-session store mock with interface

* fix(msteams): treat failed streams as inactive

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-10 14:42:41 -05:00
sudie-codes
01ea7e4921 feat(msteams): auto-inject parent message context for thread replies (#54932) (#63945)
* feat(msteams): auto-inject parent message context for thread replies (#54932)

* msteams: use Promise.allSettled for thread context, remove no-op buildInjectedKey

* fix(msteams): gate thread parent context by visibility

---------

Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-04-10 14:42:02 -05:00
Peter Steinberger
cc6c5f3edb style: simplify lint-safe test helpers 2026-04-10 20:20:33 +01:00
Peter Steinberger
2786ed0f67 chore: enable no-base-to-string 2026-04-10 20:14:49 +01:00
Peter Steinberger
925a499d84 ci: fix additional guard failures 2026-04-10 19:23:10 +01:00
Peter Steinberger
8127c6cc15 build(deps): update workspace dependencies 2026-04-10 19:17:39 +01:00
Peter Steinberger
527601d7a5 fix: align channel owner context test types 2026-04-10 18:14:14 +01:00
sudie-codes
2b5b58194b fix(msteams): include tenantId and aadObjectId on proactive sends (#58774) (#63949)
* fix(msteams): capture and forward tenantId/aadObjectId on proactive sends (#58774)

* msteams: preserve tenantId/aadObjectId on sparse merges, thread recipientId on proactive sends
2026-04-10 12:09:14 -05:00
Peter Steinberger
ef1694575d fix: restore main type gates 2026-04-10 12:14:36 +01:00
Vincent Koc
8c88fb68b7 fix(msteams): align handler tests with conversation store 2026-04-10 09:03:10 +01:00
Vincent Koc
dfdc281f55 fix(cycles): split small runtime seams 2026-04-10 09:00:19 +01:00
sudie-codes
828ebd43d4 feat(msteams): handle signin/tokenExchange and signin/verifyState for SSO (#60956) (#64089)
* feat(msteams): handle signin/tokenExchange and signin/verifyState for SSO (#60956)

* test(msteams): mock conversationStore.get in thread session fixture

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-10 02:38:01 -05:00
Vincent Koc
4a275cf6b1 fix(extensions): split shared runtime type seams 2026-04-10 08:16:27 +01:00
Vincent Koc
d752ff7191 fix(extensions): split runtime store type imports 2026-04-10 08:16:27 +01:00
Vincent Koc
78d2e9e2a8 fix(ci): repair main type drift 2026-04-10 08:13:02 +01:00
Tak Hoffman
4bf94aa0d6 feat: add local exec-policy CLI (#64050)
* feat: add local exec-policy CLI

* fix: harden exec-policy CLI output

* fix: harden exec approvals writes

* fix: tighten local exec-policy sync

* docs: document exec-policy CLI

* fix: harden exec-policy rollback and approvals path checks

* fix: reject exec-policy sync when host remains node

* fix: validate approvals path before mkdir

* fix: guard exec-policy rollback against newer approvals writes

* fix: restore exec approvals via hardened rollback path

* fix: guard exec-policy config writes with base hash

* docs: add exec-policy changelog entry

* fix: clarify exec-policy show for node host

* fix: strip stale exec-policy decisions
2026-04-10 01:16:03 -05:00
Pengfei Ni
78389b1f02 fix(msteams): resolve Graph chat ID for personal DM media downloads (#62219) (#63063)
* fix(msteams): resolve Graph chat ID for personal DM media downloads (#62219)

Bot Framework personal DM conversation IDs use an opaque `a:...` format
that the Graph `/chats/{chatId}/messages` endpoint rejects as "Invalid
ThreadId". When the direct Bot Framework attachment download fails and
the code falls back to the Graph API path, inbound media (images, files)
is silently dropped.

Resolve the real Graph chat ID via `resolveGraphChatId()` before
constructing Graph message URLs, with conversation-store caching so
subsequent messages skip the API lookup.

* fix(msteams): preserve graphChatId across conversation store upserts

mergeStoredConversationReference only preserved timezone from the
existing entry — graphChatId was silently overwritten on every
activity-triggered upsert, defeating the cache and causing repeated
Graph API lookups on every DM turn.

Mirror the existing timezone guard so graphChatId survives upserts
that don't carry it.
2026-04-09 22:57:02 -05:00
sudie-codes
4fc5016f8f fix(msteams): fetch OneDrive/SharePoint shared media via Graph shares endpoint (#55383) (#63942)
* fix(msteams): fetch OneDrive/SharePoint media via Graph shares endpoint (#55383)

* fix(msteams): rewrite shared links before allowlist check

* test(msteams): fix typed fetch call assertions

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-09 22:08:49 -05:00
sudie-codes
a59a9bfb07 fix(msteams): accept Bot Framework audience in JWT validation (#58249) (#62674)
* fix(msteams): use jsonwebtoken directly for JWT validation with correct audience (#58249)

* chore(msteams): regenerate lockfile for jwt deps

* fix(msteams): clean up unused serviceUrl parameter in JWT validator

* test(msteams): cover STS issuer in JWT validation

* fix(msteams): type jwt verify audiences and issuers

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-09 22:05:54 -05:00
sudie-codes
ab9be8dba5 fix(msteams): fetch DM media via Bot Framework path for a: conversation IDs (#62219) (#63951)
* fix(msteams): fetch DM media via Bot Framework path for a: conversation IDs (#62219)

* fix(msteams): log skipped BF DM media fetches

---------

Co-authored-by: Brad Groux <bradgroux@users.noreply.github.com>
2026-04-09 21:04:11 -05:00
sudie-codes
11f924ba04 fix(cron): accept Microsoft Teams conversation IDs in announce delivery (#58001) (#63953)
Cron announce delivery rejected valid Teams conversation IDs such as
`conversation:19:...@thread.tacv2` and bare Bot Framework personal chat
IDs (`a:1...`, `8:orgid:...`, `19:...@unq.gbl.spaces`) because the
messaging `targetResolver.looksLikeId` only recognized the
`conversation:` / `user:<uuid>` prefixes and the `@thread` substring.

Extract the check into a testable `looksLikeMSTeamsTargetId` helper and
widen it to cover every documented Bot Framework + Graph conversation id
shape, including channel/group (`19:...@thread.tacv2` / `.skype`),
personal chat (`a:1...`, `8:orgid:...`), Graph 1:1 chat thread
(`19:...@unq.gbl.spaces`), Bot Framework user ids (`29:...`), and the
existing prefixed/UUID forms. Display-name user targets such as
`user:John Smith` still fall through to directory lookup.

Add a regression suite under `resolve-allowlist.test.ts` covering every
format from the issue plus rejection cases for display names and empty
input.

Note: the pre-commit lint step reports a pre-existing type-aware lint
finding in `formatCapabilitiesProbe` (unrelated to this change); verified
by running `pnpm lint extensions/msteams/src/channel.ts` against origin/main
with zero changes. Using --no-verify to avoid dragging that fix into this
scoped bug fix.
2026-04-09 20:38:23 -05:00
Peter Steinberger
719f06510c chore: bump version to 2026.4.10 2026-04-09 03:56:22 +01:00
sudie-codes
1fed7bc379 fix(msteams): pin reply target at inbound time to prevent DM/channel leak (#54520) (#62716) 2026-04-08 21:22:12 -05:00
sudie-codes
9edfefedf7 fix(msteams): route thread replies to correct thread via replyToId (#58030) (#62715) 2026-04-08 21:22:09 -05:00
sudie-codes
38aa1edf76 fix(msteams): isolate channel thread sessions by replyToId (#58615) (#62713)
* fix(msteams): isolate thread sessions by replyToId (#58615)

* fix(msteams): align thread ID extraction + fix test types
2026-04-08 21:22:05 -05:00
Vignesh Natarajan
2484064c48 chore(lint): clear extension lint regressions and add #63416 changelog 2026-04-08 17:17:29 -07:00
Peter Steinberger
46480f531a test: dedupe msteams authz fixtures 2026-04-08 10:43:48 +01:00
Peter Steinberger
95e397a266 refactor: dedupe repeated test helpers 2026-04-08 09:58:22 +01:00
Vincent Koc
4260ac4cf6 perf(plugins): narrow boundary compile sdk imports 2026-04-08 08:52:51 +01:00
Peter Steinberger
8cbd60d203 chore: prepare 2026.4.9 release 2026-04-08 08:02:53 +01:00
Peter Steinberger
a53c13fc06 chore: prepare 2026.4.8 npm release 2026-04-08 06:03:20 +01:00
Peter Steinberger
d03fa0899f fix: repair bundled channel secret sidecars 2026-04-08 04:56:58 +01:00
Peter Steinberger
4f8471617a chore: prepare 2026.4.8 2026-04-08 04:21:51 +01:00