Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .claude/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <name>` (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**
Expand Down
27 changes: 27 additions & 0 deletions lib/base-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand Down
10 changes: 10 additions & 0 deletions lib/plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
17 changes: 17 additions & 0 deletions profiles/cli-bundle/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions profiles/cli-bundle/01-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions profiles/cli-bundle/09-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
31 changes: 31 additions & 0 deletions profiles/cli-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions profiles/hermes/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions profiles/hermes/01-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions profiles/openclaw/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions profiles/openclaw/01-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 3 additions & 0 deletions profiles/paperclip/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions profiles/paperclip/01-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
15 changes: 15 additions & 0 deletions tests/test_plugins.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" <<EOF
#!/usr/bin/env bash
shift # drop -p
echo "\$1" >> "$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" <<EOF
Expand Down
Loading