mirror of
https://github.com/getsentry/sentry-for-ai.git
synced 2026-09-14 14:28:22 +08:00
d65bd23b67
This repository is the single source of truth for skills and routing metadata, but it is not itself an installable plugin, and each assistant (Claude Code, Cursor, Codex, Grok) expects the plugin in a different on-disk shape. No plugin ecosystem can consume a zip or release asset; all install from a git ref. So a GitHub Actions workflow builds each agent's distribution from this repository and deploys it to a dedicated repository whose root is exactly that agent's plugin, which a marketplace points at as getsentry/plugin-<agent>. Each agent has a `plugin-src/<agent>/` dir with its manifests, README, and a `build.sh` that assembles the dist tree from shared repo content. Claude, Cursor, and Grok consume the plugin at the repo root; Codex requires it under `plugins/sentry/` and rejects the `disable-model-invocation` field the skill tree relies on, so its build strips that field and emits a per-skill `agents/openai.yaml` (see `hide-skills.py`). MCP config is built from the repo's `mcp.json` source of truth: inline in Claude's manifest, and a file for the others. Cross-repo writes use a short-lived token from a dedicated GitHub App scoped to contents:write on the plugin repos; the default GITHUB_TOKEN cannot push to other repositories. The root `.claude-plugin/`, `.cursor-plugin/`, and `.mcp.json` are retained so existing installs that consumed the plugin from this repo's root keep working; their READMEs announce removal on or after 2026-07-11.
38 lines
1.5 KiB
Bash
Executable File
38 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# build.sh — Build the Cursor distribution of the Sentry plugin.
|
|
#
|
|
# Like Claude, Cursor consumes the plugin at the dist branch ROOT
|
|
# (`.cursor-plugin/marketplace.json` uses `source: "./"`). Cursor expects the MCP
|
|
# config as `mcp.json` (no leading dot), which is the repo's source-of-truth name,
|
|
# so it copies straight through. Claude and Codex emit the dotted `.mcp.json` from
|
|
# the same source. No skill mutation: copies the manifest (from alongside this
|
|
# script) plus the shared content from the repo root.
|
|
#
|
|
# Note: Cursor documents honoring `disable-model-invocation`, but a known Cursor
|
|
# bug currently hides plugin-delivered skills entirely. We ship the field
|
|
# as-authored; that is a Cursor-side issue, not a packaging one.
|
|
#
|
|
# Usage: build.sh <TARGET_DIR> (TARGET_DIR assumed empty)
|
|
|
|
set -euo pipefail
|
|
|
|
TARGET_DIR="${1:?usage: build.sh <TARGET_DIR>}"
|
|
SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "$SRC_DIR/../.." && pwd)"
|
|
cd "$REPO_ROOT"
|
|
|
|
mkdir -p "$TARGET_DIR/.cursor-plugin"
|
|
|
|
cp "$SRC_DIR/plugin.json" "$TARGET_DIR/.cursor-plugin/plugin.json"
|
|
cp "$SRC_DIR/marketplace.json" "$TARGET_DIR/.cursor-plugin/marketplace.json"
|
|
rsync -a skills/ "$TARGET_DIR/skills/"
|
|
rsync -a commands/ "$TARGET_DIR/commands/"
|
|
rsync -a assets/ "$TARGET_DIR/assets/"
|
|
cp mcp.json "$TARGET_DIR/mcp.json"
|
|
cp SKILL_TREE.md "$TARGET_DIR/SKILL_TREE.md"
|
|
cp "$SRC_DIR/README.md" "$TARGET_DIR/README.md"
|
|
cp LICENSE "$TARGET_DIR/LICENSE"
|
|
|
|
echo "Built Cursor dist into $TARGET_DIR (root plugin)."
|