Skip to content

fix(capabilities): require explicit intent for named groups #690

fix(capabilities): require explicit intent for named groups

fix(capabilities): require explicit intent for named groups #690

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: Node ${{ matrix.node-version }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node-version: [22.19.0, 24]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- run: bun run check
- run: bun run test
- name: Smoke-test Pi package discovery
run: |
agent_dir="$(mktemp -d)"
trap 'rm -rf "$agent_dir"' EXIT
PI_CODING_AGENT_DIR="$agent_dir" ./node_modules/.bin/pi install "$PWD"
output="$(PI_CODING_AGENT_DIR="$agent_dir" ./node_modules/.bin/pi --offline --no-session --mode rpc </dev/null)"
grep -q '"statusKey":"plan-mode"' <<<"$output"
grep -q '"widgetKey":"session-tasks-panel"' <<<"$output"
- name: Smoke-test packed extensions without optional peers
run: |
root="$(mktemp -d)"
trap 'rm -rf "$root"' EXIT
mkdir "$root/app" "$root/agent"
printf '{"private":true}\n' >"$root/app/package.json"
npm pack --ignore-scripts --silent --pack-destination "$root" >/dev/null
tarballs=("$root"/*.tgz)
test "${#tarballs[@]}" -eq 1
npm install --prefix "$root/app" --ignore-scripts --legacy-peer-deps --no-audit --no-fund "${tarballs[0]}"
test ! -e "$root/app/node_modules/ioredis"
package="$root/app/node_modules/@tt-a1i/openpi"
PI_CODING_AGENT_DIR="$root/agent" ./node_modules/.bin/pi \
--offline \
--mode rpc \
--no-extensions \
--extension "$package/extensions/file-search/index.ts" \
--extension "$package/extensions/git-info/index.ts" \
</dev/null
- name: Smoke-test packed standalone Web CLI
run: |
root="$(mktemp -d)"
server_pid=""
cleanup() {
if [[ -n "$server_pid" ]] && kill -0 "$server_pid" 2>/dev/null; then
kill -TERM "$server_pid"
wait "$server_pid"
fi
rm -rf "$root"
}
trap cleanup EXIT
mkdir "$root/app" "$root/workspace"
printf '{"private":true}\n' >"$root/app/package.json"
npm pack --ignore-scripts --silent --pack-destination "$root" >/dev/null
tarballs=("$root"/*.tgz)
test "${#tarballs[@]}" -eq 1
npm install --prefix "$root/app" --ignore-scripts --no-audit --no-fund "${tarballs[0]}"
OPENPI_WEB_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
"$root/app/node_modules/.bin/openpi" web "$root/workspace" --port 0 --no-open \
>"$root/host.log" 2>&1 &
server_pid=$!
for _ in {1..100}; do
grep -q '^OpenPI Web Workbench is running at ' "$root/host.log" && break
kill -0 "$server_pid"
sleep 0.1
done
origin="$(sed -n 's/^OpenPI Web Workbench is running at //p' "$root/host.log" | tail -n 1)"
test -n "$origin"
curl --fail --silent --show-error --output "$root/marked.js" "$origin/marked.js"
grep -q 'marked v18' "$root/marked.js"
kill -TERM "$server_pid"
wait "$server_pid"
server_pid=""
windows-background-terminals:
name: Background terminals (Windows)
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22.19.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Test Windows process lifecycle
run: |
$testPath = if (Test-Path "tests/extensions/background-terminals/manager.test.ts") {
"tests/extensions/background-terminals/manager.test.ts"
} else {
"extensions/background-terminals/manager.test.ts"
}
node --test --experimental-strip-types $testPath