Expand description
PurviewAgentMiddleware and PurviewChatMiddleware: enforce Purview
policy on both the outgoing prompt and the model/agent response. Mirrors
Python’s PurviewPolicyMiddleware (agent-level) and
PurviewChatPolicyMiddleware (chat-client-level) — see the crate docs
for which hook points these attach to and why both directions evaluate
with Activity::UploadText.
Structs§
- Purview
Agent Middleware - SupportsAgentRun middleware enforcing Purview policy on both the outgoing prompt and
the agent’s response. Mirrors Python’s
PurviewPolicyMiddleware. - Purview
Chat Middleware - Chat-client middleware variant of
PurviewAgentMiddleware, for attaching Purview enforcement directly to aChatClientrather than an agent’s middleware pipeline. Mirrors Python’sPurviewChatPolicyMiddleware; the policy logic is identical (see the internalPurviewPolicyCore) — only the hook point (and result/message types) differ.