diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index c1cd09c..ffce8a3 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,6 @@ "name": "perplexity-platform", "source": "./", "description": "Skills for building on the Perplexity API Platform (Agent API, Search API, Embeddings).", - "displayName": "Perplexity Platform", "homepage": "https://docs.perplexity.ai", "repository": "https://github.com/perplexityai/api-platform-developers" } diff --git a/.github/workflows/validate-plugin.yml b/.github/workflows/validate-plugin.yml new file mode 100644 index 0000000..aaa5d34 --- /dev/null +++ b/.github/workflows/validate-plugin.yml @@ -0,0 +1,53 @@ +name: Validate Plugin Configuration + +on: + pull_request: + push: + branches: [main] + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 + + - name: Setup Node.js + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 + with: + node-version: '20' + + - name: Validate JSON Syntax + run: | + for f in plugin.json mcp.json .mcp.json .claude-plugin/plugin.json .claude-plugin/marketplace.json .codex-plugin/plugin.json .agents/plugins/marketplace.json; do + jq empty "$f" + echo "✓ $f is valid JSON" + done + + - name: Validate Agent Plugins Manifests + run: | + curl -fsSL --retry 3 -o /tmp/plugin.schema.json https://agent-plugins.org/schemas/1.0.0/plugin.schema.json + curl -fsSL --retry 3 -o /tmp/mcp.schema.json https://agent-plugins.org/schemas/1.0.0/mcp.schema.json + npx --yes ajv-cli@5 validate --spec=draft2020 -s /tmp/plugin.schema.json -d plugin.json + npx --yes ajv-cli@5 validate --spec=draft2020 -s /tmp/mcp.schema.json -d mcp.json + echo "✓ plugin.json and mcp.json conform to Agent Plugins 1.0.0 schemas" + + - name: Check Version Sync + run: | + ROOT=$(jq -r '.version' plugin.json) + CODEX=$(jq -r '.version' .codex-plugin/plugin.json) + echo "plugin.json=$ROOT .codex-plugin/plugin.json=$CODEX" + if [ "$ROOT" != "$CODEX" ]; then + echo "Error: version mismatch between plugin.json and .codex-plugin/plugin.json" + exit 1 + fi + echo "✓ Versions are in sync" + + - name: Check Skill Frontmatter + run: | + for f in skills/*/SKILL.md; do + head -20 "$f" | grep -q '^name:' || { echo "Error: $f missing name frontmatter"; exit 1; } + head -20 "$f" | grep -q '^description:' || { echo "Error: $f missing description frontmatter"; exit 1; } + echo "✓ $f has name and description" + done diff --git a/README.md b/README.md index 23ca2c4..2dc5946 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ claude --plugin-dir . Invoke a skill with `/perplexity-platform:migrate-sonar-to-agent-api [path]`. +### Agent Plugins + +This repository is packaged as an [Agent Plugin](https://agent-plugins.org), so clients that support the standard can install it directly from this repository. One install gets the skills and the docs MCP server; no API key is required. + ### Codex CLI and other Agent Skills clients Codex plugin flow (skills + docs MCP in one install): `codex plugin marketplace add perplexityai/api-platform-developers`, then install `perplexity-platform` from `/plugins`. diff --git a/mcp.json b/mcp.json new file mode 100644 index 0000000..f5640a1 --- /dev/null +++ b/mcp.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json", + "mcpServers": { + "perplexity-docs": { + "type": "streamable-http", + "url": "https://docs.perplexity.ai/mcp" + } + } +} diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..0170da3 --- /dev/null +++ b/plugin.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "name": "perplexity-platform", + "version": "0.3.0", + "description": "Skills for building on the Perplexity API Platform (Agent API, Search API, Embeddings).", + "author": { + "name": "Perplexity" + }, + "homepage": "https://docs.perplexity.ai", + "repository": "https://github.com/perplexityai/api-platform-developers" +}