From da473aaecc6f0aa3339fafd4400f88795aa76cad Mon Sep 17 00:00:00 2001 From: MRDula Date: Mon, 20 Apr 2026 17:12:05 -0400 Subject: [PATCH] =?UTF-8?q?feat(plugin):=20v2.0.0=20=E2=80=94=20Opus=204.6?= =?UTF-8?q?=20pin=20+=20Claude=20Desktop=20upload=20bundle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two shifts, same commit: 1. Model: claude-sonnet-4-6 -> claude-opus-4-6 across all four sites (plugin.json, .claude/settings.json, reva-crm SKILL.md, reva-memory SKILL.md). Rationale text flipped to match — Opus's depth earns its keep on the judgment-heavy PM tasks (SOW reads, NCR triage, export routing). 2. Distribution: the primary install path is now Claude Desktop's "Personal → Local uploads → +" picker, not curl|bash. Requires: - plugin.json declares userConfig.mcp_url + userConfig.api_key (sensitive, stored in OS keychain on enable). - plugin.json declares mcpServers.reva with Authorization: Bearer \${user_config.api_key} — Claude prompts on enable and wires the MCP in automatically. No ~/.claude/mcp.json surgery, no terminal. - plugin/build-bundle.sh produces dist/reva-turbo-.zip with .claude-plugin/plugin.json at the archive root, which is what the uploader expects. - plugin/dist/ gitignored; bundle ships via GitHub Releases. install.sh survives as a fallback for Claude Code CLI users and CI; README reframes it as "legacy terminal path." Bumped plugin version 1.3.0 -> 2.0.0 — breaking only for the MCP server registration (moves from ~/.claude/mcp.json to plugin-owned). Co-Authored-By: Claude Opus 4.7 --- .gitignore | 3 ++ README.md | 23 ++++++--- plugin/.claude-plugin/plugin.json | 25 ++++++++-- plugin/.claude/settings.json | 4 +- plugin/VERSION | 2 +- plugin/build-bundle.sh | 50 +++++++++++++++++++ plugin/skills/reva-turbo-reva-crm/SKILL.md | 2 +- plugin/skills/reva-turbo-reva-memory/SKILL.md | 2 +- 8 files changed, 95 insertions(+), 16 deletions(-) create mode 100755 plugin/build-bundle.sh diff --git a/.gitignore b/.gitignore index 4281c04..6b63b2c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ node_modules/ # Defensive: stray dirs from pre-1.3.0 bash-substitution bug TURBO_STATE_DIR:-* + +# Plugin build artifacts — shipped via GitHub Releases, not committed +plugin/dist/ diff --git a/README.md b/README.md index 24f1470..b6d71df 100644 --- a/README.md +++ b/README.md @@ -56,18 +56,25 @@ RevOps-RevAMfg/ ## For end users (Rev A PMs) -Your admin deploys the backend once and shares the router URL + a one-time signup token. Then you run: +Your admin deploys the backend once and shares two things with you: the **router URL** (e.g. `https://reva-ops.up.railway.app/mcp`) and a one-time **signup token**. From there it's three steps — no terminal needed. -```bash -curl -fsSL https://raw.githubusercontent.com/mrdulasolutions/RevOps-RevAMfg/main/plugin/install.sh \ - | REVA_MCP_URL=https://.up.railway.app/mcp bash -``` +**1. Get your personal API key.** Visit `https://.up.railway.app/signup` in your browser. Enter your name, work email, a password (12+ chars — only used for future key resets), and the signup token. The page shows your `nk_...` key once. Copy it. + +**2. Download the plugin bundle.** Grab the latest `reva-turbo-.zip` from the project's [GitHub Releases](https://github.com/mrdulasolutions/RevOps-RevAMfg/releases) page. + +**3. Upload it into Claude.** In Claude Desktop, open **Plugins → Personal → Local uploads → `+`** and drop in the zip. On enable, Claude prompts for two values: -The installer drops into a short wizard that prompts for your name, email, a password (12+ chars — you'll only need it to reset your key), and the signup token. Under the hood it calls the router's `/signup` endpoint, which mints a personal `nk_...` API key scoped to your user and writes it into `~/.claude/mcp.json`. +- **`mcp_url`** — paste the router URL your admin shared (the full `/mcp` form) +- **`api_key`** — paste the `nk_...` key from step 1 (stored in your OS keychain — not a plaintext file) -Prefer the browser? Visit `https://.up.railway.app/signup` instead and you'll get the same key + an exact install command to paste. +That's it. Run `/reva-turbo:revmyengine` and the engine is connected to the shared CRM and memory. Everything you log is available to the whole team, and every action is attributed to your user on the Nakatomi timeline. -Restart Claude Code, then `/reva-turbo:revmyengine`. The engine is now connected to the shared CRM and memory — everything you log is available to the whole team, and every action is attributed to your user on the Nakatomi timeline. +> Prefer the terminal? The legacy `install.sh` path still works: +> ```bash +> curl -fsSL https://raw.githubusercontent.com/mrdulasolutions/RevOps-RevAMfg/main/plugin/install.sh \ +> | REVA_MCP_URL=https://.up.railway.app/mcp bash +> ``` +> It drops into the same signup wizard and writes `~/.claude/mcp.json` directly. Useful for Claude Code CLI users or CI. See [`docs/AUTH.md`](./docs/AUTH.md) for the full auth flow and rotation story. diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 49daf4d..e935579 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "reva-turbo", - "version": "1.3.0", + "version": "2.0.0", "description": "REVA-TURBO Skills Engine — Rev A Manufacturing PM workflow from RFQ intake through customer delivery. 46 skills covering quoting, China sourcing, compliance, quality, and fulfillment.", "author": { "name": "Rev A Manufacturing / MrDula Solutions", @@ -34,8 +34,8 @@ "primaryCommand": "reva-turbo:revmyengine", "skillsDir": "skills" }, - "recommendedModel": "claude-sonnet-4-6", - "modelRationale": "Sonnet 4.6 handles the 46 PM skills cleanly. Opus 4.7 over-engineers routine RFQ intake, quote drafts, and status updates with no workflow upside.", + "recommendedModel": "claude-opus-4-6", + "modelRationale": "Opus 4.6 — the 46 PM skills span RFQ intake, China sourcing, compliance routing, and quality gates; Opus's depth earns its keep on the judgment calls (scope of work reads, NCR triage, export-control checks). Sonnet 4.6 is a viable fallback for pure status-update work.", "postInstall": { "description": "Install docx converter dependencies for Word report generation.", "command": "cd skills/reva-turbo-docx/scripts && npm install --silent --no-fund --no-audit", @@ -58,5 +58,24 @@ "optional": { "node": ">= 18 (for docx report generation)" } + }, + "userConfig": { + "mcp_url": { + "description": "REVA MCP router URL (from your admin). Example: https://reva-ops.up.railway.app/mcp", + "sensitive": false + }, + "api_key": { + "description": "Your personal REVA API key (nk_...). Get one at /signup using the signup token your admin shared.", + "sensitive": true + } + }, + "mcpServers": { + "reva": { + "type": "http", + "url": "${user_config.mcp_url}", + "headers": { + "Authorization": "Bearer ${user_config.api_key}" + } + } } } diff --git a/plugin/.claude/settings.json b/plugin/.claude/settings.json index c2abf61..77c3e28 100644 --- a/plugin/.claude/settings.json +++ b/plugin/.claude/settings.json @@ -1,5 +1,5 @@ { "$schema": "https://json.schemastore.org/claude-code-settings.json", - "_comment": "REVA-TURBO recommends Sonnet 4.6. Opus 4.7 works but over-engineers routine PM tasks (RFQ intake, quote drafts, status updates) and is slower/costlier with no meaningful upside for this workflow. Override locally if you disagree.", - "model": "claude-sonnet-4-6" + "_comment": "REVA-TURBO pins Opus 4.6. The PM workflow spans judgment-heavy tasks (SOW reads, NCR triage, export-control routing) where Opus's depth pays off. Override locally to claude-sonnet-4-6 if you want pure status-update throughput.", + "model": "claude-opus-4-6" } diff --git a/plugin/VERSION b/plugin/VERSION index f0bb29e..227cea2 100644 --- a/plugin/VERSION +++ b/plugin/VERSION @@ -1 +1 @@ -1.3.0 +2.0.0 diff --git a/plugin/build-bundle.sh b/plugin/build-bundle.sh new file mode 100755 index 0000000..49ea97e --- /dev/null +++ b/plugin/build-bundle.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# Build reva-turbo-.zip for Claude Desktop "Personal → Local uploads". +# +# The ZIP unpacks with `.claude-plugin/plugin.json` at the archive root, which +# is what Desktop's plugin loader expects. We explicitly exclude dev cruft +# (`.git`, `node_modules`, `.DS_Store`) and the build artifacts dir itself +# so the bundle stays small and deterministic. +# +# Usage: +# ./build-bundle.sh # -> dist/reva-turbo-.zip +# ./build-bundle.sh clean # remove dist/ +set -euo pipefail + +PLUGIN_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +VERSION="$(cat "$PLUGIN_ROOT/VERSION" | tr -d '[:space:]')" +DIST="$PLUGIN_ROOT/dist" +OUT="$DIST/reva-turbo-${VERSION}.zip" + +if [ "${1:-}" = "clean" ]; then + rm -rf "$DIST" + echo "Cleaned $DIST" + exit 0 +fi + +command -v zip >/dev/null 2>&1 || { echo "zip is required but not installed" >&2; exit 1; } + +# Sanity: manifest must exist and declare the version we're stamping +if ! grep -q "\"version\": \"$VERSION\"" "$PLUGIN_ROOT/.claude-plugin/plugin.json"; then + echo "VERSION ($VERSION) does not match .claude-plugin/plugin.json" >&2 + exit 1 +fi + +mkdir -p "$DIST" +rm -f "$OUT" + +# Build from inside PLUGIN_ROOT so paths in the archive are relative to the plugin root. +# Explicit excludes keep the bundle small and reproducible. +cd "$PLUGIN_ROOT" +zip -rq "$OUT" . \ + -x "dist/*" \ + -x "*.git/*" -x "*.git" \ + -x "*/node_modules/*" -x "node_modules/*" \ + -x "*.DS_Store" \ + -x "build-bundle.sh" \ + -x "*.pyc" -x "*__pycache__*" + +SIZE="$(du -h "$OUT" | cut -f1)" +echo "Built $OUT ($SIZE)" +echo +echo "Upload via Claude Desktop → Plugins → Personal → Local uploads → +" diff --git a/plugin/skills/reva-turbo-reva-crm/SKILL.md b/plugin/skills/reva-turbo-reva-crm/SKILL.md index 2d5d5e0..c4bc952 100644 --- a/plugin/skills/reva-turbo-reva-crm/SKILL.md +++ b/plugin/skills/reva-turbo-reva-crm/SKILL.md @@ -9,7 +9,7 @@ description: | Nakatomi's structured model tuned for Rev A: RFQ → Quoted → Accepted → Manufacturing → Inspection → Shipped → Delivered → Invoiced → Paid. compatibility: Claude Code, Claude desktop, Claude CoWork -recommendedModel: claude-sonnet-4-6 +recommendedModel: claude-opus-4-6 allowed-tools: - Bash - Read diff --git a/plugin/skills/reva-turbo-reva-memory/SKILL.md b/plugin/skills/reva-turbo-reva-memory/SKILL.md index 8876efe..2d4f187 100644 --- a/plugin/skills/reva-turbo-reva-memory/SKILL.md +++ b/plugin/skills/reva-turbo-reva-memory/SKILL.md @@ -9,7 +9,7 @@ description: | PM team. Prefer this over local notes: everything here is durable, searchable, and cross-user. compatibility: Claude Code, Claude desktop, Claude CoWork -recommendedModel: claude-sonnet-4-6 +recommendedModel: claude-opus-4-6 allowed-tools: - Bash - Read