glint library
Glint — the everything-export. Consumers who only need one module
should import package:glint_mcp/interaction.dart,
package:glint_mcp/perception.dart, package:glint_mcp/semantic.dart, or
package:glint_mcp/mcp.dart directly.
Classes
- Action
- ActionLog
- Bounded ring of LogEntrys. Oldest entries drop off when the capacity is reached. Thread of execution is single per session, so no locking.
- ActionResult
- AdbBackend
-
Android emulator / device backend over
adb shell input. - AdbRecording
-
Records an Android device via
adb shell screenrecord, pulled to the local path on stop. - AndroidDevice
- AndroidNativeReader
-
Android native surfaces: the window manager says whose window has focus, and
uiautomator dumpreads it. - AndroidServer
-
glint's resident
app_processserver on one Android device, reached over an adb-forwarded local socket. - AppAgent
- glint's helper inside the app, installed once per isolate by one eval: input, settle and lifecycle each become one service-extension call with nothing to compile.
- AppAlert
-
One thing an app reported: name is the event's
alertfield, group the AlertKind a watch selects it by. - AppBarClassifier
- AppDeviceLink
- The device an app runs on, recovered from a VM service port, plus iOS bundle identity from Info.plist.
- AppLauncher
-
Boots devices and starts/stops Flutter apps so
attachcan recover from cold. - AppLogBuffer
- Bounded ring of app-side log events. Subscribes to the VM service's Stderr + Logging streams on subscribe and cancels them on unsubscribe. Survives glint session re-attach: the buffer itself outlives any one subscription.
- AppLogEntry
- AppLogScan
- What AppLogBuffer.scan found: the entries to show and the counts behind them.
- AppLogsTool
-
Query the app-side log buffer — FlutterError exceptions, developer.log
messages, anything the running Flutter app wrote to stderr or logging.
Distinct from the
logstool which records glint's own tool calls. - AppProcessProbe
- Finds out whether an app's process still runs and why it ended, from the host's side of the device.
- AppProcessVerdict
- What is known about an app's process after its VM connection dropped.
- AppSession
- Everything one attachment owns: the VM runtime, the device backend, the perception pipeline, app logs, reconnect and lifecycle watchers. A GlintSession pools several of these and delegates to the active one.
- ArmingFailed
- ArmingOutcome
- Shared armed-intent gate for targeted action tools. Returns one of three outcomes; callers branch sealed-style.
- ArmingReady
- ArmingSkipped
- AttachHistory
- Persistent, most-recent-first AttachRecord store; all disk access is best-effort.
- AttachRecord
-
A remembered app↔device↔project attach, persisted locally so
attachcan relaunch from cold. - AttachTool
-
attach— connect to a Flutter app's VM and bind the device it's actually running on. Every argument is optional: glint discovers the app, derives the platform from the VM, correlates the app to its real simulator (so it picks the right one even with several booted), and reports device + app identity, capabilities, and screen context in one reply. - AuditEntry
- AuditLog
-
Tamper-evident telemetry log at
<dataDir>/telemetry-audit.log: one<ts>|<prev_hash>|<payload_b64>|<this_hash>line per payload, each hash covering the line before it, likegit log. - AuditVerifyResult
- Avds
- The Android virtual devices on this host: which exist, which one runs where, and booting one from glint's own process.
- BackendCapabilities
- BatchTool
-
batch— run an ordered list of gesture steps server-side in one call. Each step settles like a normal call; the batch stops at the first error or (by default) the first step that changed nothing, and returns one final scene. Cuts a known N-step flow from N round trips to one. - BootedDevice
- A simulator / emulator that is currently booted and drivable.
- BreakpointHit
- One matched line: what matched, whether the app was paused for it, and the screen at that moment.
- BreakpointTool
-
breakpointpauses the app when one of its log lines matches a regex, screenshots that moment, and resumes on command. - BridgeLocation
- BusyResult
- The app's VM stopped answering while the gate polled and had not recovered by the ceiling.
- ButtonClassifier
- ButtonFactsEnricher
-
Reads what each button and list tile would do: a tile with a tap handler becomes tappable, a button with none reads
[disabled], and an icon-only button takes its tooltip as its label. Capped at maxNodes. - CallMark
- Where a call's counters stood at one moment; the difference between two marks is what happened in between.
- CallProgress
- What one tool call is doing right now: feeds the heartbeat, names the stuck phase on a timeout, and owns the subprocesses to kill when the call is abandoned. Found from any code on the call via current.
- Capture
- One background screenshot and why it was taken.
- CaptureRing
- The last max screenshots of one device, newest first. Evicting an entry deletes its file; clear deletes them all. Never throws.
- ClassifierRegistry
- ClearField
- Select all in the focused field, then backspace — the platform-native way to empty it.
- ConfigTool
-
Get / set runtime defaults — poll cadences, ceilings, scroll size.
Ops:
get(full snapshot) orset(one key/value). - ContainerClassifier
- CoordinateResolver
- Resolves nodes to live geometry. Lazy — re-queries every call.
- CoordinateTarget
- Physical-pixel point on the device. Escape hatch when the target isn't in the render tree (custom canvas, native overlay) — also used internally by direction-based scroll tools.
- CreationLocation
- DeviceAbilities
- What one device cannot do, declared once so attach lists it and every tool refuses it with the same words.
- DeviceClaim
- Another glint process driving a device.
- DeviceClaims
-
One claim file per device under
~/.glint/claims, so parallel agents never share a device by accident. - DeviceDiscovery
-
Finds running Flutter apps + booted devices so
attachcan auto-fill omitted args. Pure host inspection:psfor VM URIs,xcrun simctlfor iOS sims,adb devicesfor Android. - DeviceHid
- glint's resident Device Hub helper for one physical iPhone: real touch, keyboard and button input over the CoreDevice tunnel.
- DeviceTarget
- One device glint can drive; hides the AdbBackend / IosSimBackend choice and the per-platform coordinate math.
- DeviceTool
-
device— inspect or configure an iOS simulator. Defaults to the attached device; passudidto target another booted sim. ops: status (default) | appearance | openurl | screenshot | privacy. Heavier control (location, biometrics, push, status-bar) is roadmapped. - DiscoveryResult
-
Running Flutter VM URIs + booted devices. Uncorrelated by design — a 127.0.0.1 URI carries no device identity;
attachpairs them later. - DoubleTap
- DragTool
- Mechanically a swipe with a longer default hold so listeners recognise it as drag rather than fling.
- EmulatorTouches
-
Real touches through an Android emulator's own virtual touchscreen, which Android's
show_touchesdraws everywhere: in the app, over permission dialogs and the shade, and in screen recordings. - ExploreTool
- Reads the persistent screen graph glint builds from every action and scene read: where the app has been, what was tried, what is left.
- FailureEntry
- FlutterErrorEntry
- One distinct error the app reported, with how often and where.
- FlutterErrorFeed
-
The distinct errors an app reports, read without any app code: Flutter's structured error events when
flutter runenabled them, else the error dumps in the app's console output. - FlutterInput
- Input delivered inside the app by glint's agent: pointer events into GestureBinding, edits into the focused EditableText.
- FlutterInputBackend
- Delivers input inside the Flutter app when it can (exact, fast), and hands everything else to native: system surfaces, the keyboard, native views, buttons.
- FlutterRuntime
- FoldedRun
- One folded run as the renderer reports it: enough for the trailer and for the eager-list check (which resolves lastItemId).
- FoldRun
- A run of consecutive siblings that share a structuralSignature.
- GeometryExpr
- GetSceneTool
-
get_scene— the semantic scene for the current screen. Text by default, JSON on request. - GlintConfig
-
Runtime-tunable defaults. Tools that have a baked-in constant
(poll cadences, ceilings, ring capacities) consult this instead,
so the agent can adjust them via the
configMCP tool without restarting glint. - GlintMcpServer
- The glint MCP server. Registers every tool in kDefaultGlintTools against a single GlintSession held for the connection's lifetime.
- GlintSession
- Per-connection state: a pool of attached apps (one per device) plus the active one every tool reads through. Getters delegate to the active AppSession; accessing them with nothing attached throws SessionNotAttachedError. actionLog is always available — survives detach so cross-attach history stays queryable.
- GlintTool
- One MCP tool. Subclasses provide a definition + handle; invoke wraps both with the envelope conversion + uniform error catch.
- HardwareButtonTool
- iOS Xcode 26: lock + unlock + home + back (left-edge swipe) wired. Others (volumeUp/Down, appSwitcher) raise UnsupportedBackendAction. See source-of-truth §13.
- HotReloadTool
-
hot_reloadreloads or restarts the attached app through the services its ownflutter runregistered, so no other project's app is ever touched. - HttpFailureMonitor
- Reads one app's dart:io HTTP profile on a timer and raises an AppAlert for each request that failed (4xx, 5xx or a transport error); runs only while something holds it.
- IconClassifier
- IconEnricher
-
Reads
IconData.codePointfor each SemanticIcon and resolves it to a Material icon name. Capped at maxIcons to bound eval cost. - ImageClassifier
- ImageEnricher
- Names what each image shows (file, asset or URL from its provider) and whether it painted, in one eval. Capped at maxImages; containers that might paint a decoration image ride the same eval, capped at maxDecorationCandidates.
- InertEnricher
- Marks controls a person cannot use right now: faded to opacity 0 (Inert.hidden) or under an active IgnorePointer / AbsorbPointer (Inert.ignoresTouches); they lose their tap and type markers. Capped at maxNodes.
- InputClassifier
- InputEnricher
-
Reads
hint(InputDecoration.labelText) andcurrentValue(live EditableText controller text) for each SemanticInput. Capped at maxInputs. - InspectorClient
- Parses inspector trees into typed SceneNodes, reaching the app through FlutterRuntime only — no direct RPC calls.
- InstalledAppLauncher
- Opens an already-installed debug build and finds its Dart VM service, with no rebuild and no flutter_tools.
- InteractionBackend
- Platform-native input layer. Speaks physical pixels; the Interactor resolves symbolic targets before calling here.
- Interactor
- Resolves symbolic targets, gates hittable, dispatches to the backend, and wraps everything in an ActionResult.
- IosDevice
- A paired physical iPhone: input inside the Flutter app where it can, real touches through Device Hub for everything else, screenshots through devicectl.
- IosDeviceBackend
-
A paired physical iPhone driven like a hand would: real touches, keys and buttons through Xcode's Device Hub service, screenshots through
devicectl. - IosSimBackend
-
iOS Simulator backend over the
glint-iossimSwift helper (native/ios_sim_bridge/), which speaks LOGICAL device points — so we undo the physical→logical conversion here. - IosSimulator
- IosToolchain
- What glint knows about the iOS toolchain at attach: Xcode, the bridge, and whether bridge actions may run.
- JsonSceneRenderer
-
JSON form of a scene with the same folding rule as the text renderer: a
run's tail becomes one
{"folded": {count, base, items}}entry. - KeyTool
- The editing keys and a change signal follow a press, so an agent can clear a field, submit a form, or move the caret without a printable character.
- KillAppTool
-
kill_app— stop a running app glint started (or the attached one) and detach. - LinkEnricher
-
Marks a SemanticText tappable when its RichText carries a
GestureRecognizeron a span — inline links ("Sign in", Terms & Conditions, "Resend") that render as plain text but navigate on tap. Without this they show as static-and an agent can't discover them. Capped at maxTexts (one eval each); runs at full detail only. - ListClassifier
- LocalNetworkPromptWatcher
- Watches a phone while a debug build launches and answers the local network prompt it raises, without which the VM service cannot be found.
- LocationTool
-
locationsets where the device thinks it is, or drives it along a route in the background while the agent keeps using the app. - LogBreakpoint
- A regex armed on the app's log lines.
- LogBreakpoints
- Log breakpoints for one app: matches each new log line, pauses the app on a hit, and queues hits for the agent.
- LogEntry
-
Closed set of log entry kinds. Sealed so the
logstool can branch exhaustively when rendering. - LogRenderer
-
Natural-language view of an ActionLog's entries. Renders each
event on one line:
[t+Δ] tool(args) → summary. Δ is relative to the first entry in the slice. - LogsTool
- Query the action log. Every tool call is recorded automatically (success or failure) with timestamp + args + summary + elapsedMs.
- LongPress
- LongPressTool
- MapClassifier
-
A Google map: a platform view whose widget subtree says nothing;
MapEnricherreads what it shows. - MapEnricher
- Reads what each Google map shows: markers, routes and areas from the widget, and the live camera and marker screen points from its controller.
- MapTool
-
mapreads a Google map and moves it the way a finger does: tap a marker, pan, zoom. - MediaTool
-
mediaputs photos, videos and audio in the device gallery, lists and pulls what the app wrote, and inspects media files (a glint test card decodes to rotation, mirror, scale, frames and audio sync). - NativeCrash
- One native crash of the app, summarized: what killed it and the top of the crashing thread.
- NativeReader
- Reads whatever native UI covers the app.
- NativeSceneReader
-
Reads native surface content via glint-iossim
ax-snapshot. Returns a parsed scene when the Simulator exposes an AX tree (needs macOS a11y permission), else a sentinel scene flagging an unreadable native surface. - NativeSurface
- A native surface read as data: its kind, its question, the choices it offers, and the other text on it.
- Reads the topmost ModalRoute's name + isFirst flag, or under a Router (go_router and other declarative routers) the router's location. Probes the innermost page first, then the outer one, so a nested route's null name does not win.
- NeverReadyResult
- NotFoundResult
- OcrNativeReader
- Reads a native surface over the app from a screenshot with text recognition, each line becoming a node at its place; for devices whose accessibility tree glint cannot reach.
- OpaqueWidgetEnricher
- Reads inside widgets whose build is outside the app (a design-system package): one that takes taps becomes a button labelled by its painted text, one that only paints text becomes text. Capped at maxNodes.
- OverflowInfo
-
How far a render object overflowed, read from the framework's
A RenderFlex overflowed by 42 pixels on the bottom.message. - OverlayEnricher
- Classifies overlay dialog content from Scene.overlayRoots into SemanticScene.overlayLayers. Must run before the renderer.
- PageClassifier
-
Material's
Scaffoldis the canonical page root; the compactor later hoists the SemanticPage up through ancestor containers to the tree root. - PagedViewportEnricher
- Marks each page under a PageView / TabBarView with SemanticPage.onViewport, one geometry read per page, capped at maxPages.
- PendingWork
-
Work the app has queued as the action landed that may still change the screen: one-shot timers (
Future.delayedincluded) and HTTP requests in flight. - PlainTextSceneRenderer
-
Compact indented form for agent prompts. Markers:
*tappable,>typeable,<>scrollable,-static. Runs of foldThreshold+ siblings with the same structure render as the first item in full plus one digest line naming the rest, so a 40-row list costs a few lines, not a few hundred. - PressHardwareButton
- PressKey
- PruneItem
- One file or directory the prune removes, or would.
- PruneReport
- What a prune removed, or would remove on a dry run.
- ReadinessGate
-
§7.2 readiness primitive. Polls fresh scenes until
glintIdboth exists in the tree AND passes a hit test at its centre, or the ceiling is reached. - ReadinessResult
- Closed set of outcomes the gate can return.
- ReadyResult
- RecordTool
- Records the display while a short step sequence runs and returns the distinct frames, so an agent can see a screen that only flashes mid-transition.
- RenderResult
- A rendered scene plus what the renderer left out, so a caller can write an honest trailer without re-parsing the text.
- ReportIssueTool
-
Files a bug / UX / feature note into glint's public GitHub repo via the local
ghCLI, or a pre-filled deep link; everything is path- and secret-redacted first. - ResolvedCoord
-
One node's live geometry. Global coords in logical pixels.
paintedandhittableare independent (see §3, §9). - ResolveTool
- Read-only geometry lookup. Resolves a glintId against the live render tree and returns its logical-point center, bounds, painted, hittable flags — without side effects. Use this when you need to know where a node is without firing a gesture against it.
- RouteFrame
- RunnerNativeReader
- iOS native UI read through glint's XCUITest runner: system alerts, and surfaces the app presents in-process (photo picker, edit menu) that leave the Flutter lifecycle resumed.
- RunningApp
- One running Flutter app, correlated to its device and identity as far as the host can tell without connecting to the VM.
- Scene
- One inspector group + its SceneNode tree. Dispose releases the VM-side id table.
- SceneCompactor
- Strips framework noise: expandChild spills nameless pass-throughs into the parent's child list; hoistPage surfaces a SemanticPage past app-shell wrappers.
- SceneNode
- One node in the perception tree, parsed from inspector DiagnosticsNode JSON.
- SceneReader
- Reads the inspector tree, assigns stable ids, returns a Scene the caller disposes when done.
- SceneRenderer
- ScreenRecording
- A running display recording; stop finalises it and returns the local video path.
- ScreenshotResult
- Outcome of InteractionBackend.screenshot: saved path + pixel size, or error on failure.
- ScrollToFindTool
-
Loops
get_scene+scrolluntil a target (glintId or text content) is on screen (and hittable for tap:true), or the ceiling is reached. Stops early if already visible. - ScrollTool
- SegmentedClassifier
- A segmented control: Flutter builds each segment's button itself, so only the app's segment labels reach the scene; each label becomes the button to tap.
- SemanticAppBar
- SemanticButton
- SemanticContainer
- Anything that groups other nodes without a more specific role — rows, columns, padding, etc. that survived the compaction pass.
- SemanticEnricher
- Post-classify pass that fills role-specific properties (hint, currentValue, icon name, route info, …) by talking to the live runtime — data pure SceneNode parsing can't surface.
- SemanticIcon
- SemanticImage
- SemanticInput
- Semanticizer
- Module C entry — bottom-up classify + compact + hoist page to root.
- SemanticList
- SemanticMap
-
Floor classifier output — a node we know about but can't classify. Keeps
labelfor debugging and glintId so the agent can still target it. A Google map: its camera and what it draws, filled byMapEnricherfrom the widget and its controller. - SemanticMapItem
- One thing a map draws: a marker, a route (polyline) or an area (polygon or circle).
- SemanticNode
- SemanticOverlayLayer
-
One overlay layer (dialog, bottom sheet, or other modal entry) sitting
above the base screen. isBarriered is true when a
ModalBarriersits between this layer and what is below it — the layer below is painted but not hittable. - SemanticPage
-
Top of the tree: a screen / route. Holds the optional appBar and a flat
body; not tappable itself. - SemanticScene
-
Module C output. The Interactor still uses sourceScene for the
raw hit-test geometry, so callers own its
dispose(). - SemanticsFlagEnricher
-
Reads selection and checked state for buttons from the widget (
selectedon chips), its nearestSemanticswrapper or aSemanticsinside it, in one eval. Capped at maxNodes. - SemanticText
- SemanticUnknown
- Session
- One named slice of activity — opens at a point in the ActionLog's sequence, closes at a later point. Sessions don't own their entries; they hold a sequence range that ActionLog.query can slice on.
- SessionManager
- Tracks one active session at a time plus the history of closed ones. Opening a new session auto-closes the previous one.
- SessionNote
- SessionTool
-
session— group action-log entries into named runs. One active session at a time; opening a new one auto-closes the previous. Ops: status / open / close / note / list / export / detach. - SettledAnimating
- Frames never went quiet but the readable content stopped changing.
- SettledButLoading
- SettleDetector
-
§8.4 settle detection. Polls the scheduler phase; once
quietFramesNeededquiet polls land it checks for loading affordances (a spinner is "frame- stable" while loading) and keeps waiting up to the ceiling if any remain. A screen that never goes quiet (shimmer, Lottie, marquee) is settled once two tree reads stabilityGapMs apart carry the same content signature. - SettledOk
- SettleResult
- SettleTimedOut
- ShowTouchesSetting
-
Android's
show_touchesdeveloper setting on one device, switched on for glint and put back as it was; the old value waits in~/.glint/touchesso even a crashed glint restores it at the next attach. - ShutdownSimTool
-
shutdown_sim— shut down a simulator/emulator, or all booted ones. - SimControl
-
Status + lightweight control of an iOS simulator over
xcrun simctl. Heavier control (location, push, status-bar) is roadmapped. - SimctlRecording
-
Records an iOS simulator display via
xcrun simctl io <udid> recordVideo. - SimStatus
- Read-only snapshot of a booted iOS simulator's state.
- StableIdGenerator
- Assigns symbolic glintIds — see §9 of source-of-truth for the algorithm. Same widget at the same source location + tree path → same id every read.
- StateObserver
- StructuredResponse
-
Common reply shape: summary + optional warnings + nextSteps.
Renders both human text and
structuredContentso callers can branch on data instead of parsing prose. - SuccessEntry
- Swipe
- SwipeTool
- SymbolicTarget
- TabBarClassifier
-
A navigation bar: its destinations' labels are strings, so only their icons reach the scene; each item becomes a tab button that
TabLabelEnrichernames. - TabLabelEnricher
- Names the tabs of each navigation bar and marks the selected one, from the bar's destinations or items, whose labels are plain strings the scene never sees.
- Tap
- TapTool
- Target
- TelemetryTool
- Inspect or trigger glint's telemetry pipeline: status — opt-out + recorder + store + watermark state report — local rollup: per-tool stats, error kinds, transitions ship — build + send a rollup now (also writes audit log) dryRun — like ship but doesn't post or advance the watermark token_usage — estimated agent-side token cost per tool audit_show — pretty-print recent audit entries audit_verify — walk the hash chain Usage is recorded locally; nothing is sent unless the user sets GLINT_TELEMETRY=on.
- TestedSetup
- One device setup glint has driven end to end, with what proves it.
- TextClassifier
- ToggleClassifier
- Checkbox / Switch / Radio and their ListTile forms — tappable one-liners; a ListTile's inner toggle widget is absorbed, the tile is the tap target.
- ToggleEnricher
-
Reads the live
valueof Checkbox / Switch-shaped toggles into SemanticButton.toggleState ('on'/'off'). Radio is excluded — itsvalueis the option, not the checked state. Capped at maxToggles. - ToolEvent
- TouchesOutcome
- What an app answered when asked to show or hide touches; errorKind is set when it could not.
- TouchLog
- The touches glint sent on one device, oldest first, for drawing onto recordings; keeps the last capacity.
- TypeText
- TypeTool
- UnknownClassifier
- Floor — matches everything; keeps the original widget label.
- UsageEventStore
-
Append-only JSONL store at
<dataDir>/usage-events.jsonl; ids stay monotonic across processes, and a full file is gzipped intousage-archive/(newest 20 MB kept) instead of being cut. Writes are best-effort and never throw. - UsageRecorder
- Bounded ring of ToolEvents with FNM-style correlation IDs, backed by UsageEventStore when a data dir is configured. One process-wide instance; tool handlers call record post-call.
- UsageReporter
-
glint's usage rollups: the shared
UsageShipperover the recorder's events; sends nothing unlessGLINT_TELEMETRY=on. - UsageShipResult
-
The outcome of
UsageShipper.ship. - VmClient
- VM-service connection scoped to the first Flutter isolate.
- VmServiceRuntime
-
The default FlutterRuntime backed by
package:vm_service. Owns one VmClient and centralises everyext.flutter.inspector.*andevaluatecall site. - WaitForSettleTool
- §8.4: poll frame quiescence + loading affordances, return when the screen is stable or the ceiling is reached.
- WidgetClassifier
- One widget-recognition rule. Lower priority runs first, first match wins; UnknownClassifier is the floor.
- XcodeInfo
- XcTestBackend
- iOS input through glint's XCUITest runner; screenshots, recording and lock stay on the bridge (sim).
- XcTestRunner
- Builds, starts and drives glint's XCUITest runner on one simulator.
Enums
- Ability
- A tool capability that depends on the kind of device, named as attach lists it.
- Affordance
- AlertKind
-
The kinds of alert a watch can ask for;
disconnected(opt-in) covers thedisconnectedandreconnectedevents around aterminated. - AppLogStream
-
Where a log entry came from.
stderrcaptures direct stderr writes,stdoutcaptures FlutterError dumps + print() (Flutter routes FlutterError through debugPrint → stdout, not stderr),loggingcapturesdeveloper.logcalls. - BridgeSource
- Where each bridge came from, in lookup order.
- DeviceHidFailure
- Why the Device Hub helper failed, as the helper names it.
- DevicePlatform
- FindVerdict
- What one read of the target means for the scroll loop.
- FlutterErrorChannel
-
Where an occurrence was read from: Flutter's
Flutter.Errorevents, glint's in-app error hooks or the app's console output. - FlutterInputMiss
- Why Flutter could not take an input itself; the caller hands it to the platform instead.
- GlintErrorKind
- Closed set of failure modes — interaction, perception, MCP all use this.
- HardwareButton
- Each backend declares its supported subset via BackendCapabilities.
- HelperLife
- How long a helper outlives the thing that asked for it.
- Inert
- Why a control on screen cannot be used right now.
- InputPath
- Which path delivered one input: inside the Flutter app, or a real OS-level touch.
- InputRoute
- Where a session sends input: inside the Flutter app first with real touches for the rest, real touches only, or the app only.
- InspectorGroup
- Inspector group identity used by InspectorClient.
- InspectorGroupKind
- Inspector object-group identity used by glint. Read groups are disposed when the scene is freed; resolve groups outlive the read that produced them.
- InstalledLaunchFailure
- What stopped an installed app from opening with a reachable VM service.
- KeyModifier
- A modifier held down around a key press.
- KeyName
- A non-printing key the keyboard can send; each backend maps it to its own code.
- OnRunning
- What to do when a helper for the same purpose and device is already running.
- ProcessLife
- What a lookup found: positive evidence for each answer, unknown when the lookup itself failed or timed out.
- SceneDetail
- How far to enrich a scene: structural = overlays + route (cheap); interactive = also input values + toggle states (change-detection); full = also icon names + inline link detection (for rendering).
- SceneMode
- Whether an app is read through the Flutter VM tree or the native OS AX tree.
- SceneState
- Coarse top-level state per §8.6: derived cheaply from the already- read scene. No extra polling — just inspects what's there.
- ScreenEdge
- A screen edge a system gesture starts from.
- ScrollDirection
- SemanticRole
- SetupStatus
- How far glint has proven one device setup.
- SurfaceKind
- What kind of native surface covers the app.
- ToolOutcome
-
ok/error/empty. Same vocabulary as flutter_network_mcp.
Extensions
- AndroidKeyCode on HardwareButton
-
Android KEYCODE_* values for glint's HardwareButton.
unlockis null — no stock biometric-match equivalent and per-OEM lock-screen behaviour; surfaced as UnsupportedBackendAction until v1. - InputReportOut on InputReport
- ModalGeometry on CoordinateResolver
-
An eval can come back as prose (
Instance of…, a Sentinel, an error text) instead of the JSON blob; surface that as a typed failure, never a crash. Dart prints unlaid-out geometry asNaN, which is not JSON: it becomes null so callers can name the condition. Measuring the modal on top of the app: what back needs to close a sheet or dialog. - SurfaceReplyLine on NativeSurface?
- A reply summary with the surface's line on its own row, or unchanged when there is none.
Constants
- allowUntestedXcodeEnv → const String
- Env var that lets bridge actions run on an Xcode major outside testedXcodeMajors.
- androidServerAssetName → const String
- The release asset name of glint's Android input server.
- androidServerEnv → const String
- Env var naming a server dex to use instead of the one glint finds.
- bridgeAssetName → const String
- The release asset name of the universal macOS bridge.
- bridgePathEnv → const String
- Env var naming a bridge binary to use instead of the one glint finds.
- deviceHidAssetName → const String
- The release asset name of the universal macOS helper.
- deviceHidBuildDir → const String
- deviceHidEnv → const String
- Env var naming a helper binary to use instead of the one glint finds.
- emulatorCameraStarvedWarning → const String
- What an agent tells the user when emulatorCameraStarved is true.
- expectedAndroidServerProtocol → const int
-
Must equal
PROTOCOLin native/android_server/src/dev/glint/server/Server.java. - expectedBridgeProtocol → const int
-
Must equal
bridgeProtocolin native/ios_sim_bridge/Sources/glint-iossim/main.swift. - expectedDeviceHidProtocol → const int
-
Must equal
PROTOCOLin native/ios_device_hid/src/main.rs. - expectedRunnerProtocol → const int
-
Must equal
runnerProtocolin native/ios_xctest_runner/UITests/Router.swift. - glintSwitches → const TelemetrySwitches
-
glint's telemetry switches:
GLINT_TELEMETRY,GLINT_NO_TELEMETRY,GLINT_NO_USAGE. - glintVersion → const String
-
glint's version;
tool/release.dartkeeps it equal topubspec.yaml. - iphoneAbilities → const DeviceAbilities
- A paired physical iPhone: what glint cannot reach on it yet.
- kAgentErrorEvent → const String
-
Errors the agent's chained
FlutterError.onErrorandPlatformDispatcher.onErrorpost on the Extension stream. - kAgentExtension → const String
- The service extension the agent registers; the version suffix makes a newer glint install its own beside an older one.
- kAgentLifecycleEvent → const String
- Lifecycle changes the agent posts on the Extension stream.
- kAndroidServerDex → const String
-
The server's dex relative to glint's package root, as
native/android_server/build.shwrites it. - kCharsPerToken → const double
- Rough characters per token, the usual heuristic for JSON-ish text.
- kCollectorEndpoint → const String
- Collector endpoint baked into the binary so users can audit where payloads go.
- kDefaultBridgePath → const String
- The glint-iossim bridge path relative to glint's package root.
- kDefaultCallCeiling → const Duration
- The time a call may run before glint cancels it, unless its tool raises the ceiling for a wait the agent asked for.
-
kDefaultGlintTools
→ const List<
GlintTool> - The P4 v0 default tool set. Pass a different list to GlintMcpServer.fromStreamChannel to plug in custom tools while keeping the same envelope + session contract.
- kDefaultProcessTimeout → const Duration
- The cap for a child process whose site names none.
- kDeviceHidBuild → const String
- The helper's release build relative to glint's package root.
- kErrorMessageMaxChars → const int
-
Max chars in the
errorMessagefield for crash payloads. - kGlintInstructions → const String
- Full instruction text shipped with the MCP server. Assembled from independently-editable sections above.
- kGlintVersion → const String
-
The
versionglint's rollups carry, so the shared collector tells the products apart. -
kLoadingAffordanceLabels
→ const Set<
String> -
Widget labels that mean "still loading" while they are in the tree.
RefreshIndicatoris deliberately absent: it wraps a list permanently, onlyRefreshProgressIndicatoris mounted while a refresh is running. - kOcrSource → const String
- The OCR helper's Swift source relative to glint's package root.
-
kPagedLabels
→ const Set<
String> - Source labels whose children are pages laid side by side: every page stays in the tree, so which one is on screen is a geometry fact.
-
kPageScaffolds
→ const Set<
String> - The widgets a screen is built on: Material's Scaffold and Cupertino's page and tab scaffolds.
- kPruneEvery → const Duration
- Seconds between automatic prunes.
- kPruneGrace → const Duration
- How long a helper must sit unused before another glint version's copy may be pruned.
- kReleaseBridgePath → const String
- The release build of the bridge, relative to glint's package root.
- kRunnerProject → const String
- The runner's Xcode project relative to glint's package root.
- kShallowProbeMaxDepth → const int
- Max summary-tree depth at which a node is "shallow enough" for an accurate outer ModalRoute name. Deeper nodes are usually inside a GoRouter ShellRoute inner navigator or an off-screen PageView page.
- kStackHeadFrames → const int
- Max stack frames in crash payloads.
- kTelemetryTimeout → const Duration
- Budget for one POST, short enough that shutdown never waits on an unreachable collector.
- kTelemetryUserAgent → const String
- User-Agent for the HTTPS request. Lets the collector rate-limit by product if a future glint fork misuses the endpoint.
- nativeRunnerGrace → const Duration
- How long attach waits for a runner start before replying; a warm start is up well inside it.
- nativeRunnerPending → const String
- noBridgeDownloadEnv → const String
- Env var that stops glint fetching the prebuilt bridge.
- obscuredValuePrefix → const String
-
Marks an obscured field's value as
<prefix><length>; plain text never starts with it. -
pickerConfirmLabels
→ const Set<
String> - Labels of the button that commits a multi-select pick.
- scrollHoldMs → const int
- Rest at the end of a scroll swipe so the list stops where the finger does instead of flinging on.
-
testedSetups
→ const List<
TestedSetup> - Every setup glint has been run on; update it when CI or a live run proves or breaks one.
-
testedXcodeMajors
→ const Set<
int> - Xcode majors the bridge's private CoreSimulator and IndigoHID calls are verified on.
Functions
-
androidCrashes(
{required String serial, required String adbPath, required String package, required DateTime since, ProcessRunner run = boundedRun}) → Future< List< NativeCrash> > -
Crashes of
packagein the device's crash log buffer sincesince, newest first. -
androidMetaState(
Set< KeyModifier> modifiers) → int -
KeyEvent meta state for
modifiers, with the left-hand flag each key event carries. -
answerPhonePrompt(
DeviceHid hid, String udid, {required RegExp question, required String button}) → Future< String?> -
Answers a system prompt glint's own action raised on a phone: reads the screen with OCR and taps
buttonwhenquestionis up; the question it answered, or null. -
appBusyCause(
Object e) → RuntimeUnresponsiveError? -
The VM timeout behind
ewhen the VM did not answer in time (busy or blocked), else null. -
appBusyDetail(
Duration timeout) → String -
The
detailof an GlintErrorKind.appBusy reply for a VM that gave no answer withintimeout. -
appBusyNextSteps(
{bool maybeQueued = false}) → List< String> -
Next steps for GlintErrorKind.appBusy;
maybeQueuedadds that an input sent earlier may still land. -
batchOverElements(
List< String> ids, String f) → String -
boundedRun(
String executable, List< String> arguments) → Future<ProcessResult> - runBounded with the default cap, shaped as a ProcessRunner so it can stand in for Process.run.
-
bridgeHandshake(
String path, {ProcessRunner run = boundedRun}) → Future< ({String? error, int? protocol})> -
Asks the bridge for its protocol number; null with
errorwhen it cannot say. -
bridgeReleaseUri(
[String version = glintVersion]) → Uri - The bridge asset attached to this version's GitHub Release.
-
buildAndroidServerDex(
String dest, {String? adbPath, Map< String, String> ? env}) → Future<String> -
Builds the server dex from glint's own sources into
dest(javac against the newest android.jar, then d8), asnative/android_server/build.shdoes, for a glint version whose release carries no prebuilt one. -
builtInWebcam(
List< Webcam> cams) → Webcam? -
The Mac's own camera from
cams: a built-in FaceTime camera first, never a Continuity Camera phone or Desk View when anything else exists. -
cachedAndroidServerPath(
{Map< String, String> ? env}) → String -
Where the downloaded server for this glint version lives, under
~/.glint/bin. -
cachedBridgePath(
{Map< String, String> ? env}) → String -
The downloaded bridge for this glint version, under
~/.glint/bin. -
cachedDeviceHidPath(
{Map< String, String> ? env}) → String -
Where the downloaded helper for this glint version lives, under
~/.glint/bin. -
checkAfterResume(
int pid, {Duration within = const Duration(seconds: 3)}) → Future< ProcessCheck> -
pid's check once it is no longer stopped, polled for up towithin; the stopped check when it stays so. -
checkIosToolchain(
String? explicitBridge, {Map< String, String> ? env, ProcessRunner run = boundedRun, BytesFetcher? fetch, void onPhase(String phase)?}) → Future<IosToolchain> - Locates (downloading when missing) and handshakes the bridge, and reads Xcode.
-
checkProcess(
int pid) → Future< ProcessCheck> -
Looks
pidup withps: stopped on stateT, gone only whenpssays there is no such process, unknown whenpsfails. -
classifySurface(
Scene scene, {String? owner}) → NativeSurface -
Classifies
scene(a native reader's snapshot) with its foreignownerwindow, when the platform names one. -
collapseSameApp(
List< RunningApp> apps) → List<RunningApp> - Drops later entries for the same bundle on the same device: one app can surface under two URIs (its DDS and the raw VM, or a helper process quoting it).
-
composeSideBySide(
List< String> srcs, String dst, {required int height, int gap = 16, Future<ProcessResult> run(String, List<String> ) = boundedRun}) → Future<String?> -
srcsscaled toheightand laid side by side with a white gap, as one PNG atdst; null when no tool could. -
consume<
T> (Stream< T> stream, void onData(T)) → Future<void> -
Feeds
streamtoonDataand completes when it ends, so output can be read after the process exited without losing its tail. -
cropImage(
String src, {required int x, required int y, required int w, required int h, Future< ProcessResult> run(String, List<String> ) = boundedRun}) → Future<String?> -
Crops
srcto the pixel rectx,y,w,hinto a new PNG, null when no tool could; sips ignores a crop that ends on the bottom edge, so that one stops a row short. -
dartVersion(
) → String -
The Dart SDK version: the leading semver triple of
Platform.version. -
describeCommand(
String executable, List< String> arguments) → String - A short readable name for a command line: the tool and its first arguments.
-
describeLifecycle(
String? lifecycle) → String - What a non-resumed lifecycle means for the agent, in one line.
-
describeSetup(
DeviceSetup setup) → ({Map< String, Object?> json, String line, List<String> warnings}) - One line for the attach reply, plus warnings for anything short of verified.
-
detectFoldRun(
List< SemanticNode> children, int start, {int threshold = 4}) → FoldRun? -
The run starting at
startwhen at leastthresholdconsecutive siblings share a signature; null otherwise. -
detectXcode(
{ProcessRunner run = boundedRun}) → Future< XcodeInfo> -
Reads the selected Xcode's version from
xcode-select -pand its Info.plist. -
didYouMean(
List< String> suggestions) → String? - "did you mean" nextStep line, or null when there is nothing to suggest.
-
downloadBridge(
String dest, {BytesFetcher? fetch, void onPhase(String phase)?}) → Future< void> -
Downloads the release bridge to
dest, checks it against the published sha256, and marks it executable. -
downloadReleaseAsset(
String asset, String dest, {bool executable = false, BytesFetcher? fetch}) → Future< void> -
Downloads release asset
assettodestand checks it against its published sha256;executablemarks it runnable. -
dragPath(
int x1, int y1, int x2, int y2, {required int durationMs, int holdMs = 0, int frameMs = 16}) → List< TouchPoint> -
A straight drag from (
x1,y1) to (x2,y2) overdurationMsin frame-sized steps, then resting at the end forholdMsso the lift starts no fling. -
emulatorCameraStarved(
String adbPath, String serial, {Duration within = const Duration(seconds: 20)}) → Future< bool> -
True when the emulator behind
serialkeeps logging that its camera got no frame: at least three times inwithin, the last in the past 6 s. macOS has not let it use the Mac's camera; one or two at camera start are a warm-up. -
ensureDeviceHid(
{BytesFetcher? fetch}) → Future< String> -
The helper's path, downloading this version's release asset when no copy exists; throws DeviceHidError kind
missing. -
estimateTokens(
int bytes) → int -
Estimated agent-side tokens for a reply of
bytescharacters. -
evalLibraryCandidates(
{required List< LibraryRef> libraries, required LibraryRef? rootLib}) → List<String> - Eval library ids in preference order: Flutter framework libraries, then the root library, then the rest of the app's package.
-
findNativeSurface(
Map< String, Object?> reply, {bool wholeApp = false, String? appId}) → ({String name, List<Map< roots})?String, Object?> > -
What covers the app in a runner
/treereply: a system alert, else the window's top-level view holding the UIKit-only elements (Flutter's own sit in another, or are hidden by a full-screen modal); null when only Flutter and the keyboard are on screen. WithwholeApp(device mode, no Flutter) it is the app's alert or sheet, else the whole app, named fromappId. -
findVerdict(
ResolvedCoord coord, {required bool tap}) → FindVerdict - A lookup needs the target painted on the viewport; a tap needs it hittable there, and a painted one that is not is covered.
-
flutterAppProblem(
String dir) → String? -
Why
diris not a Flutter appflutter runcan start, or null when it is. -
flutterRunsOn(
String deviceId, {Set< int> except = const {}}) → Future<List< ({String dir, int pid})> > -
Other
flutter runprocesses debuggingdeviceId, with their project folders; a phone runs one Xcode debug session at a time. -
foldDigest(
List< SemanticNode> items, String? runBase, {int max = 10}) → String -
The digest entries for the folded tail of a run (everything after the first
item):
"label" #hashpairs, at mostmax, then+N. -
foldItemLabel(
SemanticNode item, {int maxChars = 60}) → String? -
What a folded item is called in the digest: all its texts joined with
·, cut atmaxChars. Null when it says nothing. -
foldItemRef(
SemanticNode item, String? runBase) → String? -
The short address shown in a digest:
#hashwhen the item shares the run's base, otherwise the full id. -
glintIdBase(
String id) → String -
base#hash→base; unchanged when there is no hash. -
groupFor(
Scene scene, SceneNode source) → String -
Evaluates one expression over many elements at once:
fis a block-bodied lambda taking an Element and returning a String; results come back;-joined inidsorder. The inspector group that ownssource's id: overlay nodes come from the full-tree read, whose ids the summary group cannot look up. -
holdsTyped(
String before, String after, String typed) → bool -
Whether
afterisbeforewithtypedinserted at one place, once iOS smart quotes and dashes are undone. -
idForLabel(
SceneNode root, String wanted) → String? -
The glintId to use when
wantedis visible text rather than an id: the nearest tappable ancestor of the matching text, else the text itself; pages under the active one are skipped. -
imageSourceName(
String provider) → String? -
Short name for an ImageProvider's
toString(): a file's base name, an asset name, a URL's host and last segment, else the provider type. -
installedXcodeVersions(
) → Future< Set< String> > -
The versions of every Xcode on this Mac: the selected one and each
Xcode*.appin the Applications folders. -
installId(
String dataDir) → String -
A random id created once per install in
dataDir; unlike a hash of the path, it reveals nothing about the user or the machine. -
iosCrashes(
{required String bundleId, required DateTime since, String? dir}) → List< NativeCrash> -
Crash reports the simulator wrote to the host for
bundleIdsincesince, newest first. -
isPhysicalIosUdid(
String id) → bool -
A physical iPhone's UDID (
00008130-000C59A60261001C), as opposed to a simulator's 36-character one. -
judgeSetup(
DeviceSetup setup, {List< TestedSetup> known = testedSetups}) → ({TestedSetup? closest, TestedSetup? match, SetupStatus status}) -
How
setupcompares with testedSetups: its status, the matching entry, and the closest proven one when it has none. -
killProcessTree(
Process process) → Future< void> -
Stops
processand everything below it: polite first, forceful after two seconds, and no signal once it is gone. -
labelHint(
SceneNode root, String wanted) → String? - nextStep naming the id behind a label the agent passed as a glintId, or null.
-
labelsForType(
String type) → List< String> -
Labels for a filed issue:
glint, the kind, andagent-filedso the maintainer can filter MCP-originated reports. -
lifecycleIsOverlay(
String? lifecycle) → bool - True when the native layer is over the app rather than the app being away.
-
listWebcams(
String emulatorPath) → Future< List< Webcam> > -
The Mac cameras the emulator at
emulatorPathsees. -
localTeams(
{ProcessRunner run = boundedRun}) → Future< List< String> > - The team ids of the Apple Development certificates in this Mac's keychain.
-
locateAndroidServerDex(
{Map< String, String> ? env, String? scriptPath}) → String? - The server dex: androidServerEnv, then a build inside glint's package, then the download cache; null when none exists.
-
locateAndroidServerSources(
{String? scriptPath}) → Directory? - The server's Java sources inside glint's package, found by walking up from the running script; null when this install has none.
-
locateDeviceHid(
{Map< String, String> ? env, String? scriptPath}) → String? - The helper: deviceHidEnv, then a build inside glint's package, then the download cache; null when none exists.
-
locateIosBridge(
String? explicit, {Map< String, String> ? env, String? scriptPath}) → BridgeLocation - Finds the bridge: explicit arg, then bridgePathEnv, then a build inside glint's package (newest of release and debug), then the download cache; BridgeSource.missing points at the cache path.
-
locateRunnerProject(
{String? scriptPath}) → String? - The runner's Xcode project shipped with glint, or null.
-
looksLikeAppId(
String value) → bool -
True when
valueis a reverse-DNS app id (bundle id or package), not a folder path. -
looksLikeConnectionLoss(
Object e) → bool - A read that failed because the VM service went away, whatever wrapper it arrived in.
-
looseBool(
Object? value) → bool? - A bool from a bool or the strings "true" / "false"; null otherwise.
-
looseInt(
Object? value) → int? - An int from an int, a whole double (15000.0) or a numeric string ("15000"); null otherwise.
-
looseNum(
Object? value) → double? - A number from a num or a numeric string; null otherwise.
-
markHelperUsed(
String path) → String -
Notes that
pathwas just used, so a prune from another glint version leaves it alone; throttled to once an hour per path. -
maybeAwaitReady(
{required GlintSession session, required String glintId, required bool awaitReady, required int ceilingMs, String? toolLabel}) → Future< ArmingOutcome> -
If
awaitReadyis true, polls untilglintIdis hittable. ReturnsArmingReadyon success (caller proceeds with the action and tags armed metadata onto the response),ArmingFailedwith a ready-to- return envelope on miss, orArmingSkippedwhenawaitReadyis false. -
modelImageSize(
int width, int height, int maxSize) → ({int height, int width}) -
Target pixel size when the longest side is capped at
maxSize(0 = no cap); never upscales. -
nativeElements(
List< Map< roots, {({double h, double w})? screen, int max = 40, double scale = 1}) → List<String, Object?> >NativeNode> -
The labelled or tappable elements under
rootswhose center is onscreen(points), at mostmax, with frames in points timesscale. -
nativeScene(
Iterable< NativeNode> nodes, double dpr) → Scene -
The labelled or tappable
nodesas a flat native scene in logical points. -
osDescriptor(
) → String -
"macos 14.6", with long version strings capped at 60 characters. -
otherDeviceServers(
String serial, String adbPath, {Future< ProcessResult> run(String, List<String> ) = boundedRun}) → Future<List< String> > -
Automation servers other tools left running on the device (
app_processmains such as mobile-mcp's DeviceServer or scrcpy); they hold the accessibility and screen-capture connections glint needs. -
parseAndroidCrashes(
String logcat, {required String package}) → List< NativeCrash> -
Java exceptions (
FATAL EXCEPTION) and native crashes (>>> package <<<tombstones) ofpackageinlogcat -v yearoutput. -
parseConnectedIPhones(
String json) → List< BootedDevice> -
The paired, connected physical iOS devices in a
devicectl list devices -jfile. -
parseDeviceServers(
String ps) → List< String> -
Main classes of
app_processservers in aps -o ARGSlisting. -
parseFocusedComponent(
String dumpsys) → String? -
The
package/activityinmCurrentFocus=Window{… u0 package/activity}, or null. -
parseIpsCrash(
String ips, {required String bundleId, String? path}) → NativeCrash? -
The crash in one
.ipsreport when it belongs tobundleId, else null. -
phoneAppPids(
String udid, String bundleId) → Future< List< int> > -
The pids of
bundleId's main process on the phoneudid(extensions excluded); empty when it is not running. -
phoneCrashes(
{required String udid, required String bundleId, required DateTime since}) → Future< List< NativeCrash> > -
Crash reports a physical iPhone holds for
bundleIdsincesince, newest first, fetched with devicectl. -
phoneHid(
InteractionBackend backend) → DeviceHid? -
The Device Hub helper behind
backend, when it drives a physical iPhone. -
phoneOpenUrl(
String udid, String url) → Future< String?> -
Opens
urlon the phoneudidthe way a tap on a link would; null on success, else why not. -
phoneStatus(
String udid) → Future< Map< String, Object?> ?> -
What
devicectlreports about a paired iPhone: name, model, iOS, connection, developer readiness and passcode state; null when the phone does not answer. -
phoneTerminate(
String udid, String bundleId) → Future< String?> -
Stops
bundleIdon the phoneudid; null when it stopped or was not running, else why not. -
phoneTransport(
String udid) → Future< String?> -
How the iPhone reaches this Mac (
wiredorlocalNetwork), fromdevicectl; null when it does not answer. -
pickSigningTeam(
String projectDir, String udid, {String? requested, ProcessRunner run = boundedRun}) → Future< SigningChoice> -
Picks the team to sign
projectDirfor phoneudid:requested, the project's own team, the one remembered here, the only one, or the one already provisioned for this app; throws SigningUndecided otherwise. -
pointText(
double v) → String - A coordinate for a reply: whole numbers bare, fractions to one decimal.
-
portOwners(
int port) → Future< PortOwners> -
The processes listening on TCP
port;lsofexits 1 with no output when nobody does. -
postTelemetry(
String jsonStr) → Future< int> -
POSTs
jsonStrto the collector as glint; throws on connection failure, callers swallow. -
prepareModelImage(
String src, {required int width, required int height, required int maxSize, required String format, required int quality, Future< ProcessResult> run(String, List<String> ) = boundedRun}) → Future<ModelImage> -
Shrinks and re-encodes
srcfor the model (sipson macOS, ImageMagick elsewhere); returns the original PNG when no resizer is available or none is needed. -
probeFailureResponse(
{required String? lifecycle, required Object? lastError, required int timeoutMs}) → StructuredResponse - The reply when the viewport never probed: a native layer over the app when it is not resumed, else the geometry reason.
-
processCommand(
int pid) → Future< String?> -
The command line of process
pid, or null when it is gone or cannot be read. -
projectBundleId(
String projectDir) → String? - The project's bundle identifier, if the Runner target names one.
-
projectTeam(
String projectDir) → String? -
The
DEVELOPMENT_TEAMthe project's Runner target names, if any. -
pruneCaches(
{bool dryRun = false, bool force = false, String? home, String? version}) → Future< PruneReport> -
Removes helper binaries of other glint versions from
~/.glint/bin, runner builds of Xcode versions that are gone and runner builds beyond the newest three from~/.glint/xctest, at most once a day unlessforce; nothing a live process runs, or any helper or build used in the last kPruneGrace, is touched. -
quoteForDeviceShell(
String arg) → String -
adb joins shell arguments into one command line for the device's
sh, so text is single-quoted to arrive as one literal argument. -
readAndroidSetup(
String serial, String adbPath, {String transport = 'adb', ProcessRunner run = boundedRun}) → Future< DeviceSetup> -
Android API level of
serial. -
readIosDeviceSetup(
String? osVersion, {ProcessRunner run = boundedRun}) → Future< DeviceSetup> -
The setup of a paired physical iPhone on
osVersion(e.g. "iOS 27.0"), judged on its owndevicebackend. -
readIosSetup(
String udid, int? xcodeMajor, {String transport = 'indigo', ProcessRunner run = boundedRun}) → Future< DeviceSetup> -
iOS runtime of simulator
udidand the Mac's macOS major;transportis the bridge's input path. -
readIosTransport(
String bridgePath, String udid, String mode, {ProcessRunner run = boundedRun}) → Future< ({String? error, String? fallback, String? transport})> -
The input transport glint-iossim opens for
udidundermode;fallbacksays whyautosettled for indigo. -
readScrollPosition(
GlintSession session, Scene scene, String? glintId) → Future< ({bool notScrollable, (double, double, double)? position})> -
The pixels, minimum and maximum extent of the scrollable around the node
glintIdinscene, by one small eval;positionis null when it cannot be read andnotScrollablesays whether nothing scrolls there. -
readText(
String image) → Future< List< OcrLine> > -
Text on
imageread with macOS Vision, through a small helper compiled from kOcrSource on first use and cached by source hash. -
reasonLine(
String detail) → String -
The line of
detailthat carries the reason: a VM header like "Unhandled exception:" is joined to the line after it, capped at 240 chars. -
redactForSharing(
String input, {Iterable< String> appNames = const [], Iterable<String> deviceNames = const [], Iterable<String> hosts = const []}) → String -
redactPath, redactSecrets and the given app, device and host names together, for anything posted publicly; reports build one
IdentityRedactorand reuse it. -
redactPath(
String input, {String? home}) → String -
Strips filesystem identity (username, project name, directory layout) from text that leaves the machine;
<home>/…/lib/x.dartbecomes<project>/lib/x.dart,package:URIs are untouched, and it is idempotent. -
redactSecrets(
String input) → String -
Masks bearer tokens, JWTs, long hex keys and
password=-style values in free text. -
redactStackHead(
StackTrace stack, {int maxFrames = 8}) → List< String> -
Redacts every line of a Dart stack trace, keeping the first
maxFramesframes. -
refreshUpdateCheck(
) → Future< void> - Asks pub.dev for glint_mcp's latest version, at most once a day.
-
releaseAssetUri(
String asset, [String version = glintVersion]) → Uri - An asset attached to this version's GitHub Release.
-
rememberedTeam(
) → String? - The team glint signed with last time on this Mac, if any.
-
rememberTeam(
String team) → void -
Remembers
teamfor the next phone build that needs one. -
resolveAdbPath(
String? explicit, [Map< String, String> ? env]) → String? -
Where
adblives:explicitfirst, then PATH, then the usual SDK homes (ANDROID_HOME,ANDROID_SDK_ROOT,~/Library/Android/sdk,~/Android/Sdk). Null when none exists — callers say so instead of reporting "no android device". -
resolveDataDir(
) → String - Glint's per-install data dir. Holds the audit log + ship watermark.
-
resolveIosBridgePath(
String? explicit) → String - The bridge path locateIosBridge picks.
-
runBounded(
String executable, List< String> arguments, {Duration timeout = kDefaultProcessTimeout, String? phase, Map<String, String> ? environment, String? workingDirectory, Encoding? stdoutEncoding = systemEncoding, Encoding? stderrEncoding = systemEncoding, List<String> hints = const []}) → Future<ProcessResult> -
Runs a child process with a hard cap: on timeout the process and its direct children are killed and a ProcessTimeoutError names the command and
phase. Same result as Process.run, plus the phase shows in heartbeats and the call's timeout reply. -
runCapped(
ProcessRunner run, String executable, List< String> arguments, {required Duration timeout, String? phase}) → Future<ProcessResult> -
Runs through the injected
run, giving the default boundedRun this call's owntimeoutandphase. -
sceneFromServerWindows(
Map< String, Object?> reply, double dpr) → Scene -
Flat scene of the focused window in the server's
windowsreply (the top application window when none has focus). -
sceneFromUiDump(
String xml, double dpr) → Scene -
Flat scene of the labelled or tappable nodes in a
uiautomator dump, framed in logical points. -
screenOf(
Map< String, Object?> reply) → ({double h, double w})? -
The app's frame size in a runner
/treereply, which is the screen in logical points. -
screensDiffer(
String a, String b, {Future< ProcessResult> run(String, List<String> ) = boundedRun}) → Future<bool?> - Whether two screenshots show a different screen, judged on 32x64 thumbnails with the status bar left out; null when they cannot be compared.
-
scrollableAround(
FlutterRuntime runtime, Scene scene, SceneNode node, {required bool horizontal}) → Future< AxisScrollable?> -
The nearest scrollable around
nodethat scrolls along thehorizontalor vertical axis, skipping nearer ones on the other axis; null when there is none or the eval fails. -
scrollTargetFor(
GlintSession session, Scene scene, SceneNode hit, ScrollDirection dir) → Future< ScrollTarget> -
The scrollable that moves
hitalongdir's axis (not whatever sits under the default swipe point) and the PageViews around it that must stay on their page; a target with no anchor keeps the default swipe. -
settleOutput(
Iterable< Future< streams) → Future<void> >void> -
Waits briefly for
streamsstarted with consume to end. - True only when the user opted in to sharing usage stats.
-
Why usage stats are not shared, or null when the user opted in with
GLINT_TELEMETRY=onand nothing overrides it. -
splitLiteralPercentS(
String text) → List< String> -
input textturns%sinto a space, so text is split between%andsto keep a literal%s. -
startHelper(
String purpose, String executable, List< String> arguments, {String? device, String? owner, HelperLife life = HelperLife.session, OnRunning onRunning = OnRunning.replace, String? label, Map<String, String> ? environment, String? workingDirectory}) → Future<Process> -
Starts the long-lived helper for
purposeondevicethrough the process registry: one per purpose and device, stopped with itslife, reaped by a later glint if this one dies. Like startManaged, an abandoned call stops it until CallProgress.release hands it over. -
startManaged(
String executable, List< String> arguments, {String? label, Map<String, String> ? environment, String? workingDirectory}) → Future<Process> - Starts a child that belongs to the current tool call: it is stopped if the call is abandoned, and forgotten once it exits. Call CallProgress.release to hand it over to outlive the call.
-
structuralSignature(
SemanticNode node) → String - Structural fingerprint of a subtree: what a node IS, not what it says. Two list rows with different text but the same shape share a signature; a row whose toggle state differs, or that lacks a button, does not.
-
suggestIds(
Iterable< String> candidates, String wanted, {int max = 3}) → List<String> -
Closest glintIds to a stale or mistyped one, so a failed lookup names the
likely replacement instead of sending the agent back to a full re-read.
Same base name (before
#hash) wins, then small edit distance, then prefix. -
summarizeUsage(
List< Map< rows, {int topTransitions = 15}) → Map<String, Object?> >String, Object?> -
Aggregates tool-call rows, ordered by
correlation_idthenid, into per-tool stats, the outcome-tagged tool-to-next-tool transitions, and self-correction rates; tokens come fromestimated_tokensor elseresult_bytes. -
swipeRegion(
Rect4 screen, Rect4? clip, {bool horizontal = false}) → Rect4 -
Where to swipe:
screen(already above the keyboard) narrowed to the scrollable's visibleclip; falls back toscreenwhen the overlap is too small to swipe in (a thin strip such as a tab bar is enough across the swipe). -
tapEachInTurn(
InteractionBackend backend, List< ({int x, int y})> points, int intervalMs) → Future<void> - InteractionBackend.tapSequence as one tap call per point, for backends with no batched form.
-
tapTargetFor(
Iterable< SceneNode> roots, SceneNode node) → String? -
The id a tap on
nodeshould use: its nearest tappable ancestor-or-self, else its own id. -
teamsWithProfile(
String udid, String bundleId, {ProcessRunner run = boundedRun}) → Future< List< String> > -
Teams with an unexpired provisioning profile for
bundleIdthat lists the phoneudid. -
telemetryDisabled(
[Map< String, String> ? env]) → bool -
True when
GLINT_NO_TELEMETRYturns off local usage recording and sharing alike. -
truthyEnv(
String? v) → bool -
Treats
true,1,yesandon(any case, trimmed) as true. -
updateNotice(
) → String? - The line attach shows when the last check found a newer glint on pub.dev; null when up to date or unknown.
-
usageDisabled(
[Map< String, String> ? env]) → bool -
True when local usage recording is off (
GLINT_NO_TELEMETRYorGLINT_NO_USAGE). -
vmProcesses(
int port) → Future< VmProcesses> -
Finds the processes behind the VM service at
portand checks both; owner and app are null when they cannot be resolved to exactly one process. -
withArmedMetadata(
StructuredResponse response, ArmingReady arming) → StructuredResponse -
Wraps an action's StructuredResponse with armed metadata. Use after
the action fires when
armingreports ready.
Typedefs
- AbilityGap = ({String? instead, String reason})
- Why a device lacks an ability, and what to do instead.
- AxisScrollable = ({bool paged, ({double h, double w, double x, double y}) rect})
-
The scrollable that moves content along one axis: its global
rectand whether itpaged(PageView, TabBarView). -
BytesFetcher
= Future<
List< Function(Uri uri)int> > - Fetches one URL's body; injected so tests run offline.
- DeviceSetup = ({String backend, int? hostMajor, String platform, String? runtime, int? runtimeMajor, int? xcodeMajor})
- The setup in front of glint at attach; null fields could not be read.
- InputReport = ({int ms, InputPath path, FlutterInputMiss? reason})
- How one input was delivered, and why it left the app path when it did.
-
InspectorJson
= Map<
String, Object?> -
One opaque inspector subtree (the JSON returned by Flutter's
getRootWidgetTree/getDetailsSubtree). Glint's perception layer parses this into SceneNodes; the runtime stops at the JSON. - ModelImage = ({int height, String mimeType, String path, int width})
- An image prepared for the model: its file, pixel size and media type.
- NativeNode = ({bool clickable, String cls, String label, int x1, int x2, int y1, int y2})
- One node a native reader found: class, label, whether it is tappable, and its bounds in pixels.
- OcrLine = ({double h, String text, double w, double x, double y})
- One line of text found on a screenshot, with its box in image pixels.
-
PortOwners
= ({bool known, List<
int> pids}) -
Who listens on a TCP port:
knownis false whenlsoffailed, so an emptypidsthen means nothing. - ProcessCheck = ({ProcessLife life, String? state})
-
One process check: its
lifeand thepsstate letters when it exists. -
ProcessRunner
= Future<
ProcessResult> Function(String executable, List<String> arguments) - Runs one child process; injected so tests can capture argv without a device. Defaults to Process.run.
- RecognisedLine = ({double h, String text, double w, double x, double y})
- One line of recognised text with its box in screenshot pixels.
- Rect4 = ({double h, double w, double x, double y})
-
RunnerHttp
= Future<
(int, Map< Function(String method, Uri uri, Map<String, Object?> )>String, Object?> ? body, Duration timeout) - Sends one request to the runner and returns its status code and decoded JSON body.
-
ScrollTarget
= ({ScrollAnchor? anchor, Set<
String> watchedPagedIds}) -
The scrollable
scrollis told to drive instead of the main one (null keeps the main one), and the PageViews whose visible page must not change while it does. -
SigningChoice
= ({List<
String> others, String team, String why}) - The team glint signs a phone build with, and why it chose it.
- SurfaceChoice = ({String id, String text, double x, double y})
- One tappable choice on a native surface, at its center in logical points.
- TouchPoint = ({int ms, int x, int y})
- One sample of a touch: physical pixels, and ms after the touch began.
-
TouchRecord
= ({DateTime at, List<
List< fingers})TouchPoint> > - One touch glint sent: when its fingers went down, and each finger's path in device pixels.
- VmProcesses = ({int? app, ProcessCheck? appCheck, String? appCommand, int? owner, ProcessCheck? ownerCheck, String? ownerCommand, int? stoppedPeer, String? stoppedPeerCommand, String? stoppedPeerState})
-
The processes behind a VM service port:
ownerlistens on it (the app, or theflutter run/ DDS process in front of it) andappis the simulator app process, when exactly one is found. - Webcam = ({String id, String name})
-
A Mac camera the Android emulator can pass through, as
-webcam-listnames it.
Exceptions / Errors
- AndroidServerError
- Raised when the server cannot be started or stops answering.
- AppNotResumedError
- A frame-bound read refused because the app is not resumed, e.g. a system prompt covers it.
- AvdBootError
- Booting an AVD failed; detail holds the emulator's last log lines when it left any, errorKind and nextSteps replace the generic ones when set.
- BackendFailure
- A failure the agent can branch on: kind says what to do, data carries the numbers (how much landed, which teams).
- BackendToolError
- BridgeDownloadError
- CallAbandoned
- The call is being abandoned (its ceiling passed), so new subprocesses must not start.
- CallTimeboxExceeded
- Thrown by CallProgress.timeboxed when its body outlived its limit; says where the body had got to.
- DeviceHidError
- A failure of the Device Hub helper.
- GeometryResolveError
- InspectorReadError
- InstalledLaunchError
- Raised when an installed app can't be opened; failure says why, detail carries the tool output.
- IosToolchainBlocked
- Bridge actions refused because the bridge is missing or Xcode is untested.
- LaunchError
-
Raised when a launch can't complete; logTail holds the last
flutter runlines. - NotHittableRefused
- OcrError
- Raised when the helper cannot be built or run.
- OffViewportRefused
- ProcessTimeoutError
- A child process ran past its cap and was killed.
- RuntimeConnectionLostError
- Thrown when the VM service WebSocket connection drops — typically because the app performed a hot restart or was terminated. Tools catch this and return GlintErrorKind.connectionLost so the agent knows to re-attach.
- RuntimeEvalError
- Thrown when FlutterRuntime.evaluate either fails to compile or returns an ErrorRef. Carries the original error detail.
- RuntimeStaleInspectorIdError
- Thrown when the inspector no longer knows an object id it was given: the group was disposed or the widget rebuilt since the id was handed out.
- RuntimeUnresponsiveError
- Thrown when a VM service call gets no answer within the runtime's deadline: the isolate is not running Dart code (device locked, app suspended, or paused at a breakpoint).
- SessionNotAttachedError
- SigningUndecided
- Raised when several teams could sign and nothing says which.
- StaleInspectorIdError
- The inspector id of the target is no longer known to the app, so a fresh read can find it again.
- UnresolvedTarget
- UnsupportedBackendAction
- XcTestRunnerError
- Raised when the runner cannot be built, started or reached; nextSteps say what to do.