appplayer_core 0.1.6
appplayer_core: ^0.1.6 copied to clipboard
AppPlayer Core — shared Flutter library for MCP server connection, bundle handling, and UI runtime orchestration.
AppPlayer Core #
Shared Flutter library for AppPlayer — MCP server connection, bundle handling, and UI runtime orchestration. The single dependency surface for appplayer_* shells (Standard / Pro / X / Custom).
Features #
- AppPlayerCoreService — single orchestrator that owns the connection lifecycle, app/dashboard sessions, bundle install pipeline, and tool dispatch.
- Session model —
AppSession,DashboardSession,AppHandleprovide the public surface for a running app or dashboard. - Connection observability —
ConnectionInfo,ConnectionResult,ConnectionState,ConnectionHealthMonitorfor connection status + auto-recovery. - Bundle handles + host ports —
BundleRef,BundleEntryPoint,BundleFetcher,InstalledAppBundle, plus dashboard bundle composition. - Apps registry —
AppsRegistryis the single source of truth for registered apps;RegistryMetadataSinkkeeps metadata fresh automatically. - Tenant model —
TenantContext,TenantSourcefor multi-tenant variants. - Host ports —
ServerStorage,CredentialVault,AppMetadataSink, observabilityLoggerandMetricsPort. - Form-factor + responsive tokens — re-exports
FormFactor,AppSpacing/Icons/Typography/Densityand the M3 DSL version constant fromflutter_mcp_ui_runtimeso hosts can stay onappplayer_coreonly. - Trust levels — re-exported
TrustLevel/TrustLevelManagerfor permission enforcement.
Public surface #
The barrel package:appplayer_core/appplayer_core.dart is semver-tracked. Internal wiring (ConnectionManager, RuntimeManager, ToolDispatcher, etc.) lives in package:appplayer_core/internals.dart for advanced hosts and is not semver-stable.
Quick Start #
import 'package:appplayer_core/appplayer_core.dart';
final core = AppPlayerCoreService(
appsRegistry: AppsRegistry(),
serverStorage: myServerStorage,
credentialVault: myCredentialVault,
);
// Connect to an MCP server
final result = await core.connect(
ServerConfig(
id: 'my_server',
transport: TransportType.streamableHttp,
url: 'https://my-mcp-server.example/mcp',
),
);
// Open an app session
final app = await core.openApp(serverId: 'my_server', appId: 'my_app');
Support #
License #
MIT — see LICENSE.