Files
agent-framework/dotnet/src/Microsoft.Agents.AI.Purview/IScopedContentProcessor.cs
T
westeyandGitHub a3a9147e61 .NET: [BREAKING] Rename AgentThread to AgentSession (#3430)
* Rename AgentThread to AgentSession

* Add more renames

* Update readme files

* Revert nullable variable change and further fixes.

* Revert change in header name

* Fix some comments and tests

* Update changelog.

* Address PR feedback.

* Fixing code review comments.

* Fix new errors after merging latest code.
2026-01-26 16:30:25 +00:00

29 lines
1.5 KiB
C#

// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Agents.AI.Purview.Models.Common;
using Microsoft.Extensions.AI;
namespace Microsoft.Agents.AI.Purview;
/// <summary>
/// Orchestrates the processing of scoped content by combining protection scope, process content, and content activities operations.
/// </summary>
internal interface IScopedContentProcessor
{
/// <summary>
/// Process a list of messages.
/// The list of messages should be a prompt or response.
/// </summary>
/// <param name="messages">A list of <see cref="ChatMessage"/> objects sent to the agent or received from the agent..</param>
/// <param name="sessionId">The session where the messages were sent.</param>
/// <param name="activity">An activity to indicate prompt or response.</param>
/// <param name="purviewSettings">Purview settings containing tenant id, app name, etc.</param>
/// <param name="userId">The user who sent the prompt or is receiving the response.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>A bool indicating if the request should be blocked and the user id of the user who made the request.</returns>
Task<(bool shouldBlock, string? userId)> ProcessMessagesAsync(IEnumerable<ChatMessage> messages, string? sessionId, Activity activity, PurviewSettings purviewSettings, string? userId, CancellationToken cancellationToken);
}