Centralize synchronous Guardian context preparation (#57494)

## What changed

- Retain captured root conversation sources until synchronous preparation applies request limits. Keep asynchronous snapshots limited to the bounded messages.
- Move approval-reason truncation and tool-description escaping and truncation from composition into preparation.
- Extract synchronous image preparation and admission into `guardian-context`, preserving the prompt token cap and model context-window checks.

GitOrigin-RevId: d3a864c77d8f16bd3e77df436d80c4d2738c43cc
This commit is contained in:
ioanbudea-OAI
2026-10-27 15:53:50 +00:00
committed by copyberry
parent 6b56106ed9
commit 603a7baff0
18 changed files with 307 additions and 162 deletions
@@ -129,6 +129,7 @@ impl TranscriptConfig {
history: &history,
transcript: &profile.transcript,
root_conversation,
root_conversation_candidates: None,
trusted_user_answers: &trusted_user_answers,
planned_action,
permissions,