Skip to content

Improved Teams support with microsoft-agents-hosting-msteams package#434

Open
rodrigobr-msft wants to merge 52 commits into
mainfrom
users/robrandao/msteams
Open

Improved Teams support with microsoft-agents-hosting-msteams package#434
rodrigobr-msft wants to merge 52 commits into
mainfrom
users/robrandao/msteams

Conversation

@rodrigobr-msft

Copy link
Copy Markdown
Contributor

This pull request introduces new Teams integration utilities, expands the activity entity model, and improves type safety and handler definitions in the hosting core. The most notable changes are the addition of Teams-specific modules and authentication helpers, the introduction of the ActivityTreatment entity, and the refactoring of handler types for handoff routes. Several minor improvements and clarifications to type annotations and documentation are also included.

Teams integration and SDK utilities:

  • Added a new microsoft_agents.hosting.msteams package with an __init__.py that exposes Teams-specific classes for bot and agent development, including TeamsAgentExtension, TeamsTurnContext, and related types.
  • Introduced _graph.py and _teams_api_client.py modules providing helpers for Microsoft Graph API authentication and Teams API client management, supporting seamless integration with Teams services. [1] [2]

Activity entity model enhancements:

  • Added new ActivityTreatment and ActivityTreatmentTypes entities to the activity model, enabling richer representation of activity treatment metadata. These are now imported and exported in the relevant __init__.py files and registered as a new entity type. [1] [2] [3] [4] [5] [6]

Core hosting and handler improvements:

  • Defined a HandoffHandler protocol and refactored the AgentApplication.handoff method and overloads to use this strongly typed handler, improving type safety and clarity for handoff route registration. [1] [2] [3] [4] [5] [6] [7]

Turn context and type annotation improvements:

  • Clarified and corrected the use of the _activity attribute in TurnContext, ensuring consistent internal naming and null-checking, and updated the return type of send_activity for improved reliability. [1] [2] [3] [4] [5] [6]

Minor dependency and documentation updates:

  • Updated documentation and imports to reflect the renaming of the OAuth connection manager parameter from connection_manager to connections and added missing imports for Connections. [1] [2]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 98 out of 102 changed files in this pull request and generated 3 comments.

Comment thread tests/hosting_msteams/test_utils.py
Comment thread test_samples/hosting_msteams/message-extensions/src/start_server.py Outdated
Copilot AI review requested due to automatic review settings June 30, 2026 19:15
@rodrigobr-msft rodrigobr-msft marked this pull request as ready for review June 30, 2026 19:15
@rodrigobr-msft rodrigobr-msft requested a review from a team as a code owner June 30, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 98 out of 102 changed files in this pull request and generated 4 comments.

Comment thread tests/hosting_msteams/test_utils.py
Comment thread test_samples/hosting_msteams/message-extensions/env.TEMPLATE
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 30, 2026 20:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 97 out of 101 changed files in this pull request and generated 6 comments.

Comment thread tests/hosting_msteams/helpers.py
Comment thread tests/hosting_msteams/test_utils.py
Comment thread test_samples/hosting_msteams/message-extensions/env.TEMPLATE
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 97 out of 101 changed files in this pull request and generated 3 comments.

Comment thread test_samples/hosting_msteams/message-extensions/env.TEMPLATE
Copilot AI review requested due to automatic review settings July 6, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 97 out of 101 changed files in this pull request and generated 6 comments.

Comment thread test_samples/hosting_msteams/message-extensions/env.TEMPLATE
Comment thread tests/hosting_msteams/test_utils.py
Comment thread tests/hosting_msteams/test_utils.py
Copilot AI review requested due to automatic review settings July 6, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 97 out of 101 changed files in this pull request and generated 4 comments.

Comment thread tests/hosting_msteams/test_utils.py
Comment thread tests/hosting_msteams/test_utils.py
Comment thread test_samples/hosting_msteams/message-extensions/env.TEMPLATE
Comment thread test_samples/hosting_msteams/message-extensions/src/agent.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants