AppSession class abstract

Public session handle for a single opened app (MOD-SESSION-001, FR-SESSION-001~004).

Hosts consume sessions via buildWidget; the underlying MCPUIRuntime and tool/resource/notification wiring are owned internally and never exposed through the public API.

Constructors

AppSession()

Properties

bundle → McpBundle?
The bundle manifest, surfaced only for bundle-backed sessions. Server-backed sessions return null. Host shells (Standard chrome, Pro launcher, etc.) read the declaration regions of the manifest — wiring (lifecycle / domainActions / chat / lifecycleState), settings.sections, chat.slashCommands, etc. — directly and map them onto their own chrome surfaces (wiring and the settings section).
no setter
handle → AppHandle
no setter
hashCode → int
The hash code for this object.
no setterinherited
launchRouteMissing → bool
True when the entry that opened this session named a page this app no longer declares (platform spec 19 §4.3).
no setter
metadata → AppMetadata?
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → AppSource
no setter

Methods

buildDashboardWidget({required BuildContext context, VoidCallback? onExit, void onOpenApp(String? appId, String? route)?}) → Widget?
Dashboard rendering entry point. Returns null when the DSL declares no dashboard block — the host should fall back to a default card derived from metadata. The returned widget hosts only the dashboard.content subtree and re-evaluates bindings on dashboard.refreshInterval.
buildWidget({required BuildContext context, VoidCallback? onExit}) → Widget
Builds the Flutter widget tree for this session. Tool call / resource subscribe / notification routing are wired inside — hosts do not need to pass callbacks.
close() → Future<void>
Unsubscribe resources and destroy the underlying runtime. The server connection (if any) is not terminated because another session may be sharing it — hosts disconnect explicitly via the connection manager when they truly want the transport closed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerIdentityPromotion({IdentityPromoter? onPromote, IdentityPromoter? onRelease}) → void
Wire how this host turns a guest into an identified viewer, and back (platform spec 19 §5.3).
toString() → String
A string representation of this object.
inherited

Operators

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