pub async fn prepare(
runtime: &Runtime,
proposal: &Proposal,
history: &[Arc<Value>],
) -> Result<Runtime, PrepareError>Expand description
Atomic session-only model/effort preparation. history is the EXISTING
history: this function adds the proposed user message for full preflight.
The caller commits returned Runtime plus its own session mirrors only on
success, after rechecking cancellation/deadline/handler/session identity.
No config writes, credential refresh, provider calls, or history mutation.