describe method
The commands, as {name, description, inputSchema} (a json schema).
Implementation
List<Map<String, Object?>> describe() => [
{
'name': _menuCommand,
'description':
'The state of the dev menu: path (the menu names from the top '
'menu), items (key to type, name, menu: true for a sub menu), '
'canBack, status (ready, running, input when a prompt waits for '
'an answer, error when the last item failed), prompt (the text '
'of the pending prompt) and output (the lines written, the last '
'`output` ones or the ones from the `since` cursor); next is the '
'cursor of the next line, skipped the lines no longer kept.',
'inputSchema': {
'type': 'object',
'properties': {
'output': {
'type': 'integer',
'description':
'The number of last output lines (default '
'$_defaultOutputCount).',
},
'since': {
'type': 'integer',
'description':
'Returns the output from this cursor (next of a previous '
'result) instead.',
},
},
},
},
{
'name': _lineCommand,
'description':
'Types a line in the dev menu as a user would: an item key (its '
'number or shortcut) runs the item or enters its sub menu, - goes '
'back to the parent menu, ? only returns the state, the answer of '
'a pending prompt, any other line goes to the menu command '
'handler. Waits until the run is done, a prompt waits for an '
'answer (status input: answer with menu_line) or timeout seconds '
'(timeout: true, status running: poll with menu since). Returns '
'the output written meanwhile (writes, errors with their stack '
'trace, prompts, prints of the item) and the state as menu does.',
'inputSchema': {
'type': 'object',
'properties': {
'line': {'type': 'string', 'description': 'The line typed.'},
'timeout': {
'type': 'number',
'description':
'Seconds to wait for the run (default '
'${_defaultTimeout.inSeconds}).',
},
},
'required': ['line'],
},
},
];