Variable: pluginManifestSchema
constpluginManifestSchema:object
Defined in: src/plugins/core/manifest-schema.ts:96
JSON Schema for plugin manifest validation.
Type declaration
$id
readonly$id:"https://chive.pub/schemas/plugin-manifest.json"='https://chive.pub/schemas/plugin-manifest.json'
$schema
readonly$schema:"http://json-schema.org/draft-07/schema#"='http://json-schema.org/draft-07/schema#'
additionalProperties
readonlyadditionalProperties:false=false
description
readonlydescription:"Schema for Chive plugin manifest files (plugin.json)"='Schema for Chive plugin manifest files (plugin.json)'
properties
readonlyproperties:object
properties.author
readonlyauthor:object
properties.author.description
readonlydescription:"Author name or organization"='Author name or organization'
properties.author.examples
readonlyexamples: readonly ["Chive Team","Jane Doe <jane@example.com>"]
properties.author.maxLength
readonlymaxLength:200=200
properties.author.minLength
readonlyminLength:1=1
properties.author.type
readonlytype:"string"='string'
properties.dependencies
readonlydependencies:object
properties.dependencies.description
readonlydescription:"Plugin dependencies (other plugin IDs that must be loaded first)"='Plugin dependencies (other plugin IDs that must be loaded first)'
properties.dependencies.items
readonlyitems:object
properties.dependencies.items.pattern
readonlypattern: "^[a-z][a-z0-9]*(\.[a-z][a-z0-9-]*)+$" ='^[a-z][a-z0-9]*(\\.[a-z][a-z0-9-]*)+$'
properties.dependencies.items.type
readonlytype:"string"='string'
properties.dependencies.maxItems
readonlymaxItems:10=10
properties.dependencies.type
readonlytype:"array"='array'
properties.dependencies.uniqueItems
readonlyuniqueItems:true=true
properties.description
readonlydescription:object
properties.description.description
readonlydescription:"Brief description of what the plugin does"='Brief description of what the plugin does'
properties.description.maxLength
readonlymaxLength:500=500
properties.description.minLength
readonlyminLength:10=10
properties.description.type
readonlytype:"string"='string'
properties.entrypoint
readonlyentrypoint:object
properties.entrypoint.description
readonlydescription:"Relative path to plugin entry point"='Relative path to plugin entry point'
properties.entrypoint.examples
readonlyexamples: readonly ["dist/index.js","lib/main.mjs"]
properties.entrypoint.maxLength
readonlymaxLength:256=256
properties.entrypoint.pattern
readonlypattern: "^[a-zA-Z0-9_\-./]+\.(js|mjs)$" ='^[a-zA-Z0-9_\\-./]+\\.(js|mjs)$'
properties.entrypoint.type
readonlytype:"string"='string'
properties.id
readonlyid:object
properties.id.description
readonlydescription: "Unique plugin identifier in reverse domain notation (e.g., "pub.chive.plugin.github")" ='Unique plugin identifier in reverse domain notation (e.g., "pub.chive.plugin.github")'
properties.id.examples
readonlyexamples: readonly ["pub.chive.plugin.github","org.orcid.chive-integration","com.example.my-plugin"]
properties.id.maxLength
readonlymaxLength:128=128
properties.id.minLength
readonlyminLength:3=3
properties.id.pattern
readonlypattern: "^[a-z][a-z0-9]*(\.[a-z][a-z0-9-]*)+$" ='^[a-z][a-z0-9]*(\\.[a-z][a-z0-9-]*)+$'
properties.id.type
readonlytype:"string"='string'
properties.license
readonlylicense:object
properties.license.description
readonlydescription:"SPDX license identifier"='SPDX license identifier'
properties.license.enum
readonlyenum: readonly ["MIT","Apache-2.0","GPL-3.0","GPL-3.0-only","GPL-3.0-or-later","BSD-2-Clause","BSD-3-Clause","ISC","MPL-2.0","LGPL-3.0","AGPL-3.0","Unlicense","UNLICENSED"]
properties.license.type
readonlytype:"string"='string'
properties.name
readonlyname:object
properties.name.description
readonlydescription:"Human-readable plugin name"='Human-readable plugin name'
properties.name.examples
readonlyexamples: readonly ["GitHub Integration","ORCID Linking"]
properties.name.maxLength
readonlymaxLength:100=100
properties.name.minLength
readonlyminLength:1=1
properties.name.type
readonlytype:"string"='string'
properties.permissions
readonlypermissions:object=pluginPermissionsSchema
properties.permissions.additionalProperties
readonlyadditionalProperties:false=false
properties.permissions.properties
readonlyproperties:object
properties.permissions.properties.hooks
readonlyhooks:object
properties.permissions.properties.hooks.description
readonlydescription:"Event hooks the plugin can subscribe to"='Event hooks the plugin can subscribe to'
properties.permissions.properties.hooks.items
readonlyitems:object
properties.permissions.properties.hooks.items.type
readonlytype:"string"='string'
properties.permissions.properties.hooks.maxItems
readonlymaxItems:50=50
properties.permissions.properties.hooks.type
readonlytype:"array"='array'
properties.permissions.properties.hooks.uniqueItems
readonlyuniqueItems:true=true
properties.permissions.properties.network
readonlynetwork:object
properties.permissions.properties.network.additionalProperties
readonlyadditionalProperties:false=false
properties.permissions.properties.network.properties
readonlyproperties:object
properties.permissions.properties.network.properties.allowedDomains
readonlyallowedDomains:object
properties.permissions.properties.network.properties.allowedDomains.description
readonlydescription:"Domains the plugin can make HTTP requests to"='Domains the plugin can make HTTP requests to'
properties.permissions.properties.network.properties.allowedDomains.items
readonlyitems:object
properties.permissions.properties.network.properties.allowedDomains.items.type
readonlytype:"string"='string'
properties.permissions.properties.network.properties.allowedDomains.maxItems
readonlymaxItems:20=20
properties.permissions.properties.network.properties.allowedDomains.type
readonlytype:"array"='array'
properties.permissions.properties.network.properties.allowedDomains.uniqueItems
readonlyuniqueItems:true=true
properties.permissions.properties.network.required
readonlyrequired: readonly ["allowedDomains"]
properties.permissions.properties.network.type
readonlytype:"object"='object'
properties.permissions.properties.storage
readonlystorage:object
properties.permissions.properties.storage.additionalProperties
readonlyadditionalProperties:false=false
properties.permissions.properties.storage.properties
readonlyproperties:object
properties.permissions.properties.storage.properties.maxSize
readonlymaxSize:object
properties.permissions.properties.storage.properties.maxSize.description
readonlydescription:"Maximum storage size in bytes"='Maximum storage size in bytes'
properties.permissions.properties.storage.properties.maxSize.maximum
readonlymaximum:104857600=104857600
properties.permissions.properties.storage.properties.maxSize.minimum
readonlyminimum:0=0
properties.permissions.properties.storage.properties.maxSize.type
readonlytype:"number"='number'
properties.permissions.properties.storage.required
readonlyrequired: readonly ["maxSize"]
properties.permissions.properties.storage.type
readonlytype:"object"='object'
properties.permissions.type
readonlytype:"object"='object'
properties.version
readonlyversion:object
properties.version.description
readonlydescription:"Semantic version (semver 2.0)"='Semantic version (semver 2.0)'
properties.version.examples
readonlyexamples: readonly ["1.0.0","2.1.3-beta.1","0.9.0+build.123"]
properties.version.pattern
readonlypattern: "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$" ='^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$'
properties.version.type
readonlytype:"string"='string'
required
readonlyrequired: readonly ["id","name","version","description","author","license","permissions","entrypoint"]
title
readonlytitle:"Chive Plugin Manifest"='Chive Plugin Manifest'
type
readonlytype:"object"='object'
Remarks
This schema validates plugin.json files according to Chive's plugin manifest specification. All plugins must pass validation before loading.
Example
import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import { pluginManifestSchema } from './manifest-schema.js';
const ajv = new Ajv({ allErrors: true });
addFormats(ajv);
const validate = ajv.compile(pluginManifestSchema);
const isValid = validate(manifestData);
if (!isValid) {
console.error('Validation errors:', validate.errors);
}