Miniapp SDK
The Miniapp SDK lets you add focused tools and user interfaces to The AI Platform without coupling your application to the host implementation. A miniapp is an independently built package whose descriptor declares its targets, contributions, permissions, and compatibility range.
Use @theaiplatform/miniapp-sdk to:
- mount an isolated user interface in a supported platform surface;
- call host capabilities granted to the current package, release, and frame;
- publish and subscribe to declared package events;
- build target-specific Module Federation graphs;
- assemble and verify one immutable multi-target package; and
- follow a development deployment without restarting The AI Platform.
Trust Boundary
The host verifies the package descriptor, release identity, integrity metadata, and requested contribution before evaluating remote code. It then creates an isolated realm and supplies only the context and capabilities authorized for that exact installation.
Your miniapp must use the public SDK for host work. Do not import Tauri bindings, construct a host transport, read host globals, or send hand-written messages to the parent frame. Those details are not part of the public contract and can bypass neither permissions nor release verification.
Authentication and Authorization
The host owns user authentication. A miniapp may inspect the current signed-in profile through a granted SDK capability, but it never receives the user's raw platform credential.
Authorization is separate from authentication. Declaring an effect in manifest.tap.json explains what a contribution may request; it does not grant access by itself. The host evaluates the current user, workspace, package, contribution, scope, and consent policy for each protected operation. Calls can therefore fail after mount if a grant is revoked or the active scope changes.
Supported Targets
A package can contain one or several targets. Every declared target is compiled independently and assembled into one release identity.
Compatibility
The package descriptor declares compatible SDK and host ranges. The host checks those ranges before remote loading and fails closed when they do not match. Build tooling also exposes its supported peer ranges through the npm package.
Use an exact supported Module Federation version across the related build packages. The current stable baseline is 2.8.0; do not mix runtime, manifest, or build-plugin versions within one miniapp.
Start Building
Follow the Quickstart to build a complete desktop surface, then read Deploy and Live Update to follow a development environment from The AI Platform.
The API reference lists every supported package entry point. The npm registry is the canonical installation source for @theaiplatform/miniapp-sdk.
License and Public Policies
Downloading, installing, copying, accessing, or using the SDK constitutes acceptance of the Miniapp SDK Proprietary License Agreement. The SDK has no separate license fee and is provided as-is. High-impact and regulated uses are not categorically prohibited, but developers and users undertake them at their own risk and remain responsible for applicable law, appropriate professional or human review, notices, consent, and safeguards.