filmopen_automation
Generated by scripts/package_digest.py; regenerate, never edit.
The agent layer’s in-app half (the MCP Specification): Flutter’s driver extension, the protocol of its data channel, and the host that answers it.
Flutter. 5 files, 1,664 lines under lib/; 44 tests in 7 files. Barrel: lib/filmopen_automation.dart.
Depends on
Section titled “Depends on”- filmopen_format — uses
EntityType,FilmProject - filmopen_store — uses
AppLog,LogEntry,LogSink - filmopen_state — uses
AutomationHost,BatchSelection,CategorySelection,ClipboardAsks,EntitySelection,ExitTasks,FieldRegistry,NavIndex,OpenDrafts,OpenRefusedException,OtherFilesSelection,PendingSelection,ProjectOverviewSelection,ScriptSelection,Selection,Settings,SettingsWrite,ViewerChangeOutcome,activationOf,browserProvider,currentTab,entityTabs,findById,findByIdentifier,findByLabel,globalRect,kSettleQuiet,keepsLanguage,localizationsProvider,navIndexProviderand 12 more - filmopen_recorder — uses
Recorder
Third-party: flutter_driver, flutter_test, flutter_riverpod.
Used by
Section titled “Used by”filmopen_app, filmopen_mcp
Public API
Section titled “Public API”What the barrel exports, file by file. A name is class, enum, mixin, extension, typedef, a top-level function, getter, setter or variable; under a class, its public constructors, fields, getters, setters and methods.
lib/src/driver_extension.dart
Section titled “lib/src/driver_extension.dart”- function
void installAgentExtension()— Installs Flutter’s driver extension with [handleAgentCommand] as its data channel. - function
void installClipboardAsks(TestDefaultBinaryMessenger messenger)— Sends the outgoing platform calls of [messenger] through [ClipboardAsks], as the product’s binding does (§4.2).
lib/src/driver_host.dart
Section titled “lib/src/driver_host.dart”- class
DriverAutomationHost— The real [AutomationHost] of the agent build, installed bytest_driver/agent_main.dartbeforemainruns.DriverAutomationHost({ this.appVersion, this.logCapacity = 500, this.settleTimeout = const Duration(seconds: 5), Future<void> Function()? exitAppli…final String? appVersion— The app’s version, for a recording’s tape.final int logCapacity— How many log events [logTail] reaches back.final Duration settleTimeout— The longest an op waits for the animations its change started.void detach()— Gives back what [attach] took — the semantics handle and the log sink — so that a test ends without an outstanding handle.
- class
RingLogSink— The last events of the application’s own log, forlog_tail.RingLogSink([this.capacity = 500])final int capacity— How many lines are kept; the oldest goes first.String? lastEvent— The name of the last event written, forstate.List<String> tail(int lines)— The last [lines] lines, oldest first.
lib/src/protocol.dart
Section titled “lib/src/protocol.dart”- variable
const String kPingCommand— The handshake: a literal, so a one-line probe needs no parser. - variable
const List<String> kTabIds— The tabsset_tabnames: an entity page’s, in the order it shows them, then Settings’, then the GPU page’s three, then the Script page’scontentsand the scriptwriting plug-in’sworkflow(§9.3), then Activity’s `… - variable
const List<String> kThemes— The themesset_themenames:ThemeMode’s own names. - variable
const List<String> kClickKeys— The modifier keysclickholds, by name: each at most once in one click. - variable
const List<String> kDragPlaces— Where on its target rowdraglets go, by name: one-sixth, one-half and five-sixths of its height. - class
AgentCode— What an answer’scodesays whenokis false.static const unknownOp— No op of that name;detailnames it when it is a well-formed name.static const badArgs— An argument is missing or has the wrong shape;detailnames it.static const notAvailable— The host cannot do this: the product’s no-op host answers it to every op, a host without [SemanticsTaps] to a tap by label or position, and a host without [AppExit] toquit.static const notFound— Nothing on screen or in the project answers to the name indetail.static const refused— The app refused, as it refuses a click;detailis the refusal’s code.static const intercepted— A question is on screen instead of what was asked for (the fork before Compare, the Software Specification §9.3);detailnames what was asked.static const timeout— The op could not be answered within its time, anddetailsays where it was.static const failed— The host failed unexpectedly;detailis the error’s type, and the log has the rest (agent.failed).
- class
AgentError— Thrown by a host, or by the protocol’s own checks, to answer an op with a code instead of a result.const AgentError(this.code, [this.detail])final String code— One of [AgentCode].final String? detail— A code, a stem or an identifier; never a person’s text.
- class
SemanticsTaps— What a host answers beyond [AutomationHost] when it reads the semantics tree itself (DriverAutomationHost).Future<bool> tapLabel(String label)— Taps the node whose label is [label], or whose label’s first line is (a tab’s label carries its position below it).Future<bool> tapAt(double x, double y)— Taps at ([x], [y]), in logical pixels of the view, as a pointer would; false when the position is outside the view.
- class
SemanticsScrolls— Reveals a lazy control through its region’s vertical semantics actions, without activating it (§4.3).Future<int?> scroll(String identifier, {required String direction, String within = 'page.content', int maxScrolls = 20})— Shows [identifier] within [within], moving down or up the page for at most [maxScrolls] actions.
- class
MouseInput— What a host answers beyond [AutomationHost] when it moves a mouse over the page (DriverAutomationHost): a click with modifier keys held, as a person marks rows.Future<bool> click(String identifier, List<String> keys)— Clicks the centre of the node [identifier], shown first, with a mouse while [keys] ([kClickKeys]) are held; false when no such node is on screen.Future<void> drag(String from, String to, String place)— Presses a mouse on the centre of the node [from] and lets go at [place] ([kDragPlaces]) of the node [to], both shown and on screen before the press; [AgentError]not_foundnaming the one that is not.
- class
FileAnswers— What a host answers beyond [AutomationHost] when it answers the next file dialog for the person (DriverAutomationHost):pick_files.Future<void> pickFiles(List<String> paths)— Holds [paths] — each absolute and an existing file, else [AgentError]bad_args/paths— as the answer of the next file dialog, an empty list being a cancel; a second answer replaces the first.
- class
AppExit— What a host answers beyond [AutomationHost] when it can end the application it runs in (DriverAutomationHost):quit, as closing the window does.Future<void> quit()— Writes the open drafts, then has the application exit once this answer has left.
- class
Recording— What a host answers beyond [AutomationHost] when it can drive the issue recorder (DriverAutomationHost, Software Specification §6.8): start a recording, stop it, and say whether one runs.Future<Map<String, Object?>> recordStart()— Starts a recording:{"recording": true, "folder": …}, the folder null where the recording is kept in memory.Future<Map<String, Object?>> recordStop()— Stops the recording:{"recording": false, "folder": …, "events": n}.Future<Map<String, Object?>> recordState()—{"recording": bool, "folder": …, "events": n}.
- variable
final List<String> agentOps— Every op the channel answers,pingfirst. - variable
const Set<String> agentDiagnosticOps— The ops that are diagnostics and never a step of a recorded sequence. - function
Future<String> handleAgentCommand(String? message, { AutomationHost? host, Duration opTimeout = const Duration(seconds: 30), })— Answers one message of the driver’s data channel (the extension’sDataHandler). - function
Selection selectionFromJson(Object? json)— Reads a selection in the shape of the state’s [selectionToJson];epochandstemmay be left out. - function
List<Map<String, Object?>> findNodes(Object? tree, String query)— The nodes of a semantics tree — a node is a map with anidentifierand alabelwhen it has them and itschildrenwhen it has any, the shape [AutomationHost.semantics] answers — whose identifier or label contains…
Internal
Section titled “Internal”Files under lib/ the barrel does not reach; nothing outside the package may import them.
lib/src/agent_mouse.dart:kAgentKeys,AgentMouse