chore: 清掉 subagent 0.2.1 实验时写到字面 ${CLAUDE_PLUGIN_ROOT} 路径的污染目录 #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node: [20, 22] | |
| exclude: | |
| # ubuntu 上跑一档就够,主要给 typecheck / 单测的快速覆盖 | |
| - os: ubuntu-latest | |
| node: 22 | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.os }} / node ${{ matrix.node }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: install (without postinstall — install-helper 单独验证) | |
| run: npm install --ignore-scripts | |
| - name: SPDX header 检查(缺 header 失败;只 ubuntu 跑一次) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: node scripts/add-spdx-headers.mjs --check | |
| - name: typecheck | |
| run: npm run typecheck | |
| - name: build | |
| run: npm run build | |
| - name: unit tests | |
| run: npm test | |
| # 下面这些只在 Windows 跑,验证 Windows-specific 路径 | |
| - name: windows / install-helper --silent 烟雾测试 | |
| if: matrix.os == 'windows-latest' | |
| run: node packages/cli/dist/index.js install-helper --silent | |
| - name: windows / doctor 自检 | |
| if: matrix.os == 'windows-latest' | |
| run: node packages/cli/dist/index.js doctor | |
| - name: windows / helper RPC 端到端(version + list_displays) | |
| if: matrix.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| $env:VISION_MCP_NATIVE_HELPER = "$pwd\native\windows\src\vision-mcp-helper.ps1" | |
| $out = node packages/cli/dist/index.js displays --json | |
| Write-Host $out | |
| if (-not ($out -match '"displays"')) { throw "displays RPC failed" } | |
| # macOS 镜像 Windows 三步:验证 swiftc 编译 + doctor + helper RPC | |
| # macos-latest runner 默认装 Xcode Command Line Tools(含 swiftc) | |
| - name: macos / install-helper 编译 swift helper | |
| if: matrix.os == 'macos-latest' | |
| run: node packages/cli/dist/index.js install-helper | |
| - name: macos / doctor 自检 | |
| if: matrix.os == 'macos-latest' | |
| run: node packages/cli/dist/index.js doctor | |
| - name: macos / helper RPC 端到端(version + list_displays) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| export VISION_MCP_NATIVE_HELPER="$PWD/native/macos/vision-mcp-helper" | |
| out=$(node packages/cli/dist/index.js displays --json) | |
| echo "$out" | |
| echo "$out" | grep -q '"displays"' || (echo "displays RPC failed" && exit 1) |