microsoft-agents-activity 0.3.1__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.

Potentially problematic release.


This version of microsoft-agents-activity might be problematic. Click here for more details.

Files changed (51) hide show
  1. microsoft_agents/activity/__init__.py +6 -9
  2. microsoft_agents/activity/_load_configuration.py +7 -2
  3. microsoft_agents/activity/_model_utils.py +61 -0
  4. microsoft_agents/activity/_type_aliases.py +0 -1
  5. microsoft_agents/activity/activity.py +117 -63
  6. microsoft_agents/activity/adaptive_card_invoke_value.py +2 -2
  7. microsoft_agents/activity/agents_model.py +28 -0
  8. microsoft_agents/activity/animation_card.py +4 -4
  9. microsoft_agents/activity/attachment_info.py +1 -1
  10. microsoft_agents/activity/audio_card.py +4 -4
  11. microsoft_agents/activity/basic_card.py +4 -4
  12. microsoft_agents/activity/card_action.py +1 -1
  13. microsoft_agents/activity/card_image.py +1 -1
  14. microsoft_agents/activity/channel_account.py +4 -1
  15. microsoft_agents/activity/channels.py +3 -0
  16. microsoft_agents/activity/conversation_account.py +1 -1
  17. microsoft_agents/activity/conversation_members.py +1 -1
  18. microsoft_agents/activity/conversation_parameters.py +3 -3
  19. microsoft_agents/activity/conversation_reference.py +3 -3
  20. microsoft_agents/activity/conversations_result.py +1 -1
  21. microsoft_agents/activity/entity/__init__.py +29 -0
  22. microsoft_agents/activity/{ai_entity.py → entity/ai_entity.py} +1 -32
  23. microsoft_agents/activity/{entity.py → entity/entity.py} +5 -3
  24. microsoft_agents/activity/{geo_coordinates.py → entity/geo_coordinates.py} +2 -2
  25. microsoft_agents/activity/{mention.py → entity/mention.py} +7 -5
  26. microsoft_agents/activity/{place.py → entity/place.py} +2 -2
  27. microsoft_agents/activity/{thing.py → entity/thing.py} +2 -2
  28. microsoft_agents/activity/error.py +1 -1
  29. microsoft_agents/activity/error_response.py +1 -1
  30. microsoft_agents/activity/expected_replies.py +1 -1
  31. microsoft_agents/activity/hero_card.py +4 -4
  32. microsoft_agents/activity/media_card.py +4 -4
  33. microsoft_agents/activity/message_reaction.py +1 -1
  34. microsoft_agents/activity/oauth_card.py +2 -2
  35. microsoft_agents/activity/paged_members_result.py +1 -1
  36. microsoft_agents/activity/receipt_card.py +4 -4
  37. microsoft_agents/activity/receipt_item.py +3 -3
  38. microsoft_agents/activity/role_types.py +2 -0
  39. microsoft_agents/activity/semantic_action.py +2 -2
  40. microsoft_agents/activity/signin_card.py +2 -2
  41. microsoft_agents/activity/suggested_actions.py +1 -1
  42. microsoft_agents/activity/text_highlight.py +1 -1
  43. microsoft_agents/activity/thumbnail_card.py +4 -4
  44. microsoft_agents/activity/token_exchange_state.py +2 -2
  45. microsoft_agents/activity/token_response.py +18 -0
  46. microsoft_agents/activity/transcript.py +1 -1
  47. microsoft_agents/activity/video_card.py +4 -4
  48. {microsoft_agents_activity-0.3.1.dist-info → microsoft_agents_activity-0.4.0.dist-info}/METADATA +1 -1
  49. {microsoft_agents_activity-0.3.1.dist-info → microsoft_agents_activity-0.4.0.dist-info}/RECORD +51 -49
  50. {microsoft_agents_activity-0.3.1.dist-info → microsoft_agents_activity-0.4.0.dist-info}/WHEEL +0 -0
  51. {microsoft_agents_activity-0.3.1.dist-info → microsoft_agents_activity-0.4.0.dist-info}/top_level.txt +0 -0
@@ -21,7 +21,7 @@ class ConversationAccount(AgentsModel):
21
21
  Directory (AAD)
22
22
  :type aad_object_id: str
23
23
  :param role: Role of the entity behind the account
24
- :type role: str or ~microsoft_agents.protocols.models.RoleTypes
24
+ :type role: str or ~microsoft_agents.activity.RoleTypes
25
25
  :param tenant_id: This conversation's tenant ID
26
26
  :type tenant_id: str
27
27
  :param properties: This conversation's properties
@@ -9,7 +9,7 @@ class ConversationMembers(AgentsModel):
9
9
  :param id: Conversation ID
10
10
  :type id: str
11
11
  :param members: List of members in this conversation
12
- :type members: list[~microsoft_agents.protocols.models.ChannelAccount]
12
+ :type members: list[~microsoft_agents.activity.ChannelAccount]
13
13
  """
14
14
 
15
15
  id: NonEmptyString = None
@@ -12,15 +12,15 @@ class ConversationParameters(AgentsModel):
12
12
  :param is_group: IsGroup
13
13
  :type is_group: bool
14
14
  :param agent: The agent address for this conversation
15
- :type agent: ~microsoft_agents.protocols.models.ChannelAccount
15
+ :type agent: ~microsoft_agents.activity.ChannelAccount
16
16
  :param members: Members to add to the conversation
17
- :type members: list[~microsoft_agents.protocols.models.ChannelAccount]
17
+ :type members: list[~microsoft_agents.activity.ChannelAccount]
18
18
  :param topic_name: (Optional) Topic of the conversation (if supported by
19
19
  the channel)
20
20
  :type topic_name: str
21
21
  :param activity: (Optional) When creating a new conversation, use this
22
22
  activity as the initial message to the conversation
23
- :type activity: ~microsoft_agents.protocols.models.Activity
23
+ :type activity: ~microsoft_agents.activity.Activity
24
24
  :param channel_data: Channel specific payload for creating the
25
25
  conversation
26
26
  :type channel_data: object
@@ -17,11 +17,11 @@ class ConversationReference(AgentsModel):
17
17
  :param activity_id: (Optional) ID of the activity to refer to
18
18
  :type activity_id: str
19
19
  :param user: (Optional) User participating in this conversation
20
- :type user: ~microsoft_agents.protocols.models.ChannelAccount
20
+ :type user: ~microsoft_agents.activity.ChannelAccount
21
21
  :param agent: Agent participating in this conversation
22
- :type agent: ~microsoft_agents.protocols.models.ChannelAccount
22
+ :type agent: ~microsoft_agents.activity.ChannelAccount
23
23
  :param conversation: Conversation reference
24
- :type conversation: ~microsoft_agents.protocols.models.ConversationAccount
24
+ :type conversation: ~microsoft_agents.activity.ConversationAccount
25
25
  :param channel_id: Channel ID
26
26
  :type channel_id: str
27
27
  :param locale: A locale name for the contents of the text field.
@@ -10,7 +10,7 @@ class ConversationsResult(AgentsModel):
10
10
  :type continuation_token: str
11
11
  :param conversations: List of conversations
12
12
  :type conversations:
13
- list[~microsoft_agents.protocols.models.ConversationMembers]
13
+ list[~microsoft_agents.activity.ConversationMembers]
14
14
  """
15
15
 
16
16
  continuation_token: NonEmptyString = None
@@ -0,0 +1,29 @@
1
+ from .mention import Mention
2
+ from .entity import Entity
3
+ from .ai_entity import (
4
+ ClientCitation,
5
+ ClientCitationAppearance,
6
+ ClientCitationImage,
7
+ ClientCitationIconName,
8
+ AIEntity,
9
+ SensitivityPattern,
10
+ SensitivityUsageInfo,
11
+ )
12
+ from .geo_coordinates import GeoCoordinates
13
+ from .place import Place
14
+ from .thing import Thing
15
+
16
+ __all__ = [
17
+ "Entity",
18
+ "AIEntity",
19
+ "ClientCitation",
20
+ "ClientCitationAppearance",
21
+ "ClientCitationImage",
22
+ "ClientCitationIconName",
23
+ "Mention",
24
+ "SensitivityUsageInfo",
25
+ "SensitivityPattern",
26
+ "GeoCoordinates",
27
+ "Place",
28
+ "Thing",
29
+ ]
@@ -5,8 +5,7 @@ from enum import Enum
5
5
  from typing import List, Optional, Union, Literal
6
6
  from dataclasses import dataclass
7
7
 
8
- from .agents_model import AgentsModel
9
- from .activity import Activity
8
+ from ..agents_model import AgentsModel
10
9
  from .entity import Entity
11
10
 
12
11
 
@@ -110,33 +109,3 @@ class AIEntity(Entity):
110
109
  def __post_init__(self):
111
110
  if self.additional_type is None:
112
111
  self.additional_type = ["AIGeneratedContent"]
113
-
114
-
115
- def add_ai_to_activity(
116
- activity: Activity,
117
- citations: Optional[List[ClientCitation]] = None,
118
- usage_info: Optional[SensitivityUsageInfo] = None,
119
- ) -> None:
120
- """
121
- Adds AI entity to an activity to indicate AI-generated content.
122
-
123
- Args:
124
- activity: The activity to modify
125
- citations: Optional list of citations
126
- usage_info: Optional sensitivity usage information
127
- """
128
- if citations:
129
- ai_entity = AIEntity(
130
- type="https://schema.org/Message",
131
- schema_type="Message",
132
- context="https://schema.org",
133
- id="",
134
- additional_type=["AIGeneratedContent"],
135
- citation=citations,
136
- usage_info=usage_info,
137
- )
138
-
139
- if activity.entities is None:
140
- activity.entities = []
141
-
142
- activity.entities.append(ai_entity)
@@ -1,9 +1,11 @@
1
1
  from typing import Any, Optional
2
+ from enum import Enum
2
3
 
3
4
  from pydantic import model_serializer, model_validator
4
- from .agents_model import AgentsModel, ConfigDict
5
5
  from pydantic.alias_generators import to_camel, to_snake
6
- from ._type_aliases import NonEmptyString
6
+
7
+ from ..agents_model import AgentsModel, ConfigDict
8
+ from .._type_aliases import NonEmptyString
7
9
 
8
10
 
9
11
  class Entity(AgentsModel):
@@ -15,7 +17,7 @@ class Entity(AgentsModel):
15
17
 
16
18
  model_config = ConfigDict(extra="allow")
17
19
 
18
- type: NonEmptyString
20
+ type: str
19
21
 
20
22
  @property
21
23
  def additional_properties(self) -> dict[str, Any]:
@@ -1,5 +1,5 @@
1
- from .agents_model import AgentsModel
2
- from ._type_aliases import NonEmptyString
1
+ from ..agents_model import AgentsModel
2
+ from .._type_aliases import NonEmptyString
3
3
 
4
4
 
5
5
  class GeoCoordinates(AgentsModel):
@@ -1,13 +1,15 @@
1
- from .channel_account import ChannelAccount
1
+ from typing import Literal
2
+
3
+ from ..channel_account import ChannelAccount
2
4
  from .entity import Entity
3
- from ._type_aliases import NonEmptyString
5
+ from .._type_aliases import NonEmptyString
4
6
 
5
7
 
6
8
  class Mention(Entity):
7
9
  """Mention information (entity type: "mention").
8
10
 
9
11
  :param mentioned: The mentioned user
10
- :type mentioned: ~microsoft_agents.protocols.models.ChannelAccount
12
+ :type mentioned: ~microsoft_agents.activity.ChannelAccount
11
13
  :param text: Sub Text which represents the mention (can be null or empty)
12
14
  :type text: str
13
15
  :param type: Type of this entity (RFC 3987 IRI)
@@ -15,5 +17,5 @@ class Mention(Entity):
15
17
  """
16
18
 
17
19
  mentioned: ChannelAccount = None
18
- text: NonEmptyString = None
19
- type: NonEmptyString = None
20
+ text: str = None
21
+ type: Literal["mention"] = "mention"
@@ -1,5 +1,5 @@
1
- from .agents_model import AgentsModel
2
- from ._type_aliases import NonEmptyString
1
+ from ..agents_model import AgentsModel
2
+ from .._type_aliases import NonEmptyString
3
3
 
4
4
 
5
5
  class Place(AgentsModel):
@@ -1,5 +1,5 @@
1
- from .agents_model import AgentsModel
2
- from ._type_aliases import NonEmptyString
1
+ from ..agents_model import AgentsModel
2
+ from .._type_aliases import NonEmptyString
3
3
 
4
4
 
5
5
  class Thing(AgentsModel):
@@ -11,7 +11,7 @@ class Error(AgentsModel):
11
11
  :param message: Error message
12
12
  :type message: str
13
13
  :param inner_http_error: Error from inner http call
14
- :type inner_http_error: ~microsoft_agents.protocols.models.InnerHttpError
14
+ :type inner_http_error: ~microsoft_agents.activity.InnerHttpError
15
15
  """
16
16
 
17
17
  code: NonEmptyString = None
@@ -6,7 +6,7 @@ class ErrorResponse(AgentsModel):
6
6
  """An HTTP API response.
7
7
 
8
8
  :param error: Error message
9
- :type error: ~microsoft_agents.protocols.models.Error
9
+ :type error: ~microsoft_agents.activity.Error
10
10
  """
11
11
 
12
12
  error: Error = None
@@ -7,7 +7,7 @@ class ExpectedReplies(AgentsModel):
7
7
 
8
8
  :param activities: A collection of Activities that conforms to the
9
9
  ExpectedReplies schema.
10
- :type activities: list[~microsoft_agents.protocols.models.Activity]
10
+ :type activities: list[~microsoft_agents.activity.Activity]
11
11
  """
12
12
 
13
13
  activities: list[Activity] = None
@@ -14,17 +14,17 @@ class HeroCard(AgentsModel):
14
14
  :param text: Text for the card
15
15
  :type text: str
16
16
  :param images: Array of images for the card
17
- :type images: list[~microsoft_agents.protocols.models.CardImage]
17
+ :type images: list[~microsoft_agents.activity.CardImage]
18
18
  :param buttons: Set of actions applicable to the current card
19
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
19
+ :type buttons: list[~microsoft_agents.activity.CardAction]
20
20
  :param tap: This action will be activated when user taps on the card
21
21
  itself
22
- :type tap: ~microsoft_agents.protocols.models.CardAction
22
+ :type tap: ~microsoft_agents.activity.CardAction
23
23
  """
24
24
 
25
25
  title: NonEmptyString = None
26
26
  subtitle: NonEmptyString = None
27
- text: NonEmptyString = None
27
+ text: str = None
28
28
  images: list[CardImage] = None
29
29
  buttons: list[CardAction] = None
30
30
  tap: CardAction = None
@@ -15,12 +15,12 @@ class MediaCard(AgentsModel):
15
15
  :param text: Text of this card
16
16
  :type text: str
17
17
  :param image: Thumbnail placeholder
18
- :type image: ~microsoft_agents.protocols.models.ThumbnailUrl
18
+ :type image: ~microsoft_agents.activity.ThumbnailUrl
19
19
  :param media: Media URLs for this card. When this field contains more than
20
20
  one URL, each URL is an alternative format of the same content.
21
- :type media: list[~microsoft_agents.protocols.models.MediaUrl]
21
+ :type media: list[~microsoft_agents.activity.MediaUrl]
22
22
  :param buttons: Actions on this card
23
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
23
+ :type buttons: list[~microsoft_agents.activity.CardAction]
24
24
  :param shareable: This content may be shared with others (default:true)
25
25
  :type shareable: bool
26
26
  :param autoloop: Should the client loop playback at end of content
@@ -42,7 +42,7 @@ class MediaCard(AgentsModel):
42
42
 
43
43
  title: NonEmptyString = None
44
44
  subtitle: NonEmptyString = None
45
- text: NonEmptyString = None
45
+ text: str = None
46
46
  image: ThumbnailUrl = None
47
47
  media: list[MediaUrl] = None
48
48
  buttons: list[CardAction] = None
@@ -7,7 +7,7 @@ class MessageReaction(AgentsModel):
7
7
 
8
8
  :param type: Message reaction type. Possible values include: 'like',
9
9
  'plusOne'
10
- :type type: str or ~microsoft_agents.protocols.models.MessageReactionTypes
10
+ :type type: str or ~microsoft_agents.activity.MessageReactionTypes
11
11
  """
12
12
 
13
13
  type: NonEmptyString
@@ -14,10 +14,10 @@ class OAuthCard(AgentsModel):
14
14
  :param connection_name: The name of the registered connection
15
15
  :type connection_name: str
16
16
  :param buttons: Action to use to perform signin
17
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
17
+ :type buttons: list[~microsoft_agents.activity.CardAction]
18
18
  """
19
19
 
20
- text: NonEmptyString = None
20
+ text: str = None
21
21
  connection_name: NonEmptyString = None
22
22
  buttons: list[CardAction] = None
23
23
  token_exchange_resource: Optional[TokenExchangeResource] = None
@@ -9,7 +9,7 @@ class PagedMembersResult(AgentsModel):
9
9
  :param continuation_token: Paging token
10
10
  :type continuation_token: str
11
11
  :param members: The Channel Accounts.
12
- :type members: list[~microsoft_agents.protocols.models.ChannelAccount]
12
+ :type members: list[~microsoft_agents.activity.ChannelAccount]
13
13
  """
14
14
 
15
15
  continuation_token: NonEmptyString = None
@@ -11,11 +11,11 @@ class ReceiptCard(AgentsModel):
11
11
  :param title: Title of the card
12
12
  :type title: str
13
13
  :param facts: Array of Fact objects
14
- :type facts: list[~microsoft_agents.protocols.models.Fact]
14
+ :type facts: list[~microsoft_agents.activity.Fact]
15
15
  :param items: Array of Receipt Items
16
- :type items: list[~microsoft_agents.protocols.models.ReceiptItem]
16
+ :type items: list[~microsoft_agents.activity.ReceiptItem]
17
17
  :param tap: This action will be activated when user taps on the card
18
- :type tap: ~microsoft_agents.protocols.models.CardAction
18
+ :type tap: ~microsoft_agents.activity.CardAction
19
19
  :param total: Total amount of money paid (or to be paid)
20
20
  :type total: str
21
21
  :param tax: Total amount of tax paid (or to be paid)
@@ -23,7 +23,7 @@ class ReceiptCard(AgentsModel):
23
23
  :param vat: Total amount of VAT paid (or to be paid)
24
24
  :type vat: str
25
25
  :param buttons: Set of actions applicable to the current card
26
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
26
+ :type buttons: list[~microsoft_agents.activity.CardAction]
27
27
  """
28
28
 
29
29
  title: NonEmptyString = None
@@ -16,19 +16,19 @@ class ReceiptItem(AgentsModel):
16
16
  in font styling only
17
17
  :type text: str
18
18
  :param image: Image
19
- :type image: ~microsoft_agents.protocols.models.CardImage
19
+ :type image: ~microsoft_agents.activity.CardImage
20
20
  :param price: Amount with currency
21
21
  :type price: str
22
22
  :param quantity: Number of items of given kind
23
23
  :type quantity: str
24
24
  :param tap: This action will be activated when user taps on the Item
25
25
  bubble.
26
- :type tap: ~microsoft_agents.protocols.models.CardAction
26
+ :type tap: ~microsoft_agents.activity.CardAction
27
27
  """
28
28
 
29
29
  title: NonEmptyString = None
30
30
  subtitle: NonEmptyString = None
31
- text: NonEmptyString = None
31
+ text: str = None
32
32
  image: CardImage = None
33
33
  price: NonEmptyString = None
34
34
  quantity: NonEmptyString = None
@@ -5,3 +5,5 @@ class RoleTypes(str, Enum):
5
5
  user = "user"
6
6
  agent = "bot"
7
7
  skill = "skill"
8
+ agentic_identity = "agenticAppInstance"
9
+ agentic_user = "agenticUser"
@@ -8,9 +8,9 @@ class SemanticAction(AgentsModel):
8
8
  :param id: ID of this action
9
9
  :type id: str
10
10
  :param entities: Entities associated with this action
11
- :type entities: dict[str, ~microsoft_agents.protocols.models.Entity]
11
+ :type entities: dict[str, :class:`microsoft_agents.activity.entity.Entity`]
12
12
  :param state: State of this action. Allowed values: `start`, `continue`, `done`
13
- :type state: str or ~microsoft_agents.protocols.models.SemanticActionStates
13
+ :type state: str or :class:`microsoft_agents.activity.semantic_action_states.SemanticActionStates`
14
14
  """
15
15
 
16
16
  id: NonEmptyString
@@ -9,8 +9,8 @@ class SigninCard(AgentsModel):
9
9
  :param text: Text for signin request
10
10
  :type text: str
11
11
  :param buttons: Action to use to perform signin
12
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
12
+ :type buttons: list[~microsoft_agents.activity.CardAction]
13
13
  """
14
14
 
15
- text: NonEmptyString = None
15
+ text: str = None
16
16
  buttons: list[CardAction] = None
@@ -11,7 +11,7 @@ class SuggestedActions(AgentsModel):
11
11
  the activity
12
12
  :type to: list[str]
13
13
  :param actions: Actions that can be shown to the user
14
- :type actions: list[~microsoft_agents.protocols.models.CardAction]
14
+ :type actions: list[~microsoft_agents.activity.CardAction]
15
15
  """
16
16
 
17
17
  to: list[NonEmptyString]
@@ -12,5 +12,5 @@ class TextHighlight(AgentsModel):
12
12
  :type occurrence: int
13
13
  """
14
14
 
15
- text: NonEmptyString
15
+ text: str
16
16
  occurrence: int
@@ -14,17 +14,17 @@ class ThumbnailCard(AgentsModel):
14
14
  :param text: Text for the card
15
15
  :type text: str
16
16
  :param images: Array of images for the card
17
- :type images: list[~microsoft_agents.protocols.models.CardImage]
17
+ :type images: list[~microsoft_agents.activity.CardImage]
18
18
  :param buttons: Set of actions applicable to the current card
19
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
19
+ :type buttons: list[~microsoft_agents.activity.CardAction]
20
20
  :param tap: This action will be activated when user taps on the card
21
21
  itself
22
- :type tap: ~microsoft_agents.protocols.models.CardAction
22
+ :type tap: ~microsoft_agents.activity.CardAction
23
23
  """
24
24
 
25
25
  title: NonEmptyString = None
26
26
  subtitle: NonEmptyString = None
27
- text: NonEmptyString = None
27
+ text: str = None
28
28
  images: list[CardImage] = None
29
29
  buttons: list[CardAction] = None
30
30
  tap: CardAction = None
@@ -14,9 +14,9 @@ class TokenExchangeState(AgentsModel):
14
14
  :param connection_name: The connection name that was used.
15
15
  :type connection_name: str
16
16
  :param conversation: Gets or sets a reference to the conversation.
17
- :type conversation: ~microsoft_agents.protocols.models.ConversationReference
17
+ :type conversation: ~microsoft_agents.activity.ConversationReference
18
18
  :param relates_to: Gets or sets a reference to a related parent conversation for this token exchange.
19
- :type relates_to: ~microsoft_agents.protocols.models.ConversationReference
19
+ :type relates_to: ~microsoft_agents.activity.ConversationReference
20
20
  :param agent_url: The URL of the agent messaging endpoint.
21
21
  :type agent_url: str
22
22
  :param ms_app_id: The agent's registered application ID.
@@ -1,6 +1,8 @@
1
1
  # Copyright (c) Microsoft Corporation. All rights reserved.
2
2
  # Licensed under the MIT License.
3
3
 
4
+ import jwt
5
+
4
6
  from .agents_model import AgentsModel
5
7
  from ._type_aliases import NonEmptyString
6
8
 
@@ -26,3 +28,19 @@ class TokenResponse(AgentsModel):
26
28
 
27
29
  def __bool__(self):
28
30
  return bool(self.token)
31
+
32
+ def is_exchangeable(self) -> bool:
33
+ """
34
+ Checks if a token is exchangeable (has api:// audience).
35
+
36
+ :param token: The token to check.
37
+ :type token: str
38
+ :return: True if the token is exchangeable, False otherwise.
39
+ """
40
+ try:
41
+ # Decode without verification to check the audience
42
+ payload = jwt.decode(self.token, options={"verify_signature": False})
43
+ aud = payload.get("aud")
44
+ return isinstance(aud, str) and aud.startswith("api://")
45
+ except Exception:
46
+ return False
@@ -7,7 +7,7 @@ class Transcript(AgentsModel):
7
7
 
8
8
  :param activities: A collection of Activities that conforms to the
9
9
  Transcript schema.
10
- :type activities: list[~microsoft_agents.protocols.models.Activity]
10
+ :type activities: list[~microsoft_agents.activity.Activity]
11
11
  """
12
12
 
13
13
  activities: list[Activity] = None
@@ -15,12 +15,12 @@ class VideoCard(AgentsModel):
15
15
  :param text: Text of this card
16
16
  :type text: str
17
17
  :param image: Thumbnail placeholder
18
- :type image: ~microsoft_agents.protocols.models.ThumbnailUrl
18
+ :type image: ~microsoft_agents.activity.ThumbnailUrl
19
19
  :param media: Media URLs for this card. When this field contains more than
20
20
  one URL, each URL is an alternative format of the same content.
21
- :type media: list[~microsoft_agents.protocols.models.MediaUrl]
21
+ :type media: list[~microsoft_agents.activity.MediaUrl]
22
22
  :param buttons: Actions on this card
23
- :type buttons: list[~microsoft_agents.protocols.models.CardAction]
23
+ :type buttons: list[~microsoft_agents.activity.CardAction]
24
24
  :param shareable: This content may be shared with others (default:true)
25
25
  :type shareable: bool
26
26
  :param autoloop: Should the client loop playback at end of content
@@ -42,7 +42,7 @@ class VideoCard(AgentsModel):
42
42
 
43
43
  title: NonEmptyString = None
44
44
  subtitle: NonEmptyString = None
45
- text: NonEmptyString = None
45
+ text: str = None
46
46
  image: ThumbnailUrl = None
47
47
  media: list[MediaUrl] = None
48
48
  buttons: list[CardAction] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: microsoft-agents-activity
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: A protocol library for Microsoft Agents
5
5
  Author: Microsoft Corporation
6
6
  Project-URL: Homepage, https://github.com/microsoft/Agents