flutter_mcp_harness 7.0.0
flutter_mcp_harness: ^7.0.0 copied to clipboard
Programmatic E2E harness for Flutter apps: build and launch a debug binary, attach to its Dart VM service, drive widgets through the MCP toolkit service extensions, and assert with composable scenarios.
Changelog #
All notable changes to this package are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
7.0.0 - 2026-10-03 #
Changed #
- Align package version and hosted sibling dependency constraints with the Flutter MCP Toolkit 7.0.0 release.
6.0.0 - 2026-10-03 #
Changed #
- Align package version and hosted sibling dependency constraints with the Flutter MCP Toolkit 6.0.0 release. The package now shares the toolkit train version (0.2.1 had identical content; the 0.x line was the pre-train history).
Breaking (ADR-0019 — layering: targets, session, driver, scenario) #
WidgetDriverremoved. One driver per wire: useattachDriver(app)ToolkitDriver.perform(...)with the family actions (ClickAction(name: 'connect'),TypeAction, …).findRef→ locators,tapUntil→ a retry loop overperform+ your condition,findValue→ asnapshot()scan ofnode.value.
- New session layer, promoted from the showcase drives:
attachDriver(LaunchedApp)and the observe helperslabelContaining/expectLabel(retry-until-rendered, with the surface dump in the failure). HarnessContext.take<T>fails with a namedStateError(bag keys listed) instead of a rawTypeError.- The package re-exports
universal_automation_interface— one import drives the whole family contract.
0.2.1 - 2026-10-02 #
Fixed #
- Floors follow the 6.0.0 train:
flutter_mcp_toolkit_core^6.0.0 (the 0.2.0 artifact on pub.dev pinned ^5.1.0 and cannot resolve next to mcp_toolkit 6.x) andintentcall_core^1.1.0 (thecustomautomation action this package's router switches on shipped in intentcall_core 1.1.0 — a consumer resolving 1.0.0 compiled fine and failed at build).
0.2.0 - 2026-10-02 #
Added #
- Invoke tier (ADR-0017): surface actions, registry-native.
ToolkitDrivernow implementsAutomationActionCatalog—actions()lists the app's agent-call registry (the single action source) via the newagent_catalogwire verb, andInvokeAction(name, args)dispatches throughagent_invoke, validating arguments against the registered JSON schema (intentcall_schema) before the wire. IntentDriverRouterroutesIntentAutomationAction.customhints toInvokeAction(catalog name underlocator['name']; invocation arguments pass through as the action args).- Requires
universal_automation_interface^0.2.0 (theInvokeActionsealed case is a breaking addition for exhaustive switches).
0.1.1 - 2026-10-01 #
Changed #
intentcall_core(and devintentcall_schema) now pin^1.0.0— the train that carries the stable projection API. This package is published to pub.dev and its hosted consumers (oka) resolve these on pub.dev, so the published surface pins a real floor instead of an unconstrained range. In-repo proof consumers remain version-free perdocs/intentcall/README.md; the consumer gate exempts this file.
[Unreleased] #
Added #
ToolkitExtensionsvalues now derive fromflutter_mcp_toolkit_core'sToolkitExtensionNames(single source of truth; harnessflutter_mcp_toolkit_coredependency added).ToolkitDriver.performhandlesScrollAction: direction + distance route throughext.mcp.toolkit.scroll; in-band refusals surface asProtocolExceptionwith the app's error and hint.
Added #
ToolkitDriver(toolkit_driver.dart): the toolkit'sAutomationDriverimplementation over theext.mcp.toolkit.*extensions — semanticAxNodesnapshots with bounds and refs, click / type / key-press / named-route navigate / evaluate actions, PNG screenshots viaview_screenshots— passing theuniversal_automation_conformancedriver suite (ADR-0038 adoption).ToolkitExtensions.viewScreenshotsconstant (ext.mcp.toolkit.view_screenshots).IntentDriverRouter(intent_driver_router.dart): ADR-0038 driver-routed invocation — resolves an intent'sIntentAutomationHint(transport + verb + locator, plus invocation operands) into aAutomationActionon the bound driver.showcase/drivers/bin/ drive_flutter.dartproves it live (routed click/type/navigate against the demo app).intentcall_coredependency for the hint types.- Showcase drive programs (
showcase/drivers/bin/drive_flutter.dart+drive_web.dart, in theshowcase/driverscomposition package): one driver contract across the instrumented Flutter and browser tiers, with screencast receipts viauniversal_screencast— the Flutter side through the composition-ownedFlutterAppFramesadapter over this package'sVmClient, the browser side throughCdpScreencastFrameSource.
Changed #
-
BREAKING (dependency hygiene):
universal_screencastanduniversal_capture_flutterare no longer dependencies — the harness library never imported them; the showcase drive programs moved to theshowcase/driverscomposition package, which owns the pipeline policy (dependency inversion: composition wires, libraries don't). -
ChromeAppTarget.launchpolls the CDP endpoint (250 ms interval, 30 s deadline) instead of probing once — a single probe loses the race against Chrome's DevTools-socket boot on cold starts; launches pass--force-renderer-accessibilityso headless pages expose their full accessibility tree. -
tool/intentcall_session.dart: the IntentCall showcase doors (link discover, bridge ping, MCP serve) as a checked-in Dart composition root. Resolves the target VM from--vm-service-urior the freshest announcement in the showcase log, and the IntentCall CLI fromINTENTCALL_ROOT, sibling checkouts, orPATH. -
vm_service_uri.dart:canonicalVmServiceWsUri(shared http→ws conversion, now also used byVmClient.connectand the showcase),lastVmServiceUriIn, andlastVmServiceWsUriIn(freshest-announcement log scraping). -
FlutterRunTarget(ADR-0015): the owning interactiveflutter runsession (device + extra args), scraping the VM service announcement from the tool's own output — the lifecycle mode behind the showcase launch (tool/showcase.dart), complementary to the fresh-binaryBinaryAppTarget. Used by the Dart rewrite of the formerscripts/run_showcase.sh,run_web_showcase.sh, andstop_showcase.sh. -
LogTap.streamfor live tailing;vm_service_uri.dartexports the shared VM-URI patterns (including the webws://form). -
Environment layering fix in all process targets: an empty
environmentmap now inherits the parent environment unchanged instead of wiping it.
Changed #
scripts/run_showcase.sh,run_web_showcase.sh,stop_showcase.shbecame deprecated wrappers arounddart run packages/harness/tool/showcase.dart(macOS /--web/--stop).
Removed #
- Runtime generation of
.showcase/intentcall_examples.shby the showcase launcher (generated shell scripts were an unreliable pattern). The same doors are the checked-intool/intentcall_session.dart.
Added (initial extraction) #
- Initial extraction of the lifecycle-owning E2E harness core (ADR-0015),
proven in production in the vosges project's
vosges_harnesspackage:LogTap(log buffer withwaitFor),Scenario/Check/HarnessContext(composable steps with recorded assertions),VmClient(VM service attach, extension calls, evaluate, hot reload),WidgetDriver(snapshot/tap/enterText/findValue over theext.mcp.toolkit.*service extensions),BinaryAppTarget/LaunchedAppwithMacosAppTargetandWindowsAppTargetpresets, andToolkitExtensions(the extension verb name list).