@siftd/connect-agent 0.2.5 → 0.2.6

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/dist/heartbeat.js CHANGED
@@ -10,7 +10,7 @@ import { hostname } from 'os';
10
10
  import { createHash } from 'crypto';
11
11
  import { getServerUrl, getAgentToken, getUserId, isCloudMode } from './config.js';
12
12
  const HEARTBEAT_INTERVAL = 10000; // 10 seconds
13
- const VERSION = '0.2.5'; // Should match package.json
13
+ const VERSION = '0.2.6'; // Should match package.json
14
14
  const state = {
15
15
  intervalId: null,
16
16
  runnerId: null,
@@ -720,9 +720,9 @@ This ensures nothing is lost even if your output gets truncated.`;
720
720
  // Escape single quotes in prompt for shell safety
721
721
  // Replace ' with '\'' (end quote, escaped quote, start quote)
722
722
  const escapedPrompt = prompt.replace(/'/g, "'\\''");
723
- // Spawn using bash -l -c to ensure proper PATH resolution (NVM, etc.)
724
- // This is more reliable than shell: true which has quote escaping issues
725
- const child = spawn('bash', ['-l', '-c', `claude -p '${escapedPrompt}' --dangerously-skip-permissions`], {
723
+ // Spawn using /bin/bash -l -c to ensure proper PATH resolution (NVM, etc.)
724
+ // Use absolute path to bash to avoid ENOENT errors in restricted environments
725
+ const child = spawn('/bin/bash', ['-l', '-c', `claude -p '${escapedPrompt}' --dangerously-skip-permissions`], {
726
726
  cwd,
727
727
  env: { ...process.env },
728
728
  stdio: ['pipe', 'pipe', 'pipe']
@@ -85,9 +85,9 @@ Include: job_id=${jobId}, timestamp, summary of work done, files modified, key f
85
85
  This ensures nothing is lost even if your output gets truncated.`;
86
86
  // Escape single quotes in task for shell safety
87
87
  const escapedTask = enhancedTask.replace(/'/g, "'\\''");
88
- // Spawn using bash -l -c to ensure proper PATH resolution (NVM, etc.)
89
- // This is more reliable than shell: true which has quote escaping issues
90
- const child = spawn('bash', ['-l', '-c', `claude -p '${escapedTask}' --output-format text --dangerously-skip-permissions`], {
88
+ // Spawn using /bin/bash -l -c to ensure proper PATH resolution (NVM, etc.)
89
+ // Use absolute path to bash to avoid ENOENT errors in restricted environments
90
+ const child = spawn('/bin/bash', ['-l', '-c', `claude -p '${escapedTask}' --output-format text --dangerously-skip-permissions`], {
91
91
  cwd: workspace,
92
92
  detached: true,
93
93
  stdio: ['ignore', 'pipe', 'pipe'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siftd/connect-agent",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Master orchestrator agent - control Claude Code remotely via web",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",