Skip to content

Activity.ChannelId supports subchannels. #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

tracyboehrer
Copy link
Member

@tracyboehrer tracyboehrer commented Apr 30, 2025

This is for discussion

Fixes #160

Notes/Discussion

  • This uses a ChannelId class for Activity.ChannelId
    • This is created by the AP Spec channelId + ProductInfo.Id.
    • When serialized, it will conform to AP spec, with expected ProductInfo Entity if needed.
    • ChannelId.ToString() produces: {channelId}:{productInfo}
    • Passing ChannelId.Channel to ABS Rest API's
  • TODO
    • Most likely need to supply ABS with the root channelId value (not the combined value).
    • ConversationReference has a string ChannelId property. What is the value? This needs some research.
    • Serialization tests

Alternatives

  • A class isn't the only solution, just more OO
  • Activity.ChannelId could be the combined value, and we add in-memory Activity.Channel and Activity.SubChannel properties
  • Activity.ChannelId is the combined value, and we have helpers to extract the components if needed
  • Key behavior is that Activity arrives with expected channelId value and a ProductInfo Entity, which produces an in-memory Activity.ChannelId to satisfy AP expectations (a unique value). When serialized, this would be reversed.

Tracy Boehrer added 2 commits March 27, 2025 14:26
# Conflicts:
#	src/libraries/Core/Microsoft.Agents.Core/Models/EntityExtension.cs
#	src/libraries/Core/Microsoft.Agents.Core/Models/EntityTypes.cs
#	src/libraries/Core/Microsoft.Agents.Core/Serialization/Converters/EntityConverter.cs
#	src/libraries/Storage/Microsoft.Agents.Storage.Transcript/MemoryTranscriptStore.cs
#	src/tests/Microsoft.Agents.Extensions.Teams.Tests/Connector/TeamsInfoTests.cs
@tracyboehrer tracyboehrer added the enhancement New feature or request label Apr 30, 2025
@github-actions github-actions bot added ML: Samples Tags changes to samples ML: Core Tags changes to core libraries ML: Tests Tags changes to tests labels Apr 30, 2025
Tracy Boehrer added 4 commits April 30, 2025 12:22
# Conflicts:
#	src/libraries/Builder/Microsoft.Agents.Builder/UserAuth/TokenService/OAuthFlow.cs
#	src/libraries/Builder/Microsoft.Agents.Builder/UserAuth/TokenService/UserTokenClientWrapper.cs
#	src/libraries/Core/Microsoft.Agents.Core/Models/EntityTypes.cs
#	src/libraries/Core/Microsoft.Agents.Core/Serialization/Converters/ConnectorConverter.cs
#	src/libraries/Core/Microsoft.Agents.Core/Serialization/Converters/EntityConverter.cs
#	src/tests/Microsoft.Agents.Builder.Dialogs.Tests/OAuthPromptTests.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ML: Core Tags changes to core libraries ML: Samples Tags changes to samples ML: Tests Tags changes to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce ProductInfo Node to entities to identify the internal channel / product of a channelID
1 participant