Skip to content

Python: .NET: Harden argument scoping for standing approval rules in ToolApprovalAgent #6486

@rogerbarreto

Description

@rogerbarreto

Summary

Review and harden how ToolApprovalAgent records and matches standing approval rules in Microsoft.Agents.AI (dotnet/src/Microsoft.Agents.AI/Harness/ToolApproval/). The goal is to ensure an argument-scoped standing approval stays scoped exactly as the user intended for all argument shapes, and that the .NET behavior matches the existing Python implementation in agent_framework/_harness/_tool_approval.py.

Scope

  • ToolApprovalAgent.cs, ToolApprovalRule.cs, ToolApprovalRequestContentExtensions.cs
  • Align the argument-normalization/matching contract with the Python harness, whose ToolApprovalRule semantics already document the intended behavior.

Acceptance criteria

  • Argument-scoped standing approvals match only the intended calls across all argument shapes.
  • Behavior is consistent between the .NET and Python tool-approval harnesses.
  • Regression tests cover the standing-rule argument-matching paths.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions