Move internal workspace packages from peer deps to direct deps#474
Open
heyitsaamir wants to merge 1 commit intomainfrom
Open
Move internal workspace packages from peer deps to direct deps#474heyitsaamir wants to merge 1 commit intomainfrom
heyitsaamir wants to merge 1 commit intomainfrom
Conversation
Internal @microsoft/teams.* packages were declared as peer dependencies, forcing consumers to manually install internal plumbing. Convert to real dependencies so consumers only install packages they consciously choose. Clean up examples and CLI templates to only declare what they import. Remove teams.dev dependency from teams.mcp (and DevtoolsPlugin code). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
corinagum
approved these changes
Mar 17, 2026
Collaborator
corinagum
left a comment
There was a problem hiding this comment.
lgtm, tentative approval - what's the plan for the teams new scaffolding testing?
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.
Why
Internal
@microsoft/teams.*packages were declared as peer dependencies of each other, forcing consumers to manually install packages liketeams.api,teams.common,teams.graph, andteams.cardseven though they had no version choice — all packages are lockstep-versioned and released together. This added DX friction without any architectural benefit.This was fine when agents were being created from scratch (users would scaffold a project and install everything at once). That's no longer the case — users are integrating the SDK into existing projects, and having to figure out which internal plumbing packages to install is unnecessary. Peer deps are meant for plugin/host relationships and external SDKs where the consumer provides their own version, not for tightly-coupled internal packages.
Summary
@microsoft/teams.*peer dependencies to real dependencies across all packages. Consumers now only install the packages they consciously choose (teams.apps,teams.dev,teams.ai, etc.) and internal plumbing comes in transitively.botbuilder,dev,mcp,a2a,mcpclient) correctly peer on their host (teams.appsorteams.ai) while keeping directly-imported internals as real deps. External third-party peers (botbuilder,openai,@microsoft/teams-js,@modelcontextprotocol/sdk,@a2a-js/sdk) remain as peer deps.@microsoft/teams.devdependency fromteams.mcp(and associatedDevtoolsPlugincode) - This requires a dependency on dev, which is not right. Users should be able to run this plugin without installing dev since dev is an optional plugin.Dependency principles applied
Test plan
teams newscaffolds correct depsskip-test-verification