Split up Outbound and Inbound Activities#639
Merged
heyitsaamir merged 9 commits intoJul 15, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Deprecate legacy activity builders on send surfaces while converting them to outbound activity inputs before sending. Update examples to use MessageActivityInput and keep raw conversation-client payloads available for devtools emulator traffic. Co-authored-by: Copilot App <[email protected]>
Remove the raw activity escape hatch from conversation activity APIs so ActivityParams remains the message/typing input union. Update deprecated devtools paths to use update, delete, and reaction endpoints instead of creating non-sendable activity types. Co-authored-by: Copilot App <[email protected]>
heyitsaamir
commented
Jul 13, 2026
Deprecate outbound-only helpers on full Activity and clarify that typing input text is used for streaming updates. Co-authored-by: Copilot App <[email protected]>
heyitsaamir
commented
Jul 13, 2026
Add JSDoc for the new public outbound activity input APIs and record the public API documentation requirement in CONTRIBUTING.MD. Co-authored-by: Copilot App <[email protected]>
Add the public API JSDoc rule to .github/copilot-instructions.md instead of CONTRIBUTING.MD. Co-authored-by: Copilot App <[email protected]>
Use root AGENTS.md for the public API JSDoc instruction instead of Copilot-specific instructions. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prototypes a dedicated outbound activity input model (message/typing only) so app-facing send/create APIs stop accepting full inbound activity shapes, while keeping backwards compatibility by converting legacy MessageActivity/TypingActivity builders into outbound inputs.
Changes:
- Introduces
ActivityInput,MessageActivityInput, andTypingActivityInput(plus updatedActivityParams) to represent outbound-sendable activities only. - Updates apps + API send/create/update surfaces to accept outbound inputs, while preserving legacy builder support via deprecated overloads and
toActivityParams()conversion. - Updates DevTools and examples to use the new outbound inputs and to use dedicated update/delete/reaction APIs instead of creating non-sendable activity types.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devtools/src/utils/create-feedback.ts | Removes legacy invoke-based feedback activity creation helper. |
| packages/devtools/src/screens/ChatScreen/ChatScreen.tsx | Switches edit/delete/reaction flows to update/delete/reaction endpoints and message input builder. |
| packages/devtools/src/components/Feedback/Feedback.tsx | Changes feedback submission to reactions; removes dependency on ActivityStore + invoke activity creation. |
| packages/apps/src/types/plugin/sender.ts | Adds deprecated overload for legacy builder activity input. |
| packages/apps/src/types/plugin/plugin.ts | Adds deprecated overload signature for legacy builder send inputs. |
| packages/apps/src/http/http-stream.ts | Normalizes outbound payload via toActivityParams() before merging ref fields. |
| packages/apps/src/contexts/function.ts | Adds deprecated overloads for legacy builder activities on send(). |
| packages/apps/src/contexts/activity.ts | Adds deprecated overloads; routes outbound sends through toActivityParams(); drops server-filled fields from sign-in fallback payload. |
| packages/apps/src/contexts/activity.test.ts | Updates expectations to match outbound input payload shape (e.g., removed inputHint). |
| packages/apps/src/app.ts | Adds deprecated overloads so App.send/reply still accept legacy builders. |
| packages/apps/src/app.process.ts | Expands wrapped context.send type to include legacy builder activities. |
| packages/apps/src/activity-sender.ts | Normalizes outbound payload via toActivityParams() before merging conversation reference fields. |
| packages/apps/src/activity-sender.spec.ts | Adds coverage for legacy builder conversion + ref field merging behavior. |
| packages/api/src/models/activity-like.ts | Defines DeprecatedInputActivity and narrows ActivityLike to outbound message/typing inputs (plus string/card). |
| packages/api/src/clients/conversation/index.ts | Adds deprecated overloads for legacy builders on conversation activity operations/accessors. |
| packages/api/src/clients/conversation/activity.ts | Narrows ActivityParams to message/typing inputs and converts legacy builders via toActivityParams() before HTTP calls. |
| packages/api/src/clients/conversation/activity.spec.ts | Adds tests verifying legacy builder conversion drops server-populated fields. |
| packages/api/src/activities/utils/to-activity-params.ts | Converts string/card/legacy builders into normalized outbound inputs. |
| packages/api/src/activities/utils/to-activity-params.spec.ts | Adds tests for legacy builder conversion into MessageActivityInput/TypingActivityInput. |
| packages/api/src/activities/typing.ts | Introduces TypingActivityInput + outbound typing input interface/builder. |
| packages/api/src/activities/message/message.ts | Introduces MessageActivityInput + outbound message input interface/builder (quoting, streaming, mentions, etc.). |
| packages/api/src/activities/index.ts | Re-exports ActivityInput/IActivityInput for public consumption. |
| packages/api/src/activities/activity.ts | Introduces IActivityInput and ActivityInput base builder for outbound activities; deprecates outbound-relevant methods on legacy Activity. |
| examples/targeted-messages/src/index.ts | Migrates sample to MessageActivityInput. |
| examples/suggested-action/src/index.ts | Migrates sample to MessageActivityInput. |
| examples/stream/src/index.ts | Migrates sample to MessageActivityInput streaming emit/send paths. |
| examples/quoting/src/index.ts | Migrates sample to MessageActivityInput quoting helpers. |
| examples/formatted-messaging/src/index.ts | Migrates sample to MessageActivityInput for rich text formats. |
| examples/echo/src/index.ts | Migrates sample to MessageActivityInput for proactive send. |
| examples/dialogs/src/index.ts | Migrates sample to MessageActivityInput for card sending. |
| examples/cards/src/index.ts | Updates commented example to reference MessageActivityInput. |
| examples/ai-mcp/src/handlers.ts | Migrates streaming markers and pending cards to MessageActivityInput. |
| examples/ai-mcp/src/citation-collector.ts | Updates typing to accept MessageActivityInput instead of legacy MessageActivity. |
| AGENTS.md | Adds repo guidance requiring JSDoc for all new public API surface area. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MehakBindra
reviewed
Jul 15, 2026
MehakBindra
reviewed
Jul 15, 2026
MehakBindra
reviewed
Jul 15, 2026
Narrow outbound send and stream surfaces to message/typing input shapes while preserving deprecated MessageActivity and TypingActivity builder support. Co-authored-by: Copilot App <[email protected]> Copilot-Session: e32e9910-5791-4ac4-9ce0-9e843e19195e
MehakBindra
approved these changes
Jul 15, 2026
Merged
lilyydu
added a commit
that referenced
this pull request
Jul 16, 2026
## Release v2.0.14
Prepares the stable **2.0.14** release by merging `main` into `release`
and setting `version.json` to the stable version (removing the
`-preview.{height}` suffix).
- Previous release: `2.0.13` (published 2026-06-15)
- Only functional diff vs `main` is `version.json`:
`2.0.14-preview.{height}` → `2.0.14`
## What's in this release
### 🚀 Features
* Flatten client method chains to reduce call hops by @lilyydu in
#634
* Support resetting response streams and streaming error handling by
@lilyydu in #635
* Add `extendedMarkdown` text format value by @singhk97 in
#615
### 🐛 Fixes
* Set `replyToId` for all streaming activities by @lilyydu in
#646
* Use `artifactName` for pipelineArtifact inputs in publish pipeline by
@corinagum in #625
### ♻️ Refactors
* Move `apps` from file-based mixins to real classes by @heyitsaamir in
#633
* Split up Outbound and Inbound Activities by @heyitsaamir in
#639
* Remove `ExperimentalTeamsQuotedReplies` markers by @corinagum in
#621
### 🧪 Tests
* Add integration tests for Teams TypeScript SDK by @corinagum in
#622
### 📚 Docs & Examples
* Migrate examples to the flattened conversation API by @lilyydu in
#637
* Note npm CFS proxy for Microsoft-managed devices by @corinagum in
#638
* Update integration test runbook link to ADO wiki by @corinagum in
#624
### 🔧 Chores & Dependencies
* Bump version to 2.0.14-preview and fix pipeline release job by
@corinagum in #620
* Bump hono from 4.12.21 to 4.12.25 by @dependabot in
#623
* Bump react-router from 7.15.0 to 7.15.1 by @dependabot in
#619
* Bump vite from 6.4.2 to 6.4.3 by @dependabot in
#617
**Full Changelog**:
v2.0.13...prep-release/2.0.14
### After merge
1. Trigger the [release
pipeline](https://dev.azure.com/DomoreexpGithub/Github_Pipelines/_build?definitionId=52&_a=summary)
on `release` with **Public** publish type
2. Bump `main` → `2.0.15-preview.{height}`
3. Create the `v2.0.14` git tag + GitHub Release
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
MessageActivity/TypingActivityare used to represent both outbound AND inbound activities. These classes model the full activity shape, including fields that have no meaning on an outbound call. (from,conversation,channelId,serviceUrl,timestamp, etc.).That creates confusing devex: callers can set fields that are ignored or overwritten by the send path, and it blurs the distinction between activities the app receives and activities the app sends.
In practice, apps only send two outbound activity types:
This PR prototypes an outbound input model for those sendable activities:
ActivityInputas the outbound base classMessageActivityInputTypingActivityInputActivityParams = IMessageActivityInput | ITypingActivityInputThe inbound activity/router model stays unchanged, but app-facing send/create surfaces are now centered around outbound activity inputs.
Backward compatibility
Now, existing code often does:
To keep that working, this PR keeps accepting
MessageActivityandTypingActivityon send surfaces through deprecated overloads. When those legacy builders are passed tosend, they are converted intoMessageActivityInput/TypingActivityInputbefore sending.That gives users migration guidance without breaking existing code:
So now, this is the more correct code:
But this continues to work:

The conversion intentionally drops server-populated fields like
from,conversation,channelId, andserviceUrlso the wire payload matches what the app is actually allowed to send.Non-sendable activity cleanup
ActivityParamsremains the outbound input union. Non-sendable activity types such asmessageUpdate,messageDelete,messageReaction, and invoke feedback are not accepted by activity create/send APIs, so we removed those.Call sites that previously tried to create those activity types were updated to use the appropriate APIs instead, such as update, delete, and reaction endpoints.