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
12 changes: 6 additions & 6 deletions docs/release-with-github-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: '20'
bun-version: latest

- name: Install dependencies
run: |
npm ci
bun install
sudo apt-get update
sudo apt-get install -y jq python3

Expand Down Expand Up @@ -82,14 +82,14 @@ jobs:
git diff --quiet || CURRENT_DIFF="changed"

# Run semantic-release to update version files
npx semantic-release
bunx semantic-release

# Check if files were modified (semantic-release updated version files)
if ! git diff --quiet; then
echo "Release changes detected, creating PR..."

# Get the new version from marketplace.json (all plugins have the same version)
VERSION=$(node -p "require('./.claude-plugin/marketplace.json').plugins[0].version")
VERSION=$(jq -r '.plugins[0].version' ./.claude-plugin/marketplace.json)

# Commit the changes
git add .
Expand Down
2 changes: 1 addition & 1 deletion plugins/me/hooks/lsp-bash-check-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if command -v bash-language-server &>/dev/null; then
fi

echo "[lsp-bash] Installing bash-language-server..."
if npm install -g bash-language-server &>/dev/null; then
if bun add -g bash-language-server &>/dev/null; then
echo "[lsp-bash] ✓ bash-language-server installed"
exit 0
else
Expand Down
2 changes: 1 addition & 1 deletion plugins/me/hooks/lsp-python-check-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if command -v pyright &>/dev/null; then
fi

echo "[lsp-python] Installing pyright..."
if npm install -g pyright &>/dev/null; then
if bun add -g pyright &>/dev/null; then
echo "[lsp-python] ✓ pyright installed"
exit 0
else
Expand Down
2 changes: 1 addition & 1 deletion plugins/me/hooks/lsp-typescript-check-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if command -v typescript-language-server &>/dev/null; then
fi

echo "[lsp-typescript] Installing typescript-language-server..."
if npm install -g typescript-language-server typescript &>/dev/null; then
if bun add -g typescript-language-server typescript &>/dev/null; then
echo "[lsp-typescript] ✓ typescript-language-server installed"
exit 0
else
Expand Down
1 change: 1 addition & 0 deletions plugins/me/skills/databricks-execute/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Also re-run downstream dependents:
```

**Constraints:**

- `rerun_tasks` and `rerun_all_failed_tasks` are mutually exclusive
- Run must be TERMINATED (not in-progress) before repair
- Chaining repairs: pass `latest_repair_id` from previous repair response
Expand Down
4 changes: 3 additions & 1 deletion plugins/me/skills/databricks-notebook/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ API. This skill executes Python/PySpark code on a real cluster.

## Workflow

```
```text
1. VALIDATE — bundle validate to extract cluster config and whl path
2. DEPLOY — bundle deploy to build and upload the whl to workspace
3. UPLOAD — import local .py file to workspace as a notebook
Expand Down Expand Up @@ -162,6 +162,7 @@ echo "Run ID: ${RUN_ID}"
```

**API notes:**

- `tasks` array required by Jobs API v2.1, even for single-task runs.
- `"source": "WORKSPACE"` required — omitting it causes Repos path resolution errors.

Expand All @@ -184,6 +185,7 @@ done
```

After the loop, check `RS`:

- `SUCCESS` → proceed to Step 6
- `FAILED` → proceed to Step 6 (error details in output)
- `TIMEDOUT` → cancel with `databricks jobs cancel-run "${RUN_ID}" --profile <profile>`
Expand Down
52 changes: 52 additions & 0 deletions scripts/sync-marketplace-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -euo pipefail

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)"

MARKETPLACE_FILE="${PROJECT_ROOT}/.claude-plugin/marketplace.json"
TMP_FILE="$(mktemp "${MARKETPLACE_FILE}.tmp.XXXXXX")"

cleanup() {
rm -f "${TMP_FILE}"
}
trap cleanup EXIT

versions_json='{}'
for plugin_json in "${PROJECT_ROOT}"/plugins/*/.claude-plugin/plugin.json; do
[ -f "${plugin_json}" ] || continue

plugin_name="$(basename "$(dirname "$(dirname "${plugin_json}")")")"
plugin_version="$(jq -r '.version' "${plugin_json}")"

versions_json="$(jq -n \
--argjson versions "${versions_json}" \
--arg plugin_name "${plugin_name}" \
--arg plugin_version "${plugin_version}" \
'$versions + {($plugin_name): $plugin_version}'
)"
done

jq \
--argjson versions "${versions_json}" \
'.plugins |= map(
. as $plugin
| ($plugin.source // "") as $source
| if ($source | startswith("./plugins/")) then
($source | ltrimstr("./plugins/")) as $plugin_name
| if $versions[$plugin_name] != null then
.version = $versions[$plugin_name]
else
.
end
else
.
end
)' \
"${MARKETPLACE_FILE}" > "${TMP_FILE}"

if cmp -s "${MARKETPLACE_FILE}" "${TMP_FILE}"; then
exit 0
fi

mv "${TMP_FILE}" "${MARKETPLACE_FILE}"
8 changes: 8 additions & 0 deletions tests/github_workflows.bats
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ job_has_if_condition() {
validate_yaml_file "${WORKFLOW_DIR}/sync-marketplace.yml"
}

@test "Marketplace sync workflow calls sync script" {
ensure_yaml_validator
local sync_command
sync_command=$(yaml_get "${WORKFLOW_DIR}/sync-marketplace.yml" ".jobs.sync-marketplace.steps[] | select(.name == \"Sync marketplace.json version\") | .run")

[[ "$sync_command" == "bash scripts/sync-marketplace-version.sh" ]]
}

@test "Release workflow has infinite loop prevention" {
ensure_yaml_validator
# Verify that the workflow prevents infinite loops from bot release commits
Expand Down
27 changes: 27 additions & 0 deletions tests/me/me-specific.bats
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,30 @@ load ../helpers/bats_helper
grep -q "isRequired" "$script"
grep -q "BLOCKED|UNSTABLE" "$script"
}

@test "me: lsp install hooks use bun instead of npm" {
local bash_hook="${PROJECT_ROOT}/plugins/me/hooks/lsp-bash-check-install.sh"
local ts_hook="${PROJECT_ROOT}/plugins/me/hooks/lsp-typescript-check-install.sh"
local py_hook="${PROJECT_ROOT}/plugins/me/hooks/lsp-python-check-install.sh"

run ! grep -q "npm install -g" "$bash_hook"
run ! grep -q "npm install -g" "$ts_hook"
run ! grep -q "npm install -g" "$py_hook"

grep -q "bun add -g" "$bash_hook"
grep -q "bun add -g" "$ts_hook"
grep -q "bun add -g" "$py_hook"
}

@test "me: release-with-github-app doc uses bun release flow" {
local release_doc="${PROJECT_ROOT}/docs/release-with-github-app.yml"

run ! grep -q "actions/setup-node" "$release_doc"
run ! grep -q "npm ci" "$release_doc"
run ! grep -q "npx semantic-release" "$release_doc"
run ! grep -q "node -p" "$release_doc"

grep -q "oven-sh/setup-bun" "$release_doc"
grep -q "bun install" "$release_doc"
grep -q "bunx semantic-release" "$release_doc"
}
Loading