pub fn handle_output_tool(
args: &Value,
spec: Option<&OutputSpec>,
validators: Option<&OutputValidators>,
stage: &str,
now: i64,
workdir: Option<&Path>,
window: &mut ContextWindow,
) -> (String, Option<FinalOutput>)Expand description
Apply a submit_output call.
Returns the result text the model sees, and the recorded output when the
submission was accepted. None means nothing was recorded and the model has
been told why, so the caller must leave any previously submitted output in
place: a rejected correction should not erase a good answer.
spec is the shape resolved for this stage (agent, stage, and caller
combined). None means no level asked for a particular shape, which is not
an error - the stage still wanted an answer, just not a specific form.