Skip to content

Commit 3066a50

Browse files
committed
release: merge develop into main for v0.32.2
2 parents 60dc979 + 27ef039 commit 3066a50

6 files changed

Lines changed: 73 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.32.2] - 2026-04-24
9+
10+
Patch release working around a bug in `@anthropic-ai/claude-agent-sdk` (v0.2.104+) where Linux auto-discovery tries the `-musl` platform package before glibc regardless of the host's actual libc. On glibc VPS installs (Ubuntu / Debian) with both platform packages present in `node_modules`, the SDK spawned the musl binary and failed with `Claude Code native binary not found` because the musl dynamic loader was absent — breaking every chat session on the affected VPS with no local repro. See upstream [issue #296](https://github.com/anthropics/claude-agent-sdk-typescript/issues/296).
11+
12+
### Fixed
13+
14+
- **`dashboard/terminal-server/src/chat-bridge.js`** — add `resolveClaudeExecutable()` that probes `/lib` and `/usr/lib` for `ld-musl-*` to detect the host's libc, then reorders the candidate platform packages to prefer the matching variant (glibc-first on glibc hosts, musl-first on Alpine/musl). Resolved path is passed via `queryOptions.pathToClaudeCodeExecutable` so the SDK skips its own (buggy) discovery. Respects `CLAUDE_CODE_EXECUTABLE` env override and falls back to SDK auto-discovery if no candidate resolves (preserves macOS dev flow).
15+
16+
### Changed
17+
18+
- **`dashboard/terminal-server/package.json`** — pin `@anthropic-ai/claude-agent-sdk` to exact `0.2.119` (was `^0.2.104`) so fresh `npm install` on the VPS doesn't drift into a newer minor with the same or worse regression before upstream lands a libc-aware fix.
19+
820
## [0.32.1] - 2026-04-24
921

1022
Patch release fixing a `tsc -b` strict-mode type error in `PluginDetail.tsx` that broke fresh frontend builds (`npm run build` fails with TS2322 on `manifest['description']`). Local incremental builds passed because `.tsbuildinfo` cached the file as clean; fresh installs hit the error on first compile.

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@evoapi/evo-nexus",
3-
"version": "0.32.1",
3+
"version": "0.32.2",
44
"description": "Unofficial open source toolkit for Claude Code — AI-powered business operating system",
55
"keywords": [
66
"claude-code",

dashboard/terminal-server/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dashboard/terminal-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"postinstall": "chmod +x node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper node_modules/node-pty/prebuilds/darwin-x64/spawn-helper 2>/dev/null || true"
1515
},
1616
"dependencies": {
17-
"@anthropic-ai/claude-agent-sdk": "^0.2.104",
17+
"@anthropic-ai/claude-agent-sdk": "0.2.119",
1818
"cors": "^2.8.5",
1919
"express": "^4.19.2",
2020
"node-pty": "^1.0.0",

dashboard/terminal-server/src/chat-bridge.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,60 @@ async function loadSDK() {
100100
return sdkModule;
101101
}
102102

103+
/**
104+
* Resolve the Claude Code native binary path, working around a bug in
105+
* @anthropic-ai/claude-agent-sdk where Linux auto-discovery tries the
106+
* `-musl` variant before glibc regardless of the host's actual libc.
107+
* On glibc hosts with both packages installed, the SDK picks the musl
108+
* binary, which fails to spawn because its dynamic loader is absent.
109+
* See https://github.com/anthropics/claude-agent-sdk-typescript/issues/296
110+
*
111+
* Resolution order:
112+
* 1. CLAUDE_CODE_EXECUTABLE env var (explicit override)
113+
* 2. Platform-specific sibling package under node_modules, preferring the
114+
* libc variant that matches this host (glibc → no suffix; musl → -musl)
115+
* 3. null → fall back to the SDK's own (buggy) discovery
116+
*/
117+
let _claudeExecutablePath = undefined;
118+
function resolveClaudeExecutable() {
119+
if (_claudeExecutablePath !== undefined) return _claudeExecutablePath;
120+
121+
const envPath = process.env.CLAUDE_CODE_EXECUTABLE;
122+
if (envPath && fs.existsSync(envPath)) {
123+
console.log(`[chat-bridge] Using CLAUDE_CODE_EXECUTABLE=${envPath}`);
124+
_claudeExecutablePath = envPath;
125+
return _claudeExecutablePath;
126+
}
127+
128+
const { platform, arch } = process;
129+
const suffix = platform === 'win32' ? '.exe' : '';
130+
const isMusl = platform === 'linux' && (() => {
131+
try {
132+
return fs.readdirSync('/lib').some((f) => f.startsWith('ld-musl-'))
133+
|| fs.readdirSync('/usr/lib').some((f) => f.startsWith('ld-musl-'));
134+
} catch { return false; }
135+
})();
136+
137+
const candidates = platform === 'linux'
138+
? (isMusl
139+
? [`claude-agent-sdk-linux-${arch}-musl`, `claude-agent-sdk-linux-${arch}`]
140+
: [`claude-agent-sdk-linux-${arch}`, `claude-agent-sdk-linux-${arch}-musl`])
141+
: [`claude-agent-sdk-${platform}-${arch}`];
142+
143+
for (const pkg of candidates) {
144+
try {
145+
const p = require.resolve(`@anthropic-ai/${pkg}/claude${suffix}`);
146+
console.log(`[chat-bridge] Resolved Claude binary: ${p} (libc: ${isMusl ? 'musl' : 'glibc'})`);
147+
_claudeExecutablePath = p;
148+
return _claudeExecutablePath;
149+
} catch { /* try next */ }
150+
}
151+
152+
console.warn('[chat-bridge] Could not resolve Claude binary; letting SDK auto-discover');
153+
_claudeExecutablePath = null;
154+
return _claudeExecutablePath;
155+
}
156+
103157
/**
104158
* Scan a tool_result text for a ticket-creation response.
105159
* Returns the ticket id if a POST /api/tickets response is detected, else null.
@@ -369,6 +423,9 @@ class ChatBridge {
369423
abortController,
370424
};
371425

426+
const claudeExe = resolveClaudeExecutable();
427+
if (claudeExe) queryOptions.pathToClaudeCodeExecutable = claudeExe;
428+
372429
// Load agent definition from .claude/agents/{name}.md
373430
if (agentName) {
374431
const agentDef = loadAgentFile(agentName, queryOptions.cwd);

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "evo-nexus"
3-
version = "0.32.1"
3+
version = "0.32.2"
44
description = "Unofficial open source toolkit for Claude Code — AI-powered business operating system"
55
requires-python = ">=3.10"
66
dependencies = [

0 commit comments

Comments
 (0)