From 609ceb28b02b1ddcebc194519bbb90ffaed6164f Mon Sep 17 00:00:00 2001 From: dtzp555 Date: Sat, 4 Apr 2026 10:01:54 +1000 Subject: [PATCH] fix: use stable node symlink path in macOS plist, avoid Cellar breakage setup.mjs now resolves /opt/homebrew/Cellar/node/X.Y.Z/ to /opt/homebrew/opt/node/ so the LaunchAgent plist survives node upgrades. Bump to v3.3.1. Co-Authored-By: Claude Opus 4.6 --- ocp-plugin/openclaw.plugin.json | 2 +- ocp-plugin/package.json | 2 +- package.json | 2 +- setup.mjs | 11 ++++++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ocp-plugin/openclaw.plugin.json b/ocp-plugin/openclaw.plugin.json index 8e4ba4d..8416f6d 100644 --- a/ocp-plugin/openclaw.plugin.json +++ b/ocp-plugin/openclaw.plugin.json @@ -2,7 +2,7 @@ "id": "ocp", "name": "OCP Commands", "description": "Slash commands for the OpenClaw Proxy — /ocp usage, /ocp settings, /ocp health, etc.", - "version": "3.3.0", + "version": "3.3.1", "configSchema": { "type": "object", "additionalProperties": false, diff --git a/ocp-plugin/package.json b/ocp-plugin/package.json index 6b1b585..6f43955 100644 --- a/ocp-plugin/package.json +++ b/ocp-plugin/package.json @@ -1,6 +1,6 @@ { "name": "ocp", - "version": "3.3.0", + "version": "3.3.1", "description": "Slash commands for the OpenClaw Proxy", "main": "index.js", "type": "module", diff --git a/package.json b/package.json index 33017ad..cf64976 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openclaw-claude-proxy", - "version": "3.3.0", + "version": "3.3.1", "description": "OCP (Open Claude Proxy) — use your Claude Pro/Max subscription as an OpenAI-compatible API for any IDE. Works with Cline, OpenCode, Aider, Continue.dev, OpenClaw, and more.", "type": "module", "bin": { diff --git a/setup.mjs b/setup.mjs index f4655f8..ba9e27a 100755 --- a/setup.mjs +++ b/setup.mjs @@ -298,7 +298,16 @@ if (!DRY_RUN) { console.log("\nšŸ”„ Installing auto-start on login...\n"); const platform = process.platform; - const nodeBin = process.execPath; + // Use stable symlink path instead of versioned Cellar path (e.g. /opt/homebrew/opt/node/bin/node + // instead of /opt/homebrew/Cellar/node/25.8.0/bin/node) so the plist survives node upgrades. + let nodeBin = process.execPath; + if (platform === "darwin" && nodeBin.includes("/Cellar/")) { + const stable = nodeBin.replace(/\/Cellar\/[^/]+\/[^/]+\//, "/opt/"); + if (existsSync(stable)) { + nodeBin = stable; + log(`Using stable node path: ${nodeBin}`); + } + } // Ensure logs dir exists const logsDir = join(OPENCLAW_DIR, "logs");