From d2077c4c4480bbb3edf218d3f1f953fe4d4c6e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Johanovsky=CC=81?= Date: Thu, 12 Nov 2026 09:46:46 +0100 Subject: [PATCH 1/2] fix(claude): use only file types the Anthropic directory accepts The Anthropic plugin directory refused the plugin. From an organization that is not Verified, it accepts only Markdown, text, JSON, and YAML files, and PNG, JPEG, GIF, WebP, or ICO images. - Replace the SVG logo with a 512 x 512 PNG rendered from it. - Point the Codex and Cursor manifests at the PNG. - Set `icon` in the Claude manifest, so the directory reads the PNG as the plugin icon and shows it on the listing. - Rename the Cursor rule from .mdc to .md. Cursor loads both. --- plugins/macaly-code/.claude-plugin/plugin.json | 1 + plugins/macaly-code/.codex-plugin/plugin.json | 4 ++-- plugins/macaly-code/.cursor-plugin/plugin.json | 2 +- plugins/macaly-code/assets/logo.png | Bin 0 -> 12762 bytes plugins/macaly-code/assets/logo.svg | 4 ---- ...macaly.mdc => route-app-builds-to-macaly.md} | 0 6 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 plugins/macaly-code/assets/logo.png delete mode 100644 plugins/macaly-code/assets/logo.svg rename plugins/macaly-code/rules/{route-app-builds-to-macaly.mdc => route-app-builds-to-macaly.md} (100%) diff --git a/plugins/macaly-code/.claude-plugin/plugin.json b/plugins/macaly-code/.claude-plugin/plugin.json index 9b313f7..ae3fbe7 100644 --- a/plugins/macaly-code/.claude-plugin/plugin.json +++ b/plugins/macaly-code/.claude-plugin/plugin.json @@ -7,6 +7,7 @@ "url": "https://www.macaly.com" }, "homepage": "https://www.macaly.com", + "icon": "./assets/logo.png", "documentationUrl": "https://www.macaly.com/docs/en/welcome/overview", "supportUrl": "https://www.macaly.com/docs/en/welcome/faq#support", "privacyPolicyUrl": "https://www.macaly.com/privacy-policy", diff --git a/plugins/macaly-code/.codex-plugin/plugin.json b/plugins/macaly-code/.codex-plugin/plugin.json index 5690d43..27d07fb 100644 --- a/plugins/macaly-code/.codex-plugin/plugin.json +++ b/plugins/macaly-code/.codex-plugin/plugin.json @@ -25,8 +25,8 @@ "privacyPolicyURL": "https://www.macaly.com/privacy-policy", "termsOfServiceURL": "https://www.macaly.com/terms-of-service", "brandColor": "#000000", - "composerIcon": "./assets/logo.svg", - "logo": "./assets/logo.svg", + "composerIcon": "./assets/logo.png", + "logo": "./assets/logo.png", "defaultPrompt": [ "Build a customer feedback dashboard", "Build a landing page for my coffee shop", diff --git a/plugins/macaly-code/.cursor-plugin/plugin.json b/plugins/macaly-code/.cursor-plugin/plugin.json index bb9b369..c464f0a 100644 --- a/plugins/macaly-code/.cursor-plugin/plugin.json +++ b/plugins/macaly-code/.cursor-plugin/plugin.json @@ -23,5 +23,5 @@ "rules": "./rules/", "commands": "./commands/", "mcpServers": "./.mcp.universal.json", - "logo": "./assets/logo.svg" + "logo": "./assets/logo.png" } diff --git a/plugins/macaly-code/assets/logo.png b/plugins/macaly-code/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..17d0d1413743a99693e8afe47b0ab599d11bef1c GIT binary patch literal 12762 zcmY*=bzIb4^Y+=LOO_6UB_x%Wj+F*!R6vjvRs@tTfn7o=DM3QIElLnXNhPEuq@+Z; zk?!}qct5}Ue*fSDJ9}d0#C7JH8Nzh6RVhfBNdW*9>S{{*0KlO?;eePB`nBcNe*pa= zaZ)pO1wf({_XG1BrjG#t3DlLY-}D+;86!!eYpOckuo~L+OGFkezYpEjqcSE8t#7=K z6uPc^z2QFFyp53QJ-Wu}DVJ@Q>v7yPPt>e#3Sw-W!>+)ohp&fO8qyDoTUz9=niTvT zr3(4gAvrd8(-VW~-tW#JC%HWdX=t^(0)v8Ka%l^a8nao(5fOaD+lrGIc+n=Mz>O<3+U%MLw36+ zF~e4=E(uI8tCZb#2|2Q{;tZZN^ebtE*g-JopO4VY+R+Xw{SACf?YVMn>bRDVmLsCin@z zc96j_PBXl_^~|m@or9Xbx^ox~=XA#WR6mwrgaSN4c-7p^Hsr*EQ;g$&ic137`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gbP4ThO_b;5cLH&o-x@ZCR8 zDa!;StQ^Dn=I-L#&TXr33UJJuw|U=|ZRc(qqdZ9zi+7s?=%4Z-cU};=$`{ldN9^Y7{!H(si z98~S@N*4IgDln-aRpe)~OwdA%SIgB^;W73C5~xz1ZY?ZWtLbjrFrwnlv|!bp7Sp&} zRxe$~`FfOSa}KE$h&O~UD~rseUSBUi)Z7!|{1yLjz+~al2kAz?sUX7zsDZl4BG260 zS=QA`f(XetBu_yj;fxGMUR!c$r&Gct1F{97-{JSwlFPZ$rHgYf;?VtCQ-EuIlwE{; zM9ZkyA~*jOpD*rz1GI1TC~Q&7GsMMj{@76{)n2Bmf~5|*j!pQb9U8wM>-H!f literal 0 HcmV?d00001 diff --git a/plugins/macaly-code/assets/logo.svg b/plugins/macaly-code/assets/logo.svg deleted file mode 100644 index 143edbc..0000000 --- a/plugins/macaly-code/assets/logo.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/plugins/macaly-code/rules/route-app-builds-to-macaly.mdc b/plugins/macaly-code/rules/route-app-builds-to-macaly.md similarity index 100% rename from plugins/macaly-code/rules/route-app-builds-to-macaly.mdc rename to plugins/macaly-code/rules/route-app-builds-to-macaly.md From c5017177719786939250c037f278b43aec760272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=CC=81s=CC=8C=20Johanovsky=CC=81?= Date: Thu, 12 Nov 2026 09:47:02 +0100 Subject: [PATCH 2/2] chore: remove the validation scripts and the package manifest The Anthropic plugin directory refuses each file that starts with `#!` and each package manager configuration file. The three validators started with `#!`, and package.json is a package manager configuration file. - Remove scripts/ and package.json. - Remove the Cursor schemas, because only the validators read them. - Remove the Build workflow, because it ran the validators. - Record the directory file rules in docs/anthropic-submission.md. Commit 449edd5 has the last copy of the validators. --- .github/workflows/build.yml | 19 -- docs/anthropic-submission.md | 20 ++ package.json | 16 - schemas/marketplace.schema.json | 77 ----- schemas/plugin.schema.json | 134 -------- scripts/validate-codex.mjs | 433 -------------------------- scripts/validate-cursor-schema.mjs | 102 ------ scripts/validate-cursor-structure.mjs | 381 ---------------------- 8 files changed, 20 insertions(+), 1162 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 package.json delete mode 100644 schemas/marketplace.schema.json delete mode 100644 schemas/plugin.schema.json delete mode 100644 scripts/validate-codex.mjs delete mode 100644 scripts/validate-cursor-schema.mjs delete mode 100644 scripts/validate-cursor-structure.mjs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 2cec261..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build - -on: - push: - branches: [main] - - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - - - run: bun install - - - run: bun run build diff --git a/docs/anthropic-submission.md b/docs/anthropic-submission.md index bedba3f..d3ff547 100644 --- a/docs/anthropic-submission.md +++ b/docs/anthropic-submission.md @@ -56,6 +56,26 @@ auto-discover the universal endpoint. logs. It does not change project files, but the Claude profile conservatively treats that infrastructure side effect as a state-changing operation. +## Directory file rules + +The directory accepts scripts, programs, and other file types only from Verified +organizations. Until the Macaly organization is Verified, keep every file in this +repository inside these rules: + +- Use only Markdown, text, JSON, and YAML files, and PNG, JPEG, GIF, WebP, or ICO + images. +- Do not add a file that starts with `#!`. +- Do not add a package manager configuration file, such as package.json or + pnpm-workspace.yaml. +- Save each text file as UTF-8 with no NUL bytes. + +The license, the readme files, .gitignore, and the plugin icon can stay. The plugin +icon is the PNG logo that the `icon` field of the Claude manifest names. The Codex and +Cursor manifests use the same file. + +The Cursor and Codex validators and the CI workflow that ran them broke these rules, +so the repository does not hold them. Commit `449edd5` has the last copy. + ## Review preparation 1. Deploy the Claude endpoint and verify its OAuth metadata at diff --git a/package.json b/package.json deleted file mode 100644 index c3d0592..0000000 --- a/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "macaly-agent-plugins", - "type": "module", - "private": true, - "scripts": { - "build": "bun ./scripts/validate-cursor-schema.mjs && bun ./scripts/validate-cursor-structure.mjs && bun ./scripts/validate-codex.mjs" - }, - "devDependencies": { - "@types/bun": "latest", - "ajv": "^8.18.0", - "ajv-formats": "^3.0.1" - }, - "peerDependencies": { - "typescript": "^5" - } -} diff --git a/schemas/marketplace.schema.json b/schemas/marketplace.schema.json deleted file mode 100644 index 70eba0f..0000000 --- a/schemas/marketplace.schema.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "$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.json deleted file mode 100644 index a88db49..0000000 --- a/schemas/plugin.schema.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "$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." - }, - "category": { - "type": "string", - "description": "Plugin category for marketplace classification." - }, - "tags": { - "type": "array", - "items": { "type": "string" }, - "description": "Tags for filtering and discovery." - }, - "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" }] - } - } - ] - } - } -} diff --git a/scripts/validate-codex.mjs b/scripts/validate-codex.mjs deleted file mode 100644 index fb5586c..0000000 --- a/scripts/validate-codex.mjs +++ /dev/null @@ -1,433 +0,0 @@ -#!/usr/bin/env node - -/** - * Codex plugin validator — ported from codex-rs/core/src/plugins/marketplace.rs - * and codex-rs/core/src/plugins/manifest.rs - */ - -import { readFileSync, existsSync, readdirSync, statSync } from "fs"; -import { resolve, dirname, basename, relative } from "path"; -import { fileURLToPath } from "url"; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const root = resolve(__dirname, ".."); - -let errors = 0; -let warnings = 0; - -function fail(message) { - console.error(`ERROR: ${message}`); - errors++; -} - -function warn(message) { - console.warn(`WARN: ${message}`); - warnings++; -} - -function loadJSON(path, context) { - let raw; - try { - raw = readFileSync(path, "utf-8"); - } catch { - fail(`${context}: file not found at ${relative(root, path)}`); - return null; - } - try { - return JSON.parse(raw); - } catch (err) { - fail(`${context}: invalid JSON — ${err.message}`); - return null; - } -} - -// --- Path validation (mirrors resolve_manifest_path / resolve_plugin_source_path) --- - -function isValidRelativePath(path) { - if (typeof path !== "string" || path.length === 0) return false; - const stripped = path.startsWith("./") ? path.slice(2) : null; - if (stripped === null) return false; - if (stripped.length === 0) return false; - // Must not contain .. or other non-normal components - const segments = stripped.replace(/\/+$/, "").split("/"); - return segments.every((s) => s.length > 0 && s !== ".." && s !== "."); -} - -// --- Marketplace validation (mirrors marketplace.rs) --- - -function validateMarketplace() { - const marketplacePath = resolve( - root, - ".agents", - "plugins", - "marketplace.json" - ); - const marketplace = loadJSON(marketplacePath, "Marketplace"); - if (!marketplace) return; - - if (typeof marketplace.name !== "string" || marketplace.name.length === 0) { - fail("Marketplace: missing or empty `name`"); - } - - if (!Array.isArray(marketplace.plugins)) { - fail("Marketplace: `plugins` must be an array"); - return; - } - - for (const [index, plugin] of marketplace.plugins.entries()) { - const label = `Marketplace plugins[${index}]`; - - if (typeof plugin.name !== "string" || plugin.name.length === 0) { - fail(`${label}: missing or empty \`name\``); - continue; - } - - const pluginLabel = `Marketplace plugin "${plugin.name}"`; - - // Validate source - if (!plugin.source || typeof plugin.source !== "object") { - fail(`${pluginLabel}: \`source\` must be an object`); - continue; - } - - if (plugin.source.source !== "local") { - fail( - `${pluginLabel}: \`source.source\` must be "local", got "${plugin.source.source}"` - ); - continue; - } - - const sourcePath = plugin.source.path; - if (!isValidRelativePath(sourcePath)) { - fail( - `${pluginLabel}: \`source.path\` must be a relative path starting with "./" — got "${sourcePath}"` - ); - continue; - } - - // Resolve relative to marketplace root (2 levels up from .agents/plugins/marketplace.json) - const pluginDir = resolve(root, sourcePath.slice(2)); - - if (!existsSync(pluginDir) || !statSync(pluginDir).isDirectory()) { - fail(`${pluginLabel}: source directory does not exist — ${sourcePath}`); - continue; - } - - // Validate policy - const validInstallPolicies = [ - "NOT_AVAILABLE", - "AVAILABLE", - "INSTALLED_BY_DEFAULT", - ]; - const validAuthPolicies = ["ON_INSTALL", "ON_USE"]; - - if (plugin.policy) { - if ( - plugin.policy.installation && - !validInstallPolicies.includes(plugin.policy.installation) - ) { - fail( - `${pluginLabel}: invalid policy.installation "${plugin.policy.installation}"` - ); - } - if ( - plugin.policy.authentication && - !validAuthPolicies.includes(plugin.policy.authentication) - ) { - fail( - `${pluginLabel}: invalid policy.authentication "${plugin.policy.authentication}"` - ); - } - } - - // Validate plugin manifest - validatePluginManifest(pluginDir, plugin.name); - } -} - -// --- Plugin manifest validation (mirrors manifest.rs) --- - -const MAX_SKILL_NAME_LENGTH = 64; -const MAX_FINAL_SHORT_DESCRIPTION_LENGTH = 30; -const MAX_FINAL_URL_LENGTH = 1024; -const MAX_DEFAULT_PROMPT_COUNT = 3; -const MAX_DEFAULT_PROMPT_LENGTH = 128; -const REQUIRED_MCP_INTERFACE_URLS = [ - "websiteURL", - "supportURL", - "privacyPolicyURL", - "termsOfServiceURL", -]; -const FINAL_DIRECTORY_CATEGORIES = new Set([ - "Productivity", - "Creativity", - "Developer Tools", - "Business & Operations", - "Data & Analytics", - "Communication", - "Education & Research", - "Security", - "Finance", - "Healthcare", - "Travel", - "Entertainment", - "Other", -]); - -function validatePluginManifest(pluginDir, marketplaceName) { - const manifestPath = resolve(pluginDir, ".codex-plugin", "plugin.json"); - const label = `Plugin "${marketplaceName}"`; - const manifest = loadJSON(manifestPath, `${label} manifest`); - if (!manifest) return; - - // Name validation - if (typeof manifest.name === "string" && manifest.name.length > 0) { - if (manifest.name !== marketplaceName) { - fail( - `${label}: marketplace name does not match plugin.json name "${manifest.name}"` - ); - } - } - - // Validate manifest paths (skills, mcpServers, apps) - for (const field of ["skills", "mcpServers", "apps"]) { - const value = manifest[field]; - if (value === undefined || value === null) continue; - if (typeof value !== "string") { - fail(`${label}: \`${field}\` must be a string path`); - continue; - } - if (!isValidRelativePath(value)) { - fail( - `${label}: \`${field}\` must be a relative path starting with "./" — got "${value}"` - ); - continue; - } - const resolved = resolve(pluginDir, value.slice(2)); - if (!existsSync(resolved)) { - fail(`${label}: \`${field}\` references missing path "${value}"`); - } - } - - // Validate interface - if (manifest.interface) { - validatePluginInterface( - pluginDir, - label, - manifest.interface, - Boolean(manifest.mcpServers) - ); - } - - // Validate skills - validateSkills(pluginDir, label, manifest.skills); -} - -function validatePluginInterface(pluginDir, label, iface, hasMcpServers) { - if ( - typeof iface.shortDescription !== "string" || - iface.shortDescription.trim().length === 0 - ) { - fail(`${label}: interface.shortDescription must be a non-empty string`); - } else if (iface.shortDescription.length > MAX_FINAL_SHORT_DESCRIPTION_LENGTH) { - fail( - `${label}: interface.shortDescription exceeds the ${MAX_FINAL_SHORT_DESCRIPTION_LENGTH}-character final directory limit` - ); - } - - if (!FINAL_DIRECTORY_CATEGORIES.has(iface.category)) { - fail( - `${label}: interface.category must be a supported final directory category` - ); - } - - if (hasMcpServers) { - for (const field of REQUIRED_MCP_INTERFACE_URLS) { - const value = iface[field]; - if (typeof value !== "string" || value.length === 0) { - fail(`${label}: interface.${field} is required for MCP submissions`); - continue; - } - if (value.length > MAX_FINAL_URL_LENGTH) { - fail( - `${label}: interface.${field} exceeds the ${MAX_FINAL_URL_LENGTH}-character final directory limit` - ); - continue; - } - try { - const url = new URL(value); - if (url.protocol !== "https:" || !url.hostname) { - fail(`${label}: interface.${field} must be a public HTTPS URL`); - } - } catch { - fail(`${label}: interface.${field} must be a valid HTTPS URL`); - } - } - } - - // Validate asset paths - for (const field of ["composerIcon", "logo"]) { - const value = iface[field]; - if (!value) continue; - if (!isValidRelativePath(value)) { - fail( - `${label}: interface.${field} must be a relative path starting with "./" — got "${value}"` - ); - continue; - } - const resolved = resolve(pluginDir, value.slice(2)); - if (!existsSync(resolved)) { - fail(`${label}: interface.${field} references missing path "${value}"`); - } - } - - // Validate screenshots - if (Array.isArray(iface.screenshots)) { - for (const [i, screenshot] of iface.screenshots.entries()) { - if (!isValidRelativePath(screenshot)) { - fail( - `${label}: interface.screenshots[${i}] must be a relative path starting with "./"` - ); - continue; - } - const resolved = resolve(pluginDir, screenshot.slice(2)); - if (!existsSync(resolved)) { - fail( - `${label}: interface.screenshots[${i}] references missing path "${screenshot}"` - ); - } - } - } - - // Validate defaultPrompt - if (iface.defaultPrompt !== undefined) { - const prompts = Array.isArray(iface.defaultPrompt) - ? iface.defaultPrompt - : typeof iface.defaultPrompt === "string" - ? [iface.defaultPrompt] - : null; - - if (prompts === null) { - fail( - `${label}: interface.defaultPrompt must be a string or array of strings` - ); - } else { - if (prompts.length > MAX_DEFAULT_PROMPT_COUNT) { - warn( - `${label}: interface.defaultPrompt has ${prompts.length} entries, maximum is ${MAX_DEFAULT_PROMPT_COUNT}` - ); - } - for (const [i, prompt] of prompts.entries()) { - if (typeof prompt !== "string") { - fail( - `${label}: interface.defaultPrompt[${i}] must be a string` - ); - continue; - } - const normalized = prompt.split(/\s+/).join(" ").trim(); - if (normalized.length > MAX_DEFAULT_PROMPT_LENGTH) { - warn( - `${label}: interface.defaultPrompt[${i}] exceeds ${MAX_DEFAULT_PROMPT_LENGTH} characters` - ); - } - } - } - } -} - -// --- Skill validation (mirrors quick_validate.py) --- - -function validateSkills(pluginDir, label, skillsPath) { - const skillsDir = skillsPath - ? resolve(pluginDir, skillsPath.replace(/^\.\//, "")) - : resolve(pluginDir, "skills"); - - if (!existsSync(skillsDir) || !statSync(skillsDir).isDirectory()) return; - - for (const entry of readdirSync(skillsDir, { withFileTypes: true })) { - if (!entry.isDirectory()) continue; - const skillMdPath = resolve(skillsDir, entry.name, "SKILL.md"); - if (!existsSync(skillMdPath)) { - warn(`${label}: skill "${entry.name}" is missing SKILL.md`); - continue; - } - - const content = readFileSync(skillMdPath, "utf-8").replace(/\r\n/g, "\n"); - if (!content.startsWith("---\n")) { - fail( - `${label}: skill "${entry.name}" SKILL.md missing YAML frontmatter` - ); - continue; - } - - const closingIndex = content.indexOf("\n---\n", 4); - if (closingIndex === -1) { - fail( - `${label}: skill "${entry.name}" SKILL.md has unclosed frontmatter` - ); - continue; - } - - const frontmatter = parseFrontmatter(content.slice(4, closingIndex)); - const skillLabel = `${label} skill "${entry.name}"`; - - if (!frontmatter.name) { - fail(`${skillLabel}: missing "name" in frontmatter`); - } else { - const name = frontmatter.name.trim(); - if (!/^[a-z0-9-]+$/.test(name)) { - fail( - `${skillLabel}: name "${name}" must be hyphen-case (lowercase letters, digits, hyphens)` - ); - } else if (name.startsWith("-") || name.endsWith("-") || name.includes("--")) { - fail( - `${skillLabel}: name "${name}" cannot start/end with hyphen or contain consecutive hyphens` - ); - } - if (name.length > MAX_SKILL_NAME_LENGTH) { - fail( - `${skillLabel}: name exceeds ${MAX_SKILL_NAME_LENGTH} characters` - ); - } - } - - if (!frontmatter.description) { - fail(`${skillLabel}: missing "description" in frontmatter`); - } else { - const desc = frontmatter.description.trim(); - if (/<|>/.test(desc)) { - fail(`${skillLabel}: description cannot contain angle brackets`); - } - if (desc.length > 1024) { - fail(`${skillLabel}: description exceeds 1024 characters`); - } - } - } -} - -function parseFrontmatter(block) { - const fields = {}; - for (const line of block.split("\n")) { - const trimmed = line.trim(); - if (!trimmed || trimmed.startsWith("#")) continue; - const sep = line.indexOf(":"); - if (sep === -1) continue; - fields[line.slice(0, sep).trim()] = line.slice(sep + 1).trim(); - } - return fields; -} - -// --- Main --- - -validateMarketplace(); - -if (errors > 0) { - console.error(`\nCodex validation failed with ${errors} error(s).`); - process.exit(1); -} else { - if (warnings > 0) { - console.log(`Codex validation passed with ${warnings} warning(s).`); - } else { - console.log("Codex validation passed."); - } -} diff --git a/scripts/validate-cursor-schema.mjs b/scripts/validate-cursor-schema.mjs deleted file mode 100644 index 6a78708..0000000 --- a/scripts/validate-cursor-schema.mjs +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env node - -import { readFileSync, existsSync } from "fs"; -import { resolve, dirname } from "path"; -import { fileURLToPath } from "url"; -import Ajv from "ajv"; -import addFormats from "ajv-formats"; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const root = resolve(__dirname, ".."); - -function loadJSON(path) { - return JSON.parse(readFileSync(path, "utf-8")); -} - -const marketplaceSchema = loadJSON( - resolve(root, "schemas/marketplace.schema.json") -); -const pluginSchema = loadJSON(resolve(root, "schemas/plugin.schema.json")); - -const ajv = new Ajv({ allErrors: true }); -addFormats(ajv); - -const validateMarketplace = ajv.compile(marketplaceSchema); -const validatePlugin = ajv.compile(pluginSchema); - -let errors = 0; - -function fail(message) { - console.error(`ERROR: ${message}`); - errors++; -} - -// 1. Validate marketplace.json -const marketplacePath = resolve(root, ".cursor-plugin/marketplace.json"); - -if (!existsSync(marketplacePath)) { - fail(".cursor-plugin/marketplace.json not found"); - process.exit(1); -} - -const marketplace = loadJSON(marketplacePath); - -if (!validateMarketplace(marketplace)) { - fail("marketplace.json schema validation failed:"); - for (const err of validateMarketplace.errors) { - console.error(` ${err.instancePath || "/"}: ${err.message}`); - } -} - -// 2. Validate each plugin -for (const entry of marketplace.plugins ?? []) { - const pluginDir = resolve(root, entry.source); - const pluginJsonPath = resolve(pluginDir, ".cursor-plugin/plugin.json"); - - // Check source directory exists - if (!existsSync(pluginDir)) { - fail( - `Plugin "${entry.name}": source directory "${entry.source}" does not exist` - ); - continue; - } - - // Check plugin.json exists - if (!existsSync(pluginJsonPath)) { - fail( - `Plugin "${entry.name}": missing .cursor-plugin/plugin.json in "${entry.source}"` - ); - continue; - } - - const pluginJson = loadJSON(pluginJsonPath); - - if (!validatePlugin(pluginJson)) { - fail( - `Plugin "${entry.name}": plugin.json schema validation failed (${entry.source}/.cursor-plugin/plugin.json):` - ); - for (const err of validatePlugin.errors) { - const detail = - err.keyword === "additionalProperties" - ? `${err.message}: "${err.params.additionalProperty}"` - : err.message; - console.error(` ${err.instancePath || "/"}: ${detail}`); - } - } - - // Check that marketplace name matches plugin name - if (pluginJson.name && pluginJson.name !== entry.name) { - fail( - `Plugin "${entry.name}": marketplace name does not match plugin.json name "${pluginJson.name}"` - ); - } -} - -// 3. Report results -if (errors > 0) { - console.error(`\nValidation failed with ${errors} error(s).`); - process.exit(1); -} else { - console.log("All plugins validated successfully."); - process.exit(0); -} diff --git a/scripts/validate-cursor-structure.mjs b/scripts/validate-cursor-structure.mjs deleted file mode 100644 index 0f1effa..0000000 --- a/scripts/validate-cursor-structure.mjs +++ /dev/null @@ -1,381 +0,0 @@ -#!/usr/bin/env node - -import { promises as fs } from "node:fs"; -import path from "node:path"; -import process from "node:process"; - -const repoRoot = process.cwd(); -const errors = []; -const warnings = []; - -const pluginNamePattern = /^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$/; -const marketplaceNamePattern = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/; - -function addError(message) { - errors.push(message); -} - -function addWarning(message) { - warnings.push(message); -} - -async function pathExists(targetPath) { - try { - await fs.access(targetPath); - return true; - } catch { - return false; - } -} - -async function ensureDirectory(targetPath, context) { - try { - const stat = await fs.stat(targetPath); - if (!stat.isDirectory()) { - addError(`${context} exists but is not a directory: ${targetPath}`); - return false; - } - return true; - } catch { - addError(`${context} directory is missing: ${targetPath}`); - return false; - } -} - -async function readJsonFile(filePath, context) { - let raw; - try { - raw = await fs.readFile(filePath, "utf8"); - } catch { - addError(`${context} is missing: ${filePath}`); - return null; - } - - try { - return JSON.parse(raw); - } catch (error) { - addError(`${context} contains invalid JSON (${filePath}): ${error.message}`); - return null; - } -} - -function normalizeNewlines(content) { - return content.replace(/\r\n/g, "\n"); -} - -function parseFrontmatter(content) { - const normalized = normalizeNewlines(content); - if (!normalized.startsWith("---\n")) { - return null; - } - - const closingIndex = normalized.indexOf("\n---\n", 4); - if (closingIndex === -1) { - return null; - } - - const frontmatterBlock = normalized.slice(4, closingIndex); - const fields = {}; - - for (const line of frontmatterBlock.split("\n")) { - const trimmed = line.trim(); - if (!trimmed || trimmed.startsWith("#")) { - continue; - } - const separator = line.indexOf(":"); - if (separator === -1) { - continue; - } - const key = line.slice(0, separator).trim(); - const value = line.slice(separator + 1).trim(); - fields[key] = value; - } - - return fields; -} - -async function walkFiles(dirPath) { - const files = []; - const stack = [dirPath]; - - while (stack.length > 0) { - const current = stack.pop(); - const entries = await fs.readdir(current, { withFileTypes: true }); - for (const entry of entries) { - const entryPath = path.join(current, entry.name); - if (entry.isDirectory()) { - stack.push(entryPath); - } else if (entry.isFile()) { - files.push(entryPath); - } - } - } - - return files; -} - -function isSafeRelativePath(value) { - if (typeof value !== "string" || value.length === 0) { - return false; - } - if (value.startsWith("http://") || value.startsWith("https://")) { - return true; - } - if (path.isAbsolute(value)) { - return false; - } - const normalized = path.posix.normalize(value.replace(/\\/g, "/")); - return !normalized.startsWith("../") && normalized !== ".."; -} - -function extractPathValues(value) { - if (typeof value === "string") { - return [value]; - } - - if (Array.isArray(value)) { - return value.flatMap((entry) => extractPathValues(entry)); - } - - if (value && typeof value === "object") { - const candidates = []; - if (typeof value.path === "string") { - candidates.push(value.path); - } - if (typeof value.file === "string") { - candidates.push(value.file); - } - return candidates; - } - - return []; -} - -async function validateReferencedPath(pluginDir, fieldName, pathValue, pluginName) { - if (pathValue.startsWith("http://") || pathValue.startsWith("https://")) { - return; - } - - if (!isSafeRelativePath(pathValue)) { - addError( - `${pluginName}: field "${fieldName}" has invalid path "${pathValue}". Use a relative path without ".." or absolute prefixes.` - ); - return; - } - - const resolved = path.resolve(pluginDir, pathValue); - const exists = await pathExists(resolved); - if (!exists) { - addError(`${pluginName}: field "${fieldName}" references missing path "${pathValue}".`); - } -} - -async function validateFrontmatterFile(filePath, componentName, requiredKeys, pluginName) { - const content = await fs.readFile(filePath, "utf8"); - const parsed = parseFrontmatter(content); - const relativeFile = path.relative(repoRoot, filePath); - - if (!parsed) { - addError(`${pluginName}: ${componentName} file missing YAML frontmatter: ${relativeFile}`); - return; - } - - for (const key of requiredKeys) { - if (!parsed[key] || parsed[key].length === 0) { - addError(`${pluginName}: ${componentName} file missing "${key}" in frontmatter: ${relativeFile}`); - } - } -} - -async function validateComponentFrontmatter(pluginDir, pluginName) { - const rulesDir = path.join(pluginDir, "rules"); - if (await pathExists(rulesDir)) { - const files = await walkFiles(rulesDir); - for (const file of files) { - const ext = path.extname(file).toLowerCase(); - if (ext === ".md" || ext === ".mdc" || ext === ".markdown") { - await validateFrontmatterFile(file, "rule", ["description"], pluginName); - } - } - } - - const skillsDir = path.join(pluginDir, "skills"); - if (await pathExists(skillsDir)) { - const files = await walkFiles(skillsDir); - for (const file of files) { - if (path.basename(file) === "SKILL.md") { - await validateFrontmatterFile(file, "skill", ["name", "description"], pluginName); - } - } - } - - const agentsDir = path.join(pluginDir, "agents"); - if (await pathExists(agentsDir)) { - const files = await walkFiles(agentsDir); - for (const file of files) { - const ext = path.extname(file).toLowerCase(); - if (ext === ".md" || ext === ".mdc" || ext === ".markdown") { - await validateFrontmatterFile(file, "agent", ["name", "description"], pluginName); - } - } - } - - const commandsDir = path.join(pluginDir, "commands"); - if (await pathExists(commandsDir)) { - const files = await walkFiles(commandsDir); - for (const file of files) { - const ext = path.extname(file).toLowerCase(); - if (ext === ".md" || ext === ".mdc" || ext === ".markdown" || ext === ".txt") { - await validateFrontmatterFile(file, "command", ["name", "description"], pluginName); - } - } - } -} - -function resolveMarketplaceSource(source, pluginRoot) { - if (typeof source !== "string" || source.length === 0) { - return null; - } - if (!pluginRoot) { - return source; - } - const normalizedRoot = pluginRoot.replace(/\\/g, "/").replace(/\/+$/, ""); - const normalizedSource = source.replace(/\\/g, "/"); - if (normalizedSource === normalizedRoot || normalizedSource.startsWith(`${normalizedRoot}/`)) { - return normalizedSource; - } - return `${normalizedRoot}/${normalizedSource}`; -} - -async function main() { - const marketplacePath = path.join(repoRoot, ".cursor-plugin", "marketplace.json"); - const marketplace = await readJsonFile(marketplacePath, "Marketplace manifest"); - if (!marketplace) { - summarizeAndExit(); - return; - } - - if (typeof marketplace.name !== "string" || !marketplaceNamePattern.test(marketplace.name)) { - addError( - 'Marketplace "name" must be lowercase kebab-case and start/end with an alphanumeric character.' - ); - } - - if (!marketplace.owner || typeof marketplace.owner.name !== "string" || marketplace.owner.name.length === 0) { - addError('Marketplace "owner.name" is required.'); - } - - if (!Array.isArray(marketplace.plugins) || marketplace.plugins.length === 0) { - addError('Marketplace "plugins" must be a non-empty array.'); - summarizeAndExit(); - return; - } - - const pluginRoot = marketplace.metadata?.pluginRoot; - if (pluginRoot !== undefined) { - if (typeof pluginRoot !== "string" || !isSafeRelativePath(pluginRoot)) { - addError('Marketplace "metadata.pluginRoot" must be a safe relative path.'); - } else { - const pluginRootAbs = path.join(repoRoot, pluginRoot); - await ensureDirectory(pluginRootAbs, 'Marketplace "metadata.pluginRoot"'); - } - } - - const seenNames = new Set(); - for (const [index, entry] of marketplace.plugins.entries()) { - const label = `plugins[${index}]`; - - if (!entry || typeof entry !== "object") { - addError(`${label} must be an object.`); - continue; - } - - if (typeof entry.name !== "string" || !pluginNamePattern.test(entry.name)) { - addError(`${label}.name must be lowercase and use only alphanumerics, hyphens, and periods.`); - continue; - } - - if (seenNames.has(entry.name)) { - addError(`Duplicate plugin name in marketplace manifest: "${entry.name}"`); - } - seenNames.add(entry.name); - - const sourcePath = resolveMarketplaceSource(entry.source, pluginRoot ?? ""); - if (!sourcePath) { - addError(`${label}.source must be a string path.`); - continue; - } - if (!isSafeRelativePath(sourcePath)) { - addError(`${label}.source is not a safe relative path: "${sourcePath}"`); - continue; - } - - const pluginDir = path.join(repoRoot, sourcePath); - const pluginDirExists = await ensureDirectory(pluginDir, `${label}.source`); - if (!pluginDirExists) { - continue; - } - - const manifestPath = path.join(pluginDir, ".cursor-plugin", "plugin.json"); - const pluginManifest = await readJsonFile(manifestPath, `${entry.name} plugin manifest`); - if (!pluginManifest) { - continue; - } - - if (typeof pluginManifest.name !== "string" || !pluginNamePattern.test(pluginManifest.name)) { - addError( - `${entry.name}: "name" in plugin.json must be lowercase and use only alphanumerics, hyphens, and periods.` - ); - } - - if (pluginManifest.name && pluginManifest.name !== entry.name) { - addError( - `${entry.name}: marketplace entry name does not match plugin.json name ("${pluginManifest.name}").` - ); - } - - const manifestFields = ["logo", "rules", "skills", "agents", "commands", "hooks", "mcpServers"]; - for (const field of manifestFields) { - const values = extractPathValues(pluginManifest[field]); - for (const value of values) { - await validateReferencedPath(pluginDir, field, value, entry.name); - } - } - - await validateComponentFrontmatter(pluginDir, entry.name); - - const hooksPath = path.join(pluginDir, "hooks", "hooks.json"); - if (!(await pathExists(hooksPath))) { - addWarning(`${entry.name}: no hooks/hooks.json file found (only needed when using hooks).`); - } - - const mcpPath = path.join(pluginDir, ".mcp.json"); - if (pluginManifest.mcpServers === undefined && !(await pathExists(mcpPath))) { - addWarning(`${entry.name}: no .mcp.json file found (only needed when using MCP servers).`); - } - } - - summarizeAndExit(); -} - -function summarizeAndExit() { - if (warnings.length > 0) { - console.log("Warnings:"); - for (const warning of warnings) { - console.log(`- ${warning}`); - } - console.log(""); - } - - if (errors.length > 0) { - console.error("Validation failed:"); - for (const error of errors) { - console.error(`- ${error}`); - } - process.exit(1); - } - - console.log("Validation passed."); -} - -await main();