Skip to content

Commit 6c5c9b3

Browse files
committed
ci(contracts): capture pinned OpenCLI descriptive schemas in isolation
Run only bounded version/help probes from npm OpenCLI 1.8.8 with lifecycle scripts disabled. Retain package provenance, hashes and descriptive artifacts; do not invoke website operations.
1 parent 41ffefd commit 6c5c9b3

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Pinned upstream descriptive contracts
2+
on:
3+
push:
4+
branches: ['feature/2.0.x-contract-hardening']
5+
paths: ['.github/workflows/upstream-contracts.yml']
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
jobs:
10+
capture:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 10
13+
steps:
14+
- uses: actions/checkout@v7
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '22'
18+
- name: Install pinned OpenCLI without lifecycle scripts
19+
shell: bash
20+
run: |
21+
mkdir -p upstream-evidence "$RUNNER_TEMP/opencli-prefix" "$RUNNER_TEMP/opencli-isolated-home"
22+
npm view @jackwener/opencli@1.8.8 version gitHead dist --json > upstream-evidence/npm-provenance.json
23+
npm install --prefix "$RUNNER_TEMP/opencli-prefix" --ignore-scripts --no-audit --no-fund --save-exact @jackwener/opencli@1.8.8
24+
- name: Capture only bounded version and structured help
25+
shell: bash
26+
run: |
27+
export HOME="$RUNNER_TEMP/opencli-isolated-home"
28+
CLI="$RUNNER_TEMP/opencli-prefix/node_modules/@jackwener/opencli/dist/src/main.js"
29+
timeout 20 node "$CLI" --version > upstream-evidence/version.txt
30+
timeout 20 node "$CLI" --help -f json > upstream-evidence/root-help.json
31+
for namespace in browser daemon auth skills plugin adapter profile; do
32+
timeout 20 node "$CLI" "$namespace" --help -f json > "upstream-evidence/$namespace-help.json"
33+
done
34+
cp "$RUNNER_TEMP/opencli-prefix/node_modules/@jackwener/opencli/cli-manifest.json" upstream-evidence/cli-manifest.json
35+
cp "$RUNNER_TEMP/opencli-prefix/node_modules/@jackwener/opencli/package.json" upstream-evidence/package.json
36+
tar -czf upstream-evidence/opencli-package.tar.gz -C "$RUNNER_TEMP/opencli-prefix/node_modules/@jackwener/opencli" dist/src cli-manifest.json package.json
37+
node --version > upstream-evidence/node-version.txt
38+
date -u +%FT%TZ > upstream-evidence/captured-at.txt
39+
(cd upstream-evidence && sha256sum *.json *.txt *.tar.gz > SHA256SUMS)
40+
- uses: actions/upload-artifact@v7
41+
if: always()
42+
with:
43+
name: opencli-1.8.8-descriptive-${{ github.sha }}
44+
path: upstream-evidence
45+
retention-days: 14
46+
if-no-files-found: error

0 commit comments

Comments
 (0)