Quickstart
This guide builds a small desktop miniapp from an empty directory. It uses only packages available from the public npm registry.
Prerequisites
- Node.js 20 or later
- pnpm 10.33 or later
- TypeScript 5.9 or later
- A supported installation of The AI Platform for loading the result
Create the Project
Set the project to ESM and add build scripts:
Declare the Package
Create manifest.tap.json. Identifiers are permanent package identity, so replace the example publisher and organization values with identifiers assigned to you.
pending fields are build inputs, not values that a host trusts. The SDK build replaces them with the emitted graph's integrity and content digest.
The permission catalog declares the channels.list action used by the example, and the surface binds that action through authorization.allOf. These declarations request a grant; they do not create one. During installation, the user or workspace administrator must review and approve the requested channel-reading level before the button can list channels. A denied or later-revoked grant makes the SDK call reject, so the surface keeps its error handling.
Implement the Surface
The host installs the SDK capability session before it evaluates this module. Importing sdk is safe in any JavaScript environment, but reading one of its properties before the host session exists throws an unsupported-environment error.
Configure the Target Build
Assemble the independently built target into the publication directory:
Build
The complete package is now in dist. Load its manifest.tap.json through the Miniapps settings in The AI Platform, or continue to Deploy and Live Update.