Skip to content

feat: add xcloud ai terminal handoff #2

feat: add xcloud ai terminal handoff

feat: add xcloud ai terminal handoff #2

Workflow file for this run

name: CLI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- run: npm ci
- run: node --check bin/xcloud.js
- run: node --check lib/*.js test/*.js
- run: npm test
- run: npm pack --dry-run
- name: Verify npm global install
run: |
npm install -g . --prefix /tmp/xcloud-npm-global
/tmp/xcloud-npm-global/bin/xcloud --help
/tmp/xcloud-npm-global/bin/xcloud --output json api post /servers/test/reboot >/tmp/xcloud-confirm.json 2>&1 || test $? -eq 3
python3 - <<'PY'
import json
p=json.load(open('/tmp/xcloud-confirm.json'))
assert p['success'] is False
assert p['error']['code']=='ConfirmationRequired'
print('global install confirmation guard ok')
PY