Cursor plugin specification and official plugins
TypeScript
Add JSON schemas for plugin and marketplace manifests
ericzakariasson920a87f3e71e
diff --git a/schemas/marketplace.schema.json b/schemas/marketplace.schema.jsonnew file mode 100644index 00000000..70eba0f5--- /dev/null+++ b/schemas/marketplace.schema.json@@ -0,0 +1,77 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "$id": "https://cursor.com/schemas/cursor-plugin/marketplace.json",+ "title": "Cursor Plugin Marketplace",+ "description": "Schema for .cursor-plugin/marketplace.json — defines a marketplace that indexes one or more Cursor plugins.",+ "type": "object",+ "required": ["name", "plugins"],+ "additionalProperties": false,+ "properties": {+ "name": {+ "type": "string",+ "minLength": 1,+ "description": "Unique identifier for the marketplace."+ },+ "owner": {+ "$ref": "#/$defs/owner",+ "description": "The marketplace owner or organisation."+ },+ "metadata": {+ "type": "object",+ "additionalProperties": true,+ "properties": {+ "description": {+ "type": "string",+ "description": "Short description of the marketplace."+ }+ },+ "description": "Arbitrary metadata about the marketplace."+ },+ "plugins": {+ "type": "array",+ "items": { "$ref": "#/$defs/pluginEntry" },+ "description": "List of plugins available in the marketplace."+ }+ },+ "$defs": {+ "owner": {+ "type": "object",+ "required": ["name"],+ "additionalProperties": false,+ "properties": {+ "name": {+ "type": "string",+ "minLength": 1,+ "description": "Owner or organisation name."+ },+ "email": {+ "type": "string",+ "format": "email",+ "description": "Contact email address."+ }+ }+ },+ "pluginEntry": {+ "type": "object",+ "required": ["name", "source"],+ "additionalProperties": false,+ "properties": {+ "name": {+ "type": "string",+ "minLength": 1,+ "pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",+ "description": "Plugin identifier matching the plugin's name in its plugin.json."+ },+ "source": {+ "type": "string",+ "minLength": 1,+ "description": "Path to the plugin directory (relative to the marketplace root) or a remote URL."+ },+ "description": {+ "type": "string",+ "description": "Short description of the plugin."+ }+ }+ }+ }+}diff --git a/schemas/plugin.schema.json b/schemas/plugin.schema.jsonnew file mode 100644index 00000000..19c642ef--- /dev/null+++ b/schemas/plugin.schema.json@@ -0,0 +1,131 @@+{+ "$schema": "http://json-schema.org/draft-07/schema#",+ "$id": "https://cursor.com/schemas/cursor-plugin/plugin.json",+ "title": "Cursor Plugin Manifest",+ "description": "Schema for .cursor-plugin/plugin.json — defines a single Cursor plugin's metadata, components, and configuration.",+ "type": "object",+ "required": ["name"],+ "additionalProperties": false,+ "properties": {+ "name": {+ "type": "string",+ "minLength": 1,+ "pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",+ "description": "Unique plugin identifier in kebab-case (lowercase alphanumeric with hyphens and periods)."+ },+ "displayName": {+ "type": "string",+ "description": "Human-readable display name for the plugin."+ },+ "description": {+ "type": "string",+ "description": "Short description of what the plugin does."+ },+ "version": {+ "type": "string",+ "description": "Semantic version of the plugin (e.g. \"1.2.3\")."+ },+ "author": {+ "$ref": "#/$defs/author",+ "description": "The plugin author."+ },+ "publisher": {+ "type": "string",+ "minLength": 1,+ "description": "Publisher or organisation name."+ },+ "homepage": {+ "type": "string",+ "format": "uri",+ "description": "URL to the plugin's homepage."+ },+ "repository": {+ "type": "string",+ "format": "uri",+ "description": "URL to the plugin's source code repository."+ },+ "license": {+ "type": "string",+ "description": "SPDX license identifier (e.g. \"MIT\", \"Apache-2.0\")."+ },+ "logo": {+ "type": "string",+ "description": "Path to a logo image (relative to the plugin root) or an absolute URL."+ },+ "keywords": {+ "type": "array",+ "items": { "type": "string" },+ "description": "Keywords for discovery and search."+ },+ "commands": {+ "$ref": "#/$defs/stringOrStringArray",+ "description": "Glob pattern(s) or path(s) to command files."+ },+ "agents": {+ "$ref": "#/$defs/stringOrStringArray",+ "description": "Glob pattern(s) or path(s) to agent definition files."+ },+ "skills": {+ "$ref": "#/$defs/stringOrStringArray",+ "description": "Glob pattern(s) or path(s) to skill files."+ },+ "rules": {+ "$ref": "#/$defs/stringOrStringArray",+ "description": "Glob pattern(s) or path(s) to rule files."+ },+ "hooks": {+ "oneOf": [+ { "type": "string" },+ { "type": "object" }+ ],+ "description": "Path to a hooks configuration file, or an inline hooks object."+ },+ "mcpServers": {+ "$ref": "#/$defs/mcpServers",+ "description": "MCP server configuration — a path, an inline config object, or an array of either."+ }+ },+ "$defs": {+ "author": {+ "type": "object",+ "required": ["name"],+ "additionalProperties": false,+ "properties": {+ "name": {+ "type": "string",+ "minLength": 1,+ "description": "Author name."+ },+ "email": {+ "type": "string",+ "format": "email",+ "description": "Author email address."+ }+ }+ },+ "stringOrStringArray": {+ "oneOf": [+ { "type": "string" },+ {+ "type": "array",+ "items": { "type": "string" }+ }+ ]+ },+ "mcpServers": {+ "oneOf": [+ { "type": "string" },+ { "type": "object" },+ {+ "type": "array",+ "items": {+ "oneOf": [+ { "type": "string" },+ { "type": "object" }+ ]+ }+ }+ ]+ }+ }+}