Support direct Guardian review of recorded MCP calls (#59735)

## What changed

Extend `guardian_review` to assess recorded MCP tool calls using the current tool catalog, bindings, and approval policy without executing the call or remembering an approval. Return no assessment when policy or a remembered approval skips review, and reject tools blocked by app configuration.

## Testing

Add a scenario test that compares direct and live MCP review inputs, verifies that neither dispatches the tool, and checks that the current app approval policy can skip review.

GitOrigin-RevId: 05746dd0804a0f96d7946468701d5222171ff64f
This commit is contained in:
swastik-oai
2026-11-05 20:55:46 +00:00
committed by copyberry
parent c8a1109fa7
commit 3934ae926a
15 changed files with 588 additions and 111 deletions
@@ -1775,7 +1775,7 @@ pub struct ThreadGuardianReviewParams {
#[ts(export_to = "v2/")]
pub struct ThreadGuardianReviewResponse {
pub call_id: String,
/// Null when exec policy skips approval.
/// Null when current policy or a remembered approval skips review.
pub assessment: Option<ThreadGuardianAssessment>,
}