跳到主要内容

Manifest Reference

Every mini-program, addon, and plugin requires a manifest.json file that describes the extension's metadata, permissions, and entry points. The manifest follows the Manifest v2 schema.

Minimal Example

The simplest valid manifest for a mini-program:

{
"name": "my-app",
"version": "1.0.0",
"abi": 1,
"type": "mini-program",
"entry": "index.html",
"base_url": "https://cdn.example.com/my-app/"
}

Full Example

A complete manifest with all commonly used fields:

{
"name": "word-counter",
"version": "1.2.0",
"abi": 1,
"type": "mini-program",
"title": "Word Counter",
"description": "Count words in your chat history by role and visualize trends",
"icon": "https://cdn.example.com/word-counter/icon.png",
"author": {
"name": "Jane Developer",
"url": "https://janedev.com"
},
"entry": "index.html",
"base_url": "https://cdn.example.com/word-counter/",
"permissions": ["storage", "chat:read", "ui:toast"],
"keywords": ["statistics", "utility", "word-count"],
"license": "MIT",
"repository": "https://github.com/janedev/word-counter",
"min_platform_version": "1.0.0"
}

Field Reference

Required Fields

name

Unique package name. Used as the internal identifier for storage isolation, installation checks, and registry lookups.

PropertyValue
Typestring
Pattern^[a-z0-9-]+$ (lowercase letters, digits, hyphens only)
Max length64 characters
RequiredYes
"name": "word-counter"
警告

The name must be globally unique within the registry. Choose a descriptive name. You cannot change it after publishing without creating a new package entry.

version

Semantic version string. Must follow semver format.

PropertyValue
Typestring
Pattern^\d+\.\d+\.\d+ (major.minor.patch, optional prerelease)
RequiredYes
"version": "1.0.0"

When updating your app in the registry, bump the version in both the manifest and the registry/packages.json entry.

abi

ABI (Application Binary Interface) version that this manifest targets. Must be 1 for the current platform.

PropertyValue
Typeinteger
Const1
RequiredTechnically optional, but strongly recommended
"abi": 1

The platform rejects manifests with abi values other than 1. If omitted, the platform assumes ABI 1 but explicit declaration is preferred for forward compatibility.

type

Extension type. Determines the runtime environment and available capabilities.

PropertyValue
Typestring
Enum"plugin", "addon", "mini-program"
Default"plugin"
"type": "mini-program"
TypeRuntimeUI SurfaceRequirements
pluginWASM (kernel slots 4-7)None (hooks only)wasm + wasm_sha256
addonWASM or JSNamed UI slotswasm or entry
mini-programSandboxed iframe (null origin)Full panel (replaces chat)entry + base_url

entry

Path to the entry HTML file, relative to base_url.

PropertyValue
Typestring
RequiredYes for mini-programs and HTML addons
"entry": "index.html"

The platform fetches {base_url}{entry} at install time and caches the HTML for offline use.

base_url

Base URL for resolving the entry file and relative asset paths (images, scripts, stylesheets).

PropertyValue
Typestring (URI)
RequiredYes for mini-programs
"base_url": "https://cdn.example.com/word-counter/"

A <base href="{base_url}"> tag is injected into the iframe so relative paths in your HTML resolve correctly.

信息

For .ais bundles installed from file upload, base_url is set to local:// automatically since all assets are inlined.

Optional Metadata Fields

title

Human-readable display name shown in the App Store and permission dialog. If omitted, name is used.

PropertyValue
Typestring
"title": "Word Counter"

description

Short description for the store listing and permission dialog.

PropertyValue
Typestring
Max length256 characters
"description": "Count words in your chat history by role and visualize trends"

icon

URL to a square icon image. Recommended size: 128x128 PNG. Displayed in the apps grid and store listing.

PropertyValue
Typestring (URI)
"icon": "https://cdn.example.com/word-counter/icon.png"
提示

Use a square PNG at 128x128 pixels with a transparent or dark background to match the platform's dark theme. SVG is also accepted.

author

Author information.

PropertyValue
Typeobject
Propertiesname (string, max 100), url (string, URI)
"author": {
"name": "Jane Developer",
"url": "https://janedev.com"
}

license

SPDX license identifier.

PropertyValue
Typestring
"license": "MIT"

repository

Source repository URL.

PropertyValue
Typestring (URI)
"repository": "https://github.com/janedev/word-counter"

keywords

Search keywords for discoverability in the App Store.

PropertyValue
Typestring[]
Max items10
Max per keyword32 characters
"keywords": ["statistics", "utility", "word-count"]

min_platform_version

Minimum AI Supreme Council platform version required to run this extension.

PropertyValue
Typestring (semver)
"min_platform_version": "1.0.0"

Permissions

permissions

Array of permission strings that the extension requests. The user must approve these at install time.

PropertyValue
Typestring[]
Unique itemsYes
"permissions": ["storage", "chat:read", "ui:toast"]

Available Permissions

PermissionDescriptionAuto-granted?
storagePer-app isolated key-value storageYes (always allowed)
chat:readRead chat history and subscribe to new messagesNo
chat:writeSend messages as the user (triggers AI responses)No
config:readRead the active bot configuration (provider, model, system prompt)No
config:writeModify the active bot configurationNo
auth:readRead user info (name, email, profile picture) and subscription tierNo
ui:toastShow toast notifications in the platform UINo
ui:modalShow confirmation dialogsNo
hooks:actionRegister and fire hook eventsNo
hooks:filterRegister filter hooksNo
network:fetchMake proxied network requests through the platform (future)No
secrets:syncRead and write API keys for device-to-device transferNo
pages:publishPublish web pages to bcz.coNo
注意

Request only the permissions your app actually needs. Each additional permission increases the barrier to installation -- users are more likely to approve apps with fewer permissions.

Plugin-Specific Fields

These fields are used by plugins and WASM addons, not by mini-programs.

wasm

URL to the WASM binary.

PropertyValue
Typestring (URI)
RequiredFor plugins
"wasm": "https://cdn.example.com/my-plugin/plugin.wasm"

wasm_sha256

SHA-256 hex digest of the WASM binary for integrity verification.

PropertyValue
Typestring
Pattern^[0-9a-f]{64}$
RequiredFor plugins
"wasm_sha256": "a1b2c3d4e5f6..."

segment_size

WASM module memory segment size in bytes.

PropertyValue
Typeinteger
Minimum0
"segment_size": 4194304

Advanced Fields

pages

Additional page paths for multi-page mini-programs.

PropertyValue
Typestring[]
"pages": ["settings.html", "about.html"]

hooks

Hook registrations for plugins and addons. Each hook has a name and optional priority.

PropertyValue
Typeobject[]
"hooks": [
{ "name": "chat:before-send", "priority": 50 },
{ "name": "message:filter", "priority": 100 }
]

Hook names must match ^[a-z][a-z0-9_.:-]*$ and be at most 128 characters. Priority ranges from 0 (earliest) to 999 (latest), defaulting to 100.

settings

User-configurable settings that appear in the platform's Settings UI.

PropertyValue
Typeobject (keys are setting names, values are setting definitions)
"settings": {
"theme": {
"type": "select",
"label": "Color Theme",
"default": "dark",
"options": [
{ "value": "dark", "label": "Dark" },
{ "value": "light", "label": "Light" }
]
},
"maxMessages": {
"type": "number",
"label": "Max messages to analyze",
"default": 500,
"description": "Limit the number of chat messages loaded"
},
"autoRefresh": {
"type": "boolean",
"label": "Auto-refresh on open",
"default": true
}
}

Setting types: string, number, boolean, select.

mcp_tools

MCP (Model Context Protocol) tool declarations provided by this extension.

PropertyValue
Typeobject[]
"mcp_tools": [
{
"name": "count-words",
"description": "Count words in the given text",
"inputSchema": {
"type": "object",
"properties": {
"text": { "type": "string" }
},
"required": ["text"]
}
}
]

Type-Specific Requirements

FieldPluginAddonMini-Program
nameRequiredRequiredRequired
versionRequiredRequiredRequired
type"plugin""addon""mini-program"
wasmRequiredRequired if no entryNot used
wasm_sha256RequiredRequired if using wasmNot used
entryNot usedRequired if no wasmRequired
base_urlNot usedOptionalRequired

Validation

Use the built-in validation script to check your manifest before publishing:

# Validate a single manifest file
python3 registry/validate.py manifest path/to/manifest.json

The validator checks:

  • Required fields are present
  • name matches the pattern ^[a-z0-9-]+$ and is at most 64 characters
  • version is valid semver
  • abi is 1 (if present)
  • type is one of plugin, addon, mini-program
  • Permissions are from the allowed set
  • Type-specific required fields are present (e.g., entry for mini-programs)
  • No unknown fields (schema is strict with additionalProperties: false)
提示

The JSON Schema is published at registry/manifest-schema.json. You can use it with any JSON Schema validator for IDE integration or CI pipelines.


Schema Reference

The manifest schema is defined as JSON Schema (Draft 2020-12) and is available at:

https://aiscouncil.com/schema/manifest/v2

Reference it in your manifest for editor autocompletion:

{
"$schema": "https://aiscouncil.com/schema/manifest/v2",
"name": "my-app",
"version": "1.0.0"
}

Most editors (VS Code, JetBrains, etc.) will provide autocompletion and validation when the $schema field is present.