definition property

  1. @override
Tool get definition
override

Implementation

@override
Tool get definition => Tool(
      name: 'breakpoint',
      description:
          'Pause the app the moment it logs a line matching a regex (print, debugPrint, developer.log, stderr), screenshot that screen, and resume on command. '
          'op: set (arm pattern), wait (block until the next hit, timeoutMs default 60000, max 120000, progress every 15 s), status (current hit, no wait), resume (continue the app and consume the hit), list, clear (id, or all). '
          'While paused the app cannot draw or answer get_scene, so take what you need from the hit, then resume. glint resumes a paused app when it detaches. '
          'errorKind: invalidArgument (bad regex or op), targetNeverReady (wait timed out), flutterModeRequired (device mode has no logs), backendToolError (the VM refused pause or resume).',
      inputSchema: ObjectSchema(
        properties: {
          'op': Schema.string(description: 'set | wait | status | resume | list | clear. Default status.'),
          'pattern': Schema.string(
              description: 'op=set: regex matched against each log line, e.g. "\\[EventTracker\\] vip_".'),
          'stream': Schema.string(description: 'op=set: only lines from stdout, stderr or logging. Default all.'),
          'pause': Schema.bool(description: 'op=set: pause the app on a hit. Default true; false only records hits.'),
          'once': Schema.bool(description: 'op=set: remove the breakpoint after its first hit. Default false.'),
          'caseSensitive': Schema.bool(description: 'op=set: default true.'),
          'id': Schema.string(description: 'op=clear: breakpoint id from set or list. Omit to clear all.'),
          'timeoutMs': Schema.int(description: 'op=wait: 100-120000. Default 60000.'),
          'force': Schema.bool(
              description:
                  'op=resume: also resume a pause glint did not cause (a debugger, --start-paused). Only when the user asked.'),
        },
      ),
    );