Skip to content

Manifest schema

Every Sidebar Tab module ships a canopi-tab.json manifest. The host reads this file to register permissions, entry points, and lifecycle hooks.

Minimal example

json
{
  "id": "archive-assistant",
  "name": "Archive Assistant",
  "version": "1.0.0",
  "description": "Archive pages to external services",
  "author": "Your Name",
  "icons": {
    "16": "icons/icon-16.png",
    "48": "icons/icon-48.png",
    "128": "icons/icon-128.png"
  },
  "entry": {
    "main": "dist/index.js",
    "styles": ["dist/styles.css"]
  },
  "permissions": {
    "required": ["page:url", "network:fetch"],
    "optional": ["archive:wayback"]
  }
}

Top-level fields

FieldRequiredDescription
idyesUnique module id (kebab-case)
nameyesDisplay name
versionyesSemver string
descriptionyesShort summary
authoryesAuthor or org name
iconsyes16 / 48 / 128 px PNG paths
entry.mainyesBundled JS entry
entry.stylesnoCSS file paths
permissionsnoRequired and optional scopes

Permission scopes

ScopeAccess
page:urlCurrent page URL
page:contentDOM / page content
user:profileRead user profile
user:preferencesRead/write preferences
storage:localTab-local storage
storage:syncSynced storage
network:fetchExternal HTTP via host proxy
archive:waybackWayback Machine archiving
archive:ipfsIPFS archiving
timeline:read / timeline:writeTimeline access
diagnostics:read / diagnostics:writeDebug telemetry

Declare scopes in permissions.required (blocked without grant) or permissions.optional (prompted on first use).

Configuration schema

Optional user settings:

json
{
  "config": {
    "settings": {
      "defaultService": {
        "type": "select",
        "label": "Default archive service",
        "default": "wayback",
        "options": ["wayback", "archive.today"]
      }
    }
  }
}

Supported types: string, number, boolean, select, multiselect, json.

Lifecycle hooks

json
{
  "lifecycle": {
    "onInit": "handleInit",
    "onActivate": "handleActivate",
    "onDeactivate": "handleDeactivate",
    "onDestroy": "handleDestroy"
  }
}

Validation

Machine-readable schema in the repo:

docs/schemas/canopi-tab-manifest-v1.schema.json

Example manifest:

docs/examples/archive-assistant-manifest.json

Canopi — Metaweb coordination layer for community-aware presence and messaging.