Computer use CLI for AI agents
Rust accessibilityaccessibility-apiai-agentsautomationclicomputer-usecomputer-use-agentcomputer-use-agentsdesktop-automationmacosmcprust
ci: use npm trusted publishing
Lahfira6936bb28aa2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 61e050c96..0fa596612 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -370,6 +370,7 @@ jobs:with:node-version: '24'registry-url: https://registry.npmjs.org+ package-manager-cache: false- name: Verify GitHub Release assetsenv:@@ -400,10 +401,8 @@ jobs:cp ../CHANGELOG.md CHANGELOG.md 2>/dev/null || true- name: Publish to npm- run: npm publish --provenance --access public+ run: npm publish --access publicworking-directory: npm- env:- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}publish-skills:name: Publish Skills to ClawHubdiff --git a/.github/workflows/supply-chain.yml b/.github/workflows/supply-chain.ymlindex fbaaea0c7..c77b71482 100644--- a/.github/workflows/supply-chain.yml+++ b/.github/workflows/supply-chain.yml@@ -27,6 +27,13 @@ jobs:- name: Check release metadata consistencyrun: scripts/check-release-consistency.sh+ - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0+ with:+ node-version: '24'++ - name: Check npm package and publish policy+ run: node scripts/check-npm-package.js+- name: Cargo dependency policyuses: EmbarkStudios/cargo-deny-action@6c8f9facfa5047ec02d8485b6bf52b587b7777d1 # v2.0.18with:diff --git a/scripts/check-npm-package.js b/scripts/check-npm-package.jsindex 407c825e9..48b04db13 100644--- a/scripts/check-npm-package.js+++ b/scripts/check-npm-package.js@@ -1,11 +1,13 @@#!/usr/bin/env nodeconst { execFileSync } = require('child_process');+const { readFileSync } = require('fs');const { join } = require('path');const root = join(__dirname, '..');const npmDir = join(root, 'npm');const pkg = require(join(npmDir, 'package.json'));+const releaseWorkflow = readFileSync(join(root, '.github/workflows/release.yml'), 'utf8');const expectedFiles = ['bin/agent-desktop.js','package.json',@@ -20,6 +22,22 @@ if (pkg.repository?.url !== 'git+https://github.com/lahfir/agent-desktop.git') {throw new Error('npm repository URL must be normalized for npm publish');}+if (releaseWorkflow.includes('secrets.NPM_TOKEN') || releaseWorkflow.includes('NODE_AUTH_TOKEN')) {+ throw new Error('release workflow must use npm trusted publishing, not long-lived npm tokens');+}++if (!releaseWorkflow.includes('id-token: write')) {+ throw new Error('release workflow must grant id-token: write for npm trusted publishing');+}++if (!releaseWorkflow.includes('package-manager-cache: false')) {+ throw new Error('release workflow must disable package manager caching for npm publishing');+}++if (!releaseWorkflow.includes('npm publish --access public')) {+ throw new Error('release workflow must publish npm through the trusted-publishing command');+}+const output = execFileSync('npm', ['pack', '--dry-run', '--json'], {cwd: npmDir,encoding: 'utf8',