Descriptor JSON Schema

The package exports config-schema.json as @theaiplatform/miniapp-sdk/config-schema.json. Assign that path to $schema in manifest.tap.json for editor completion and validation that follows the installed SDK version.

{
  "$schema": "./node_modules/@theaiplatform/miniapp-sdk/config-schema.json",
  "descriptorVersion": 1
}

The schema covers package identity, release identity, presentation, compatibility, target graphs, contributions, permissions, and package events. Unknown fields fail where the format closes an object, which catches misspellings before publication.

Validate Both Forms

Validate the source descriptor before compilation and validate the assembled descriptor again. Source builds can use pending integrity and digest placeholders; assembleTapPackage replaces them with values computed from the emitted package graph.

import schema from '@theaiplatform/miniapp-sdk/config-schema.json' with { type: 'json' };

Use a JSON Schema 2020-compatible validator. Report validation paths and messages without including secrets or authentication material.

Versioning

Reference the schema from the installed package instead of copying it into your repository. Upgrade the SDK and schema together, then validate and build every target before selecting an existing miniapp release for production.

Schema validation proves structural compatibility. It does not prove that a publisher owns an identifier, a host grants a permission, an emitted asset matches its integrity, or a release can activate.