microsoft-agents-hosting-teams 1.2.0.dev9__tar.gz → 1.2.0.dev16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {microsoft_agents_hosting_teams-1.2.0.dev9/microsoft_agents_hosting_teams.egg-info → microsoft_agents_hosting_teams-1.2.0.dev16}/PKG-INFO +2 -2
  2. microsoft_agents_hosting_teams-1.2.0.dev16/VERSION.txt +1 -0
  3. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/teams_activity_handler.py +107 -35
  4. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16/microsoft_agents_hosting_teams.egg-info}/PKG-INFO +2 -2
  5. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents_hosting_teams.egg-info/requires.txt +1 -1
  6. microsoft_agents_hosting_teams-1.2.0.dev9/VERSION.txt +0 -1
  7. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/LICENSE +0 -0
  8. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/MANIFEST.in +0 -0
  9. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/__init__.py +0 -0
  10. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/errors/__init__.py +0 -0
  11. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/errors/error_resources.py +0 -0
  12. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/teams_agent_extension.py +0 -0
  13. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/teams_cloud_adapter.py +0 -0
  14. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents/hosting/teams/teams_info.py +0 -0
  15. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents_hosting_teams.egg-info/SOURCES.txt +0 -0
  16. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents_hosting_teams.egg-info/dependency_links.txt +0 -0
  17. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/microsoft_agents_hosting_teams.egg-info/top_level.txt +0 -0
  18. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/pyproject.toml +0 -0
  19. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/readme.md +0 -0
  20. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/setup.cfg +0 -0
  21. {microsoft_agents_hosting_teams-1.2.0.dev9 → microsoft_agents_hosting_teams-1.2.0.dev16}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-teams
3
- Version: 1.2.0.dev9
3
+ Version: 1.2.0.dev16
4
4
  Summary: Integration library for Microsoft Agents with Teams
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.12
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: microsoft-agents-hosting-core==1.2.0.dev9
16
+ Requires-Dist: microsoft-agents-hosting-core==1.2.0.dev16
17
17
  Requires-Dist: aiohttp>=3.11.11
18
18
  Requires-Dist: microsoft-teams-api<3,>=2.0.0
19
19
  Dynamic: license-file
@@ -0,0 +1 @@
1
+ 1.2.0.dev16
@@ -74,20 +74,24 @@ class TeamsActivityHandler(ActivityHandler):
74
74
  await self.on_teams_config_submit(turn_context, value)
75
75
  )
76
76
  elif name == "fileConsent/invoke":
77
+ card_response = FileConsentCardResponse.model_validate(value)
77
78
  return self._create_invoke_response(
78
- await self.on_teams_file_consent(turn_context, value)
79
+ await self.on_teams_file_consent(turn_context, card_response)
79
80
  )
80
81
  elif name == "actionableMessage/executeAction":
81
- await self.on_teams_o365_connector_card_action(turn_context, value)
82
+ query = O365ConnectorCardActionQuery.model_validate(value)
83
+ await self.on_teams_o365_connector_card_action(turn_context, query)
82
84
  return self._create_invoke_response()
83
85
  elif name == "composeExtension/queryLink":
86
+ query = AppBasedLinkQuery.model_validate(value)
84
87
  return self._create_invoke_response(
85
- await self.on_teams_app_based_link_query(turn_context, value)
88
+ await self.on_teams_app_based_link_query(turn_context, query)
86
89
  )
87
90
  elif name == "composeExtension/anonymousQueryLink":
91
+ query = AppBasedLinkQuery.model_validate(value)
88
92
  return self._create_invoke_response(
89
93
  await self.on_teams_anonymous_app_based_link_query(
90
- turn_context, value
94
+ turn_context, query
91
95
  )
92
96
  )
93
97
  elif name == "composeExtension/query":
@@ -104,21 +108,24 @@ class TeamsActivityHandler(ActivityHandler):
104
108
  )
105
109
  )
106
110
  elif name == "composeExtension/submitAction":
111
+ action = MessagingExtensionAction.model_validate(value)
107
112
  return self._create_invoke_response(
108
113
  await self.on_teams_messaging_extension_submit_action_dispatch(
109
- turn_context, value
114
+ turn_context, action
110
115
  )
111
116
  )
112
117
  elif name == "composeExtension/fetchTask":
118
+ action = MessagingExtensionAction.model_validate(value)
113
119
  return self._create_invoke_response(
114
120
  await self.on_teams_messaging_extension_fetch_task(
115
- turn_context, value
121
+ turn_context, action
116
122
  )
117
123
  )
118
124
  elif name == "composeExtension/querySettingUrl":
125
+ query = MessagingExtensionQuery.model_validate(value)
119
126
  return self._create_invoke_response(
120
127
  await self.on_teams_messaging_extension_configuration_query_setting_url(
121
- turn_context, value
128
+ turn_context, query
122
129
  )
123
130
  )
124
131
  elif name == "composeExtension/setting":
@@ -146,12 +153,14 @@ class TeamsActivityHandler(ActivityHandler):
146
153
  )
147
154
  )
148
155
  elif name == "tab/fetch":
156
+ tab_request = TabRequest.model_validate(value)
149
157
  return self._create_invoke_response(
150
- await self.on_teams_tab_fetch(turn_context, value)
158
+ await self.on_teams_tab_fetch(turn_context, tab_request)
151
159
  )
152
160
  elif name == "tab/submit":
161
+ tab_submit = TabSubmit.model_validate(value)
153
162
  return self._create_invoke_response(
154
- await self.on_teams_tab_submit(turn_context, value)
163
+ await self.on_teams_tab_submit(turn_context, tab_submit)
155
164
  )
156
165
  else:
157
166
  return await super().on_invoke_activity(turn_context)
@@ -498,10 +507,8 @@ class TeamsActivityHandler(ActivityHandler):
498
507
  :return: None
499
508
  """
500
509
  if turn_context.activity.channel_id == "msteams":
501
- channel_data = (
502
- TeamsChannelData.model_validate(turn_context.activity.channel_data)
503
- if turn_context.activity.channel_data
504
- else None
510
+ channel_data = TeamsChannelData.model_validate(
511
+ turn_context.activity.channel_data
505
512
  )
506
513
 
507
514
  if (
@@ -509,16 +516,18 @@ class TeamsActivityHandler(ActivityHandler):
509
516
  and len(turn_context.activity.members_added) > 0
510
517
  ):
511
518
  return await self.on_teams_members_added_dispatch(
512
- turn_context.activity.members_added,
513
- channel_data.team if channel_data else None,
514
- turn_context,
519
+ turn_context.activity.members_added, channel_data.team, turn_context
515
520
  )
516
521
 
517
522
  if (
518
523
  turn_context.activity.members_removed
519
524
  and len(turn_context.activity.members_removed) > 0
520
525
  ):
521
- return await self.on_teams_members_removed(turn_context)
526
+ return await self.on_teams_members_removed_dispatch(
527
+ turn_context.activity.members_removed,
528
+ channel_data.team,
529
+ turn_context,
530
+ )
522
531
 
523
532
  if not channel_data or not channel_data.event_type:
524
533
  return await super().on_conversation_update_activity(turn_context)
@@ -526,25 +535,41 @@ class TeamsActivityHandler(ActivityHandler):
526
535
  event_type = channel_data.event_type
527
536
 
528
537
  if event_type == "channelCreated":
529
- return await self.on_teams_channel_created(turn_context)
538
+ return await self.on_teams_channel_created(
539
+ channel_data.channel, channel_data.team, turn_context
540
+ )
530
541
  elif event_type == "channelDeleted":
531
- return await self.on_teams_channel_deleted(turn_context)
542
+ return await self.on_teams_channel_deleted(
543
+ channel_data.channel, channel_data.team, turn_context
544
+ )
532
545
  elif event_type == "channelRenamed":
533
- return await self.on_teams_channel_renamed(turn_context)
546
+ return await self.on_teams_channel_renamed(
547
+ channel_data.channel, channel_data.team, turn_context
548
+ )
534
549
  elif event_type == "teamArchived":
535
- return await self.on_teams_team_archived(turn_context)
550
+ return await self.on_teams_team_archived(
551
+ channel_data.team, turn_context
552
+ )
536
553
  elif event_type == "teamDeleted":
537
- return await self.on_teams_team_deleted(turn_context)
554
+ return await self.on_teams_team_deleted(channel_data.team, turn_context)
538
555
  elif event_type == "teamHardDeleted":
539
- return await self.on_teams_team_hard_deleted(turn_context)
556
+ return await self.on_teams_team_hard_deleted(
557
+ channel_data.team, turn_context
558
+ )
540
559
  elif event_type == "channelRestored":
541
- return await self.on_teams_channel_restored(turn_context)
560
+ return await self.on_teams_channel_restored(
561
+ channel_data.channel, channel_data.team, turn_context
562
+ )
542
563
  elif event_type == "teamRenamed":
543
- return await self.on_teams_team_renamed(turn_context)
564
+ return await self.on_teams_team_renamed(channel_data.team, turn_context)
544
565
  elif event_type == "teamRestored":
545
- return await self.on_teams_team_restored(turn_context)
566
+ return await self.on_teams_team_restored(
567
+ channel_data.team, turn_context
568
+ )
546
569
  elif event_type == "teamUnarchived":
547
- return await self.on_teams_team_unarchived(turn_context)
570
+ return await self.on_teams_team_unarchived(
571
+ channel_data.team, turn_context
572
+ )
548
573
 
549
574
  return await super().on_conversation_update_activity(turn_context)
550
575
 
@@ -668,6 +693,7 @@ class TeamsActivityHandler(ActivityHandler):
668
693
  # Propagate any other errors
669
694
  raise
670
695
 
696
+ await self.on_members_added_activity(members_added, turn_context)
671
697
  await self.on_teams_members_added(teams_members_added, team_info, turn_context)
672
698
 
673
699
  async def on_teams_members_added(
@@ -679,10 +705,12 @@ class TeamsActivityHandler(ActivityHandler):
679
705
  """
680
706
  Handles Teams members added.
681
707
 
708
+ :param teams_members_added: The list of TeamsChannelAccount objects representing the members added to the conversation.
709
+ :param team_info: The team info object.
682
710
  :param turn_context: The context object for the turn.
683
711
  :return: None
684
712
  """
685
- await self.on_members_added_activity(teams_members_added, turn_context)
713
+ return
686
714
 
687
715
  async def on_teams_members_removed_dispatch(
688
716
  self,
@@ -700,7 +728,9 @@ class TeamsActivityHandler(ActivityHandler):
700
728
  member.model_dump(by_alias=True, exclude_unset=True)
701
729
  )
702
730
  )
703
- return await self.on_teams_members_removed(
731
+
732
+ await self.on_members_removed_activity(members_removed, turn_context)
733
+ await self.on_teams_members_removed(
704
734
  teams_members_removed, team_info, turn_context
705
735
  )
706
736
 
@@ -713,10 +743,12 @@ class TeamsActivityHandler(ActivityHandler):
713
743
  """
714
744
  Handles Teams members removed.
715
745
 
746
+ :param teams_members_removed: The list of TeamsChannelAccount objects representing the members removed from the conversation.
747
+ :param team_info: The team info object.
716
748
  :param turn_context: The context object for the turn.
717
749
  :return: None
718
750
  """
719
- await self.on_members_removed_activity(teams_members_removed, turn_context)
751
+ return
720
752
 
721
753
  async def on_teams_channel_created(
722
754
  self, channel_info: ChannelInfo, team_info: TeamInfo, turn_context: TurnContext
@@ -724,6 +756,8 @@ class TeamsActivityHandler(ActivityHandler):
724
756
  """
725
757
  Handles Teams channel created.
726
758
 
759
+ :param channel_info: The channel info object.
760
+ :param team_info: The team info object.
727
761
  :param turn_context: The context object for the turn.
728
762
  :return: None
729
763
  """
@@ -735,6 +769,8 @@ class TeamsActivityHandler(ActivityHandler):
735
769
  """
736
770
  Handles Teams channel deleted.
737
771
 
772
+ :param channel_info: The channel info object.
773
+ :param team_info: The team info object.
738
774
  :param turn_context: The context object for the turn.
739
775
  :return: None
740
776
  """
@@ -746,6 +782,8 @@ class TeamsActivityHandler(ActivityHandler):
746
782
  """
747
783
  Handles Teams channel renamed.
748
784
 
785
+ :param channel_info: The channel info object.
786
+ :param team_info: The team info object.
749
787
  :param turn_context: The context object for the turn.
750
788
  :return: None
751
789
  """
@@ -757,6 +795,7 @@ class TeamsActivityHandler(ActivityHandler):
757
795
  """
758
796
  Handles Teams team archived.
759
797
 
798
+ :param team_info: The team info object.
760
799
  :param turn_context: The context object for the turn.
761
800
  :return: None
762
801
  """
@@ -768,6 +807,7 @@ class TeamsActivityHandler(ActivityHandler):
768
807
  """
769
808
  Handles Teams team deleted.
770
809
 
810
+ :param team_info: The team info object.
771
811
  :param turn_context: The context object for the turn.
772
812
  :return: None
773
813
  """
@@ -779,6 +819,7 @@ class TeamsActivityHandler(ActivityHandler):
779
819
  """
780
820
  Handles Teams team hard deleted.
781
821
 
822
+ :param team_info: The team info object.
782
823
  :param turn_context: The context object for the turn.
783
824
  :return: None
784
825
  """
@@ -790,6 +831,8 @@ class TeamsActivityHandler(ActivityHandler):
790
831
  """
791
832
  Handles Teams channel restored.
792
833
 
834
+ :param channel_info: The channel info object.
835
+ :param team_info: The team info object.
793
836
  :param turn_context: The context object for the turn.
794
837
  :return: None
795
838
  """
@@ -801,6 +844,7 @@ class TeamsActivityHandler(ActivityHandler):
801
844
  """
802
845
  Handles Teams team renamed.
803
846
 
847
+ :param team_info: The team info object.
804
848
  :param turn_context: The context object for the turn.
805
849
  :return: None
806
850
  """
@@ -812,6 +856,7 @@ class TeamsActivityHandler(ActivityHandler):
812
856
  """
813
857
  Handles Teams team restored.
814
858
 
859
+ :param team_info: The team info object.
815
860
  :param turn_context: The context object for the turn.
816
861
  :return: None
817
862
  """
@@ -823,6 +868,7 @@ class TeamsActivityHandler(ActivityHandler):
823
868
  """
824
869
  Handles Teams team unarchived.
825
870
 
871
+ :param team_info: The team info object.
826
872
  :param turn_context: The context object for the turn.
827
873
  :return: None
828
874
  """
@@ -837,21 +883,42 @@ class TeamsActivityHandler(ActivityHandler):
837
883
  """
838
884
  if turn_context.activity.channel_id == "msteams":
839
885
  if turn_context.activity.name == "application/vnd.microsoft.readReceipt":
840
- return await self.on_teams_read_receipt(turn_context)
886
+ return await self.on_teams_read_receipt(
887
+ ReadReceiptInfo.model_validate(turn_context.activity.value),
888
+ turn_context,
889
+ )
841
890
  elif turn_context.activity.name == "application/vnd.microsoft.meetingStart":
842
- return await self.on_teams_meeting_start(turn_context)
891
+ return await self.on_teams_meeting_start(
892
+ MeetingStartEventDetails.model_validate(
893
+ turn_context.activity.value
894
+ ),
895
+ turn_context,
896
+ )
843
897
  elif turn_context.activity.name == "application/vnd.microsoft.meetingEnd":
844
- return await self.on_teams_meeting_end(turn_context)
898
+ return await self.on_teams_meeting_end(
899
+ MeetingEndEventDetails.model_validate(turn_context.activity.value),
900
+ turn_context,
901
+ )
845
902
  elif (
846
903
  turn_context.activity.name
847
904
  == "application/vnd.microsoft.meetingParticipantJoin"
848
905
  ):
849
- return await self.on_teams_meeting_participants_join(turn_context)
906
+ return await self.on_teams_meeting_participants_join(
907
+ MeetingParticipantsEventDetails.model_validate(
908
+ turn_context.activity.value
909
+ ),
910
+ turn_context,
911
+ )
850
912
  elif (
851
913
  turn_context.activity.name
852
914
  == "application/vnd.microsoft.meetingParticipantLeave"
853
915
  ):
854
- return await self.on_teams_meeting_participants_leave(turn_context)
916
+ return await self.on_teams_meeting_participants_leave(
917
+ MeetingParticipantsEventDetails.model_validate(
918
+ turn_context.activity.value
919
+ ),
920
+ turn_context,
921
+ )
855
922
 
856
923
  return await super().on_event_activity(turn_context)
857
924
 
@@ -861,6 +928,7 @@ class TeamsActivityHandler(ActivityHandler):
861
928
  """
862
929
  Handles Teams meeting start.
863
930
 
931
+ :param meeting: The meeting start event details.
864
932
  :param turn_context: The context object for the turn.
865
933
  :return: None
866
934
  """
@@ -872,6 +940,7 @@ class TeamsActivityHandler(ActivityHandler):
872
940
  """
873
941
  Handles Teams meeting end.
874
942
 
943
+ :param meeting: The meeting end event details.
875
944
  :param turn_context: The context object for the turn.
876
945
  :return: None
877
946
  """
@@ -883,6 +952,7 @@ class TeamsActivityHandler(ActivityHandler):
883
952
  """
884
953
  Handles Teams read receipt.
885
954
 
955
+ :param read_receipt: The read receipt info.
886
956
  :param turn_context: The context object for the turn.
887
957
  :return: None
888
958
  """
@@ -894,6 +964,7 @@ class TeamsActivityHandler(ActivityHandler):
894
964
  """
895
965
  Handles Teams meeting participants join.
896
966
 
967
+ :param meeting: The meeting participants event details.
897
968
  :param turn_context: The context object for the turn.
898
969
  :return: None
899
970
  """
@@ -905,6 +976,7 @@ class TeamsActivityHandler(ActivityHandler):
905
976
  """
906
977
  Handles Teams meeting participants leave.
907
978
 
979
+ :param meeting: The meeting participants event details.
908
980
  :param turn_context: The context object for the turn.
909
981
  :return: None
910
982
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-hosting-teams
3
- Version: 1.2.0.dev9
3
+ Version: 1.2.0.dev16
4
4
  Summary: Integration library for Microsoft Agents with Teams
5
5
  Author: Microsoft Corporation
6
6
  License-Expression: MIT
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.12
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: microsoft-agents-hosting-core==1.2.0.dev9
16
+ Requires-Dist: microsoft-agents-hosting-core==1.2.0.dev16
17
17
  Requires-Dist: aiohttp>=3.11.11
18
18
  Requires-Dist: microsoft-teams-api<3,>=2.0.0
19
19
  Dynamic: license-file
@@ -1,3 +1,3 @@
1
- microsoft-agents-hosting-core==1.2.0.dev9
1
+ microsoft-agents-hosting-core==1.2.0.dev16
2
2
  aiohttp>=3.11.11
3
3
  microsoft-teams-api<3,>=2.0.0
@@ -1 +0,0 @@
1
- 1.2.0.dev9