Implementation
@override
Tool get definition => Tool(
name: 'session',
description: 'Session status and named runs. Ops: status (default: attached apps, '
'with live:false and a reason for a device that is gone, active run, call counts), '
'open (start a named run), close, note (annotate active), list (history), '
'export (action-log slice for one run), detach (drop the active app, or `app:`, '
'or `all:true`, and free its device; `attach device:"<id>"` brings it back).',
inputSchema: ObjectSchema(
properties: {
'op': Schema.string(
description: 'status (default) | open | close | note | list | export | detach',
),
'app': Schema.string(
description: 'op=detach: the app to detach (device id, name, package or simulator). '
'Default: the active one.',
),
'all': Schema.bool(
description: 'op=detach: detach every attached app.',
),
'name': Schema.string(
description: 'Session name (required for op=open).',
),
'text': Schema.string(
description: 'Annotation text (required for op=note).',
),
'sessionId': Schema.string(
description: 'Target session (optional for export; defaults to active).',
),
},
),
);