marona 1.1.4
marona: ^1.1.4 copied to clipboard
Universal Model Gateway and MCP/Skill SDK with mandatory project-scoped Marona authentication.
Marona Dart SDK #
Universal Model Gateway and MCP/Skill client for Dart 3.10+ and Flutter.
Install #
dependencies:
marona: ^1.1.4
Authentication #
A project-scoped Marona Developer Key is mandatory for every client and every
runtime mode. Native Dart reads MARONA_API_KEY; Flutter Web and other
platforms without process environments must pass it explicitly.
final marona = Marona(apiKey: maronaDeveloperKey);
Missing, invalid, revoked, and expired keys raise typed
MaronaAuthenticationException errors. Create and rotate keys in the Marona
Developer Portal. Never embed a production key in a client application.
Universal Model Gateway #
final response = await marona.responses.create(
model: 'marona/auto',
input: 'Review this architecture.',
routing: const RoutingOptions(
strategy: 'balanced',
allowedModels: [
'marona/auto',
'marona/company-assistant',
],
),
);
print(response.output);
Every model name must use the marona/* namespace. marona/auto delegates
selection to the project-scoped Model Registry; named aliases such as
marona/company-assistant are resolved there. Provider credentials and custom
endpoints are configured once in the Developer Portal or Model Registry API.
They are write-only and never exposed through this SDK.
All calls—including registered Edge models—go through authenticated Marona Runtime. There is no direct-provider or in-process model bypass.
Agents and Hub tools #
final tools = await marona.hub.connect(apps: ['sda-books']);
final agent = Agent(
name: 'Customer Assistant',
model: 'marona/auto',
instructions: 'Help clearly.',
tools: tools,
);
final result = await Runner.run(
agent,
'Download Steps to Christ',
userId: 'customer_482',
sessionId: 'chat_91a7',
);
The same agent works with streaming, realtime, handoffs, delegation, A2A peers, validated local function tools, lifecycle hooks, and published Marona Skills. Model invocation always remains behind Marona Runtime and the Model Registry.
Errors #
Gateway failures expose provider-neutral fields: code, requestId,
retryable, requiredAction, retryAfterMs, and safe details. Typed
classes cover authentication, namespace/model, credits, upstream service,
custom model, billing, and Marona availability failures. Runtime responses
expose only safe model-routing fields and never upstream endpoints, credentials,
or raw provider payloads.
External MCP federation #
final tools = await marona.hub.connect(
apps: ['microsoft-365'],
);
Marona manages the Microsoft OAuth client; each application user only follows the authorization URL returned by the first protected tool call and consents. Use the same runtime user ID afterward. The managed connection covers Outlook, Calendar, OneDrive, Excel, PowerPoint, and SharePoint, subject to the signed-in user's permissions and tenant policy.
An unscoped connect() returns every capability available to the developer
key. External calls always pass through Marona's governed gateway; upstream
credentials and direct external endpoints are never returned to the SDK.
Release #
Version 1.1.4 is published to pub.flutter-io.cn from tag dart-v1.1.4 after analysis,
tests, and package validation succeed on main.