diff --git a/.claude/CHANGELOG.md b/.claude/CHANGELOG.md index 7f7f96b..ab2e544 100644 --- a/.claude/CHANGELOG.md +++ b/.claude/CHANGELOG.md @@ -5,6 +5,39 @@ Each entry: **what** changed, **why** it was needed, **files** touched. --- +## 2026-05-25 — v0.6.0 — Official plugins (Linear/Slack/etc) + headless browser as base tool + +**What** +- `lib/base-packages.sh` — new `install_headless_browser()`. Tries `chromium-browser` then `chromium` apt packages; falls back to "use Playwright's bundled Chromium" warning if neither resolves. Toggle `INSTALL_HEADLESS_BROWSER` (default `true`). +- All 4 profile `01-system.sh` scripts call `install_headless_browser` after `install_db_clients`. +- `lib/plugins.sh` — new `install_official_claude_plugin ` (uses always-available `claude-plugins-official` marketplace; no `marketplace add` needed). +- `profiles/cli-bundle/09-plugins.sh` — adds 10 official plugin toggles: `INSTALL_{LINEAR,SLACK,GITHUB,NOTION,ATLASSIAN,ASANA,FIGMA,SENTRY,SUPABASE,VERCEL}_PLUGIN`. +- `profiles/cli-bundle/.env.example` — new `INSTALL_HEADLESS_BROWSER` (in base block) + 10 `*_PLUGIN` toggles (in plugins block). +- `profiles/cli-bundle/README.md` — sections for official plugins + Playwright clarification. +- `tests/test_plugins.bats` — 1 new test for `install_official_claude_plugin` (verifies install + reload, no spurious marketplace add). + +**Playwright** +- No official plugin exists. Existing `INSTALL_PLAYWRIGHT=true` path in `06-mcp.sh` remains: `playwright install-deps` + bundled Chromium + `@playwright/mcp@latest`. Documented as the local-script alternative. + +**Why** +- Official Anthropic-curated plugins (Linear, Slack, GitHub, Notion, Atlassian, Asana, Figma, Sentry, Supabase, Vercel) bundle pre-configured MCP + skills + slash commands. Richer than raw MCP registration alone, and `claude-plugins-official` is always available so no marketplace bootstrap step is needed. +- Headless browser belongs in base tooling so the agent can drive curl/inspect/screenshot flows even without enabling Playwright. Playwright's own Chromium download is heavy and only worth it when Playwright MCP is on. + +**Coexistence of plugin vs raw MCP** +- `INSTALL_LINEAR=true` (raw MCP via `06-mcp.sh`) and `INSTALL_LINEAR_PLUGIN=true` (official plugin via `09-plugins.sh`) can both be on. The plugin is recommended; raw MCP stays as the lightweight fallback. + +**Files** +- `lib/base-packages.sh` (`install_headless_browser`) +- `lib/plugins.sh` (`install_official_claude_plugin`) +- `profiles/cli-bundle/09-plugins.sh` (10 toggles) +- `profiles/cli-bundle/.env.example` (new toggles) +- `profiles/cli-bundle/README.md` (sections) +- `profiles/{cli-bundle,openclaw,hermes,paperclip}/01-system.sh` (`install_headless_browser` call) +- `profiles/{cli-bundle,openclaw,hermes,paperclip}/.env.example` (`INSTALL_HEADLESS_BROWSER`) +- `tests/test_plugins.bats` (1 new test) + +--- + ## 2026-05-25 — v0.5.0 — OpenCode CLI + plugin marketplaces (GSD/gstack/superpowers) **What** diff --git a/lib/base-packages.sh b/lib/base-packages.sh index 5aae7a8..cf7fb12 100644 --- a/lib/base-packages.sh +++ b/lib/base-packages.sh @@ -141,6 +141,33 @@ install_uv() { } # Convenience wrapper. +# Install a headless-capable browser via apt. Tries chromium-browser then +# chromium; logs a warning if neither package is reachable (some minimal +# Ubuntu images route chromium-browser through snap and offer no apt +# alternative — in that case Playwright's bundled Chromium covers the gap +# when INSTALL_PLAYWRIGHT=true). +install_headless_browser() { + if [[ "${INSTALL_HEADLESS_BROWSER:-true}" != "true" ]]; then + echo "==> Headless browser disabled (INSTALL_HEADLESS_BROWSER != true)." + return 0 + fi + if command -v chromium-browser >/dev/null 2>&1 \ + || command -v chromium >/dev/null 2>&1 \ + || command -v google-chrome >/dev/null 2>&1; then + echo "==> Headless browser already present" + return 0 + fi + echo "==> Installing headless browser (chromium via apt)" + if sudo apt-get install -y chromium-browser 2>/dev/null; then + return 0 + fi + if sudo apt-get install -y chromium 2>/dev/null; then + return 0 + fi + echo "WARN: no chromium apt package available." + echo " Playwright's bundled Chromium will be used if INSTALL_PLAYWRIGHT=true." +} + install_db_clients() { if [[ "${INSTALL_DB_CLIENTS:-true}" != "true" ]]; then echo "==> DB clients disabled (INSTALL_DB_CLIENTS != true)." diff --git a/lib/plugins.sh b/lib/plugins.sh index fa782eb..55b4c91 100644 --- a/lib/plugins.sh +++ b/lib/plugins.sh @@ -19,6 +19,16 @@ claude_headless() { claude -p "$prompt" --dangerously-skip-permissions } +# Install a plugin from the official Anthropic marketplace +# (always available; no `marketplace add` needed). +# $1 = plugin name (e.g. "linear", "slack", "github") +install_official_claude_plugin() { + local name="$1" + echo "==> Claude official plugin: $name" + claude_headless "/plugin install ${name}@claude-plugins-official" + claude_headless "/reload-plugins" || true +} + # Install a Claude Code plugin from a marketplace. # $1 = marketplace spec (e.g. "jnuyens/gsd-plugin" or "obra/superpowers-marketplace") # $2 = plugin spec (e.g. "gsd@gsd-plugin" or "superpowers@claude-plugins-official") diff --git a/profiles/cli-bundle/.env.example b/profiles/cli-bundle/.env.example index 40e01f7..fafb02b 100644 --- a/profiles/cli-bundle/.env.example +++ b/profiles/cli-bundle/.env.example @@ -77,6 +77,9 @@ INSTALL_DB_CLIENTS=true INSTALL_POSTGRES_CLIENT=true INSTALL_CLICKHOUSE_CLIENT=true +# Headless browser (chromium via apt; fallback to Playwright bundled Chromium) +INSTALL_HEADLESS_BROWSER=true + # ============================================================ # Obsidian vault — shared workspace for every CLI agent. # Headless-friendly (no Obsidian app required on the VPS). @@ -112,6 +115,20 @@ INSTALL_GSTACK=false # Space-separated list. Valid: claude opencode GSTACK_TARGETS=claude +# --- Official Anthropic marketplace plugins (Claude-only) --- +# Bundle pre-configured MCP + skills + slash commands. Richer than the raw +# MCP registrations in 06-mcp.sh — either can be used (or both). +INSTALL_LINEAR_PLUGIN=false +INSTALL_SLACK_PLUGIN=false +INSTALL_GITHUB_PLUGIN=false +INSTALL_NOTION_PLUGIN=false +INSTALL_ATLASSIAN_PLUGIN=false +INSTALL_ASANA_PLUGIN=false +INSTALL_FIGMA_PLUGIN=false +INSTALL_SENTRY_PLUGIN=false +INSTALL_SUPABASE_PLUGIN=false +INSTALL_VERCEL_PLUGIN=false + # superpowers — composable agent methodology, multi-CLI INSTALL_SUPERPOWERS=false SUPERPOWERS_CLAUDE=true diff --git a/profiles/cli-bundle/01-system.sh b/profiles/cli-bundle/01-system.sh index 5fa0c2f..0f9353c 100755 --- a/profiles/cli-bundle/01-system.sh +++ b/profiles/cli-bundle/01-system.sh @@ -26,6 +26,7 @@ SWAP_SIZE_GB="${SWAP_SIZE_GB:-2}" install_base_packages install_db_clients +install_headless_browser echo "==> Installing Node.js 20.x" if ! command -v node >/dev/null 2>&1 || [[ "$(node -v | cut -d. -f1 | tr -d v)" -lt 18 ]]; then diff --git a/profiles/cli-bundle/09-plugins.sh b/profiles/cli-bundle/09-plugins.sh index 616fd0d..38e8523 100644 --- a/profiles/cli-bundle/09-plugins.sh +++ b/profiles/cli-bundle/09-plugins.sh @@ -94,5 +94,21 @@ if [[ "${INSTALL_SUPERPOWERS:-false}" == "true" ]]; then fi fi +# --- Official Anthropic marketplace plugins (Claude-only) ----------------- +# These bundle pre-configured MCP servers + skills + slash commands. +# Richer than the raw MCP registrations in 06-mcp.sh; either can be used. +if [[ "${INSTALL_CLAUDE:-true}" == "true" ]]; then + [[ "${INSTALL_LINEAR_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin linear + [[ "${INSTALL_SLACK_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin slack + [[ "${INSTALL_GITHUB_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin github + [[ "${INSTALL_NOTION_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin notion + [[ "${INSTALL_ATLASSIAN_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin atlassian + [[ "${INSTALL_ASANA_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin asana + [[ "${INSTALL_FIGMA_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin figma + [[ "${INSTALL_SENTRY_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin sentry + [[ "${INSTALL_SUPABASE_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin supabase + [[ "${INSTALL_VERCEL_PLUGIN:-false}" == "true" ]] && install_official_claude_plugin vercel +fi + echo echo "==> Plugins step complete." diff --git a/profiles/cli-bundle/README.md b/profiles/cli-bundle/README.md index 41233e1..eebc44d 100644 --- a/profiles/cli-bundle/README.md +++ b/profiles/cli-bundle/README.md @@ -204,6 +204,37 @@ manual com palpite (padrão Gemini CLI). Sem tentativa automática. **Manual hints**: Codex/Cursor/OpenCode imprimem mensagem com comando exato pra colar dentro da sessão. Sem CLI flag headless documentada. +### Plugins oficiais da Anthropic (Claude only) + +Toggles separados pra cada plugin do marketplace `claude-plugins-official`: +```env +INSTALL_LINEAR_PLUGIN=true # gestão de tarefas (Linear) +INSTALL_SLACK_PLUGIN=true # mensagens (Slack) +INSTALL_GITHUB_PLUGIN=true +INSTALL_NOTION_PLUGIN=true +INSTALL_ATLASSIAN_PLUGIN=true # Jira/Confluence +INSTALL_ASANA_PLUGIN=true +INSTALL_FIGMA_PLUGIN=true +INSTALL_SENTRY_PLUGIN=true +INSTALL_SUPABASE_PLUGIN=true +INSTALL_VERCEL_PLUGIN=true +``` +Cada plugin bundla MCP server pré-configurado + skills + slash commands +(mais rico que `INSTALL_LINEAR=true` em `06-mcp.sh`, que registra só o MCP +cru). Ambos podem coexistir; plugin oficial recomendado. + +### Playwright (browser automation) + +Sem plugin oficial. Mantido via `INSTALL_PLAYWRIGHT=true` em `06-mcp.sh`: +- Instala deps de sistema (`sudo npx playwright install-deps`) +- Baixa Chromium próprio do Playwright (`npx playwright install chromium`) +- Registra MCP `@playwright/mcp@latest` + +Browser headless do sistema (`chromium-browser` apt) é instalado +separadamente em `01-system.sh` se `INSTALL_HEADLESS_BROWSER=true` (default). +Usado por agente em shell scripts, curl, etc — independente do Chromium +bundled do Playwright. + ## Manutenção ```bash claude mcp list # ver registrados diff --git a/profiles/hermes/.env.example b/profiles/hermes/.env.example index 67aff63..8900bfa 100644 --- a/profiles/hermes/.env.example +++ b/profiles/hermes/.env.example @@ -29,3 +29,6 @@ BASE_PACKAGES= INSTALL_DB_CLIENTS=true INSTALL_POSTGRES_CLIENT=true INSTALL_CLICKHOUSE_CLIENT=true + +# Headless browser (chromium via apt; fallback to Playwright bundled Chromium) +INSTALL_HEADLESS_BROWSER=true diff --git a/profiles/hermes/01-system.sh b/profiles/hermes/01-system.sh index 2f7e279..255f26e 100755 --- a/profiles/hermes/01-system.sh +++ b/profiles/hermes/01-system.sh @@ -15,6 +15,7 @@ SWAP_SIZE_GB="${SWAP_SIZE_GB:-2}" install_base_packages install_db_clients +install_headless_browser # Hermes is Python 3.11 + uv. Python is in base packages. sudo apt-get install -y python3.11 python3.11-venv python3.11-dev 2>/dev/null || true diff --git a/profiles/openclaw/.env.example b/profiles/openclaw/.env.example index 986b1af..64ea7e5 100644 --- a/profiles/openclaw/.env.example +++ b/profiles/openclaw/.env.example @@ -37,3 +37,6 @@ BASE_PACKAGES= INSTALL_DB_CLIENTS=true INSTALL_POSTGRES_CLIENT=true INSTALL_CLICKHOUSE_CLIENT=true + +# Headless browser (chromium via apt; fallback to Playwright bundled Chromium) +INSTALL_HEADLESS_BROWSER=true diff --git a/profiles/openclaw/01-system.sh b/profiles/openclaw/01-system.sh index 9a52a19..19298e7 100755 --- a/profiles/openclaw/01-system.sh +++ b/profiles/openclaw/01-system.sh @@ -15,6 +15,7 @@ SWAP_SIZE_GB="${SWAP_SIZE_GB:-2}" install_base_packages install_db_clients +install_headless_browser install_node "${NODE_MAJOR:-22}" install_pnpm "${PNPM_VERSION:-latest}" diff --git a/profiles/paperclip/.env.example b/profiles/paperclip/.env.example index 1403946..38b73a6 100644 --- a/profiles/paperclip/.env.example +++ b/profiles/paperclip/.env.example @@ -37,3 +37,6 @@ BASE_PACKAGES= INSTALL_DB_CLIENTS=true INSTALL_POSTGRES_CLIENT=true INSTALL_CLICKHOUSE_CLIENT=true + +# Headless browser (chromium via apt; fallback to Playwright bundled Chromium) +INSTALL_HEADLESS_BROWSER=true diff --git a/profiles/paperclip/01-system.sh b/profiles/paperclip/01-system.sh index 028b9e2..486a0d3 100755 --- a/profiles/paperclip/01-system.sh +++ b/profiles/paperclip/01-system.sh @@ -15,6 +15,7 @@ SWAP_SIZE_GB="${SWAP_SIZE_GB:-2}" install_base_packages install_db_clients +install_headless_browser install_node "${NODE_MAJOR:-20}" install_pnpm "${PNPM_VERSION:-9.15.0}" diff --git a/tests/test_plugins.bats b/tests/test_plugins.bats index 9e1fa04..918d10e 100644 --- a/tests/test_plugins.bats +++ b/tests/test_plugins.bats @@ -42,6 +42,21 @@ EOF # ---------- install_claude_plugin ---------- +@test "install_official_claude_plugin: install then reload, no marketplace add" { + CALLS_FILE="$TEST_HOME/calls.txt" + cat > "$STUB_DIR/claude" <> "$CALLS_FILE" +EOF + chmod +x "$STUB_DIR/claude" + install_official_claude_plugin "linear" + [ -f "$CALLS_FILE" ] + grep -q "/plugin install linear@claude-plugins-official" "$CALLS_FILE" + grep -q "/reload-plugins" "$CALLS_FILE" + ! grep -q "marketplace add" "$CALLS_FILE" +} + @test "install_claude_plugin: runs marketplace add then install then reload" { CALLS_FILE="$TEST_HOME/calls.txt" cat > "$STUB_DIR/claude" <