claude-ws 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-ws",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI-powered workspace for solo CEOs and indie builders — manage your entire business with AI agents, not just code. Kanban board, code editor, Git integration, claw agent hub, local-first SQLite.",
|
|
6
6
|
"keywords": [
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { EventEmitter } from 'events';
|
|
8
8
|
import { existsSync, readFileSync, mkdirSync } from 'fs';
|
|
9
|
-
import { join } from 'path';
|
|
9
|
+
import { join, dirname } from 'path';
|
|
10
10
|
import { homedir } from 'os';
|
|
11
11
|
import { query, type Query } from '@anthropic-ai/claude-agent-sdk';
|
|
12
12
|
import { adaptSDKMessage, isValidSDKMessage } from './claude-sdk-message-to-output-adapter';
|
|
@@ -166,6 +166,13 @@ export class AgentProvider extends EventEmitter {
|
|
|
166
166
|
const defaultModel = this.config.anthropicModel || 'opus';
|
|
167
167
|
const effectiveModel = model ? this.resolveModel(model) : defaultModel;
|
|
168
168
|
|
|
169
|
+
// Ensure the current node binary's directory is in PATH — when running under PM2/systemd
|
|
170
|
+
// with nvm, the SDK's `spawn("node", ...)` can fail with ENOENT if PATH doesn't include it
|
|
171
|
+
const nodeBinDir = dirname(process.execPath);
|
|
172
|
+
if (process.env.PATH && !process.env.PATH.split(':').includes(nodeBinDir)) {
|
|
173
|
+
process.env.PATH = `${nodeBinDir}:${process.env.PATH}`;
|
|
174
|
+
}
|
|
175
|
+
|
|
169
176
|
// Set env vars on process.env so the SDK subprocess inherits them
|
|
170
177
|
if (this.config.anthropicBaseUrl) process.env.ANTHROPIC_BASE_URL = this.config.anthropicBaseUrl;
|
|
171
178
|
if (this.config.anthropicAuthToken) {
|