Appearance
Manifest (v2)
Every module has one manifest.json. The SDK's validator, @canopi-sdk/manifest, checks it, and Canopi runs the same validator again when you submit. A manifest declares exactly one kind: smart-tag, tablication, or overlay-app. Overlay apps are reserved: they validate, but no host runs them yet.
json
{
"manifestVersion": 2,
"kind": "smart-tag",
"id": "live.canopi.page-note-tag",
"name": "Page note",
"version": "1.0.0",
"description": "A short public note on a page.",
"author": { "name": "Canopi", "url": "https://canopi.live" },
"smartTag": { "…": "see Smart tags" }
}Top-level fields
| Field | Rules |
|---|---|
manifestVersion | 2 |
kind | smart-tag, tablication or overlay-app |
id | Reverse-DNS style. Pattern ^[a-z0-9][a-z0-9.-]{2,63}$. Unique across Canopi; the first submitter owns it. |
name, description | Shown to people, as plain text |
version | Semver. Each version can be submitted once. |
author | { name, url?, canopiHandle? }. Shown as "App by …" or "by …". |
lineage.forkedFrom | { moduleId, version } of a published version you forked, on your module's first version |
permissions | Tablications: what the bridge may do (see Tablications) |
network.connect | Tablications: up to 10 host names (api.example.org) the frame may fetch over https. Nothing else is reachable. |
triggers, activation | Where a module applies: page, selection, image, link, url-pattern, selector, anchor-present, smart-tag-present, always, manual. Overlay apps also use activation (show, list, badge). |
smartTag | Required when kind is smart-tag: see Smart tags |
tablication | Required when kind is tablication: { tab: { id, title, icon?, order? }, entry: { html }, contains? } |
Rules the schema can't express
The validator also checks:
- Summary and presentation fields: every field that
summaryorpresentationrefers to exists inpayloadSchema. - Schema limits:
payloadSchemais at most 16 KB.- At most 5 fields set
x-canopi-index, each one oftext,number,date,enum,ref.
- Popovers:
- A click popover needs
onClick: "openPopover". openPagePreviewneeds apagePreview.openTablicationneedssurfaces.home.
- A click popover needs
- Composer:
composer: "home"or"both"needssurfaces.home. - Reserved tag types: Canopi's own (
post,patch,insert,bridge,task,quote,question,tag,reply, …) can't be claimed. - Schema keywords:
payloadSchemamust compile (JSON Schema 2020-12) and may not usepattern,patternProperties,$reforformat: "regex". Regular expressions would run on Canopi's servers.$id,$schemaand anchors are ignored. - Reserved tab ids: built-in ones (
discuss-tab,patches-tab,agent-tab, …) can't be used, and neither can a tab id another module already uses. - Network:
network.connectmay not namecanopi.liveor any of its subdomains. The bridge is the only way to reach Canopi. - Contained tags: a tablication may only
containssmart tags its owner publishes. - Author name: "Canopi" is reserved for Canopi's own modules.
Validate locally before you submit:
bash
node scripts/build-module.mjs modules/page-note-tag # validates and writes dist/submission.json
