ApplicationLoader class

Discovers and loads application definitions from an MCP server (MOD-RUNTIME-002, FR-APP-001003, FR-APP-ONLINE-001005).

Constructors

ApplicationLoader({Logger? logger})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cachingPageLoaderFor(Client client, Map<String, Map<String, dynamic>> cache) PageLoader
Page loader that serves cache entries from memory and falls back to the live client for any other uri.
load(Client client, {List<Resource>? resources}) Future<Map<String, dynamic>>
FR-APP-ONLINE-001~004 — Raw JSON form used internally by loadOnline and by legacy callers. resources lets a caller pass a resource list it has already fetched (e.g. for MCP Serving bundle-document detection) so the server is listed only once; when null the list is fetched here.
loadOnline(Client client, {required String serverId}) Future<ApplicationDefinition>
FR-APP-ONLINE-001~005 — Returns a source-kind-labelled ApplicationDefinition that converges with the Local Bundle path emitted by BundleApplicationAdapter.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pageLoaderFor(Client client) PageLoader
FR-APP-006
pickAppUri(List<Resource> resources) String?
FR-APP-002 selection priority. Public so the server-open path can resolve the route target when promoting a bare page to a single-route application (see wrapAsApplication).
toString() String
A string representation of this object.
inherited
wrapAsApplication(Map<String, dynamic> definition, {required String appUri}) Map<String, dynamic>
Promote a served UI definition to AppPlayer's standard app-execution structure: a type:"application" document with a single route pointing at appUri. A definition that is already an application passes through unchanged.

Operators

operator ==(Object other) bool
The equality operator.
inherited