👾 Open Computer Use – Open-Source Alternative to Codex Computer Use
Swift accessibilityai-agentai-agentsclaude-codecodexcodex-computer-usecomputer-usecomputer-use-agentcross-platformcuadesktop-automationgemini-cligui-automationmacosmcpmodel-context-protocolopen-computer-useopen-computer-use-mcpopenai-codexopencode
Fix npm release auth fallback and README
Leo6dd2eac7ad68
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 4add4d0..c557264 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -48,6 +48,14 @@ jobs:dist/release/release-manifest.jsonif-no-files-found: error+ - name: Configure npm token fallback+ env:+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}+ run: |+ if [ -n "${NPM_TOKEN}" ]; then+ echo "NODE_AUTH_TOKEN=${NPM_TOKEN}" >> "${GITHUB_ENV}"+ fi+- name: Publish packages to npmif: ${{ github.event_name == 'push' || inputs.publish_to_npm }}env:diff --git a/README.md b/README.mdindex 57bb443..05f7e64 100644--- a/README.md+++ b/README.md@@ -276,7 +276,7 @@ node ./scripts/npm/publish-packages.mjs- `build-packages.mjs` 会构建 universal app 并 stage 三个 npm 包目录到 `dist/npm/`。- `release-package.sh` 会额外把它们打成 `dist/release/npm/*.tgz`,并生成 `dist/release/release-manifest.json`。-- `.github/workflows/release.yml` 支持通过 push `0.1.5` / `v0.1.5` 这类 git tag 自动发布,也保留手动触发作为兜底;发布走 npm Trusted Publishing,不再依赖长期 `NPM_TOKEN` secret。+- `.github/workflows/release.yml` 支持通过 push `0.1.5` / `v0.1.5` 这类 git tag 自动发布,也保留手动触发作为兜底;默认兼容 npm Trusted Publishing,同时也支持通过仓库 `NPM_TOKEN` secret 兜底发布。## 许可证diff --git a/docs/CICD.md b/docs/CICD.mdindex 6719d34..9c87b33 100644--- a/docs/CICD.md+++ b/docs/CICD.md@@ -5,7 +5,7 @@## 当前 release 入口- `scripts/release-package.sh`:构建 universal `Open Computer Use.app`,stage 三个 npm 包目录,并产出 `dist/release/npm/*.tgz` 与 `dist/release/release-manifest.json`。-- `.github/workflows/release.yml`:支持 push semver tag 自动发布,也支持手动触发;它会调用仓库内的 npm release 打包逻辑,并通过 GitHub Actions OIDC / npm Trusted Publishing 直接发布到 npm。+- `.github/workflows/release.yml`:支持 push semver tag 自动发布,也支持手动触发;它会调用仓库内的 npm release 打包逻辑,并优先兼容 GitHub Actions OIDC / npm Trusted Publishing,同时支持仓库 `NPM_TOKEN` secret 作为发布兜底。## 设计原则diff --git a/docs/histories/2026-04/20260417-2210-fix-npm-release-auth-and-readme-cleanup.md b/docs/histories/2026-04/20260417-2210-fix-npm-release-auth-and-readme-cleanup.mdnew file mode 100644index 0000000..736cc9b--- /dev/null+++ b/docs/histories/2026-04/20260417-2210-fix-npm-release-auth-and-readme-cleanup.md@@ -0,0 +1,24 @@+## [2026-04-17 22:10] | Task: 修复 npm release 认证并清理 npm README++### 📥 User Request++> npm 包页里把 `If you want the server without the visual cursor overlay:` 和下面那段 code block 删掉;发布这件事要一路干到能从 git tag 真正发出去,期间需要的话可以自己继续调版本或重发。++### 🔧 What Changed++- **清理 npm README 模板**:删除生成包 README 时那段“关闭 visual cursor overlay”的额外 MCP 配置示例,只保留默认安装与 MCP 配置说明。+- **补 npm 发布兜底链路**:在 `release.yml` 里新增 `Configure npm token fallback` 步骤;如果仓库配置了 `NPM_TOKEN` secret,就写入 `NODE_AUTH_TOKEN` 供 `npm publish` 使用。+- **同步仓库文档**:把根 README 和 `docs/CICD.md` 的发布说明改成“优先兼容 Trusted Publishing,同时支持 `NPM_TOKEN` secret 兜底”。++### 🧠 Design Intent (Why)++实际联调发现,GitHub Actions 构建已经能跑通,但 npm 发布会因为某些包没有单独配好 Trusted Publisher 而在 publish 阶段失败。对这个仓库来说,最稳妥的目标不是执着于单一路径,而是保证 `git tag` 这条 release 主路径真的能稳定把三份包发出去。++与此同时,npm 包页面对的是最终安装用户,README 应该尽量只保留默认成功路径,不额外堆可选环境变量分支,避免新用户以为还需要额外改 overlay 配置。++### 📌 Key Files++- `.github/workflows/release.yml`+- `scripts/npm/build-packages.mjs`+- `README.md`+- `docs/CICD.md`diff --git a/scripts/npm/build-packages.mjs b/scripts/npm/build-packages.mjsindex e338b61..5f43426 100644--- a/scripts/npm/build-packages.mjs+++ b/scripts/npm/build-packages.mjs@@ -216,22 +216,6 @@ If your MCP client accepts a stdio-style \`mcpServers\` JSON config, this is the}\`\`\`-If you want the server without the visual cursor overlay:--\`\`\`json-{- "mcpServers": {- "open-computer-use": {- "command": "open-computer-use",- "args": ["mcp"],- "env": {- "OPEN_COMPUTER_USE_VISUAL_CURSOR": "0"- }- }- }-}-\`\`\`-In practice, using this package as MCP is: global install, add the JSON config, then grant macOS \`Accessibility\` and \`Screen Recording\` permission to the host terminal or app on first use.## Use