Implementation
@override
Tool get definition => Tool(
name: 'type',
description:
'Type printable ASCII into the focused field. focus: <glintId> (a `>` node) taps it first; clear: true empties it first. errorKind: unresolvedTarget (focus id not found), targetNeverReady (focus field never hittable). Device mode: types into whatever has OS focus, with no change signal.',
inputSchema: ObjectSchema(
properties: {
'text': Schema.string(description: 'Printable-ASCII text to type.'),
'keyDelayMs': Schema.int(
description: 'Gap between keys, 0-1000 ms. Default 18. Raise it '
'(e.g. 80) when a formatted field (phone, card, amount) '
'drops characters.',
),
'clear': Schema.bool(
description: 'Empty the focused field before typing (select-all + '
'backspace, then a per-char backspace fallback). Default false.',
),
'focus': Schema.string(
description: 'Optional glintId of an input to tap before typing.',
),
'awaitReady': Schema.bool(
description: 'With focus: wait until that field is hittable. Default false.',
),
'readyTimeoutMs': Schema.int(
description: 'Ceiling for awaitReady. Default 5000.',
),
'returnScene': Schema.bool(
description: 'Settle, then report changed and changeCategory. Default true.',
),
'detail': Schema.bool(
description: 'Include geometry (painted, hittable, logicalCenter). Default false.',
),
'fetchScene': Schema.bool(
description: 'Also return the new scene text as postScene. Default false.',
),
},
required: ['text'],
),
);