editorAnswerSchema top-level constant
The shape of every editor tool's structuredContent, as the
outputSchema each tool declares: whether the call did what it was asked
(did, false for a refusal), its sentence, the selection after it in the
words level.list uses, and whether a picture came with it.
The same four keys for every tool, so an agent reads one shape whatever it called, and a refusal is told apart from a success without parsing the sentence.
Implementation
const Map<String, Object?> editorAnswerSchema = <String, Object?>{
'type': 'object',
'properties': <String, Object?>{
'did': <String, Object?>{'type': 'boolean'},
'says': <String, Object?>{'type': 'string'},
'selection': <String, Object?>{'type': 'string'},
'hasPicture': <String, Object?>{'type': 'boolean'},
},
'required': <String>['did', 'says', 'selection', 'hasPicture'],
};