Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,35 @@ Both `Agent365.Observability.OtelWrite` (Delegated) and `Agent365.Observability.
agent-hooks interceptor (`ResponsibleAI.AgentHooks` 0.1.0-beta.1) for Defender, and
`A365AgentHooks.CreateProtectionEmitter` (`parallel/strictest`). When no agent identity is resolved, or resolving
it fails, the interceptor follows the fail mode.
- **Microsoft.Agents.A365.Tooling** - Microsoft Purview data loss prevention (DLP) and audit client
- `PurviewDlpClient.EvaluateAsync` sends a text to the Microsoft Graph `processContent` API
(`POST {base}/me/dataSecurityAndGovernance/processContent`) as `uploadText` (content entering the agent) or
`downloadText` (its reply): one conversation entry with the agent, the session (`correlationId`) and its
sequence, scoped to the agent's application (the blueprint id by default). A policy action whose
`restrictionAction` is `block`, or whose `action` is `blockAccess`, blocks; other actions allow and are counted.
Each call sends a new `client-request-id`, which also identifies its content entry and is returned as
`PurviewDlpEvaluationResult.CorrelationId`.
- Tokens come from a `PurviewDlpTokenResolver`: `PurviewDlpTokenResolvers.FromAgenticUser` uses the agent's
connection (`IAgenticTokenProvider.GetAgenticUserTokenAsync`) for the agentic user's delegated Microsoft Graph
token (`Content.Process.User`), evaluates as `/me`, and caches the token per tenant, agent, agentic user and scope
until it expires (refreshed in the background before it does; failures never cached); `FromAccessTokenProvider`
takes a host-supplied token, never cached, for `/me` or for a given user (`/users/{id}`).
- Configured with `ENABLE_A365_PURVIEW_DLP`, `A365_PURVIEW_DLP_GRAPH_BASE_URL` (default
`https://graph.microsoft.com/v1.0`, absolute HTTPS only), `A365_PURVIEW_DLP_AUTHENTICATION_SCOPE`,
`A365_PURVIEW_DLP_FAIL_MODE` (`open` or `closed`), `A365_PURVIEW_DLP_TIMEOUT_MILLISECONDS` (one deadline for token
acquisition and the request), `A365_PURVIEW_DLP_MAX_CONTENT_CHARACTERS` (default 100000) and
`A365_PURVIEW_DLP_RESPONSE_MODE` (`audit` or `enforce`); any other value is rejected. Failures, and processing
errors Graph reports inline, follow the fail mode, recording only the exception type or status, never a response
body. Longer text is cut and sent with `isTruncated`: Purview's block stands and its allow follows the fail mode.
Redirects are not followed, and lone surrogates are sent as U+FFFD.
- **Microsoft.Agents.A365.Tooling.Extensions.AgentHooks** - `A365PurviewInterceptor` (`AddA365Purview`), an
agent-hooks interceptor for Purview DLP: the user's message at `input` is evaluated as `uploadText` and a block
denies it (`purview:block`); the reply at `output` is evaluated as `downloadText`, for audit in the background by
default or waiting for the verdict with `A365_PURVIEW_DLP_RESPONSE_MODE=enforce`. Structured content is read only up
to `A365_PURVIEW_DLP_MAX_CONTENT_CHARACTERS`. Missing verdicts follow the fail mode (`purview:unverified` or
`runtime_error:purview_unverified`). `A365AgentHooks.CreateProtectionEmitter` takes optional `PurviewDlpOptions`,
so Defender and Purview compose on one emitter whose interceptor timeout exceeds the longer of their timeouts
(Purview's counts only when Purview DLP is enabled).
- **Microsoft.Agents.A365.Tooling** - V1/V2 per-audience token support for MCP servers
- `MCPServerConfig` extended with `audience`, `scope`, `publisher`, and `Headers` fields
- `IMcpTokenProvider` interface for pluggable OAuth token acquisition
Expand Down
10 changes: 7 additions & 3 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ src/
│ ├── SemanticKernel/ # SK tool registration
│ ├── AgentFramework/ # AF tool registration
│ ├── AzureAIFoundry/ # Azure AI Foundry integration
│ └── AgentHooks/ # agent-hooks Defender interceptor (preview)
│ └── AgentHooks/ # agent-hooks Defender and Purview interceptors (preview)
└── Tests/ # Test projects
docs/
└── design.md # This file
Expand All @@ -53,11 +53,11 @@ docs/
| `Microsoft.Agents.A365.Observability.Extensions.SemanticKernel` | Semantic Kernel telemetry integration | [design.md](../src/Observability/Extensions/SemanticKernel/docs/design.md) |
| `Microsoft.Agents.A365.Observability.Extensions.OpenAI` | OpenAI SDK telemetry integration | [design.md](../src/Observability/Extensions/OpenAI/docs/design.md) |
| `Microsoft.Agents.A365.Notifications` | Microsoft 365 notification handling | [design.md](../src/Notification/Microsoft.Agents.A365.Notifications/docs/design.md) |
| `Microsoft.Agents.A365.Tooling` | MCP server discovery and configuration; Microsoft Defender for AI real-time protection client | [design.md](../src/Tooling/Core/docs/design.md) |
| `Microsoft.Agents.A365.Tooling` | MCP server discovery and configuration; Microsoft Defender for AI real-time protection and Microsoft Purview DLP clients | [design.md](../src/Tooling/Core/docs/design.md) |
| `Microsoft.Agents.A365.Tooling.Extensions.SemanticKernel` | Semantic Kernel MCP tool registration | [design.md](../src/Tooling/Extensions/SemanticKernel/docs/design.md) |
| `Microsoft.Agents.A365.Tooling.Extensions.AgentFramework` | Agent Framework MCP tool registration | [design.md](../src/Tooling/Extensions/AgentFramework/docs/design.md) |
| `Microsoft.Agents.A365.Tooling.Extensions.AzureAIFoundry` | Azure AI Foundry MCP tool registration | [design.md](../src/Tooling/Extensions/AzureAIFoundry/docs/design.md) |
| `Microsoft.Agents.A365.Tooling.Extensions.AgentHooks` | Microsoft Defender for AI interceptor for agent-hooks hosts (preview) | [README.md](../src/Tooling/Extensions/AgentHooks/README.md) |
| `Microsoft.Agents.A365.Tooling.Extensions.AgentHooks` | Microsoft Defender for AI and Microsoft Purview DLP interceptors for agent-hooks hosts (preview) | [README.md](../src/Tooling/Extensions/AgentHooks/README.md) |

## Core Package Documentation

Expand Down Expand Up @@ -340,6 +340,10 @@ else if (EnvironmentUtils.IsDevelopmentEnvironment())
| `ENABLE_A365_DEFENDER_RTP` | Enable Microsoft Defender for AI real-time protection (`DefenderRtpOptions.FromEnvironment`); a value that is not true or false is rejected | `false` |
| `A365_DEFENDER_RTP_ENDPOINT` | Defender prevention endpoint, `https://<host>/v1/protection/evaluate` | - |
| `A365_DEFENDER_RTP_FAIL_MODE` | `open` or `closed` (blocks when Defender returns no verdict); any other value is rejected | open |
| `ENABLE_A365_PURVIEW_DLP` | Enable Microsoft Purview DLP and audit (`PurviewDlpOptions.FromEnvironment`); a value that is not true or false is rejected | `false` |
| `A365_PURVIEW_DLP_GRAPH_BASE_URL` | Microsoft Graph base URL for `processContent`, an absolute HTTPS URL | `https://graph.microsoft.com/v1.0` |
| `A365_PURVIEW_DLP_FAIL_MODE` | `open` or `closed` (blocks when Purview returns no verdict); any other value is rejected | open |
| `A365_PURVIEW_DLP_RESPONSE_MODE` | `audit` (replies are sent to Purview without waiting) or `enforce` (replies wait for the verdict); any other value is rejected | audit |

## Testing

Expand Down
Loading
Loading